|
@@ -224,6 +224,12 @@ async function clickSearch() {
|
|
}
|
|
}
|
|
|
|
|
|
watch(() => [pageNo, pageSize], fetchData);
|
|
watch(() => [pageNo, pageSize], fetchData);
|
|
|
|
+watch(
|
|
|
|
+ () => store.isSuperAdmin,
|
|
|
|
+ (val) => {
|
|
|
|
+ rootOrgId = val ? null : store.userInfo.rootOrgId;
|
|
|
|
+ }
|
|
|
|
+);
|
|
|
|
|
|
async function fetchData() {
|
|
async function fetchData() {
|
|
if (!rootOrgId) return;
|
|
if (!rootOrgId) return;
|
|
@@ -330,10 +336,11 @@ const initUser = <User>(<unknown>{
|
|
role: "",
|
|
role: "",
|
|
rootOrgId: store.isSuperAdmin ? null : store.userInfo.rootOrgId,
|
|
rootOrgId: store.isSuperAdmin ? null : store.userInfo.rootOrgId,
|
|
});
|
|
});
|
|
-const userObj = reactive({ ...initUser });
|
|
|
|
|
|
+let userObj = reactive({ ...initUser });
|
|
|
|
|
|
const newUser = () => {
|
|
const newUser = () => {
|
|
Object.assign(userObj, initUser);
|
|
Object.assign(userObj, initUser);
|
|
|
|
+ userObj.rootOrgId = rootOrgId as number;
|
|
showModal(userObj);
|
|
showModal(userObj);
|
|
};
|
|
};
|
|
|
|
|