| | |
| | | const middleContentHeight = ref(0) |
| | | const projectId = ref() |
| | | const projectStatus = ref() |
| | | const toPath = ref(); |
| | | onMounted(() => { |
| | | middleHeight.value = window.innerHeight - 250; |
| | | middleContentHeight.value = window.innerHeight - 385; |
| | |
| | | if(route.query.type !== 'add'){ |
| | | projectStatus.value = route.query.type; |
| | | projectId.value = route.query.id; |
| | | toPath.value = route.query.toPath; |
| | | getStatus(projectId.value); |
| | | }else { |
| | | projectStatus.value = route.query.type; |
| | |
| | | const getStatus = async (projectId) => { |
| | | const res = await getProjectStatus(projectId); |
| | | if(res.code == 200){ |
| | | let fiveObj = {} |
| | | if(toPath.value && toPath.value === 'toFive' ){ |
| | | fiveObj = menuList.value[1].subMenus[0] |
| | | } |
| | | if(res.data <= 4 ){ |
| | | menuList.value[0].subMenus.forEach(item => { |
| | | if(item.id <= res.data){ |
| | |
| | | if(res.data === 4){ |
| | | menuList.value[0].subMenus[3].status = 3; |
| | | } |
| | | |
| | | menuList.value[1].subMenus.forEach(item => { |
| | | if(item.id <= res.data) { |
| | | item.status = 2 |
| | |
| | | menuList.value[0].status = 2; |
| | | menuList.value[1].status = 1; |
| | | console.log("menu22",menuList.value) |
| | | |
| | | } |
| | | if(res.data >= 6 && res.data <= 9){ |
| | | setMenuList(0); |
| | |
| | | if(res.data === 11){ |
| | | menuList.value[3].subMenus[1].status = 3; |
| | | } |
| | | let twelveObj = {}; |
| | | let thirteenObj = {}; |
| | | menuList.value[4].subMenus.forEach(item => { |
| | | if(item.id <= res.data) { |
| | | item.status = 2 |
| | |
| | | menuList.value[4].status = 2; |
| | | selectedObj.value =item; |
| | | } |
| | | if(toPath.value && toPath.value === 'toTwelve' && item.id === 12){ |
| | | twelveObj = item; |
| | | }else if(toPath.value && toPath.value === 'toThirteen' && item.id === 13){ |
| | | thirteenObj = item; |
| | | } |
| | | }) |
| | | |
| | | if(toPath.value && toPath.value === 'toTwelve' && twelveObj){ |
| | | chooseSubMenu(twelveObj,true) |
| | | }else if(toPath.value && toPath.value === 'toThirteen' && thirteenObj){ |
| | | chooseSubMenu(thirteenObj,true) |
| | | } |
| | | } |
| | | if(toPath.value && toPath.value === 'toFive' && fiveObj){ |
| | | chooseSubMenu(fiveObj,true) |
| | | } |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |