BUG 26212
This commit is contained in:
@@ -2,26 +2,31 @@
|
||||
<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">
|
||||
<div class="currentLeft-top">
|
||||
<div class="left">
|
||||
<AiAreaPicker v-model="areaId" all :areaId="user.areaId" @select="areaSelect" :name.sync="areaName" style="color: #fff">
|
||||
<img :src="$cdn + 'location.svg'" alt="" style="width: 18px; height: 18px; margin-right: 4px; vertical-align: middle" />
|
||||
<AiAreaPicker v-model="areaId" all :areaId="user.areaId" @select="areaSelect" :name.sync="areaName"
|
||||
style="color: #fff">
|
||||
<img :src="$cdn + 'location.svg'" alt=""
|
||||
style="width: 18px; height: 18px; margin-right: 4px; vertical-align: middle"/>
|
||||
<span class="label" v-if="areaName">{{ areaName }}</span>
|
||||
<span v-else>请选择</span>
|
||||
<u-icon name="arrow-down" color="#fff" size="28" style="margin-left: 4px" />
|
||||
<u-icon name="arrow-down" color="#fff" size="28" style="margin-left: 4px"/>
|
||||
</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">
|
||||
<AiCard v-for="(item, i) in data" :key="i" @click.native="goDetail(item, 1)">
|
||||
<AiCard v-for="(item, i) in data" :key="i" @click.native="goDetail(item, 1)" :ref="item.id">
|
||||
<template #custom>
|
||||
<div class="cards-left">
|
||||
<span class="walkName">走访对象:{{ item.name }}</span>
|
||||
@@ -32,7 +37,8 @@
|
||||
<div class="cards-hint">{{ item.title }}</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)" v-if="i < 3" />
|
||||
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i"
|
||||
@click.stop="previewImage(item.images, items.url)" v-if="i < 3"/>
|
||||
</div>
|
||||
|
||||
<div class="cards-bottom">
|
||||
@@ -60,15 +66,16 @@
|
||||
</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>
|
||||
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="goDetail()" />
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="goDetail()"/>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppWalkask',
|
||||
@@ -118,37 +125,38 @@ export default {
|
||||
onShow() {
|
||||
document.title = '走访慰问'
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$http
|
||||
.post('/app/appvisitvondolence/list', null, {
|
||||
params: {
|
||||
size: this.size,
|
||||
current: this.current,
|
||||
areaId: this.areaId,
|
||||
createUserId: this.currentTabs == 1 ? this.user.id : '',
|
||||
title: this.keyword,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (this.current > res.data.pages) {
|
||||
return
|
||||
}
|
||||
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
|
||||
this.pages = res.data.pages
|
||||
|
||||
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: this.size,
|
||||
current: this.current,
|
||||
areaId: this.areaId,
|
||||
createUserId: this.currentTabs == 1 ? this.user.id : '',
|
||||
title: this.keyword,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (this.current > res.data.pages) {
|
||||
return
|
||||
}
|
||||
})
|
||||
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
|
||||
this.pages = res.data.pages
|
||||
|
||||
if (this.data) {
|
||||
this.data.map((item) => {
|
||||
if (item.images) {
|
||||
item.images = JSON.parse(item.images || '[]')
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
areaSelect(e) {
|
||||
@@ -164,19 +172,23 @@ export default {
|
||||
},
|
||||
|
||||
goDetail(item, hint) {
|
||||
if (item?.id) {
|
||||
this.$refs?.[item.id]?.[0]?.handleClose()
|
||||
}
|
||||
if (hint == 1) {
|
||||
uni.navigateTo({ url: `./detail?id=${item.id}` })
|
||||
uni.navigateTo({url: `./detail?id=${item.id}`})
|
||||
}
|
||||
if (hint == 2) {
|
||||
uni.navigateTo({ url: `./add?id=${item.id}` })
|
||||
uni.navigateTo({url: `./add?id=${item.id}`})
|
||||
} else {
|
||||
uni.navigateTo({ url: `./add` })
|
||||
uni.navigateTo({url: `./add`})
|
||||
}
|
||||
},
|
||||
|
||||
toDetele(item) {
|
||||
this.deletShow = true
|
||||
this.deletId = item.id
|
||||
this.$refs?.[item.id]?.[0]?.handleClose()
|
||||
},
|
||||
|
||||
delet() {
|
||||
@@ -219,6 +231,7 @@ uni-page-body {
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.AppWalkask {
|
||||
height: 100%;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user