<template>
|
<div class="project-dialog">
|
<el-dialog
|
v-model="dialogVisible"
|
title="评价的项目列表"
|
width="800px"
|
:before-close="handleClose"
|
>
|
<!-- 表格数据 -->
|
<el-table v-loading="loading" :data="dataList" :border="true" ref="tableRef" style="width: 100%;">
|
<el-table-column label="序号" width="80" align="center" type="index" ></el-table-column>
|
<el-table-column label="项目名称" prop="name" 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="所属地市" prop="updateTime" align="center" width="250">
|
<template #default="scope">
|
{{scope.row.province}}/{{scope.row.city}}
|
</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="" 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">
|
<template #default="scope">
|
<div style="cursor:pointer;color: #3b82f6;" >
|
<span>{{scope.row.materialCnt}}</span>
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column label="归档确认" prop="" align="center" width="150"/>
|
<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>
|
<el-button link type="primary" @click="toProcess('edit',scope.row)">编辑</el-button>
|
<!-- <el-button link type="danger" @click="del(scope.row)">删除</el-button>-->
|
</template>
|
</el-table-column>
|
</el-table>
|
<div class="pag-container">
|
<el-pagination
|
v-model:current-page="search.queryParams.pageNum"
|
v-model:page-size="search.queryParams.pageSize"
|
:page-sizes="[10,15,20,25]"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="total"
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
/>
|
</div>
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
<script setup>
|
import {reactive, ref} from "vue";
|
import {getProjectList} from "@/api/projectManage/project";
|
const loading = ref(false);
|
const dataList = ref([]);
|
const tableRef = ref(null);
|
const total = ref(0);
|
const dialogVisible = ref(false);
|
const router = useRouter();
|
const search = reactive({
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
params:{
|
projectPhase: '',
|
personId: ''
|
}
|
},
|
});
|
const openDialog = async (val) => {
|
search.queryParams.params.personId = val.id
|
dialogVisible.value = true;
|
await 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 : ''
|
}
|
})
|
console.log(dataList.value,'dataList.value')
|
total.value = res.data.total
|
loading.value = false;
|
}
|
}
|
const handleClose = () => {
|
dialogVisible.value = false;
|
}
|
const handleSizeChange = (val) => {
|
search.queryParams.pageNum = 1;
|
search.queryParams.pageSize = val
|
getList()
|
}
|
const handleCurrentChange = (val) => {
|
search.queryParams.pageNum = val
|
getList()
|
}
|
|
const toProcess = (type,value) => {
|
dialogVisible.value = false;
|
value.type = type;
|
router.push({ path: '/process', query: {id: value.id, type: type}});
|
}
|
|
|
defineExpose({
|
openDialog
|
});
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
.project-dialog{
|
.process1{
|
border-radius: 5px;
|
color: rgb(255, 255, 255);
|
padding: 5px 10px;
|
background: linear-gradient(90deg, rgb(127, 118, 253), rgb(218, 180, 246));
|
}
|
.process2{
|
background: linear-gradient(90deg, rgb(255, 140, 138), rgb(239, 186, 141));
|
}
|
.process3 {
|
background: linear-gradient(90deg, rgb(229, 119, 180), rgb(249, 159, 192));;
|
}
|
.process4 {
|
background: linear-gradient(90deg, rgb(54, 115, 255), rgb(124, 196, 242));;
|
}
|
.process5 {
|
background: linear-gradient(90deg, rgb(0, 195, 151), rgb(114, 232, 200));;
|
}
|
|
}
|
.pag-container{
|
margin-top: 20px;
|
display: flex;
|
justify-content: end;
|
}
|
</style>
|