From 1cb38dbdb58bc3966453ca43585140323e50d1b8 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期三, 20 八月 2025 09:15:51 +0800
Subject: [PATCH] 1、二、三保工单增加批量打印及导出完工单和验收单功能 2、二保工单审批流程图展示增加滚动条 3、html导出成excel工具方法增加单元格换行展示以及自适应换行高度功能

---
 /dev/null                                                                        |   61 ----
 src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue |   71 ++--
 src/views/eam/maintenance/modules/EamThirdMaintenanceOrderBatchPrintModal.vue    |  353 +++++++++++++++++++++++++
 src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue                       |   34 ++
 src/views/eam/maintenance/modules/EamSecondMaintenanceOrderBatchPrintModal.vue   |  213 +++++++++++++++
 src/components/table2excel/table2excel.js                                        |    1 
 src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue                      |   74 +++-
 7 files changed, 694 insertions(+), 113 deletions(-)

diff --git a/src/components/table2excel/table2excel.js b/src/components/table2excel/table2excel.js
index 9fdec8d..c63095b 100644
--- a/src/components/table2excel/table2excel.js
+++ b/src/components/table2excel/table2excel.js
@@ -82,6 +82,7 @@
               compStyle = getComputedStyle(q);
               additionalStyles += (compStyle && compStyle.backgroundColor ? "background-color: " + compStyle.backgroundColor + ";" : "");
               additionalStyles += (compStyle && compStyle.color ? "color: " + compStyle.color + ";" : "");
+              additionalStyles += (compStyle && compStyle.wordWrap ? "word-wrap: " + compStyle.wordWrap + ";" : "");
             }
 
             var rc = {
diff --git a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue
index 6e9e4ce..e5a267a 100644
--- a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue
+++ b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue
@@ -41,25 +41,45 @@
       <a-button v-has="'secondMaintenanceOrder:add'" @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
       <a-button v-has="'secondMaintenanceOrder:batchAdd'" @click="handleBatchAdd" type="primary" icon="plus">鎵归噺鏂板
       </a-button>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item v-has="'secondMaintenanceOrder:batchAbolish'" key="1" @click="handlerBatchAbolish">
-            <a-icon type="delete"/>
-            浣滃簾
-          </a-menu-item>
-          <a-menu-item v-has="'secondMaintenanceOrder:batchCollect'" key="2" @click="handlerBatchCollect">
-            <a-icon type="form"/>
-            棰嗗彇
-          </a-menu-item>
-          <a-menu-item v-has="'secondMaintenanceOrder:batchRestore'" key="3" @click="handlerBatchRestore">
-            <a-icon type="reload"/>
-            杩樺師
-          </a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔
-          <a-icon type="down"/>
-        </a-button>
-      </a-dropdown>
+      <a-button v-has="'secondMaintenanceOrder:batchAbolish'" @click="handlerBatchAbolish" type="primary"
+                icon="delete" :disabled="selectedRowKeys.length===0">
+        鎵归噺浣滃簾
+      </a-button>
+      <a-button v-has="'secondMaintenanceOrder:batchCollect'" @click="handlerBatchCollect" type="primary" icon="form"
+                :disabled="selectedRowKeys.length===0">
+        鎵归噺棰嗗彇
+      </a-button>
+      <a-button v-has="'secondMaintenanceOrder:batchRestore'" @click="handlerBatchRestore" type="primary"
+                :disabled="selectedRowKeys.length===0"
+                icon="reload">
+        鎵归噺杩樺師
+      </a-button>
+      <a-button v-has="'secondMaintenanceOrder:batchAdd'" @click="handleBatchPrint" type="primary" icon="monitor"
+                :disabled="selectedRowKeys.length===0">鎵归噺棰勮
+      </a-button>
+      <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
+         <a-menu slot="overlay">
+           <a-menu-item v-has="'secondMaintenanceOrder:batchAbolish'" key="1" @click="handlerBatchAbolish">
+             <a-icon type="delete"/>
+             浣滃簾
+           </a-menu-item>
+           <a-menu-item v-has="'secondMaintenanceOrder:batchCollect'" key="2" @click="handlerBatchCollect">
+             <a-icon type="form"/>
+             棰嗗彇
+           </a-menu-item>
+           <a-menu-item v-has="'secondMaintenanceOrder:batchRestore'" key="3" @click="handlerBatchRestore">
+             <a-icon type="reload"/>
+             杩樺師
+           </a-menu-item>
+           <a-menu-item key="4" @click="handleBatchPrint">
+             <a-icon type="monitor"/>
+             棰勮
+           </a-menu-item>
+         </a-menu>
+         <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔
+           <a-icon type="down"/>
+         </a-button>
+       </a-dropdown>-->
     </div>
 
 
@@ -126,10 +146,15 @@
     <!-- 琛ㄥ崟鍖哄煙 -->
     <eamSecondMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"/>
 
+    <!--鎵归噺鏂板-->
     <eam-second-maintenance-batch-order-modal ref="batchModalForm" @ok="modalFormOk"/>
 
+    <!--瀹℃壒寮圭獥-->
     <second-maintenance-approval-modal ref="secondMaintenanceApprovalModal"
                                        :selectShenpiData="selectSecondMaintenanceData"/>
+
+    <!--鎵归噺鎵撳嵃寮圭獥-->
+    <eam-second-maintenance-order-batch-print-modal ref="batchPrintModal"/>
   </a-card>
 </template>
 
@@ -141,11 +166,13 @@
     from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue'
   import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect'
   import EamSecondMaintenanceBatchOrderModal from './modules/EamSecondMaintenanceBatchOrderModal'
+  import EamSecondMaintenanceOrderBatchPrintModal from './modules/EamSecondMaintenanceOrderBatchPrintModal'
 
   export default {
     name: 'EamSecondMaintenanceOrderList',
     mixins: [JeecgListMixin],
     components: {
+      EamSecondMaintenanceOrderBatchPrintModal,
       EamSecondMaintenanceBatchOrderModal,
       LxSearchEquipmentSelect,
       EamSecondMaintenanceOrderModal,
@@ -342,6 +369,7 @@
         let href = `${window._CONFIG['domianURL']}/jmreport/view/1110733537193545728?id=` + record.id //缃戠珯閾炬帴
         window.open(href, '_blank')
       },
+
       handlerAbolish(id) {
         var that = this
         deleteAction(that.url.abolish, { id })
@@ -393,6 +421,7 @@
           }
         })
       },
