From 2aac44c550cdb242225a2a18f7238fb41c618779 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期一, 06 一月 2025 09:21:57 +0800
Subject: [PATCH] bug修改

---
 src/views/safetyReview/projectManage/index.vue |  108 +++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 99 insertions(+), 9 deletions(-)

diff --git a/src/views/safetyReview/projectManage/index.vue b/src/views/safetyReview/projectManage/index.vue
index b58a644..856a82e 100644
--- a/src/views/safetyReview/projectManage/index.vue
+++ b/src/views/safetyReview/projectManage/index.vue
@@ -65,6 +65,15 @@
         </div>
       </div>
     </div>
+
+    <div style="margin-top: 10px;margin-bottom: 15px;margin-left: 20px;">
+      <div style="font-size: 18px;font-weight: 800;color: #ed5565;display: flex">
+        当前存在未完结:安全评价项目 <div style="cursor: pointer;border-radius: 8px;padding: 0 5px" :class="{active: isActive}" @click="chooseUn" >{{search.num.safetyTotal}}</div> 个,检验检测项目
+        {{search.num.safetyCheckTotal}}
+        个,共 {{search.num.unFinishTotal}} 个
+      </div>
+    </div>
+
     <!-- 表格数据 -->
     <el-table v-loading="loading" :data="dataList" :border="true" ref="tableRef" :height="tableHeight" style="width: 100%;">
       <el-table-column label="序号" width="80" align="center" type="index" ></el-table-column>
@@ -128,8 +137,8 @@
       <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>
-          <el-button link type="primary" @click="toProcess('edit',scope.row)">编辑</el-button>
-          <el-button link type="danger" v-if="(isAgency && scope.row.reportProgress !== 14) || !isAgency" @click="del(scope.row)">删除</el-button>
+          <el-button link type="primary" v-if="scope.row.reportProgress !== 14" @click="toProcess('edit',scope.row)">编辑</el-button>
+          <el-button link type="danger" v-if="(isAgency && scope.row.reportProgress !== 14) || (!isAgency && scope.row.reportProgress !== 14)" @click="del(scope.row)">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -170,11 +179,33 @@
                 size="large"
             />
           </el-form-item>
+          <el-form-item  label="机构名称" >
+            <el-select
+                v-model="search.queryParams.agencyName"
+                filterable
+                remote
+                @change="selectValue"
+                reserve-keyword
+                placeholder="所属机构"
+                remote-show-suffix
+                :remote-method="getCompanyList"
+                :loading="loadingCompany"
+                style="width:100%"
+                clearable
+            >
+              <el-option
+                  v-for="item in companyList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.name"
+              />
+            </el-select>
+          </el-form-item>
           <el-form-item  label="项目名称" >
-            <el-input v-model="search.queryParams.name" placeholder="请输入项目名称"></el-input>
+            <el-input v-model.trim="search.queryParams.name" placeholder="请输入项目名称"></el-input>
           </el-form-item>
           <el-form-item  label="委托单位">
-            <el-input v-model="search.queryParams.client" placeholder="委托单位"></el-input>
+            <el-input v-model.trim="search.queryParams.client" placeholder="委托单位"></el-input>
           </el-form-item>
           <el-form-item  label="业务范围">
             <el-select v-model="search.queryParams.business" class="m-2" size="large" placeholder="请选择" style="width: 100%" >
@@ -232,8 +263,10 @@
 import {getDict} from "@/api/login";
 import {getDictList} from "@/api/backManage/evaluate";
 import Cookies from "js-cookie"
+import {getAllAgency} from "@/api/backManage/insitution";
 const router = useRouter();
 
+const isActive = ref(false)
 const loading = ref(false);
 const direction = ref('rtl');
 const showDrawer = ref(false);
@@ -248,6 +281,7 @@
     pageNum: 1,
     pageSize: 20,
     name: '',
+    agencyName: '',
     client: '',
     province: '',
     city: '',
@@ -255,6 +289,8 @@
     business: '',
     estimateType: '',
     phase: '',
+    safetyCheck: 0,
+    unFinish: null,
     params:{
       lostMaterial: null
     }
