From 5260ec8123f769bc1fb5e46854d30a77a5ff95bc Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 11 Jan 2023 14:18:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/cpts/base/index.vue | 9 ++ src/views/modules/renFangTongJi/index.vue | 170 +++++++++++----------- 2 files changed, 90 insertions(+), 89 deletions(-) diff --git a/src/views/modules/cpts/base/index.vue b/src/views/modules/cpts/base/index.vue index 685e21816..7e66c198d 100644 --- a/src/views/modules/cpts/base/index.vue +++ b/src/views/modules/cpts/base/index.vue @@ -123,6 +123,7 @@
-
+
{{ item.num }}
{{ item.name }}
-
+

下级平台使用进度汇总

- - - + + + - + - - - - - - - + + + + + + +
- - + + @@ -115,10 +94,12 @@ import shequtongji from "./cpts/shequtongji"; export default { name: "renFangTongJi", components: { shequtongji }, - data() { + data () { return { displayedDetail: false, tableData: [], + tableLoading: false, + loadInfo: '', orgId: "", orgType: "", @@ -185,35 +166,35 @@ export default { }; }, computed: { - maxTableHeight() { + maxTableHeight () { return this.clientHeight - 420; }, ...mapGetters(["clientHeight"]), }, watch: { - orgId() { + orgId () { this.getTableData(); }, }, - mounted() { + mounted () { this.getCommunityData(); this.getResiData(); this.getHouseData(); this.getTableData(); }, methods: { - handleClickCard(item) { + handleClickCard (item) { if (item.name == "开通平台社区数") { this.showDetail(); } }, - async showDetail(orgId = "") { + async showDetail (orgId = "") { this.displayedDetail = true; this.detailOrgId = orgId; }, - async getCommunityData() { + async getCommunityData () { const url = "/gov/org/agency/usingCommunityStats"; const { data, code, msg } = await requestPost(url, { @@ -230,7 +211,7 @@ export default { } }, - async getResiData() { + async getResiData () { const url = "/epmetuser/icresiuser/userchart"; const { data, code, msg } = await requestPost(url, { @@ -257,7 +238,7 @@ export default { } }, - async getHouseData() { + async getHouseData () { const url = "/gov/org/house/housechart"; const { data, code, msg } = await requestPost(url, { @@ -286,7 +267,9 @@ export default { } }, - async getTableData() { + async getTableData () { + this.loadInfo = '数据加载中' + this.tableLoading = true const url = "/gov/org/house/subuserhouselist"; const { data, code, msg } = await requestPost(url, { @@ -297,9 +280,17 @@ export default { if (code === 0) { this.tableData = data ? data.map((item) => { - return item; - }) + return item; + }) : []; + + if (this.tableData.length === 0) { + this.loadInfo = '暂无数据' + } else { + this.loadInfo = '' + + } + } }, }, @@ -318,6 +309,7 @@ export default { .item { display: flex; + justify-content: center; width: 24%; margin-top: 15px; // margin-right: 1%;