From 0648d82405031e0bea07b78a92bc6294298a2408 Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Sat, 31 Jul 2021 15:57:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/datasource/components/EditDataSource.vue | 13 +------------ report-ui/src/views/report/datasource/index.vue | 3 ++- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/report-ui/src/views/report/datasource/components/EditDataSource.vue b/report-ui/src/views/report/datasource/components/EditDataSource.vue index 9f9cf001..7a307f16 100644 --- a/report-ui/src/views/report/datasource/components/EditDataSource.vue +++ b/report-ui/src/views/report/datasource/components/EditDataSource.vue @@ -107,19 +107,9 @@ export default { testReplyCode: null, } }, - watch: { - visib(val) { - if (val) { - this.setDataSource() - // 弹窗弹出时需要执行的逻辑 - } - }, - }, // 在生命周期 beforeCreate里面改变this指向 beforeCreate: function () {}, mounted() {}, - created() { - }, methods: { async setDataSource() { this.dialogForm = { @@ -129,8 +119,6 @@ export default { sourceDesc: '', sourceConfig: '', } - const { code } = await this.getSystem(); - if (code != '200') return //根据dataSourceId判断新增还是编辑 if (this.dataSource.id) { const {code, data} = await reportDataSourceDetail(this.dataSource) @@ -157,6 +145,7 @@ export default { this.dictionaryOptions = data this.dialogForm.sourceType = this.dictionaryOptions[0].text this.dataLink = JSON.parse(this.dictionaryOptions[0].extend) + this.setDataSource() }, // 关闭模态框 closeDialog() { diff --git a/report-ui/src/views/report/datasource/index.vue b/report-ui/src/views/report/datasource/index.vue index 9d5fcf0e..685b3a83 100644 --- a/report-ui/src/views/report/datasource/index.vue +++ b/report-ui/src/views/report/datasource/index.vue @@ -11,7 +11,7 @@ @@ -190,6 +190,7 @@ export default { }else { this.dataSource = {} } + this.$refs.EditDataSource.getSystem() }, refreshList(){ this.$refs.listPage.handleQueryForm('query')