| | |
| | | <div class="project-container"> |
| | | <div class="header"> |
| | | <el-button type="success" icon="Plus" @click="toProcess('add',{})">新增</el-button> |
| | | <vue3-json-excel |
| | | :json-data="dataList" |
| | | :fields="fields" |
| | | name="项目信息表.xlsx" |
| | | style="margin-right: 5px;margin-left: 5px" |
| | | > |
| | | <el-button type="warning">导出</el-button> |
| | | </vue3-json-excel> |
| | | <!-- <vue3-json-excel--> |
| | | <!-- :json-data="dataList"--> |
| | | <!-- :fields="fields"--> |
| | | <!-- name="项目信息表.xlsx"--> |
| | | <!-- style="margin-right: 5px;margin-left: 5px"--> |
| | | <!-- >--> |
| | | <!-- <el-button type="warning">导出</el-button>--> |
| | | <!-- </vue3-json-excel>--> |
| | | <el-button type="primary" icon="Filter" @click="showDrawer = true">筛选</el-button> |
| | | </div> |
| | | <div class="middle"> |
| | |
| | | <div class="box-right"> |
| | | <div class="inbox" @click="choose(1)" style="box-shadow: rgba(132, 122, 253, 0.2) 0 3px 5px 0;" :class="{btn1: chooseType === 1}"> |
| | | <div class="top" style="background: linear-gradient(90deg, rgb(127, 118, 253), rgb(218, 180, 246));"> |
| | | <span class="top-right-font">风险分析及计划评价</span> |
| | | <span class="top-right-font">基本信息</span> |
| | | </div> |
| | | <div class="bottom"> |
| | | <span class="top-right-font-bottom">{{search.num.riskTotal}}</span> |
| | |
| | | </div> |
| | | <div class="inbox" @click="choose(2)" style="box-shadow: rgba(255, 142, 139, 0.15) 0 3px 5px 0;" :class="{btn2: chooseType === 2}"> |
| | | <div class="top" style="background: linear-gradient(90deg, rgb(255, 140, 138), rgb(239, 186, 141));"> |
| | | <span class="top-right-font">现场勘验</span> |
| | | <span class="top-right-font">专家选用</span> |
| | | </div> |
| | | <div class="bottom"> |
| | | <span class="top-right-font-bottom">{{search.num.investigationTotal}}</span> |
| | |
| | | </div> |
| | | <div class="inbox" @click="choose(3)" style="box-shadow: rgba(222, 106, 169, 0.15) 0 3px 5px 0;" :class="{btn3: chooseType === 3}"> |
| | | <div class="top" style="background: linear-gradient(90deg, rgb(229, 119, 180), rgb(249, 159, 192));"> |
| | | <span class="top-right-font">项目审核</span> |
| | | <span class="top-right-font">项目审批</span> |
| | | </div> |
| | | <div class="bottom"> |
| | | <span class="top-right-font-bottom">{{search.num.reviewTotal}}</span> |
| | |
| | | </div> |
| | | <div class="inbox" @click="choose(4)" style="box-shadow: rgba(109, 177, 254, 0.2) 0 3px 5px 0;" :class="{btn4: chooseType === 4}"> |
| | | <div class="top" style="background: linear-gradient(90deg, rgb(54, 115, 255), rgb(124, 196, 242));"> |
| | | <span class="top-right-font">出具报告</span> |
| | | </div> |
| | | <div class="bottom"> |
| | | <span class="top-right-font-bottom">{{search.num.reportTotal}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="inbox" @click="choose(5)" style="box-shadow: rgba(88, 211, 137, 0.2) 0 3px 5px 0;" :class="{btn5: chooseType === 5}"> |
| | | <div class="top" style="background: linear-gradient(90deg, rgb(0, 195, 151), rgb(114, 232, 200));"> |
| | | <span class="top-right-font">项目归档</span> |
| | | </div> |
| | | <div class="bottom"> |
| | | <span class="top-right-font-bottom">{{search.num.archiveTotal}}</span> |
| | | <span class="top-right-font-bottom">{{search.num.reportTotal}}</span> |
| | | </div> |
| | | </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> |
| | | <el-table-column label="申请时间" prop="createTime" align="center" :show-overflow-tooltip="true" width="180" /> |
| | | <el-table-column label="项目名称" prop="name" align="center" :show-overflow-tooltip="true" width="180" /> |
| | | <el-table-column label="填报机构" prop="agencyName" align="center" :show-overflow-tooltip="true" width="180" /> |
| | | <el-table-column label="委托单位" prop="client" align="center" :show-overflow-tooltip="true" width="180"/> |
| | | <el-table-column label="所属地市" align="center" width="250"> |
| | | <template #default="scope"> |
| | | {{scope.row.area}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="类型" prop="estimateTypeName" align="center" width="150"/> |
| | | <el-table-column label="业务范围" prop="businessName" align="center" :show-overflow-tooltip="true" width="150"/> |
| | | <el-table-column label="项目负责人" prop="leaderName" align="center" width="120" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="项目阶段" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <div v-if="scope.row.process === 1" class="process1"> |
| | | <span>风险分析及计划评价</span> |
| | | </div> |
| | | <div v-else-if="scope.row.process === 2" class="process1 process2"> |
| | | <span>现场勘验</span> |
| | | </div> |
| | | <div v-else-if="scope.row.process === 3" class="process1 process3"> |
| | | <span>项目审核</span> |
| | | </div> |
| | | <div v-else-if="scope.row.process === 4" class="process1 process4"> |
| | | <span>出具报告</span> |
| | | </div> |
| | | <div v-else class="process1 process5"> |
| | | <span>项目归档</span> |
| | | </div> |
| | | </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="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.missingMaterialCnt}}</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)">{{scope.row.activeConfirm}}</span> |
| | | <!-- <span v-else></span>--> |
| | | </div> |
| | | </template> |
| | | <el-table-column label="部门" prop="dept" align="center" /> |
| | | <el-table-column label="专家组组长" prop="leader" align="center" width="150"/> |
| | | <el-table-column label="专家组人数" prop="num" align="center" width="150"/> |
| | | <el-table-column label="当前状态" prop="state" align="center" width="200"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="180"> |
| | | <template #default="scope"> |
| | |
| | | </div> |
| | | <el-drawer v-model="showDrawer" :direction="direction" :with-header="false" :size="size" > |
| | | <template #default> |
| | | <div class="drawer"> |
| | | <el-form ref="drawerRef" class="register-form" label-position="top"> |
| | | <div class="drawer"> |
| | | <el-form ref="drawerRef" class="register-form" label-position="top"> |
| | | <el-form-item label="时间选择"> |
| | | <el-date-picker |
| | | v-model="searchTime" |
| | |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="所属区域"> |
| | | <el-cascader |
| | | v-model="area" |
| | | :options="addressList" |
| | | :props="props" |
| | | @change="handleChange" |
| | | style="width: 100%" |
| | | size="large" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="项目名称" > |
| | | <el-input v-model.trim="search.queryParams.name" placeholder="请输入项目名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="委托单位"> |
| | | <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%" > |
| | | <el-option |
| | | v-for="item in businessList" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="类型"> |
| | | <el-select v-model="search.queryParams.estimateType" class="m-2" size="large" placeholder="请选择" style="width: 100%" > |
| | | <el-option |
| | | v-for="item in estimateTypeList" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="缺失要件"> |
| | | <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" |
| | | :label="item.label" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | </div> |
| | | <el-form-item label="项目名称" > |
| | | <el-input v-model.trim="search.queryParams.name" placeholder="请输入项目名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="当前状态" > |
| | | <el-select v-model="search.queryParams.state" class="m-2" size="large" placeholder="请选择" style="width: 100%" > |
| | | <el-option |
| | | v-for="item in stateList" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </template> |
| | | <template #footer> |
| | | <div style="flex: auto"> |
| | |
| | | |
| | | <script setup> |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {delProject, getProjectList, getProjectStatistics} from "@/api/projectManage/project"; |
| | | // import {delProject, getProjectList, getProjectStatistics} from "@/api/projectManage/project"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {getRegionTree} from "@/api/area"; |
| | | import {getDict} from "@/api/login"; |
| | | import {getDictList} from "@/api/backManage/evaluate"; |
| | | // import {getRegionTree} from "@/api/area"; |
| | | // import {getDict} from "@/api/login"; |
| | | // import {getDictList} from "@/api/backManage/evaluate"; |
| | | import Cookies from "js-cookie" |
| | | const router = useRouter(); |
| | | |
| | |
| | | pageNum: 1, |
| | | pageSize: 20, |
| | | name: '', |
| | | client: '', |
| | | province: '', |
| | | city: '', |
| | | district: '', |
| | | business: '', |
| | | estimateType: '', |
| | | phase: '', |
| | | state: null, |
| | | params:{ |
| | | lostMaterial: null |
| | | |
| | | } |
| | | }, |
| | | num: { |
| | |
| | | }); |
| | | const searchTime = ref([]); |
| | | const area = ref([]); |
| | | const businessList = ref([]); |
| | | const addressList = ref([]); |
| | | const estimateTypeList = ref([]); |
| | | const missingList = ref([ |
| | | const stateList = ref([ |
| | | { |
| | | id: 1, |
| | | label: '是' |
| | | label: '基本信息' |
| | | }, |
| | | { |
| | | id: 0, |
| | | label: '否' |
| | | } |
| | | id: 2, |
| | | label: '专家选用' |
| | | }, |
| | | { |
| | | id: 3, |
| | | label: '项目审批' |
| | | }, |
| | | { |
| | | id: 4, |
| | | label: '项目归档' |
| | | }, |
| | | ]) |
| | | const tableRef = ref(null); |
| | | const tableHeight = ref(0); |
| | |
| | | Cookies.remove('btn') |
| | | getList(); |
| | | getStatistics(); |
| | | getArea(); |
| | | getBusinessList(); |
| | | getRiskList(); |
| | | // getArea(); |
| | | // getBusinessList(); |
| | | // getRiskList(); |
| | | tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 170; |
| | | // 监听浏览器高度变化 |
| | | window.onresize = () => { |
| | |
| | | } |
| | | const getList = async () => { |
| | | loading.value = true; |
| | | const res = await getProjectList(search.queryParams); |
| | | if(res.code == 200){ |
| | | dataList.value = res.data.list.map(item => { |
| | | 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 : '', |
| | | area: item.district ? item.province + '/' + item.city + '/' + item.district : item.city != item.province ? item.province + '/' + item.city: item.province , |
| | | 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, |
| | | 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) |
| | | } |
| | | dataList.value = [ |
| | | { |
| | | id:1, |
| | | createTime: 'xxx', |
| | | name: 'xxx', |
| | | dept: 'xxx', |
| | | leader: '张三', |
| | | num: 10, |
| | | state: 1, |
| | | reportProgress: 1 |
| | | |
| | | } |
| | | ] |
| | | // const res = await getProjectList(search.queryParams); |
| | | // if(res.code == 200){ |
| | | // dataList.value = res.data.list.map(item => { |
| | | // 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 : '', |
| | | // area: item.district ? item.province + '/' + item.city + '/' + item.district : item.city != item.province ? item.province + '/' + item.city: item.province , |
| | | // 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, |
| | | // activeConfirmOut: item.personRecognition ? "\'" + item.personRecognition.recognitionCnt + '/' + item.personRecognition.personCnt: '', |
| | | // } |
| | | // }) |
| | | total.value = 1 |
| | | loading.value = false; |
| | | // console.log('11',dataList.value) |
| | | // }else{ |
| | | // ElMessage.warning(res.message) |
| | | // } |
| | | } |
| | | const getStatistics = async () => { |
| | | const {pageNum,pageSize, ...data} = JSON.parse(JSON.stringify(search.queryParams)) |
| | | const res = await getProjectStatistics(data); |
| | | if(res.code == 200){ |
| | | search.num = res.data |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | // const {pageNum,pageSize, ...data} = JSON.parse(JSON.stringify(search.queryParams)) |
| | | // const res = await getProjectStatistics(data); |
| | | // if(res.code == 200){ |
| | | // search.num = res.data |
| | | // }else{ |
| | | // ElMessage.warning(res.message) |
| | | // } |
| | | } |
| | | const handleSizeChange = (val) => { |
| | | search.queryParams.pageNum = 1; |
| | |
| | | router.push({ path: '/process', query: {id: value.id, type: type, toPath: toPath, process: value.reportProgress}}); |
| | | } |
| | | |
| | | const getArea = async ()=>{ |
| | | const type = 1 |
| | | const res = await getRegionTree({name: '',parentId: null,regionType: type}) |
| | | if(res.code == 200){ |
| | | addressList.value = res.data |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const getBusinessList = async () => { |
| | | const res = await getDict({dictType: 'sys_business_scope'}) |
| | | if(res.code === 200){ |
| | | businessList.value = res.data |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const getRiskList = async () => { |
| | | const res = await getDictList({dictType: "sys_assess_type"}); |
| | | if(res.code === 200){ |
| | | estimateTypeList.value = res.data.list |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | |
| | | const del = (val) => { |
| | | ElMessageBox.confirm( |
| | | '确定删除此条数据?', |
| | |
| | | const res = await delProject(val) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | getList() |
| | | getStatistics() |
| | | await getList() |
| | | await getStatistics() |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | |
| | | }) |
| | | } |
| | | const confirmClick = () => { |
| | | reset() |
| | | showDrawer.value = false; |
| | | } |
| | | const changeTime=(value)=>{ |
| | |
| | | } |
| | | const reset = () => { |
| | | searchTime.value = []; |
| | | area.value = []; |
| | | search.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 20, |
| | | name: '', |
| | | client: '', |
| | | province: '', |
| | | city: '', |
| | | district: '', |
| | | business: '', |
| | | estimateType: '', |
| | | phase: '', |
| | | params: { |
| | | lostMaterial: null |
| | | state: null, |
| | | params:{ |
| | | |
| | | } |
| | | } |
| | | chooseType.value = ''; |
| | | getList(); |
| | | getStatistics(); |
| | | showDrawer.value = false; |
| | | } |
| | | 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) => { |
| | | // if(state.registerForm.agency.attribute == 0){ |
| | | // state.registerForm.agency.province = '新疆维吾尔自治区' |
| | | // state.registerForm.agency.city = value[0]?value[0]:'' |
| | | // state.registerForm.agency.district = value[1]?value[1]:'' |
| | | // }else{ |
| | | search.queryParams.province = value[0]?value[0]:'' |
| | | search.queryParams.city = value[1]?value[1]:'' |
| | | search.queryParams.district = value[2]?value[2]:'' |
| | | // } |
| | | } |
| | | // 导出表格 |
| | | const fields = ref({ |
| | | '项目名称':'name', |
| | | '委托单位':'client', |
| | | '所属地市': 'area', |
| | | '类型': 'estimateTypeName', |
| | | '业务范围': 'businessName', |
| | | '项目负责人': 'leaderName', |
| | | '项目阶段': { |
| | | field: 'process', |
| | | callback: (value) => { |
| | | if (value === 1) { |
| | | return '风险分析及计划评价' |
| | | } else if(value === 2){ |
| | | return '现场勘验' |
| | | }else if(value === 3){ |
| | | return '项目审核' |
| | | }else if(value === 4){ |
| | | return '出具报告' |
| | | }else if(value === 5){ |
| | | return '项目归档' |
| | | } |
| | | } |
| | | }, |
| | | '项目实施天数': 'filingDate', |
| | | '预估金额(万元)': 'contractMoney', |
| | | '归档金额(万元)': 'actualContractMoney', |
| | | '缺失要件': 'missingMaterialCnt', |
| | | '归档确认': 'activeConfirmOut' |
| | | }); |
| | | const goMenu = (toPath,val) => { |
| | | console.log("val",val) |
| | | toProcess('edit',val,toPath); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .inbox{ |
| | | width: 19%; |
| | | width: 23%; |
| | | height: 76px; |
| | | background: #fff; |
| | | border-radius: 5px; |