gaoluyang
2024-07-24 cc6914dff1a91dd00e3a86d5daae2c3dba2d6ba8
src/components/view/b3-classes.vue
@@ -621,10 +621,16 @@
      this.configTimeVisibleLoading = true
      this.$axios.post(this.$api.performanceShift.getList).then(res => {
        if (res.code === 200) {
          this.timeQuery = res.data
          this.timeQuery.forEach(item => {
          res.data.forEach(item => {
            item.isEdit = false
            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
            }
          })
          this.timeQuery = res.data
        }
        this.configTimeVisibleLoading = false
      }).catch(e => {
@@ -688,22 +694,6 @@
    },
    isObjectEmpty(obj) {
      return Object.keys(obj).some(key => !obj[key]);
    },
    saveTimeQuery () {
      this.timeQuery.forEach(item => {
        if (this.isObjectEmpty(item)) {
          return this.$message.error('请填写完整')
        }
      })
      console.log('???')
    },
    closeConfigTimeVisible () {
      this.configTimeVisible = false
      this.timeQuery = [{
        type: '',
        time: null,
        isEdit: false
      }]
    },
    handleDown(){
      let year = this.query.year.getFullYear()