From ae9b400eae985f6b6f2e33f66ee1575f72675898 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期六, 09 八月 2025 00:18:41 +0800
Subject: [PATCH] 添加流程节点

---
 src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue |    7 
 src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue            |   20 +
 src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue     |  171 +++++++++++
 src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue                |  308 +++++++++++++++++++++
 src/views/flowable/workflow/repairOrder/ReportAccidentsRegisterApprovalModal.vue     |  150 ++++++++++
 src/views/flowable/workflow/repairOrder/ReportProductHazardsApprovalModal.vue        |  151 ++++++++++
 src/views/eam/base/EamMaintenanceStandardList.vue                                    |    4 
 7 files changed, 776 insertions(+), 35 deletions(-)

diff --git a/src/views/eam/base/EamMaintenanceStandardList.vue b/src/views/eam/base/EamMaintenanceStandardList.vue
index 6139afc..ffc3205 100644
--- a/src/views/eam/base/EamMaintenanceStandardList.vue
+++ b/src/views/eam/base/EamMaintenanceStandardList.vue
@@ -129,8 +129,7 @@
           </a-popconfirm>
           </template>
 
-          <template
-            v-if="record.standardStatus !== 'WAIT_SUBMIT'&&record.standardStatus!=='ABOLISH'&&record.standardStatus!=='START'">
+          <template>
             <a-divider type="vertical"/>
 
             <a @click.stop="handleDetail(record)">璇︽儏</a>
@@ -407,6 +406,7 @@
         this.$refs.fileImportModule.title="鍗囩増瀵煎叆"
       },
 
+
       getTreeDataByApi(){
         this.loadData();
       },
diff --git a/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue b/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue
index 751f2e2..26f12da 100644
--- a/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue
+++ b/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue
@@ -321,8 +321,8 @@
                     message: '娑堟伅',
                     description: res.message
                   })
-                  that.$emit('ok')
-                  that.close()
+                  this.$emit('ok', true)
+                  that.close(true)
                 } else {
                   that.$notification.warning({
                     message: '娑堟伅',
@@ -412,14 +412,22 @@
         }
       },
 
-      close() {
-        this.$emit('close')
+      /**
+       * 鐐规/浜屼繚鏁呴殰鎶ヤ慨濉姤
+       * @param record
+       */
+      handleRepair(record) {
+        this.edit(record)
+      },
+
+      close(success = false) {
+        this.$emit('close', success)
         this.visible = false
         if (this.$refs.form) this.$refs.form.clearValidate()
       },
       handleCancel() {
-        this.close()
-      }
+        this.close(false)  // 浼犻�掑彇娑堢姸鎬�
+      },
     }
   }
 </script>
diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
index 04647d7..b699384 100644
--- a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
+++ b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
@@ -78,9 +78,9 @@
           <a-col :span="!isDisplayConfirm?16:10" class="scroll-col">
             <a-tabs :active-key="activeTabKey" @change="handleTabChange">
               <a-tab-pane key="1" tab="鏃ョ偣妫�">
-                <j-vxe-table ref="editableDetailTable1" :rowNumber="false" rowSelection bordered
+                <j-vxe-table ref="editableDetailTable1" :columns="getColumns()" :rowNumber="false" rowSelection bordered
                              alwaysEdit :toolbar="false" keep-source :height="500"
-                             :dataSource="detail.dayInspectionList" :columns="detail.columns"
+                             :dataSource="detail.dayInspectionList"
                              @selectRowChange="handleTableSelectRowChange($event,'Day')">
                   <template v-slot:inspectionResult="props">
                     <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="inspection_project_result"
@@ -97,17 +97,25 @@
 
                   <template v-slot:reportFlag="props">
                     <j-dict-select-tag v-model="props.row.reportFlag"
-                                       :placeholder="props.row.inspectionResult&&props.row.inspectionResult!='NORMAL'?'璇烽�夋嫨寮傚父鏄惁鎶ヤ慨':''"
-                                       :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult=='NORMAL'"
+                                       :disabled="true"
                                        dictCode="yn" style="width: 100%"/>
                   </template>
+
+                  <!-- 鎿嶄綔 -->
+                  <template v-slot:action="props">
+                    <a :class="{ 'disabled-link': shouldDisableRepairButton(props.row) }"
+                       @click="!shouldDisableRepairButton(props.row) && handleRepairReporting(props.row)">
+                      鎶ヤ慨濉姤
+                    </a>
+                  </template>
+
                 </j-vxe-table>
               </a-tab-pane>
 
               <a-tab-pane key="2" tab="鍛ㄧ偣妫�" forceRender>
                 <j-vxe-table ref="editableDetailTable2" :rowNumber="false" rowSelection bordered
                              alwaysEdit :toolbar="false" keep-source :height="500"
