From fe35627e29ba5604e8c7fb3af3c8e82becd7c144 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期三, 06 十二月 2023 10:48:00 +0800 Subject: [PATCH] 主数据表格loading加载优化 --- Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 5 +++++ Source/UBCS-WEB/src/views/MasterData/items.vue | 8 ++++++-- Source/UBCS-WEB/src/components/Master/MasterTree.vue | 10 ++++------ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Master/MasterTree.vue b/Source/UBCS-WEB/src/components/Master/MasterTree.vue index 978e482..4957ea4 100644 --- a/Source/UBCS-WEB/src/components/Master/MasterTree.vue +++ b/Source/UBCS-WEB/src/components/Master/MasterTree.vue @@ -31,10 +31,6 @@ type: String, default: '' }, - isLoading:{ - type: Boolean, - default:false - } }, data() { return { @@ -151,14 +147,16 @@ }, //琛ㄦ牸鍒锋柊 TableRend() { - this.isLoading = true; + this.loading = true; + this.$emit('loading', this.loading) TableData({ templateOid: this.templateOids, codeClassifyOid: this.nodeClickList.oid, page: this.currentPage, limit: this.pageSize, }).then(res => { - this.isLoading = false; + this.loading = false; + this.$emit('loading', this.loading) this.tableDataArray = res.data.data; this.$emit('tableDataArray', this.tableDataArray) this.$emit('total', res.data.total) diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue index 5e2b8cb..3d3ea21 100644 --- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue @@ -393,6 +393,11 @@ this.doLayout() }, watch: { + isLoading:{ + handler(newval){ + console.log(newval) + } + }, tableHeadDataFateher: { handler(newval, oldval) { this.options = newval.tableDefineVO.seniorQueryColumns diff --git a/Source/UBCS-WEB/src/views/MasterData/items.vue b/Source/UBCS-WEB/src/views/MasterData/items.vue index d87f292..f095049 100644 --- a/Source/UBCS-WEB/src/views/MasterData/items.vue +++ b/Source/UBCS-WEB/src/views/MasterData/items.vue @@ -1,5 +1,5 @@ <template> - <el-container v-loading="isLoading"> + <el-container> <el-aside style="width:250px"> <basic-container> <!-- 鏍戠粍浠�--> @@ -17,7 +17,7 @@ @tableHeadFindData="tableHeadFindDatas" @nodeClickList="nodeClickLists" @total="totals" - :isLoading="isLoading" + @loading="loadingHandler" > </master-tree> </basic-container> @@ -112,10 +112,14 @@ }, nodeClickTem(val) { this.templateOid = val; + }, tableHeadBttoms(val) { this.masterVrBtnList = val; }, + loadingHandler(val) { + this.isLoading = val; + } } } </script> -- Gitblit v1.9.3