feat:增加项目授权以及修改新建项目

This commit is contained in:
lixg
2022-11-28 22:47:30 +08:00
parent 032df5bb71
commit 33e9e1bb93
16 changed files with 1135 additions and 665 deletions

View File

@@ -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,