From 04eac7ef28e48ae88840454f6d959d4b99c44e41 Mon Sep 17 00:00:00 2001 From: liuye Date: Thu, 27 Jun 2024 09:18:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/project/fengdu/AppStore/AppStore.vue | 2 +- src/project/fengdu/AppStore/StoreDetail.vue | 36 ++++++++----------- .../fengdu/AppStore/components/Evaluate.vue | 17 ++++----- .../fengdu/AppStore/components/Situation.vue | 20 ++++++++--- 4 files changed, 37 insertions(+), 38 deletions(-) diff --git a/src/project/fengdu/AppStore/AppStore.vue b/src/project/fengdu/AppStore/AppStore.vue index 5802137..6d739fa 100644 --- a/src/project/fengdu/AppStore/AppStore.vue +++ b/src/project/fengdu/AppStore/AppStore.vue @@ -19,7 +19,7 @@ export default { data() { return { tabList: [{name: '门店情况'}, {name: '我要评价'}], - tabIndex: 0, + tabIndex: 1, barStyle: { 'width': '20px', 'height': '3px', diff --git a/src/project/fengdu/AppStore/StoreDetail.vue b/src/project/fengdu/AppStore/StoreDetail.vue index e11e074..93b1df3 100644 --- a/src/project/fengdu/AppStore/StoreDetail.vue +++ b/src/project/fengdu/AppStore/StoreDetail.vue @@ -5,16 +5,8 @@
{{ detailInfo.shopName }}
- - - - - - - - - - + + {{ detailInfo.storeScore }}
@@ -58,17 +50,9 @@
- - - - - - - - - - - {{ item.storeScore }} + + + {{ item.score }}
{{ item.remark }}
@@ -117,6 +101,9 @@ export default { this.$instance.post(`/app/appshoparchives/queryDetailById?id=${this.shopId}`).then(res => { if (res?.data) { this.detailInfo = res.data + this.detailInfo.xzStar = Math.floor(this.detailInfo.storeScore) + var wxz = 5 - this.detailInfo.xzStar + this.detailInfo.wxzStar = wxz <= 0 ? 0 : wxz } }) }, @@ -129,7 +116,9 @@ export default { if(item.pictureUrl) { item.imgList = item.pictureUrl.split(',') } - + item.xzStar = Math.floor(item.score) + var wxz = 5 - item.xzStar + item.wxzStar = wxz <= 0 ? 0 : wxz }) this.assessList = this.current == 1 ? res.data.records : [this.list, res.data.records].flat() this.pages = res.data.total @@ -138,6 +127,9 @@ export default { }, typeClick(e) { this.typeIndex = e + this.current = 1 + this.pages = 2 + this.getAssessList() }, toEvaluateForm() { uni.navigateTo({url: `./EvaluateForm?shopId=${this.shopId}`}) diff --git a/src/project/fengdu/AppStore/components/Evaluate.vue b/src/project/fengdu/AppStore/components/Evaluate.vue index 048cea4..64d234f 100644 --- a/src/project/fengdu/AppStore/components/Evaluate.vue +++ b/src/project/fengdu/AppStore/components/Evaluate.vue @@ -32,16 +32,8 @@
{{ item.shopName }}
- - - - - - - - - - + + {{ item.storeScore }}
@@ -114,6 +106,11 @@ export default { } }).then(res => { if (res?.data) { + res.data.records.map((item) => { + item.xzStar = Math.floor(item.storeScore) + var wxz = 5 - item.xzStar + item.wxzStar = wxz <= 0 ? 0 : wxz + }) this.list = this.current == 1 ? res.data.records : [this.list, res.data.records].flat() this.pages = res.data.total } diff --git a/src/project/fengdu/AppStore/components/Situation.vue b/src/project/fengdu/AppStore/components/Situation.vue index 18ff7c0..a9d9bb3 100644 --- a/src/project/fengdu/AppStore/components/Situation.vue +++ b/src/project/fengdu/AppStore/components/Situation.vue @@ -10,7 +10,7 @@

门店总数量

-
230
+
{{numInfo.shopCounts || 0}}
@@ -19,7 +19,7 @@

总网格数

-
230
+
{{numInfo.girdCounts || 0}}
@@ -28,7 +28,7 @@

总网格员

-
230
+
{{numInfo.girdPersons || 0}}
@@ -37,7 +37,7 @@

五星门店

-
230
+
{{numInfo.fiveStarsShops || 0}}
@@ -76,7 +76,8 @@ export default { searchGird: {girdName: ''}, month: '', monthText: '', - table: [] + table: [], + numInfo: {} } }, created() { @@ -86,6 +87,7 @@ export default { month = month > 9 ? month : "0" + month; this.month = date.getFullYear() + '-' + month this.getTable() + this.getStatistics() }, methods: { handleGridSelect(e) { @@ -111,6 +113,14 @@ export default { } }).finally(() => uni.hideLoading()) }, + getStatistics() { + this.$loading() + this.$instance.post(`/app/appShopStatistics/queryShopDetail`).then(res => { + if (res?.data) { + this.numInfo = res.data + } + }).finally(() => uni.hideLoading()) + } }, }