-                             :dataSource="detail.weekInspectionList" :columns="detail.columns"
+                             :dataSource="detail.weekInspectionList"  :columns="getColumns()"
                              @selectRowChange="handleTableSelectRowChange($event,'Week')">
                   <template v-slot:inspectionResult="props">
                     <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="inspection_project_result"
@@ -125,10 +133,19 @@
 
                   <template v-slot:reportFlag="props">
                     <j-dict-select-tag v-model="props.row.reportFlag"
-                                       :placeholder="props.row.inspectionResult&&props.row.inspectionResult!='NORMAL'?'璇烽�夋嫨寮傚父鏄惁鎶ヤ慨':''"
-                                       :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult=='NORMAL'"
+                                       :disabled="true"
                                        dictCode="yn" style="width: 100%"/>
                   </template>
+
+
+                  <!-- 鎿嶄綔 -->
+                  <template v-slot:action="props">
+                    <a :class="{ 'disabled-link': shouldDisableRepairButton(props.row) }"
+                       @click="!shouldDisableRepairButton(props.row) && handleRepairReporting(props.row)">
+                      鎶ヤ慨濉姤
+                    </a>
+                  </template>
+
                 </j-vxe-table>
               </a-tab-pane>
 
@@ -137,6 +154,23 @@
                   <img :src="imageSrc" v-if="imageSrc"/>
                 </a-tab-pane>
               </template>
+
+              <a-tab-pane key='4' tab='娴佽浆鑺傜偣'>
+                <a-card>
+                  <a-timeline style="padding:0 1% 0 12%" >
+                    <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1">
+                      <div class="bottom">
+                        <p>澶勭悊浜猴細{{item.assignee_dictText}}</p>
+                        <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p>
+                        <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p>
+                        <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p>
+                        <div class="left_qiu"><span>{{item.taskName}}</span></div>
+                      </div>
+                    </a-timeline-item>
+                  </a-timeline>
+                </a-card>
+              </a-tab-pane>
+
 
               <a-button
                 v-if="activeTabKey=='1'||activeTabKey=='2'"
@@ -172,6 +206,7 @@
           </a-col>
         </a-row>
       </a-form-model>
+      <eamReportRepair-modal ref="modalForm"  @ok="handleRepairComplete" @close="handleRepairClose"/>
     </a-spin>
   </j-modal>
 </template>
@@ -181,10 +216,11 @@
   import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue'
   import { JVXETypes } from '@comp/jeecg/JVxeTable'
   import moment from 'moment'
