hejianhao
1 天以前 137bb06f7dc711f72abbd5311fa064e0c6a5fc1a
H5/pages/problemReporting/problemReporting.vue
@@ -2,7 +2,7 @@
   <view class="problem-report-page">
      <view class="info-cards">
         <view class="info-top">
            <view class="num">诉求号:{{detail.serialNumber}}</view>
            <view class="num">诉求号:{{detail.serialNumber || '-'}}</view>
            <view class="status">{{['正在办理','延期办理','超时办理','已办结','群众撤销','上报待审核','上级驳回'][detail.status]}}</view>
         </view>
@@ -13,7 +13,7 @@
         <view class="table-head">
            <view class="type flex1">问题类型</view>
            <view class="person flex1">群众</view>
            <view class="person flex1">群众姓名</view>
            <view class="phone flex1">联系电话</view>
         </view>
@@ -25,7 +25,11 @@
                  </view>
               </view>
               <view class="person-item flex1">{{detail.name}}</view>
               <view class="phone-item flex1">{{detail.contactNumber}}</view>
               <view class="flex a-center">
                  <view class="phone-item flex1">{{detail.contactNumber}}</view>
                  <image @click.stop="callPhone(detail.contactNumber)" src="../../static/tell.png"
                     class="w-58 h-58 shrink0 " />
               </view>
            </view>
         </view>
@@ -41,18 +45,18 @@
      <view class="notice-tip flex a-center ">
         <image src="/static/warnng@2x.png" class="w-31 h-31 mr-15" mode="aspectFill"></image>
         提交后会由上级部门进行审核,请留意审核结果
         提交后会由{{accountLevel < 4 ? '上级工作专班' :'上级部门'}}进行审核,请留意审核结果
      </view>
      <view class="btn" @tap="problemReports">提交至上级部门</view>
      <view class="btn" @tap="problemReports">{{accountLevel < 4 ? '提交至上级工作专班':'提交至上级部门'}}</view>
   </view>
</template>
<script>
   import {
      problemReport,
      getDetail
      getDetail,
      saveAndReport
   } from './service'
   export default {
      data() {
@@ -60,10 +64,19 @@
            content: '',
            id: '',
            detail: {},
            accountLevel: 1, //1、市级 2、区县 3、街道 4、社区
            appealData: {}, //述求录入数据
         };
      },
      onShow() {
         this.accountLevel = uni.getStorageSync('userInfo').accountLevel || 1
      },
      onLoad(option) {
         // option.id = 1
         if (option.data) {
            this.appealData = JSON.parse(option.data)
            this.detail = JSON.parse(option.data)
         }
         if (option.id) {
            this.id = option.id
            getDetail({
@@ -76,7 +89,37 @@
         }
      },
      methods: {
         callPhone(phoneNumber) {
            uni.makePhoneCall({
               phoneNumber
            });
         },
         problemReports() {
            // 述求录入并上报
            if (Object.keys(this.appealData).length != 0) {
               saveAndReport({
                  comment: this.content,
                  ...this.appealData
               }).then(res => {
                  if (res.code == 200) {
                     uni.showToast({
                        icon: 'none',
                        title: '上报成功'
                     })
                     setTimeout(() => {
                        uni.navigateBack({
                           delta: 2,
                           success: () => {
                              this.$store.commit('SET_ISLIST', true)
                           }
                        })
                     }, 1500)
                  }
               })
               return
            }
            // 上报
            problemReport({
               comment: this.content,
               complaintId: this.id
@@ -88,7 +131,9 @@
                  })
                  setTimeout(() => {
                     uni.navigateBack()
                     uni.navigateBack({
                        delta: 2
                     })
                  }, 1500)
               }
            })