This commit is contained in:
liuye
2024-06-26 15:48:44 +08:00
parent 225498b24d
commit cfc7bf3307
9 changed files with 260 additions and 162 deletions

View File

@@ -13,9 +13,6 @@
<div class="photo">
<img :src="item.url" alt="" v-for="(item,index) in images" :key="index" @click="preview(index)">
</div>
<div class="footer" @click="toAppStore" v-if="showStore">
<div class="btn">我要评选</div>
</div>
</div>
</template>
@@ -57,9 +54,6 @@ export default {
this.$hideLoading()
})
},
toAppStore() {
uni.navigateTo({url: '/pages/AppStore/AppStore'})
}
},
}
</script>
@@ -113,27 +107,6 @@ export default {
margin-top: 32px;
}
}
.footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 20px 32px 88px 32px;
box-sizing: border-box;
background: #FFF;
z-index: 999;
.btn {
width: 100%;
height: 80px;
background: #2D7DFF;
border-radius: 40px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 34px;
color: #FFF;
text-align: center;
line-height: 80px;
}
}
}
</style>

View File

@@ -81,7 +81,7 @@ export default {
},
noticeList() {
let {notices} = this
return notices?.length > 0 ? notices?.map(e => e.title) || ['暂无公告'] : ['暂无公告']
return notices?.length > 0 ? notices?.map(e => e.taskName) || ['暂无公告'] : ['暂无公告']
}
},
onReady() {
@@ -97,17 +97,18 @@ export default {
methods: {
...mapActions(['autoLogin', 'authCheck']),
clickNotice(val) {
console.log(val)
const id = this.notices[val]["id"];
if (id) {
uni.navigateTo({
url: "/mods/AppNotice/AppNotice?id=" + id
url: "../AppNotice/AppNotice?id=" + id
})
}
},
getNotice() {
this.$instance.post("/app/appmininotice/list", null, {
this.noticesTextList = []
this.$instance.post("/app/apptaskmanage/list", null, {
params: {size: 999},
withoutToken: true
}).then(res => {
if (res?.data) {
this.notices = res.data.records;

View File

@@ -12,7 +12,7 @@
</template>
<script>
import {mapState} from 'vuex'
export default {
name: 'myStoreList',
appName: '我的门店',
@@ -23,7 +23,10 @@ export default {
pages: 2
}
},
onLoad() {
computed: {
...mapState(['user'])
},
onShow() {
this.getShopList()
},
methods: {
@@ -34,10 +37,12 @@ export default {
params: {
current: this.current,
size: 15,
phone: 15527637203
// phone: this.user.phone
}
}).then(res => {
if (res?.data) {
this.list = this.current == 1 ? list : [this.list, list].flat()
this.list = this.current == 1 ? res.data.records : [this.list, res.data.records].flat()
this.pages = res.data.total
}
}).finally(() => uni.hideLoading())

View File

@@ -89,7 +89,7 @@ export default {
onLoad(e) {
this.shopId = e.shopId
this.$dict.load(['operatorType']).then(() => {
// this.getDetail()
this.getDetail()
})
},
methods: {
@@ -104,9 +104,14 @@ export default {
this.detailInfo.operatorType = e[0].value
},
submit() {
this.$instance.post(`/app/appshoparchives/addOrUpdate?id=${this.shopId}`).then(res => {
this.$instance.post(`/app/appshoparchives/addOrUpdate`, {
...this.detailInfo
}).then(res => {
if (res?.data) {
this.detailInfo = res.data
this.$toast('修改成功')
setTimeout(() => {
uni.navigateBack()
}, 300);
}
})
},
@@ -116,12 +121,13 @@ export default {
count: 1,
mediaType: ['image'],
success: (res) => {
if (res.tempFilePaths.length > 1) {
console.log(res)
if (res.tempFiles.length > 1) {
this.$toast(`门店头像不能超过1张`)
return false
}
this.$loading('上传中')
this.uploadFile(res.tempFilePaths[0])
this.uploadFile(res.tempFiles[0].tempFilePath)
},
})
},

View File

@@ -0,0 +1,149 @@
<template>
<div class="padding" v-if="pageShow">
<header>{{ detail.taskName }}</header>
<div class="info">
<span>{{ detail.userName }} {{ detail.releaswTime && detail.releaswTime.slice(0, 16) }}</span>
<!-- <div class="right">
<em>{{ detail.views }}</em>人看过
</div> -->
</div>
<p>评选开始时间{{detail.startTime.slice(0, 16) }}</p>
<p>评选结束时间{{detail.endTime.slice(0, 16) }}</p>
<div class="notice-content">
<u-parse :html="detail.taskDescription"/>
</div>
<!-- <div class="photo">
<img :src="item.url" alt="" v-for="(item,index) in images" :key="index" @click="preview(index)">
</div> -->
<div class="footer" @click="toAppStore">
<div class="btn">我要评选</div>
</div>
</div>
</template>
<script>
export default {
name: "AppNotice",
appName:"通知公告",
data() {
return {
id: null,
pageShow: false,
detail: {},
images: [],
showStore: false
}
},
onLoad({id}) {
this.$loading()
this.id = id;
this.getDetail();
},
methods: {
preview(index) {
this.$previewImage(this.images, index, 'path');
},
getDetail() {
this.$instance.post("/app/apptaskmanage/queryDetailById", null, {
params: {id: this.id}
}).then(res => {
if (res?.data) {
this.detail = res.data;
this.images = JSON.parse(res.data.images || '[]');
this.$nextTick(() => {
this.pageShow = true
})
}
this.$hideLoading()
})
},
toAppStore() {
uni.navigateTo({url: '/pages/AppStore/AppStore?tabIndex=1'})
}
},
}
</script>
<style lang="scss" scoped>
.padding {
min-height: 100%;
box-sizing: border-box;
padding: 40px 32px;
background-color: #fff;
header {
font-size: 48px;
font-weight: 600;
color: #333333;
line-height: 66px;
}
.info {
display: flex;
justify-content: space-between;
font-size: 30px;
font-weight: 400;
color: #999;
padding: 16px 0;
.right {
display: flex;
flex-shrink: 0;
margin-left: 16px;
& > em {
font-style: normal;
color: #4181FF;
}
}
}
.notice-content {
font-size: 28px;
// color: #333;
// line-height: 64px;
padding-top: 64px;
}
.photo {
display: flex;
flex-direction: column;
& > img {
width: 100%;
margin-top: 32px;
}
}
p {
line-height: 44px;
margin-bottom: 16px;
color: #666;
font-size: 28px;
}
.footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 20px 32px 88px 32px;
box-sizing: border-box;
background: #FFF;
z-index: 999;
.btn {
width: 100%;
height: 80px;
background: #2D7DFF;
border-radius: 40px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 34px;
color: #FFF;
text-align: center;
line-height: 80px;
}
}
}
</style>

View File

@@ -19,7 +19,7 @@ export default {
data() {
return {
tabList: [{name: '门店情况'}, {name: '我要评价'}],
tabIndex: 1,
tabIndex: 0,
barStyle: {
'width': '20px',
'height': '3px',
@@ -29,7 +29,10 @@ export default {
}
}
},
onLoad() {
onLoad(e) {
if(e.tabIndex) {
this.tabIndex = e.tabIndex
}
},
methods: {
change(e) {

View File

@@ -26,117 +26,42 @@
<div class="form-info">
<div class="form-title">评价清单</div>
<div class="mini-title">正面清单</div>
<div class="item">
<div class="label">(1)门店整洁美观</div>
<div class="item" v-for="(item, index) in positiveTypeList" :key="index">
<div class="label">({{index+1}}){{item.listType}}</div>
<div class="value">
<div class="radio" @click="positiveRadioClick('isNeat', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="positiveForm.isNeat" >
<div class="radio" @click="positiveRadioClick(index, 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="item.status">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="positiveRadioClick('isNeat', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!positiveForm.isNeat" >
<div class="radio" @click="positiveRadioClick(index, 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!item.status">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
</div>
</div>
<div class="item">
<div class="label">(2)有绿植安放</div>
<div class="value">
<div class="radio" @click="positiveRadioClick('isGreen', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="positiveForm.isGreen" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="positiveRadioClick('isGreen', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!positiveForm.isGreen" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
<div class="item">
<div class="label">(3)其他</div>
<div class="value">
<div class="radio" @click="positiveRadioClick('isOther', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="positiveForm.isOther" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="positiveRadioClick('isOther', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!positiveForm.isOther" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
<div class="mini-title">负面清单</div>
<div class="item">
<div class="label">(1)车辆乱停</div>
<div class="item" v-for="(item, index) in negativeTypeList" :key="index">
<div class="label">({{index+1}}){{item.listType}}</div>
<div class="value">
<div class="radio" @click="negativeRadioClick('isCar', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="negativeForm.isCar" >
<div class="radio" @click="negativeRadioClick(index, 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="item.status">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="negativeRadioClick('isCar', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!negativeForm.isCar" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
<div class="radio" @click="negativeRadioClick(index, 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!item.status">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
</div>
</div>
<div class="item">
<div class="label">(2)门头凌乱</div>
<div class="value">
<div class="radio" @click="negativeRadioClick('isDoor', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="negativeForm.isDoor" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="negativeRadioClick('isDoor', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!negativeForm.isDoor" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
<div class="item">
<div class="label">(3)垃圾凌乱</div>
<div class="value">
<div class="radio" @click="negativeRadioClick('isGarbage', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="negativeForm.isGarbage" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="negativeRadioClick('isGarbage', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!negativeForm.isGarbage" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
<div class="item">
<div class="label">(4)其他</div>
<div class="value">
<div class="radio" @click="negativeRadioClick('isOther', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="negativeForm.isOther" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="negativeRadioClick('isOther', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!negativeForm.isOther" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
</div>
<div class="line-bg"></div>
<div class="text-area">
<div class="label">请填写评语</div>
<u-input type="textarea" trim v-model="form.remark" maxlength="300" height="400"
placeholder-style="color: #999999;font-size: 15px;"/>
placeholder-style="color: #999;font-size: 15px;"/>
<p>0/300</p>
</div>
<div class="line-bg"></div>
@@ -156,7 +81,7 @@
</template>
<script>
import {mapState} from 'vuex'
export default {
name: 'EvaluateForm',
appName: '我要评价',
@@ -166,26 +91,35 @@ export default {
remark: '',
file: []
},
positiveForm: {
isNeat: 1,
isGreen: 1,
isOther: 1
},
negativeForm: {
isCar: 0,
isDoor: 0,
isGarbage: 0,
isOther: 0
},
positiveTypeList: [],
negativeTypeList: [],
shopId: '',
shopInfo: {}
}
},
computed: {
...mapState(['user'])
},
onLoad(e) {
this.getTypeList()
this.shopId = e.shopId
this.getShopDetail()
},
methods: {
getTypeList() {
this.$loading()
this.$instance.post(`/app/appscorerules/list?status=1&size=100`).then(res => {
if (res?.data) {
res.data.records.map((item) => {
if(item.type == 1) {
this.positiveTypeList.push(item)
}else {
this.negativeTypeList.push(item)
}
})
}
}).finally(() => uni.hideLoading())
},
getShopDetail() {
this.$loading()
this.$instance.post(`/app/appshoparchives/queryDetailById?id=${this.shopId}`).then(res => {
@@ -195,22 +129,33 @@ export default {
}
}).finally(() => uni.hideLoading())
},
positiveRadioClick(name, val) {
this.positiveForm[name] = val
positiveRadioClick(index, val) {
console.log(index, val)
this.positiveTypeList[index].status = val
},
negativeRadioClick(name, val) {
this.negativeForm[name] = val
negativeRadioClick(index, val) {
this.negativeTypeList[index].status = val
},
add() {
if(!this.form.remark) {
return this.$u.toast('请填写评语')
}
this.$loading()
var imgUrlList = []
if(this.form.file.length) {
this.form.file.map((item) => {
imgUrlList.push(item.url)
})
}
var assessTypeList = this.positiveTypeList.concat(this.negativeTypeList)
this.$instance.post(`/app/appshopassess/addOrUpdate`, {
...this.form,
...this.positiveForm,
...this.negativeForm,
shopId: this.shopId
shopId: this.shopId,
pictureUrl: imgUrlList.length ? imgUrlList.join(',') : '',
evaluatorPhone: this.user.phone,
evaluator: this.user.name ? this.user.name : this.user.nickName,
evaluatorUrl: this.user.avatarUrl,
assessType: JSON.stringify(assessTypeList)
}).then(res => {
if (res?.data) {
this.$u.toast('提交成功')

View File

@@ -51,7 +51,7 @@
</div>
<div class="item" v-for="(item, index) in assessList" :key="index">
<div class="user-info">
<img :src="item.pictureUrl" alt="" class="user-img">
<img :src="item.evaluatorUrl ? item.evaluatorUrl : 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" alt="" class="user-img">
<div class="user-name">
<p>{{ item.evaluator }}</p>
<div>{{ item.evaluationTime.substring(0, 10) }}</div>
@@ -71,6 +71,9 @@
<span class="star-num">{{ item.storeScore }}</span>
</div>
<div class="text">{{ item.remark }}</div>
<div v-if="item.imgList && item.imgList.length">
<img :src="img" alt="" v-for="(img, indexs) in item.imgList" :key="indexs" class="img">
</div>
</div>
<AiEmpty v-if="!assessList.length" />
</div>
@@ -122,6 +125,12 @@ export default {
this.$loading()
this.$instance.post(`/app/appshopassess/list?shopId=${this.shopId}&current=${this.current}`).then(res => {
if (res?.data) {
res.data.records.map((item) => {
if(item.pictureUrl) {
item.imgList = item.pictureUrl.split(',')
}
})
this.assessList = this.current == 1 ? res.data.records : [this.list, res.data.records].flat()
this.pages = res.data.total
}
@@ -280,6 +289,7 @@ export default {
}
}
.item {
margin-bottom: 32px;
.user-info {
display: flex;
margin-bottom: 24px;
@@ -324,6 +334,12 @@ export default {
color: #323233;
line-height: 40px;
word-break: break-all;
margin-bottom: 16px;
}
.img {
width: 120px;
height: 120px;
margin: 0 8px 8px 0;
}
}
}

View File

@@ -13,15 +13,6 @@
<div>230</div>
</div>
</div>
<div class="item">
<div class="left">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/situation-mdzrs.png" alt="">
</div>
<div class="right">
<p>门店总人数</p>
<div>230</div>
</div>
</div>
<div class="item">
<div class="left">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/situation-zwgs.png" alt="">
@@ -40,6 +31,15 @@
<div>230</div>
</div>
</div>
<div class="item">
<div class="left">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/situation-wxmd.png" alt="">
</div>
<div class="right">
<p>五星门店</p>
<div>230</div>
</div>
</div>
</div>
<div class="title">
<div class="left">6月的五星门店<span>排名不分先后</span></div>