+
       //杩樺師
       handlerRestore(id) {
         let that = this
@@ -414,6 +443,7 @@
             }
           })
       },
+
       //鎵归噺杩樺師
       handlerBatchRestore() {
         if (!this.url.restoreBatch) {
@@ -463,6 +493,7 @@
           })
         }
       },
+
       //鎵归噺棰嗗彇
       handlerBatchCollect() {
         if (!this.url.collectBatch) {
@@ -513,6 +544,11 @@
         }
       },
 
+      // 鎵归噺鎵撳嵃
+      handleBatchPrint() {
+        this.$refs.batchPrintModal.handlePreview(this.selectedRowKeys.join())
+      },
+
       onMaintenanceDateChange: function(dataArray) {
         this.queryParam.maintenanceDateBegin = dataArray[0]
         this.queryParam.maintenanceDateEnd = dataArray[1]
diff --git a/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue b/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue
index 8f1e428..b1a95d3 100644
--- a/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue
+++ b/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue
@@ -39,11 +39,29 @@
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <div class="table-operator" v-if="isDisplayOperation">
       <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+
+      <a-dropdown :disabled="selectedRowKeys.length===0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="handleBatchPrint(1)">
+            楠屾敹鍗�
+          </a-menu-item>
+          <a-menu-item key="2" @click="handleBatchPrint(2)">
+            瀹屽伐绉讳氦鍗�
+          </a-menu-item>
+          <a-menu-item key="3" @click="handleBatchPrint(3)">
+            浠ヤ笂鍚屾椂灞曠ず
+          </a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px" type="primary"> 鎵归噺棰勮
+          <a-icon type="down"/>
+        </a-button>
+      </a-dropdown>
     </div>
 
     <!-- table鍖哄煙-begin -->
     <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
              :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}"
+             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
              @change="handleTableChange">
         <span slot="action" slot-scope="text, record">
           <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'">
@@ -69,7 +87,7 @@
           <template v-if="record.maintenanceStatus === 'COMPLETE'">
           <a-divider type="vertical"/>
 
-          <a @click="handlePrint(record)">鎵撳嵃</a>
+          <a @click="handlePrint(record)">棰勮</a>
           </template>
         </span>
     </a-table>
@@ -83,6 +101,9 @@
 
     <!--宸ュ崟鍙樻洿寮圭獥-->
     <eam-third-maintenance-change-modal ref="orderChangeModal" @ok="modalFormOk"/>
+
+    <!--鎵归噺鎵撳嵃寮圭獥-->
+    <eam-third-maintenance-order-batch-print-modal ref="batchPrintModal"/>
   </a-card>
 </template>
 
@@ -94,11 +115,13 @@
   import ThirdMaintenanceApprovalModal
     from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue'
   import EamThirdMaintenanceChangeModal from './modules/EamThirdMaintenanceChangeModal.vue'
