From ee79f53fd9385b087ebd7a93af638d91a9825d10 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期三, 23 八月 2023 18:04:35 +0800
Subject: [PATCH] lnl,设备台账导入功能+页面字段调整

---
 src/views/eam/modules/equipment/EquipmentAccount2List.vue |  345 ++++++++++++++++++++++++++++++++++++++------------------
 src/views/eam/modules/equipment/ProcessParametersList.vue |    4 
 2 files changed, 234 insertions(+), 115 deletions(-)

diff --git a/src/views/eam/modules/equipment/EquipmentAccount2List.vue b/src/views/eam/modules/equipment/EquipmentAccount2List.vue
index f298e74..e8231ce 100644
--- a/src/views/eam/modules/equipment/EquipmentAccount2List.vue
+++ b/src/views/eam/modules/equipment/EquipmentAccount2List.vue
@@ -64,6 +64,9 @@
         icon="plus"
         :hidden="disabled"
       >鏂板</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
         type="primary"
         icon="download"
@@ -249,7 +252,7 @@
       type="card"
       defaultActiveKey="1"
     >
-      <!-- <a-tab-pane key="1">
+      <a-tab-pane key="1">
         <span slot="tab">
           <a-badge v-if="showTabsFlag">宸ヨ壓鍙傛暟&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a-badge>
           <a-badge
@@ -265,7 +268,7 @@
         >
           <process-parameters-list ref="ProcessParametersList"></process-parameters-list>
         </div>
-      </a-tab-pane> -->
+      </a-tab-pane>
 
       <a-tab-pane
         key="2"
@@ -397,7 +400,7 @@
           width: 50,
         },
         {
-          title: '璁惧缂栫爜',
+          title: '缁熶竴缂栫爜',
           align: "center",
           dataIndex: 'num',
         },
@@ -407,80 +410,24 @@
           dataIndex: 'name',
         },
         {
-          title: '璁惧鍨嬪彿',
+          title: '鍨嬪彿',
           align: "center",
           dataIndex: 'model',
         },
         {
-          title: '璁惧瑙勬牸',
+          title: '瑙勬牸',
           align: "center",
           dataIndex: 'specification',
         },
-        {
-          title: '璧勪骇缂栫爜',
-          align: "center",
-          dataIndex: 'assetNumber',
-        },
-        {
-          title: '璁惧鐘舵��',
-          align: "center",
-          dataIndex: 'equipmentStatus_dictText',
-        },
-        {
-          title: '鎶�鏈姸鎬�',
-          align: "center",
-          dataIndex: 'technologyStatus_dictText',
-        },
-        {
-          title: '鐗圭璁惧',
-          align: "center",
-          dataIndex: 'specificEquipment_dictText',
-        },
-        {
-          title: '璁惧鍥剧墖',
-          align: "center",
-          dataIndex: 'equipmentPhoto',
-          scopedSlots: { customRender: 'equipmentPhoto' },
-        },
-        {
-          title: '鍒堕�犲晢',
-          align: "center",
-          dataIndex: 'constructorId_dictText',
-        },
-        {
-          title: '渚涘簲鍟�',
-          align: "center",
-          dataIndex: 'supplierId_dictText',
-        },
-        {
-          title: '鍑哄巶缂栧彿',
-          align: "center",
-          dataIndex: 'factoryNumber',
-        },
-        {
-          title: '鍑哄巶鏃ユ湡',
-          align: "center",
-          dataIndex: 'leaveFactoryDate',
-        },
-        {
-          title: '楠屾敹鏃ユ湡',
-          align: "center",
-          dataIndex: 'acceptanceCheckDate',
-        },
         // {
-        //   title: '鎵�鏈夌粍缁�',
+        //   title: '璧勪骇缂栫爜',
         //   align: "center",
