This commit is contained in:
花有清香月有阴
2021-12-15 18:37:15 +08:00
parent d57e623042
commit a8cf508bd4
3 changed files with 1350 additions and 801 deletions

View File

@@ -2,23 +2,19 @@
<div class="AppWalkask">
<template v-if="isList">
<div class="header-top">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6"
inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
</div>
<div class="header-middle">
<div class="currentLeft" v-if="currentTabs == 0">
<div class="currentLeft-top">
<div class="left">
<img src="./components/images/icon2.png" alt=""/>
<img src="./components/images/icon2.png" alt="" />
<AiAreaPicker v-model="areaId" ref="areaIds" :areaId="areaId" @select="areaSelect"
style="color: #fff"></AiAreaPicker>
<AiAreaPicker v-model="areaId" ref="areaIds" :areaId="areaId" @select="areaSelect" style="color: #fff"></AiAreaPicker>
</div>
<u-search v-model="keyword" :clearabled="true" placeholder="请输入标题" :show-action="false" bg-color="#1F5CAF"
search-icon-color="#E2E8F1" color="#E2E8F1" height="58" @search="handerSearch"
@clear="handerClear"></u-search>
<u-search v-model="keyword" :clearabled="true" placeholder="请输入标题" :show-action="false" bg-color="#1F5CAF" search-icon-color="#E2E8F1" color="#E2E8F1" height="58" @search="handerSearch" @clear="handerClear"></u-search>
</div>
<template v-if="data.length > 0">
@@ -33,8 +29,7 @@
<div class="cards-hint">{{ item.description }}</div>
<div class="imgs">
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i"
@click.stop="previewImage(item.images, items.url)"/>
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" @click.stop="previewImage(item.images, items.url)" />
</div>
<div class="cards-bottom">
@@ -60,15 +55,12 @@
<div class="currentRight" v-if="currentTabs == 1">
<div class="currentLeft-top">
<div class="left">
<img src="./components/images/icon2.png" alt=""/>
<img src="./components/images/icon2.png" alt="" />
<AiAreaPicker v-model="areaId" ref="areaIds" :areaId="areaId" @select="areaSelect"
style="color: #fff"></AiAreaPicker>
<AiAreaPicker v-model="areaId" ref="areaIds" :areaId="areaId" @select="areaSelect" style="color: #fff"></AiAreaPicker>
</div>
<u-search v-model="keyword" :clearabled="true" placeholder="请输入标题" :show-action="false" bg-color="#1F5CAF"
search-icon-color="#E2E8F1" color="#E2E8F1" height="58" @search="handerSearch"
@clear="handerClear"></u-search>
<u-search v-model="keyword" :clearabled="true" placeholder="请输入标题" :show-action="false" bg-color="#1F5CAF" search-icon-color="#E2E8F1" color="#E2E8F1" height="58" @search="handerSearch" @clear="handerClear"></u-search>
</div>
<template v-if="data.length > 0">
@@ -83,8 +75,7 @@
<div class="cards-hint">{{ item.description }}</div>
<div class="imgs">
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i"
@click.stop="previewImage(item.images, items.url)"/>
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" @click.stop="previewImage(item.images, items.url)" />
</div>
<div class="cards-bottom">
@@ -108,11 +99,10 @@
</div>
</div>
<u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true"
:show-title="false" @confirm="delet"></u-modal>
<u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true" :show-title="false" @confirm="delet"></u-modal>
<AiFixedBtn>
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="goDetail()"/>
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="goDetail()" />
</AiFixedBtn>
</template>
@@ -121,7 +111,7 @@
</template>
<script>
import {mapState} from 'vuex'
import { mapState } from 'vuex'
import add from './add.vue'
import detail from './detail.vue'
@@ -157,38 +147,38 @@ export default {
deletId: '',
}
},
computed: {...mapState(['user'])},
computed: { ...mapState(['user']) },
created() {
this.areaId = this.user.areaId
this.getList()
},
mounted() {
},
mounted() {},
methods: {
getList() {
this.$http
.post('/app/appvisitvondolence/list', null, {
params: {
size: 6,
current: this.current,
areaId: this.areaId,
createUserId: this.currentTabs == 1 ? this.user.id : '',
title: this.keyword,
},
})
.then((res) => {
if (res.code == 0) {
this.data = res.data.records
if (this.data) {
this.data.map((item) => {
if (item.images) {
item.images = JSON.parse(item.images || '[]')
}
return item
})
.post('/app/appvisitvondolence/list', null, {
params: {
size: 6,
current: this.current,
areaId: this.areaId,
createUserId: this.currentTabs == 1 ? this.user.id : '',
title: this.keyword,
},
})
.then((res) => {
if (res.code == 0) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
if (this.data) {
this.data.map((item) => {
if (item.images) {
item.images = JSON.parse(item.images || '[]')
}
return item
})
}
}
}
})
})
},
areaSelect(e) {