fix: 修复新增租户报错

This commit is contained in:
xingyu 2022-10-11 17:10:57 +08:00
parent 9ab4165c4e
commit 0c362b64c2
5 changed files with 31 additions and 6 deletions

View File

@ -4,6 +4,8 @@ export type TenantVO = {
packageId: number
contactName: string
contactMobile: string
username: string
password: string
accountCount: number
expireTime: string
domain: string

View File

@ -37,7 +37,7 @@ const loginOut = () => {
.then(async () => {
userStore.loginOut()
tagsViewStore.delAllViews
replace('/login')
replace('/login?redirect=/index')
})
.catch(() => {})
}

View File

@ -199,7 +199,7 @@ onMounted(async () => {
ref="formRef"
>
<template #packageId>
<el-select v-model="tenantPackageId" placeholder="Select">
<el-select v-model="tenantPackageId">
<el-option
v-for="item in tenantPackageOptions"
:key="item.id"

View File

@ -55,6 +55,29 @@ const crudSchemas = reactive<CrudSchema[]>([
show: true
}
},
{
label: '用户名称',
field: 'username',
table: {
show: false
},
detail: {
show: false
}
},
{
label: '用户密码',
field: 'password',
table: {
show: false
},
detail: {
show: false
},
form: {
component: 'InputPassword'
}
},
{
label: '账号额度',
field: 'accountCount',
@ -71,7 +94,7 @@ const crudSchemas = reactive<CrudSchema[]>([
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'YYYY-MM-DD HH:mm:ss'
valueFormat: 'x'
}
}
},

View File

@ -112,20 +112,20 @@ const setDialogTile = async (type: string) => {
//
const handleAdd = () => {
setDialogTile('create')
//
deptId.value = 0
unref(formRef)?.getElFormRef()?.resetFields()
setDialogTile('create')
}
//
const handleUpdate = async (row: UserVO) => {
await setDialogTile('update')
//
const res = await UserApi.getUserApi(row.id)
deptId.value = res.deptId
postIds.value = res.postIds
unref(formRef)?.setValues(res)
await setDialogTile('update')
}
//
@ -281,9 +281,9 @@ const excelUploadError = (): void => {
}
// ========== ==========
onMounted(async () => {
await getTree()
await getPostOptions()
await getList()
await getTree()
})
</script>