-        //   dataIndex: 'affiliationId_dictText',
+        //   dataIndex: 'assetNumber',
         // },
         {
-          title: '绠$悊缁勭粐',
+          title: '鎬诲姛鐜�',
           align: "center",
-          dataIndex: 'manageId_dictText',
-        },
-        {
-          title: '绠$悊浜哄憳',
-          align: "center",
-          dataIndex: 'manager_dictText',
+          dataIndex: 'gpo',
         },
         {
           title: '浣跨敤閮ㄩ棬',
@@ -488,74 +435,242 @@
           dataIndex: 'useId_dictText',
         },
         {
-          title: '璐d换浜�',
+          title: '宸ュ尯',
           align: "center",
-          dataIndex: 'functionary_dictText',
+          dataIndex: 'equipmentUda1',
         },
         {
-          title: '璐d换鐝粍',
+          title: '缁存姢閮ㄩ棬',
+          align: "center",
+          dataIndex: 'manageId_dictText',
+        },
+        {
+          title: '缁翠慨鐝粍',
           align: "center",
           dataIndex: 'teamId_dictText',
         },
         {
-          title: '浣嶇疆',
-          align: "center",
-          dataIndex: 'location',
-        },
-        {
-          title: '閲嶈搴�',
+          title: 'ABC鏍囪瘑',
           align: "center",
           dataIndex: 'equipmentImportanceId_dictText',
         },
