mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
全岗位
This commit is contained in:
@@ -193,17 +193,17 @@
|
|||||||
<span>当前路径</span>
|
<span>当前路径</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="otherImg">
|
<div class="otherImg">
|
||||||
<img src="../../assets/images/growth/OtherPath.png" alt="">
|
<img src="../../assets/images/growth/NoPermissionPath.png" alt="">
|
||||||
<span>其他路径</span>
|
<span>其他路径</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="otherImg">
|
<div class="otherImg">
|
||||||
<img src="../../assets/images/growth/NoPermissionPath.png" alt="">
|
<img src="../../assets/images/growth/OtherPath.png" alt="">
|
||||||
<span>其他路径(无权限)</span>
|
<span>其他路径(无权限)</span>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<el-table :data="gridData" border :span-method="arraySpanMethod" style="width: 100%">
|
<!-- <el-table :data="pathData.growFullPositionPathBoItemList" border :span-method="arraySpanMethod" style="width: 100%">
|
||||||
<el-table-column fixed align="center" property="name" width="120" label=""></el-table-column>
|
<el-table-column fixed align="center" property="bandCodes" width="120" label=""></el-table-column>
|
||||||
<el-table-column align="center" label="band1">
|
<el-table-column align="center" v-for="item in titleList" :label="item.props">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.marketStatus === 0"><img src="../../assets/images/growth/CurrentPath.png" alt=""></span>
|
<span v-if="scope.row.marketStatus === 0"><img src="../../assets/images/growth/CurrentPath.png" alt=""></span>
|
||||||
<span v-else-if="scope.row.marketStatus === 1">
|
<span v-else-if="scope.row.marketStatus === 1">
|
||||||
@@ -212,46 +212,40 @@
|
|||||||
<span v-else><img src="../../assets/images/growth/NoPermissionPath.png" alt=""></span>
|
<span v-else><img src="../../assets/images/growth/NoPermissionPath.png" alt=""></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="band2">
|
</el-table> -->
|
||||||
|
<!-- <el-table :data="preparedData" border style="width: 100%">
|
||||||
|
<el-table-column fixed align="center" property="organizationName" width="120" label=""></el-table-column>
|
||||||
|
<el-table-column v-for="(column, index) in preparedData.bandCodes" :key="index" :label="column.growId" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.saleStatus === 0"><img src="../../assets/images/growth/CurrentPath.png" alt=""></span>
|
<span v-if="scope.row[column.statusKey] == 1">
|
||||||
<span v-else-if="scope.row.saleStatus === 1">
|
<div>职位名称:{{ scope.row.positionName }}, 组织名称:{{ scope.row.organizationName }}</div>
|
||||||
<img src="../../assets/images/growth/OtherPath.png" alt="">
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
<div>职位名称:{{ scope.row.positionName }}, 组织名称:{{ scope.row.organizationName }}</div>
|
||||||
</span>
|
</span>
|
||||||
<span v-else><img src="../../assets/images/growth/NoPermissionPath.png" alt=""></span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="band3">
|
</el-table> -->
|
||||||
<template slot-scope="scope">
|
<div class="table_box">
|
||||||
<span v-if="scope.row.productStatus === 0"><img src="../../assets/images/growth/CurrentPath.png"
|
<div class="title">
|
||||||
alt=""></span>
|
<div v-for="title,index in titleList">
|
||||||
<span v-else-if="scope.row.productStatus === 1">
|
<div class="title_item">{{ title.title }}</div>
|
||||||
<img src="../../assets/images/growth/OtherPath.png" alt="">
|
</div>
|
||||||
</span>
|
</div>
|
||||||
<span v-else><img src="../../assets/images/growth/NoPermissionPath.png" alt=""></span>
|
<div class="body" v-for="(item,index) in preparedData">
|
||||||
</template>
|
<div>
|
||||||
</el-table-column>
|
<div class="body_left" :title="item.isOtherPosition == 1 ? item.positionName + '(' + item.organizationName + ')' : item.positionName">{{ item.isOtherPosition == 1 ? item.positionName + '(' + item.organizationName + ')' : item.positionName }}</div>
|
||||||
<el-table-column align="center" label="band4">
|
</div>
|
||||||
<template slot-scope="scope">
|
<div class="body_right">
|
||||||
<span v-if="scope.row.FAEStatusL === 0"><img src="../../assets/images/growth/CurrentPath.png" alt=""></span>
|
<div class="body_item" v-for="t,i in item.bandCodes">
|
||||||
<span v-else-if="scope.row.FAEStatusL === 1">
|
<img v-if="(t && t.isMajorPosition) " src="../../assets/images/growth/CurrentPath.png" alt="">
|
||||||
<img src="../../assets/images/growth/OtherPath.png" alt="">
|
<img v-else-if="(t && t.permission)" src="../../assets/images/growth/NoPermissionPath.png" alt="">
|
||||||
</span>
|
<img v-else-if="!(t && t.permission)" src="../../assets/images/growth/OtherPath.png" alt="">
|
||||||
<span v-else><img src="../../assets/images/growth/NoPermissionPath.png" alt=""></span>
|
<span v-else></span>
|
||||||
</template>
|
</div>
|
||||||
</el-table-column>
|
</div>
|
||||||
<el-table-column align="center" label="band5">
|
</div>
|
||||||
<template slot-scope="scope">
|
</div>
|
||||||
<span v-if="scope.row.salesManagement === 0"><img src="../../assets/images/growth/CurrentPath.png"
|
|
||||||
alt=""></span>
|
|
||||||
<span v-else-if="scope.row.salesManagement === 1">
|
|
||||||
<img src="../../assets/images/growth/OtherPath.png" alt="">
|
|
||||||
</span>
|
|
||||||
<span v-else><img src="../../assets/images/growth/NoPermissionPath.png" alt=""></span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-drawer title="信息概况" :visible="drawer" size="40%">
|
<el-drawer title="信息概况" :visible="drawer" size="40%">
|
||||||
<div style="padding:0 40px;">
|
<div style="padding:0 40px;">
|
||||||
@@ -264,7 +258,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<el-backtop :bottom="700" :right="200">
|
<el-backtop :bottom="700" :right="200" visibility-height="700">
|
||||||
<div class="back-to-top">
|
<div class="back-to-top">
|
||||||
<div class="img"></div>
|
<div class="img"></div>
|
||||||
<div class="text">继续学习之旅</div>
|
<div class="text">继续学习之旅</div>
|
||||||
@@ -409,6 +403,9 @@ export default {
|
|||||||
FAEStatusL: 0,
|
FAEStatusL: 0,
|
||||||
salesManagement: 1
|
salesManagement: 1
|
||||||
}],
|
}],
|
||||||
|
pathData: [],
|
||||||
|
titleList: [],
|
||||||
|
preparedData: [],
|
||||||
drawer: false,
|
drawer: false,
|
||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
};
|
};
|
||||||
@@ -440,10 +437,49 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
getFullJobPath().then(res=>{
|
getFullJobPath().then(res=>{
|
||||||
console.log(res,'res')
|
if(res.code == 200){
|
||||||
|
this.pathData = res.data
|
||||||
|
this.titleList = this.pathData.allBandCodeList
|
||||||
|
this.preparedData = this.integrateTableData(this.pathData);
|
||||||
|
this.titleList = this.titleList.map(item=>({
|
||||||
|
title: item,
|
||||||
|
}))
|
||||||
|
this.titleList.unshift({
|
||||||
|
title: ''
|
||||||
|
})
|
||||||
|
// console.log(this.pathData.growFullPositionPathBoItemList,'pathData')
|
||||||
|
console.log(this.titleList,'titleList')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
integrateTableData(data) {
|
||||||
|
const { growFullPositionPathBoItemList, allBandCodeList } = data;
|
||||||
|
const bandCodeIndexMap = new Map(allBandCodeList.map((code, index) => [code, index]));
|
||||||
|
const integratedDataMap = new Map();
|
||||||
|
growFullPositionPathBoItemList.flat().forEach(item => {
|
||||||
|
const key = `${item.positionName}-${item.organizationName}-${item.isOtherPosition}`;
|
||||||
|
|
||||||
|
if (!integratedDataMap.has(key)) {
|
||||||
|
integratedDataMap.set(key, {
|
||||||
|
positionName: item.positionName,
|
||||||
|
organizationName: item.organizationName,
|
||||||
|
isOtherPosition: item.isOtherPosition,
|
||||||
|
bandCodes: new Array(allBandCodeList.length).fill(null),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
item.bandCodes.split(',').forEach(code => {
|
||||||
|
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 };
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
const integratedDataArray = Array.from(integratedDataMap.values());
|
||||||
|
console.log(integratedDataArray,'integratedDataArray')
|
||||||
|
return integratedDataArray;
|
||||||
|
},
|
||||||
toggleFlag() {
|
toggleFlag() {
|
||||||
this.flagToggle = this.flagToggle === 2 ? 3 : 2;
|
this.flagToggle = this.flagToggle === 2 ? 3 : 2;
|
||||||
this.flagToggleTwo = this.flagToggleTwo === 2 ? 3 : 2;
|
this.flagToggleTwo = this.flagToggleTwo === 2 ? 3 : 2;
|
||||||
@@ -682,6 +718,54 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.table_box{
|
||||||
|
// width: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
|
border: 1px solid #F0F6FC;
|
||||||
|
border-radius: 4px 4px 0px 0px;
|
||||||
|
.title{
|
||||||
|
display: flex;
|
||||||
|
.title_item{
|
||||||
|
background: #F0F6FC;
|
||||||
|
width: 142px;
|
||||||
|
height: 88px;
|
||||||
|
line-height: 88px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #F0F6FC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.body{
|
||||||
|
display: flex;
|
||||||
|
.body_left{
|
||||||
|
padding: 0 2px;
|
||||||
|
width: 142px;
|
||||||
|
height: 88px;
|
||||||
|
border: 1px solid #F0F6FC;
|
||||||
|
line-height: 88px;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.body_right{
|
||||||
|
display: flex;
|
||||||
|
.body_item{
|
||||||
|
width: 142px;
|
||||||
|
height: 88px;
|
||||||
|
border: 1px solid #F0F6FC;
|
||||||
|
line-height: 88px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
.back-to-top{
|
.back-to-top{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user