+  import EamThirdMaintenanceOrderBatchPrintModal from './modules/EamThirdMaintenanceOrderBatchPrintModal'
 
   export default {
     name: 'EamThirdMaintenanceOrderList',
     mixins: [JeecgListMixin],
     components: {
+      EamThirdMaintenanceOrderBatchPrintModal,
       EamThirdMaintenanceChangeModal,
       LxSearchEquipmentSelect,
       EamThirdMaintenanceOrderModal,
@@ -363,11 +386,20 @@
         this.$refs.thirdMaintenanceApprovalModal.handleDetail(record)
       },
 
+      // 鎵归噺鎵撳嵃
+      handleBatchPrint(type) {
+        this.$refs.batchPrintModal.handlePreview(type,this.selectedRowKeys.join())
+      },
+
       onMaintenanceDateChange(dateString) {
         this.queryParam.maintenanceDateBegin = dateString[0]
         this.queryParam.maintenanceDateEnd = dateString[1]
       },
 
+      /**
+       * 绉湪鎶ヨ〃棰勮鎵撳嵃
+       * @param record
+       */
       handlePrint(record) {
         let href = `${window._CONFIG['domianURL']}/jmreport/view/1094880052100399104?id=` + record.id
         //  + `&orderId=` + record.id; //缃戠珯閾炬帴
diff --git a/src/views/eam/maintenance/modules/EamSecondMaintenanceOrderBatchPrintModal.vue b/src/views/eam/maintenance/modules/EamSecondMaintenanceOrderBatchPrintModal.vue
new file mode 100644
index 0000000..7f531ec
--- /dev/null
+++ b/src/views/eam/maintenance/modules/EamSecondMaintenanceOrderBatchPrintModal.vue
@@ -0,0 +1,213 @@
+<template>
+  <j-modal title="棰勮锛堜粎鍙瑙堝凡瀹屾垚宸ュ崟锛�" :width="948" :visible="visible" switchFullscreen centered
+           :mask-closable="false" @cancel="handleCancel" cancelText="鍏抽棴">
+    <a-spin :spinning="spinning" style="height: 100%">
+      <div id="dataTable">
+        <div v-for="dataItem in dataSource" class="table-container">
+          <div style="page-break-before:always"></div>
+
+          <table class="import-table" :id="dataItem.equipmentCode">
+            <thead>
+            <tr>
+              <td colspan="6" style="border: none">
+                <div style="text-align: right">{{dataItem.hfCode}}</div>
+              </td>
+            </tr>
+            </thead>
+
+            <tbody>
+            <tr style="height: 48px;">
+              <th colspan="6" style="border: none;font-size: 20px">鐢熶骇璁惧浜岀骇淇濆吇瀹屽伐绉讳氦鍗�</th>
+            </tr>
+
+            <tr>
+              <td>璁惧鍚嶇О</td>
+              <td>{{dataItem.equipmentName}}</td>
+              <td>璁惧鍨嬪彿</td>
+              <td>{{dataItem.equipmentModel}}</td>
+              <td>缁熶竴缂栧彿</td>
+              <td>{{dataItem.equipmentCode}}</td>
+            </tr>
+
+            <tr>
+              <td>浣跨敤鍗曚綅</td>
+              <td>{{dataItem.factoryName}}</td>
+              <td>淇濆吇鏃ユ湡</td>
+              <td colspan="3">{{dataItem.maintenanceDateFormatted}}</td>
+            </tr>
+
+            <tr>
+              <td class="vertical-display" :rowspan="dataItem.maintenanceOrderDetails.length+1">缁翠慨浜哄憳淇濆吇鍐呭</td>
+              <td class="vertical-display">搴忓彿</td>
+              <td colspan="2">淇濆吇鍐呭</td>
+              <td>鎵ц鎯呭喌</td>
+              <td>鎵ц浜�</td>
+            </tr>
+
+            <tr v-for="(item,index) in dataItem.maintenanceOrderDetails">
+
+              <td>{{item.itemCode}}</td>
+              <td colspan="2">{{item.itemName}}</td>
+              <td>{{item.maintenanceResult_dictText}}</td>
+              <td>{{item.createBy_dictText}}</td>
+            </tr>
+
+            <tr>
+              <td class="vertical-display" :rowspan="dataItem.operationOrderDetails.length+1">鎿嶄綔浜哄憳淇濆吇鍐呭</td>
+              <td class="vertical-display">搴忓彿</td>
+              <td colspan="2">淇濆吇鍐呭</td>
+              <td>鎵ц鎯呭喌</td>
+              <td>鎵ц浜�</td>
+            </tr>
+
+            <tr v-for="(item,index) in dataItem.operationOrderDetails">
+              <td>{{item.itemCode}}</td>
+              <td colspan="2">{{item.itemName}}</td>
+              <td>{{item.maintenanceResult_dictText}}</td>
+              <td>{{item.createBy_dictText}}</td>
+            </tr>
+
+            <tr>
+              <td colspan="6" style="padding: 5px">
+                <div style="text-align: left">闂锛歿{dataItem.problemDescription}}</div>
+                <br/><br/><br/>
+                <div style="text-align: left">澶勭悊鎺柦鎻忚堪锛歿{dataItem.dealDescription}}</div>
+                <br/><br/><br/>
+                <div style="text-align: right">浣跨敤鍗曚綅璁惧绠$悊鍛橈細{{dataItem.manageUser_dictText}}</div>
+              </td>
+            </tr>
+
+            <tr>
+              <td colspan="6" style="padding: 5px">
+                <div style="text-align: left">璇ヨ澶囩粡浜岀骇淇濆吇妫�鏌ュ悗锛岃揪鍒颁繚鍏昏鑼冭姹傘��</div>
+                <br/><br/><br/>
+                <div style="text-align: right">璁惧妫�鏌ヤ汉鍛橈細{{dataItem.inspector_dictText}}</div>
+              </td>
+            </tr>
+
+            <tr>
+              <td colspan="6" style="border: none">
+                濉啓璇存槑锛氭墽琛屼繚鍏诲伐浣滀腑锛屾牴鎹繚鍏诲唴瀹癸紝鍦ㄦ墽琛屾儏鍐靛搴旀爮鍒掆�溾垰鈥�
+              </td>
+            </tr>
+            </tbody>
+          </table>
+        </div>
+      </div>
+    </a-spin>
+
+    <template slot="footer">
+      <a-button @click="handleCancel">鍏抽棴</a-button>
+      <a-button type="primary" @click="handleImport">瀵煎嚭</a-button>
+      <a-button type="primary" v-print="'#dataTable'">鎵撳嵃</a-button>
+    </template>
+  </j-modal>
+</template>
+
+<script>
+  import { getAction } from '@/api/manage'
+  import $ from 'jquery'
+  import '@/components/table2excel/table2excel'
+
+  export default {
+    name: 'EamSecondMaintenanceOrderBatchPrintModal',
+    data() {
+      return {
+        visible: false,
+        spinning: false,
+        dataSource: [],
+        url: {
+          list: '/eam/secondMaintenanceOrder/batchExport'
+        }
+      }
+    },
+    methods: {
+      /**
+       * 鎵归噺棰勮
+       * @param ids String 涓婚〉闈㈠垪琛ㄥ嬀閫塱ds
+       */
+      handlePreview(ids) {
+        this.visible = true
+        this.spinning = true
+        this.dataSource = []
+        const that = this
+        getAction(this.url.list, { ids })
+          .then(res => {
+            if (res.success) that.dataSource = res.result
+          })
+          .finally(() => {
+            that.spinning = false
+          })
+      },
+
+      handleImport() {
+        document.querySelectorAll('table.import-table').forEach(element => {
+          console.log('element', element.id)
+          $(element).table2excel({
+            exclude: '.noExl',
+            name: 'Excel Document Name',
+            filename: '鐢熶骇璁惧浜岀骇淇濆吇瀹屽伐绉讳氦鍗�-' + element.id,
+            exclude_img: true,
+            fileext: '.xls',
+            exclude_links: true,
+            exclude_inputs: false
+          })
+        })
+      },
+
+      handleCancel() {
+        this.close()
+      },
+
+      close() {
+        this.$emit('close')
+        this.visible = false
+        this.$refs.form.clearValidate()
+      }
+    }
+  }
+</script>
+
+<style scoped lang="less">
+  /deep/ .ant-modal {
+    height: 90%;
+    overflow: hidden;
+
+    .ant-modal-content {
+      height: 100%;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+
+      ::-webkit-scrollbar {
+        width: 8px;
+        height: 8px;
+      }
+
+      .ant-modal-body {
+        flex: 1;
+        overflow: auto;
+      }
+    }
+  }
+
+  .table-container:not(:last-child) {
+    margin-bottom: 20px;
+  }
+
+  table {
+    width: 100%;
+    text-align: center;
+    table-layout: fixed;
+
+    td, th {
+      border: 1px solid #000;
+    }
+
+    td.vertical-display {
+      writing-mode: vertical-lr;
+      letter-spacing: 5px;
+      padding: 5px 0;
+    }
+  }
+</style>
\ No newline at end of file
diff --git a/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderBatchPrintModal.vue b/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderBatchPrintModal.vue
new file mode 100644
index 0000000..0b3c0c8
--- /dev/null
+++ b/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderBatchPrintModal.vue
@@ -0,0 +1,353 @@
+<template>
+  <j-modal title="棰勮锛堜粎鍙瑙堝凡瀹屾垚宸ュ崟锛�" :width="948" :visible="visible" switchFullscreen centered
+           :mask-closable="false" @cancel="handleCancel" cancelText="鍏抽棴">
+    <a-spin :spinning="spinning" style="height: 100%">
+      <div id="dataTable">
+        <div v-for="dataItem in dataSource" class="table-container">
+
+          <template v-if="tableType!==2">
+            <div style="page-break-before:always"></div>
+
+            <table class="import-table" :id="'鍔犲伐璁惧涓夌骇淇濆吇楠屾敹鍗�-'+dataItem.equipmentCode">
+              <thead>
+              <tr>
+                <td colspan="18" style="border: none;text-align: right">{{dataItem.hfCodeB}}</td>
+              </tr>
+              </thead>
+
+              <tbody>
+              <tr style="height: 48px;">
+                <th colspan="18" style="border: none;font-size: 20px">鍔犲伐璁惧涓夌骇淇濆吇楠屾敹鍗�</th>
+              </tr>
+
+              <tr>
+                <td colspan="3">璁惧绫诲埆</td>
+                <td colspan="6">{{dataItem.equipmentCategory_dictText}}</td>
+
+                <td colspan="3">璁惧缂栧彿</td>
+                <td colspan="6">{{dataItem.equipmentCode}}</td>
+              </tr>
+
+              <tr>
+                <td colspan="3">璁惧鍚嶇О</td>
+                <td colspan="6">{{dataItem.equipmentName}}</td>
+
+                <td colspan="3">璁惧鍨嬪彿</td>
+                <td colspan="6">{{dataItem.equipmentModel}}</td>
+              </tr>
+
+              <tr>
+                <td colspan="3" rowspan="2">淇濆吇閮ㄤ綅</td>
+                <td colspan="6" rowspan="2">淇濆吇鍐呭</td>
+                <td colspan="3" rowspan="2">楠屾敹鏍囧噯</td>
+                <td colspan="6">楠屾敹娆℃暟</td>
+              </tr>
+
+              <tr>
+                <td colspan="3">绗竴娆℃</td>
+                <td colspan="3">绗簩娆℃</td>
+              </tr>
+
+              <tr v-for="item in dataItem.eamThirdMaintenanceOrderDetailList">
+                <td colspan="3" :rowSpan="item.rowSpan" v-show="!item.rowSpanDis">{{item.itemPart}}</td>
+                <td colspan="6">{{item.itemName}}</td>
+                <td colspan="3">{{item.itemDemand}}</td>
+                <td colspan="3">{{+item.firstInspectResult?'鈭�':'脳'}}</td>
+                <td colspan="3">{{item.secondInspectResult}}</td>
+              </tr>
+              </tbody>
+            </table>
+
+            <div style="display:flex;justify-content: space-between; margin-top: 5px;padding: 0 20px">
+              <div>妫�鏌ヤ汉鍛橈細{{dataItem.inspectorSignature_dictText}}</div>
+              <div>妫�鏌ユ棩鏈燂細{{dataItem.inspectTime}}</div>
+            </div>
+          </template>
+
+          <template v-if="tableType!==1">
+            <div style="page-break-before:always"></div>
+
+            <table class="import-table" :id="'鍔犲伐璁惧涓夌骇淇濆吇瀹屽伐绉讳氦鍗�-'+dataItem.equipmentCode">
+              <thead>
+              <tr>
+                <td colspan="18" style="border: none;text-align: right">{{dataItem.hfCodeA}}</td>
+              </tr>
+              </thead>
+
+              <tbody>
+              <tr style="height: 48px;">
+                <th colspan="18" style="border: none;font-size: 20px">鍔犲伐璁惧涓夌骇淇濆吇瀹屽伐绉讳氦鍗�</th>
+              </tr>
+
+              <tr>
+                <td colspan="3">璁惧鍚嶇О</td>
+                <td colspan="3">{{dataItem.equipmentName}}</td>
+                <td colspan="3">璁惧鍨嬪彿</td>
+                <td colspan="3">{{dataItem.equipmentModel}}</td>
+                <td colspan="3">缁熶竴缂栧彿</td>
+                <td colspan="3">{{dataItem.equipmentCode}}</td>
+              </tr>
+
+              <tr>
+                <td colspan="3">浣跨敤鍗曚綅</td>
+                <td colspan="3">{{dataItem.factoryName}}</td>
+                <td colspan="3">淇濆吇鏃ユ湡</td>
+                <td colspan="9">{{dataItem.maintenanceDateFormatted}}</td>
+              </tr>
+
+              <tr>
+                <td colspan="18" style="text-align: left;padding: 5px">
+                  淇濆吇鍓嶆妧鏈姸鎬�<br/>
+                  1銆佽澶囧姛鑳芥槸鍚﹂綈鍏細{{+dataItem.fullyFunctional===1?'鏄紙鈭氾級鍚︼紙锛�':'鏄紙锛夊惁锛堚垰锛�'}}<br/>
+                  2銆佽澶囪兘鍚︽甯歌繍杞紝婊¤冻鍔犲伐瑕佹眰锛歿{+dataItem.runningNormally===1?'鏄紙鈭氾級鍚︼紙锛�':'鏄紙锛夊惁锛堚垰锛�'}}<br/>
+                  3銆侀棶棰樻弿杩帮細{{dataItem.problemDescription}}
+                </td>
+              </tr>
+
+              <tr>
+                <td colspan="18" style="text-align: left;padding: 5px">
+                  淇濆吇鍐呭<br/>
+                  1銆佹寜鐓т笁绾т繚鍏昏鑼冭繘琛屼繚鍏汇��<br/>
+                  2銆佸鏁存敼鎯呭喌杩涜鎻忚堪銆�
+                </td>
+              </tr>
+
+              <tr>
+                <td colspan="18" style="text-align: left;padding: 5px">
+                  淇悊鏇存崲澶囦欢鏄庣粏锛�
+                </td>
+              </tr>
+
+              <tr>
+                <td colspan="3">搴忓彿</td>
+                <td colspan="3">鍚嶇О</td>
+                <td colspan="3">鍨嬪彿</td>
+                <td colspan="3">鏁伴噺</td>
+                <td colspan="6">澶囨敞</td>
+              </tr>
+
+              <tr v-for="item in dataItem.eamThirdMaintenanceSpareList">
+                <td colspan="3">{{item.spareCode}}</td>
+                <td colspan="3">{{item.spareName}}</td>
+                <td colspan="3">{{item.spareModel}}</td>
+                <td colspan="3">{{item.spareQuantity}}</td>
+                <td colspan="6">{{item.remark}}</td>
+              </tr>
+
+              <tr>
+                <td colspan="18" style="text-align: left;padding: 5px">
+                  璇ヨ澶囩粡涓夌骇淇濆吇妫�鏌ュ悗锛岃揪鍒颁繚鍏昏鑼冭姹傘��
+                  <br/><br/><br/>
+                  <div style="display: flex;justify-content: space-between">
+                    <div>鎿嶄綔浜哄憳锛歿{dataItem.operatorSignature_dictText}}</div>
+                    <div>缁翠慨瀹や富浠伙細{{dataItem.repairManagerSignature_dictText}}</div>
+                    <br/><br/><br/>
+                  </div>
+
+
+                  <div style="display: flex;justify-content: space-between">
+                    <div>缁翠慨浜哄憳锛歿{dataItem.repairmanSignature_dictText}}</div>
+                    <div>璁惧妫�楠屽憳锛歿{dataItem.inspectorSignature_dictText}}</div>
+                    <br/>
+                  </div>
+                </td>
+              </tr>
+              </tbody>
+            </table>
+          </template>
+        </div>
+      </div>
+    </a-spin>
+
+    <template slot="footer">
+      <a-button @click="handleCancel">鍏抽棴</a-button>
+      <a-button type="primary" @click="handleImport">瀵煎嚭</a-button>
+      <a-button type="primary" v-print="'#dataTable'">鎵撳嵃</a-button>
+    </template>
+  </j-modal>
+</template>
+
+<script>
+  import { getAction } from '@/api/manage'
+  import $ from 'jquery'
+  import '@/components/table2excel/table2excel'
+
+  export default {
+    name: 'EamThirdMaintenanceOrderBatchPrintModal',
+    data() {
+      return {
+        visible: false,
+        spinning: false,
+        tableType: null,
+        dataSource: [
+          {
+            hfCode: 'HF-16548ASDSADA',
+            equipmentName: '鎵嬫墦鍗佺偣澶�',
+            equipmentModel: '6500P',
+            equipmentCode: '2125400',
+            factoryName: '鐕冩満鍘�',
+            maintenanceDateFormatted: '2025骞�5鏈�20鏃�'
+
+          }
+        ],
+        url: {
+          list1: '/eam/thirdMaintenanceOrder/batchExportCheck',
+          list2: '/eam/thirdMaintenanceOrder/batchExport'
+        }
+      }
+    },
+    methods: {
+      /**
+       * 鎵归噺棰勮
+       * @param type String 灞曠ず绫诲瀷
+       * @param ids String 涓婚〉闈㈠垪琛ㄥ嬀閫塱ds
+       */
+      handlePreview(type, ids) {
+        this.visible = true
+        this.spinning = true
+        this.dataSource = []
+        this.tableType = type
+        if (type === 3) {
+          this.displayAllTableType(ids)
+          return
+        }
+        const that = this
+        getAction(this.url['list' + type], { ids })
+          .then(res => {
+            if (res.success) {
+              that.dataSource = res.result
+              that.combineCell()
+            }
+          })
+          .finally(() => {
+            that.spinning = false
+          })
+      },
+
+      displayAllTableType(ids) {
+        const that = this
+        getAction(this.url.list1, { ids })
+          .then(res1 => {
+            if (res1.success) {
+              getAction(this.url.list2, { ids })
+                .then(res2 => {
+                  if (res2.success) {
+                    res1.result.forEach(item1 => {
+                      for (let i = 0; i < res2.result.length; i++) {
+                        if (item1.id === res2.result[i].id) {
+                          console.log('res2', res2.result)
+                          const dataItem = { ...item1, ...res2.result[i] }
+                          that.dataSource.push(dataItem)
+                          console.log('item1', item1)
+                          break
+                        }
+                      }
+                    })
+                    that.combineCell()
+                  }
+                })
+                .finally(() => {
+                  that.spinning = false
+                })
+            }
+          })
+
+      },
+
+      // 鍚堝苟
+      combineCell() {
+        this.dataSource.forEach(item => {
+          let list = item.eamThirdMaintenanceOrderDetailList
+          let k = 0
+          while (k < list.length) {
+            list[k]['rowSpan'] = 1
+            list[k]['rowSpanDis'] = false
+            for (var i = k + 1; i <= list.length - 1; i++) {
+              if (list[k]['itemPart'] === list[i]['itemPart'] && list[k]['itemPart'] !== '') {
+                list[k]['rowSpan']++
+                list[k]['rowSpanDis'] = false
+                list[i]['rowSpan'] = 1
+                list[i]['rowSpanDis'] = true
+              } else {
+                break
+              }
+            }
+            k = i
+          }
+        })
+        console.log('dataSource', this.dataSource)
+      },
+
+      handleImport() {
+        document.querySelectorAll('table.import-table').forEach(item => {
+          console.log('item', item)
+          $(item).table2excel({
+            exclude: '.noExl',
+            name: 'Excel Document Name',
+            filename: item.id,
+            exclude_img: true,
+            fileext: '.xls',
+            exclude_links: true,
+            exclude_inputs: false
+          })
+        })
+
+      },
+
+      handleCancel() {
+        this.close()
+      },
+
+      close() {
+        this.$emit('close')
+        this.visible = false
+        if (this.$refs.form) this.$refs.form.clearValidate()
+      }
+    }
+  }
+</script>
+
+<style scoped lang="less">
+  /deep/ .ant-modal {
+    height: 90%;
+    overflow: hidden;
+
+    .ant-modal-content {
+      height: 100%;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+
+      ::-webkit-scrollbar {
+        width: 8px;
+        height: 8px;
+      }
+
+      .ant-modal-body {
+        flex: 1;
+        overflow: auto;
+      }
+    }
+  }
+
+  .table-container:not(:last-child) {
+    margin-bottom: 20px;
+  }
+
+  table {
+    width: 100%;
+    text-align: center;
+    table-layout: fixed;
+
+    td, th {
+      border: 1px solid #000;
+    }
+
+    td.vertical-display {
+      transform: rotate(360deg);
+      writing-mode: vertical-lr;
+      letter-spacing: 5px;
+      padding: 10px 0;
+    }
+  }
+</style>
\ No newline at end of file
diff --git a/src/views/eam/repair/modules/EamRepairPersonForm.vue b/src/views/eam/repair/modules/EamRepairPersonForm.vue
deleted file mode 100644
index 6d3f3f7..0000000
--- a/src/views/eam/repair/modules/EamRepairPersonForm.vue
+++ /dev/null
@@ -1,124 +0,0 @@
-<template>
-  <a-spin :spinning="confirmLoading">
-    <j-form-container :disabled="formDisabled">
-      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
-        <a-row>
-          <a-col :span="24">
-            <a-form-model-item label="缁翠慨宸ュ崟Id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairId">
-              <a-input v-model="model.repairId" placeholder="璇疯緭鍏ョ淮淇伐鍗旾d"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="缁翠慨浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairUser">
-              <a-input v-model="model.repairUser" placeholder="璇疯緭鍏ョ淮淇汉"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="鏄惁鏄富缁翠慨浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairPrimary">
-              <a-input v-model="model.repairPrimary" placeholder="璇疯緭鍏ユ槸鍚︽槸涓荤淮淇汉"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="缁翠慨鏃堕暱(灏忔椂)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDuration">
-              <a-input v-model="model.repairDuration" placeholder="璇疯緭鍏ョ淮淇椂闀�(灏忔椂)"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
-              <a-input v-model="model.remark" placeholder="璇疯緭鍏ュ娉�"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </j-form-container>
-  </a-spin>
-</template>
-
-<script>
-
-  import { httpAction, getAction } from '@/api/manage'
-  import { validateDuplicateValue } from '@/utils/util'
-
-  export default {
-    name: 'EamRepairPersonForm',
-    components: {
-    },
-    props: {
-      //琛ㄥ崟绂佺敤
-      disabled: {
-        type: Boolean,
-        default: false,
-        required: false
-      }
-    },
-    data () {
-      return {
-        model:{
-         },
-        labelCol: {
-          xs: { span: 24 },
-          sm: { span: 5 },
-        },
-        wrapperCol: {
-          xs: { span: 24 },
-          sm: { span: 16 },
-        },
-        confirmLoading: false,
-        validatorRules: {
-        },
-        url: {
-          add: "/eam/eamRepairPerson/add",
-          edit: "/eam/eamRepairPerson/edit",
-          queryById: "/eam/eamRepairPerson/queryById"
-        }
-      }
-    },
-    computed: {
-      formDisabled(){
-        return this.disabled
-      },
-    },
-    created () {
-       //澶囦唤model鍘熷鍊�
-      this.modelDefault = JSON.parse(JSON.stringify(this.model));
-    },
-    methods: {
-      add () {
-        this.edit(this.modelDefault);
-      },
-      edit (record) {
-        this.model = Object.assign({}, record);
-        this.visible = true;
-      },
-      submitForm () {
-        const that = this;
-        // 瑙﹀彂琛ㄥ崟楠岃瘉
-        this.$refs.form.validate(valid => {
-          if (valid) {
-            that.confirmLoading = true;
-            let httpurl = '';
-            let method = '';
-            if(!this.model.id){
-              httpurl+=this.url.add;
-              method = 'post';
-            }else{
-              httpurl+=this.url.edit;
-               method = 'put';
-            }
-            httpAction(httpurl,this.model,method).then((res)=>{
-              if(res.success){
-                that.$message.success(res.message);
-                that.$emit('ok');
-              }else{
-                that.$message.warning(res.message);
-              }
-            }).finally(() => {
-              that.confirmLoading = false;
-            })
-          }
-
-        })
-      },
-    }
-  }
-</script>
\ No newline at end of file
diff --git a/src/views/eam/repair/modules/ImagesPreviewModal.vue b/src/views/eam/repair/modules/ImagesPreviewModal.vue
deleted file mode 100644
index 37ac715..0000000
--- a/src/views/eam/repair/modules/ImagesPreviewModal.vue
+++ /dev/null
@@ -1,61 +0,0 @@
-<template>
-  <a-modal title="棰勮" :visible="visible" width="50%" :footer="null" @cancel="visible=false">
-    <template v-for="(item,index) in imageUrlArr">
-      <img :src="getImageItemUrl(item)" width="100%;"/>
-
-      <a-divider v-if="index+1<imageUrlArr.length" style="margin:20px 0;background-color: #000"></a-divider>
-    </template>
-  </a-modal>
-</template>
-
-<script>
-  export default {
-    name: 'ImagesPreviewModal',
-    props: {
-      imageListUrl: {
-        type: String,
-        default: ''
-      }
-    },
-    data() {
-      return {
-        visible: false
-      }
-    },
-    computed: {
-      imageUrlArr() {
-        return JSON.parse(this.imageListUrl).map(item => item.filePath)
-      }
-    },
-    methods: {
-      getImageItemUrl(imageItemSrcSuffix) {
-        return `${window._CONFIG['domianURL']}/${imageItemSrcSuffix}`
-      }
-    }
-  }
-</script>
-
-<style scoped lang="less">
-  /deep/ .ant-modal {
-    height: 70%;
-    overflow: hidden;
-
-    .ant-modal-content {
-      height: 100%;
-      display: flex;
-      flex-direction: column;
-      overflow: hidden;
-
-      ::-webkit-scrollbar {
-        width: 8px;
-        height: 8px;
-      }
-
-      .ant-modal-body {
-        flex: 1;
-        overflow: 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 73f1c4f..ba22c2a 100644
--- a/src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue
+++ b/src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue
@@ -154,14 +154,14 @@
               </a-tab-pane>
 
               <template v-if="selectShenpiData.processDefinitionKey">
-                <a-tab-pane key='3' tab='娴佺▼鍥�'>
-                  <img :src="imageSrc" alt="Fetched Image"/>
+                <a-tab-pane key='3' tab='娴佺▼鍥�' style="overflow: auto">
+                  <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 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>
@@ -239,7 +239,7 @@
         </a-row>
       </a-form-model>
 
-      <eamReportRepair-modal ref="modalForm"  @ok="handleRepairComplete" @close="handleRepairClose"/>
+      <eamReportRepair-modal ref="modalForm" @ok="handleRepairComplete" @close="handleRepairClose"/>
 
     </a-spin>
   </j-modal>
@@ -250,7 +250,7 @@
   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";
+  import EamReportRepairModal from '@views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue'
 
   export default {
     name: 'SecondMaintenanceApprovalModal',
@@ -299,12 +299,12 @@
           detail: '/eam/secondMaintenanceOrderDetail/queryList',
           approval: '/eam/secondMaintenanceOrder/approval',
           diagramView: '/assign/flow/diagramView',
-          queryHisTaskList:'/assign/flow/queryHisTaskList',
+          queryHisTaskList: '/assign/flow/queryHisTaskList'
         },
         disableSubmit: false,
         selectedOperatorMaintenanceRowKeys: [],
         selectedRepairerMaintenanceRowKeys: [],
-        hitaskDataSource:[],
+        hitaskDataSource: [],
         detail: {
           operatorMaintenanceList: [],
           repairerMaintenanceList: [],
@@ -383,7 +383,7 @@
       },
       // 鎿嶄綔鍒椾粎鍦ㄤ繚鍏讳腑鐘舵�佷笅鏄剧ず
       shouldShowActionColumn() {
-        return this.model.maintenanceStatus === 'UNDER_MAINTENANCE';
+        return this.model.maintenanceStatus === 'UNDER_MAINTENANCE'
       }
     },
     methods: {
@@ -444,7 +444,7 @@
               { handler: this.customValidator }
             ]
           }
-        ];
+        ]
 
         // 浠呭湪淇濆吇涓姸鎬佷笅娣诲姞鎿嶄綔鍒�
         if (this.shouldShowActionColumn) {
@@ -455,10 +455,10 @@
             width: 150,
             slotName: 'action',
             fixed: 'right'
-          });
+          })
         }
 
