帮扶成效

This commit is contained in:
shijingjing
2022-07-21 10:19:50 +08:00
parent 9cc9d6ed30
commit e0d3cf92ca
4 changed files with 260 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<template>
<div class="AppHelpEffect">
<AiFixedBtn>
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAddLog(0)"></div>
</AiFixedBtn>
</div>
</template>
<script>
export default {
name: "AppHelpEffect",
appName: '帮扶成效',
data() {
return {}
},
methods: {},
onShow() {
document.title = '帮扶成效'
}
}
</script>
<style lang="scss" scoped>
.AppHelpEffect {
.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;
}
}
</style>

View File

@@ -0,0 +1,195 @@
<template>
<div class="addLog">
<div class="help" v-if="type == 1">
<div><span style="color: #FF4466;">*</span>帮扶类型</div>
<AiSelect dict="fpAssistanceMeasures" v-model="operationDesc"></AiSelect>
</div>
<div class="form-item form-item__textarea">
<div class="form-item__title">
<em>*</em>
<h2>{{type == 1 ? '帮扶内容' : '走访内容'}}</h2>
</div>
<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">
<div class="form-item__title">
<h2>图片</h2>
<i>最多9张</i>
</div>
<div>
<AiUploader :def.sync="files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
</div>
</div>
<div class="btn" @click="submit">提交</div>
</div>
</template>
<script>
export default {
data() {
return {
detail: '',
pid: '',
files: [],
id: '',
type: '',
operationDesc: '',
flag: false,
}
},
onLoad(query) {
this.$dict.load('fpAssistanceMeasures')
this.pid = query.pid
this.type = query.type
if(query.id) {
this.id = query.id
this.getInfo()
}
},
onShow() {
if(this.type == 1) {
document.title = this.id ? '编辑帮扶措施' : '添加帮扶措施'
}else {
document.title = this.id ? '编辑走访日志' : '添加走访日志'
}
},
methods: {
getInfo() {
this.$http.post(`/app/apppreventionreturntopovertylog/queryDetailById?id=${this.id}`).then(res => {
if (res.code == 0) {
this.operationDesc = res.data.operationDesc
this.detail = res.data.detail
this.files = res.data.files || []
}
})
},
submit() {
if(this.flag) return
if(this.type == 1) {
if (!this.operationDesc) {
return this.$u.toast('请选择帮扶类型')
}
if (!this.detail) {
return this.$u.toast('请输入帮扶内容')
}
} else {
if (!this.detail) {
return this.$u.toast('请输入走访内容')
}
}
this.flag = true
this.$http.post('/app/apppreventionreturntopovertylog/addOrUpdate', {
detail: this.detail,
files: this.files,
pid: this.pid,
id: this.id,
type: this.type,
operationDesc: this.operationDesc
}).then(res => {
if (res.code === 0) {
this.$u.toast('提交成功')
uni.$emit('reload')
setTimeout(() => {
uni.navigateBack({
delta: 1
})
}, 300)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.addLog {
padding-bottom: 120px;
.help {
padding: 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
background: #fff;
margin-bottom: 16px;
}
.form-item {
padding: 32px;
background: #fff;
margin-bottom: 16px;
.form-item__title {
display: flex;
align-items: center;
margin-bottom: 34px;
em {
margin-right: 4px;
font-style: normal;
color: #FF4466;
}
h2 {
color: #333333;
font-weight: normal;
font-size: 32px;
}
i {
color: #999999;
font-size: 28px;
font-style: normal;
}
}
textarea {
width: 100%;
}
}
.form-type {
display: flex;
align-items: center;
justify-content: space-between;
height: 112px;
padding: 0 32px;
h2 {
font-weight: normal;
color: #333333;
font-size: 32px;
}
span {
color: #999999;
font-size: 28px;
}
}
.btn {
position: fixed;
left: 0;
bottom: 0;
z-index: 11;
width: 100%;
height: 112px;
line-height: 112px;
margin: 0;
text-align: center;
color: #FFFFFF;
font-size: 32px;
background: #3192F4;
}
.hint{
text-align: right;
color: #999;
}
}
</style>

View File

@@ -0,0 +1,20 @@
<template>
<div class="helpDetail"></div>
</template>
<script>
export default {
name: 'helpDetail',
data() {
return {}
},
methods() {},
onShow() {
document.title('帮扶情况')
}
}
</script>
<style lang="scss" scoped>
.helpDetail {}
</style>

View File

@@ -5,6 +5,10 @@
<image :src="$cdn + 'wdbf.png'"/> <image :src="$cdn + 'wdbf.png'"/>
<h2>监测对象</h2> <h2>监测对象</h2>
</div> </div>
<div class="info-top__item" @click="linkTo('../AppHelpEffect/AppHelpEffect')" v-if="$permissions('app_apppreventionreturntopoverty_detail')">
<image :src="$cdn + 'wdbf.png'"/>
<h2>帮扶成效</h2>
</div>
<div class="info-top__item" @click="linkTo('../AppWarningMonitoring/AppWarningMonitoring')"> <div class="info-top__item" @click="linkTo('../AppWarningMonitoring/AppWarningMonitoring')">
<image :src="$cdn + 'yjjk.png'"/> <image :src="$cdn + 'yjjk.png'"/>
<h2>预警监控</h2> <h2>预警监控</h2>