特殊人群

This commit is contained in:
yanran200730
2021-12-24 09:19:43 +08:00
parent 27f4a48e92
commit b355aa642c
2 changed files with 28 additions and 13 deletions

View File

@@ -1,22 +1,23 @@
<template> <template>
<ai-card title="走访记录" class="visit"> <ai-card title="走访记录" class="visit" v-loading="loading">
<el-button slot="right" icon="iconfont iconAdd" type="text" @click="isShow = true">添加走访记录</el-button> <el-button slot="right" icon="iconfont iconAdd" type="text" @click="isShow = true">添加走访记录</el-button>
<template #content> <template #content>
<div class="visit-list"> <div class="visit-list">
<div class="visit-item" v-for="(item, index) in 10" :key="index"> <div class="visit-item" v-for="(item, index) in list" :key="index">
<div class="visit-item__top"> <div class="visit-item__top">
<div class="left"> <div class="left">
<img src="https://p26-passport.byteacctimg.com/img/user-avatar/6401428bcd3b2b9bfed4f31cca07b798~300x300.image"> <div class="avatar">{{ item.name.substr(item.name.length - 2) }}</div>
<h2>且听风吟</h2> <h2>{{ item.name }}</h2>
</div> </div>
<span>2020-07-05 12:02:33</span> <span>{{ item.visitTime }}</span>
</div> </div>
<p>且听风吟且听风吟且听风吟且听风吟且听风吟且听风吟且听风吟且听风吟且听风吟且听风吟且听风吟且听风吟</p> <p>{{ item.description }}</p>
<div class="visit-imgs"> <div class="visit-imgs">
<ai-uploader v-model="item.images" :instance="instance" :limit="9" disabled></ai-uploader>
</div> </div>
<div class="visit-status"> <div class="visit-status">
<span>现实状态</span> <span>现实状态</span>
<i>失联</i> <i>{{ dict.getLabel('visitCondolenceReality', item.reality) }}</i>
</div> </div>
</div> </div>
</div> </div>
@@ -72,6 +73,7 @@
return { return {
appList: [], appList: [],
list: [], list: [],
loading: false,
isShow: false, isShow: false,
form: { form: {
visitTime: '', visitTime: '',
@@ -87,24 +89,32 @@
}, },
mounted () { mounted () {
this.dict.load('visitCondolenceReality', () => { this.dict.load('visitCondolenceReality').then(() => {
this.getList() this.getList()
}) })
}, },
methods: { methods: {
getList () { getList () {
this.instance.post(`/app/appvisitvondolence/list?id=${this.id}&size=10000`).then(res => { this.loading = true
this.instance.post(`/app/appvisitvondolence/list?optionId=${this.id}&size=10000`).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.list = res.data.records this.list = res.data.records.map(item => {
return {
...item,
images: item.images ? JSON.parse(item.images) : []
}
})
} }
this.loading = false
}) })
}, },
onConfirm () { onConfirm () {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.instance.post(`/app/appdiylargescreen/addOrUpdateDatasource`, { this.instance.post(`/app/appvisitvondolence/addOrUpdate`, {
...this.form, ...this.form,
optionId: this.id, optionId: this.id,
images: JSON.stringify(this.form.images), images: JSON.stringify(this.form.images),
@@ -183,11 +193,16 @@
display: flex; display: flex;
align-items: center; align-items: center;
img { img, .avatar {
width: 40px; width: 40px;
height: 40px; height: 40px;
line-height: 40px;
text-align: center;
margin-right: 10px; margin-right: 10px;
border-radius: 50%; border-radius: 50%;
font-size: 14px;
color: #fff;
background: #26f;
} }
h2 { h2 {

View File

@@ -4,7 +4,7 @@
<ai-title :title="configs.applicationName" isShowBottomBorder></ai-title> <ai-title :title="configs.applicationName" isShowBottomBorder></ai-title>
</template> </template>
<template slot="content"> <template slot="content">
<ai-search-bar v-if="searchList.length"> <ai-search-bar v-if="searchList.length" bottomBorder style="margin-bottom: 12px;">
<template #left> <template #left>
<div v-for="(item, index) in searchList" :key="index"> <div v-for="(item, index) in searchList" :key="index">
<ai-select <ai-select