From dcf77c4de48b5d09c20ae3b4aa1ff8cefb280c17 Mon Sep 17 00:00:00 2001 From: A0010407 Date: Tue, 5 Dec 2023 17:40:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=20=E6=95=85=E9=9A=9C?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/repairOrder/index.vue | 35 ++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/views/device/repairOrder/index.vue b/src/views/device/repairOrder/index.vue index 3c51ef4..8ee458c 100644 --- a/src/views/device/repairOrder/index.vue +++ b/src/views/device/repairOrder/index.vue @@ -1042,7 +1042,7 @@ - + @@ -1056,6 +1056,11 @@ + + + + + @@ -1107,6 +1112,7 @@ import { updateRepairOrder, applyOutsource, writeRepairOrder, + queryEquFaultTypeTree, } from "@/api/device/repairOrder"; import { getMaintenanceTeamList } from "@/api/device/equTeam"; import ItemSelect from "./selectSingleEquipment.vue"; @@ -1149,6 +1155,8 @@ export default { urlAfterLists: [], //选择设备维修班组 teamOption: [], + //故障类型 + faultTypeOption: [], optType: undefined, // 遮罩层 loading: true, @@ -1283,6 +1291,7 @@ export default { created() { this.getList(); this.getTeamList(); + this.getEquFaultTypeTree(); }, methods: { // 生成表头序号 @@ -1354,6 +1363,14 @@ export default { this.teamOption = response.rows; }); }, + //故障类型 + getEquFaultTypeTree() { + this.loading = true; + queryEquFaultTypeTree(this.queryParams).then((response) => { + console.log(response.rows); + this.faultTypeOption = response.data; + }); + }, // 委外申请查看页面-取消按钮 cancelApplyViewForm() { this.openApplyView = false; @@ -1449,7 +1466,8 @@ export default { const workId = row.workId || this.ids; getRepairOrder(workId).then((response) => { this.form = response.data; - + //转成list + this.form.faultType = response.data.faultType.split(","); //遍历response.data.beforeRepairFiles if (response.data.beforeRepairFiles != null) { var beforeNewFiles = []; @@ -1600,6 +1618,8 @@ export default { this.form.afterRepairFile ); } + this.form.faultType = this.form.faultType.join(','); + console.log(this.form.faultType); this.$refs["form"].validate((valid) => { if (valid) { if (this.form.workId != null) { @@ -1707,6 +1727,17 @@ export default { } } }, + + // 对象转成指定字符串分隔 + listToString(list, separator) { + let strs = ""; + separator = separator || ","; + for (let i in list) { + strs += list[i].url + separator; + } + return strs != "" ? strs.substr(0, strs.length - 1) : ""; + }, + }, };