处理测试接口的校验问题,
处理候去db name 接口的参数问题
This commit is contained in:
parent
9c30a2d773
commit
7136b65158
|
@ -131,7 +131,6 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDbList()
|
this.getDbList()
|
||||||
this.getDbNameList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
filterOption(input, option) {
|
filterOption(input, option) {
|
||||||
|
@ -141,6 +140,7 @@ export default {
|
||||||
getAction('/sysDatabase/sourceList').then((res) => {
|
getAction('/sysDatabase/sourceList').then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.name = this.$route.query.id || res.result[0].sourceId
|
this.name = this.$route.query.id || res.result[0].sourceId
|
||||||
|
this.getDbNameList()
|
||||||
this.DbOptions = res.result.map((item) => {
|
this.DbOptions = res.result.map((item) => {
|
||||||
return {
|
return {
|
||||||
label: item.sourceName,
|
label: item.sourceName,
|
||||||
|
@ -172,6 +172,7 @@ export default {
|
||||||
},
|
},
|
||||||
onDbChange(val) {
|
onDbChange(val) {
|
||||||
this.name = val
|
this.name = val
|
||||||
|
this.getDbNameList()
|
||||||
},
|
},
|
||||||
ondbNameChange(val) {
|
ondbNameChange(val) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
v-decorator="[
|
v-decorator="[
|
||||||
'name',
|
'name',
|
||||||
{
|
{
|
||||||
rules: [{ required: true, message: 'Please input name!' }],
|
rules: [{ required: nameRequired, message: 'Please input name!' }],
|
||||||
initialVale: this.formVal.name,
|
initialVale: this.formVal.name,
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
|
@ -237,6 +237,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
nameRequired: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
isAdd: true,
|
isAdd: true,
|
||||||
visible: false,
|
visible: false,
|
||||||
|
@ -443,6 +444,7 @@ export default {
|
||||||
this.currentId = ''
|
this.currentId = ''
|
||||||
},
|
},
|
||||||
onTest() {
|
onTest() {
|
||||||
|
this.nameRequired = false
|
||||||
this.form.validateFields((err, values) => {
|
this.form.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
let loading = this.$message.loading('连接中……', 0)
|
let loading = this.$message.loading('连接中……', 0)
|
||||||
|
@ -460,6 +462,10 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onSave() {
|
onSave() {
|
||||||
|
this.nameRequired = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.validateFields(['name'], { force: true })
|
||||||
|
})
|
||||||
this.form.validateFields((err, values) => {
|
this.form.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
if (this.isAdd) {
|
if (this.isAdd) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user