+  import EamReportRepairModal from "@views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue";
 
   export default {
     name: 'InspectionOrderHandle',
-    components: { MaintenanceEquipmentSelect },
+    components: {EamReportRepairModal, MaintenanceEquipmentSelect },
     props: {
       selectShenpiData: {
         type: Object
@@ -196,6 +232,7 @@
         confirmLoading: false,
         spinning: false,
         model: {},
+        currentRepairRow: null,
         validatorRules: {
           confirmDealType: [
             { required: true, message: '璇烽�夋嫨澶勭悊绫诲瀷' }
@@ -273,6 +310,13 @@
               validateRules: [
                 { handler: this.customValidator }
               ]
+            },
+            {
+              title: '鎿嶄綔',
+              align: 'center',
+              type: JVXETypes.slot,
+              slotName: 'action',
+              fixed: 'right'
             }
           ],
           dayInspectionList: [],
@@ -281,9 +325,10 @@
         },
         selectedDayInspectionRowKeys: [],
         selectedWeekInspectionRowKeys: [],
+        hitaskDataSource:[],
         disableSubmit: false,
         activeTabKey: '1',
-        title: ''
+        title: '',
       }
     },
     computed: {
@@ -292,15 +337,92 @@
       },
       isDisableOperation() {
         return this.disableSubmit || this.model.inspectionStatus !== 'UNDER_INSPECTION'
+      },
+      // 娣诲姞鎿嶄綔鍒楁樉绀烘潯浠�
+      shouldShowActionColumn() {
+        return this.model.inspectionStatus === 'UNDER_INSPECTION';
       }
     },
     methods: {
+      // 娣诲姞鑾峰彇鍒楃殑鏂规硶
+      getColumns() {
+        const columns = [
+          // 鍩虹鍒楀畾涔夛紙搴忓彿銆佷繚鍏婚」绛夛級
+          {
+            title: '搴忓彿',
+            key: 'itemCode',
+            type: JVXETypes.normal,
+            width: 60,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            title: '淇濆吇椤�',
+            key: 'itemName',
+            type: JVXETypes.normal,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            title: '淇濆吇瑕佹眰',
+            key: 'itemDemand',
+            type: JVXETypes.normal,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            title: '鐐规缁撴灉',
+            key: 'inspectionResult',
+            type: JVXETypes.slot,
+            slotName: 'inspectionResult',
+            align: 'center',
+            validateRules: [
+              { required: true, message: '${title}涓嶈兘涓虹┖' }
+            ]
+          },
+          {
+            title: '寮傚父鎻忚堪',
+            key: 'exceptionDescription',
+            type: JVXETypes.slot,
+            slotName: 'exceptionDescription',
+            align: 'center',
+            validateRules: [
+              { handler: this.customValidator }
+            ]
+          },
+          {
+            title: '寮傚父鏄惁鎶ヤ慨',
+            key: 'reportFlag',
+            type: JVXETypes.slot,
+            slotName: 'reportFlag',
+            align: 'center',
+            validateRules: [
+              { handler: this.customValidator }
+            ]
+          }
+        ];
+
+        // 浠呭湪鐐规涓姸鎬佷笅娣诲姞鎿嶄綔鍒�
+        if (this.shouldShowActionColumn) {
+          columns.push({
+            title: '鎿嶄綔',
+            align: 'center',
+            type: JVXETypes.slot,
+            width: 150,
+            slotName: 'action',
+            fixed: 'right'
+          });
+        }
+        return columns;
+      },
+
       handleApprove(record) {
         this.spinning = true
         this.activeTabKey = '1'
         this.detail.dayInspectionList = this.detail.weekInspectionList = []
         this.getBasicInformationByApi(record)
         this.getFlowChartImageByApi(record)
+        this.getFlowTaskListByApi(record)
       },
 
       handleDetail(record) {
@@ -310,6 +432,7 @@
         this.model = Object.assign({}, record)
         this.getDayInspectionOrderListByApi(record.id)
         this.getWeekInspectionOrderListByApi(record.standardId)
+        this.getFlowTaskListByApi(record)
       },
 
       /**
@@ -520,6 +643,55 @@
         }
       },
 
+      /**
+       * 鑾峰彇娴佽浆鑺傜偣
+       * @param record
+       */
+      getFlowTaskListByApi(record) {
+        let parmhis={
+          'procInstId': record.procInstId
+        }
+        getAction(this.url.queryHisTaskList,parmhis).then(res=>{
+          this.hitaskDataSource=res.result
+        }).finally(
+          this.visible = true,
+          console.log('this.approveData---->', this.approveData)
+        )
+      },
+
+      // 娣诲姞绂佺敤鏉′欢鍒ゆ柇鏂规硶
+      shouldDisableRepairButton(row) {
+        return this.model.inspectionStatus !== 'UNDER_INSPECTION' ||
+          row.inspectionResult !== 'ANOMALY';
+      },
+
+      /**
+       * 寮傚父鎻忚堪濉姤鏁呴殰鎶ヤ慨
+       * @param exceptionDescription
+       */
+      handleRepairReporting(row) {
+        this.currentRepairRow = row; // 瀛樺偍褰撳墠鎿嶄綔琛�
+        let record = {
+          faultDescription: row.exceptionDescription,
+          equipmentId: this.model.equipmentId
+        }
+        this.$refs.modalForm.handleRepair(record)
+      },
+
+      handleRepairClose(success) {
+        if (!success && this.currentRepairRow) {
+          this.currentRepairRow = null; // 娓呴櫎鏈垚鍔熺殑鎿嶄綔
+        }
+      },
+
+      handleRepairComplete(success) {
+        if (success && this.currentRepairRow) {
+          this.$set(this.currentRepairRow, 'reportFlag', '1');
+          this.$message.success("鎶ヤ慨宸叉垚鍔熸彁浜�");
+        }
+        this.currentRepairRow = null;
+      },
+
       handleCancel() {
         this.selectedDayInspectionRowKeys = this.selectedWeekInspectionRowKeys = []
         this.visible = false
@@ -552,4 +724,122 @@
       }
     }
   }
