Kaynağa Gözat

优化校验逻辑

韩帛霖 1 yıl önce
ebeveyn
işleme
27287433fe
1 değiştirilmiş dosya ile 12 ekleme ve 2 silme
  1. 12 2
      ruoyi-ui/src/views/system/tenant/index.vue

+ 12 - 2
ruoyi-ui/src/views/system/tenant/index.vue

@@ -165,7 +165,7 @@ import {getDataSourceInfo} from "@/api/system/data";
 
 export default {
   name: "Tenant",
-  dicts: ['datasource_type'],
+  dicts: ['datasource_type', 'sqlserver_connection_information', 'mysql_connection_information', 'dm_connection_information', 'orcale_connection_information'],
   data() {
     return {
       // 遮罩层
@@ -384,7 +384,17 @@ export default {
      */
     selecthandle(row) {
       console.log(row);
-      getDataSourceInfo({type: row}).then(res => {
+      let sql = {
+        sqlserver: 'sqlserver_connection_information',
+        mysql: 'mysql_connection_information',
+        dm: 'dm_connection_information',
+        orcale: 'orcale_connection_information'
+      }
+      let qar = {}
+      this.dict.type[sql[row]].forEach(item => {
+        qar[item.label] = item.value;
+      });
+      getDataSourceInfo(qar).then(res => {
         console.log(res);
       })
     }