From fa421d08955d4ba7a86070926daa35ed19eec591 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 2 Dec 2023 23:43:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=20tenant=20?= =?UTF-8?q?=E5=9C=A8=20IDEA=20=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/tenantPackage/index.ts | 2 +- src/views/system/tenant/TenantForm.vue | 13 +++++++++---- src/views/system/tenant/index.vue | 4 ++-- .../system/tenantPackage/TenantPackageForm.vue | 12 ++++++------ src/views/system/tenantPackage/index.vue | 10 +++++----- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/api/system/tenantPackage/index.ts b/src/api/system/tenantPackage/index.ts index 01d139e2..e01375a5 100644 --- a/src/api/system/tenantPackage/index.ts +++ b/src/api/system/tenantPackage/index.ts @@ -38,5 +38,5 @@ export const deleteTenantPackage = (id: number) => { } // 获取租户套餐精简信息列表 export const getTenantPackageList = () => { - return request.get({ url: '/system/tenant-package/get-simple-list' }) + return request.get({ url: '/system/tenant-package/simple-list' }) } diff --git a/src/views/system/tenant/TenantForm.vue b/src/views/system/tenant/TenantForm.vue index f6cdd075..de22b0ab 100644 --- a/src/views/system/tenant/TenantForm.vue +++ b/src/views/system/tenant/TenantForm.vue @@ -61,7 +61,7 @@ {{ dict.label }} @@ -98,7 +98,10 @@ const formData = ref({ accountCount: undefined, expireTime: undefined, website: undefined, - status: CommonStatusEnum.ENABLE + status: CommonStatusEnum.ENABLE, + // 新增专属 + username: undefined, + password: undefined }) const formRules = reactive({ name: [{ required: true, message: '租户名不能为空', trigger: 'blur' }], @@ -112,7 +115,7 @@ const formRules = reactive({ password: [{ required: true, message: '用户密码不能为空', trigger: 'blur' }] }) const formRef = ref() // 表单 Ref -const packageList = ref([]) // 租户套餐 +const packageList = ref([] as TenantPackageApi.TenantPackageVO[]) // 租户套餐 /** 打开弹窗 */ const open = async (type: string, id?: number) => { @@ -171,7 +174,9 @@ const resetForm = () => { accountCount: undefined, expireTime: undefined, website: undefined, - status: CommonStatusEnum.ENABLE + status: CommonStatusEnum.ENABLE, + username: undefined, + password: undefined } formRef.value?.resetFields() } diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index 703e01e4..06992610 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -46,7 +46,7 @@ > @@ -198,7 +198,7 @@ const queryParams = reactive({ }) const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 -const packageList = ref([]) //租户套餐列表 +const packageList = ref([] as TenantPackageApi.TenantPackageVO[]) //租户套餐列表 /** 查询列表 */ const getList = async () => { diff --git a/src/views/system/tenantPackage/TenantPackageForm.vue b/src/views/system/tenantPackage/TenantPackageForm.vue index fed51118..87d927d8 100644 --- a/src/views/system/tenantPackage/TenantPackageForm.vue +++ b/src/views/system/tenantPackage/TenantPackageForm.vue @@ -44,8 +44,8 @@ {{ dict.label }} @@ -113,7 +113,7 @@ const open = async (type: string, id?: number) => { formData.value = res // 设置选中 res.menuIds.forEach((menuId: number) => { - treeRef.value.setChecked(menuId, true, false) + treeRef.value!.setChecked(menuId, true, false) }) } finally { formLoading.value = false @@ -134,8 +134,8 @@ const submitForm = async () => { try { const data = formData.value as unknown as TenantPackageApi.TenantPackageVO data.menuIds = [ - ...(treeRef.value.getCheckedKeys(false) as unknown as Array), // 获得当前选中节点 - ...(treeRef.value.getHalfCheckedKeys() as unknown as Array) // 获得半选中的父节点 + ...(treeRef.value!.getCheckedKeys(false) as unknown as Array), // 获得当前选中节点 + ...(treeRef.value!.getHalfCheckedKeys() as unknown as Array) // 获得半选中的父节点 ] if (formType.value === 'create') { await TenantPackageApi.createTenantPackage(data) @@ -171,7 +171,7 @@ const resetForm = () => { /** 全选/全不选 */ const handleCheckedTreeNodeAll = () => { - treeRef.value.setCheckedNodes(treeNodeAll.value ? menuOptions.value : []) + treeRef.value!.setCheckedNodes(treeNodeAll.value ? menuOptions.value : []) } /** 展开/折叠全部 */ diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue index 99db8bc2..26eabeb0 100644 --- a/src/views/system/tenantPackage/index.vue +++ b/src/views/system/tenantPackage/index.vue @@ -23,7 +23,7 @@ @@ -123,9 +123,9 @@ const list = ref([]) // 列表的数据 const queryParams = reactive({ pageNo: 1, pageSize: 10, - name: null, - status: null, - remark: null, + name: undefined, + status: undefined, + remark: undefined, createTime: [] }) const queryFormRef = ref() // 搜索的表单 @@ -134,7 +134,7 @@ const queryFormRef = ref() // 搜索的表单 const getList = async () => { loading.value = true try { - const data = await TenantPackageApi.getTenantPackagePage(queryParams.value) + const data = await TenantPackageApi.getTenantPackagePage(queryParams) list.value = data.list total.value = data.total } finally {