mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-08 10:26:43 +08:00
Merge branch 'dev0124' into dev0515
This commit is contained in:
@@ -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)
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user