Commit 0c362b64c2ab5bc2a86810543dc24ac7b0555930

Authored by xingyu
1 parent 9ab4165c

fix: 修复新增租户报错

yudao-ui-admin-vue3/src/api/system/tenant/types.ts
... ... @@ -4,6 +4,8 @@ export type TenantVO = {
4 4 packageId: number
5 5 contactName: string
6 6 contactMobile: string
  7 + username: string
  8 + password: string
7 9 accountCount: number
8 10 expireTime: string
9 11 domain: string
... ...
yudao-ui-admin-vue3/src/components/UserInfo/src/UserInfo.vue
... ... @@ -37,7 +37,7 @@ const loginOut = () => {
37 37 .then(async () => {
38 38 userStore.loginOut()
39 39 tagsViewStore.delAllViews
40   - replace('/login')
  40 + replace('/login?redirect=/index')
41 41 })
42 42 .catch(() => {})
43 43 }
... ...
yudao-ui-admin-vue3/src/views/system/tenant/index.vue
... ... @@ -199,7 +199,7 @@ onMounted(async () => {
199 199 ref="formRef"
200 200 >
201 201 <template #packageId>
202   - <el-select v-model="tenantPackageId" placeholder="Select">
  202 + <el-select v-model="tenantPackageId">
203 203 <el-option
204 204 v-for="item in tenantPackageOptions"
205 205 :key="item.id"
... ...
yudao-ui-admin-vue3/src/views/system/tenant/tenant.data.ts
... ... @@ -56,6 +56,29 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
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 82 label: '账号额度',
60 83 field: 'accountCount',
61 84 form: {
... ... @@ -71,7 +94,7 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
71 94 component: 'DatePicker',
72 95 componentProps: {
73 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) =&gt; {
112 112  
113 113 // 新增操作
114 114 const handleAdd = () => {
115   - setDialogTile('create')
116 115 // 重置表单
117 116 deptId.value = 0
118 117 unref(formRef)?.getElFormRef()?.resetFields()
  118 + setDialogTile('create')
119 119 }
120 120  
121 121 // 修改操作
122 122 const handleUpdate = async (row: UserVO) => {
123   - await setDialogTile('update')
124 123 // 设置数据
125 124 const res = await UserApi.getUserApi(row.id)
126 125 deptId.value = res.deptId
127 126 postIds.value = res.postIds
128 127 unref(formRef)?.setValues(res)
  128 + await setDialogTile('update')
129 129 }
130 130  
131 131 // 提交按钮
... ... @@ -281,9 +281,9 @@ const excelUploadError = (): void =&gt; {
281 281 }
282 282 // ========== 初始化 ==========
283 283 onMounted(async () => {
284   - await getTree()
285 284 await getPostOptions()
286 285 await getList()
  286 + await getTree()
287 287 })
288 288 </script>
289 289  
... ...