From fd268e6d3d6a310e0d35d0cec53e018b8c4ac4d8 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期四, 24 七月 2025 10:19:15 +0800
Subject: [PATCH] 基础样式添加按钮权限

---
 src/views/eam/repair/EamReportAccidentsRegisterList.vue |  203 ++++++++++++++++++++++++++++----------------------
 1 files changed, 112 insertions(+), 91 deletions(-)

diff --git a/src/views/eam/repair/EamReportAccidentsRegisterList.vue b/src/views/eam/repair/EamReportAccidentsRegisterList.vue
index 2d8df63..f49e4d3 100644
--- a/src/views/eam/repair/EamReportAccidentsRegisterList.vue
+++ b/src/views/eam/repair/EamReportAccidentsRegisterList.vue
@@ -50,11 +50,11 @@
 
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('璁惧浜嬫晠鐧昏琛�')">瀵煎嚭</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-        <a-button type="primary" icon="import">瀵煎叆</a-button>
-      </a-upload>
+<!--      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>-->
+<!--      <a-button type="primary" icon="download" @click="handleExportXls('璁惧浜嬫晠鐧昏琛�')">瀵煎嚭</a-button>-->
+<!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--        <a-button type="primary" icon="import">瀵煎叆</a-button>-->
+<!--      </a-upload>-->
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
           <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item>
@@ -79,12 +79,14 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        class="j-table-force-nowrap"
+        :scroll="{x:'max-content'}"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
 
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">缂栬緫</a>
+
+
 
           <a-divider type="vertical" />
           <a-dropdown>
@@ -119,136 +121,151 @@
     components: {
       EamReportAccidentsRegisterModal
     },
