You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
4.8 KiB

4 months ago
<template>
4 months ago
<div class="container">
<div>
3 months ago
<div class="title">整体项目情况</div>
4 months ago
<table>
<thead>
<tr>
<th>项目总数</th>
<th>建筑面积(万平方米)</th>
<th>已建数量()</th>
<th>在建数量()</th>
<th>拟建数量()</th>
<th style="visibility: hidden;">拟建数量()</th>
</tr>
</thead>
<tbody>
<tr>
3 months ago
<td>{{ projectData.allProject }}</td>
<td>{{ projectData.allGrossArea }}</td>
<td>{{ projectData.allBuilding1 }}</td>
<td>{{ projectData.allBuilding2 }}</td>
<td>{{ projectData.allBuilding3 }}</td>
4 months ago
</tr>
</tbody>
</table>
</div>
<div>
3 months ago
<div class="title">当年项目情况</div>
4 months ago
<table>
<thead>
<tr>
<th>新开工项目数</th>
<th>建筑面积(万平方米)</th>
<th>已建数量()</th>
<th>在建数量()</th>
<th style="visibility: hidden;">拟建数量()</th>
<th style="visibility: hidden;">拟建数量()</th>
</tr>
</thead>
<tbody>
<tr>
3 months ago
<td>{{ currentYearData.currentYearProject }}</td>
<td>{{ currentYearData.currentYearGrossArea }}</td>
<td>{{ currentYearData.currentYearBuilding1 }}</td>
<td>{{ currentYearData.currentBuilding2 || 0 }}</td>
4 months ago
</tr>
</tbody>
</table>
</div>
</div>
4 months ago
</template>
<script>
3 months ago
import { allinformation } from '@/api/ManageApi';
4 months ago
export default {
data() {
return {
projectData: {
3 months ago
allProject: 0, // 项目总数
allGrossArea: 0, //建筑面积
allBuilding1: 0, // 已建
allBuilding2: 0, // 在建
allBuilding3: 0 // 拟建
},
currentYearData: {
currentYearProject: 0, //总数
currentYearGrossArea: 0, //面积
currentYearBuilding1: 0, // 已建
currentBuilding2: 0 // 在建
},
loading: false,
error: null
4 months ago
};
3 months ago
},
created() {
this.fetchProjectData();
},
methods: {
async fetchProjectData() {
this.loading = true;
try {
const response = await allinformation();
this.projectData = {
allProject: response.data.allProject || 0,
allGrossArea: response.data.allGrossArea || 0,
allBuilding1: response.data.allBuilding1 || 0,
allBuilding2: response.data.allBuilding2 || 0,
allBuilding3: response.data.allBuilding3 || 0
};
this.currentYearData = {
currentYearProject: response.data.currentYearProject || 0,
currentYearGrossArea: response.data.currentYearGrossArea || 0,
currentYearBuilding1: response.data.currentYearBuilding1 || 0,
currentBuilding2: response.data.currentBuilding2 || 0
};
}
finally {
this.loading = false;
}
}
4 months ago
}
};
</script>
<style scoped>
3 months ago
/* Your existing styles remain unchanged */
4 months ago
.container {
display: flex;
flex-direction: column;
4 months ago
gap: 1.5rem;
4 months ago
}
4 months ago
4 months ago
table {
width: 100%;
border-collapse: collapse;
}
4 months ago
4 months ago
th,
td {
border: none;
padding: 8px;
text-align: left;
}
4 months ago
4 months ago
th {
width: 7rem;
}
4 months ago
4 months ago
.title {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 600;
font-size: 1.25rem;
color: #3D424C;
line-height: 1.69rem;
text-align: left;
font-style: normal;
text-transform: none;
margin-bottom: .5rem;
margin-left: .4rem;
}
4 months ago
4 months ago
thead tr {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 0.88rem;
color: #7B8599;
line-height: 1.19rem;
text-align: left;
font-style: normal;
text-transform: none;
}
tbody tr {
font-family: DIN, DIN;
font-weight: 600;
font-size: 1.5rem;
color: #292C33;
line-height: 2.11rem;
text-align: left;
font-style: normal;
text-transform: none;
}
4 months ago
</style>