+  /* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+  html.submitting,
+  html.submitting body {
+    pointer-events: none !important;
+    cursor: wait !important;
+  }
+
+  /* 钂欏眰鏁堟灉澧炲己 */
+  html.submitting::before {
+    content: '';
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    background: rgba(255, 255, 255, 0.5);
+    z-index: 9998;
+  }
+
+  /* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+  html.submitting::after {
+    content: '鎻愪氦涓�...';
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    background: #1890ff;
+    color: white;
+    padding: 10px 20px;
+    border-radius: 4px;
+    z-index: 9999;
+  }
+
+  /* 绂佺敤鐘舵�佹寜閽牱寮� */
+  .disabled-btn {
+    opacity: 0.6;
+    cursor: not-allowed !important;
+  }
+
+  .shallow-hr {
+    border: 0;
+    height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
+    background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */
+    margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */
+  }
+  .btn-custom {
+    background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */
+    color: white; /* 鐧借壊鏂囧瓧 */
+    border: none; /* 鏃犺竟妗� */
+    padding: 5px 15px; /* 鍐呰竟璺� */
+    text-align: center; /* 鏂囧瓧灞呬腑 */
+    text-decoration: none; /* 鏃犱笅鍒掔嚎 */
+    display: inline-block; /* 琛屽唴鍧楀厓绱� */
+    font-size: 12px; /* 瀛椾綋澶у皬 */
+    margin: 4px 2px; /* 澶栬竟璺� */
+    cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */
+    border-radius: 4px; /* 鍦嗚杈规 */
+  }
+
+  .bold-large-label {
+    font-weight: bold;
+    font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */
+  }
+  .left_qiu{
+    position: absolute;
+    left: -74px;
+    top: 0;
+    width:54px;
+    border-radius: 50%;
+    height:54px;
+    font-size: 13px;
+    margin: auto;
+    display: flex;
+    flex-wrap: wrap;
+    align-items: center;
+    justify-content: center;
+    background: #0099ff;
+    transform: translate(0, 0);
+  }
+  /deep/ .ant-timeline-item-tail{
+    left: -29px !important;
+  }
+  .left_qiu span{
+    width: 3em;
+    display: block;
+    color: #fff;
+    text-align: center;
+  }
+  .img{
+    width: 75%;
+  }
+
+  .wrap{
+    clear: both;
+    width: 100%;
+    display: flex;
+    height: 50px;
+    border: 1px solid #ccc;
+    /* background-color: aqua; */
+  }
+  .box{
+    width:21%;
+    height:50px;
+    border-right: 1px solid #ccc;
+    line-height: 50px;
+    /* background: red; */
+    text-align:center;
+    margin: auto;
+  }
+
+
+  /* 娣诲姞绂佺敤鏍峰紡 */
+  .disabled-link {
+    color: #999;
+    cursor: not-allowed;
+    pointer-events: none;
+    text-decoration: none;
+  }
 </style>
\ No newline at end of file
diff --git a/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue b/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue
index 988848e..910bb94 100644
--- a/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue
+++ b/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue
@@ -177,6 +177,7 @@
         confirmLoading: false,
         spinning: false,
         model: {},
+        hitaskDataSource:[],
         validatorRules: {
           repairManagerApproveResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }],
           technicalManagerApproveResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }]