+    props: {
+      isDisplayOperation: {
+        type: Boolean,
+        default: true
+      },
+      propsQueryParam: {
+        type: Object
+      }
+    },
     data () {
       return {
         description: '璁惧浜嬫晠鐧昏琛ㄧ鐞嗛〉闈�',
+        disableMixinCreated: true,
         // 琛ㄥご
         columns: [
           {
             title: '#',
             dataIndex: '',
-            key:'rowIndex',
-            width:60,
+            key: 'rowIndex',
+            width: 60,
+            align: 'center',
+            customRender: function(t, r, index) {
+              return parseInt(index) + 1
+            },
+            fixed: 'left'
+          },
+          {
+            title: '缁熶竴缂栫爜',
+            align: 'center',
+            dataIndex: 'equipmentCode',
+            fixed: 'left',
+            scopedSlots: { customRender: 'equipmentCode' }
+          },
+          {
+            title: '璁惧鍚嶇О',
+            align: 'center',
+            dataIndex: 'equipmentName',
+            fixed: 'left'
+          },
+          {
+            title: '璁惧鍨嬪彿',
+            align: 'center',
+            dataIndex: 'equipmentModel',
+            fixed: 'left'
+          },
+		      {
+            title: '鏄惁鏈夎澶囨搷浣滆瘉',
             align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-           },
-		   {
-            title: '鍒犻櫎鏍囪',
-            align:"center",
-            dataIndex: 'delFlag'
-           },
-		   {
-            title: '鎶ヤ慨ID',
-            align:"center",
-            dataIndex: 'reportId'
-           },
-		   {
-            title: '璁惧ID',
-            align:"center",
-            dataIndex: 'equipmentId'
-           },
-		   {
-            title: '鏄惁鏈夎澶囨搷浣滆瘉;鏄� 鍚�',
-            align:"center",
-            dataIndex: 'operationCertificate'
-           },
-		   {
+            dataIndex: 'operationCertificate_dictText'
+          },
+		      {
             title: '鏄惁鏂數閲嶅惎',
             align:"center",
-            dataIndex: 'powerOffRestart'
-           },
-		   {
+            dataIndex: 'powerOffRestart_dictText'
+          },
+		      {
             title: '鏄惁涓烘壒娆¢浠�',
             align:"center",
-            dataIndex: 'batchFirstPiece'
-           },
-		   {
-            title: '鍙樺姩鍥犵礌;濉啓鏄垨鍚�',
+            dataIndex: 'batchFirstPiece_dictText'
+          },
+		      {
+            title: '鍙樺姩鍥犵礌',
             align:"center",
-            dataIndex: 'variableFactors'
-           },
-		   {
-            title: '鍙樺姩鍥犵礌鍐呭;鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��',
+            dataIndex: 'variableFactors_dictText'
+          },
+		      {
+            title: '鍙樺姩鍥犵礌鍐呭',
             align:"center",
-            dataIndex: 'variableFactorsValue'
-           },
-		   {
+            dataIndex: 'variableFactorsValue_dictText'
+          },
+		      {
             title: '鎵ц绋嬪簭',
             align:"center",
             dataIndex: 'executeNc'
-           },
-		   {
+          },
+		      {
             title: '浜嬫晠鐜拌薄',
             align:"center",
             dataIndex: 'accidentPhenomenon'
-           },
-		   {
+          },
+		      {
             title: '閲囧彇鎺柦',
             align:"center",
             dataIndex: 'measure'
-           },
-		   {
+          },
+		      {
             title: '閫犳垚缁撴灉',
             align:"center",
             dataIndex: 'causingResults'
-           },
-		   {
+          },
+		      {
             title: '鎿嶄綔宸�',
             align:"center",
             dataIndex: 'confirmer'
-           },
-		   {
+          },
+		      {
             title: '鎿嶄綔宸ョ‘璁ゆ椂闂�',
             align:"center",
             dataIndex: 'confirmTime'
-           },
-		   {
+          },
+		      {
             title: '鍖洪暱',
             align:"center",
             dataIndex: 'district'
-           },
-		   {
+          },
+		      {
             title: '鍖洪暱纭鏃堕棿',
             align:"center",
             dataIndex: 'districtTime'
-           },
-		   {
+          },
+		      {
             title: '涓績涓讳换',
             align:"center",
             dataIndex: 'centerDirector'
-           },
-		   {
+          },
+		      {
             title: '涓績涓讳换纭鏃堕棿',
             align:"center",
             dataIndex: 'centerDirectorTime'
-           },
-		   {
+          },
+		      {
             title: '缁翠慨寮�濮嬫椂闂�',
             align:"center",
             dataIndex: 'reportStartTime'
-           },
-		   {
+          },
+		      {
             title: '璁惧鐘舵��',
             align:"center",
             dataIndex: 'equipmentStatus'
-           },
-		   {
+          },
+		      {
             title: '鍘熷洜鍒嗘瀽',
             align:"center",
             dataIndex: 'causeAnalysis'
-           },
-		   {
+          },
+		      {
             title: '妫�鏌ョ粨鏋�',
             align:"center",
             dataIndex: 'inspectionResults'
-           },
-		   {
+          },
+		      {
             title: '閲囧彇鎺柦',
             align:"center",
             dataIndex: 'takeSteps'
-           },
+          },
 		   {
             title: '寤鸿閲囧彇鎺柦',
             align:"center",
@@ -274,7 +291,7 @@
             align:"center",
             dataIndex: 'repairConfirmTime'
            },
-		   {
+		        {
             title: '缁翠慨缁勯暱纭',
             align:"center",
             dataIndex: 'repairGroupLeader'
@@ -354,29 +371,33 @@
             align:"center",
             dataIndex: 'technicalDirectorPartTime'
            },
-          {
-            title: '鎿嶄綔',
-            dataIndex: 'action',
-            align:"center",
-            scopedSlots: { customRender: 'action' },
-          }
         ],
-		url: {
+        selectRepairOrderData: {},
+        url: {
           list: "/eam/eamReportAccidentsRegister/list",
           delete: "/eam/eamReportAccidentsRegister/delete",
           deleteBatch: "/eam/eamReportAccidentsRegister/deleteBatch",
           exportXlsUrl: "eam/eamReportAccidentsRegister/exportXls",
           importExcelUrl: "eam/eamReportAccidentsRegister/importExcel",
-       },
+        },
     }
   },
-  computed: {
-    importExcelUrl: function(){
-      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-    }
-  },
+    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: {
-     
     }
   }
 </script>

--
Gitblit v1.9.3