mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
feat:增加项目授权以及修改新建项目
This commit is contained in:
43
src/App.vue
43
src/App.vue
@@ -44,51 +44,28 @@ export default defineComponent({
|
||||
const currentRouteName = computed(() => route.name);
|
||||
|
||||
//获取组织树
|
||||
const orgTree = () => {
|
||||
const getOrgTree = () => {
|
||||
let obj = {
|
||||
id: 0,
|
||||
keyWord: "",
|
||||
pageNo: 0,
|
||||
id: -1,
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
};
|
||||
api
|
||||
.getOrgInfo(obj)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
// console.log("获取组织树成功", res.data.data);
|
||||
// state.orgtreeList = res.data.data;
|
||||
if (res.status === 200) {
|
||||
let arr = res.data.data.rows;
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
let object = {
|
||||
keyWord: "",
|
||||
id: arr[i].id,
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
};
|
||||
api
|
||||
.getOrgInfo(object)
|
||||
.then((res) => {
|
||||
// console.log("获取子元素", res);
|
||||
if (res.status === 200) {
|
||||
arr[i].treeChildList = res.data.data.rows;
|
||||
if (i === arr.length - 1) {
|
||||
store.commit("getOrgtreeList", arr);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取子元素失败", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
console.log("组织树获取成功", res);
|
||||
if (res.data.code === 200) {
|
||||
// state.treeData = res.data.data;
|
||||
store.commit("getOrgtreeList", res.data.data);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取组织树失败", err);
|
||||
console.log("组织树获取失败", err);
|
||||
});
|
||||
};
|
||||
orgTree();
|
||||
|
||||
getOrgTree();
|
||||
|
||||
return {
|
||||
routes,
|
||||
|
||||
Reference in New Issue
Block a user