From 911336944e8e40c4b3fe7587fe9ce5e8fa829872 Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Thu, 19 Oct 2023 17:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E8=AE=A1=E5=88=92=E4=BF=AE?= =?UTF-8?q?=E6=94=B9+=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/inspectionPlan/index.vue | 72 +++++++++++------------ 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/src/views/device/inspectionPlan/index.vue b/src/views/device/inspectionPlan/index.vue index 98033da5..ca0dfc55 100644 --- a/src/views/device/inspectionPlan/index.vue +++ b/src/views/device/inspectionPlan/index.vue @@ -229,7 +229,7 @@ >删除 - + { - console.log("开始格式化设备信息") - console.log(response) for (let i = 0; i < response.data.length; i++) { this.form.equipmentItem.push(response.data[i]); @@ -860,8 +846,6 @@ export default { }, // 选择设备多选操作 selectChangeEqu(e) { - console.log("这里!!!!!") - console.log(e) this.selectEquList = e; }, // 获取设备信息 @@ -988,10 +972,9 @@ export default { this.title = "添加计划"; }, // 获取工作中心 - setWorkCenter(){ + setWorkCenter() { getWorkCenter().then(response => { - console.log("这里是工作中心") - console.log(response.data) + this.workCenterList = response.data; }) }, @@ -1008,9 +991,6 @@ export default { this.setWorkCenter(); initUpdatePlanInfo(row).then(response => { - console.log(row) - console.log("返回数据如下") - console.log(response.data) this.form = response.data; this.selectPersonList = response.data.personListVO; @@ -1020,7 +1000,7 @@ export default { this.form.equipmentItem[i].itemTempName = ''; } for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) { - this.form.equipmentItem[i].itemTempName = this.form.equipmentItem[i].itemTempName + this.form.equipmentItem[i].equPlanDetailList[j].itemName +"," + this.form.equipmentItem[i].itemTempName = this.form.equipmentItem[i].itemTempName + this.form.equipmentItem[i].equPlanDetailList[j].itemName + "," } } @@ -1080,8 +1060,6 @@ export default { }); } else { this.form.personList = this.selectPersonList; - console.log("这里是人员信息") - console.log(this.form.personList) addPlan(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; @@ -1094,7 +1072,26 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const planIds = row.planId || this.ids; - this.$modal.confirm('是否确认删除计划编号为"' + planIds + '"的数据项?').then(function () { + + var planCodes = ''; + // 处理信息 + for (let i = 0; i < this.planList.length; i++) { + for (let j = 0; j < planIds.length; j++) { + if (planIds[j] == this.planList[i].planId) { + planCodes = planCodes + this.planList[i].planCode + ','; + } + } + } + + if (planCodes == '') { + for (let i = 0; i < this.planList.length; i++) { + if (planIds == this.planList[i].planId) { + planCodes = this.planList[i].planCode; + } + } + } + + this.$modal.confirm('是否确认删除计划编号为"' + planCodes + '"的数据项?').then(function () { return delPlan(planIds); }).then(() => { this.getList(); @@ -1120,6 +1117,7 @@ export default { .my-step-body { margin-top: 15px; } + .el-transfer-panel { width: 300px; }