This commit is contained in:
zhangsir
2024-07-09 14:23:30 +08:00
parent 6b7cec48f2
commit 11a036b0f8
4 changed files with 37 additions and 22 deletions

View File

@@ -9,11 +9,11 @@
</view> </view>
<view class="path"> <view class="path">
<view class="item"> <view class="item">
<image class="img" src="../../static/images/learnpath/thispath.png" mode=""></image> <image style="width: 40rpx;height: 36rpx;" class="img" src="../../static/images/learnpath/thispath.png" mode=""></image>
<text class="text">当前路径</text> <text class="text">当前路径</text>
</view> </view>
<view class="item" style="margin-left: 80rpx;"> <view class="item" style="margin-left: 80rpx;">
<image class="img" src="../../static/images/learnpath/otherpath.png" mode=""></image> <image style="width: 40rpx;height: 36rpx;" 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">
@@ -39,11 +39,13 @@
v-if="(t && t.isMajorPosition) " v-if="(t && t.isMajorPosition) "
src="@/static/images/learnpath/thispath.png" src="@/static/images/learnpath/thispath.png"
mode="aspectFit" mode="aspectFit"
style="width: 40rpx;height: 36rpx;"
/> />
<image <image
v-else-if="(t && t.permission)" v-else-if="(t && t.permission)"
src="@/static/images/learnpath/otherpath.png" src="@/static/images/learnpath/otherpath.png"
mode="aspectFit" mode="aspectFit"
style="width: 40rpx;height: 36rpx;"
/> />
<!-- <image <!-- <image
v-else-if="!(t && t.permission)" v-else-if="!(t && t.permission)"
@@ -106,24 +108,29 @@
preparedData: [], preparedData: [],
} }
}, },
onShow: function(options) {
console.log('xixi')
const bandCodeList = uni.getStorageSync('bandCodeList');
const positionIdList = uni.getStorageSync('positionIdList');
getFullJobPath({
positionNameList: positionIdList || '',
bandCodeList: bandCodeList || ''
}).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')
}
})
},
onLoad() { onLoad() {
getFullJobPath({
positionNameList:this.$route.query.positionIdList || '',
bandCodeList:this.$route.query.bandCodeList || ''
}).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) { integrateTableData(data) {

View File

@@ -478,6 +478,8 @@
}, 10000); }, 10000);
}, },
goAllPath(){ goAllPath(){
uni.setStorageSync('bandCodeList', '');
uni.setStorageSync('positionIdList', '');
uni.navigateTo({url:'/pages/learnPath/allPath'}) uni.navigateTo({url:'/pages/learnPath/allPath'})
}, },
goStudy(item){ goStudy(item){

View File

@@ -88,9 +88,14 @@
goAllPath(){ goAllPath(){
let bandCodeList = this.bandItem.map(item => item.bandCode).join(',') let bandCodeList = this.bandItem.map(item => item.bandCode).join(',')
let positionIdList = this.posiData.map(item => item.positionName).join(',') let positionIdList = this.posiData.map(item => item.positionName).join(',')
uni.navigateTo({ // uni.navigateTo({
url: `/pages/learnPath/allPath?bandCodeList=${bandCodeList}&positionIdList=${positionIdList}`, // url: `/pages/learnPath/allPath?bandCodeList=${bandCodeList}&positionIdList=${positionIdList}`,
}) // })
uni.setStorageSync('bandCodeList', bandCodeList);
uni.setStorageSync('positionIdList', positionIdList);
uni.navigateBack({
delta: 1
});
}, },
getPosiList(){ getPosiList(){
getAllPosition().then(res=>{ getAllPosition().then(res=>{

View File

@@ -966,6 +966,7 @@
} }
} }
.learn{ .learn{
height: 80vh;
.line{ .line{
width: 100%; width: 100%;
height: 20rpx; height: 20rpx;