75
This commit is contained in:
parent
8ef96d5004
commit
53c080ee6f
|
@ -22,6 +22,21 @@
|
|||
validateTrigger: 'change'
|
||||
}]" :disabled="testConnBool"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="选择数据库类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select show-search :disabled="testConnBool"placeholder="选择数据库类型" option-filter-prop="children" :filter-option="filterOption" size="large" v-decorator="['dbType', {
|
||||
rules: [
|
||||
{ required: true, message: '选择数据库类型' },
|
||||
],
|
||||
validateTrigger: 'change'
|
||||
}]">
|
||||
<a-select-option key="dm">
|
||||
达梦数据库
|
||||
</a-select-option>
|
||||
<a-select-option key="mysql">
|
||||
MySql
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol" label="端口号" >
|
||||
<a-input v-decorator="['port',{
|
||||
|
@ -198,7 +213,8 @@ import { datasyncqueryPage,
|
|||
database:"",
|
||||
dataType:"",
|
||||
shipModel:"",
|
||||
shipNum:""
|
||||
shipNum:"",
|
||||
dbType:""
|
||||
},
|
||||
recordId:""
|
||||
}
|
||||
|
@ -220,7 +236,8 @@ import { datasyncqueryPage,
|
|||
model.dataType = '';
|
||||
model.shipModel = '';
|
||||
model.shipNum = '';
|
||||
this.form.setFieldsValue(pick(model,'ip','port','username','password','database','dataType','shipModel','shipNum'));
|
||||
model.dbType='';
|
||||
this.form.setFieldsValue(pick(model,'ip','dbType','port','username','password','database','dataType','shipModel','shipNum'));
|
||||
},
|
||||
edit (record) {
|
||||
this.visible =true;
|
||||
|
@ -241,7 +258,8 @@ import { datasyncqueryPage,
|
|||
model.dataType = res.result.dataTypeId;
|
||||
model.shipModel = res.result.shipModelId;
|
||||
model.shipNum = res.result.shipNumId;
|
||||
this.form.setFieldsValue(pick(model,'ip','port','username','password','database','dataType','shipModel','shipNum'));
|
||||
model.dbType== res.result.shipNumId;
|
||||
this.form.setFieldsValue(pick(model,'ip','dbType','port','username','password','database','dataType','shipModel','shipNum'));
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
|
@ -264,7 +282,7 @@ import { datasyncqueryPage,
|
|||
var that = this;
|
||||
if (!err) {
|
||||
that.confirmLoading = true;
|
||||
datasyncgetTableInfo({ip:values.ip,port:values.port,username:values.username,password:values.password,database:values.database}).then((res) => {
|
||||
datasyncgetTableInfo({ip:values.ip,port:values.port,username:values.username,password:values.password,database:values.database,dbType:values.dbType}).then((res) => {
|
||||
if (res.result) {
|
||||
this.confirmLoading = false;
|
||||
this.dataSource = res.result;
|
||||
|
@ -350,7 +368,7 @@ import { datasyncqueryPage,
|
|||
var that = this;
|
||||
if (!err) {
|
||||
that.confirmLoading = true;
|
||||
datasynctestConn({ip:values.ip,port:values.port,username:values.username,password:values.password}).then((res) => {
|
||||
datasynctestConn({ip:values.ip,port:values.port,username:values.username,password:values.password,dbType:values.dbType}).then((res) => {
|
||||
if (res.result) {
|
||||
this.testConnBool =true;
|
||||
this.getdatabaseList();
|
||||
|
@ -364,7 +382,7 @@ import { datasyncqueryPage,
|
|||
})
|
||||
},
|
||||
getdatabaseList(){
|
||||
datasyncgetDatabases({ip:this.datamodel.ip,port:this.datamodel.port,username:this.datamodel.username,password:this.datamodel.password}).then((res) => {
|
||||
datasyncgetDatabases({ip:this.datamodel.ip,dbType:this.datamodel.dbType,port:this.datamodel.port,username:this.datamodel.username,password:this.datamodel.password}).then((res) => {
|
||||
if (res.success) {
|
||||
this.selectDataBase = false;
|
||||
this.databaseSource = res.result;
|
||||
|
|
Loading…
Reference in New Issue
Block a user