帮扶日志
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="detail" v-if="pageShow" :class="[isFrom ? 'active' : '']">
|
||||
<div class="tab" v-if="!isFrom">
|
||||
<span @click="changeTab(0)" :class="[currIndex === 0 ? 'active' : '']">基本信息</span>
|
||||
<span @click="changeTab(1)" :class="[currIndex === 1 ? 'active' : '']">帮扶日志</span>
|
||||
<span @click="changeTab(1)" :class="[currIndex === 1 ? 'active' : '']">走访日志</span>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-content__item" v-show="currIndex === 0">
|
||||
@@ -165,7 +165,7 @@
|
||||
<div class="item-wrapper">
|
||||
<div class="item-header">
|
||||
<div class="left">
|
||||
<h2>帮扶措施</h2>
|
||||
<h2>帮扶情况</h2>
|
||||
<i :style="{color: isPoorStatus ? '#2EA222' : '#FF4466'}">({{ isPoorStatus ? '已填写' : '未填写' }})</i>
|
||||
</div>
|
||||
<span @click="linkTo(`./MonitorPoorStatus?id=${info.id}&girdId=${girdInfo.girdId}&girdName=${girdInfo.girdName}`)" v-if="info.status == 1">编辑</span>
|
||||
@@ -179,6 +179,14 @@
|
||||
<span>{{ $dict.getLabel('fpHealthAssistance', info.healthAssistance) || '-' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-wrapper">
|
||||
<div class="item-header">
|
||||
<div class="left">
|
||||
<h2>帮扶措施</h2>
|
||||
</div>
|
||||
<span @click="toLogList()">查看</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content__item" v-show="currIndex === 1">
|
||||
<div class="log-item" v-for="(item, index) in list" :key="index">
|
||||
@@ -206,7 +214,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<AiFixedBtn v-if="currIndex === 1">
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAddLog"></div>
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAddLog()"></div>
|
||||
</AiFixedBtn>
|
||||
<!-- 0:待纳入、1:监测中、2:待解除、3:已解除、4:已驳回 -->
|
||||
<div v-if="checkType == 1 && currIndex != 1">
|
||||
@@ -342,7 +350,7 @@ export default {
|
||||
success: res => {
|
||||
if (res.tapIndex === 0) {
|
||||
uni.navigateTo({
|
||||
url: `./MonitorAddLog?pid=${this.info.id}&id=${id}`
|
||||
url: `./MonitorAddLog?pid=${this.info.id}&id=${id}&type=0`
|
||||
})
|
||||
} else if (res.tapIndex === 1) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
@@ -371,7 +379,13 @@ export default {
|
||||
|
||||
toAddLog() {
|
||||
uni.navigateTo({
|
||||
url: './MonitorAddLog?pid=' + this.info.id
|
||||
url: `./MonitorAddLog?pid=${this.info.id}&type=0`
|
||||
})
|
||||
},
|
||||
|
||||
toLogList() {
|
||||
uni.navigateTo({
|
||||
url: `./LogList?id=${this.info.id}`
|
||||
})
|
||||
},
|
||||
|
||||
@@ -402,7 +416,7 @@ export default {
|
||||
this.pageShow = true
|
||||
}
|
||||
})
|
||||
this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${this.id}&size=1000¤t=1`).then(res => {
|
||||
this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${this.id}&size=1000¤t=1&type=0`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data.records || []
|
||||
}
|
||||
|
||||
371
src/apps/AppMonitoringObject/LogList.vue
Normal file
371
src/apps/AppMonitoringObject/LogList.vue
Normal file
@@ -0,0 +1,371 @@
|
||||
<template>
|
||||
<div class="detail">
|
||||
<div class="tab-content">
|
||||
<div class="tab-content__item">
|
||||
<div class="log-item" v-for="(item, index) in list" :key="index">
|
||||
<div class="log-item__wrapper">
|
||||
<div class="log-item__user">
|
||||
<div class="left">
|
||||
<div class="user">
|
||||
<span>{{ item.createUserName.substr(item.createUserName.length - 2) }}</span>
|
||||
</div>
|
||||
<h2>{{ item.createUserName }}</h2>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span>{{ item.createTime }}</span>
|
||||
<u-icon name="list" color="#999" size="28" @click="edit(item.id)" style="margin-left:16px;"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<p>{{ item.detail }}</p>
|
||||
<div class="imgs" v-if="item.files && item.files.length">
|
||||
<image :src="img.url" @click="prevImg(item.files, img.url)" v-for="(img, index) in item.files"
|
||||
:key="index"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length" style="padding-bottom: 20px;"></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
<AiFixedBtn>
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAddLog(0)"></div>
|
||||
</AiFixedBtn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'detail',
|
||||
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.id = query.id
|
||||
this.getList()
|
||||
},
|
||||
onShow() {
|
||||
document.title = '帮扶措施'
|
||||
},
|
||||
|
||||
methods: {
|
||||
prevImg(urls, img) {
|
||||
const imgs = urls.map(v => v.url)
|
||||
uni.previewImage({
|
||||
urls: imgs,
|
||||
current: img
|
||||
})
|
||||
},
|
||||
|
||||
toAddLog() {
|
||||
uni.navigateTo({
|
||||
url: `./MonitorAddLog?pid=${this.id}&type=1`
|
||||
})
|
||||
},
|
||||
|
||||
getList() {
|
||||
this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${this.id}&size=1000¤t=1&type=1`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data.records || []
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
edit(id) {
|
||||
uni.showActionSheet({
|
||||
itemList: ['编辑', '删除'],
|
||||
success: res => {
|
||||
if (res.tapIndex === 0) {
|
||||
uni.navigateTo({
|
||||
url: `./MonitorAddLog?pid=${this.id}&id=${id}&type=1`
|
||||
})
|
||||
} else if (res.tapIndex === 1) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
uni.showLoading()
|
||||
this.$http.post(`/app/apppreventionreturntopovertylog/delete?ids=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$u.toast('删除成功')
|
||||
this.getInfo()
|
||||
}
|
||||
uni.hideLoading()
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.detail {
|
||||
padding-top: 16px;
|
||||
|
||||
&.active {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.addBtn {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
flex-shrink: 0;
|
||||
background: $uni-color-primary;
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
|
||||
font-size: 48px;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tab {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 96px;
|
||||
padding: 0 60px;
|
||||
background: #FFFFFF;
|
||||
border-bottom: 1px solid #D4D4D4;
|
||||
box-sizing: border-box;
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
height: 96px;
|
||||
line-height: 96px;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
font-size: 32px;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
width: 192px;
|
||||
height: 6px;
|
||||
background: transparent;
|
||||
transform: translateX(-50%);
|
||||
content: ' ';
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: #1365DD;
|
||||
|
||||
&::after {
|
||||
background: #1365DD;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-wrapper {
|
||||
background: #fff;
|
||||
margin-bottom: 16px;
|
||||
padding: 0 32px 16px;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 96px;
|
||||
|
||||
& > span {
|
||||
color: #3975C6;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
h2 {
|
||||
color: #333333;
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
i {
|
||||
font-style: normal;
|
||||
color: #2EA222;
|
||||
font-size: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 14px 0;
|
||||
|
||||
label {
|
||||
color: #999999;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
span {
|
||||
max-width: 496px;
|
||||
text-align: right;
|
||||
color: #333333;
|
||||
font-size: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-avatar {
|
||||
height: 192px;
|
||||
|
||||
img {
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
margin-right: 24px;
|
||||
}
|
||||
|
||||
.left-right {
|
||||
p {
|
||||
margin-top: 8px;
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.log-item {
|
||||
padding: 0 0 0 32px;
|
||||
background: #fff;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
.log-item__wrapper {
|
||||
border: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.log-item__wrapper {
|
||||
padding: 32px 32px 32px 0;
|
||||
border-bottom: 1px solid #E4E5E6;
|
||||
|
||||
.log-item__user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
& > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.left {
|
||||
.user, image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
margin-right: 16px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
background: #2266FF;
|
||||
|
||||
span {
|
||||
color: #fff;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #333;
|
||||
font-size: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
image {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-right: 6px;
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 4px 0 16px 96px;
|
||||
color: #343D65;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.imgs {
|
||||
margin-left: 96px;
|
||||
|
||||
image {
|
||||
width: 136px;
|
||||
height: 136px;
|
||||
margin-right: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.view-all{
|
||||
text-align: center;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #3975C6;
|
||||
line-height: 44px;
|
||||
img{
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-left: 8px;
|
||||
transform: rotate(180deg);
|
||||
transition: all 0.3s ease-in-out;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.img-active{
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
.footer-btn{
|
||||
width: 100%;
|
||||
height: 112px;
|
||||
line-height: 112px;
|
||||
background: #FFF;
|
||||
display: flex;
|
||||
box-shadow: inset 0px 1px 0px 0px #DDDDDD;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
div{
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
}
|
||||
.confirm-btn{
|
||||
background-color: #3192F4;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,9 +3,9 @@
|
||||
<div class="form-item form-item__textarea">
|
||||
<div class="form-item__title">
|
||||
<em>*</em>
|
||||
<h2>帮扶内容</h2>
|
||||
<h2>{{type == 1 ? '帮扶内容' : '走访内容'}}</h2>
|
||||
</div>
|
||||
<textarea maxlength="500" v-model="detail" placeholder="请输入帮扶内容"></textarea>
|
||||
<textarea maxlength="500" v-model="detail" :placeholder="type == 1 ? '请输入帮扶内容' : '请输入走访内容'"></textarea>
|
||||
<div class="hint">{{ detail.length }}/500</div>
|
||||
</div>
|
||||
<div class="form-item form-item__imgs">
|
||||
@@ -29,11 +29,13 @@ export default {
|
||||
detail: '',
|
||||
pid: '',
|
||||
files: [],
|
||||
id: ''
|
||||
id: '',
|
||||
type: ''
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
this.pid = query.pid
|
||||
this.type = query.type
|
||||
if(query.id) {
|
||||
this.id = query.id
|
||||
this.getInfo()
|
||||
@@ -59,7 +61,8 @@ export default {
|
||||
detail: this.detail,
|
||||
files: this.files,
|
||||
pid: this.pid,
|
||||
id: this.id
|
||||
id: this.id,
|
||||
type: this.type
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$u.toast('提交成功')
|
||||
|
||||
Reference in New Issue
Block a user