zhouwenxuan
2024-01-22 9cd375c82cf24394ed94180149bba732a0e90446
项目跳转
已修改4个文件
151 ■■■■ 文件已修改
src/api/projectManage/project.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/safetyReview/projectManage/index.vue 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/safetyReview/projectManage/process.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/safetyReview/userManage/expertUsers/components/projectDialog.vue 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/projectManage/project.js
@@ -17,10 +17,11 @@
    })
}
export function getProjectStatistics() {
export function getProjectStatistics(params) {
    return request({
        url: '/manage/project/statistics',
        method: 'get'
        method: 'get',
        params: params
    })
}
src/views/safetyReview/projectManage/index.vue
@@ -97,18 +97,33 @@
          </div>
        </template>
      </el-table-column>
      <el-table-column label="项目实施天数" prop="" align="center"  width="150"/>
      <el-table-column label="项目变更" prop="" align="center"  width="120"/>
      <el-table-column label="预估金额(万元)" prop="" align="center"  width="130"/>
      <el-table-column label="归档金额(万元)" prop="" align="center"  width="130"/>
      <el-table-column label="缺失要件"  align="center"  width="150">
      <el-table-column label="项目实施天数" prop="filingDate" align="center"  width="150"/>
      <el-table-column label="项目变更" prop="" align="center"  width="120">
        <template #default="scope">
          <div style="cursor:pointer;color: #3b82f6;" >
            <span>{{scope.row.materialCnt}}</span>
            <span v-if="scope.row.process !== 1" @click="goMenu('toFive',scope.row)">{{}}</span>
            <span v-else></span>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="归档确认" prop="" align="center"  width="150"/>
      <el-table-column label="预估金额(万元)" prop="contractMoney" align="center"  width="130"/>
      <el-table-column label="归档金额(万元)" prop="actualContractMoney" align="center"  width="130"/>
      <el-table-column label="缺失要件"  align="center"  width="150">
        <template #default="scope">
          <div style="cursor:pointer;color: #3b82f6;" >
            <span v-if="scope.row.process === 5" @click="goMenu('toTwelve',scope.row)">{{scope.row.materialCnt}}</span>
            <span v-else></span>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="归档确认" prop="" align="center"  width="150">
        <template #default="scope">
          <div style="cursor:pointer;color: #3b82f6;" >
            <span v-if="scope.row.process === 5" @click="goMenu('toThirteen',scope.row)">{{}}</span>
            <span v-else></span>
          </div>
        </template>
      </el-table-column>
      <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="180">
        <template #default="scope">
          <el-button link type="primary" @click="toProcess('view',scope.row)">查看</el-button>
@@ -181,7 +196,7 @@
            </el-select>
          </el-form-item>
          <el-form-item  label="缺失要件">
            <el-select v-model="search.queryParams.miss" class="m-2" size="large" placeholder="请选择" style="width: 100%" >
            <el-select v-model="search.queryParams.params.lostMaterial" class="m-2" size="large" placeholder="请选择" style="width: 100%" >
              <el-option
                  v-for="item in missingList"
                  :key="item.id"
@@ -239,6 +254,7 @@
    estimateType: '',
    params:{
      projectPhase: '',
      lostMaterial: null
    }
  },
  num: {
@@ -257,13 +273,13 @@
const estimateTypeList = ref([]);
const missingList = ref([
  {
    id: 0,
    label: '否'
  },
  {
    id: 1,
    label: '是'
  },
  {
    id: 0,
    label: '否'
  }
])
const tableRef  = ref(null);
const tableHeight = ref(0);
@@ -299,10 +315,12 @@
        ...item,
        process: item.reportProgress <= 4 ? 1 : item.reportProgress > 4 && item.reportProgress <= 6 ? 2 : item.reportProgress > 6 && item.reportProgress <= 9 ? 3 : item.reportProgress > 9 && item.reportProgress <= 11 ? 4 : 5,
        leaderName: item.leader ? item.leader.name : '',
        area: item.district ? item.province + '/' + item.city + '/' + item.district : item.city?item.province + '/' + item.city:item.province  ,
        area: item.district ? item.province + '/' + item.city + '/' + item.district : item.city?item.province + '/' + item.city:item.province ,
        filingDate: item.filingDate ? item.filingDate : conversionDays(item.createTime),
        contractMoney: item.contract ? item.contract.contractMoney : '',
        actualContractMoney: item.contract ? item.contract.actualContractMoney : ''
      }
    })
    console.log('data',dataList.value)
    total.value = res.data.total
    loading.value = false;
  }else{
@@ -310,9 +328,11 @@
  }
}
const getStatistics = async () => {
  const res = await getProjectStatistics();
  const {pageNum,pageSize, ...data} = JSON.parse(JSON.stringify(search.queryParams))
  console.log("data",data)
  const res = await getProjectStatistics(data);
  if(res.code == 200){
   console.log("res",res)
   console.log("res统计",res)
    search.num = res.data
  }else{
@@ -328,9 +348,9 @@
  search.queryParams.pageNum = val
  getList()
}
const toProcess = (type,value) => {
const toProcess = (type,value,toPath) => {
  value.type = type;
  router.push({ path: '/process', query: {id: value.id, type: type}});
  router.push({ path: '/process', query: {id: value.id, type: type, toPath: toPath}});
}
const getArea = async ()=>{
@@ -415,6 +435,10 @@
  getStatistics();
  showDrawer.value = false;
}
const conversionDays = (createTime) => {
  let day = Date.now() - new Date(createTime).getTime();//日期转时间戳
  return Math.floor(day / 86400000) ;//时间戳获取天数
}
const handleChange = (value) => {
  // if(state.registerForm.agency.attribute == 0){
  //   state.registerForm.agency.province = '新疆维吾尔自治区'
@@ -450,13 +474,18 @@
      }
    }
  },
  '项目实施天数': '',
  '项目实施天数': 'filingDate',
  '项目变更': '',
  '预估金额(万元)': '',
  '归档金额(万元)': '',
  '预估金额(万元)': 'contractMoney',
  '归档金额(万元)': 'actualContractMoney',
  '缺失要件': 'materialCnt',
  '归档确认': ''
});
const goMenu = (toPath,val) => {
  console.log("val",val)
  toProcess('edit',val,toPath);
}
</script>
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)
  }
