spring
2025-03-19 07a41ade45c962e93a9d449ce1be0eec52e66a6a
src/components/view/b3-classes.vue
@@ -29,14 +29,14 @@
          </el-option>
        </el-select>
        <el-input v-model="query.userName" placeholder="请输入人员名称" size="small" style="width: 140px;margin: 0 16px;" clearable @keyup.enter.native="refreshTable()"></el-input>
        <el-select v-model="query.laboratory" placeholder="请选择实验室" style="width: 140px;" size="small" clearable @change="refreshTable()">
        <!-- <el-select v-model="query.laboratory" placeholder="请选择实验室" style="width: 140px;" size="small" clearable @change="refreshTable()">
          <el-option
            v-for="item in laboratory"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>
        </el-select> -->
      </div>
    </div>
    <div class="search_thing" style="padding-left: 30px;">
@@ -265,9 +265,9 @@
          </div>
          <div style="width: calc(100% - 260px);">
            <span class="form_label">时间:</span>
            <span v-if="!item.isEdit"> {{item.time === null ? '' : item.time[0] + '~' + item.time[1]}} </span>
            <span v-if="!item.isEdit"> {{item.startTime&&item.endTime ? item.startTime + '~' + item.endTime:''}} </span>
            <span class="form_input" v-if="item.isEdit">
            <el-time-picker
            <!-- <el-time-picker
              style="width: 200px;"
              is-range
              size="small"
@@ -278,7 +278,28 @@
              start-placeholder="开始时间"
              end-placeholder="结束时间"
              placeholder="选择时间范围">
            </el-time-picker>
            </el-time-picker> -->
            <el-time-select
              placeholder="起始时间"
              v-model="item.startTime"
              size="small"
              :picker-options="{
                start: '00:00',
                step: '00:15',
                end: '24:00'
              }" style="width: 120px;">
            </el-time-select>
            <el-time-select
              style="width: 120px;"
              placeholder="结束时间"
              v-model="item.endTime"
              size="small"
              :picker-options="{
                start: '00:00',
                step: '00:15',
                end: '24:00'
              }">
            </el-time-select>
          </span>
          </div>
          <span>
@@ -695,9 +716,9 @@
        if (res.data.length > 0) {
          res.data.forEach(item => {
            item.isEdit = false
            item.time = []
            item.time.push(item.startTime)
            item.time.push(item.endTime)
            // item.time = []
            // item.time.push(item.startTime)
            // item.time.push(item.endTime)
            const index = this.timeTypeList.findIndex(val => val.value === item.shift)
            if (index > -1) {
              item.type = this.timeTypeList[index].label
@@ -727,6 +748,7 @@
        }
      }
      delete item.orderBy
      delete item.time
      const isEmpty = this.isObjectEmpty(item)
      if (isEmpty) {
        this.$message.error('请填写完整')
@@ -735,8 +757,8 @@
      let newObj = {}
      let url = ''
      newObj.shift = item.shift
      newObj.startTime = item.time[0]
      newObj.endTime = item.time[1]
      newObj.startTime = item.startTime
      newObj.endTime = item.endTime
      url = this.$api.performanceShift.shiftAdd
      if (item.id) {
        // 有id为修改