mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-08 18:36:46 +08:00
Merge remote-tracking branch 'yx/250605-added-yzt'
This commit is contained in:
@@ -234,13 +234,19 @@ export default {
|
|||||||
//请求组织接口
|
//请求组织接口
|
||||||
const getOrgList = async () => {
|
const getOrgList = async () => {
|
||||||
var manageFlag = false;
|
var manageFlag = false;
|
||||||
for(let i=0;i<store.state.userInfo.roleList.length;i++){
|
if (store.state.userInfo != null && store.state.userInfo.roleList != null) {
|
||||||
if(store.state.userInfo.roleList[i].roleCode=="system-admin"){
|
for(let i=0;i<store.state.userInfo.roleList.length;i++){
|
||||||
manageFlag = true;
|
if(store.state.userInfo.roleList[i].roleCode=="system-admin"){
|
||||||
break;
|
manageFlag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await api.userGetUserOrg({});
|
const res = await api.userGetUserOrg({});
|
||||||
|
if (res != null && res.data != null && res.data.result != null && res.data.result.orgTreeList != null) {
|
||||||
|
orgArray = flattenOrgTree(res.data.result.orgTreeList);
|
||||||
|
}
|
||||||
if (res) {
|
if (res) {
|
||||||
if(manageFlag){
|
if(manageFlag){
|
||||||
state.option = [{
|
state.option = [{
|
||||||
@@ -268,6 +274,25 @@ export default {
|
|||||||
getTableData();
|
getTableData();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function flattenOrgTree(orgTree) {
|
||||||
|
const result = [];
|
||||||
|
|
||||||
|
function traverse(node) {
|
||||||
|
if (node.organizationId && node.orgName) {
|
||||||
|
result.push({
|
||||||
|
organizationId: node.organizationId,
|
||||||
|
orgName: node.orgName
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (node.childList && node.childList.length > 0) {
|
||||||
|
node.childList.forEach(child => traverse(child));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
orgTree.forEach(node => traverse(node));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
//导出
|
//导出
|
||||||
const exportbtnz = async () => {
|
const exportbtnz = async () => {
|
||||||
if (!state.selectedRowKeys?.length) {
|
if (!state.selectedRowKeys?.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user