src/views/safetyReview/userManage/expertUsers/components/projectDialog.vue
@@ -13,7 +13,7 @@
        <el-table-column label="委托单位" prop="client" align="center"  :show-overflow-tooltip="true" width="180"/>
        <el-table-column label="所属地市" prop="updateTime" align="center"  width="250">
          <template #default="scope">
            {{scope.row.province}}/{{scope.row.city}}
            {{scope.row.area}}
          </template>
        </el-table-column>
        <el-table-column label="评价类型" prop="estimateTypeName" align="center"  width="150"/>
@@ -38,18 +38,33 @@
            </div>
          </template>
        </el-table-column>
        <el-table-column label="项目实施天数" prop="" align="center"  width="150"/>
        <el-table-column label="项目变更" prop="" align="center"  width="120"/>
        <el-table-column label="预估金额(万元)" prop="" align="center"  width="130"/>
        <el-table-column label="归档金额(万元)" prop="" align="center"  width="130"/>
        <el-table-column label="缺失要件" prop="" align="center"  width="150">
        <el-table-column label="项目实施天数" prop="filingDate" align="center"  width="150"/>
        <el-table-column label="项目变更" prop="" align="center"  width="120">
          <template #default="scope">
            <div style="cursor:pointer;color: #3b82f6;" >
              <span>{{scope.row.materialCnt}}</span>
              <span v-if="scope.row.process !== 1" @click="goMenu('toFive',scope.row)">{{}}</span>
              <span v-else></span>
            </div>
          </template>
        </el-table-column>
        <el-table-column label="归档确认" prop="" align="center"  width="150"/>
        <el-table-column label="预估金额(万元)" prop="contractMoney" align="center"  width="130"/>
        <el-table-column label="归档金额(万元)" prop="actualContractMoney" align="center"  width="130"/>
        <el-table-column label="缺失要件" prop="" align="center"  width="150">
          <template #default="scope">
            <div style="cursor:pointer;color: #3b82f6;" >
              <span v-if="scope.row.process === 5" @click="goMenu('toTwelve',scope.row)">{{scope.row.materialCnt}}</span>
              <span v-else></span>
            </div>
          </template>
        </el-table-column>
        <el-table-column label="归档确认" prop="" align="center"  width="150">
          <template #default="scope">
            <div style="cursor:pointer;color: #3b82f6;" >
              <span v-if="scope.row.process === 5" @click="goMenu('toThirteen',scope.row)">{{}}</span>
              <span v-else></span>
            </div>
          </template>
        </el-table-column>
        <el-table-column  label="操作" fixed="right" align="center" class-name="small-padding fixed-width" width="180">
          <template #default="scope">
            <el-button link type="primary" @click="toProcess('view',scope.row)">查看</el-button>
@@ -108,7 +123,11 @@
      return {
        ...item,
        process: item.reportProgress <=4 ? 1 : item.reportProgress >4 && item.reportProgress <=6 ? 2 : item.reportProgress >6 && item.reportProgress <=9 ? 3 :item.reportProgress >9 && item.reportProgress <=11 ? 4:5,
        leaderName: item.leader ? item.leader.name : ''
        leaderName: item.leader ? item.leader.name : '',
        area: item.district ? item.province + '/' + item.city + '/' + item.district : item.city?item.province + '/' + item.city:item.province ,
        filingDate: item.filingDate ? item.filingDate : conversionDays(item.createTime),
        contractMoney: item.contract ? item.contract.contractMoney : '',
        actualContractMoney: item.contract ? item.contract.actualContractMoney : ''
      }
    })
    console.log(dataList.value,'dataList.value')
@@ -129,12 +148,19 @@
  getList()
}
const toProcess = (type,value) => {
const toProcess = (type,value,toPath) => {
  dialogVisible.value = false;
  value.type = type;
  router.push({ path: '/process', query: {id: value.id, type: type}});
  router.push({ path: '/process', query: {id: value.id, type: type, toPath: toPath}});
}
const goMenu = (toPath,val) => {
  console.log("val",val)
  toProcess('edit',val,toPath);
}
const conversionDays = (createTime) => {
  let day = Date.now() - new Date(createTime).getTime();//日期转时间戳
  return Math.floor(day / 86400000) ;//时间戳获取天数
}
defineExpose({
  openDialog