|
@@ -30,7 +30,7 @@
|
|
|
</el-col>
|
|
|
<el-col v-if="formatData(tableForm.algorithmtype) == 'java' || formatData(tableForm.algorithmtype) == 'db' || formatData(tableForm.algorithmtype) == 'kafka'" :span="24">
|
|
|
<el-form-item prop="datasourceid" label="数据源">
|
|
|
- <el-select size="small" v-model="tableForm.datasourceid" placeholder="请选择">
|
|
|
+ <el-select size="small" v-model="tableForm.datasourceid" @change="changeSelectSocure('datasourceid')" placeholder="请选择">
|
|
|
<el-option v-for="(item,index) in selectSource" :key="index" :label="item.datasourcedescribe" :value="item.datasourceid"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -67,6 +67,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { Query } from "@/api/webApi"
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
export default {
|
|
|
name: 'PublicPageForm',
|
|
|
props: {
|
|
@@ -102,6 +103,9 @@ export default {
|
|
|
selectService: []
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['authMsg']),
|
|
|
+ },
|
|
|
watch: {
|
|
|
formData: {
|
|
|
handler (obj) {
|
|
@@ -183,6 +187,17 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
+ changeSelectSocure (code) {
|
|
|
+ const ndata = this.authMsg.filter(item => item.labelcode && item.pagecode == code)
|
|
|
+ if (ndata?.length) {
|
|
|
+ const nitem = ndata[0]
|
|
|
+ const nval = this.tableForm[code]
|
|
|
+ const { dropdownlistlabel, labelcode, dropdownlistid } = nitem
|
|
|
+ const wdata = this.selectSource.filter(item => item[dropdownlistid] == nval)
|
|
|
+ const witem = wdata[0]
|
|
|
+ this.tableForm[labelcode] = witem[dropdownlistlabel]
|
|
|
+ }
|
|
|
+ },
|
|
|
restForm () {
|
|
|
this.$refs['ruleForm'].resetFields()
|
|
|
},
|