From cc6914dff1a91dd00e3a86d5daae2c3dba2d6ba8 Mon Sep 17 00:00:00 2001 From: gaoluyang <gaoluyang@rengu.cc> Date: 星期三, 24 七月 2024 16:28:00 +0800 Subject: [PATCH] 检测中心-班次时间配置功能 --- src/components/view/b3-classes.vue | 26 ++++++++------------------ 1 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/components/view/b3-classes.vue b/src/components/view/b3-classes.vue index d94b6cc..12b8b15 100644 --- a/src/components/view/b3-classes.vue +++ b/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() -- Gitblit v1.9.3