|
@@ -478,6 +478,7 @@ export default {
|
|
},
|
|
},
|
|
// 表单重置
|
|
// 表单重置
|
|
reset1() {
|
|
reset1() {
|
|
|
|
+ this.dataSourceType = true;
|
|
this.dataSourceForm = {
|
|
this.dataSourceForm = {
|
|
id: null,
|
|
id: null,
|
|
databaseName: null,
|
|
databaseName: null,
|
|
@@ -486,9 +487,9 @@ export default {
|
|
username: null,
|
|
username: null,
|
|
password: null,
|
|
password: null,
|
|
portNumber: null,
|
|
portNumber: null,
|
|
- databaseType: null,
|
|
|
|
|
|
+ databaseType: "mysql",
|
|
};
|
|
};
|
|
- this.resetForm("dataSourceForm");
|
|
|
|
|
|
+ // this.resetForm("dataSourceForm");
|
|
},
|
|
},
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
handleQuery() {
|
|
@@ -528,6 +529,7 @@ export default {
|
|
this.dataSourceOpen = true;
|
|
this.dataSourceOpen = true;
|
|
this.dataSourceTitle = "配置数据库";
|
|
this.dataSourceTitle = "配置数据库";
|
|
this.fromTenantId = row.tenantId;
|
|
this.fromTenantId = row.tenantId;
|
|
|
|
+ this.dataSourceTypeChange();
|
|
|
|
|
|
// const tenantId = row.tenantId || this.ids;
|
|
// const tenantId = row.tenantId || this.ids;
|
|
// getTenant(tenantId).then((response) => {
|
|
// getTenant(tenantId).then((response) => {
|
|
@@ -559,7 +561,6 @@ export default {
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm1() {
|
|
submitForm1() {
|
|
this.$refs["dataSourceForm"].validate((valid) => {
|
|
this.$refs["dataSourceForm"].validate((valid) => {
|
|
- console.log(valid);
|
|
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.dataSourceForm.id != null) {
|
|
if (this.dataSourceForm.id != null) {
|
|
// bindDatasource(this.dataSourceForm).then((response) => {
|
|
// bindDatasource(this.dataSourceForm).then((response) => {
|
|
@@ -568,7 +569,6 @@ export default {
|
|
// this.getList();
|
|
// this.getList();
|
|
// });
|
|
// });
|
|
} else {
|
|
} else {
|
|
- console.log(this.fromTenantId);
|
|
|
|
let query = {
|
|
let query = {
|
|
tenantId: this.fromTenantId,
|
|
tenantId: this.fromTenantId,
|
|
dataSource: this.dataSourceForm,
|
|
dataSource: this.dataSourceForm,
|
|
@@ -610,7 +610,6 @@ export default {
|
|
* 选择数据源校验名称
|
|
* 选择数据源校验名称
|
|
*/
|
|
*/
|
|
selecthandle(row) {
|
|
selecthandle(row) {
|
|
- // console.log(row);
|
|
|
|
let sql = {
|
|
let sql = {
|
|
sqlserver: "sqlserver_connection_information",
|
|
sqlserver: "sqlserver_connection_information",
|
|
mysql: "mysql_connection_information",
|
|
mysql: "mysql_connection_information",
|