From dd882d827e101e85cf1806284d1e3e76d3466ecb Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期五, 11 七月 2025 20:18:16 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue | 63 ++++++++++++------------------- 1 files changed, 24 insertions(+), 39 deletions(-) diff --git a/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue b/src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue index d242efa..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> @@ -34,7 +22,8 @@ } }, filterKey: { - type: String + type: String, + default: '' } }, data() { @@ -125,8 +114,7 @@ immediate: true, handler(val) { if (val) { - console.log('val---------------------', val) - this.$nextTick(() => this.loadData(1)) + this.loadData(1) } else { this.clearList() } @@ -151,10 +139,6 @@ }, methods: { loadData(arg) { - if (this.standardId && this.standardId === '-1') { - this.clearList() - return - } //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 if (arg === 1) { this.ipagination.current = 1 @@ -165,31 +149,32 @@ } 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锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ - 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 + 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