From 1392d8f3def2c21e7a6fc15cf3f68fc1056ec0b6 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期二, 29 七月 2025 19:01:20 +0800
Subject: [PATCH] 三不原则

---
 src/views/eam/repair/EamReportAccidentsRegisterList.vue |  146 ++++++++++++++++++++++++++++++++----------------
 1 files changed, 96 insertions(+), 50 deletions(-)

diff --git a/src/views/eam/repair/EamReportAccidentsRegisterList.vue b/src/views/eam/repair/EamReportAccidentsRegisterList.vue
index 7758fa2..1caef88 100644
--- a/src/views/eam/repair/EamReportAccidentsRegisterList.vue
+++ b/src/views/eam/repair/EamReportAccidentsRegisterList.vue
@@ -56,7 +56,7 @@
       </template>
 
       <span slot="action" slot-scope="text, record">
-          <template v-if="record.registerStatus=='PENDING_SUBMIT'">
+          <template v-if="record.registerStatus==='PENDING_SUBMIT'">
              <a @click="handleEdit(record)">缂栬緫</a>
              <a-divider type="vertical"/>
              <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)">
@@ -67,40 +67,50 @@
           <a v-else @click="handleDetail(record)">璇︽儏</a>
         </span>
 
+      <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず-->
+      <span slot="accidentPhenomenon" slot-scope="text">
+          <j-ellipsis :value="text" :length="8"/>
+      </span>
+      <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず-->
+      <span slot="measure" slot-scope="text">
+          <j-ellipsis :value="text" :length="8"/>
+      </span>
+      <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず-->
+      <span slot="causingResults" slot-scope="text">
+          <j-ellipsis :value="text" :length="8"/>
+      </span>
+
     </a-table>
     <!-- table鍖哄煙-end -->
 
     <!-- 琛ㄥ崟鍖哄煙 -->
     <eamReportAccidentsRegister-modal ref="modalForm" @ok="modalFormOk"/>
+
+    <!--瀹℃壒绐楀彛-->
+    <report-accidents-register-approval-modal ref="reportAccidentsRegisterApprovalModal"
+                                              :selectShenpiData="selectedRowData"/>
   </a-card>
 </template>
 
 <script>
-  import '@/assets/less/TableExpand.less'
   import EamReportAccidentsRegisterModal from './modules/EamReportAccidentsRegisterModal'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect'
