From 8fc1138d2f2115121fd15b679ca1a20fc2ba838a Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 02 四月 2026 13:37:40 +0800
Subject: [PATCH] 绩效管理:工时汇总对接MES数据&人员考勤调整
---
src/views/performance/class/index.vue | 89 ++++++++++++++++++--------------------------
1 files changed, 37 insertions(+), 52 deletions(-)
diff --git a/src/views/performance/class/index.vue b/src/views/performance/class/index.vue
index ca34134..0210486 100644
--- a/src/views/performance/class/index.vue
+++ b/src/views/performance/class/index.vue
@@ -265,10 +265,26 @@
<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" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
+ <el-select v-model="schedulingQuery.userId" popper-class="select-with-all" placeholder="璇烽�夋嫨" style="width: 100%" multiple collapse-tags clearable>
+<!-- <el-option v-for="item in personList" :key="item.id" :label="item.name" :value="item.id">-->
+<!-- </el-option>-->
+ <template slot="prefix">
+ <el-button
+ type="text"
+ size="mini"
+ @click="handleSelectAll"
+ style="margin: 4px 0;"
+ >
+ {{ isAllSelected ? '鍙栨秷鍏ㄩ��' : '鍏ㄩ��' }}
+ </el-button>
+ <el-divider style="margin: 5px 0;" />
+ </template>
+ <el-option
+ v-for="item in personList"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id"
+ />
</el-select>
</div>
</div>
@@ -308,6 +324,7 @@
editAnnotationText,
delAnnotationText
} from "@/api/performance/class";
+import {getWorkMonth} from "@/utils/date";
export default {
name: 'Class',
data() {
@@ -316,8 +333,7 @@
userName: "",
laboratory: "",
year: new Date(),
- month: new Date().getMonth() + 1,
- // month:''
+ month: getWorkMonth().month()+1,
},
monthOptions: [
{
@@ -378,7 +394,7 @@
loading: false,
schedulingQuery: {
week: "",
- userId: null,
+ userId: [],
shift: "",
},
list: [],
@@ -399,6 +415,11 @@
menuY: 0,
selectedTarget: null,
};
+ },
+ computed:{
+ isAllSelected() {
+ return this.schedulingQuery.userId.length === this.personList.length && this.personList.length > 0;
+ },
},
watch: {
@@ -423,6 +444,14 @@
document.removeEventListener('click', this.handleClickOutside)
},
methods: {
+ handleSelectAll() {
+ if (this.isAllSelected) {
+ this.schedulingQuery.userId = [];
+ } else {
+ // 鍙�変腑鍙敤閫夐」鐨剉alue
+ this.schedulingQuery.userId = this.personList.map(item => item.id);
+ }
+ },
handleContextMenu(target,e) {
// 闃绘娴忚鍣ㄩ粯璁ゅ彸閿彍鍗�
e.preventDefault()
@@ -526,40 +555,6 @@
this.initYear();
}
},
- transFromNumber(num) {
- let changeNum = [
- "闆�",
- "涓�",
- "浜�",
- "涓�",
- "鍥�",
- "浜�",
- "鍏�",
- "涓�",
- "鍏�",
- "涔�",
- ]; //changeNum[0] = "闆�"
- let unit = ["", "鍗�", "鐧�", "鍗�", "涓�"];
- num = parseInt(num);
- let getWan = (temp) => {
- let strArr = temp.toString().split("").reverse();
- let newNum = "";
- for (var i = 0; i < strArr.length; i++) {
- newNum =
- (i == 0 && strArr[i] == 0
- ? ""
- : i > 0 && strArr[i] == 0 && strArr[i - 1] == 0
- ? ""
- : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i])) +
- newNum;
- }
- return newNum;
- };
- let overWan = Math.floor(num / 10000);
- let noWan = num % 10000;
- if (noWan.toString().length < 4) noWan = "0" + noWan;
- return overWan ? getWan(overWan) + "涓�" + getWan(noWan) : getWan(num);
- },
init() {
this.pageLoading = true;
let year = this.query.year.getFullYear();
@@ -574,16 +569,6 @@
}).then((res) => {
this.pageLoading = false;
this.list = res.data.page
- // this.list = res.data.page.map((item) => {
- // for (let key in item.monthlyAttendance) {
- // let type = this.getDayByDic(key);
- // if (type != undefined || type != null) {
- // item[`day${type}`] = item.monthlyAttendance[key];
- // }
- // }
- // return item;
- // });
- console.log(this.list)
let headerList = res.data.headerList;
this.weeks = [];
headerList.forEach((item) => {
@@ -649,7 +634,7 @@
this.schedulingVisible = false;
this.schedulingQuery = {
week: "",
- userId: null,
+ userId: [],
shift: "",
};
this.refresh();
--
Gitblit v1.9.3