| | |
| | | <div class="project-container"> |
| | | <div class="header"> |
| | | <el-button type="success" icon="Plus" @click="toProcess('add',{})">新增</el-button> |
| | | <el-button type="warning" >导出</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> |
| | | <el-button type="primary" icon="Filter" @click="showDrawer = true">筛选</el-button> |
| | | </div> |
| | | <div class="middle"> |
| | | <div class="card-box"> |
| | | <div class="box-left" @click="choose('')"> |
| | | <class class="font-left"> |
| | | <div class="font-left"> |
| | | <div>项目</div> |
| | | <div>总数</div> |
| | | </class> |
| | | <class class="font-right">{{search.num.projectTotal}}</class> |
| | | </div> |
| | | <div class="font-right">{{search.num.projectTotal}}</div> |
| | | </div> |
| | | <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}"> |
| | |
| | | <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.province}}/{{scope.row.city}} |
| | | {{scope.row.area}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="评价类型" prop="estimateTypeName" align="center" width="150"/> |
| | |
| | | </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="" 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 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.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> |
| | |
| | | </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" |
| | |
| | | </div> |
| | | </template> |
| | | </el-drawer> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {delProject, getProjectList, getProjectStatistics} from "@/api/projectManage/project"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {delMonitor} from "@/api/sysUsers"; |
| | | 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); |
| | |
| | | district: '', |
| | | business: '', |
| | | estimateType: '', |
| | | phase: '', |
| | | params:{ |
| | | projectPhase: '', |
| | | lostMaterial: null |
| | | } |
| | | }, |
| | | num: { |
| | |
| | | const estimateTypeList = ref([]); |
| | | const missingList = ref([ |
| | | { |
| | | id: 0, |
| | | label: '否' |
| | | }, |
| | | { |
| | | id: 1, |
| | | label: '是' |
| | | }, |
| | | { |
| | | id: 0, |
| | | label: '否' |
| | | } |
| | | ]) |
| | | const tableRef = ref(null); |
| | | const tableHeight = ref(0); |
| | |
| | | const total = ref(0); |
| | | |
| | | onMounted(() => { |
| | | Cookies.remove('projectId') |
| | | getList(); |
| | | getStatistics(); |
| | | getArea(); |
| | |
| | | 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 => { |
| | | 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 : '' |
| | | 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), |
| | | 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{ |
| | |
| | | } |
| | | } |
| | | const getStatistics = async () => { |
| | | const res = await getProjectStatistics(); |
| | | const {pageNum,pageSize, ...data} = JSON.parse(JSON.stringify(search.queryParams)) |
| | | const res = await getProjectStatistics(data); |
| | | if(res.code == 200){ |
| | | console.log("res",res) |
| | | search.num = res.data |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | 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 ()=>{ |
| | |
| | | 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();//日期转时间戳 |
| | | return Math.floor(day / 86400000) ;//时间戳获取天数 |
| | | } |
| | | const handleChange = (value) => { |
| | | // if(state.registerForm.agency.attribute == 0){ |
| | |
| | | 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', |
| | | '缺失要件': 'materialCnt', |
| | | '归档确认': '' |
| | | }); |
| | | const goMenu = (toPath,val) => { |
| | | console.log("val",val) |
| | | toProcess('edit',val,toPath); |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |