微心愿

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

View File

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