@@ -202,7 +203,6 @@
         detail: {
           dataSource: [],
           columns: [],
-          hitaskDataSource:[],
           inspectionColumns: [
             {
               title: 'ID',
@@ -332,11 +332,11 @@
     },
     computed: {
       displayRepairLeaderFlag() {
-        return this.model.standardStatus && ['WAIT_REPAIR_DIRECTOR', 'WAIT_TECHNICAL_DIRECTOR', 'REJECTED'].includes(this.model.standardStatus)
+        return this.model.standardStatus && ['WAIT_REPAIR_DIRECTOR', 'WAIT_TECHNICAL_DIRECTOR','START', 'REJECTED'].includes(this.model.standardStatus)
       },
 
       displayTechnicalDirectorFlag() {
-        return this.model.standardStatus && ['WAIT_TECHNICAL_DIRECTOR', 'REJECTED'].includes(this.model.standardStatus) && this.model.repairManagerApproveResult === '1'
+        return this.model.standardStatus && ['WAIT_TECHNICAL_DIRECTOR','START', 'REJECTED'].includes(this.model.standardStatus) && this.model.repairManagerApproveResult === '1'
       },
 
       encodedDictCode() {
@@ -379,6 +379,7 @@
       handleDetail(record) {
         this.detail.dataSource = []
         this.model = Object.assign({}, record)
+        this.getFlowTaskListByApi(record)
         this.loadDetail(record.id)
       },
 
diff --git a/src/views/flowable/workflow/repairOrder/ReportAccidentsRegisterApprovalModal.vue b/src/views/flowable/workflow/repairOrder/ReportAccidentsRegisterApprovalModal.vue
index e87a922..134046d 100644
--- a/src/views/flowable/workflow/repairOrder/ReportAccidentsRegisterApprovalModal.vue
+++ b/src/views/flowable/workflow/repairOrder/ReportAccidentsRegisterApprovalModal.vue
@@ -107,6 +107,22 @@
               <a-tab-pane key='1' tab='娴佺▼鍥�'>
                 <img :src="imageSrc" v-if="imageSrc" style="width: 100%"/>
               </a-tab-pane>
+
+              <a-tab-pane key='2' tab='娴佽浆鑺傜偣'>
+                <a-card>
+                  <a-timeline style="padding:0 1% 0 12%" >
+                    <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1">
+                      <div class="bottom">
+                        <p>澶勭悊浜猴細{{item.assignee_dictText}}</p>
+                        <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p>
+                        <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p>
+                        <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p>
+                        <div class="left_qiu"><span>{{item.taskName}}</span></div>
+                      </div>
+                    </a-timeline-item>
+                  </a-timeline>
+                </a-card>
+              </a-tab-pane>
             </a-tabs>
           </a-col>
 
@@ -436,9 +452,11 @@
         url: {
           queryById: '/eam/eamReportAccidentsRegister/queryById',
           approval: '/eam/eamReportAccidentsRegister/perform',
-          diagramView: '/assign/flow/diagramView'
+          diagramView: '/assign/flow/diagramView',
+          queryHisTaskList:'/assign/flow/queryHisTaskList',
         },
-        disableSubmit: false
+        disableSubmit: false,
+        hitaskDataSource:[],
       }
     },
     computed: {
@@ -476,6 +494,7 @@
         this.model = {}
         this.getBasicInformationByApi(record)
         this.getFlowChartImageByApi(record)
+        this.getFlowTaskListByApi(record)
       },
 
       /**
@@ -484,6 +503,7 @@
        */
       handleDetail(record) {
         this.model = Object.assign({}, record)
+        this.getFlowTaskListByApi(record)
       },
 
       /**
@@ -512,6 +532,22 @@
           .finally(() => {
             that.spinning = false
           })
+      },
+
+      /**
+       * 鑾峰彇娴佽浆鑺傜偣
+       * @param record
+       */
+      getFlowTaskListByApi(record) {
+        let parmhis={
+          'procInstId': record.procInstId
+        }
+        getAction(this.url.queryHisTaskList,parmhis).then(res=>{
+          this.hitaskDataSource=res.result
+        }).finally(
+          this.visible = true,
+          console.log('this.approveData---->', this.approveData)
+        )
       },
 
       /**
@@ -612,4 +648,114 @@
       }
     }
   }
+
+  /* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+  html.submitting,
+  html.submitting body {
+    pointer-events: none !important;
+    cursor: wait !important;
+  }
+
+  /* 钂欏眰鏁堟灉澧炲己 */
+  html.submitting::before {
+    content: '';
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    background: rgba(255, 255, 255, 0.5);
+    z-index: 9998;
+  }
+
+  /* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+  html.submitting::after {
+    content: '鎻愪氦涓�...';
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    background: #1890ff;
+    color: white;
+    padding: 10px 20px;
+    border-radius: 4px;
+    z-index: 9999;
+  }
+
+  /* 绂佺敤鐘舵�佹寜閽牱寮� */
+  .disabled-btn {
+    opacity: 0.6;
+    cursor: not-allowed !important;
+  }
+
+  .shallow-hr {
+    border: 0;
+    height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
+    background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */
+    margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */
+  }
+  .btn-custom {
+    background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */
+    color: white; /* 鐧借壊鏂囧瓧 */
+    border: none; /* 鏃犺竟妗� */
+    padding: 5px 15px; /* 鍐呰竟璺� */
+    text-align: center; /* 鏂囧瓧灞呬腑 */
+    text-decoration: none; /* 鏃犱笅鍒掔嚎 */
+    display: inline-block; /* 琛屽唴鍧楀厓绱� */
+    font-size: 12px; /* 瀛椾綋澶у皬 */
+    margin: 4px 2px; /* 澶栬竟璺� */
+    cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */
+    border-radius: 4px; /* 鍦嗚杈规 */
+  }
+
+  .bold-large-label {
+    font-weight: bold;
+    font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */
+  }
+  .left_qiu{
+    position: absolute;
+    left: -74px;
+    top: 0;
+    width:54px;
+    border-radius: 50%;
+    height:54px;
+    font-size: 13px;
+    margin: auto;
+    display: flex;
+    flex-wrap: wrap;
+    align-items: center;
+    justify-content: center;
+    background: #0099ff;
+    transform: translate(0, 0);
+  }
+  /deep/ .ant-timeline-item-tail{
+    left: -29px !important;
+  }
+  .left_qiu span{
+    width: 3em;
+    display: block;
+    color: #fff;
+    text-align: center;
+  }
+  .img{
+    width: 75%;
+  }
+
+  .wrap{
+    clear: both;
+    width: 100%;
+    display: flex;
+    height: 50px;
+    border: 1px solid #ccc;
+    /* background-color: aqua; */
+  }
+  .box{
+    width:21%;
+    height:50px;
+    border-right: 1px solid #ccc;
+    line-height: 50px;
+    /* background: red; */
+    text-align:center;
+    margin: auto;
+  }
 </style>
\ No newline at end of file
diff --git a/src/views/flowable/workflow/repairOrder/ReportProductHazardsApprovalModal.vue b/src/views/flowable/workflow/repairOrder/ReportProductHazardsApprovalModal.vue
index 3a3a2e3..daeb8f2 100644
--- a/src/views/flowable/workflow/repairOrder/ReportProductHazardsApprovalModal.vue
+++ b/src/views/flowable/workflow/repairOrder/ReportProductHazardsApprovalModal.vue
@@ -60,6 +60,23 @@
               <a-tab-pane key='1' tab='娴佺▼鍥�'>
                 <img :src="imageSrc" v-if="imageSrc" style="width: 100%"/>
               </a-tab-pane>
+
+              <a-tab-pane key='2' tab='娴佽浆鑺傜偣'>
+                <a-card>
+                  <a-timeline style="padding:0 1% 0 12%" >
+                    <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1">
+                      <div class="bottom">
+                        <p>澶勭悊浜猴細{{item.assignee_dictText}}</p>
+                        <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p>
+                        <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p>
+                        <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p>
+                        <div class="left_qiu"><span>{{item.taskName}}</span></div>
+                      </div>
+                    </a-timeline-item>
+                  </a-timeline>
+                </a-card>
+              </a-tab-pane>
+
             </a-tabs>
           </a-col>
 
@@ -171,9 +188,11 @@
         url: {
           queryById: '/eam/eamReportProductHazards/queryById',
           approval: '/eam/eamReportProductHazards/perform',
-          diagramView: '/assign/flow/diagramView'
+          diagramView: '/assign/flow/diagramView',
+          queryHisTaskList:'/assign/flow/queryHisTaskList',
         },
-        disableSubmit: false
+        disableSubmit: false,
+        hitaskDataSource:[],
       }
     },
     computed: {
@@ -193,6 +212,7 @@
         this.model = {}
         this.getBasicInformationByApi(record)
         this.getFlowChartImageByApi(record)
+        this.getFlowTaskListByApi(record)
       },
 
       /**
@@ -201,6 +221,7 @@
        */
       handleDetail(record) {
         this.model = Object.assign({}, record)
+        this.getFlowTaskListByApi(record)
       },
 
       /**
@@ -229,6 +250,22 @@
           .finally(() => {
             that.spinning = false
           })
+      },
+
+      /**
+       * 鑾峰彇娴佽浆鑺傜偣
+       * @param record
+       */
+      getFlowTaskListByApi(record) {
+        let parmhis={
+          'procInstId': record.procInstId
+        }
+        getAction(this.url.queryHisTaskList,parmhis).then(res=>{
+          this.hitaskDataSource=res.result
+        }).finally(
+          this.visible = true,
+          console.log('this.approveData---->', this.approveData)
+        )
       },
 
       /**
@@ -329,4 +366,114 @@
       }
     }
   }
+
+  /* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+  html.submitting,
+  html.submitting body {
+    pointer-events: none !important;
+    cursor: wait !important;
+  }
+
+  /* 钂欏眰鏁堟灉澧炲己 */
+  html.submitting::before {
+    content: '';
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    background: rgba(255, 255, 255, 0.5);
+    z-index: 9998;
+  }
+
+  /* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+  html.submitting::after {
+    content: '鎻愪氦涓�...';
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    background: #1890ff;
+    color: white;
+    padding: 10px 20px;
+    border-radius: 4px;
+    z-index: 9999;
+  }
+
+  /* 绂佺敤鐘舵�佹寜閽牱寮� */
+  .disabled-btn {
+    opacity: 0.6;
+    cursor: not-allowed !important;
+  }
+
+  .shallow-hr {
+    border: 0;
+    height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
+    background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */
+    margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */
+  }
+  .btn-custom {
+    background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */
+    color: white; /* 鐧借壊鏂囧瓧 */
+    border: none; /* 鏃犺竟妗� */
+    padding: 5px 15px; /* 鍐呰竟璺� */
+    text-align: center; /* 鏂囧瓧灞呬腑 */
+    text-decoration: none; /* 鏃犱笅鍒掔嚎 */
+    display: inline-block; /* 琛屽唴鍧楀厓绱� */
+    font-size: 12px; /* 瀛椾綋澶у皬 */
+    margin: 4px 2px; /* 澶栬竟璺� */
+    cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */
+    border-radius: 4px; /* 鍦嗚杈规 */
+  }
+
+  .bold-large-label {
+    font-weight: bold;
+    font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */
+  }
+  .left_qiu{
+    position: absolute;
+    left: -74px;
+    top: 0;
+    width:54px;
+    border-radius: 50%;
+    height:54px;
+    font-size: 13px;
+    margin: auto;
+    display: flex;
+    flex-wrap: wrap;
+    align-items: center;
+    justify-content: center;
+    background: #0099ff;
+    transform: translate(0, 0);
+  }
+  /deep/ .ant-timeline-item-tail{
+    left: -29px !important;
+  }
+  .left_qiu span{
+    width: 3em;
+    display: block;
+    color: #fff;
+    text-align: center;
+  }
+  .img{
+    width: 75%;
+  }
+
+  .wrap{
+    clear: both;
+    width: 100%;
+    display: flex;
+    height: 50px;
+    border: 1px solid #ccc;
+    /* background-color: aqua; */
+  }
+  .box{
+    width:21%;
+    height:50px;
+    border-right: 1px solid #ccc;
+    line-height: 50px;
+    /* background: red; */
+    text-align:center;
+    margin: auto;
+  }
 </style>
