Преглед изворни кода

fix:租户绑定数据源数据初始化

lph пре 1 година
родитељ
комит
50af1f72cc
1 измењених фајлова са 4 додато и 5 уклоњено
  1. 4 5
      ruoyi-ui/src/views/system/tenant/index.vue

+ 4 - 5
ruoyi-ui/src/views/system/tenant/index.vue

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