-        // {
-        //   title: '宸ヨ壓鍙傛暟绠$悊',
-        //   align: "center",
-        //   dataIndex: 'processParameters',
-        //   scopedSlots: { customRender: 'processParameters' },
-        // },
-        // {
-        //   title: '宸ヨ壓鍙傛暟妯℃澘',
-        //   align: "center",
-        //   dataIndex: 'processParametersTemplateName',
-        // },
         {
-          title: '璁惧绮惧害绠$悊',
+          title: '鍏抽敭璁惧鏍囪瘑',
           align: "center",
-          dataIndex: 'precisionParameters',
-          scopedSlots: { customRender: 'precisionParameters' },
+          dataIndex: 'keyEquipmentIdentification',
         },
         {
-          title: '绮惧害鍙傛暟妯℃澘',
+          title: '瀹夊叏閰嶇疆',
           align: "center",
-          dataIndex: 'precisionParametersTemplateName',
+          dataIndex: 'securityConfiguration',
+        },
+        {
+          title: '鍐峰嵈绯荤粺',
+          align: "center",
+          dataIndex: 'coolingSystem',
+        },
+        {
+          title: '鐏伀鍣�',
+          align: "center",
+          dataIndex: 'fireExtinguisher',
+        },
+        
+        {
+          title: '鐏伀鍣ㄦ湁鏁堟湡',
+          align: "center",
+          dataIndex: 'fireExtinguisherValidityPeriod',
+        },
+        {
+          title: '鎿嶄綔绯荤粺',
+          align: "center",
+          dataIndex: 'operatingSystem',
+        },
+        {
+          title: '绯荤粺',
+          align: "center",
+          dataIndex: 'system',
+        },
+        {
+          title: '璁惧绔彛',
+          align: "center",
+          dataIndex: 'port',
+        },
+        {
+          title: '鍧愭爣鏁伴噺',
+          align: "center",
+          dataIndex: 'coordinateNum',
+        },
+        {
+          title: '璁惧鐘舵��',
+          align: "center",
+          dataIndex: 'equipmentStatus_dictText',
+        },
+        {
+          title: '閲嶉噺',
+          align: "center",
+          dataIndex: 'equipmentUda3',
+        },
+        {
+          title: '閲嶉噺璁¢噺鍗曚綅',
+          align: "center",
+          dataIndex: 'equipmentUda4_dictText',
+        },
+        {
+          title: '鍔熻兘浣嶇疆',
+          align: "center",
+          dataIndex: 'equipmentUda5',
+        },
+        {
+          title: '瀹夎浣嶇疆',
+          align: "center",
+          dataIndex: 'equipmentUda2',
+        },
+        {
+          title: '鍑哄巶鏃ユ湡',
+          align: "center",
+          dataIndex: 'leaveFactoryDate',
+        },
+        {
+          title: '绔嬮」鍗″彿',
+          align: "center",
+          dataIndex: 'projectApprovalNo',
+        },
+        {
+          title: '璧勯噾鏉ユ簮',
+          align: "center",
+          dataIndex: 'fundSource',
+        },
+        {
+          title: '楠屾敹鏃ユ湡',
+          align: "center",
+          dataIndex: 'acceptanceCheckDate',
+        },
+        {
+          title: '鍑哄巶缂栧彿',
+          align: "center",
+          dataIndex: 'factoryNo',
+        },
+        {
+          title: '璧勪骇鍒堕�犲晢',
+          align: "center",
+          dataIndex: 'constructorId_dictText',
+        },
+        {
+          title: '璧勪骇鐨勬潵婧愬浗瀹�',
+          align: "center",
+          dataIndex: 'sourceCountry',
+        }, 
+        // {
+        //   title: '鎶�鏈姸鎬�',
+        //   align: "center",
+        //   dataIndex: 'technologyStatus_dictText',
+        // },
+        // {
+        //   title: '鐗圭璁惧',
+        //   align: "center",
+        //   dataIndex: 'specificEquipment_dictText',
+        // },
+        // {
+        //   title: '璁惧鍥剧墖',
+        //   align: "center",
+        //   dataIndex: 'equipmentPhoto',
+        //   scopedSlots: { customRender: 'equipmentPhoto' },
+        // },
+        // {
+        //   title: '渚涘簲鍟�',
+        //   align: "center",
+        //   dataIndex: 'supplierId_dictText',
+        // },
+        // {
+        //   title: '鍑哄巶缂栧彿',
+        //   align: "center",
+        //   dataIndex: 'factoryNumber',
+        // },
+        // {
+        //   title: '鍑哄巶鏃ユ湡',
+        //   align: "center",
+        //   dataIndex: 'leaveFactoryDate',
+        // },
+        // {
+        //   title: '楠屾敹鏃ユ湡',
+        //   align: "center",
+        //   dataIndex: 'acceptanceCheckDate',
+        // },
+        // // {
+        // //   title: '鎵�鏈夌粍缁�',
+        // //   align: "center",
+        // //   dataIndex: 'affiliationId_dictText',
+        // // },
+       
+        // {
+        //   title: '绠$悊浜哄憳',
+        //   align: "center",
+        //   dataIndex: 'manager_dictText',
+        // },
+        // {
+        //   title: '浣跨敤閮ㄩ棬',
+        //   align: "center",
+        //   dataIndex: 'useId_dictText',
+        // },
+        // {
+        //   title: '璐d换浜�',
+        //   align: "center",
+        //   dataIndex: 'functionary_dictText',
+        // },
+        // {
+        //   title: '浣嶇疆',
+        //   align: "center",
+        //   dataIndex: 'location',
+        // },
+        {
+          title: '宸ヨ壓鍙傛暟绠$悊',
+          align: "center",
+          dataIndex: 'processParameters',
+          scopedSlots: { customRender: 'processParameters' },
+        },
+        {
+          title: '宸ヨ壓鍙傛暟妯℃澘',
+          align: "center",
+          dataIndex: 'processParametersTemplateName',
         },
         // {
-        //   title: '妫�瀹氱鐞�',
+        //   title: '璁惧绮惧害绠$悊',
         //   align: "center",
-        //   dataIndex: 'verification',
-        //   scopedSlots: { customRender: 'verification' },
+        //   dataIndex: 'precisionParameters',
+        //   scopedSlots: { customRender: 'precisionParameters' },
         // },
         // {
-        //   title: '妫�瀹氬懆鏈�/鏈�',
+        //   title: '绮惧害鍙傛暟妯℃澘',
         //   align: "center",