\ No newline at end of file
diff --git a/src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue b/src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue
index 1eadc4c..73f1c4f 100644
--- a/src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue
+++ b/src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue
@@ -73,7 +73,7 @@
                           (model.maintenanceStatus&&model.maintenanceStatus!=='UNDER_MAINTENANCE')">
                 <j-vxe-table ref="editableDetailTable1" :rowNumber="false" rowSelection bordered
                              alwaysEdit keep-source
-                             :dataSource="detail.operatorMaintenanceList" :columns="detail.columns"
+                             :dataSource="detail.operatorMaintenanceList" :columns="getColumns()"
                              @selectRowChange="handleTableSelectRowChange($event,'Operator')">
                   <template v-slot:maintenanceResult="props">
                     <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="maintenance_result"
@@ -95,11 +95,19 @@
                   <template v-slot:reportFlag="props">
                     <j-dict-select-tag v-model="props.row.reportFlag" dictCode="yn" style="width: 100%"
                                        :placeholder="props.row.maintenanceResult&&props.row.maintenanceResult!=='1'?'璇烽�夋嫨寮傚父鏄惁鎶ヤ慨':''"
-                                       :disabled="disableSubmit ||
-                                       (model.maintenanceStatus&&model.maintenanceStatus!=='UNDER_MAINTENANCE') ||
-                                        !props.row.maintenanceResult ||
-                                         props.row.maintenanceResult === '1'"/>
+                                       :disabled="true"/>
                   </template>
