From 804d59e162b72be684d0087a8cd74dbd6fecbf4d Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期五, 30 十二月 2022 16:57:18 +0800 Subject: [PATCH] 添加投影配置页面 --- src/pages/library/components/baseList.vue | 33 ++++++++++++++++++++++----------- 1 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/pages/library/components/baseList.vue b/src/pages/library/components/baseList.vue index 4c8d585..f783270 100644 --- a/src/pages/library/components/baseList.vue +++ b/src/pages/library/components/baseList.vue @@ -193,25 +193,34 @@ this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1 ); }, - async init() { + async init(typ) { await this.BaseManageData.querySyncTables(); this.syncTableList = this.BaseManageData.syncTables; - this.defaultShow(); + if (typ) { + this.$emit("getList"); + } else { + this.defaultShow(); + } await this.BaseManageData.queryLocalTables(); this.localTableList = this.BaseManageData.localTables; - this.defaultShow(); + if (typ) { + this.$emit("getList"); + } else { + this.defaultShow(); + } }, add(type) { this.$emit("changeShow", null, type); }, clickLast(type) { - this.$nextTick(() => { - this.clickCategory( - this.syncTableList.length - 1, - type, - this.syncTableList[this.syncTableList.length - 1] - ); - }); + // this.$nextTick(() => { + + // }); + this.clickCategory( + this.syncTableList.length - 1, + type, + this.syncTableList[this.syncTableList.length - 1] + ); }, clickCategory(index, type, item) { this.categoryIndex = type + index; @@ -223,10 +232,12 @@ defaultShow() { if (this.syncTableList && this.syncTableList.length) { this.clickCategory(0, "sync", this.syncTableList[0]); - } else { + } else if (this.localTableList && this.localTableList.length) { this.clickCategory(0, "local", this.syncTableList[0]); } + else { + console.log("this.localTableList.length",this.localTableList.length) } }, // 娣诲姞鏃堕棿姣旇緝鍑芥暟 -- Gitblit v1.8.0