|
@@ -49,7 +49,6 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
-
|
|
|
|
<el-row
|
|
<el-row
|
|
v-for="(per, index) in persons"
|
|
v-for="(per, index) in persons"
|
|
:key="per.userName"
|
|
:key="per.userName"
|
|
@@ -101,13 +100,16 @@
|
|
@visible-change="visibleSeq"
|
|
@visible-change="visibleSeq"
|
|
>
|
|
>
|
|
<template #prefix
|
|
<template #prefix
|
|
- ><img src="@/assets/icons/shaoma.svg"
|
|
|
|
|
|
+ ><img src="@/assets/icons/shaoma.svg"
|
|
/></template>
|
|
/></template>
|
|
-<!-- <template #header>
|
|
|
|
- <el-checkbox v-model="checkAll" @change="handleCheckAll">
|
|
|
|
|
|
+ <template #header>
|
|
|
|
+ <el-checkbox
|
|
|
|
+ v-model="per.checkAll"
|
|
|
|
+ @change="handleCheckAll(per)"
|
|
|
|
+ >
|
|
全选
|
|
全选
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
- </template>-->
|
|
|
|
|
|
+ </template>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in process"
|
|
v-for="item in process"
|
|
:key="item"
|
|
:key="item"
|
|
@@ -126,6 +128,7 @@
|
|
userName: null,
|
|
userName: null,
|
|
workingHoursRate: 100,
|
|
workingHoursRate: 100,
|
|
selectedProcess: [],
|
|
selectedProcess: [],
|
|
|
|
+ checkAll: false,
|
|
})
|
|
})
|
|
"
|
|
"
|
|
/>
|
|
/>
|
|
@@ -182,31 +185,29 @@ const selectedSign = ref<any[]>([]);
|
|
const operateCondition = ref("");
|
|
const operateCondition = ref("");
|
|
|
|
|
|
const checkAll = ref(false);
|
|
const checkAll = ref(false);
|
|
-const x = () => {
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
|
|
+const x = () => {};
|
|
const process = ref([]);
|
|
const process = ref([]);
|
|
-const visibleSeq = (val) =>{
|
|
|
|
-
|
|
|
|
- if(val){
|
|
|
|
|
|
+const visibleSeq = (val) => {
|
|
|
|
+ if (val) {
|
|
process.value = processList.value;
|
|
process.value = processList.value;
|
|
- if(persons.value&&persons.value.length>0){
|
|
|
|
- for(let element of persons.value){
|
|
|
|
- if(element.selectedProcess&&element.selectedProcess.length>0){
|
|
|
|
- for(let e of element.selectedProcess){
|
|
|
|
- process.value=process.value.filter(item=>item!==e);
|
|
|
|
- }
|
|
|
|
|
|
+ if (persons.value && persons.value.length > 0) {
|
|
|
|
+ for (let element of persons.value) {
|
|
|
|
+ if (element.selectedProcess && element.selectedProcess.length > 0) {
|
|
|
|
+ for (let e of element.selectedProcess) {
|
|
|
|
+ process.value = process.value.filter((item) => item !== e);
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-}
|
|
|
|
-const handleCheckAll = (val) => {
|
|
|
|
- console.log(val);
|
|
|
|
- if (val) {
|
|
|
|
- selectedProcess.value = processList.value;
|
|
|
|
|
|
+};
|
|
|
|
+const handleCheckAll = (person) => {
|
|
|
|
+ console.log("handleCheckAll", person);
|
|
|
|
+ person.selectedProcess = [];
|
|
|
|
+ if (person.checkAll) {
|
|
|
|
+ person.selectedProcess = process.value;
|
|
} else {
|
|
} else {
|
|
- selectedProcess.value = [];
|
|
|
|
|
|
+ person.selectedProcess = [];
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
@@ -217,14 +218,21 @@ const persons = ref<
|
|
userName: string | null;
|
|
userName: string | null;
|
|
workingHoursRate: number | null;
|
|
workingHoursRate: number | null;
|
|
selectedProcess: any;
|
|
selectedProcess: any;
|
|
|
|
+ checkAll: boolean;
|
|
}[]
|
|
}[]
|
|
->([{ userName: userStore.user.username ?? "", workingHoursRate: 100,selectedProcess:[] }]);
|
|
|
|
|
|
+>([
|
|
|
|
+ {
|
|
|
|
+ userName: userStore.user.username ?? "",
|
|
|
|
+ workingHoursRate: 100,
|
|
|
|
+ selectedProcess: [],
|
|
|
|
+ checkAll: false,
|
|
|
|
+ },
|
|
|
|
+]);
|
|
|
|
|
|
const removeSeq = (item) => {
|
|
const removeSeq = (item) => {
|
|
console.log();
|
|
console.log();
|
|
- selectedProcess.value = selectedProcess.value.filter(e=>e !== item);
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
|
|
+ selectedProcess.value = selectedProcess.value.filter((e) => e !== item);
|
|
|
|
+};
|
|
const openReportWorkDrawer = () => {
|
|
const openReportWorkDrawer = () => {
|
|
checkAll.value = false;
|
|
checkAll.value = false;
|
|
selectedProcess.value = []; //需要清空已经选择的流转卡号
|
|
selectedProcess.value = []; //需要清空已经选择的流转卡号
|
|
@@ -262,7 +270,7 @@ const confirmClick = () => {
|
|
persons.value.forEach((item) => {
|
|
persons.value.forEach((item) => {
|
|
total += item.workingHoursRate ?? 0;
|
|
total += item.workingHoursRate ?? 0;
|
|
});
|
|
});
|
|
- /* if (total > 100) {
|
|
|
|
|
|
+ /* if (total > 100) {
|
|
ElMessage.error("总占比不能超过100%");
|
|
ElMessage.error("总占比不能超过100%");
|
|
return;
|
|
return;
|
|
}*/
|
|
}*/
|