From 5d6dd045d7a83a2388759a422b2408266f08eb97 Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: 星期二, 20 二月 2024 09:16:58 +0800
Subject: [PATCH] bug修改

---
 src/views/safetyReview/projectManage/index.vue |   49 +++++++++++++++++++++++++++++--------------------
 1 files changed, 29 insertions(+), 20 deletions(-)

diff --git a/src/views/safetyReview/projectManage/index.vue b/src/views/safetyReview/projectManage/index.vue
index 10ca670..e07fa65 100644
--- a/src/views/safetyReview/projectManage/index.vue
+++ b/src/views/safetyReview/projectManage/index.vue
@@ -98,14 +98,14 @@
         </template>
       </el-table-column>
       <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 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="120">-->
+<!--        <template #default="scope">-->
+<!--          <div style="cursor:pointer;color: #3b82f6;" >-->
+<!--            <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="contractMoney" align="center"  width="130"/>
       <el-table-column label="归档金额(万元)" prop="actualContractMoney" align="center"  width="130"/>
       <el-table-column label="缺失要件"  align="center"  width="150">
@@ -119,7 +119,7 @@
       <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-if="scope.row.process === 5 && scope.row.personRecognition"  @click="goMenu('toThirteen',scope.row)">{{scope.row.personRecognition.recognitionCnt}}/{{scope.row.personRecognition.personCnt}}</span>
             <span v-else></span>
           </div>
         </template>
@@ -230,6 +230,7 @@
 import {getRegionTree} from "@/api/area";
 import {getDict} from "@/api/login";
 import {getDictList} from "@/api/backManage/evaluate";
+import Cookies from "js-cookie"
 const router = useRouter();
 
 const loading = ref(false);
@@ -252,8 +253,8 @@
     district: '',
     business: '',
     estimateType: '',
+    phase: '',
     params:{
-      projectPhase: '',
       lostMaterial: null
     }
   },
@@ -287,6 +288,7 @@
 const total = ref(0);
 
 onMounted(() => {
+  Cookies.remove('projectId')
   getList();
   getStatistics();
   getArea();
@@ -302,12 +304,11 @@
 const chooseType = ref('');
 const choose = (val) => {
   chooseType.value = val;
-  search.queryParams.params.projectPhase = val;
+  search.queryParams.phase = val;
   getList();
 }
 const getList = async () => {
   loading.value = true;
-  console.log(search.queryParams,'search.queryParams')
   const res = await getProjectList(search.queryParams);
   if(res.code == 200){
     dataList.value = res.data.list.map(item => {
@@ -316,7 +317,7 @@
         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 ,
-        filingDate: item.filingDate ? item.filingDate : conversionDays(item.createTime),
+        filingDate: item.filingDate ? conversionDays(item.filingDate,item.createTime) : conversionDays('',item.createTime),
         contractMoney: item.contract ? item.contract.contractMoney : '',
         actualContractMoney: item.contract ? item.contract.actualContractMoney : ''
       }
@@ -329,12 +330,9 @@
 }
 const getStatistics = async () => {
   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)
     search.num = res.data
-
   }else{
     ElMessage.warning(res.message)
   }
@@ -350,7 +348,7 @@
 }
 const toProcess = (type,value,toPath) => {
   value.type = type;
-  router.push({ path: '/process', query: {id: value.id, type: type, toPath: toPath}});
+  router.push({ path: '/process', query: {id: value.id, type: type, toPath: toPath, process: value.reportProgress}});
 }
 
 const getArea = async ()=>{
@@ -393,6 +391,8 @@
         if(res.code == 200){
           ElMessage.success('数据删除成功')
           getList()
+          getStatistics()
+
         }else{
           ElMessage.warning(res.message)
         }
@@ -429,14 +429,23 @@
     district: '',
     business: '',
     estimateType: '',
+    phase: '',
+    params: {
+      lostMaterial: null
+    }
   }
-  search.queryParams.params = {}
+  chooseType.value = '';
   getList();
   getStatistics();
   showDrawer.value = false;
 }
-const conversionDays = (createTime) => {
-  let day = Date.now() - new Date(createTime).getTime();//日期转时间戳
+const conversionDays = (time,createTime) => {
+  let day = "";
+  if(time) {
+    day = new Date(time).getTime() - new Date(createTime).getTime();//日期转时间戳
+  }else {
+    day = Date.now() - new Date(createTime).getTime();//日期转时间戳
+  }
   return Math.floor(day / 86400000) ;//时间戳获取天数
 }
 const handleChange = (value) => {

--
Gitblit v1.9.2