Commit 0c362b64c2ab5bc2a86810543dc24ac7b0555930
1 parent
9ab4165c
fix: 修复新增租户报错
Showing
5 changed files
with
31 additions
and
6 deletions
yudao-ui-admin-vue3/src/api/system/tenant/types.ts
| @@ -4,6 +4,8 @@ export type TenantVO = { | @@ -4,6 +4,8 @@ export type TenantVO = { | ||
| 4 | packageId: number | 4 | packageId: number |
| 5 | contactName: string | 5 | contactName: string |
| 6 | contactMobile: string | 6 | contactMobile: string |
| 7 | + username: string | ||
| 8 | + password: string | ||
| 7 | accountCount: number | 9 | accountCount: number |
| 8 | expireTime: string | 10 | expireTime: string |
| 9 | domain: string | 11 | domain: string |
yudao-ui-admin-vue3/src/components/UserInfo/src/UserInfo.vue
| @@ -37,7 +37,7 @@ const loginOut = () => { | @@ -37,7 +37,7 @@ const loginOut = () => { | ||
| 37 | .then(async () => { | 37 | .then(async () => { |
| 38 | userStore.loginOut() | 38 | userStore.loginOut() |
| 39 | tagsViewStore.delAllViews | 39 | tagsViewStore.delAllViews |
| 40 | - replace('/login') | 40 | + replace('/login?redirect=/index') |
| 41 | }) | 41 | }) |
| 42 | .catch(() => {}) | 42 | .catch(() => {}) |
| 43 | } | 43 | } |
yudao-ui-admin-vue3/src/views/system/tenant/index.vue
| @@ -199,7 +199,7 @@ onMounted(async () => { | @@ -199,7 +199,7 @@ onMounted(async () => { | ||
| 199 | ref="formRef" | 199 | ref="formRef" |
| 200 | > | 200 | > |
| 201 | <template #packageId> | 201 | <template #packageId> |
| 202 | - <el-select v-model="tenantPackageId" placeholder="Select"> | 202 | + <el-select v-model="tenantPackageId"> |
| 203 | <el-option | 203 | <el-option |
| 204 | v-for="item in tenantPackageOptions" | 204 | v-for="item in tenantPackageOptions" |
| 205 | :key="item.id" | 205 | :key="item.id" |
yudao-ui-admin-vue3/src/views/system/tenant/tenant.data.ts
| @@ -56,6 +56,29 @@ const crudSchemas = reactive<CrudSchema[]>([ | @@ -56,6 +56,29 @@ const crudSchemas = reactive<CrudSchema[]>([ | ||
| 56 | } | 56 | } |
| 57 | }, | 57 | }, |
| 58 | { | 58 | { |
| 59 | + label: '用户名称', | ||
| 60 | + field: 'username', | ||
| 61 | + table: { | ||
| 62 | + show: false | ||
| 63 | + }, | ||
| 64 | + detail: { | ||
| 65 | + show: false | ||
| 66 | + } | ||
| 67 | + }, | ||
| 68 | + { | ||
| 69 | + label: '用户密码', | ||
| 70 | + field: 'password', | ||
| 71 | + table: { | ||
| 72 | + show: false | ||
| 73 | + }, | ||
| 74 | + detail: { | ||
| 75 | + show: false | ||
| 76 | + }, | ||
| 77 | + form: { | ||
| 78 | + component: 'InputPassword' | ||
| 79 | + } | ||
| 80 | + }, | ||
| 81 | + { | ||
| 59 | label: '账号额度', | 82 | label: '账号额度', |
| 60 | field: 'accountCount', | 83 | field: 'accountCount', |
| 61 | form: { | 84 | form: { |
| @@ -71,7 +94,7 @@ const crudSchemas = reactive<CrudSchema[]>([ | @@ -71,7 +94,7 @@ const crudSchemas = reactive<CrudSchema[]>([ | ||
| 71 | component: 'DatePicker', | 94 | component: 'DatePicker', |
| 72 | componentProps: { | 95 | componentProps: { |
| 73 | type: 'datetime', | 96 | type: 'datetime', |
| 74 | - valueFormat: 'YYYY-MM-DD HH:mm:ss' | 97 | + valueFormat: 'x' |
| 75 | } | 98 | } |
| 76 | } | 99 | } |
| 77 | }, | 100 | }, |
yudao-ui-admin-vue3/src/views/system/user/index.vue
| @@ -112,20 +112,20 @@ const setDialogTile = async (type: string) => { | @@ -112,20 +112,20 @@ const setDialogTile = async (type: string) => { | ||
| 112 | 112 | ||
| 113 | // 新增操作 | 113 | // 新增操作 |
| 114 | const handleAdd = () => { | 114 | const handleAdd = () => { |
| 115 | - setDialogTile('create') | ||
| 116 | // 重置表单 | 115 | // 重置表单 |
| 117 | deptId.value = 0 | 116 | deptId.value = 0 |
| 118 | unref(formRef)?.getElFormRef()?.resetFields() | 117 | unref(formRef)?.getElFormRef()?.resetFields() |
| 118 | + setDialogTile('create') | ||
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | // 修改操作 | 121 | // 修改操作 |
| 122 | const handleUpdate = async (row: UserVO) => { | 122 | const handleUpdate = async (row: UserVO) => { |
| 123 | - await setDialogTile('update') | ||
| 124 | // 设置数据 | 123 | // 设置数据 |
| 125 | const res = await UserApi.getUserApi(row.id) | 124 | const res = await UserApi.getUserApi(row.id) |
| 126 | deptId.value = res.deptId | 125 | deptId.value = res.deptId |
| 127 | postIds.value = res.postIds | 126 | postIds.value = res.postIds |
| 128 | unref(formRef)?.setValues(res) | 127 | unref(formRef)?.setValues(res) |
| 128 | + await setDialogTile('update') | ||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | // 提交按钮 | 131 | // 提交按钮 |
| @@ -281,9 +281,9 @@ const excelUploadError = (): void => { | @@ -281,9 +281,9 @@ const excelUploadError = (): void => { | ||
| 281 | } | 281 | } |
| 282 | // ========== 初始化 ========== | 282 | // ========== 初始化 ========== |
| 283 | onMounted(async () => { | 283 | onMounted(async () => { |
| 284 | - await getTree() | ||
| 285 | await getPostOptions() | 284 | await getPostOptions() |
| 286 | await getList() | 285 | await getList() |
| 286 | + await getTree() | ||
| 287 | }) | 287 | }) |
| 288 | </script> | 288 | </script> |
| 289 | 289 |