75
This commit is contained in:
parent
8ef96d5004
commit
53c080ee6f
|
@ -22,6 +22,21 @@
|
||||||
validateTrigger: 'change'
|
validateTrigger: 'change'
|
||||||
}]" :disabled="testConnBool"></a-input>
|
}]" :disabled="testConnBool"></a-input>
|
||||||
</a-form-item>
|
</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"
|
<a-form-item :labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol" label="端口号" >
|
:wrapperCol="wrapperCol" label="端口号" >
|
||||||
<a-input v-decorator="['port',{
|
<a-input v-decorator="['port',{
|
||||||
|
@ -198,7 +213,8 @@ import { datasyncqueryPage,
|
||||||
database:"",
|
database:"",
|
||||||
dataType:"",
|
dataType:"",
|
||||||
shipModel:"",
|
shipModel:"",
|
||||||
shipNum:""
|
shipNum:"",
|
||||||
|
dbType:""
|
||||||
},
|
},
|
||||||
recordId:""
|
recordId:""
|
||||||
}
|
}
|
||||||
|
@ -220,7 +236,8 @@ import { datasyncqueryPage,
|
||||||
model.dataType = '';
|
model.dataType = '';
|
||||||
model.shipModel = '';
|
model.shipModel = '';
|
||||||
model.shipNum = '';
|
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) {
|
edit (record) {
|
||||||
this.visible =true;
|
this.visible =true;
|
||||||
|
@ -241,7 +258,8 @@ import { datasyncqueryPage,
|
||||||
model.dataType = res.result.dataTypeId;
|
model.dataType = res.result.dataTypeId;
|
||||||
model.shipModel = res.result.shipModelId;
|
model.shipModel = res.result.shipModelId;
|
||||||
model.shipNum = res.result.shipNumId;
|
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 {
|
} else {
|
||||||
this.$message.warning(res.message);
|
this.$message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
@ -264,7 +282,7 @@ import { datasyncqueryPage,
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!err) {
|
if (!err) {
|
||||||
that.confirmLoading = true;
|
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) {
|
if (res.result) {
|
||||||
this.confirmLoading = false;
|
this.confirmLoading = false;
|
||||||
this.dataSource = res.result;
|
this.dataSource = res.result;
|
||||||
|
@ -350,7 +368,7 @@ import { datasyncqueryPage,
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!err) {
|
if (!err) {
|
||||||
that.confirmLoading = true;
|
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) {
|
if (res.result) {
|
||||||
this.testConnBool =true;
|
this.testConnBool =true;
|
||||||
this.getdatabaseList();
|
this.getdatabaseList();
|
||||||
|
@ -364,7 +382,7 @@ import { datasyncqueryPage,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getdatabaseList(){
|
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) {
|
if (res.success) {
|
||||||
this.selectDataBase = false;
|
this.selectDataBase = false;
|
||||||
this.databaseSource = res.result;
|
this.databaseSource = res.result;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user