fix:生产设备增删改后刷新列表,设备类型光子单独一个数组

This commit is contained in:
shijing 2024-08-15 15:44:42 +08:00
parent 06c3e107f0
commit 9fa6081434
2 changed files with 9 additions and 7 deletions

View File

@ -103,6 +103,10 @@ export default {
name: [{ required: true, message: "请输入类型名称" }], name: [{ required: true, message: "请输入类型名称" }],
type: [{ required: true, message: "请请选择设备类型" }], type: [{ required: true, message: "请请选择设备类型" }],
}, },
type_gx:[
{ text: '生产设备', key: 10 },
{ text: '计量设备', key: 20 },
],
visible: false, visible: false,
isSaveing: false, isSaveing: false,
}; };

View File

@ -341,10 +341,12 @@ export default {
}, },
// //
async table_del(row) { async table_del(row) {
this.$API.em.equipment.delete let that = this;
that.$API.em.equipment.delete
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("删除成功"); that.$message.success("删除成功");
that.$refs.table.refresh();
return res; return res;
}) })
.catch((err) => { .catch((err) => {
@ -354,11 +356,7 @@ export default {
// //
handleSaveSuccess(data, mode) { handleSaveSuccess(data, mode) {
if (mode == "add") {
this.$refs.table.refresh(); this.$refs.table.refresh();
} else if (mode == "edit") {
this.$refs.table.refresh();
}
}, },
handleCheckSuccess() { }, handleCheckSuccess() { },
handleQuery() { handleQuery() {