This commit is contained in:
liuye
2024-06-27 09:18:16 +08:00
parent 50668bb5a2
commit 04eac7ef28
4 changed files with 37 additions and 38 deletions

View File

@@ -19,7 +19,7 @@ export default {
data() {
return {
tabList: [{name: '门店情况'}, {name: '我要评价'}],
tabIndex: 0,
tabIndex: 1,
barStyle: {
'width': '20px',
'height': '3px',

View File

@@ -5,16 +5,8 @@
<div class="left">
<div class="name">{{ detailInfo.shopName }}</div>
<div class="star-info">
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >1"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >2"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >3"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >4"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >=5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="detailInfo.storeScore <5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="detailInfo.storeScore <4"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="detailInfo.storeScore <3"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="detailInfo.storeScore <2"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="detailInfo.storeScore <1"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-for="(items, indexs) in detailInfo.xzStar" :key="indexs"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-for="(items, indexs) in detailInfo.wxzStar" :key="indexs"></u-icon>
<span class="star-num">{{ detailInfo.storeScore }}</span>
<div class="right-btn" @click="toEvaluateForm">
@@ -58,17 +50,9 @@
</div>
</div>
<div class="star-info">
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >1"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >2"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >3"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >4"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >=5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <4"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <3"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <2"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <1"></u-icon>
<span class="star-num">{{ item.storeScore }}</span>
<u-icon name="star-fill" color="#FF8C19" size="24" v-for="(items, indexs) in item.xzStar" :key="indexs"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-for="(items, indexs) in item.wxzStar" :key="indexs"></u-icon>
<span class="star-num">{{ item.score }}</span>
</div>
<div class="text">{{ item.remark }}</div>
<div v-if="item.imgList && item.imgList.length">
@@ -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}`})

View File

@@ -32,16 +32,8 @@
</div>
<div class="store-name">{{ item.shopName }}</div>
<div class="star-info">
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >1"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >2"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >3"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >4"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >=5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <4"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <3"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <2"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <1"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-for="(items, indexs) in item.xzStar" :key="indexs"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-for="(items, indexs) in item.wxzStar" :key="indexs"></u-icon>
<span class="star-num">{{ item.storeScore }}</span>
</div>
<div class="flex-info">
@@ -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
}

View File

@@ -10,7 +10,7 @@
</div>
<div class="right">
<p>门店总数量</p>
<div>230</div>
<div>{{numInfo.shopCounts || 0}}</div>
</div>
</div>
<div class="item">
@@ -19,7 +19,7 @@
</div>
<div class="right">
<p>总网格数</p>
<div>230</div>
<div>{{numInfo.girdCounts || 0}}</div>
</div>
</div>
<div class="item">
@@ -28,7 +28,7 @@
</div>
<div class="right">
<p>总网格员</p>
<div>230</div>
<div>{{numInfo.girdPersons || 0}}</div>
</div>
</div>
<div class="item">
@@ -37,7 +37,7 @@
</div>
<div class="right">
<p>五星门店</p>
<div>230</div>
<div>{{numInfo.fiveStarsShops || 0}}</div>
</div>
</div>
</div>
@@ -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())
}
},
}