Datasource 切换之后 table 也要清空
db monitor 模块 overview add 弹窗 Name 是必填项,只是 Test 按钮不需要校验
This commit is contained in:
parent
cca6fc22a8
commit
e47b78d23c
|
@ -174,6 +174,7 @@ export default {
|
|||
onDbChange(val) {
|
||||
this.name = val
|
||||
this.dbName = undefined
|
||||
this.dataSource = []
|
||||
this.getDbNameList()
|
||||
},
|
||||
ondbNameChange(val) {
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
v-decorator="[
|
||||
'name',
|
||||
{
|
||||
rules: [{ required: nameRequired, message: 'Please input name!' }],
|
||||
rules: [{ required: true, message: 'Please input name!' }],
|
||||
initialVale: this.formVal.name,
|
||||
},
|
||||
]"
|
||||
|
@ -237,7 +237,6 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
nameRequired: false,
|
||||
loading: false,
|
||||
isAdd: true,
|
||||
visible: false,
|
||||
|
@ -444,8 +443,7 @@ export default {
|
|||
this.currentId = ''
|
||||
},
|
||||
onTest() {
|
||||
this.nameRequired = false
|
||||
this.form.validateFields((err, values) => {
|
||||
this.form.validateFields(['dbType', 'dbDriver', 'dbUrl', 'dbUsername', 'dbPassword'], (err, values) => {
|
||||
if (!err) {
|
||||
let loading = this.$message.loading('连接中……', 0)
|
||||
postAction('/online/cgreport/api/testConnection', values)
|
||||
|
@ -462,10 +460,6 @@ export default {
|
|||
})
|
||||
},
|
||||
onSave() {
|
||||
this.nameRequired = true
|
||||
this.$nextTick(() => {
|
||||
this.form.validateFields(['name'], { force: true })
|
||||
})
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
if (this.isAdd) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user