From 0851bd8b66a6c57f3f42beac0fd45a81befbde9b Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 24 七月 2024 16:55:01 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master

---
 src/components/view/b3-classes.vue |   31 +++++++++++--------------------
 1 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/src/components/view/b3-classes.vue b/src/components/view/b3-classes.vue
index f68711f..49493b3 100644
--- a/src/components/view/b3-classes.vue
+++ b/src/components/view/b3-classes.vue
@@ -619,12 +619,19 @@
     },
     getTimeList () {
       this.configTimeVisibleLoading = true
-      this.$axios.get(this.$api.performanceShift.getList).then(res => {
-        if (res.code === 200) {
-          this.timeQuery = res.data
-          this.timeQuery.forEach(item => {
+      this.$axios.post(this.$api.performanceShift.getList).then(res => {
+        if (res.code == 201) return
+        if (res.data.length > 0) {
+          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 +695,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