走访慰问bug

This commit is contained in:
花有清香月有阴
2021-12-22 15:35:01 +08:00
parent ce45ac0b4f
commit ffd6f7e09e
3 changed files with 81 additions and 31 deletions

View File

@@ -9,7 +9,7 @@
<div class="currentLeft">
<div class="currentLeft-top">
<div class="left">
<AiAreaPicker v-model="areaId" ref="areaIds" all :areaId="areaId" @select="areaSelect" style="color: #fff"></AiAreaPicker>
<AiAreaPicker v-model="areaId" all :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>
@@ -20,8 +20,8 @@
<template #custom>
<div class="cards-left">
<span class="walkName">走访对象{{ item.createUserName }}</span>
<span class="tags">残疾人</span>
<span class="tags">居家看护</span>
<span class="tags">{{ item.menuLevel3Name }}</span>
<span class="tags">{{ $dict.getLabel('realityStatus', item.reality) }}</span>
</div>
<div class="cards-hint">{{ item.description }}</div>
@@ -113,7 +113,9 @@ export default {
},
onLoad() {
this.areaId = this.user.areaId
this.$dict.load('realityStatus').then(() => {
this.getList()
})
},
mounted() {},
methods: {
@@ -160,11 +162,9 @@ export default {
goDetail(item, hint) {
this.isList = false
if (hint == 1 || hint == 2) {
console.log('left', item.id, hint)
this.comp = hint == 1 ? 'detail' : 'add'
this.params = item
} else {
console.log('right', 2)
this.comp = 'add'
this.params = 111
}

View File

@@ -3,35 +3,41 @@
<div v-if="addList">
<div class="header-description">
<u-form :model="forms" ref="uForm" label-width="auto">
<u-form-item label="区域选择" prop="areaId" style="position: relative">
<AiAreaPicker v-model="forms.areaId" ref="areaIds" :areaId="areaIdProps" @select="areaSelect" style="color: #333"></AiAreaPicker>
<u-form-item label="区域选择" prop="areaId" class="areaIds" style="position: relative">
<AiAreaPicker v-model="forms.areaId" :areaId="areaIdProps" @select="areaSelect" style="color: #333"></AiAreaPicker>
</u-form-item>
<u-form-item label="走访对象" prop="create_user_name" required style="position: relative">
<div class="line"></div>
<u-form-item label="走访对象" prop="create_user_name" required right-icon="arrow-right" class="create_user_names">
<u-input v-model="forms.create_user_name" disabled placeholder="请选择走访对象" @click="toWalkObject" />
<u-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
</u-form-item>
<u-form-item label="现实状态" prop="reality" style="position: relative">
<u-input v-model="forms.reality" disabled placeholder="请选择走访慰问对象" @click="showStstus = true" />
<div class="line"></div>
<u-form-item label="现实状态" prop="reality" right-icon="arrow-right" class="realitys">
<u-input v-model="forms.reality" disabled placeholder="请选择现实状态" @click="showStstus = true" />
<u-select v-model="showStstus" :list="$dict.getDict('realityStatus')" value-name="dictValue" label-name="dictName" @confirm="realityStstus"></u-select>
<u-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
</u-form-item>
<div class="line"></div>
<u-form-item label="入户走访事项" prop="title" required label-position="top">
<u-input v-model="forms.title" placeholder="请输入入户走访事项(30字以内)" type="textarea" auto-height height="60" maxlength="30" />
<div>{{ forms.title.length }}/30</div>
</u-form-item>
<div class="line"></div>
<u-form-item label="入户走访内容" prop="description" label-position="top">
<u-input v-model="forms.description" placeholder="请输入入户走访事项(500字以内)" type="textarea" auto-height height="60" maxlength="500" />
<div>{{ forms.description.length }}/500</div>
</u-form-item>
<u-form-item label="图片(最多9张)" prop="images" class="avatars" label-position="top">
<div class="line"></div>
<u-form-item label="图片(最多9张)" prop="images" class="avatars" label-position="top" :border-bottom="false">
<AiUploader :def.sync="forms.images" multiple placeholder="上传图片" :limit="9"></AiUploader>
</u-form-item>
</u-form>
@@ -67,6 +73,7 @@ export default {
create_user_name: '',
reality: '',
realityValue: '',
menuLevel3Name: '',
title: '',
description: '',
images: [],
@@ -82,6 +89,7 @@ export default {
computed: { ...mapState(['user']) },
created() {
this.areaIdProps = this.user.areaId
this.forms.areaId = this.user.areaId
this.$dict.load('realityStatus').then(() => {
this.getDetail()
})
@@ -126,6 +134,7 @@ export default {
areaId: this.forms.areaId,
applicationId: this.forms.applicationId,
name: this.forms.create_user_name,
menuLevel3Name: this.forms.menuLevel3Name,
optionId: this.forms.applicationId,
reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality,
title: this.forms.title,
@@ -151,14 +160,15 @@ export default {
areaSelect(e) {
if (e.type == 5) {
this.forms.areaId = e.id
} else {
return this.$u.toast('请选择到村')
}
if (e.type == 4) {
this.forms.areaId = e.id
}
},
backlist(e) {
console.log(e.item)
this.forms.create_user_name = e.item.create_user_name
this.forms.menuLevel3Name = e.menuLevel3Name
this.forms.applicationId = e.appId
this.forms.optionId = e.item.id
this.addList = true
@@ -181,13 +191,14 @@ export default {
<style lang="scss" scoped>
.add {
height: 100%;
padding-bottom: 112px;
background: #f3f6f9;
.header-description {
padding-bottom: 162px;
background: #f3f6f9;
::v-deep .u-form {
background: #fff;
.u-form-item {
margin-bottom: 16px;
.u-form-item__body {
.u-form-item--right__content__slot {
padding-bottom: 0;
@@ -200,6 +211,47 @@ export default {
padding-bottom: 20px !important;
}
.areaIds {
.u-form-item__body {
.u-form-item--right {
.u-form-item--right__content {
.u-form-item--right__content__slot {
.AiAreaPicker {
width: 100%;
.AiSearchPopup {
.areaSelector {
.location {
opacity: 0;
}
div {
width: 100%;
text-align: right;
}
}
}
}
}
}
}
}
}
.create_user_names,
.realitys {
.u-form-item__body {
.u-form-item--right__content__slot {
.u-input {
text-align: right !important;
}
}
}
}
.line {
height: 16px;
background: #f3f6f9;
}
.avatars {
.u-form-item__body {
.default {

View File

@@ -1,8 +1,7 @@
<template>
<div class="walkObject">
<div class="header-top">
<u-search v-model="keyword" placeholder="搜索" :show-action="false" bg-color="#F5F5F5" search-icon-color="#CCCCCC"
placeholder-color="#999999" @search="handerSearch" @clear="handerClear"></u-search>
<u-search v-model="keyword" placeholder="搜索" :show-action="false" bg-color="#F5F5F5" search-icon-color="#CCCCCC" placeholder-color="#999999" @search="handerSearch" @clear="handerClear"></u-search>
</div>
<div class="header-middle">
@@ -13,8 +12,7 @@
<div class="Checkbox">
<div v-if="DiyList.length > 0">
<u-collapse event-type="close" arrowaccordion>
<u-collapse-item v-for="(item, index) in DiyList" :title="item.menuLevel2Name" :key="index"
@change="selectUser(item)">
<u-collapse-item v-for="(item, index) in DiyList" :title="item.menuLevel3Name" :key="index" @change="selectUser(item)">
<u-radio-group v-model="value">
<u-radio v-for="(item, index) in userList" :key="index" :name="item.create_user_name">
{{ item.create_user_name }}
@@ -69,14 +67,14 @@ export default {
current: 1,
appId: '',
value: '',
menuLevel3Name: '',
}
},
computed: {},
created() {
this.getDiyList()
},
mounted() {
},
mounted() {},
methods: {
getDiyList() {
this.$http.post('/app/appapplicationinfo/queryApplicationListByType?type=0').then((res) => {
@@ -87,9 +85,9 @@ export default {
},
selectUser(item) {
console.log(item.id)
this.menuLevel3Name = item.menuLevel3Name
this.appId = item.id
this.$http.post(`/app/appapplicationinfo/list?appId=${item.id}&current=${this.current}&size=${99}`, {searchParam: this.keyword}).then((res) => {
this.$http.post(`/app/appapplicationinfo/list?appId=${item.id}&current=${this.current}&size=${99}`, { searchParam: this.keyword }).then((res) => {
if (res.code == 0) {
this.userList = res.data.records
}
@@ -99,7 +97,7 @@ export default {
submit() {
this.userList.map((item) => {
if (item.create_user_name == this.value) {
this.$emit('back', {item: item, appId: this.appId})
this.$emit('back', { item: item, appId: this.appId, menuLevel3Name: this.menuLevel3Name })
}
})
},