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