🐛 修复 tenant 在 IDEA 报错的问题
This commit is contained in:
parent
a6deb69ddc
commit
fa421d0895
@ -38,5 +38,5 @@ export const deleteTenantPackage = (id: number) => {
|
|||||||
}
|
}
|
||||||
// 获取租户套餐精简信息列表
|
// 获取租户套餐精简信息列表
|
||||||
export const getTenantPackageList = () => {
|
export const getTenantPackageList = () => {
|
||||||
return request.get({ url: '/system/tenant-package/get-simple-list' })
|
return request.get({ url: '/system/tenant-package/simple-list' })
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
<el-radio-group v-model="formData.status">
|
<el-radio-group v-model="formData.status">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||||
:key="dict.value"
|
:key="dict.value as number"
|
||||||
:label="dict.value"
|
:label="dict.value"
|
||||||
>
|
>
|
||||||
{{ dict.label }}
|
{{ dict.label }}
|
||||||
@ -98,7 +98,10 @@ const formData = ref({
|
|||||||
accountCount: undefined,
|
accountCount: undefined,
|
||||||
expireTime: undefined,
|
expireTime: undefined,
|
||||||
website: undefined,
|
website: undefined,
|
||||||
status: CommonStatusEnum.ENABLE
|
status: CommonStatusEnum.ENABLE,
|
||||||
|
// 新增专属
|
||||||
|
username: undefined,
|
||||||
|
password: undefined
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
name: [{ required: true, message: '租户名不能为空', trigger: 'blur' }],
|
name: [{ required: true, message: '租户名不能为空', trigger: 'blur' }],
|
||||||
@ -112,7 +115,7 @@ const formRules = reactive({
|
|||||||
password: [{ required: true, message: '用户密码不能为空', trigger: 'blur' }]
|
password: [{ required: true, message: '用户密码不能为空', trigger: 'blur' }]
|
||||||
})
|
})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
const packageList = ref([]) // 租户套餐
|
const packageList = ref([] as TenantPackageApi.TenantPackageVO[]) // 租户套餐
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
@ -171,7 +174,9 @@ const resetForm = () => {
|
|||||||
accountCount: undefined,
|
accountCount: undefined,
|
||||||
expireTime: undefined,
|
expireTime: undefined,
|
||||||
website: undefined,
|
website: undefined,
|
||||||
status: CommonStatusEnum.ENABLE
|
status: CommonStatusEnum.ENABLE,
|
||||||
|
username: undefined,
|
||||||
|
password: undefined
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||||
:key="dict.value"
|
:key="dict.value as number"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
@ -198,7 +198,7 @@ const queryParams = reactive({
|
|||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
const packageList = ref([]) //租户套餐列表
|
const packageList = ref([] as TenantPackageApi.TenantPackageVO[]) //租户套餐列表
|
||||||
|
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
|
@ -44,8 +44,8 @@
|
|||||||
<el-radio-group v-model="formData.status">
|
<el-radio-group v-model="formData.status">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||||
:key="dict.value"
|
:key="dict.value as number"
|
||||||
:label="parseInt(dict.value)"
|
:label="dict.value"
|
||||||
>
|
>
|
||||||
{{ dict.label }}
|
{{ dict.label }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
@ -113,7 +113,7 @@ const open = async (type: string, id?: number) => {
|
|||||||
formData.value = res
|
formData.value = res
|
||||||
// 设置选中
|
// 设置选中
|
||||||
res.menuIds.forEach((menuId: number) => {
|
res.menuIds.forEach((menuId: number) => {
|
||||||
treeRef.value.setChecked(menuId, true, false)
|
treeRef.value!.setChecked(menuId, true, false)
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
@ -134,8 +134,8 @@ const submitForm = async () => {
|
|||||||
try {
|
try {
|
||||||
const data = formData.value as unknown as TenantPackageApi.TenantPackageVO
|
const data = formData.value as unknown as TenantPackageApi.TenantPackageVO
|
||||||
data.menuIds = [
|
data.menuIds = [
|
||||||
...(treeRef.value.getCheckedKeys(false) as unknown as Array<number>), // 获得当前选中节点
|
...(treeRef.value!.getCheckedKeys(false) as unknown as Array<number>), // 获得当前选中节点
|
||||||
...(treeRef.value.getHalfCheckedKeys() as unknown as Array<number>) // 获得半选中的父节点
|
...(treeRef.value!.getHalfCheckedKeys() as unknown as Array<number>) // 获得半选中的父节点
|
||||||
]
|
]
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
await TenantPackageApi.createTenantPackage(data)
|
await TenantPackageApi.createTenantPackage(data)
|
||||||
@ -171,7 +171,7 @@ const resetForm = () => {
|
|||||||
|
|
||||||
/** 全选/全不选 */
|
/** 全选/全不选 */
|
||||||
const handleCheckedTreeNodeAll = () => {
|
const handleCheckedTreeNodeAll = () => {
|
||||||
treeRef.value.setCheckedNodes(treeNodeAll.value ? menuOptions.value : [])
|
treeRef.value!.setCheckedNodes(treeNodeAll.value ? menuOptions.value : [])
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 展开/折叠全部 */
|
/** 展开/折叠全部 */
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable class="!w-240px">
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable class="!w-240px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||||
:key="dict.value"
|
:key="dict.value as number"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
@ -123,9 +123,9 @@ const list = ref([]) // 列表的数据
|
|||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
name: null,
|
name: undefined,
|
||||||
status: null,
|
status: undefined,
|
||||||
remark: null,
|
remark: undefined,
|
||||||
createTime: []
|
createTime: []
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
@ -134,7 +134,7 @@ const queryFormRef = ref() // 搜索的表单
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await TenantPackageApi.getTenantPackagePage(queryParams.value)
|
const data = await TenantPackageApi.getTenantPackagePage(queryParams)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
Reference in New Issue
Block a user