From d18aac028272ad8c9173a1c180553b6871e70693 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期三, 23 四月 2025 15:14:37 +0800
Subject: [PATCH] art: 设备管理-点检-点检前端问题修改

---
 src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue |   46 +++++++++++++++++++++++++++++-----------------
 1 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
index e33db1f..79fdd12 100644
--- a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
+++ b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
@@ -62,7 +62,7 @@
           </a-col>
           <a-col :span='span'>
             <a-form-model-item label="鐐规浜�">
-              <a-input v-model="tableRowRecord.operator" readOnly/>
+              <a-input v-model="tableRowRecord.operator_dictText" readOnly/>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -236,10 +236,12 @@
         visible: false,
         // 琛ㄥご
         url: {
-          queryBomDataById: '/eam/eamInspectionOrder/selectVoById',
+          // queryBomDataById: '/eam/eamInspectionOrder/selectVoById',
           diagramView: '/assign/flow/diagramView',
           queryHisTaskList: '/assign/flow/queryHisTaskList',
-          approve: '/eam/eamInspectionOrder/approval'
+          approve: '/eam/eamInspectionOrder/approval',
+          queryById: '/eam/eamInspectionOrder/queryById',
+          detailList: '/eam/eamInspectionOrderDetail/queryList'
         },
         detail: {
           loading: false,
@@ -356,22 +358,19 @@
        * 鑾峰彇寰呭姙璁板綍鐨勫熀鏈俊鎭�
        * @param record 寰呭姙璁板綍淇℃伅
        */
-      getBasicInformation(record) {
+      async getBasicInformation(record) {
         this.activeTabKey = '1'
-        this.tableRowRecord = {}
         this.detail.dataSource = []
         this.spinning = true
         const param = { id: record.dataId }
-        const that = this
-        getAction(this.url.queryBomDataById, param)
-          .then((res => {
-            if (res.success) {
-              that.tableRowRecord = { ... res.result[0], fileList: JSON.parse(res.result[0].imageFiles) }
-              if (!this.hasInspectionDateArrived && !this.disableSubmit) this.title += `锛堟湭鍒扮偣妫�鏃ユ湡涓嶈兘鎻愬墠鐐规锛塦
-              that.detail.dataSource = res.result[0].tableDetailList
-              console.log('that.tableRowRecord----->', that.tableRowRecord)
-            }
-          }))
+        let res = await getAction(this.url.queryById, param);
+        this.tableRowRecord = Object.assign({}, res.result);
+        debugger
+        if (this.tableRowRecord.imageFiles) {
+          let obj = JSON.parse(this.tableRowRecord.imageFiles)
+          this.tableRowRecord.fileList = [...obj]
+        }
+        await this.loadDetail(record.dataId)
       },
 
       async submitForm() {
@@ -420,7 +419,6 @@
         this.$set(this.tableRowRecord, 'standardName', standardName)
         this.$set(this.tableRowRecord, 'maintenancePeriod', maintenancePeriod)
         this.$set(this.tableRowRecord, 'standardCode', standardCode)
-        this.spinning = false
       },
 
       // 鎵归噺閫夋嫨鎵�鏈夌偣妫�缁撴灉
@@ -470,7 +468,21 @@
       handleCancel() {
         this.selectedRowKeys = []
         this.visible = false
-      }
+      },
+      //鏍囧噯閫夋嫨鍙樺寲
+      loadDetail(orderId) {
+        if (orderId) {
+          getAction(this.url.detailList, { orderId: orderId })
+            .then(res => {
+              if (res.success) {
+                this.detail.dataSource = [...res.result]
+              }
+            })
+            .finally(() => {
+              this.spinning = false
+            })
+        }
+      },
     }
   }
 </script>

--
Gitblit v1.9.3