王恒
2025-09-04 616e6be49d3f64f2397cb1b1c05d2c06df3db9a3
policy/reportDetails/reportDetails.vue
@@ -12,7 +12,7 @@
        </view>
        <view class="form-item">
          <view class="label">执法时间</view>
          <view class="input">{{details.planTime}}</view>
          <view class="input">{{details.planTime || details.planMonth || ''}}</view>
        </view>
        <view class="form-item">
          <view class="label">检查方式</view>
@@ -44,6 +44,25 @@
          <u-textarea placeholder="请输入..." count v-model="form.regionReason" maxlength="500"></u-textarea>
        </view>
        <!-- 是否创建整改计划 -->
        <view class="form-input-item" style="margin-bottom: 40rpx;">
          <view class="form-label require" style="margin-bottom: 40rpx;">是否创建整改计划</view>
          <view>
            <u-radio-group v-model="isRectify" @change="changeRectify">
              <u-radio shape="circle" label="是" :name="1"></u-radio>
              <u-radio shape="circle" label="否" :name="0"></u-radio>
            </u-radio-group>
          </view>
        </view>
        <!-- 整改时间 -->
        <view v-if="isRectify == 1" class="form-input-item" style="margin-bottom: 40rpx;">
          <view class="form-label require" style="margin-bottom: 40rpx;">整改计划时间</view>
          <view class="form-input-content" @click="showTimeFun">
            <input type="text" placeholder="请选择整改计划时间" disabled v-model.trim="form.planTime" />
            <u-icon name="arrow-right"></u-icon>
          </view>
        </view>
        <view class="form-input-item">
          <view class="form-label require">执法照片</view>
          <view>
@@ -60,6 +79,9 @@
        上报结果
      </view>
    </view>
    <yt-dateTimePicker ref="myPicker" @submit="confirmTime" :time-init="timeInit" :start-year="year" :startMonth="month"
      :time-hide="[true, true, true, true, false, false]" />
  </view>
</template>
@@ -80,17 +102,30 @@
      return {
        form: {
          regionReason: '',
          regionStatus: '0'
          regionStatus: '0',
          planTime: null, // 整改计划时间
        },
        fileList1: [],
        details: {},
        enforceType: ""
        enforceType: "",
        timeInit: '',
        planTimeStr: '',
        isRectify: 0, // 是否创建整改
      }
    },
    onLoad(options) {
      this.orderDetails(options.id)
    },
    methods: {
      changeRectify(e) {
        console.log(e)
        if (e == 0) {
          this.form.planTime = null
          this.timeInit = ''
          this.planTimeStr = ''
        }
      },
      // 获取执法类型枚举
      getDicts() {
        getDicts('enforce_type').then(val => {
@@ -139,7 +174,17 @@
            }, 500)
          }
        })
      }
      },
      showTimeFun() {
        this.$refs.myPicker.show();
      },
      confirmTime(e) {
        this.form.planTime = e.year + '-' + e.month + '-' + +e.day + ' ' + e.hour + ":" + "00:00"
        this.planTimeStr = e.year + '-' + e.month + '-' + +e.day + ' ' + e.hour + ":" + "00"
        this.timeInit = this.$u.timeFormat(new Date(this.planTimeStr), 'yyyy-mm-dd hh:MM')
      },
    }
  }
</script>
@@ -154,4 +199,15 @@
  ::v-deep .u-radio {
    margin-right: 80rpx;
  }
  .form-input-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #F4F4F4;
    border-radius: 12rpx;
    padding: 10rpx 20rpx;
    box-sizing: border-box;
  }
</style>