From 094f2211a1d3b499b7f68c000baa7af8062d1382 Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Fri, 20 Oct 2023 14:54:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=9F=A5=E9=A1=B9=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/inspectionPlan/index.vue | 41 ++++++++++++++++++----- src/views/device/item/index.vue | 9 +++-- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/src/views/device/inspectionPlan/index.vue b/src/views/device/inspectionPlan/index.vue index ca0dfc55..d403bc15 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 b6be7913..97d210cf 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() {