diff --git a/src/views/device/inspectionPlan/index.vue b/src/views/device/inspectionPlan/index.vue index ca0dfc5..d403bc1 100644 --- a/src/views/device/inspectionPlan/index.vue +++ b/src/views/device/inspectionPlan/index.vue @@ -247,14 +247,19 @@ - - - + + + + - + + + - + + + @@ -691,7 +700,7 @@ export default { planPerson: null, planStatus: null, planRestrict: null, - planType: null, + planType: "inspection", planOutsource: null, workCode: null, factoryCode: null, @@ -724,7 +733,15 @@ export default { }; }, created() { + this.setWorkCenter(); this.getList(); + for (let i = 0; i < this.planList.length; i++) { + for (let j = 0; j < this.workCenterList.length; j++) { + if (this.planList[i].planWorkshop == this.workCenterList[j].factoryCode) { + this.planList[i].workCenterName = this.workCenterList[j].factoryName; + } + } + } }, methods: { // 获取设备List-置入穿梭框信息 @@ -887,11 +904,21 @@ export default { /** 查询计划列表 */ getList() { this.loading = true; + this.setWorkCenter(); listPlan(this.queryParams).then(response => { this.planList = response.rows; + for (let i = 0; i < this.planList.length; i++) { + for (let j = 0; j < this.workCenterList.length; j++) { + if (this.planList[i].planWorkshop == this.workCenterList[j].factoryCode) { + this.planList[i].workCenterName = this.workCenterList[j].factoryName; + } + } + } this.total = response.total; this.loading = false; }); + + }, // 取消按钮 cancel() { @@ -974,7 +1001,6 @@ export default { // 获取工作中心 setWorkCenter() { getWorkCenter().then(response => { - this.workCenterList = response.data; }) }, @@ -982,7 +1008,6 @@ export default { handleUpdate(row) { this.reset(); // 清除缓存 - this.resetQuery(); this.queryEquipment = []; this.inspectionPlanStep = 0; this.selectPersonList = []; diff --git a/src/views/device/item/index.vue b/src/views/device/item/index.vue index b6be791..97d210c 100644 --- a/src/views/device/item/index.vue +++ b/src/views/device/item/index.vue @@ -725,11 +725,14 @@ export default { this.$modal.confirm('是否确认删除检查项维护编号为"' + itemCodes + '"的数据项?').then(function () { return delItem(itemIds); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); + }).then(response => { + if (response.code != 500) { + this.$modal.msgSuccess("删除成功"); + this.getList(); + } }).catch(() => { }); + }, /** 导出按钮操作 */ handleExport() {