@@ -265,9 +301,14 @@
     investigationTotal: 0,
     reviewTotal: 0,
     reportTotal: 0,
-    archiveTotal: 0
+    archiveTotal: 0,
+    unFinishTotal: 0,
+    safetyCheckTotal: 0,
+    safetyTotal: 0
   }
 });
+const companyList = ref([])
+const loadingCompany = ref(false)
 const searchTime = ref([]);
 const area = ref([]);
 const businessList = ref([]);
@@ -311,6 +352,7 @@
   chooseType.value = val;
   search.queryParams.phase = val;
   getList();
+  getStatistics()
 }
 const getList = async () => {
   loading.value = true;
@@ -325,12 +367,14 @@
         filingDate: item.filingDate ? conversionDays(item.filingDate,item.createTime) : conversionDays('',item.createTime),
         contractMoney: item.contract ? item.contract.contractMoney : '',
         actualContractMoney: item.contract ? item.contract.actualContractMoney : '',
-        activeConfirm: item.personRecognition ? item.personRecognition.recognitionCnt + '/' +  item.personRecognition.personCnt: '',
-        missingMaterialCnt:  3-item.materialCnt
+        activeConfirm: item.personRecognition ?  item.personRecognition.recognitionCnt +  '/' +  item.personRecognition.personCnt: '',
+        missingMaterialCnt:  3-item.materialCnt,
+        activeConfirmOut: item.personRecognition ? "\'" + item.personRecognition.recognitionCnt +  '/' +  item.personRecognition.personCnt: '',
       }
     })
     total.value = res.data.total
     loading.value = false;
+    console.log('11',dataList.value)
   }else{
     ElMessage.warning(res.message)
   }
@@ -348,10 +392,12 @@
   search.queryParams.pageNum = 1;
   search.queryParams.pageSize = val
   getList()
+  getStatistics()
 }
 const handleCurrentChange = (val) => {
   search.queryParams.pageNum = val
   getList()
+  getStatistics()
 }
 const toProcess = (type,value,toPath) => {
   value.type = type;
@@ -430,6 +476,7 @@
     pageNum: 1,
     pageSize: 20,
     name: '',
+    agencyName: '',
     client: '',
     province: '',
     city: '',
@@ -437,6 +484,8 @@
     business: '',
     estimateType: '',
     phase: '',
+    safetyCheck: 0,
+    unFinish: null,
     params: {
       lostMaterial: null
     }
@@ -493,19 +542,60 @@
   '项目实施天数': 'filingDate',
   '预估金额(万元)': 'contractMoney',
   '归档金额(万元)': 'actualContractMoney',
-  '缺失要件': 'materialCnt',
-  '归档确认': 'activeConfirm'
+  '缺失要件': 'missingMaterialCnt',
+  '归档确认': 'activeConfirmOut'
 });
 const goMenu = (toPath,val) => {
   console.log("val",val)
   toProcess('edit',val,toPath);
 }
+const selectValue = (val) => {
+  console.log('val',val)
+  if(val == ""){
+    companyList.value = []
+  }
+  // data.companyList.forEach(item => {
+  //   if(item.name === val){
+  //     data.queryParams.companyId = item.id
+  //   }
+  // })
+}
+const getCompanyList = async (val)=>{
+  if(val != ""){
+    loadingCompany.value = true;
+    const queryParams = {
+      name: val
+    }
+    const res = await getAllAgency(queryParams)
+    if (res.code == 200) {
+      loadingCompany.value = false;
+      companyList.value = res.data
 
+    } else {
+      ElMessage.warning(res.message)
+    }
+  }
+}
+
+const chooseUn = () => {
+  isActive.value = !isActive.value
+  if(isActive.value){
+    search.queryParams.unFinish = 1
+  }else {
+    search.queryParams.unFinish = null
+  }
+  getList()
+  getStatistics()
+}
 
 </script>
 
 <style scoped lang="scss">
 .project-container{
+  .active {
+    background-color: #fdb0b7;
+    //border: 1px solid #dab4f6;
+  }
   .header{
     margin: 15px 10px;
     display: flex;

--
Gitblit v1.9.2