+
+                  <!-- 鎿嶄綔 -->
+                  <template v-slot:action="props">
+                    <a
+                      v-if="shouldShowActionColumn"
+                      :class="{ 'disabled-link': shouldDisableRepairButton(props.row) }"
+                      @click="!shouldDisableRepairButton(props.row) && handleRepairReporting(props.row)">
+                      鎶ヤ慨濉姤
+                    </a>
+                  </template>
+
                 </j-vxe-table>
               </a-tab-pane>
 
@@ -108,7 +116,7 @@
                           (model.maintenanceStatus&&model.maintenanceStatus!=='UNDER_MAINTENANCE')">
                 <j-vxe-table ref="editableDetailTable2" :rowNumber="false" rowSelection bordered
                              alwaysEdit kee-source
-                             :dataSource="detail.repairerMaintenanceList" :columns="detail.columns"
+                             :dataSource="detail.repairerMaintenanceList" :columns="getColumns()"
                              @selectRowChange="handleTableSelectRowChange($event,'Repairer')">
                   <template v-slot:maintenanceResult="props">
                     <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="maintenance_result"
@@ -131,11 +139,17 @@
                     <j-dict-select-tag v-model="props.row.reportFlag"
                                        :placeholder="props.row.maintenanceResult&&props.row.maintenanceResult!=='1'?'璇烽�夋嫨寮傚父鏄惁鎶ヤ慨':''"
                                        dictCode="yn" style="width: 100%"
-                                       :disabled="disableSubmit||
-                                       (model.maintenanceStatus&&model.maintenanceStatus!=='UNDER_MAINTENANCE') ||
-                                       !props.row.maintenanceResult ||
-                                        props.row.maintenanceResult === '1'"/>
+                                       :disabled="true"/>
                   </template>
+
+                  <!-- 鎿嶄綔 -->
+                  <template v-slot:action="props">
+                    <a :class="{ 'disabled-link': shouldDisableRepairButton(props.row) }"
+                       @click="!shouldDisableRepairButton(props.row) && handleRepairReporting(props.row)">
+                      鎶ヤ慨濉姤
+                    </a>
+                  </template>
+
                 </j-vxe-table>
               </a-tab-pane>
 
@@ -224,6 +238,9 @@
           </a-col>
         </a-row>
       </a-form-model>
+
+      <eamReportRepair-modal ref="modalForm"  @ok="handleRepairComplete" @close="handleRepairClose"/>
+
     </a-spin>
   </j-modal>
 </template>
@@ -233,11 +250,13 @@
   import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
   import { JVXETypes } from '@comp/jeecg/JVxeTable'
   import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect'
+  import EamReportRepairModal from "@views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue";
 
   export default {
     name: 'SecondMaintenanceApprovalModal',
     mixins: [JVxeTableModelMixin],
     components: {
+      EamReportRepairModal,
       MaintenanceEquipmentSelect
     },
     props: {
@@ -250,6 +269,7 @@
         title: '鎿嶄綔',
         visible: false,
         model: {},
+        currentRepairRow: null,
         labelCol: {
           xs: { span: 24 },
           sm: { span: 6 }
@@ -341,6 +361,14 @@
               validateRules: [
                 { handler: this.customValidator }
               ]
+            },
+            {
+              title: '鎿嶄綔',
+              align: 'center',
+              type: JVXETypes.slot,
+              width: 150,
+              slotName: 'action',
+              fixed: 'right'
             }
           ]
         }
