From c182a210e2e5ab812e104c63c2fbb1a16e91afae Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期五, 05 九月 2025 17:48:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue |  296 +++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 179 insertions(+), 117 deletions(-)

diff --git a/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue b/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue
index 507d728..5da0af0 100644
--- a/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue
+++ b/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue
@@ -1,144 +1,206 @@
 <template>
-  <a-card :bordered="false">
-    <!-- table鍖哄煙-begin -->
-    <div>
-      <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>
-    </div>
-    <!-- table鍖哄煙-end -->
-
-  </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>
-  import '@/assets/less/TableExpand.less'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import { getAction } from '@api/manage'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { getAction } from '@api/manage'
 
-  export default {
-    name: 'EamMaintenanceStandardDetailList',
-    mixins: [JeecgListMixin],
-    props: {
-      standardId: {
-        type: String,
-        required: true,
-        default: '-1'
-      },
-      selectionRows:{}
+export default {
+  name: 'EamMaintenanceStandardDetailList',
+  mixins: [JeecgListMixin],
+  props: {
+    standardId: {
+      type: String,
+      required: true,
+      default: '-1'
     },
-    data() {
-      return {
-        description: '淇濆吇鏍囧噯鏄庣粏绠$悊椤甸潰',
-        // 琛ㄥご
-        columns: [
-          {
-            title: '搴忓彿',
-            align: 'center',
-            dataIndex: 'itemCode',
-            width: 60
-          },
-          {
-            title: '閮ㄤ綅',
-            align: 'center',
-            dataIndex: 'itemPart',
-            ellipsis: true
-          },
-          {
-            title: '淇濆吇椤瑰垎绫�',
-            align: 'center',
-            dataIndex: 'itemCategory_dictText',
-            ellipsis: true
-          },
-          {
-            title: '淇濆吇椤圭洰',
-            align: 'center',
-            dataIndex: 'itemName',
-            ellipsis: true
-          },
-          {
-            title: '淇濆吇瑙勮寖鎴栬姹�',
-            align: 'center',
-            dataIndex: 'itemDemand',
-            ellipsis: true
-          }
-        ],
-        url: {
-          list: '/eam/eamMaintenanceStandardDetail/list'
-        }
+    pageSelectionRow: {
+      type: Object,
+      default: () => {
       }
     },
-    watch: {
-      standardId: {
-        immediate: true,
-        handler(val) {
-          if (val) {
-            this.loadData(1)
-          } else {
-            this.clearList()
-          }
+    filterKey: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      description: '淇濆吇鏍囧噯鏄庣粏绠$悊椤甸潰',
+      // 琛ㄥご
+      columns: [],
+      inspectionColumns: [
+        {
+          title: '搴忓彿',
+          align: 'center',
+          dataIndex: 'itemCode',
+          width: 60
+        },
+        {
+          title: '淇濆吇椤瑰垎绫�',
+          align: 'center',
+          dataIndex: 'itemCategory_dictText',
+          width: 150
+        },
+        {
+          title: '淇濆吇椤圭洰',
+          headerAlign: 'center',
+          align: 'left',
+          dataIndex: 'itemName',
+          ellipsis: true
+        },
+        {
+          title: '淇濆吇瑙勮寖鎴栬姹�',
+          headerAlign: 'center',
+          align: 'left',
+          dataIndex: 'itemDemand',
+          ellipsis: true
         }
+      ],
+      secondMaintenanceColumns: [
+        {
+          title: '搴忓彿',
+          align: 'center',
+          dataIndex: 'itemCode',
+          width: 60
+        },
+        {
+          title: '淇濆吇椤瑰垎绫�',
+          align: 'center',
+          dataIndex: 'itemCategory_dictText',
+          width: 150
+        },
+        {
+          title: '淇濆吇椤圭洰',
+          headerAlign: 'center',
+          align: 'left',
+          dataIndex: 'itemName',
+          ellipsis: true
+        }
+      ],
+      thirdMaintenanceColumns: [
+        {
+          title: '搴忓彿',
+          align: 'center',
+          dataIndex: 'itemCode',
+          width: 60
+        },
+        {
+          title: '淇濆吇閮ㄤ綅',
+          align: 'center',
+          dataIndex: 'itemPart',
+          ellipsis: true
+        },
+        {
+          title: '淇濆吇鍐呭',
+          headerAlign: 'center',
+          align: 'left',
+          dataIndex: 'itemName',
+          ellipsis: true
+        },
+        {
+          title: '楠屾敹鏍囧噯',
+          headerAlign: 'center',
+          align: 'left',
+          dataIndex: 'itemDemand',
+          ellipsis: true
+        }
+      ],
+      disableMixinCreated: true,
+      url: {
+        list: '/eam/eamMaintenanceStandardDetail/list'
       }
-    },
-    created() {
-    },
-    computed: {},
-    methods: {
-      loadData(arg) {
-        if (!this.url.list) {
-          this.$message.error('璇疯缃畊rl.list灞炴��!')
-          return
-        }
-        if (this.standardId && this.standardId === '-1') {
+    }
+  },
+  watch: {
+    standardId: {
+      immediate: true,
+      handler(val) {
+        if (val) {
+          this.loadData(1)
+        } else {
           this.clearList()
-          return
         }
-        //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
-        if (arg === 1) {
-          this.ipagination.current = 1
+      }
+    },
+    pageSelectionRow: {
+      immediate: true,
+      handler(val) {
+        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
         }
-        let params = this.getQueryParams()//鏌ヨ鏉′欢
-        if (!params) {
-          return false
-        }
-        this.dataSource = []
-        params.standardId = this.standardId
-        this.loading = true
-        getAction(this.url.list, params).then((res) => {
+      }
+    }
+  },
+  methods: {
+    loadData(arg) {
+      //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
+      if (arg === 1) {
+        this.ipagination.current = 1
+      }
+      let params = this.getQueryParams()//鏌ヨ鏉′欢
+      if (!params) {
+        return false
+      }
+      this.dataSource = []
+      params.standardId = this.standardId
+      params.itemCategory = this.filterKey
+      this.loading = true
+      console.log('----------------------', this.filterKey)
+      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
+            this.dataSource = res.result.records
             if (res.result.total) {
               this.ipagination.total = res.result.total
             } else {
               this.ipagination.total = 0
             }
-            //update-end---author:zhangyafei    Date:20201118  for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
           } else {
-            this.$message.warning(res.message)
+            this.$notification.warning({
+              message: '娑堟伅',
+              description: res.message
+            })
           }
-        }).finally(() => {
+        })
+        .finally(() => {
           this.loading = false
         })
-      },
-      clearList() {
-        this.dataSource = []
-        this.selectedRowKeys = []
-        this.ipagination.current = 1
-      }
+    },
+    clearList() {
+      this.dataSource = []
+      this.clearSelected()
     }
   }
+}
 </script>
-<style scoped>
-  @import '~@assets/less/common.less';
+
+<style scoped lang="less">
+/* 琛ㄥご鍏ㄩ儴灞呬腑 */
+::v-deep .ant-table-thead > tr > th {
+  text-align: center !important;
+}
+
+/* 琛ㄤ綋锛氬簭鍙枫�佷繚鍏婚」鍒嗙被銆佷繚鍏婚儴浣嶇殑鍐呭灞呬腑 */
+::v-deep .ant-table-tbody > tr > td[data-col="itemCode"],
+::v-deep .ant-table-tbody > tr > td[data-col="itemCategory_dictText"],
+::v-deep .ant-table-tbody > tr > td[data-col="itemPart"] {
+  text-align: center !important;
+}
+
+/* 琛ㄤ綋锛氫繚鍏婚」鐩�佷繚鍏诲唴瀹广�侀獙鏀舵爣鍑嗙殑鍐呭宸﹀榻� */
+::v-deep .ant-table-tbody > tr > td[data-col="itemName"],
+::v-deep .ant-table-tbody > tr > td[data-col="itemDemand"] {
+  text-align: left !important;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3