diff --git a/src/views/specialEquipment/check/Config.vue b/src/views/specialEquipment/check/Config.vue index aa90d951..1ec798e2 100644 --- a/src/views/specialEquipment/check/Config.vue +++ b/src/views/specialEquipment/check/Config.vue @@ -84,12 +84,12 @@ export default { btnName: '修改', } : undefined, - this.$auth.hasPermi('equipment:check-setting:update') - ? { - type: 'detail', - btnName: '查看详情', - } - : undefined, + // this.$auth.hasPermi('equipment:check-setting:update') + // ? { + // type: 'detail', + // btnName: '查看详情', + // } + // : undefined, this.$auth.hasPermi('equipment:check-setting:delete') ? { type: 'delete', @@ -175,51 +175,6 @@ export default { // color: 'warning', // }, ], - rows: [ - [ - { - input: true, - label: '配置名称', - prop: 'name', - rules: [ - { required: true, message: '配置名称不能为空', trigger: 'blur' }, - ], - }, - { - input: true, - label: '配置编码', - prop: 'code', - url: '/base/equipment-check-config/getCode', - rules: [ - { required: true, message: '配置编码不能为空', trigger: 'blur' }, - ], - }, - ], - [ - { - select: true, - label: '设备名称', - prop: 'equipmentId', - url: '/base/core-equipment/listAll', - bind: { - filterable: true, - clearable: true, - }, - rules: [ - { - required: true, - message: '设备名称不能为空', - trigger: 'change', - }, - ], - }, - { - input: true, - label: '设备编码', // TODO: 和设备名称联动估计 - prop: 'equipmentCode', - }, - ], - ], // 是否显示弹出层 open: false, // 查询参数 @@ -227,6 +182,7 @@ export default { pageNo: 1, pageSize: 10, name: null, + status: 0, }, // 表单参数 form: {}, @@ -314,26 +270,18 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - // this.reset(); this.open = true; this.title = '添加巡检设置'; this.$nextTick(() => { this.$refs.add.init(); - }) + }); }, /** 修改按钮操作 */ handleUpdate(row) { - // this.reset(); - // const id = row.id; - // this.info({ id }).then((response) => { - // this.form = response.data; - // this.open = true; - // this.title = '修改巡检设置'; - // }); this.open = true; this.title = '修改巡检设置'; this.$nextTick(() => { - this.$refs.add.init(row.id); + this.$refs.add.init(row); }); }, /** 提交按钮 */ @@ -397,11 +345,11 @@ export default { this.$refs.addOrUpdate.init(id, true); }); }, - handleAddDetail({ id }) { + handleAddDetail(row) { this.addOrUpdateVisible = true; - this.addOrEditTitle = '添加巡检'; + this.addOrEditTitle = '添加内容'; this.$nextTick(() => { - this.$refs.addOrUpdate.init(id); + this.$refs.addOrUpdate.init(row); }); }, /** 导出按钮操作 */ diff --git a/src/views/specialEquipment/check/Record.vue b/src/views/specialEquipment/check/Record.vue index 59657d3c..59de97e6 100644 --- a/src/views/specialEquipment/check/Record.vue +++ b/src/views/specialEquipment/check/Record.vue @@ -379,10 +379,7 @@ export default { this.handleQuery(); }, /** 新增按钮操作 */ - handleAdd() { - // this.reset(); - // this.open = true; - // this.title = '添加维修记录'; + handleAdd() { this.addOrUpdateVisible = true; this.$nextTick(() => { this.$refs.addOrUpdate.init(); diff --git a/src/views/specialEquipment/check/add-or-updata.vue b/src/views/specialEquipment/check/add-or-updata.vue index 8bab0ca7..bdf46a00 100644 --- a/src/views/specialEquipment/check/add-or-updata.vue +++ b/src/views/specialEquipment/check/add-or-updata.vue @@ -1,8 +1,8 @@