| | |
| | | <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 |
| | |
| | | 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' }) |
| | | |
| | |
| | | expireTime: undefined, |
| | | website: undefined, |
| | | status: CommonStatusEnum.ENABLE, |
| | | dataSourceConfigId: undefined, |
| | | // 新增专属 |
| | | username: undefined, |
| | | password: undefined |
| | |
| | | }) |
| | | const formRef = ref() // 表单 Ref |
| | | const packageList = ref([] as TenantPackageApi.TenantPackageVO[]) // 租户套餐 |
| | | const dataSourceList = ref([] as DataSourceConfigApi.DataSourceConfigVO[]) |
| | | |
| | | /** 打开弹窗 */ |
| | | const open = async (type: string, id?: number) => { |
| | |
| | | } |
| | | // 加载套餐列表 |
| | | packageList.value = await TenantPackageApi.getTenantPackageList() |
| | | |
| | | // 加载数据源列表 |
| | | dataSourceList.value = await DataSourceConfigApi.getDataSourceConfigList() |
| | | } |
| | | defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
| | | |