@@ -352,9 +380,87 @@
       },
       displayInspectorConfirmFlag() {
         return ['WAIT_INSPECTOR_CONFIRM', 'COMPLETE', 'REJECTED'].includes(this.model.maintenanceStatus) && this.model.manageUserResult === '1'
+      },
+      // 鎿嶄綔鍒椾粎鍦ㄤ繚鍏讳腑鐘舵�佷笅鏄剧ず
+      shouldShowActionColumn() {
+        return this.model.maintenanceStatus === 'UNDER_MAINTENANCE';
       }
     },
     methods: {
+
+      // 娣诲姞鑾峰彇鍒楃殑鏂规硶
+      getColumns() {
+        const columns = [
+          {
+            title: 'ID',
+            key: 'id',
+            type: JVXETypes.hidden
+          },
+          {
+            title: 'orderId',
+            key: 'orderId',
+            type: JVXETypes.hidden
+          },
+          {
+            title: '搴忓彿',
+            key: 'itemCode',
+            type: JVXETypes.normal,
+            width: 60,
+            align: 'center'
+          },
+          {
+            title: '淇濆吇椤�',
+            key: 'itemName',
+            type: JVXETypes.normal,
+            align: 'center'
+          },
+          {
+            title: '淇濆吇缁撴灉',
+            key: 'maintenanceResult',
+            type: JVXETypes.slot,
+            align: 'center',
+            slotName: 'maintenanceResult',
+            validateRules: [
+              { required: true, message: '璇烽�夋嫨${title}' }
+            ]
+          },
+          {
+            title: '寮傚父鎻忚堪',
+            key: 'exceptionDescription',
+            type: JVXETypes.slot,
+            align: 'center',
+            slotName: 'exceptionDescription',
+            validateRules: [
+              { handler: this.customValidator }
+            ]
+          },
+          {
+            title: '鏄惁鎶ヤ慨',
+            key: 'reportFlag',
+            type: JVXETypes.slot,
+            align: 'center',
+            slotName: 'reportFlag',
+            validateRules: [
+              { handler: this.customValidator }
+            ]
+          }
+        ];
+
+        // 浠呭湪淇濆吇涓姸鎬佷笅娣诲姞鎿嶄綔鍒�
+        if (this.shouldShowActionColumn) {
+          columns.push({
+            title: '鎿嶄綔',
+            align: 'center',
+            type: JVXETypes.slot,
+            width: 150,
+            slotName: 'action',
+            fixed: 'right'
+          });
+        }
+
+        return columns;
+      },
+
       /**
        * 涓婚〉闈㈢偣鍑绘墽琛屽鎵规椂瑙﹀彂
        * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍
@@ -412,7 +518,6 @@
        * @param record
        */
       getFlowTaskListByApi(record) {
-        console.log("sss",record)
         let parmhis={
           'procInstId': record.procInstId
         }
@@ -610,6 +715,42 @@
         }
       },
 
+      shouldDisableRepairButton(row) {
+        return (
+          this.model.maintenanceStatus !== 'UNDER_MAINTENANCE' ||
+          row.maintenanceResult === '1' ||
+          row.reportFlag === '1'
+        );
+      },
+
+      handleRepairComplete(success) {
+        if (success && this.currentRepairRow) {
+          this.$set(this.currentRepairRow, 'reportFlag', '1');
+          this.$message.success("鎶ヤ慨宸叉垚鍔熸彁浜�");
+        }
+        this.currentRepairRow = null;
+      },
+
+      /**
+       * 寮傚父鎻忚堪濉姤鏁呴殰鎶ヤ慨
+       * @param exceptionDescription
+       */
+      handleRepairReporting(row) {
+        this.currentRepairRow = row; // 瀛樺偍褰撳墠鎿嶄綔琛�
+        let record = {
+          faultDescription: row.exceptionDescription,
+          equipmentId: this.model.equipmentId
+        }
+        this.$refs.modalForm.handleRepair(record)
+      },
+
+      handleRepairClose(success) {
+        if (!success && this.currentRepairRow) {
+          this.currentRepairRow = null; // 娓呴櫎鏈垚鍔熺殑鎿嶄綔
+        }
+      },
+
+
       handleCancel() {
         this.close()
       },
@@ -758,4 +899,12 @@
     margin: auto;
   }
 
+  /* 娣诲姞绂佺敤鏍峰紡 */
+  .disabled-link {
+    color: #999;
+    cursor: not-allowed;
+    pointer-events: none;
+    text-decoration: none;
+  }
+
 </style>
\ No newline at end of file

--
Gitblit v1.9.3