mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-14 13:26:47 +08:00
全路径
This commit is contained in:
@@ -6,3 +6,5 @@ export const taskList = (id) => ajax.get(`/manageApi/stu/grow/taskList?growId=${
|
|||||||
export const getAllPosition = () => ajax.get(`/manageApi/admin/thirdApi/getAllPosition`)
|
export const getAllPosition = () => ajax.get(`/manageApi/admin/thirdApi/getAllPosition`)
|
||||||
// 获取职级
|
// 获取职级
|
||||||
export const getAllBandInfo = () => ajax.get(`/manageApi/admin/thirdApi/getAllBandInfo`)
|
export const getAllBandInfo = () => ajax.get(`/manageApi/admin/thirdApi/getAllBandInfo`)
|
||||||
|
//全岗位路径
|
||||||
|
export const getFullJobPath = () => ajax.get(`/manageApi/stu/grow/getFullJobPath`);
|
||||||
@@ -14,116 +14,44 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<image class="img" src="../../static/images/learnpath/otherpath.png" mode=""></image>
|
<image class="img" src="../../static/images/learnpath/otherpath.png" mode=""></image>
|
||||||
<text class="text">当前路径</text>
|
<text class="text">其他路径</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<image class="img" src="../../static/images/learnpath/notpath.png" mode=""></image>
|
<image class="img" src="../../static/images/learnpath/notpath.png" mode=""></image>
|
||||||
<text class="text">当前路径</text>
|
<text class="text">其他路径(无权限)</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="table">
|
<view class="table">
|
||||||
<view class="table-container">
|
<view class="table-container">
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr style="background: #F0F6FC;">
|
||||||
<th class="first" align="center"><view class="text">
|
<th class="first" align="center"><view class="text">
|
||||||
name
|
|
||||||
</view></th>
|
</view></th>
|
||||||
<th align="center">Band1</th>
|
<th v-for="item in titleList" align="center">{{ item.title }}</th>
|
||||||
<th align="center">Band2</th>
|
|
||||||
<th align="center">Band3</th>
|
|
||||||
<th align="center">Band4</th>
|
|
||||||
<th align="center">Band5</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="row in gridData" :key="row.id">
|
<tr v-for="item,index in preparedData" :key="index">
|
||||||
<td class="first" align="center"><view class="text">{{ row.name }}</view></td>
|
<td class="first" align="center"><view class="text">{{ item.isOtherPosition == 1 ? item.positionName + '(' + item.organizationName + ')' : item.positionName }}</view></td>
|
||||||
<td align="center">
|
<td align="center" v-for="t,i in item.bandCodes">
|
||||||
<image
|
<image
|
||||||
v-if="row.marketStatus === 0"
|
v-if="(t && t.isMajorPosition) "
|
||||||
src="@/static/images/learnpath/thispath.png"
|
src="@/static/images/learnpath/thispath.png"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-else-if="row.marketStatus === 1"
|
v-else-if="(t && t.permission)"
|
||||||
src="@/static/images/learnpath/otherpath.png"
|
src="@/static/images/learnpath/otherpath.png"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-else
|
v-else-if="!(t && t.permission)"
|
||||||
src="@/static/images/learnpath/notpath.png"
|
src="@/static/images/learnpath/notpath.png"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
/>
|
/>
|
||||||
|
<text v-else></text>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
|
||||||
<image
|
|
||||||
v-if="row.saleStatus === 0"
|
|
||||||
src="@/static/images/learnpath/thispath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
<image
|
|
||||||
v-else-if="row.saleStatus === 1"
|
|
||||||
src="@/static/images/learnpath/otherpath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
<image
|
|
||||||
v-else
|
|
||||||
src="@/static/images/learnpath/notpath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<image
|
|
||||||
v-if="row.productStatus === 0"
|
|
||||||
src="@/static/images/learnpath/thispath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
<image
|
|
||||||
v-else-if="row.productStatus === 1"
|
|
||||||
src="@/static/images/learnpath/otherpath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
<image
|
|
||||||
v-else
|
|
||||||
src="@/static/images/learnpath/notpath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<image
|
|
||||||
v-if="row.FAEStatusL === 0"
|
|
||||||
src="@/static/images/learnpath/thispath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
<image
|
|
||||||
v-else-if="row.FAEStatusL === 1"
|
|
||||||
src="@/static/images/learnpath/otherpath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
<image
|
|
||||||
v-else
|
|
||||||
src="@/static/images/learnpath/notpath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<image
|
|
||||||
v-if="row.salesManagement === 0"
|
|
||||||
src="@/static/images/learnpath/thispath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
<image
|
|
||||||
v-else-if="row.salesManagement === 1"
|
|
||||||
src="@/static/images/learnpath/otherpath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
<image
|
|
||||||
v-else
|
|
||||||
src="@/static/images/learnpath/notpath.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -133,6 +61,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getFullJobPath } from "@/api/modules/growth.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -172,12 +101,55 @@
|
|||||||
FAEStatusL: 0,
|
FAEStatusL: 0,
|
||||||
salesManagement: 1
|
salesManagement: 1
|
||||||
}],
|
}],
|
||||||
|
pathData: [],
|
||||||
|
titleList: [],
|
||||||
|
preparedData: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
getFullJobPath().then(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.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;
|
||||||
|
},
|
||||||
goSearch(){
|
goSearch(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/learnPath/pathSearch'
|
url: '/pages/learnPath/pathSearch'
|
||||||
|
|||||||
Reference in New Issue
Block a user