From c206ab5b4a38f99bec4ee34d7b01bbabc83fa120 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期三, 19 六月 2024 14:29:44 +0800 Subject: [PATCH] update 优化 三方登录不同域名问题 采用新方案 --- src/views/system/user/index.vue | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 1e15998..c1bdcf9 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -158,6 +158,7 @@ value-key="id" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" check-strictly + @change="handleDeptChange" /> </el-form-item> </el-col> @@ -287,10 +288,11 @@ import { UserForm, UserQuery, UserVO } from '@/api/system/user/types'; import { DeptVO } from '@/api/system/dept/types'; import { RoleVO } from '@/api/system/role/types'; -import { PostVO } from '@/api/system/post/types'; +import { PostQuery, PostVO } from '@/api/system/post/types'; import { treeselect } from '@/api/system/dept'; import { globalHeaders } from '@/utils/request'; import { to } from 'await-to-js'; +import { optionselect } from '@/api/system/post'; const router = useRouter(); const { proxy } = getCurrentInstance() as ComponentInternalInstance; @@ -592,6 +594,7 @@ roleOptions.value = data.roles; form.value.password = initPassword.value.toString(); }; + /** 淇敼鎸夐挳鎿嶄綔 */ const handleUpdate = async (row?: UserForm) => { reset(); @@ -645,6 +648,12 @@ initPassword.value = response.data; }); }); + +async function handleDeptChange(value: number | string) { + const response = await optionselect(value); + postOptions.value = response.data; + form.value.postIds = []; +} </script> <style lang="scss" scoped></style> -- Gitblit v1.9.3