+  import { getAction } from '@/api/manage'
+  import ReportAccidentsRegisterApprovalModal
+    from '../../flowable/workflow/repairOrder/ReportAccidentsRegisterApprovalModal'
 
   export default {
     name: 'EamReportAccidentsRegisterList',
     mixins: [JeecgListMixin],
     components: {
+      ReportAccidentsRegisterApprovalModal,
       LxSearchEquipmentSelect,
       EamReportAccidentsRegisterModal
-    },
-    props: {
-      isDisplayOperation: {
-        type: Boolean,
-        default: true
-      },
-      propsQueryParam: {
-        type: Object
-      }
     },
     data() {
       return {
         description: '璁惧浜嬫晠鐧昏琛ㄧ鐞嗛〉闈�',
-        disableMixinCreated: true,
         // 琛ㄥご
         columns: [
           {
@@ -140,6 +150,21 @@
             fixed: 'left'
           },
           {
+            title: '搴熷搧浠跺彿',
+            align: 'center',
+            dataIndex: 'scrapPartNumber'
+          },
+          {
+            title: '搴熷搧浠舵暟',
+            align: 'center',
+            dataIndex: 'scrapPartQuantity'
+          },
+          {
+            title: '搴熷搧浠峰��',
+            align: 'center',
+            dataIndex: 'scrapPartValue'
+          },
+          {
             title: '鏄惁鏈夎澶囨搷浣滆瘉',
             align: 'center',
             dataIndex: 'operationCertificate',
@@ -176,22 +201,25 @@
           {
             title: '浜嬫晠鐜拌薄',
             align: 'center',
-            dataIndex: 'accidentPhenomenon'
+            dataIndex: 'accidentPhenomenon',
+            scopedSlots: {customRender: 'accidentPhenomenon'},
           },
           {
             title: '閲囧彇鎺柦',
             align: 'center',
-            dataIndex: 'measure'
+            dataIndex: 'measure',
+            scopedSlots: {customRender: 'measure'},
           },
           {
             title: '閫犳垚缁撴灉',
             align: 'center',
-            dataIndex: 'causingResults'
+            dataIndex: 'causingResults',
+            scopedSlots: {customRender: 'causingResults'},
           },
           {
             title: '鎿嶄綔宸�',
             align: 'center',
-            dataIndex: 'confirmer'
+            dataIndex: 'confirmer_dictText'
           },
           {
             title: '鎿嶄綔宸ョ‘璁ゆ椂闂�',
@@ -201,7 +229,7 @@
           {
             title: '鍖洪暱',
             align: 'center',
-            dataIndex: 'district'
+            dataIndex: 'district_dictText'
           },
           {
             title: '鍖洪暱纭鏃堕棿',
@@ -211,7 +239,7 @@
           {
             title: '涓績涓讳换',
             align: 'center',
-            dataIndex: 'centerDirector'
+            dataIndex: 'centerDirector_dictText'
           },
           {
             title: '涓績涓讳换纭鏃堕棿',
@@ -226,7 +254,7 @@
           {
             title: '璁惧鐘舵��',
             align: 'center',
-            dataIndex: 'equipmentStatus'
+            dataIndex: 'equipmentStatus_dictText'
           },
           {
             title: '鍘熷洜鍒嗘瀽',
@@ -236,7 +264,7 @@
           {
             title: '妫�鏌ョ粨鏋�',
             align: 'center',
-            dataIndex: 'inspectionResults'
+            dataIndex: 'inspectionResults_dictText'
           },
           {
             title: '閲囧彇鎺柦',
@@ -256,7 +284,7 @@
           {
             title: '缁翠慨纭',
             align: 'center',
-            dataIndex: 'repairConfirm'
+            dataIndex: 'repairConfirm_dictText'
           },
           {
             title: '缁翠慨纭鏃堕棿',
@@ -266,7 +294,7 @@
           {
             title: '缁翠慨缁勯暱纭',
             align: 'center',
-            dataIndex: 'repairGroupLeader'
+            dataIndex: 'repairGroupLeader_dictText'
           },
           {
             title: '缁翠慨缁勯暱纭鏃堕棿',
@@ -276,7 +304,7 @@
           {
             title: '缁翠慨缁勯暱纭',
             align: 'center',
-            dataIndex: 'repairDistrict'
+            dataIndex: 'repairDistrict_dictText'
           },
           {
             title: '缁翠慨缁勯暱纭鏃堕棿',
@@ -284,7 +312,7 @@
             dataIndex: 'repairDistrictTime'
           },
           {
-            title: '鍘熷洜鍒嗘瀽鏍稿;鍚屾剰銆佷笉鍚屾剰',
+            title: '鍘熷洜鍒嗘瀽鏍稿',
             align: 'center',
             dataIndex: 'checkAgree',
             scopedSlots: { customRender: 'checkAgree' }
@@ -307,7 +335,7 @@
           {
             title: '鎶�鏈礋璐d汉',
             align: 'center',
-            dataIndex: 'technicalDirector'
+            dataIndex: 'technicalDirector_dictText'
           },
           {
             title: '鎶�鏈礋璐d汉纭鏃堕棿',
@@ -317,7 +345,7 @@
           {
             title: '鎶�鏈富绠″绾ч瀵�',
             align: 'center',
-            dataIndex: 'technicalDirectorLeader'
+            dataIndex: 'technicalDirectorLeader_dictText'
           },
           {
             title: '鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�',
@@ -327,47 +355,65 @@
           {
             title: '涓荤閮ㄧ骇棰嗗',
             align: 'center',
-            dataIndex: 'technicalDirectorPart'
+            dataIndex: 'technicalDirectorPart_dictText'
           },
           {
             title: '涓荤閮ㄧ骇棰嗗纭鏃堕棿',
             align: 'center',
             dataIndex: 'technicalDirectorPartTime'
+          },
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align: 'center',
+            scopedSlots: { customRender: 'action' },
+            width: 200,
+            fixed: 'right'
           }
         ],
         selectedRowData: {},
         url: {
           list: '/eam/eamReportAccidentsRegister/list',
-          delete: '/eam/eamReportAccidentsRegister/delete',
-          deleteBatch: '/eam/eamReportAccidentsRegister/deleteBatch',
-          exportXlsUrl: 'eam/eamReportAccidentsRegister/exportXls',
-          importExcelUrl: 'eam/eamReportAccidentsRegister/importExcel'
+          submit: '/eam/eamReportAccidentsRegister/submit',
+          delete: '/eam/eamReportAccidentsRegister/delete'
         }
       }
-    },
-    created() {
-      if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam)
-      else {
-        const operationColumn = {
-          title: '鎿嶄綔',
-          dataIndex: 'action',
-          align: 'center',
-          scopedSlots: { customRender: 'action' },
-          width: 200,
-          fixed: 'right'
-        }
-        this.columns = [...this.columns, operationColumn]
-      }
-      this.loadData(1)
     },
     methods: {
       /**
-       * 鐐瑰嚮濉姤鏃惰Е鍙�
+       * 鐐瑰嚮鎻愪氦鏃惰Е鍙�
+       * @param id
+       */
+      handleSubmit(id) {
+        this.loading = true
+        getAction(this.url.submit, { id })
+          .then(res => {
+            if (res.success) {
+              this.$notification.success({
+                message: '娑堟伅',
+                description: res.message
+              })
+              this.loadData()
+            } else {
+              this.$notification.warning({
+                message: '娑堟伅',
+                description: res.message
+              })
+              this.loading = false
+            }
+          })
+      },
+
+      /**
+       * 鐐瑰嚮璇︽儏鏃惰Е鍙戞椂瑙﹀彂
        * @param record
        */
-      handleFillIn(record) {
-        this.$refs.modalForm.title = '濉姤'
-        this.$refs.modalForm.handleFillIn(record)
+      handleDetail(record) {
+        this.selectedRowData = Object.assign({}, record)
+        this.$refs.reportAccidentsRegisterApprovalModal.title = '璇︽儏'
+        this.$refs.reportAccidentsRegisterApprovalModal.disableSubmit = true
+        this.$refs.reportAccidentsRegisterApprovalModal.visible = true
+        this.$refs.reportAccidentsRegisterApprovalModal.handleDetail(record)
       }
     }
   }

--
Gitblit v1.9.3