Merge branch 'dev0124' into dev0515

This commit is contained in:
zhangsir
2024-06-26 11:18:24 +08:00
2 changed files with 44 additions and 7 deletions

View File

@@ -128,7 +128,7 @@
<div class="dialog_body_text">
本功能针对学员所在组织岗位职级自动匹配成长路径完成本路径方可晋升
</div>
<div class="dialog_body_btn" @click="checkedVisible">
<div @click="centerDialogVisible = false" class="dialog_body_btn">
<span>我已阅读</span>
</div>
<div class="dialog_body_foot">
@@ -175,7 +175,9 @@ export default {
}
},
watch:{
checked(){
this.checkedVisible()
}
},
methods: {
startLearn(){
@@ -189,7 +191,7 @@ export default {
this.checked = localStorage.getItem("checkedGrowth") === "false"
},
checkedVisible(){
this.centerDialogVisible = false
// this.centerDialogVisible = false
localStorage.setItem("checkedGrowth",!this.checked)
},
},

View File

@@ -237,7 +237,7 @@
<div class="body_left" :title="item.isOtherPosition == 1 ? item.positionName + '(' + item.organizationName + ')' : item.positionName">{{ item.isOtherPosition == 1 ? item.positionName + '(' + item.organizationName + ')' : item.positionName }}</div>
</div>
<div class="body_right">
<div class="body_item" v-for="t,i in item.bandCodes">
<div class="body_item" :style="{width: (142 * t.number) + 'px'}" v-for="t,i in item.bandCodes">
<img v-if="(t && t.isMajorPosition) " src="../../assets/images/growth/CurrentPath.png" alt="">
<img @click="goLearnPath(t)" v-else-if="(t && t.permission)" src="../../assets/images/growth/NoPermissionPath.png" alt="">
<!-- <img v-else-if="!(t && t.permission)" src="../../assets/images/growth/OtherPath.png" alt=""> -->
@@ -476,13 +476,48 @@ export default {
const codeTrimmed = code.trim();
const index = bandCodeIndexMap.get(codeTrimmed);
if (index !== undefined) {
integratedDataMap.get(key).bandCodes[index] = { growId: item.growId, permission: item.permission ,isMajorPosition:item.isMajorPosition ,growName:item.growName };
integratedDataMap.get(key).bandCodes[index] = { growId: item.growId, permission: item.permission ,isMajorPosition:item.isMajorPosition ,growName:item.growName ,colspan: item.colspan };
}
});
});
const integratedDataArray = Array.from(integratedDataMap.values());
console.log(integratedDataArray,'integratedDataArray')
const mergeById = (array) => {
const result = [];
let currentGroup = null;
array.forEach(item => {
if (item === null) {
if (currentGroup && currentGroup.growId !== null) {
result.push(currentGroup);
currentGroup = null;
}
if (!currentGroup) {
currentGroup = { growId: null, number: 1, ...item };
} else {
currentGroup.number++;
}
} else {
if (!currentGroup || currentGroup.growId !== item.growId) {
if (currentGroup) {
result.push(currentGroup);
}
currentGroup = { growId: item.growId, number: 1, ...item };
} else {
currentGroup.number++;
}
}
});
if (currentGroup) {
result.push(currentGroup);
}
return result;
};
integratedDataArray.forEach(item => {
item.bandCodes = mergeById(item.bandCodes);
});
console.log(integratedDataArray, 'integratedDataArray');
return integratedDataArray;
},
toggleFlag() {