@@ -78,7 +85,8 @@ export default {
},
data() {
return {
- activeName: 'detail'
+ activeName: 'detail',
+ canEdit: false,
}
},
computed: {
@@ -90,8 +98,9 @@ export default {
}
},
methods: {
- editDatasource() {
- this.$refs.DsFormContent.editDatasource()
+ editDatasource(type = false) {
+ this.$refs.DsFormContent.editDatasource(type)
+ this.canEdit = type
},
validaDatasource() {
this.$refs.DsFormContent.validaDatasource()
diff --git a/frontend/src/views/system/datasource/DsTree.vue b/frontend/src/views/system/datasource/DsTree.vue
index 876c047492..83a1fa6718 100644
--- a/frontend/src/views/system/datasource/DsTree.vue
+++ b/frontend/src/views/system/datasource/DsTree.vue
@@ -543,6 +543,11 @@ export default {
this.tData.push(typeData[0])
}
}
+
+ if (!this.key) return
+ this.$nextTick(() => {
+ this.$refs.myDsTree.filter(this.key)
+ })
})
},
buildTree(array = []) {
@@ -671,7 +676,7 @@ export default {
_handleEditer(row) {
if (this.showView === 'Datasource') {
const param = { ...row, ...{ showModel: 'show' }}
- this.switchMain('DsForm', param, this.tData, this.dsTypes)
+ this.switchMain('dsTable', param, this.tData, this.dsTypes)
this.currentNodeId && sessionStorage.setItem('datasource-current-node', this.currentNodeId)
return
}
@@ -720,6 +725,22 @@ export default {
this.handlerConfirm(params)
},
switchMain(component, componentParam, tData, dsTypes) {
+ if (component === 'dsTable') {
+ const { id, type, showModel } = componentParam
+ this.$emit('switch-main', {
+ component,
+ componentParam: {
+ id,
+ type,
+ showModel,
+ msgNodeId: this.msgNodeId
+ },
+ tData,
+ dsTypes
+ })
+ return
+ }
+
if (component === 'DsForm') {
const { id, type, showModel } = componentParam
this.$router.push({