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>
@@ -45,14 +45,14 @@
      </view>
      <view class="btn" @tap="problemReports">{{accountLevel < 4 ? '提交至上级工作专班':'提交至上级部门'}}</view>
   </view>
</template>
<script>
   import {
      problemReport,
      getDetail
      getDetail,
      saveAndReport
   } from './service'
   export default {
      data() {
@@ -61,6 +61,7 @@
            id: '',
            detail: {},
            accountLevel: 1, //1、市级 2、区县 3、街道 4、社区
            appealData: {}, //述求录入数据
         };
      },
      onShow() {
@@ -68,6 +69,10 @@
      },
      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({
@@ -81,6 +86,31 @@
      },
      methods: {
         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