zhuzhuanzhuan
2023-09-27 dda6143d99925035928ef72deb24e9f6193a3560
src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue
@@ -44,20 +44,22 @@
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss'),minuteStep:5,hideDisabledOptions:true}"
              <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss'),hideDisabledOptions:true}"
                      date-format="YYYY-MM-DD HH:mm:ss"
                      placeholder="请选择开始时间"
                      :disabledDate="disabledDate" class="query-group-cust"
                      v-decorator="['startTime', validatorRules.startTime]" :disabledTime="disabledDateTime"></j-date>
                      v-decorator="['startTime', validatorRules.startTime]" :disabledTime="disabledDateTime"
                      :showToday="false"></j-date>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss'),minuteStep:5,hideDisabledOptions:true}"
              <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss'),hideDisabledOptions:true}"
                      date-format="YYYY-MM-DD HH:mm:ss"
                      placeholder="请选择结束时间"
                      :disabledDate="disabledDate" class="query-group-cust"
                      v-decorator="['endTime', validatorRules.endTime]" :disabledTime="disabledDateTime"></j-date>
                      v-decorator="['endTime', validatorRules.endTime]" :disabledTime="disabledDateTime"
                      :showToday="false"></j-date>
            </a-form-item>
          </a-col>
        </a-row>
@@ -226,7 +228,7 @@
      disabledDate(current) {
        //Can not slect days before today and today
        // return current && current < moment().endOf("day");
        return current < moment().subtract(+2, 'day')//前一天之前的年月日不可选,不包括前一天
        return current < moment().subtract(+2, 'day').endOf('day')//前一天之前的年月日不可选,不包括前一天
      },
      moment,
      // onChange(dates) {
@@ -461,11 +463,11 @@
        this.checked = e.target.checked
      },
      range(start, end) {
        const result = [];
        const result = []
        for (let i = start; i < end; i++) {
          result.push(i);
          result.push(i)
        }
        return result;
        return result
      },
      /**
       * 禁用日期选择器中的时间选择
@@ -473,7 +475,7 @@
       */
      disabledDateTime() {
        return {
          disabledSeconds: () => this.range(1,60)
          disabledSeconds: () => this.range(1, 60)
        }
      }
    }
@@ -499,4 +501,6 @@
  .ant-tabs-content .ant-form-item {
    margin-bottom: 0px;
  }
</style>