mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-14 05:16:46 +08:00
合并
This commit is contained in:
@@ -25,16 +25,16 @@
|
||||
<view class="table-container">
|
||||
<table width="100%">
|
||||
<thead>
|
||||
<tr style="background: #F0F6FC;">
|
||||
<tr style="background: #F0F6FC;display: flex;align-items: center;">
|
||||
<th class="first" align="center"><view class="text">
|
||||
</view></th>
|
||||
<th v-for="item in titleList" align="center">{{ item.title }}</th>
|
||||
<th class="item1" v-for="item in titleList" align="center">{{ item.title }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item,index in preparedData" :key="index">
|
||||
<tr style="display: flex;align-items: center;" v-for="item,index in preparedData" :key="index">
|
||||
<td class="first" align="center"><view class="text">{{ item.isOtherPosition == 1 ? item.positionName + '(' + item.organizationName + ')' : item.positionName }}</view></td>
|
||||
<td align="center" v-for="t,i in item.bandCodes">
|
||||
<td :style="{width: 222 * t.number + 'rpx'}" class="item" align="center" v-for="t,i in item.bandCodes">
|
||||
<image
|
||||
v-if="(t && t.isMajorPosition) "
|
||||
src="@/static/images/learnpath/thispath.png"
|
||||
@@ -150,6 +150,41 @@
|
||||
});
|
||||
});
|
||||
const integratedDataArray = Array.from(integratedDataMap.values());
|
||||
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;
|
||||
},
|
||||
@@ -176,22 +211,23 @@
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border: 2rpx solid #F0F6FC;
|
||||
}
|
||||
|
||||
th {
|
||||
/* th {
|
||||
padding: 12px 20px;
|
||||
text-align: center;
|
||||
border: 2rpx solid #F0F6FC;
|
||||
background: #F0F6FC;
|
||||
}
|
||||
td{
|
||||
} */
|
||||
/* td{
|
||||
padding: 12px 16px;
|
||||
text-align: center;
|
||||
border: 2rpx solid #F0F6FC;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
} */
|
||||
|
||||
th {
|
||||
font-weight: bold;
|
||||
@@ -202,10 +238,39 @@
|
||||
text-align: center;
|
||||
.text{
|
||||
width: 212rpx;
|
||||
border-collapse: collapse;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
}
|
||||
|
||||
.item1{
|
||||
/* padding: 12px 20px; */
|
||||
width: 220rpx;
|
||||
min-height: 100rpx;
|
||||
text-align: center;
|
||||
border: 2rpx solid #F0F6FC;
|
||||
background: #F0F6FC;
|
||||
font-weight: bold;
|
||||
color: #387DF7;
|
||||
font-weight: bold;
|
||||
border-collapse: collapse;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.item{
|
||||
width: 220rpx;
|
||||
min-height: 120rpx;
|
||||
text-align: center;
|
||||
border: 2rpx solid #F0F6FC;
|
||||
border-bottom: none;
|
||||
background-color: #ffffff;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
border-collapse: collapse;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
tbody tr:nth-child(odd) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
<view class="item_text">
|
||||
本功能针对学员所在组织、岗位、职级自动匹配成长路径,完成本路径方可晋升
|
||||
</view>
|
||||
<view class="item_btn" @click="outLearnModal">
|
||||
<view class="item_btn" @click="learnModal = false">
|
||||
我已阅读
|
||||
</view>
|
||||
<view class="item_check">
|
||||
@@ -444,6 +444,11 @@
|
||||
$this.loadStatus = 'noMore';
|
||||
}, 500);
|
||||
},
|
||||
watch: {
|
||||
checked(){
|
||||
this.outLearnModal()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goLearn() {
|
||||
uni.navigateTo({
|
||||
@@ -465,7 +470,7 @@
|
||||
this.checked = value
|
||||
},
|
||||
outLearnModal() {
|
||||
this.learnModal = false
|
||||
// this.learnModal = false
|
||||
localStorage.setItem("checkedTrue",!this.checked)
|
||||
},
|
||||
reSetList() {
|
||||
|
||||
Reference in New Issue
Block a user