zhouwenxuan
2024-01-22 9cd375c82cf24394ed94180149bba732a0e90446
src/views/safetyReview/projectManage/process.vue
@@ -228,6 +228,7 @@
const middleContentHeight = ref(0)
const projectId = ref()
const projectStatus = ref()
const toPath = ref();
onMounted(() => {
  middleHeight.value = window.innerHeight - 250;
  middleContentHeight.value = window.innerHeight - 385;
@@ -239,6 +240,7 @@
  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;
@@ -258,6 +260,10 @@
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){
@@ -285,6 +291,7 @@
      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
@@ -307,6 +314,7 @@
      menuList.value[0].status = 2;
      menuList.value[1].status = 1;
      console.log("menu22",menuList.value)
    }
    if(res.data >= 6 && res.data <= 9){
      setMenuList(0);
@@ -374,6 +382,8 @@
      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
@@ -401,9 +411,22 @@
          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)
  }