From effbd81dd598750429c05e88f5fb6789bec1bc0f Mon Sep 17 00:00:00 2001
From: houzhongjian <houzhongyi@126.com>
Date: 星期三, 16 十月 2024 09:57:01 +0800
Subject: [PATCH] 1、项目名增加plat 2、增加数据和模型的swagger接口api 3、增加应用列表及应用切换功能,暂时放home页 4、其它相关修改

---
 src/views/system/tenant/TenantForm.vue |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/views/system/tenant/TenantForm.vue b/src/views/system/tenant/TenantForm.vue
index 4d5fde5..34e5f69 100644
--- a/src/views/system/tenant/TenantForm.vue
+++ b/src/views/system/tenant/TenantForm.vue
@@ -57,6 +57,16 @@
       <el-form-item label="绑定域名" prop="website">
         <el-input v-model="formData.website" placeholder="请输入绑定域名" />
       </el-form-item>
+      <el-form-item label="数据源" prop="dataSourceConfigId">
+        <el-select v-model="formData.dataSourceConfigId" clearable placeholder="请选择数据源">
+          <el-option
+            v-for="item in dataSourceList"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item label="租户状态" prop="status">
         <el-radio-group v-model="formData.status">
           <el-radio
@@ -80,6 +90,7 @@
 import * as TenantApi from '@/api/system/tenant'
 import { CommonStatusEnum } from '@/utils/constants'
 import * as TenantPackageApi from '@/api/system/tenantPackage'
+import * as DataSourceConfigApi from "@/api/infra/dataSourceConfig";
 
 defineOptions({ name: 'SystemTenantForm' })
 
@@ -99,6 +110,7 @@
   expireTime: undefined,
   website: undefined,
   status: CommonStatusEnum.ENABLE,
+  dataSourceConfigId: undefined,
   // 新增专属
   username: undefined,
   password: undefined
@@ -116,6 +128,7 @@
 })
 const formRef = ref() // 表单 Ref
 const packageList = ref([] as TenantPackageApi.TenantPackageVO[]) // 租户套餐
+const dataSourceList = ref([] as DataSourceConfigApi.DataSourceConfigVO[])
 
 /** 打开弹窗 */
 const open = async (type: string, id?: number) => {
@@ -134,6 +147,9 @@
   }
   // 加载套餐列表
   packageList.value = await TenantPackageApi.getTenantPackageList()
+
+  // 加载数据源列表
+  dataSourceList.value = await DataSourceConfigApi.getDataSourceConfigList()
 }
 defineExpose({ open }) // 提供 open 方法,用于打开弹窗
 

--
Gitblit v1.9.3