From c79a9c4d0019a2e464fef3404cf56636464ddf47 Mon Sep 17 00:00:00 2001 From: A0010407 Date: Mon, 11 Dec 2023 14:08:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E4=B8=80=E4=B8=AA=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E9=A1=B9=E5=A4=9A=E7=85=A7=E7=89=87=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/repairOrder/index.vue | 75 ++++++++++++++++---------- 1 file changed, 48 insertions(+), 27 deletions(-) diff --git a/src/views/device/repairOrder/index.vue b/src/views/device/repairOrder/index.vue index d23430d..df17742 100644 --- a/src/views/device/repairOrder/index.vue +++ b/src/views/device/repairOrder/index.vue @@ -799,7 +799,7 @@ @@ -807,10 +807,10 @@ {{ form.workCode @@ -876,8 +876,8 @@ + - + @@ -1490,15 +1476,28 @@ export default { CS: { "text-align": "center", }, + CS1: { + "text-align": "center", + width: "250px", + }, LS: { "text-align": "center", width: "225px", }, + LS1: { + "text-align": "center", + width: "250px", + }, //图片表格样式 LSP: { "text-align": "center", width: "225px", }, + //图片表格样式 + LSP1: { + "text-align": "center", + width: "250px", + }, //检查项表格数据 detailList: [], //维修前照片 @@ -1818,6 +1817,7 @@ export default { this.openAdd = true; this.title = "快速工单"; }, + /** 填写按钮操作 */ handleWrite(row) { this.reset(); @@ -1894,7 +1894,18 @@ export default { standard.repairValue = item.repairValue; standard.repairReach = item.repairReach; standard.standardType = item.standardType; - //检查项图片 + + if (item.picturePaths != null) { + var newFiles = []; + item.picturePaths.forEach((item) => { + var newFile = {}; + newFile.name = item.fileName; + newFile.url = item.fileAddress; + newFiles.push(newFile); + }); + standard.picturePath = newFiles; + } + //检查项图片显示 var standardUrlLists = []; if (item.picturePaths != null) { item.picturePaths.forEach((item2) => { @@ -1985,12 +1996,22 @@ export default { this.form.afterRepairFile ); } - this.form.faultType = this.form.faultType.join(","); + + if (this.form.faultType != null) { + this.form.faultType = this.form.faultType.join(","); + } + console.log(this.form.faultType); this.$refs["form"].validate((valid) => { if (valid) { if (this.form.workId != null) { this.form.standardList = this.detailList; + //每个检查项 + this.form.standardList.forEach((item) => { + if (Array.isArray(item.picturePath)) { + item.picturePath = this.listToString(item.picturePath); + } + }); console.log(this.form.standardList); writeRepairOrder(this.form).then((response) => { this.openWrite = false;