|
|
|
|
@ -1,11 +1,12 @@
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { computed, ref } from 'vue';
|
|
|
|
|
import { computed, h, ref } from 'vue';
|
|
|
|
|
import { useRouter } from 'vue-router';
|
|
|
|
|
|
|
|
|
|
import { useVbenDrawer } from '@vben/common-ui';
|
|
|
|
|
import { $t } from '@vben/locales';
|
|
|
|
|
import { cloneDeep } from '@vben/utils';
|
|
|
|
|
|
|
|
|
|
import { message, Skeleton } from 'ant-design-vue';
|
|
|
|
|
import { Button, message, Skeleton } from 'ant-design-vue';
|
|
|
|
|
|
|
|
|
|
import { useVbenForm } from '#/adapter/form';
|
|
|
|
|
import { tenantAdd, tenantInfo, tenantUpdate } from '#/api/system/tenant';
|
|
|
|
|
@ -35,13 +36,30 @@ const [BasicForm, formApi] = useVbenForm({
|
|
|
|
|
wrapperClass: 'grid-cols-2',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
async function setupPackageSelect() {
|
|
|
|
|
const tenantPackageList = await packageSelectList();
|
|
|
|
|
/**
|
|
|
|
|
* 检测是否存在租户套餐 你也不想表单填完了发现套餐为0无法选中吧
|
|
|
|
|
*/
|
|
|
|
|
if (tenantPackageList.length === 0) {
|
|
|
|
|
message.error('请先配置租户套餐');
|
|
|
|
|
const closeMessage = message.error(
|
|
|
|
|
h('span', {}, [
|
|
|
|
|
'请先配置租户套餐',
|
|
|
|
|
h(
|
|
|
|
|
Button,
|
|
|
|
|
{
|
|
|
|
|
onClick: () => {
|
|
|
|
|
router.push('/tenant/tenantPackage');
|
|
|
|
|
closeMessage();
|
|
|
|
|
},
|
|
|
|
|
type: 'link',
|
|
|
|
|
size: 'small',
|
|
|
|
|
},
|
|
|
|
|
'前往配置',
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
);
|
|
|
|
|
throw new Error('请先配置租户套餐');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|