From 385e27c9b88f33088bb9dc5e81801c8e9de7e187 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期四, 21 八月 2025 18:11:18 +0800
Subject: [PATCH] 430详情点进流转节点与流程图

---
 src/views/eam/repair/modules/EamProductHazardsBatchPrintModal.vue |  218 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 218 insertions(+), 0 deletions(-)

diff --git a/src/views/eam/repair/modules/EamProductHazardsBatchPrintModal.vue b/src/views/eam/repair/modules/EamProductHazardsBatchPrintModal.vue
new file mode 100644
index 0000000..5c2ec46
--- /dev/null
+++ b/src/views/eam/repair/modules/EamProductHazardsBatchPrintModal.vue
@@ -0,0 +1,218 @@
+<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="12" style="border: none">
+                <div style="text-align: right">{{dataItem.hfCode}}</div>
+              </td>
+            </tr>
+            </thead>
+
+            <tbody>
+            <tr style="height: 48px;">
+              <th colspan="12" style="border: none;font-size: 20px">浜у搧璐ㄩ噺闅愭偅纭琛�</th>
+            </tr>
+
+            <tr>
+              <td colspan="6" style="border: none;padding-left: 20px">
+                <div style="text-align: left">浣跨敤鍗曚綅锛歿{dataItem.factoryName}}</div>
+              </td>
+              <td colspan="6" style="border: none;padding-right: 20px">
+                <div style="text-align: right">
+                  {{dataItem.confirmTime.split('-')[0]}} 骞� {{dataItem.confirmTime.split('-')[1]}} 鏈�
+                  {{dataItem.confirmTime.split('-')[2]}} 鏃�
+                </div>
+              </td>
+            </tr>
+
+            <tr>
+              <td colspan="2">璁惧鍚嶇О</td>
+              <td colspan="2">{{dataItem.equipmentName}}</td>
+              <td colspan="2">璁惧鍨嬪彿</td>
+              <td colspan="2">{{dataItem.equipmentModel}}</td>
+              <td colspan="2">缁熶竴缂栧彿</td>
+              <td colspan="2">{{dataItem.equipmentCode}}</td>
+            </tr>
+
+            <tr>
+              <td colspan="2">鍔犲伐闆朵欢鍙�</td>
+              <td colspan="2">{{dataItem.processingPart}}</td>
+              <td colspan="2">鎵规鍙�</td>
+              <td colspan="2">{{dataItem.batchNumber}}</td>
+              <td colspan="2">浠舵暟</td>
+              <td colspan="2">{{dataItem.quantity}}</td>
+            </tr>
+
+            <tr>
+              <td colspan="2" style="text-align: left;padding: 5px">璁惧鏁呴殰鐜拌薄鎻忚堪</td>
+              <td colspan="10" style="text-align: left;padding: 5px">
+                <div style="text-align: left" v-html="dataItem.faultDescription.replace(/\n/g,'<br/>')"></div>
+                <br/><br/>
+                <div style="text-align: right;padding-right: 20px">鎿嶄綔浜哄憳绛惧瓧锛歿{dataItem.confirmer_dictText}}</div>
+              </td>
+            </tr>
+
+            <tr>
+              <td colspan="2" style="text-align: left;padding: 5px">璁惧鏁呴殰瀵逛骇鍝佽川閲忓奖鍝嶅垎鏋�</td>
+              <td colspan="10" style="padding: 5px">
+                <div style="text-align: left">浜у搧鎹熷け鎯呭喌锛歿{+dataItem.technologistResult===1?'鏄紙鈭氾級鍚︼紙锛�':'鏄紙锛夊惁锛堚垰锛�'}}</div>
+                <div style="text-align: left">浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽锛�</div>
+                <div style="text-align: left" v-html="dataItem.qualityAnalysis.replace(/\n/g,'<br/>')"></div>
+                <br/><br/>
+                <div style="text-align: right;padding-right: 20px">涓荤宸ヨ壓绛惧瓧锛歿{dataItem.technologist_dictText}}</div>
+              </td>
+            </tr>
+
+            <tr>
+              <td colspan="12" style="padding: 5px">
+                <div style="text-align:left;">{{dataItem.deputyDepartmentComment}}</div>
+                <br/><br/>
+                <div style="text-align: right;padding-right: 20px">绛惧瓧锛堝壇閮ㄧ骇浠ヤ笂棰嗗锛夛細{{dataItem.deputyDepartment_dictText}}
+                </div>
+                <br/>
+                <div style="text-align: right;padding-right: 20px">
+                  {{dataItem.deputyDepartmentTime.split('-')[0]}} 骞� {{dataItem.deputyDepartmentTime.split('-')[1]}} 鏈�
+                  {{dataItem.deputyDepartmentTime.split('-')[2]}} 鏃�
+                </div>
+              </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: 'EamProductHazardsBatchPrintModal',
+    data() {
+      return {
+        visible: false,
+        spinning: false,
+        dataSource: [
+          {
+            hfCode: 'HF-16548ASDSADA',
+            equipmentName: '鎵嬫墦鍗佺偣澶�',
+            equipmentModel: '6500P',
+            equipmentCode: '2125400',
+            factoryName: '鐕冩満鍘�',
+            maintenanceDateFormatted: '2025骞�5鏈�20鏃�'
+
+          }
+        ],
+        url: {
+          list: '/eam/eamReportProductHazards/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
+          })
+      },
+
+      // 瀵煎嚭鍒癊xcel
+      handleImport() {
+        document.querySelectorAll('table.import-table').forEach(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

--
Gitblit v1.9.3