From d40e875d8e025fd09566e919306f5b05755c25cb Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期六, 11 五月 2024 14:51:17 +0800 Subject: [PATCH] x优化班次 --- src/components/view/b3-classes.vue | 53 +++++++++++++++++++++++++++-------------------------- 1 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/components/view/b3-classes.vue b/src/components/view/b3-classes.vue index 6628607..2d9ffd5 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;"> @@ -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] } @@ -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; -- Gitblit v1.9.3