-        return columns;
+        return columns
       },
 
       /**
@@ -469,7 +469,6 @@
         this.spinning = true
         this.model = {}
         this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = []
-        this.handleTabToFirstTable()
         this.getBasicInformationByApi(record)
         this.getFlowChartImageByApi(record)
         this.getFlowTaskListByApi(record)
@@ -503,6 +502,7 @@
               that.model.taskId = record.id
               that.model.userId = record.assignee
               that.model.instanceId = record.procInstId
+              this.handleTabToFirstTable()
             }
             else {
               that.$notification.warning({
@@ -518,11 +518,11 @@
        * @param record
        */
       getFlowTaskListByApi(record) {
-        let parmhis={
+        let parmhis = {
           'procInstId': record.procInstId
         }
-        getAction(this.url.queryHisTaskList,parmhis).then(res=>{
-          this.hitaskDataSource=res.result
+        getAction(this.url.queryHisTaskList, parmhis).then(res => {
+          this.hitaskDataSource = res.result
         }).finally(
           this.visible = true,
           console.log('this.approveData---->', this.approveData)
@@ -720,15 +720,15 @@
           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.$set(this.currentRepairRow, 'reportFlag', '1')
+          this.$message.success('鎶ヤ慨宸叉垚鍔熸彁浜�')
         }
-        this.currentRepairRow = null;
+        this.currentRepairRow = null
       },
 
       /**
@@ -736,7 +736,7 @@
        * @param exceptionDescription
        */
       handleRepairReporting(row) {
-        this.currentRepairRow = row; // 瀛樺偍褰撳墠鎿嶄綔琛�
+        this.currentRepairRow = row // 瀛樺偍褰撳墠鎿嶄綔琛�
         let record = {
           faultDescription: row.exceptionDescription,
           equipmentId: this.model.equipmentId
@@ -746,7 +746,7 @@
 
       handleRepairClose(success) {
         if (!success && this.currentRepairRow) {
-          this.currentRepairRow = null; // 娓呴櫎鏈垚鍔熺殑鎿嶄綔
+          this.currentRepairRow = null // 娓呴櫎鏈垚鍔熺殑鎿嶄綔
         }
       },
 
@@ -789,6 +789,7 @@
       }
     }
   }
+
   /* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
   html.submitting,
   html.submitting body {
@@ -834,6 +835,7 @@
     background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */
     margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */
   }
+
   .btn-custom {
     background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */
     color: white; /* 鐧借壊鏂囧瓧 */
@@ -852,13 +854,14 @@
     font-weight: bold;
     font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */
   }
-  .left_qiu{
+
+  .left_qiu {
     position: absolute;
     left: -74px;
     top: 0;
-    width:54px;
+    width: 54px;
     border-radius: 50%;
-    height:54px;
+    height: 54px;
     font-size: 13px;
     margin: auto;
     display: flex;
@@ -868,20 +871,23 @@
     background: #0099ff;
     transform: translate(0, 0);
   }
-  /deep/ .ant-timeline-item-tail{
+
+  /deep/ .ant-timeline-item-tail {
     left: -29px !important;
   }
-  .left_qiu span{
+
+  .left_qiu span {
     width: 3em;
     display: block;
     color: #fff;
     text-align: center;
   }
-  .img{
+
+  .img {
     width: 75%;
   }
 
-  .wrap{
+  .wrap {
     clear: both;
     width: 100%;
     display: flex;
@@ -889,13 +895,14 @@
     border: 1px solid #ccc;
     /* background-color: aqua; */
   }
-  .box{
-    width:21%;
-    height:50px;
+
+  .box {
+    width: 21%;
+    height: 50px;
     border-right: 1px solid #ccc;
     line-height: 50px;
     /* background: red; */
-    text-align:center;
+    text-align: center;
     margin: auto;
   }
 

--
Gitblit v1.9.3