diff --git a/src/apps/AppMonitoringObject/Detail.vue b/src/apps/AppMonitoringObject/Detail.vue index 2967f2b3..5b5e4a85 100644 --- a/src/apps/AppMonitoringObject/Detail.vue +++ b/src/apps/AppMonitoringObject/Detail.vue @@ -28,55 +28,55 @@
- {{ info.address }} + {{ $dict.getLabel('fpNation', info.nation) }}
- {{ info.address }} + {{ info.politicsStatus }}
- {{ info.address }} + {{ $dict.getLabel('fpEducation', info.education) }}
- {{ info.address }} + {{ $dict.getLabel('fpStudentsInSchool', info.schoolStatus) }}
- {{ info.address }} + {{ $dict.getLabel('fpHealth', info.healthyStatus) }}
- {{ info.address }} + {{ $dict.getLabel('fpYesOrNo', info.seriousIllnessInsurance) }}
- {{ info.address }} + {{ $dict.getLabel('fpYesOrNo', info.seriousIllnessInsurance) }}
- {{ info.address }} + {{ $dict.getLabel('fpYesOrNo', info.subsistenceAllowance) }}
- {{ info.address }} + {{ $dict.getLabel('fpYesOrNo', info.endowmentInsurance) }}
- {{ info.address }} + {{ $dict.getLabel('fpYesOrNo', info.specialPovertySupport) }}
- {{ info.address }} + {{ $dict.getLabel('fpLaborSkills', info.labourStatus) }}
- {{ info.address }} + {{ info.workeMonths }}
- {{ info.address }} + {{ info.workArea }}
{{viewAll ? '收起详情 ' : '展开详情 '}}
@@ -110,8 +110,8 @@

家庭成员

- ({{ - info.familyList.length ? '已填写' : '未填写' + ({{ + info.family && info.family.length ? '已填写' : '未填写' }})
编辑 @@ -207,19 +207,18 @@
- - - - + + + +
@@ -235,7 +234,8 @@ export default { currIndex: 0, list: [], isFrom: false, - viewAll: false + viewAll: false, + checkType: '' } }, @@ -276,20 +276,30 @@ export default { if (query.isFrom) { this.isFrom = true } - this.$dict.load(['fpType', 'riskEliminationMethod', 'fpRiskType', 'fpYesOrNo']).then(() => { - this.getInfo(query.id) + this.$dict.load(['fpType', 'riskEliminationMethod', 'fpRiskType', 'fpYesOrNo', 'fpNation', 'fpEducation', 'fpStudentsInSchool', 'fpHealth', + 'fpLaborSkills', ]).then(() => { + this.isGirdUser() + this.getInfo() }) this.id = query.id uni.$on('reload', () => { - this.getInfo(query.id) + this.getInfo() }) }, onShow() { - document.title = '风险预警详情' + document.title = '居民详情' }, methods: { + isGirdUser() { + this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => { + if (res.code == 0) { + this.checkType = res.data.checkType + } + }) + }, + linkTo(url) { uni.navigateTo({url}) }, @@ -345,21 +355,35 @@ export default { this.currIndex = index }, - getInfo(id) { - this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${id}`).then(res => { + getInfo() { + this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${this.id}`).then(res => { if (res.code === 0) { this.info = res.data let ylbxCount = 0 let ylCount = 0 - res.data.familyList.forEach(item => { - if (item.medicalInsurance === '02') { - ylbxCount = ylbxCount + 1 - } - if (item.endowmentInsurance === '02') { - ylCount = ylCount + 1 - } - }) + // if(res.data.familyList && res.data.familyList.length) { + // res.data.familyList.forEach(item => { + // if (item.medicalInsurance === '02') { + // ylbxCount = ylbxCount + 1 + // } + // if (item.endowmentInsurance === '02') { + // ylCount = ylCount + 1 + // } + // }) + // } + + if(res.data.family && res.data.family.length) { + res.data.family.forEach(item => { + if (item.medicalInsurance === '02') { + ylbxCount = ylbxCount + 1 + } + if (item.endowmentInsurance === '02') { + ylCount = ylCount + 1 + } + }) + } + this.info.ylbxCount = ylbxCount this.info.ylCount = ylCount this.pageShow = true @@ -367,45 +391,53 @@ export default { uni.hideLoading() }) - this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${id}&size=1000¤t=1`).then(res => { - if (res.code === 0) { - this.list = res.data.records.map(item => { - return { - ...item, - imgs: JSON.parse(item.picture) - } - }) - } - }) + // this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${this.id}&size=1000¤t=1`).then(res => { + // if (res.code === 0) { + // this.list = res.data.records.map(item => { + // return { + // ...item, + // imgs: JSON.parse(item.picture) + // } + // }) + // } + // }) }, - cancel() { - this.$confirm('', '您确认要驳回此居民的监测对象申请吗?').then(() => { - - }) - }, - - confirm() { - this.$confirm('', '您确认要将此居民纳入监测对象吗?').then(() => { - + examine(text, pass) { + this.$confirm('', text).then(() => { + this.$http.post(`/app/apppreventionreturntopoverty/examine?id=${this.id}&pass=${pass}`).then(res => { + if (res.code === 0) { + this.$u.toast('操作成功') + uni.$emit('reload') + this.getInfo() + } + }) }) }, del() { this.$confirm('', '您确认要要删除此监测对象的信息吗?').then(() => { - + this.$http.post(`/app/apppreventionreturntopoverty/delete?ids=${this.id}`).then(res => { + if (res.code === 0) { + this.$u.toast('删除成功') + uni.$emit('reload') + setTimeout(() => { + uni.navigateBack() + }) + } + }) }) }, - remove() { - this.$confirm('', '您确认要解除此监测对象的风险吗?').then(() => { - - }) - }, - - submitRemove() { - this.$confirm('', '您确认要申请解除此监测对象的风险吗?').then(() => { - + remove(text, pass) { + this.$confirm('', text).then(() => { + this.$http.post(`/app/apppreventionreturntopoverty/relieve?id=${this.id}&pass=${pass}`).then(res => { + if (res.code === 0) { + this.$u.toast('操作成功') + uni.$emit('reload') + this.getInfo() + } + }) }) } } @@ -415,7 +447,7 @@ export default { \ No newline at end of file