智慧厨房接口对接2
This commit is contained in:
parent
c5d918c95d
commit
93d8e06559
|
|
@ -12,19 +12,4 @@ export function getKitchenDeviceSensorRecordListApi(data) {
|
|||
pageSize:data.pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询留样柜操作记录列表
|
||||
export function getKitchenSampleCabinetRecordListApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/kitchen_sample_cabinet_record/list',
|
||||
method: 'post',
|
||||
data: data,
|
||||
params:{
|
||||
pageNum:data.pageNum,
|
||||
pageSize:data.pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -51,17 +51,7 @@
|
|||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,13 +11,20 @@
|
|||
<el-form-item label="关键字" prop="searchValue">
|
||||
<el-input v-model="queryParams.searchValue" placeholder="请输入设备名称,编号" maxlength="20" clearable style="width: 240px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型" prop="saveStatus">
|
||||
<!-- <el-select v-model="queryParams.saveStatus" style="width: 240px" clearable>
|
||||
<el-option label="未入柜" value="0"></el-option>
|
||||
<el-option label="在柜" value="1"></el-option>
|
||||
<el-option label="离柜" value="2"></el-option>
|
||||
<el-option label="超时自动离柜 " value="3"></el-option>
|
||||
</el-select> -->
|
||||
<el-form-item label="设备类型" prop="deviceType5" v-if="activeName==5">
|
||||
<el-select v-model="queryParams.deviceType5" style="width: 240px" clearable>
|
||||
<el-option label="传感器" value="2"></el-option>
|
||||
<el-option label="气体检测仪" value="13"></el-option>
|
||||
<el-option label="温湿度传感器" value="14"></el-option>
|
||||
<el-option label="烟雾检测传感器 " value="15"></el-option>
|
||||
<el-option label="水浸检测传感器 " value="22"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型" prop="deviceType6" v-if="activeName==6">
|
||||
<el-select v-model="queryParams.deviceType6" style="width: 240px" clearable>
|
||||
<el-option label="摄像头" value="1"></el-option>
|
||||
<el-option label="硬盘录像机" value="9"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
|
@ -36,11 +43,11 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关联食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="canteenName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备编号" align="center" prop="canteenName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="位置" align="center" prop="canteenName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="报警原因" align="center" prop="canteenName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="报警时间" align="center" prop="canteenName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="deviceName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备编号" align="center" prop="deviceNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="位置" align="center" prop="subPlace" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="报警原因" align="center" prop="measureData" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="报警时间" align="center" prop="createTime" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
|
|
@ -48,17 +55,7 @@
|
|||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -85,32 +82,15 @@ export default {
|
|||
//表格数据
|
||||
tableListData: [],
|
||||
activeName:'5',
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
canteenName: undefined,
|
||||
areaNameStr: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// canteenName: [
|
||||
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// dictType: [
|
||||
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
// ]
|
||||
}
|
||||
pageSize: 10
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getList();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 搜索按钮操作 */
|
||||
|
|
@ -133,70 +113,24 @@ export default {
|
|||
let param = {
|
||||
"deviceCategory": this.activeName,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"pageSize": this.queryParams.pageSize,
|
||||
"pageSize": this.queryParams.pageSize,
|
||||
"deviceType": null,
|
||||
}
|
||||
getKitchenSampleCabinetRecordListApi(param).then(response => {
|
||||
if(this.activeName==1){
|
||||
param.deviceType = null;
|
||||
}
|
||||
if(this.activeName==5&&this.queryParams.deviceType5){
|
||||
param.deviceType = this.queryParams.deviceType5;
|
||||
}
|
||||
if(this.activeName==6&&this.queryParams.deviceType6){
|
||||
param.deviceType = this.queryParams.deviceType6;
|
||||
}
|
||||
getKitchenDeviceSensorRecordListApi(param).then(response => {
|
||||
this.tableListData = response.rows;
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
// const dictId = row.dictId || this.ids
|
||||
// getType(dictId).then(response => {
|
||||
// this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
// updateType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
} else {
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
// return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -21,15 +21,6 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
|
@ -42,8 +33,8 @@
|
|||
<el-table-column label="设备编号" align="center" prop="deviceNo" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备名称" align="center" prop="deviceName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="检测食堂" align="center" prop="canteenName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="检测结果" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="检测时间" align="center" prop="recordTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="检测结果" align="center" prop="measureData" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="检测时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
|
@ -91,29 +82,14 @@ export default {
|
|||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
tableListData: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
canteenName: undefined,
|
||||
areaNameStr: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// canteenName: [
|
||||
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// dictType: [
|
||||
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
// ]
|
||||
},
|
||||
},
|
||||
dialogVisible:false,//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
};
|
||||
|
|
@ -137,6 +113,8 @@ export default {
|
|||
this.loading = true;
|
||||
let param = {
|
||||
"searchValue": this.queryParams.searchValue,
|
||||
"envSensorResultTypeList": this.queryParams.envSensorResultTypeList,
|
||||
"deviceCategory": 5,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"pageSize": this.queryParams.pageSize,
|
||||
}
|
||||
|
|
@ -149,63 +127,7 @@ export default {
|
|||
openImg(row) {
|
||||
this.dialogImageUrl = row.imgUrl;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
// const dictId = row.dictId || this.ids
|
||||
// getType(dictId).then(response => {
|
||||
// this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
// updateType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
} else {
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
// return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -94,16 +94,6 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible" width="700px">
|
||||
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
|
|
@ -145,20 +135,9 @@ export default {
|
|||
canteenName: undefined,
|
||||
areaNameStr: undefined,
|
||||
},
|
||||
activeName:"1",
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// canteenName: [
|
||||
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// dictType: [
|
||||
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
// ]
|
||||
},
|
||||
activeName:"1",
|
||||
dialogVisible:false,//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -207,62 +186,6 @@ export default {
|
|||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
// const dictId = row.dictId || this.ids
|
||||
// getType(dictId).then(response => {
|
||||
// this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
// updateType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
} else {
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
// return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
openImg(row) {
|
||||
this.dialogImageUrl = row.imageUrl;
|
||||
|
|
|
|||
|
|
@ -45,17 +45,7 @@
|
|||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -92,17 +82,6 @@ export default {
|
|||
canteenName: undefined,
|
||||
areaNameStr: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// canteenName: [
|
||||
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// dictType: [
|
||||
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
// ]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -128,63 +107,7 @@ export default {
|
|||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
// const dictId = row.dictId || this.ids
|
||||
// getType(dictId).then(response => {
|
||||
// this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
// updateType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
} else {
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
// return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -70,17 +70,7 @@
|
|||
|
||||
<el-dialog :visible.sync="dialogVisible" width="700px">
|
||||
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -106,27 +96,12 @@ export default {
|
|||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [],
|
||||
postOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
postOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// canteenName: [
|
||||
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// dictType: [
|
||||
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
// ]
|
||||
},
|
||||
dialogVisible:false,//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
};
|
||||
|
|
@ -173,63 +148,7 @@ export default {
|
|||
openVideo(row){
|
||||
this.dialogImageUrl = row.checkVideoUrl;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
// const dictId = row.dictId || this.ids
|
||||
// getType(dictId).then(response => {
|
||||
// this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
// updateType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
} else {
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
// return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -27,15 +27,6 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
|
@ -67,16 +58,6 @@
|
|||
<el-dialog :visible.sync="dialogVisible" width="700px">
|
||||
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -102,10 +83,6 @@ export default {
|
|||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
|
|
@ -113,17 +90,6 @@ export default {
|
|||
canteenName: undefined,
|
||||
areaNameStr: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// canteenName: [
|
||||
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// dictType: [
|
||||
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
// ]
|
||||
},
|
||||
dialogVisible:false,//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
};
|
||||
|
|
@ -160,63 +126,7 @@ export default {
|
|||
openImg(row) {
|
||||
this.dialogImageUrl = row.imgUrl;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
// const dictId = row.dictId || this.ids
|
||||
// getType(dictId).then(response => {
|
||||
// this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
// updateType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
} else {
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
// return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="餐次" prop="mealTimeType">
|
||||
<el-select v-model="queryParams.mealTimeType" style="width: 240px" clearable>
|
||||
<el-form-item label="餐次" prop="mealtimeType">
|
||||
<el-select v-model="queryParams.mealtimeType" style="width: 240px" clearable>
|
||||
<el-option label="早餐" value="1"></el-option>
|
||||
<el-option label="午餐" value="2"></el-option>
|
||||
<el-option label="晚餐" value="3"></el-option>
|
||||
<el-option label="下午茶" value="3"></el-option>
|
||||
<el-option label="晚餐" value="4"></el-option>
|
||||
<el-option label="夜宵" value="5"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -24,10 +26,23 @@
|
|||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="餐次" align="center" prop="" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="餐次" align="center" prop="mealtimeType" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.mealtimeType==1">早餐</span>
|
||||
<span v-if="scope.row.mealtimeType==2">午餐</span>
|
||||
<span v-if="scope.row.mealtimeType==3">下午茶</span>
|
||||
<span v-if="scope.row.mealtimeType==4">晚餐</span>
|
||||
<span v-if="scope.row.mealtimeType==5">夜宵</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="餐盘照片" align="center" prop="" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="时间" align="center" prop="" :show-overflow-tooltip="true" width="180" />
|
||||
<el-table-column label="餐盘照片" align="center" prop="fileUrl" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.fileUrl" v-if="scope.row.fileUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间" align="center" prop="ledgerTime" :show-overflow-tooltip="true" width="180" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
|
|
@ -36,15 +51,8 @@
|
|||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogVisible" width="700px">
|
||||
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -71,10 +79,6 @@ export default {
|
|||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
|
|
@ -82,17 +86,8 @@ export default {
|
|||
canteenName: undefined,
|
||||
areaNameStr: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// canteenName: [
|
||||
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// dictType: [
|
||||
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
// ]
|
||||
}
|
||||
dialogVisible:false,//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -113,7 +108,7 @@ export default {
|
|||
getList() {
|
||||
this.loading = true;
|
||||
let param = {
|
||||
"mealTimeType": this.queryParams.mealTimeType,
|
||||
"mealtimeType": this.queryParams.mealtimeType,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"pageSize": this.queryParams.pageSize,
|
||||
}
|
||||
|
|
@ -123,62 +118,11 @@ export default {
|
|||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
// const dictId = row.dictId || this.ids
|
||||
// getType(dictId).then(response => {
|
||||
// this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
// updateType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
} else {
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
// return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
openImg(row) {
|
||||
this.dialogImageUrl = row.fileUrl;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
<el-select v-model="queryParams.mealTimeType" style="width: 240px" clearable>
|
||||
<el-option label="早餐" value="1"></el-option>
|
||||
<el-option label="午餐" value="2"></el-option>
|
||||
<el-option label="晚餐" value="3"></el-option>
|
||||
<el-option label="下午茶" value="3"></el-option>
|
||||
<el-option label="晚餐" value="4"></el-option>
|
||||
<el-option label="夜宵" value="5"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -24,18 +26,20 @@
|
|||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="餐次" align="center" prop="" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="餐次" align="center" prop="mealtimeType" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.mealtimeType==1">早餐</span>
|
||||
<span v-if="scope.row.mealtimeType==2">午餐</span>
|
||||
<span v-if="scope.row.mealtimeType==3">下午茶</span>
|
||||
<span v-if="scope.row.mealtimeType==4">晚餐</span>
|
||||
<span v-if="scope.row.mealtimeType==5">夜宵</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="废弃物名称" align="center" prop="garbageName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="重量(Kg)" align="center" prop="weight" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="处理人" align="center" prop="" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="处置方式" align="center" prop="dealType" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.dealType==1">丢弃</span>
|
||||
<span v-if="scope.row.dealType==2">下一餐使用</span>
|
||||
<span v-if="scope.row.dealType==3">集中售卖</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理人" align="center" prop="dealUserName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="处置方式" align="center" prop="dealTypeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="售卖金额(元)" align="center" prop="saleAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="处置照片" align="center" prop="scenePicture" :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -43,8 +47,8 @@
|
|||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处置日期" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="创建时间" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="处置日期" align="center" prop="actionDate" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="150"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
|
|
@ -56,15 +60,7 @@
|
|||
<el-dialog :visible.sync="dialogVisible" width="700px">
|
||||
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -90,10 +86,6 @@ export default {
|
|||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
|
|
@ -101,17 +93,6 @@ export default {
|
|||
canteenName: undefined,
|
||||
areaNameStr: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// canteenName: [
|
||||
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// dictType: [
|
||||
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
// ]
|
||||
},
|
||||
dialogVisible:false,//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
};
|
||||
|
|
@ -143,62 +124,6 @@ export default {
|
|||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
// const dictId = row.dictId || this.ids
|
||||
// getType(dictId).then(response => {
|
||||
// this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
// updateType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
} else {
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
// return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
openImg(row) {
|
||||
this.dialogImageUrl = row.scenePicture;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="餐次" prop="mealTimeType">
|
||||
<el-select v-model="queryParams.mealTimeType" style="width: 240px" clearable>
|
||||
<el-form-item label="餐次" prop="mealtimeType">
|
||||
<el-select v-model="queryParams.mealtimeType" style="width: 240px" clearable>
|
||||
<el-option label="早餐" value="1"></el-option>
|
||||
<el-option label="午餐" value="2"></el-option>
|
||||
<el-option label="晚餐" value="3"></el-option>
|
||||
<el-option label="下午茶" value="3"></el-option>
|
||||
<el-option label="晚餐" value="4"></el-option>
|
||||
<el-option label="夜宵" value="5"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -24,10 +26,18 @@
|
|||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="餐次" align="center" prop="" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="餐次" align="center" prop="mealtimeType" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.mealtimeType==1">早餐</span>
|
||||
<span v-if="scope.row.mealtimeType==2">午餐</span>
|
||||
<span v-if="scope.row.mealtimeType==3">下午茶</span>
|
||||
<span v-if="scope.row.mealtimeType==4">晚餐</span>
|
||||
<span v-if="scope.row.mealtimeType==5">夜宵</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="浪费次数" align="center" prop="" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="时间" align="center" prop="" :show-overflow-tooltip="true" width="180" />
|
||||
<el-table-column label="浪费次数" align="center" prop="wasteMealCount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="时间" align="center" prop="ledgerDate" :show-overflow-tooltip="true" width="180" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
|
|
@ -71,28 +81,13 @@ export default {
|
|||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
canteenName: undefined,
|
||||
areaNameStr: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// canteenName: [
|
||||
// { required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// dictType: [
|
||||
// { required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
// ]
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -113,7 +108,7 @@ export default {
|
|||
getList() {
|
||||
this.loading = true;
|
||||
let param = {
|
||||
"mealTimeType": this.queryParams.mealTimeType,
|
||||
"mealtimeType": this.queryParams.mealtimeType,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"pageSize": this.queryParams.pageSize,
|
||||
}
|
||||
|
|
@ -122,63 +117,7 @@ export default {
|
|||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
// const dictId = row.dictId || this.ids
|
||||
// getType(dictId).then(response => {
|
||||
// this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
// updateType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
} else {
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
// return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue