数据源

Raod 3 years ago
parent 00b2e9ca48
commit 0648d82405

@ -107,19 +107,9 @@ export default {
testReplyCode: null, testReplyCode: null,
} }
}, },
watch: {
visib(val) {
if (val) {
this.setDataSource()
//
}
},
},
// beforeCreatethis // beforeCreatethis
beforeCreate: function () {}, beforeCreate: function () {},
mounted() {}, mounted() {},
created() {
},
methods: { methods: {
async setDataSource() { async setDataSource() {
this.dialogForm = { this.dialogForm = {
@ -129,8 +119,6 @@ export default {
sourceDesc: '', sourceDesc: '',
sourceConfig: '', sourceConfig: '',
} }
const { code } = await this.getSystem();
if (code != '200') return
//dataSourceId //dataSourceId
if (this.dataSource.id) { if (this.dataSource.id) {
const {code, data} = await reportDataSourceDetail(this.dataSource) const {code, data} = await reportDataSourceDetail(this.dataSource)
@ -157,6 +145,7 @@ export default {
this.dictionaryOptions = data this.dictionaryOptions = data
this.dialogForm.sourceType = this.dictionaryOptions[0].text this.dialogForm.sourceType = this.dictionaryOptions[0].text
this.dataLink = JSON.parse(this.dictionaryOptions[0].extend) this.dataLink = JSON.parse(this.dictionaryOptions[0].extend)
this.setDataSource()
}, },
// //
closeDialog() { closeDialog() {

@ -11,7 +11,7 @@
<!--这里可以将自定义的弹出框代码放入到page中 <!--这里可以将自定义的弹出框代码放入到page中
--> -->
<template v-slot:pageSection> <template v-slot:pageSection>
<EditDataSource :dataSource="dataSource" :visib="dialogVisibleSetDataSource" @handleClose="dialogVisibleSetDataSource = false" @refreshList="refreshList" /> <EditDataSource ref="EditDataSource" :dataSource="dataSource" :visib="dialogVisibleSetDataSource" @handleClose="dialogVisibleSetDataSource = false" @refreshList="refreshList" />
</template> </template>
</anji-crud> </anji-crud>
</template> </template>
@ -190,6 +190,7 @@ export default {
}else { }else {
this.dataSource = {} this.dataSource = {}
} }
this.$refs.EditDataSource.getSystem()
}, },
refreshList(){ refreshList(){
this.$refs.listPage.handleQueryForm('query') this.$refs.listPage.handleQueryForm('query')

Loading…
Cancel
Save