From 76ee1461de967601706a1d65229b10f3a86c2714 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期一, 13 五月 2024 15:03:02 +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 |   73 ++++++++++++++++++++----------------
 1 files changed, 41 insertions(+), 32 deletions(-)

diff --git a/src/components/view/b3-classes.vue b/src/components/view/b3-classes.vue
index 6628607..168bb7b 100644
--- a/src/components/view/b3-classes.vue
+++ b/src/components/view/b3-classes.vue
@@ -10,6 +10,7 @@
           size="small"
           format="yyyy"
           placeholder="閫夋嫨骞�"
+          @change="refreshTable()"
           style="width: 140px;"
           :clearable="false">
         </el-date-picker>
@@ -18,7 +19,8 @@
         clearable
         placeholder="閫夋嫨鏈�"
         style="width: 140px;margin-left: 16px;"
-        size="small">
+        size="small"
+        @change="refreshTable()">
           <el-option
             v-for="item in monthOptions"
             :key="item.value"
@@ -26,8 +28,8 @@
             :value="item.value">
           </el-option>
         </el-select>
-        <el-input v-model="query.userName" placeholder="璇疯緭鍏ヤ汉鍛樺悕绉�" size="small" style="width: 140px;margin: 0 16px;" clearable ></el-input>
-        <el-select v-model="query.laboratory" placeholder="璇烽�夋嫨瀹為獙瀹�" style="width: 140px;" size="small" clearable >
+        <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-option
             v-for="item in laboratory"
             :key="item.value"
@@ -47,7 +49,7 @@
     </div>
   </div>
   <div class="center" v-loading="pageLoading">
-    <scroll-pagination @load="init" :finishLoding="finishLoding" v-show="query.month&&list.length>0">
+    <scroll-pagination @load="init" :finishLoding="finishLoding" v-show="query.month&&list.length>0" style="height: 100%;" :key="'123'">
       <div class="clearfix">
         <div class="fixed-left">
           <div class="content-title" style="padding-left: 16px;box-sizing: border-box;">
@@ -73,7 +75,7 @@
                 <span class="month" style="position: absolute;top: 4px;" v-if="item.week=='鍛ㄦ棩'">{{ item.weekNum }}鍛�</span>
                 <p style="height: 26px;position: absolute;bottom: 12px;">
                   <span class="day">{{ item.day }}</span>
-                  <span class="week">{{ item.week }}</span>
+                  <span class="week">{{ item.week.charAt(1) }}</span>
                 </p>
               </div>
             </div>
@@ -81,13 +83,13 @@
             v-on:mouseenter="onMouseEnter(index)"
           v-on:mouseleave="currentUserIndex=null">
               <div class="content-body-item" v-for="(m,i) in item.list" :key="'d'+i" :class="{hoverType:currentUserIndex==index}">
-                <div class="work-box" :class="{type0:m.shift==='0',type1:m.shift==='1',type2:m.shift==='2',type3:m.shift==='3',type4:m.shift==='4',}">
+                <div class="work-box" :class="{type0:m.shift==='0',type1:m.shift==='1',type2:m.shift==='2',type3:m.shift==='3',type4:m.shift==='4',type5:m.shift==='5',}">
                   <!-- <div class="work-box-left">
                     <span>{{ getShiftByDic(m.shift) }}</span>
                   </div> -->
                   <el-dropdown trigger="click" placement="bottom" @command="e=>handleCommand(e,m)" :disabled="!downPower">
                     <!-- <i class="el-icon-arrow-down el-icon--right" style="font-size: 20px;color: #fff;cursor: pointer;"></i> -->
-                    <span style="cursor: pointer;">{{ getShiftByDic(m.shift) }}</span>
+                    <span style="cursor: pointer;" :style="`opacity: ${getShiftByDic(m.shift)=='鏃�'?0:1};`">{{ getShiftByDic(m.shift) }}</span>
                     <el-dropdown-menu slot="dropdown">
                       <el-dropdown-item v-for="(n,j) in classType" :key="'h'+j" :command="n.value">{{ n.label }}</el-dropdown-item>
                     </el-dropdown-menu>
@@ -99,7 +101,7 @@
         </div>
       </div>
     </scroll-pagination>
-    <scroll-pagination @load="initYear" :finishLoding="finishLoding" v-show="!query.month&&list.length>0" style="width: 100%;">
+    <scroll-pagination @load="initYear" :finishLoding="finishLoding" v-show="!query.month&&yearList.length>0" style="width: 100%;" :key="'111'">
       <div class="clearfix year-table">
       <div class="fixed-left">
         <div class="content-title" style="padding-left: 16px;box-sizing: border-box;">
@@ -146,23 +148,23 @@
       </div>
     </div>
     </scroll-pagination>
