From a8441611deb2a51bb16a0f85e83a2750840c18f4 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期三, 09 七月 2025 16:22:08 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue | 132 ++++++++++++++++++++++++++++++------------- 1 files changed, 92 insertions(+), 40 deletions(-) diff --git a/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue b/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue index 507d728..d242efa 100644 --- a/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue +++ b/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue @@ -1,27 +1,21 @@ <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-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> </template> <script> - import '@/assets/less/TableExpand.less' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { getAction } from '@api/manage' @@ -34,13 +28,21 @@ required: true, default: '-1' }, - selectionRows:{} + pageSelectionRow: { + type: Object, + default: () => { + } + }, + filterKey: { + type: String + } }, data() { return { description: '淇濆吇鏍囧噯鏄庣粏绠$悊椤甸潰', // 琛ㄥご - columns: [ + columns: [], + inspectionColumns: [ { title: '搴忓彿', align: 'center', @@ -48,16 +50,10 @@ width: 60 }, { - title: '閮ㄤ綅', - align: 'center', - dataIndex: 'itemPart', - ellipsis: true - }, - { title: '淇濆吇椤瑰垎绫�', align: 'center', dataIndex: 'itemCategory_dictText', - ellipsis: true + width: 150 }, { title: '淇濆吇椤圭洰', @@ -72,6 +68,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' } @@ -82,22 +125,32 @@ immediate: true, handler(val) { if (val) { - this.loadData(1) + console.log('val---------------------', val) + this.$nextTick(() => this.loadData(1)) } else { this.clearList() } } + }, + 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 + } + } } }, - created() { - }, - computed: {}, methods: { loadData(arg) { - if (!this.url.list) { - this.$message.error('璇疯缃畊rl.list灞炴��!') - return - } if (this.standardId && this.standardId === '-1') { this.clearList() return @@ -113,11 +166,13 @@ this.dataSource = [] params.standardId = this.standardId 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 + if (this.filterKey) this.dataSource = res.result.records.filter(item => item.itemCategory == this.filterKey) + else this.dataSource = res.result.records if (res.result.total) { this.ipagination.total = res.result.total } else { @@ -138,7 +193,4 @@ } } } -</script> -<style scoped> - @import '~@assets/less/common.less'; -</style> \ No newline at end of file +</script> \ No newline at end of file -- Gitblit v1.9.3