From 56148970959b7016cfe1c54ffa39dbd9bb9921ff Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期五, 11 七月 2025 21:10:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue |  135 ++++++++++++++++++++++++++++----------------
 1 files changed, 85 insertions(+), 50 deletions(-)

diff --git a/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue b/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue
index 214e801..ddcaee3 100644
--- a/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue
+++ b/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue
@@ -1,18 +1,6 @@
 <template>
-  <a-card :bordered="false">
-    <a-table
-      ref="detailTable"
-      size="middle"
-      bordered
-      rowKey="id"
-      :columns="columns"
-      :dataSource="dataSource"
-      :pagination="ipagination"
-      :loading="loading"
-      class="j-table-force-nowrap"
-      @change="handleTableChange">
-    </a-table>
-  </a-card>
+  <a-table ref="detailTable" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
+           :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" @change="handleTableChange"/>
 </template>
 
 <script>
@@ -32,6 +20,10 @@
         type: Object,
         default: () => {
         }
+      },
+      filterKey: {
+        type: String,
+        default: ''
       }
     },
     data() {
@@ -39,18 +31,12 @@
         description: '淇濆吇鏍囧噯鏄庣粏绠$悊椤甸潰',
         // 琛ㄥご
         columns: [],
-        defaultColumns: [
+        inspectionColumns: [
           {
             title: '搴忓彿',
             align: 'center',
             dataIndex: 'itemCode',
             width: 60
-          },
-          {
-            title: '閮ㄤ綅',
-            align: 'center',
-            dataIndex: 'itemPart',
-            ellipsis: true
           },
           {
             title: '淇濆吇椤瑰垎绫�',
@@ -71,6 +57,53 @@
             ellipsis: true
           }
         ],
+        secondMaintenanceColumns: [
+          {
+            title: '搴忓彿',
+            align: 'center',
+            dataIndex: 'itemCode',
+            width: 60
+          },
+          {
+            title: '淇濆吇椤瑰垎绫�',
+            align: 'center',
+            dataIndex: 'itemCategory_dictText',
+            width: 150
+          },
+          {
+            title: '淇濆吇椤圭洰',
+            align: 'center',
+            dataIndex: 'itemName',
+            ellipsis: true
+          }
+        ],
+        thirdMaintenanceColumns: [
+          {
+            title: '搴忓彿',
+            align: 'center',
+            dataIndex: 'itemCode',
+            width: 60
+          },
+          {
+            title: '淇濆吇閮ㄤ綅',
+            align: 'center',
+            dataIndex: 'itemPart',
+            ellipsis: true
+          },
+          {
+            title: '淇濆吇鍐呭',
+            align: 'center',
+            dataIndex: 'itemName',
+            ellipsis: true
+          },
+          {
+            title: '楠屾敹鏍囧噯',
+            align: 'center',
+            dataIndex: 'itemDemand',
+            ellipsis: true
+          }
+        ],
+        disableMixinCreated: true,
         url: {
           list: '/eam/eamMaintenanceStandardDetail/list'
         }
@@ -88,25 +121,24 @@
         }
       },
       pageSelectionRow: {
+        immediate: true,
         handler(val) {
-          if (val) {
-            if (val.maintenanceCategory != 'THIRD_MAINTENANCE') this.columns = [...this.defaultColumns.filter(item => item.dataIndex != 'itemPart')]
-            else this.columns = [...this.defaultColumns.filter(item => item.dataIndex != 'itemCategory_dictText')]
+          switch (val.maintenanceCategory) {
+            case 'POINT_INSPECTION':
+              this.columns = this.inspectionColumns
+              break
+            case 'SECOND_MAINTENANCE':
+              this.columns = this.secondMaintenanceColumns
+              break
+            case 'THIRD_MAINTENANCE':
+              this.columns = this.thirdMaintenanceColumns
+              break
           }
         }
       }
     },
-    computed: {},
     methods: {
       loadData(arg) {
-        if (!this.url.list) {
-          this.$message.error('璇疯缃畊rl.list灞炴��!')
-          return
-        }
-        if (this.standardId && this.standardId === '-1') {
-          this.clearList()
-          return
-        }
         //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
         if (arg === 1) {
           this.ipagination.current = 1
@@ -117,29 +149,32 @@
         }
         this.dataSource = []
         params.standardId = this.standardId
+        params.itemCategory = this.filterKey
         this.loading = true
-        getAction(this.url.list, params).then((res) => {
-          if (res.success) {
-            // console.log(res)
-            //update-begin---author:zhangyafei    Date:20201118  for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
-            this.dataSource = res.result.records || res.result
-            if (res.result.total) {
-              this.ipagination.total = res.result.total
+        console.log('----------------------', this.filterKey)
+        getAction(this.url.list, params)
+          .then((res) => {
+            if (res.success) {
+              this.dataSource = res.result.records
+              if (res.result.total) {
+                this.ipagination.total = res.result.total
+              } else {
+                this.ipagination.total = 0
+              }
             } else {
-              this.ipagination.total = 0
+              this.$notification.warning({
+                message: '娑堟伅',
+                description: res.message
+              })
             }
-            //update-end---author:zhangyafei    Date:20201118  for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
-          } else {
-            this.$message.warning(res.message)
-          }
-        }).finally(() => {
-          this.loading = false
-        })
+          })
+          .finally(() => {
+            this.loading = false
+          })
       },
       clearList() {
         this.dataSource = []
-        this.selectedRowKeys = []
-        this.ipagination.current = 1
+        this.clearSelected()
       }
     }
   }

--
Gitblit v1.9.3