ll
liukangdong
2024-12-03 b2e8e233d59d107615a8336dce9da36f1f8bcde0
h5/pages/polling/point.vue
@@ -8,7 +8,8 @@
         <template v-if="info.status == 1">
            <view class="line">
               <div class="la">巡检结果:</div>
               <div class="val primaryColor" :class="{red: info.dealStatus == 1}">{{ info.dealStatus == 0 ? '正常' : '异常' }}</div>
               <div class="val primaryColor" :class="{red: info.dealStatus == 1}">{{ info.dealStatus == 0 ? '正常' : '异常' }}
               </div>
            </view>
            <view class="line">
               <div class="la">巡检时间:</div>
@@ -54,7 +55,13 @@
                  <u-icon name="arrow-right"></u-icon>
               </view>
            </view>
            <view class="df_sb">
               <view class="">巡检结果</view>
               <view class="df_ac" @click="isShowRes = true" v-if="handleParam.dealDate">
                  {{ handleParam.dealName }}
                  <u-icon name="arrow-right"></u-icon>
               </view>
            </view>
            <view class="label">
               上传图片/视频
            </view>
@@ -86,6 +93,9 @@
      <!--  -->
      <u-datetime-picker :minDate="new Date().getTime()" :show="isShowHandleDate" @confirm="confirmHandleDate"
         @cancel="isShowHandleDate = false" mode="datetime"></u-datetime-picker>
      <u-picker :show="isShowRes" keyName="name" @cancel="isShowRes = false" @confirm='confirmRes'
         :columns="columns"></u-picker>
   </view>
</template>
@@ -101,13 +111,30 @@
         return {
            id: '',
            info: {},
            isShowRes: false,
            showUpload: false,
            isShowHandle: false,
            isShowHandleDate: false,
            handleParam: {
               dealStatus: 1
               dealStatus: 0,
               dealName: '正常'
            },
            fileList: []
            fileList: [],
            columns: [
               [{
                     id: 0,
                     name: '正常'
                  },
                  {
                     id: 1,
                     name: '异常'
                  },
                  {
                     id: '',
                     name: '跳过'
                  },
               ]
            ],
         };
      },
      onLoad(option) {
@@ -117,7 +144,17 @@
      },
      methods: {
         onSubmit() {
            const { handleParam, fileList, id } = this
            const {
               handleParam,
               fileList,
               id
            } = this
            if (handleParam.dealStatus == 1) {
               return uni.showModal({
                  title: '温馨提示',
                  content: '巡检结果异常,是否前往提交工单?',
                  success: function(res) {
                     if (res.confirm) {
            patrolData({
               ...handleParam,
               multifileList: fileList,
@@ -126,9 +163,25 @@
               this.showToast('操作成功')
               uni.navigateBack()
            })
                     }
                  }
               });
            } else {
               patrolData({
                  ...handleParam,
                  multifileList: fileList,
                  id,
               }).then(res => {
                  this.showToast('操作成功')
                  uni.navigateBack()
               })
            }
         },
         getDetail(){
            const { id } = this
            const {
               id
            } = this
            ywPatrolPointDetail(id).then(res => {
               this.info  = res.data
            })
@@ -141,6 +194,11 @@
         confirmHandleDate(e) {
            this.$set(this.handleParam, 'dealDate', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'));
            this.isShowHandleDate = false;
         },
         confirmRes(e) {
            this.$set(this.handleParam, 'dealStatus', e.value[0].id)
            this.$set(this.handleParam, 'dealName', e.value[0].name)
            this.isShowRes = false
         },
         fileDel(str, i) {
            this[str].splice(i, 1);
@@ -300,6 +358,7 @@
         text-align: center;
      }
   }
   .sub_btn{
      position: fixed;
      bottom: 68rpx;
@@ -316,6 +375,7 @@
      font-size: 32rpx;
      color: #FFFFFF;
   }
   .appr_modal {
      .label {
         text {
@@ -373,10 +433,12 @@
      }
   }
   .files{
      display: flex;
      margin-bottom: 20rpx;
   }
   .adduser_list_item_ipt1_upload {
      margin-top: 24rpx;
      width: 156rpx;