-        //   dataIndex: 'verificationPeriod',
+        //   dataIndex: 'precisionParametersTemplateName',
         // },
-        // {
-        //   title: '涓婃妫�瀹氭棩鏈�',
-        //   align: "center",
-        //   dataIndex: 'lastVerificationDate',
-        // },
-        // {
-        //   title: '涓嬫妫�瀹氭棩鏈�',
-        //   align: "center",
-        //   dataIndex: 'nextVerificationDate',
-        // },
-        // {
-        //   title: '鐘舵��',
-        //   align: 'center',
-        //   dataIndex: 'status',
-        //   width: 100,
-        // },
+        // // {
+        // //   title: '妫�瀹氱鐞�',
+        // //   align: "center",
+        // //   dataIndex: 'verification',
+        // //   scopedSlots: { customRender: 'verification' },
+        // // },
+        // // {
+        // //   title: '妫�瀹氬懆鏈�/鏈�',
+        // //   align: "center",
+        // //   dataIndex: 'verificationPeriod',
+        // // },
+        // // {
+        // //   title: '涓婃妫�瀹氭棩鏈�',
+        // //   align: "center",
+        // //   dataIndex: 'lastVerificationDate',
+        // // },
+        // // {
+        // //   title: '涓嬫妫�瀹氭棩鏈�',
+        // //   align: "center",
+        // //   dataIndex: 'nextVerificationDate',
+        // // },
+        // // {
+        // //   title: '鐘舵��',
+        // //   align: 'center',
+        // //   dataIndex: 'status',
+        // //   width: 100,
+        // // },
         {
           title: '澶囨敞',
           align: "center",
@@ -578,6 +693,7 @@
         deleteBatch: "/eam/equipment/deleteBatch",
         active: "/eam/equipment/active",
         exportXlsUrl: '/eam/equipment/exportXls',
+        importExcelUrl: "/eam/equipment/importExcel",
         // importExcelUrl: 'base/site/importExcel',
       },
       //鏂板銆佺紪杈戙�佸垹闄ゃ�佹壒閲忓垹闄ゆ搷浣滄敼鍙樻暟鎹悗鍒锋柊鍏宠仈鐨勭粍浠剁殑鐩戝惉灞炴��
@@ -606,6 +722,9 @@
         selectedRowKeys: this.selectedRowKeys,
       };
     },
+    importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
   },
   methods: {
 
@@ -621,11 +740,11 @@
 
     onSelectChange(selectedRowKeys, selectionRows) {
       if (selectedRowKeys.length == 1) {
-        // this.$refs.ProcessParametersList.equipmentId = selectedRowKeys[0]
+        this.$refs.ProcessParametersList.equipmentId = selectedRowKeys[0]
         this.$refs.EquipmentFileList.equipmentId = selectedRowKeys[0]
         this.$refs.PrecisionParametersList.equipmentId = selectedRowKeys[0]
       } else {
-        // this.$refs.ProcessParametersList.equipmentId = '-1'
+        this.$refs.ProcessParametersList.equipmentId = '-1'
         this.$refs.PrecisionParametersList.equipmentId = '-1'
         this.$refs.EquipmentFileList.equipmentId = '-1'
       }
diff --git a/src/views/eam/modules/equipment/ProcessParametersList.vue b/src/views/eam/modules/equipment/ProcessParametersList.vue
index 39b15be..c0fcba9 100644
--- a/src/views/eam/modules/equipment/ProcessParametersList.vue
+++ b/src/views/eam/modules/equipment/ProcessParametersList.vue
@@ -1,11 +1,11 @@
 <template>
   <a-card :bordered="false">
-    <!-- <a-button
+    <a-button
       v-if="equipmentSelectionRows.length == 1 && this.dataSource.length == 0"
       @click="handleAdd"
       type="primary"
       icon="plus"
-    >鏂板</a-button> -->
+    >鏂板</a-button>
     <div>
       <a-table
         ref="table"

--
Gitblit v1.9.3