zhouwenxuan
2023-08-04 b7d59880975d3aa75760e764c20c2c4217039c78
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() {