组织选择修改

This commit is contained in:
weixiaobo@boe.com.cn
2023-08-22 19:03:42 +08:00
parent ab12f070d6
commit 3df0281430
6 changed files with 21 additions and 18 deletions

View File

@@ -159,9 +159,9 @@ export default {
// let roleList = store.state.userInfo.roleList; // let roleList = store.state.userInfo.roleList;
const res = await api.userGetUserOrg(); const res = await api.userGetUserOrg();
if (res) { if (res) {
state.option = res.data?.result; state.option = res.data?.result.orgTreeList;
state.orgId = [state.option[0]?.organizationId]; state.orgId = res.data?.result.treeNodeList;
state.resetOrgId = [state.option[0]?.organizationId]; state.resetOrgId = res.data?.result.treeNodeList;
state.allowClear = true; state.allowClear = true;
getTableData(); getTableData();
} }

View File

@@ -187,9 +187,9 @@ export default {
} }
const res = await api.userGetUserOrg(params); const res = await api.userGetUserOrg(params);
if (res) { if (res) {
state.option = res.data?.result; state.option = res.data?.result.orgTreeList;
state.orgId = [state.option[0]?.organizationId]; state.orgId = res.data?.result.treeNodeList;
state.resetOrgId = [state.option[0]?.organizationId]; state.resetOrgId = res.data?.result.treeNodeList;
state.allowClear = true state.allowClear = true
getTableData(); getTableData();
} }

View File

@@ -218,9 +218,9 @@ export default {
const getOrgList = async () => { const getOrgList = async () => {
const res = await api.userGetUserOrg({}); const res = await api.userGetUserOrg({});
if (res) { if (res) {
state.option = res.data?.result; state.option = res.data?.result.orgTreeList;
state.orgId = [state.option[0]?.organizationId]; state.orgId = res.data?.result.treeNodeList;
state.resetOrgId = [state.option[0]?.organizationId]; state.resetOrgId = res.data?.result.treeNodeList;
res.data?.result?.userType === 1 res.data?.result?.userType === 1
? (state.allowClear = true) ? (state.allowClear = true)
: (state.allowClear = false); : (state.allowClear = false);

View File

@@ -188,9 +188,12 @@ export default {
// let roleList = store.state.userInfo.roleList; // let roleList = store.state.userInfo.roleList;
const res = await api.userGetUserOrg(); const res = await api.userGetUserOrg();
if (res) { if (res) {
state.option = res.data?.result; // state.option = res.data?.result;
state.orgId = [state.option[0]?.organizationId]; // state.orgId = [state.option[0]?.organizationId];
state.resetOrgId = [state.option[0]?.organizationId]; // state.resetOrgId = [state.option[0]?.organizationId];
state.option = res.data?.result.orgTreeList;
state.orgId = res.data?.result.treeNodeList;
state.resetOrgId = res.data?.result.treeNodeList;
state.allowClear = true; state.allowClear = true;
getTableData(); getTableData();
} }

View File

@@ -184,9 +184,9 @@ export default {
const getOrgList = async () => { const getOrgList = async () => {
const res = await api.userGetUserOrg({}); const res = await api.userGetUserOrg({});
if (res) { if (res) {
state.option = res.data?.result; state.option = res.data?.result.orgTreeList;
state.orgId = [state.option[0]?.organizationId]; state.orgId = res.data?.result.treeNodeList;
state.resetOrgId = [state.option[0]?.organizationId]; state.resetOrgId = res.data?.result.treeNodeList;
res.data?.result?.userType === 1 res.data?.result?.userType === 1
? (state.allowClear = true) ? (state.allowClear = true)
: (state.allowClear = false); : (state.allowClear = false);

View File

@@ -315,9 +315,9 @@ export default {
} }
const res = await api.userGetUserOrg(params); const res = await api.userGetUserOrg(params);
if (res) { if (res) {
state.option = res.data?.result; state.option = res.data?.result.orgTreeList;
state.orgId = [state.option[0]?.organizationId]; state.orgId = res.data?.result.treeNodeList;
state.resetOrgId = [state.option[0]?.organizationId]; state.resetOrgId = res.data?.result.treeNodeList;
state.allowClear = true state.allowClear = true
getTableData(); getTableData();
} }