|
|
@@ -4,11 +4,16 @@
|
|
|
<!--卡片数据展示-->
|
|
|
<el-card style="margin-bottom: 20px">
|
|
|
<el-tabs type="border-card">
|
|
|
- <el-tab-pane label="园区数据统计">
|
|
|
+ <el-tab-pane label="社区数据统计" v-if="tenantType == 0">
|
|
|
<div>
|
|
|
<avue-data-box :option="communityStatistics"></avue-data-box>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="园区数据统计" v-else>
|
|
|
+ <div>
|
|
|
+ <avue-data-box :option="parkStatistics"></avue-data-box>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-card>
|
|
|
|
|
|
@@ -39,7 +44,7 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
-
|
|
|
+
|
|
|
<agencymng ref="agencymng"></agencymng>
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
@@ -89,15 +94,44 @@
|
|
|
currentPage: 1,
|
|
|
total: 0
|
|
|
},
|
|
|
- //数据展示
|
|
|
+ //社区数据展示
|
|
|
communityStatistics: {
|
|
|
span: 6,
|
|
|
data: [{
|
|
|
- title: '园区数量',
|
|
|
+ title: '社区数量',
|
|
|
count: 0,
|
|
|
icon: 'el-icon-office-building',
|
|
|
color: 'rgb(49, 180, 141)',
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '小区数量',
|
|
|
+ count: 0,
|
|
|
+ icon: 'el-icon-school',
|
|
|
+ color: 'rgb(56, 161, 242)',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '楼栋数量',
|
|
|
+ count: 0,
|
|
|
+ icon: 'el-icon-s-home',
|
|
|
+ color: 'rgb(117, 56, 199)',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '住户数量',
|
|
|
+ count: 0,
|
|
|
+ icon: 'el-icon-user-solid',
|
|
|
+ color: 'rgb(143,119,0)',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ //园区数据展示
|
|
|
+ parkStatistics: {
|
|
|
+ span: 6,
|
|
|
+ data: [{
|
|
|
+ title: '园区数量',
|
|
|
+ count: 0,
|
|
|
+ icon: 'el-icon-office-building',
|
|
|
+ color: 'rgb(49, 180, 141)',
|
|
|
+ },
|
|
|
{
|
|
|
title: '楼宇数量',
|
|
|
count: 0,
|
|
|
@@ -351,7 +385,7 @@
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(["permission"]),
|
|
|
+ ...mapGetters(["permission", "tenantType"]),
|
|
|
permissionList() {
|
|
|
return {
|
|
|
addBtn: this.vaildData(this.permission.agencymng_add, false),
|
|
|
@@ -523,12 +557,21 @@
|
|
|
this.onLoad(this.page, this.query);
|
|
|
},
|
|
|
onLoad(page, params = {}) {
|
|
|
- dataStat().then(res => {
|
|
|
- this.communityCount = res.data.data;
|
|
|
- this.communityStatistics.data[0].count = this.communityCount.agencyCount;
|
|
|
- this.communityStatistics.data[1].count = this.communityCount.buildingCount;
|
|
|
- this.communityStatistics.data[2].count = this.communityCount.enterpriseCount;
|
|
|
- this.communityStatistics.data[3].count = this.communityCount.staffCount;
|
|
|
+ let agencyType = this.tenantType == 0? 1:2;
|
|
|
+ dataStat(agencyType).then(res => {
|
|
|
+ if(this.tenantType == 0){
|
|
|
+ this.communityCount = res.data.data;
|
|
|
+ this.communityStatistics.data[0].count = this.communityCount.agencyCount;
|
|
|
+ this.communityStatistics.data[1].count = this.communityCount.buildingCount;
|
|
|
+ this.communityStatistics.data[2].count = this.communityCount.enterpriseCount;
|
|
|
+ this.communityStatistics.data[3].count = this.communityCount.houseUserCount;
|
|
|
+ }else{
|
|
|
+ this.parkCount = res.data.data;
|
|
|
+ this.parkStatistics.data[0].count = this.parkCount.agencyCount;
|
|
|
+ this.parkStatistics.data[1].count = this.parkCount.residentialCount;
|
|
|
+ this.parkStatistics.data[2].count = this.parkCount.buildingCount;
|
|
|
+ this.parkStatistics.data[3].count = this.parkCount.staffCount;
|
|
|
+ }
|
|
|
});
|
|
|
this.loading = true;
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|