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"> <div class="photo">
<img :src="item.url" alt="" v-for="(item,index) in images" :key="index" @click="preview(index)"> <img :src="item.url" alt="" v-for="(item,index) in images" :key="index" @click="preview(index)">
</div> </div>
<div class="footer" @click="toAppStore" v-if="showStore">
<div class="btn">我要评选</div>
</div>
</div> </div>
</template> </template>
@@ -57,9 +54,6 @@ export default {
this.$hideLoading() this.$hideLoading()
}) })
}, },
toAppStore() {
uni.navigateTo({url: '/pages/AppStore/AppStore'})
}
}, },
} }
</script> </script>
@@ -113,27 +107,6 @@ export default {
margin-top: 32px; 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> </style>

View File

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

View File

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

View File

@@ -89,7 +89,7 @@ export default {
onLoad(e) { onLoad(e) {
this.shopId = e.shopId this.shopId = e.shopId
this.$dict.load(['operatorType']).then(() => { this.$dict.load(['operatorType']).then(() => {
// this.getDetail() this.getDetail()
}) })
}, },
methods: { methods: {
@@ -104,9 +104,14 @@ export default {
this.detailInfo.operatorType = e[0].value this.detailInfo.operatorType = e[0].value
}, },
submit() { 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) { if (res?.data) {
this.detailInfo = res.data this.$toast('修改成功')
setTimeout(() => {
uni.navigateBack()
}, 300);
} }
}) })
}, },
@@ -116,12 +121,13 @@ export default {
count: 1, count: 1,
mediaType: ['image'], mediaType: ['image'],
success: (res) => { success: (res) => {
if (res.tempFilePaths.length > 1) { console.log(res)
if (res.tempFiles.length > 1) {
this.$toast(`门店头像不能超过1张`) this.$toast(`门店头像不能超过1张`)
return false return false
} }
this.$loading('上传中') 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() { data() {
return { return {
tabList: [{name: '门店情况'}, {name: '我要评价'}], tabList: [{name: '门店情况'}, {name: '我要评价'}],
tabIndex: 1, tabIndex: 0,
barStyle: { barStyle: {
'width': '20px', 'width': '20px',
'height': '3px', 'height': '3px',
@@ -29,7 +29,10 @@ export default {
} }
} }
}, },
onLoad() { onLoad(e) {
if(e.tabIndex) {
this.tabIndex = e.tabIndex
}
}, },
methods: { methods: {
change(e) { change(e) {

View File

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

View File

@@ -51,7 +51,7 @@
</div> </div>
<div class="item" v-for="(item, index) in assessList" :key="index"> <div class="item" v-for="(item, index) in assessList" :key="index">
<div class="user-info"> <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"> <div class="user-name">
<p>{{ item.evaluator }}</p> <p>{{ item.evaluator }}</p>
<div>{{ item.evaluationTime.substring(0, 10) }}</div> <div>{{ item.evaluationTime.substring(0, 10) }}</div>
@@ -71,6 +71,9 @@
<span class="star-num">{{ item.storeScore }}</span> <span class="star-num">{{ item.storeScore }}</span>
</div> </div>
<div class="text">{{ item.remark }}</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> </div>
<AiEmpty v-if="!assessList.length" /> <AiEmpty v-if="!assessList.length" />
</div> </div>
@@ -122,6 +125,12 @@ export default {
this.$loading() this.$loading()
this.$instance.post(`/app/appshopassess/list?shopId=${this.shopId}&current=${this.current}`).then(res => { this.$instance.post(`/app/appshopassess/list?shopId=${this.shopId}&current=${this.current}`).then(res => {
if (res?.data) { 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.assessList = this.current == 1 ? res.data.records : [this.list, res.data.records].flat()
this.pages = res.data.total this.pages = res.data.total
} }
@@ -280,6 +289,7 @@ export default {
} }
} }
.item { .item {
margin-bottom: 32px;
.user-info { .user-info {
display: flex; display: flex;
margin-bottom: 24px; margin-bottom: 24px;
@@ -324,6 +334,12 @@ export default {
color: #323233; color: #323233;
line-height: 40px; line-height: 40px;
word-break: break-all; 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>230</div>
</div> </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="item">
<div class="left"> <div class="left">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/situation-zwgs.png" alt=""> <img src="https://cdn.cunwuyun.cn/wechat/fd-store/situation-zwgs.png" alt="">
@@ -40,6 +31,15 @@
<div>230</div> <div>230</div>
</div> </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>
<div class="title"> <div class="title">
<div class="left">6月的五星门店<span>排名不分先后</span></div> <div class="left">6月的五星门店<span>排名不分先后</span></div>