新增成功
This commit is contained in:
@@ -49,14 +49,14 @@
|
||||
<span>*</span><span>申请帮扶原因(最多2项)</span>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<span v-for="(item,index) in list" :key="index" :class="item.checked? 'isCheck':''" @click="helpCheck(item)">{{ item }}</span>
|
||||
<span v-for="(item,index) in list" :key="index" :class="item.checked? 'isCheck':''" @click="helpCheck(item)">{{ item.dictName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items">
|
||||
<div class="left">
|
||||
<span>*</span><span>返贫致贫风险说明</span>
|
||||
</div>
|
||||
<input type="text" class="text" placeholder="请简要说明返贫致贫风险说明" maxlength="200"/>
|
||||
<input type="text" class="text" v-model="form.riskDescription" placeholder="请简要说明返贫致贫风险说明" maxlength="200"/>
|
||||
</div>
|
||||
<div class="items">
|
||||
<div class="left">
|
||||
@@ -91,16 +91,28 @@ export default {
|
||||
areaId: '',
|
||||
areaName: '',
|
||||
address: '',
|
||||
declareReason: [],
|
||||
reason: '',
|
||||
riskDescription: '',
|
||||
files: []
|
||||
},
|
||||
list: [],
|
||||
flag: false,
|
||||
list: ['张是','订单','电动蝶阀','斤斤计较','坎坎坷坷']
|
||||
checkList: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.$dict.load('')
|
||||
this.areaId = this.user.areaId
|
||||
this.$dict.load('helpDeclarationReason').then(()=>{
|
||||
this.list = this.$dict.getDict('helpDeclarationReason').map((item)=>{
|
||||
return {
|
||||
dictName: item.dictName,
|
||||
dictValue: item.dictValue,
|
||||
checked: false
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this.form.areaId = this.user.areaId
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
@@ -108,9 +120,13 @@ export default {
|
||||
methods: {
|
||||
helpCheck(e) {
|
||||
e.checked = !e.checked
|
||||
this.checkList = this.list.filter(e=>e.checked)
|
||||
this.form.declareReason = this.checkList.map(v=> v.dictValue).toString()
|
||||
this.form.reason = this.checkList.map(o=>o.dictName).toString()
|
||||
},
|
||||
comfirm() {
|
||||
if(this.flag) return
|
||||
|
||||
if(!this.form.name) {
|
||||
return this.$u.toast('请输入姓名')
|
||||
}
|
||||
@@ -129,10 +145,24 @@ export default {
|
||||
if(!this.form.address) {
|
||||
return this.$u.toast('请输入详细地址')
|
||||
}
|
||||
if(!this.form.declareReason) {
|
||||
return this.$u.toast('请选择帮扶原因')
|
||||
}
|
||||
if(this.form.declareReason) {
|
||||
if(this.checkList.length > 2) {
|
||||
return this.$u.toast('帮扶原因最多选2项')
|
||||
}
|
||||
}
|
||||
if(!this.form.riskDescription) {
|
||||
return this.$u.toast('请输入帮扶原因说明')
|
||||
}
|
||||
|
||||
this.flag = true
|
||||
this.$instance.post('/app/apphelpdeclarationinfo/addByApplet').then((res) => {
|
||||
console.log(res);
|
||||
|
||||
this.$instance.post('/app/apphelpdeclarationinfo/addByApplet',{...this.form}).then((res) => {
|
||||
if(res.code ==0) {
|
||||
uni.navigateTo({url: './result'})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -214,6 +244,9 @@ export default {
|
||||
span:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
.isCheck {
|
||||
color: #4181FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="service-result" >
|
||||
<!-- v-if="showPage" -->
|
||||
<image src="./components/resultPic.png" />
|
||||
<img src="./components/resultPic.png" />
|
||||
<h2>申请成功!</h2>
|
||||
|
||||
<div class="service-btn" hover-class="text-hover" @click="myAdd">查看我的申报</div>
|
||||
|
||||
Reference in New Issue
Block a user