-    <span style="color:#909399;font-size:14px;position: absolute;left:50%;top: 50%;transform: translate(-59%,-50%);" v-if="list.length==0">鏆傛棤鏁版嵁</span>
+    <span style="color:#909399;font-size:14px;position: absolute;left:50%;top: 50%;transform: translate(-59%,-50%);" v-if="(query.month&&list.length==0)||(!query.month&&yearList.length==0)">鏆傛棤鏁版嵁</span>
   </div>
   <el-dialog title="鎺掔彮" :visible.sync="schedulingVisible" width="400px">
     <div class="search_thing">
-      <div class="search_label" style="width:90px">鍛ㄦ锛�</div>
-      <div class="search_input">
+      <div class="search_label" style="width:90px"><span style="color: red;margin-right: 4px;">*</span>鍛ㄦ锛�</div>
+      <div class="search_input" style="width: calc(100% - 90px);">
         <el-date-picker
           v-model="schedulingQuery.week"
           type="week"
           format="yyyy 绗� WW 鍛�"
-          placeholder="閫夋嫨鍛ㄦ" style="width: 203px;">
+          placeholder="閫夋嫨鍛ㄦ" style="width: 100%">
         </el-date-picker>
       </div>
     </div>
     <div class="search_thing">
-      <div class="search_label" style="width:90px">浜哄憳鍚嶇О锛�</div>
-      <div class="search_input">
+      <div class="search_label" style="width:90px"><span style="color: red;margin-right: 4px;">*</span>浜哄憳鍚嶇О锛�</div>
+      <div class="search_input" style="width: calc(100% - 90px);">
         <el-select v-model="schedulingQuery.userId" placeholder="璇烽�夋嫨" style="width: 100%;" multiple clearable collapse-tags >
           <el-option
             v-for="item in personList"
@@ -174,8 +176,8 @@
       </div>
     </div>
     <div class="search_thing">
-      <div class="search_label" style="width:90px">鐝锛�</div>
-      <div class="search_input">
+      <div class="search_label" style="width:90px"><span style="color: red;margin-right: 4px;">*</span>鐝锛�</div>
+      <div class="search_input" style="width: calc(100% - 90px);">
         <el-select v-model="schedulingQuery.shift" placeholder="璇烽�夋嫨" style="width: 100%;">
           <el-option
             v-for="item in classType"
@@ -301,13 +303,13 @@
     //   }
     //   this.monthList.reverse()
     // },
-    'query.month'(val){
-      if(!val){
-        this.currentPage = 1;
-        this.yearList = []
-        this.initYear()
-      }
-    }
+    // 'query.month'(val){
+    //   if(!val){
+    //     this.currentPage = 1;
+    //     this.yearList = []
+    //     this.initYear()
+    //   }
+    // }
   },
   mounted(){
     this.selectEnumByCategory()
@@ -343,12 +345,12 @@
       }
     },
     refreshTable(){
-      this.list = [];
-      this.yearList = []
       this.currentPage = 1
       if(this.query.month){
+        this.list = [];
         this.init()
       }else{
+        this.yearList = []
         this.initYear()
       }
     },
@@ -430,7 +432,6 @@
               let obj = {}
               for (let key in item.month[m]) {
                 let type = this.getDayByDic(key)
-                console.log(type)
                 if(type!=undefined||type!=null){
                   obj[`day${type}`] = item.month[m][key]
                 }
@@ -582,7 +583,7 @@
       if(obj){
         return obj.label
       }
-      return '鏈帓鐝�'
+      return '鏃�'
     }
   }
 }
@@ -619,17 +620,17 @@
 }
 .center {
   width: 100%;
-  height: calc(100% - 40px );
+  height: calc(100% - 50px );
   background-color: #fff;
   overflow-y: auto;
   display: flex;
 }
 >>>.scroll-pagination{
   overflow-y: scroll;
-  scrollbar-width: none; /* 瀵逛簬 Firefox 鍜� IE 鐨勫吋瀹瑰啓娉� */
+  scrollbar-width: none;
 }
 >>>.scroll-pagination::-webkit-scrollbar {
-  display: none; /* 瀵逛簬 Chrome, Safari 鍜� Opera 鐨勫啓娉� */
+  display: none;
 }
 .fixed-left {
   float: left;
@@ -663,7 +664,7 @@
 }
 .content-title-item{
   height: 100%;
-  width: 60px;
+  width: 50px;
   flex-shrink: 0;
   border-bottom: 1px solid #EEEEEE;
   box-sizing: border-box;
@@ -698,8 +699,9 @@
 }
 .content-body-item{
   height: 70px;
-  width: 60px;
+  width: 50px;
   flex-shrink: 0;
+  font-size: 12px;
   box-sizing: border-box;
   padding: 4px;
   border-right: 1px solid #EEEEEE;
@@ -751,6 +753,13 @@
 .work-box.type4 span{
   color: #F56C6C !important;
 }
+.work-box.type5{
+  background: #ff46c145;
+  color: #ff46c0 !important;
+}
+.work-box.type5 span{
+  color: #ff46c0 !important;
+}
 /* .el-icon-arrow-down::before{
   color: #c6c4c4;
 } */

--
Gitblit v1.9.3