mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 10:18:42 +08:00 
			
		
		
		
	fix: 修复新增租户报错
This commit is contained in:
		| @@ -4,6 +4,8 @@ export type TenantVO = { | |||||||
|   packageId: number |   packageId: number | ||||||
|   contactName: string |   contactName: string | ||||||
|   contactMobile: string |   contactMobile: string | ||||||
|  |   username: string | ||||||
|  |   password: string | ||||||
|   accountCount: number |   accountCount: number | ||||||
|   expireTime: string |   expireTime: string | ||||||
|   domain: string |   domain: string | ||||||
|   | |||||||
| @@ -37,7 +37,7 @@ const loginOut = () => { | |||||||
|     .then(async () => { |     .then(async () => { | ||||||
|       userStore.loginOut() |       userStore.loginOut() | ||||||
|       tagsViewStore.delAllViews |       tagsViewStore.delAllViews | ||||||
|       replace('/login') |       replace('/login?redirect=/index') | ||||||
|     }) |     }) | ||||||
|     .catch(() => {}) |     .catch(() => {}) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -199,7 +199,7 @@ onMounted(async () => { | |||||||
|       ref="formRef" |       ref="formRef" | ||||||
|     > |     > | ||||||
|       <template #packageId> |       <template #packageId> | ||||||
|         <el-select v-model="tenantPackageId" placeholder="Select"> |         <el-select v-model="tenantPackageId"> | ||||||
|           <el-option |           <el-option | ||||||
|             v-for="item in tenantPackageOptions" |             v-for="item in tenantPackageOptions" | ||||||
|             :key="item.id" |             :key="item.id" | ||||||
|   | |||||||
| @@ -55,6 +55,29 @@ const crudSchemas = reactive<CrudSchema[]>([ | |||||||
|       show: true |       show: true | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|  |   { | ||||||
|  |     label: '用户名称', | ||||||
|  |     field: 'username', | ||||||
|  |     table: { | ||||||
|  |       show: false | ||||||
|  |     }, | ||||||
|  |     detail: { | ||||||
|  |       show: false | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   { | ||||||
|  |     label: '用户密码', | ||||||
|  |     field: 'password', | ||||||
|  |     table: { | ||||||
|  |       show: false | ||||||
|  |     }, | ||||||
|  |     detail: { | ||||||
|  |       show: false | ||||||
|  |     }, | ||||||
|  |     form: { | ||||||
|  |       component: 'InputPassword' | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|   { |   { | ||||||
|     label: '账号额度', |     label: '账号额度', | ||||||
|     field: 'accountCount', |     field: 'accountCount', | ||||||
| @@ -71,7 +94,7 @@ const crudSchemas = reactive<CrudSchema[]>([ | |||||||
|       component: 'DatePicker', |       component: 'DatePicker', | ||||||
|       componentProps: { |       componentProps: { | ||||||
|         type: 'datetime', |         type: 'datetime', | ||||||
|         valueFormat: 'YYYY-MM-DD HH:mm:ss' |         valueFormat: 'x' | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   | |||||||
| @@ -112,20 +112,20 @@ const setDialogTile = async (type: string) => { | |||||||
|  |  | ||||||
| // 新增操作 | // 新增操作 | ||||||
| const handleAdd = () => { | const handleAdd = () => { | ||||||
|   setDialogTile('create') |  | ||||||
|   // 重置表单 |   // 重置表单 | ||||||
|   deptId.value = 0 |   deptId.value = 0 | ||||||
|   unref(formRef)?.getElFormRef()?.resetFields() |   unref(formRef)?.getElFormRef()?.resetFields() | ||||||
|  |   setDialogTile('create') | ||||||
| } | } | ||||||
|  |  | ||||||
| // 修改操作 | // 修改操作 | ||||||
| const handleUpdate = async (row: UserVO) => { | const handleUpdate = async (row: UserVO) => { | ||||||
|   await setDialogTile('update') |  | ||||||
|   // 设置数据 |   // 设置数据 | ||||||
|   const res = await UserApi.getUserApi(row.id) |   const res = await UserApi.getUserApi(row.id) | ||||||
|   deptId.value = res.deptId |   deptId.value = res.deptId | ||||||
|   postIds.value = res.postIds |   postIds.value = res.postIds | ||||||
|   unref(formRef)?.setValues(res) |   unref(formRef)?.setValues(res) | ||||||
|  |   await setDialogTile('update') | ||||||
| } | } | ||||||
|  |  | ||||||
| // 提交按钮 | // 提交按钮 | ||||||
| @@ -281,9 +281,9 @@ const excelUploadError = (): void => { | |||||||
| } | } | ||||||
| // ========== 初始化 ========== | // ========== 初始化 ========== | ||||||
| onMounted(async () => { | onMounted(async () => { | ||||||
|   await getTree() |  | ||||||
|   await getPostOptions() |   await getPostOptions() | ||||||
|   await getList() |   await getList() | ||||||
|  |   await getTree() | ||||||
| }) | }) | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 xingyu
					xingyu