微心愿

This commit is contained in:
shijingjing
2022-11-16 15:36:22 +08:00
parent 14758461c0
commit 79037b2b77
2 changed files with 42 additions and 30 deletions

View File

@@ -3,7 +3,7 @@
<div class="photo-list__wrapper">
<div class="photo-item" v-for="(item, index) in list" :key="index">
<u-swipe-action :index="item.id" :options="itemOptions" @click="handleDelete">
<u-swipe-action :index="item.id" :options="itemOptions" @click="handleDelete(item.id)">
<div class="photo-item__top" @click="$linkTo('./PhotoDetail?id=' + item.id)">
<h2>{{ item.content }}</h2>
<div class="photo-item__top--info">
@@ -68,11 +68,9 @@ export default {
uni.setNavigationBarTitle({
title: '微心愿'
})
uni.$on('update', () => {
this.current = 1
this.isMore = false
this.getList()
})
},
@@ -106,7 +104,7 @@ export default {
},
handleDelete(ids) {
this.$dialog.confirm({content: "是否要进行删除?"}).then(() => {
this.$instance.post("/app/appclapeventinfo/delete", null, {
this.$instance.post("/app/appclapeventinfopingchang/delete", null, {
params: {ids}
}).then(res => {
if (res?.code == 0) {

View File

@@ -2,26 +2,30 @@
<div class="photo-detail" v-if="pageShow">
<AiGroup noBorder>
<h2>{{ info.content }}</h2>
<div class="status-name" :class="detailStatus.cls" v-text="detailStatus.label"/>
<div class="status-name" :class="detailStatus.cls">{{ $dict.getLabel('clapEventStatus',info.eventStatus) }}</div>
</AiGroup>
<AiGroup description noBorder labelColor="#999">
<AiItem label="姓名" :value="info.name"/>
<AiItem label="联系方式" :value="info.phone"/>
<AiItem label="事件类型" :value="info.groupName"/>
<AiItem label="所属网格" :value="info.girdName"/>
<AiItem label="上报时间" :value="info.createTime"/>
<AiItem label="照片" top-label>
<image v-for="(item, index) in info.files" @click="preview(item.url)" :key="index" :src="item.url"/>
<AiItem label="上报位置" :value="info.address"/>
<AiItem label="所属地区" :value="info.areaName"/>
<AiItem label="现场照片" top-label>
<image v-for="(item, index) in info.files" @click="previewImg(item.url,info.files)" :key="index" :src="item.url"/>
<span v-if="!info.files.length">暂无照片</span>
</AiItem>
</AiGroup>
<u-gap height="24"/>
<AiGroup title="处理详情" v-if="info.eventStatus > 1" description noBorder labelColor="#999">
<!-- <AiGroup title="处理详情" v-if="info.eventStatus > 1" description noBorder labelColor="#999">
<AiItem label="处理结果" top-label :value="result.doExplain"/>
<AiItem label="照片" top-label>
<image v-for="(item, index) in result.files" @click="preview(item.url)" :key="index" :src="item.url"/>
<AiUploader v-model="result.files" disabled></AiUploader>
<span v-if="!result.files.length">暂无照片</span>
</AiItem>
</AiGroup>
<u-gap height="24"/>
<u-gap height="24"/> -->
<u-tabs :list="[{name:'办理进度'},{name:'我的评价'}]" :current="currentTab" @change="v=>currentTab=v"/>
<u-gap height="24"/>
<AiGroup noBorder v-if="currentTab=='0'">
@@ -31,15 +35,18 @@
<div class="color-999 mar-r32 stepTime" v-text="item.doTime"/>
</div>
<div v-if="item.doExplain" class="stepContent mar-t8" v-text="item.doExplain"/>
<image class="content_img" :src="e.accessUrl" v-for="(e, indexs) in item.files" :key="indexs" @click="previewImg(e.accessUrl,item.files)"/>
<u-gap height="48"/>
</AiStep>
<div class="bottomBtn" v-show="info.eventStatus > 1" @click="$linkTo('./evaluate')">去评价</div>
</AiGroup>
<AiEvaluation v-if="currentTab=='1'" :bid="info.id" type="show"/>
<!-- <div v-if="currentTab=='1'">
</div> -->
<AiEvaluation v-if="info.eventStatus > 1" v-model="evaluation" class="fixed-bottom bg-fff" :bid="info.id">
<div v-if="currentTab=='1'">
<!-- <div v-if=""></div> -->
<AiEmpty :description="`暂无数据`" class="emptyWrap"/>
</div>
<!-- <AiEvaluation v-if="info.eventStatus > 1" v-model="evaluation" class="fixed-bottom bg-fff" :bid="info.id">
<div class="bottomBtn">去评价</div>
</AiEvaluation>
</AiEvaluation> -->
</div>
</template>
@@ -60,7 +67,7 @@ export default {
const status = !v.evaluation.id ? v.info.eventStatus : 'evaluation'
return {
cls: 'status-' + status,
label: !v.evaluation.id ? v.$dict.getLabel('clapEventStatus', v.info.eventStatus) : "已评价"
// label: !v.evaluation.id ? v.$dict.getLabel('clapEventStatus', v.info.eventStatus) : "已评价"
}
},
process() {
@@ -83,7 +90,7 @@ export default {
},
methods: {
getInfo(id) {
this.$instance.post(`/app/appclapeventinfo/queryDetailById?id=${id}`).then(res => {
this.$instance.post(`/app/appclapeventinfopingchang/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
if (res.data.eventStatus > 1) {
@@ -95,27 +102,25 @@ export default {
}
}).finally(() => this.$hideLoading())
},
previewResult(url) {
previewImg(url,imgList) {
let imgs = imgList.map(v => v.url)
uni.previewImage({
urls: this.result.files.map(v => v.url),
urls: imgs,
current: url
})
},
preview(url) {
uni.previewImage({
urls: this.info.files.map(v => v.url),
current: url
})
}
}
}
</script>
<style lang="scss">
::v-deep .itemContent image {
width: 220px;
height: 220px;
margin-right: 8px;
}
.photo-detail {
padding: 32px 0 160px;
padding: 32px 0;
margin-bottom: 60px;
background: #fff;
@@ -166,4 +171,13 @@ export default {
}
}
}
.content_img {
width: 200px;
height: 200px;
margin-right: 8px;
}
.bottomBtn {
margin: 16px 32px 16px 0;
}
</style>