From b7d59880975d3aa75760e764c20c2c4217039c78 Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期五, 04 八月 2023 09:17:25 +0800 Subject: [PATCH] 叫应率修改 --- pages/tabBar/notice/detail.vue | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diff --git a/pages/tabBar/notice/detail.vue b/pages/tabBar/notice/detail.vue index bb956c7..88939ec 100644 --- a/pages/tabBar/notice/detail.vue +++ b/pages/tabBar/notice/detail.vue @@ -109,7 +109,7 @@ <!-- //村级显示 --> </view> <view class="measures" v-if="unitType == 4"> - <u-button class="resBtn" type="primary" @click="goMeasures" v-if="role == '工作人员'">响应措施反馈</u-button> + <u-button class="resBtn" type="primary" @click="goMeasures" v-if="role == '工作人员'">{{cityMessage}}</u-button> </view> </view> </template> @@ -143,7 +143,9 @@ }, role: '', unitType: '', - directViewUrl: '' + directViewUrl: '', + cityMessage: '响应措施反馈', + measureData: {} } }, onLoad:function(options){ @@ -180,6 +182,7 @@ console.log("this.isAllImg",this.isAllImg) console.log("detailData",this.detailData) this.detailData.disaster = test.disasterType == 1 ? '地震': test.disasterType == 2 ? '洪涝' : test.disasterType == 3 ? '气象' : test.disasterType == 4 ? '地质灾害': test.disasterType == 5 ? '水旱': '森林草原火灾'; + this.getMeasures(); }, methods: { goBack() { @@ -187,24 +190,29 @@ url:'./notice/notice' }); }, - goMeasures() { + getMeasures(){ getMeasureDetail({id: this.detailData.id}).then(res => { if(res.code == 100){ if(res.data.baseMeasures && res.data.baseMeasures.length>0 ){ console.log('111111') - uni.navigateTo({ - url: `/pages/tabBar/responsivity/showMeasures?data=` + encodeURIComponent(JSON.stringify(res.data)) - }) + this.cityMessage = '查看措施反馈'; + this.measureData = res.data; }else { - uni.navigateTo({ - url: `/pages/tabBar/notice/measures?data=` + encodeURIComponent(JSON.stringify(this.detailData)) - }) + this.cityMessage = '响应措施反馈'; } } }) - - - + }, + goMeasures() { + if(this.cityMessage == '查看措施反馈' ){ + uni.navigateTo({ + url: `/pages/tabBar/responsivity/showMeasures?data=` + encodeURIComponent(JSON.stringify(this.measureData)) + }) + }else { + uni.navigateTo({ + url: `/pages/tabBar/notice/measures?data=` + encodeURIComponent(JSON.stringify(this.detailData)) + }) + } }, //审核通过 approved() { -- Gitblit v1.9.2