<template>
|
<div class="project-container">
|
<div class="header">
|
<el-button type="success" icon="Plus" @click="toProcess('add',{})">新增</el-button>
|
<el-button type="warning" >导出</el-button>
|
<el-button type="primary" icon="Filter">筛选</el-button>
|
</div>
|
<div class="middle">
|
<div class="card-box">
|
<div class="box-left" @click="choose('')">
|
<class class="font-left">
|
<div>项目</div>
|
<div>总数</div>
|
</class>
|
<class class="font-right">{{search.num.projectTotal}}</class>
|
</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}">
|
<div class="top" style="background: linear-gradient(90deg, rgb(127, 118, 253), rgb(218, 180, 246));">
|
<span class="top-right-font">风险分析及计划评价</span>
|
</div>
|
<div class="bottom">
|
<span class="top-right-font-bottom">{{search.num.riskTotal}}</span>
|
</div>
|
</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>
|
</div>
|
<div class="bottom">
|
<span class="top-right-font-bottom">{{search.num.investigationTotal}}</span>
|
</div>
|
</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>
|
</div>
|
<div class="bottom">
|
<span class="top-right-font-bottom">{{search.num.reviewTotal}}</span>
|
</div>
|
</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>
|
</div>
|
</div>
|
</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="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="" align="center" width="120" :show-overflow-tooltip="true"/>
|
<el-table-column label="项目阶段" prop="" align="center" width="200">
|
<template #default="scope">
|
|
</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 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">删除</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>
|
</div>
|
|
</template>
|
|
<script setup>
|
import {onMounted, reactive, ref} from "vue";
|
import {getProjectList, getProjectStatistics} from "@/api/projectManage/project";
|
import {ElMessage} from "element-plus";
|
const router = useRouter();
|
|
const loading = ref(false);
|
const search = reactive({
|
queryParams: {
|
pageNum: 1,
|
pageSize: 20,
|
params:{
|
projectPhase: '',
|
}
|
},
|
num: {
|
projectTotal: 0,
|
riskTotal: 0,
|
investigationTotal: 0,
|
reviewTotal: 0,
|
reportTotal: 0,
|
archiveTotal: 0
|
}
|
});
|
const tableRef = ref(null);
|
const tableHeight = ref(0);
|
const dataList = ref([]);
|
const total = ref(0);
|
|
onMounted(() => {
|
getList();
|
getStatistics();
|
tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 170;
|
// 监听浏览器高度变化
|
window.onresize = () => {
|
tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 170;
|
};
|
|
});
|
const chooseType = ref('');
|
const choose = (val) => {
|
chooseType.value = val;
|
search.queryParams.params.projectPhase = 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;
|
total.value = res.data.total
|
loading.value = false;
|
}else{
|
ElMessage.warning(res.message)
|
}
|
}
|
const getStatistics = async () => {
|
const res = await getProjectStatistics();
|
if(res.code == 200){
|
console.log("res",res)
|
search.num = res.data
|
|
}else{
|
ElMessage.warning(res.message)
|
}
|
}
|
const handleSizeChange = (val) => {
|
search.queryParams.pageSize = val
|
getList()
|
}
|
const handleCurrentChange = (val) => {
|
search.queryParams.pageNum = val
|
getList()
|
}
|
const toProcess = (type,value) => {
|
value.type = type;
|
router.push({ path: '/process', query: {id: value.id, type: type}});
|
}
|
</script>
|
|
<style scoped lang="scss">
|
.project-container{
|
.header{
|
margin: 15px 10px;
|
display: flex;
|
align-items: center;
|
justify-content: flex-end;
|
}
|
.middle{
|
height: 99px;
|
margin-bottom: 20px;
|
}
|
.card-box{
|
margin: 20px;
|
height: 99px;
|
background: #fff;
|
box-shadow: 0 3px 10px 0 rgba(62,62,62,.25);
|
border-radius: 10px;
|
display: flex;
|
.box-left{
|
width: 20%;
|
min-width: 200px;
|
height: 99px;
|
background: #fff;
|
box-shadow: 0 0 5px 0 rgba(62,62,62,.2);
|
border-radius: 10px;
|
display: flex;
|
margin-left: -15px;
|
align-items: center;
|
cursor: pointer;
|
padding-left: 2%;
|
.font-left{
|
width: 40px;
|
height: 40px;
|
font-size: 20px;
|
font-weight: 400;
|
color: #9198ad;
|
line-height: 18px;
|
font-family: fantasy;
|
}
|
.font-right{
|
position: relative;
|
left: 7%;
|
top: -3px;
|
height: 40px;
|
font-size: 36px;
|
font-family: fantasy;
|
font-weight: 400;
|
color: #222733;
|
}
|
}
|
.box-left:hover{
|
border: 1px solid #4378f1
|
}
|
.box-right{
|
width: 80%;
|
height: 99px;
|
border-radius: 10px;
|
margin-left: 15px;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.inbox{
|
width: 19%;
|
height: 76px;
|
background: #fff;
|
border-radius: 5px;
|
cursor: pointer;
|
.top{
|
width: 100%;
|
height: 39px;
|
border-top-left-radius: 5px;
|
border-top-right-radius: 5px;
|
.top-right-font{
|
font-size: 16px;
|
color: #fff;
|
line-height: 39px;
|
margin-left: 10px;
|
}
|
}
|
.bottom{
|
height: 37px;
|
.top-right-font-bottom{
|
font-size: 20px;
|
color: #333;
|
line-height: 37px;
|
margin-left: 20px;
|
font-family: fantasy;
|
}
|
}
|
}
|
.inbox:nth-child(1):hover{
|
border: 1px solid #dab4f6;
|
}
|
.inbox:nth-child(2):hover{
|
border: 1px solid #efba8d;
|
}
|
.inbox:nth-child(3):hover{
|
border: 1px solid #f99fc0;
|
}
|
.inbox:nth-child(4):hover{
|
border: 1px solid #7cc4f2;
|
}
|
.inbox:nth-child(5):hover{
|
border: 1px solid #72e8c8;
|
}
|
}
|
}
|
.btn1{
|
border: 1px solid #dab4f6;
|
}
|
.btn2{
|
border: 1px solid #efba8d;
|
}
|
.btn3{
|
border: 1px solid #f99fc0;
|
}
|
.btn4{
|
border: 1px solid #7cc4f2;
|
}
|
.btn5{
|
border: 1px solid #72e8c8;
|
}
|
.pag-container{
|
float: right;
|
margin-top: 20px;
|
}
|
}
|
</style>
|