jiangping
2025-06-06 77946261ec663aa1fe7f6f97e550532ed879f982
h5/pages/workOrder/edit.vue
@@ -22,7 +22,8 @@
            <view class="la"><text class="red">*</text>工单分类</view>
            <view class="line sel_wrap" @click="showCate1 = true">
               <view class="left" :class="param.cateName ? '' : 'placeholder9'">
                  {{ param.cateName ? param.cateName : '请选择' }}</view>
                  {{ param.cateName ? param.cateName : '请选择' }}
               </view>
               <u-icon name="arrow-right" color="#999999" size="15"></u-icon>
            </view>
         </view>
@@ -51,7 +52,8 @@
                  <u-icon class="close" size="20" name="close-circle-fill" color="red"
                     @click="fileDel('fileList', i)"></u-icon>
                  <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
                  <video v-if="item.type == 1" :show-center-play-btn="false" :src="item.fileurlFull" :controls="false"></video>
                  <video v-if="item.type == 1" :show-center-play-btn="false" :src="item.fileurlFull"
                     :controls="false"></video>
               </view>
            </view>
         </view>
@@ -142,20 +144,22 @@
            const {
               param,
               fileList
            } = this
            if (!param.projectId) return this.showToast('请选择完整的区域')
            if (!param.buildingId) return this.showToast('请选择完整的区域')
            if (!param.floorName && !param.roomNum) return this.showToast('请选择完整的区域')
            } = this
            if (!param.projectId) return this.showToast('请选择完整的区域')
            if (!param.buildingId) return this.showToast('请选择完整的区域')
            if (!param.floorName && !param.roomNum) return this.showToast('请选择完整的区域')
            if (!param.cateName) return this.showToast('请选择工单分类')
            ywWorkorderCreate({
               ...param,
               // roomId: '',
               fileList
            }).then(res => {
               this.showToast('提交成功')
               uni.redirectTo({
                  url: '/pages/workOrder/list'
               })
               if (res && res.code == 200) {
                  this.showToast('提交成功')
                  uni.redirectTo({
                     url: '/pages/workOrder/list'
                  })
               }
            })
         },
         changeHandler(e) {
@@ -167,8 +171,8 @@
               // 微信小程序无法将picker实例传出来,只能通过ref操作
               picker = this.$refs.uPicker
            } = e
            // 当第一列值发生变化时,变化第二列(后一列)对应的选项
            console.log(index);
            // 当第一列值发生变化时,变化第二列(后一列)对应的选项
            console.log(index);
            console.log(index);
            if (columnIndex === 0) {
               // picker为选择器this实例,变化第二列对应的选项
@@ -176,13 +180,13 @@
            }
         },
         confirmCate1(e) {
            console.log(e.value[1]);
            if(e.value.length == 2){
               this.$set(this.param, 'cateId', e.value[1].id)
               this.$set(this.param, 'cateName', e.value[1].name)
               this.showCate1 = false
            }
            console.log(e.value[1]);
            if (e.value.length == 2) {
               this.$set(this.param, 'cateId', e.value[1].id)
               this.$set(this.param, 'cateName', e.value[1].name)
               this.showCate1 = false
            }
         },
         confirm0(e) {
            const item = e.value[0]
@@ -431,9 +435,9 @@
               position: absolute;
               right: -20rpx;
               top: -20rpx;
               z-index: 9999;
               background-color: #fff;
               border-radius: 50%;
               z-index: 9999;
               background-color: #fff;
               border-radius: 50%;
               overflow: hidden;
            }
@@ -456,7 +460,7 @@
      // bottom: 68rpx;
      // left: 40rpx;
      width: 670rpx;
      height: 88rpx;
      height: 88rpx;
      margin-top: 80rpx;
      background: $primaryColor;
      box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3);