From d8750fe7ab9bd6691cb3078f7cf365ae1f64ac06 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期一, 09 六月 2025 11:45:08 +0800
Subject: [PATCH] 利用率分段分析页面时间段默认值从00:00至08:00点调整为00:00至23:59分

---
 src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue |  104 +++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 78 insertions(+), 26 deletions(-)

diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
index 9fb7779..9a8dc93 100644
--- a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
+++ b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
@@ -23,10 +23,23 @@
             </a-form-model-item>
           </a-col>
           <a-col :span='span'>
+            <a-form-model-item label="宸ュ崟鐘舵��">
+              <a-input readOnly v-model="tableRowRecord.inspectionStatus_dictText"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span='span'>
             <a-form-model-item label="璁惧缂栧彿">
               <MaintenanceEquipmentSelect v-model="tableRowRecord.equipmentId"
                                           :maintenanceCategory="'POINT_INSPECTION'" disabled
                                           @autocompleteForm="autoCompleteForm"/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+
+        <a-row>
+          <a-col :span='span'>
+            <a-form-model-item label="瀹夎浣嶇疆">
+              <a-input readOnly v-model="tableRowRecord.installationPosition_dictText"/>
             </a-form-model-item>
           </a-col>
           <a-col :span='span'>
@@ -34,12 +47,17 @@
               <a-input readOnly v-model="tableRowRecord.standardName"/>
             </a-form-model-item>
           </a-col>
+          <a-col :span='span'>
+            <a-form-model-item label="鏍囧噯缂栫爜">
+              <a-input readOnly v-model="tableRowRecord.standardCode"/>
+            </a-form-model-item>
+          </a-col>
         </a-row>
 
         <a-row>
           <a-col :span='span'>
-            <a-form-model-item label="鏍囧噯缂栫爜">
-              <a-input readOnly v-model="tableRowRecord.standardCode"/>
+            <a-form-model-item label="淇濆吇鍛ㄦ湡">
+              <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/>
             </a-form-model-item>
           </a-col>
           <a-col :span='span'>
@@ -55,14 +73,20 @@
         </a-row>
 
         <a-row>
+
           <a-col :span='span'>
-            <a-form-model-item label="淇濆吇鍛ㄦ湡">
-              <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/>
+            <a-form-model-item label="鐐规浜�">
+              <a-input v-model="tableRowRecord.operator_dictText" readOnly/>
             </a-form-model-item>
           </a-col>
           <a-col :span='span'>
-            <a-form-model-item label="鐐规浜�">
-              <a-input v-model="tableRowRecord.operator" readOnly/>
+            <a-form-model-item label="鐐规浜虹數璇�">
+              <a-input v-model="tableRowRecord.operatorPhone_dictText" readOnly/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span='span'>
+            <a-form-model-item label="浣滀笟鎸囧">
+              <a-button  @click="handlePreview(tableRowRecord.referenceFile)" type="primary" icon="eye">棰勮</a-button>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -119,7 +143,7 @@
 
               <template v-slot:reportFlag="props">
                 <j-dict-select-tag v-model="props.row.reportFlag"
-                                   :placeholder="props.row.inspectionResult==='2'?'璇烽�夋嫨寮傚父鏄惁淇濅慨':''"
+                                   :placeholder="props.row.inspectionResult==='2'?'璇烽�夋嫨寮傚父鏄惁鎶ヤ慨':''"
                                    :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'"
                                    dictCode="yn"
                                    style="width: 100%"/>
@@ -145,7 +169,7 @@
             </a-tab-pane>
 
             <a-tab-pane key='3' tab='娴佺▼鍥�'>
-              <img :src="imageSrc" alt="Fetched Image"/>-->
+              <img :src="imageSrc" alt="Fetched Image"/>
             </a-tab-pane>
           </template>
 
@@ -190,6 +214,8 @@
         </template>
       </a-form-model>
     </a-spin>
+
+    <lx-file-preview ref="lxFilePreview" :fileUrl="fileUrl"></lx-file-preview>
   </j-modal>
 </template>
 
@@ -236,10 +262,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,
@@ -307,7 +335,8 @@
         selectedRowKeys: [],
         disableSubmit: false,
         activeTabKey: '1',
-        title: ''
+        title: '',
+        fileUrl: '',
       }
     },
     computed: {
@@ -356,22 +385,18 @@
        * 鑾峰彇寰呭姙璁板綍鐨勫熀鏈俊鎭�
        * @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);
+        if (this.tableRowRecord.imageFiles) {
+          let obj = JSON.parse(this.tableRowRecord.imageFiles)
+          this.tableRowRecord.fileList = [...obj]
+        }
+        await this.loadDetail(record.dataId)
       },
 
       async submitForm() {
@@ -416,11 +441,11 @@
         })
       },
 
-      autoCompleteForm({ standardName, maintenancePeriod, standardCode }) {
+      autoCompleteForm({ standardName, maintenancePeriod, standardCode, referenceFile }) {
         this.$set(this.tableRowRecord, 'standardName', standardName)
         this.$set(this.tableRowRecord, 'maintenancePeriod', maintenancePeriod)
         this.$set(this.tableRowRecord, 'standardCode', standardCode)
-        this.spinning = false
+        this.$set(this.tableRowRecord, 'referenceFile', referenceFile)
       },
 
       // 鎵归噺閫夋嫨鎵�鏈夌偣妫�缁撴灉
@@ -470,7 +495,34 @@
       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
+            })
+        }
+      },
+      handlePreview: function (fileJson) {
+        if(fileJson) {
+          let obj = JSON.parse(fileJson)
+          if(obj.filePath) {
+            this.$refs.lxFilePreview.preview(obj.filePath);
+          }else {
+            that.$message.warning('娌℃湁涓婁紶鎿嶄綔鎸囧鍥剧墖')
+          }
+        }else {
+          that.$message.warning('娌℃湁涓婁紶鎿嶄綔鎸囧鍥剧墖')
+        }
+
+      },
     }
   }
 </script>

--
Gitblit v1.9.3