mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-19 07:46:47 +08:00
筛选
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
import ajax from '@/api/manage/manageAjax.js';
|
import ajax from '@/api/manage/manageAjax.js';
|
||||||
export const getList = (params) => ajax.get(`/manageApi/stu/grow/getStuLearnInfo?userId=${params}`);
|
export const getList = (params) => ajax.get(`/manageApi/stu/grow/getStuLearnInfo?userId=${params}`);
|
||||||
//获取路径图详情
|
//获取路径图详情
|
||||||
export const taskList = (id) => ajax.get(`/manageApi/stu/grow/taskList?growId=${id}`);
|
export const taskList = (id) => ajax.get(`/stu/grow/taskList?growId=${id}`);
|
||||||
|
// 获取岗位
|
||||||
|
export const getAllPosition = () => ajax.get(`/manageApi/admin/thirdApi/getAllPosition`)
|
||||||
|
// 获取职级
|
||||||
|
export const getAllBandInfo = () => ajax.get(`/manageApi/admin/thirdApi/getAllBandInfo`)
|
||||||
18
pages.json
18
pages.json
@@ -90,6 +90,24 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/learnPath/allPath",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/learnPath/pathSearch",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|||||||
106
pages/learnPath/allPath.vue
Normal file
106
pages/learnPath/allPath.vue
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
<template>
|
||||||
|
<view class="all_path">
|
||||||
|
<view class="headers">
|
||||||
|
<text>全岗位路径图</text>
|
||||||
|
<view class="go_to" @click="goSearch">
|
||||||
|
<text class="text">筛选</text>
|
||||||
|
<image class="img" src="../../static/images/learnpath/uotdown.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="path">
|
||||||
|
<view class="item">
|
||||||
|
<image class="img" src="../../static/images/learnpath/thispath.png" mode=""></image>
|
||||||
|
<text class="text">当前路径</text>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<image class="img" src="../../static/images/learnpath/otherpath.png" mode=""></image>
|
||||||
|
<text class="text">当前路径</text>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<image class="img" src="../../static/images/learnpath/notpath.png" mode=""></image>
|
||||||
|
<text class="text">当前路径</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="tabel">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goSearch(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/learnPath/pathSearch'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.all_path{
|
||||||
|
padding: 0 30rpx;
|
||||||
|
.headers{
|
||||||
|
margin-top: 38rpx;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #333333;
|
||||||
|
.go_to{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
.text{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
line-height: 40rpx;
|
||||||
|
text-align: left;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
}
|
||||||
|
.img{
|
||||||
|
width: 24rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.path{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.item{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.img{
|
||||||
|
width: 40rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 40rpx;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="path_body">
|
<view class="path_body">
|
||||||
<view class="body_header">
|
<view class="body_header">
|
||||||
<view class="left">全岗位路径</view>
|
<view class="left" @click="goAllPath">全岗位路径</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<u-switch size="14" v-model="openDown"></u-switch>
|
<u-switch size="14" v-model="openDown"></u-switch>
|
||||||
<text class="text">高亮显示未完成</text>
|
<text class="text">高亮显示未完成</text>
|
||||||
@@ -311,6 +311,9 @@
|
|||||||
this.flagToggleTwo = 1
|
this.flagToggleTwo = 1
|
||||||
}, 10000);
|
}, 10000);
|
||||||
},
|
},
|
||||||
|
goAllPath(){
|
||||||
|
uni.navigateTo({url:'/pages/learnPath/allPath'})
|
||||||
|
},
|
||||||
goStudy(item){
|
goStudy(item){
|
||||||
if(item.type == 1){
|
if(item.type == 1){
|
||||||
console.log(item,'在线')
|
console.log(item,'在线')
|
||||||
|
|||||||
295
pages/learnPath/pathSearch.vue
Normal file
295
pages/learnPath/pathSearch.vue
Normal file
@@ -0,0 +1,295 @@
|
|||||||
|
<template>
|
||||||
|
<view class="searchs">
|
||||||
|
<view class="item">
|
||||||
|
<view class="title updown">
|
||||||
|
岗位
|
||||||
|
<view v-if="!isTrue" @click="listslice" class="up">
|
||||||
|
收起
|
||||||
|
<image class="img" src="../../static/images/learnpath/updown.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="check">
|
||||||
|
<view :style="{marginRight:index/2!=0||index==0?'12rpx':''}" :class="indexs.includes(index)?'items':'item'" @click="searchItem(item,index)" v-for="(item,index) in posiLists" :key="index" class="item">
|
||||||
|
{{item.positionName}}
|
||||||
|
</view>
|
||||||
|
<view v-if="startList.length > 9 && isTrue" class="item" @click="allList">
|
||||||
|
<text class="text">查看更多</text>
|
||||||
|
<image class="img" src="../../static/images/learnpath/uotdown.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="title">
|
||||||
|
职级
|
||||||
|
</view>
|
||||||
|
<view class="downlist">
|
||||||
|
<view class="title">
|
||||||
|
<view @click="downList" class="btn">
|
||||||
|
<text>{{bandFirst || '职级'}}</text>
|
||||||
|
<img class="img" src="../../static/images/learnpath/uotdown.png" alt="">
|
||||||
|
</view>
|
||||||
|
<text class="line"></text>
|
||||||
|
<view @click="downList" class="btn">
|
||||||
|
<text>{{bandEnd || '职级'}}</text>
|
||||||
|
<img class="img" src="../../static/images/learnpath/uotdown.png" alt="">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="bandShow" class="body">
|
||||||
|
<view @click="isBand(item,index)" :class="bandIndexs.includes(index)?'item2':''" v-for="(item,index) in bandLists" :key="index" class="item">
|
||||||
|
{{item.bandCode}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="footers">
|
||||||
|
<view class="btn left" @click="reach">
|
||||||
|
重置
|
||||||
|
</view>
|
||||||
|
<view class="btn right" @click="goAllPath">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAllPosition,getAllBandInfo } from "@/api/modules/growth.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
posiLists: [],
|
||||||
|
startList: [],
|
||||||
|
isTrue: true,
|
||||||
|
indexs: [],
|
||||||
|
posiData: [],
|
||||||
|
bandLists: [],
|
||||||
|
bandShow: false,
|
||||||
|
bandIndexs: [],
|
||||||
|
bandItem: [],
|
||||||
|
bandFirst: '',
|
||||||
|
bandEnd: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getPosiList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
reach(){
|
||||||
|
this.bandIndexs = []
|
||||||
|
this.bandItem = []
|
||||||
|
this.indexs = []
|
||||||
|
this.posiData = []
|
||||||
|
this.bandFirst = ''
|
||||||
|
this.bandEnd = ''
|
||||||
|
},
|
||||||
|
goAllPath(){
|
||||||
|
console.log(this.bandItem,this.posiData)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/learnPath/allPath',
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getPosiList(){
|
||||||
|
getAllPosition().then(res=>{
|
||||||
|
this.startList = res.data
|
||||||
|
if(res.code == 200 ){
|
||||||
|
this.posiLists = res.data
|
||||||
|
if(this.posiLists.length > 9){
|
||||||
|
this.posiLists = this.posiLists.slice(0, 9)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
getAllBandInfo().then(res=>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.bandLists = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
allList(){
|
||||||
|
this.posiLists = this.startList
|
||||||
|
this.isTrue = false
|
||||||
|
},
|
||||||
|
listslice(){
|
||||||
|
this.posiLists = this.startList.slice(0, 9)
|
||||||
|
this.isTrue = true
|
||||||
|
},
|
||||||
|
searchItem(item,index){
|
||||||
|
const indexToRemove = this.indexs.indexOf(index);
|
||||||
|
if (indexToRemove !== -1) {
|
||||||
|
this.indexs.splice(indexToRemove, 1);
|
||||||
|
} else {
|
||||||
|
this.indexs.push(index);
|
||||||
|
}
|
||||||
|
this.posiData = this.indexs.map(index => this.startList[index]);
|
||||||
|
},
|
||||||
|
downList(){
|
||||||
|
this.bandShow = !this.bandShow
|
||||||
|
},
|
||||||
|
isBand(item,index){
|
||||||
|
const indexToRemove = this.bandIndexs.indexOf(index);
|
||||||
|
if (indexToRemove !== -1) {
|
||||||
|
this.bandIndexs.splice(indexToRemove, 1);
|
||||||
|
} else {
|
||||||
|
this.bandIndexs.push(index);
|
||||||
|
}
|
||||||
|
this.bandItem = this.bandIndexs.map(index => this.bandLists[index])
|
||||||
|
this.bandItem = this.bandItem.sort((a, b) => parseInt(a.bandId, 10) - parseInt(b.bandId, 10));
|
||||||
|
this.bandFirst = this.bandItem[0].bandCode
|
||||||
|
if(this.bandItem && this.bandItem.length > 1){
|
||||||
|
this.bandEnd = this.bandItem[this.bandItem.length - 1].bandCode
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.searchs{
|
||||||
|
background: #fff;
|
||||||
|
height: 100vh;
|
||||||
|
padding: 56rpx 56rpx 180rpx 38rpx;
|
||||||
|
.item{
|
||||||
|
.downlist{
|
||||||
|
margin: 0 auto;
|
||||||
|
.body{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.item{
|
||||||
|
margin-right: 18rpx;
|
||||||
|
width: 190rpx;
|
||||||
|
margin-bottom: 28rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: #F7F7F7;
|
||||||
|
border-radius: 34rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 60rpx;
|
||||||
|
}
|
||||||
|
.item2{
|
||||||
|
background: #EAF2FF;
|
||||||
|
border: 2rpx solid #387DF7;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #387DF7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
.line{
|
||||||
|
width: 16rpx;
|
||||||
|
border: 2rpx solid #979797;
|
||||||
|
margin-left: 6rpx;
|
||||||
|
margin-right: 6rpx;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
width: 316rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: #F7F7F7;
|
||||||
|
border-radius: 34rpx;
|
||||||
|
padding: 0 32rpx 0 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.img{
|
||||||
|
width: 20rpx;
|
||||||
|
height: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.updown{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.up{
|
||||||
|
margin-right: 18rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
.img{
|
||||||
|
width: 24rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 44rpx;
|
||||||
|
text-align: left;
|
||||||
|
margin-bottom: 34rpx;
|
||||||
|
}
|
||||||
|
.check{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-bottom: 34rpx;
|
||||||
|
.item{
|
||||||
|
margin-bottom: 28rpx;
|
||||||
|
width: 240rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
padding: 0 30rpx 0 34rpx;
|
||||||
|
border-radius: 34rpx;
|
||||||
|
background: #F7F7F7;
|
||||||
|
line-height: 60rpx;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
.text{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.img{
|
||||||
|
width: 24rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
margin-left: 14rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.items{
|
||||||
|
width: 240rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: #EAF2FF;
|
||||||
|
border-radius: 34rpx;
|
||||||
|
border: 1rpx solid #387DF7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.footers{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
.btn{
|
||||||
|
width: 284rpx;
|
||||||
|
height: 96rpx;
|
||||||
|
line-height: 96rpx;
|
||||||
|
border-radius: 48rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.left{
|
||||||
|
border: 2rpx solid #387DF7;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #387DF7;
|
||||||
|
margin-right: 36rpx;
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
background: linear-gradient( 112deg, #5491FD 0%, #2A58FA 100%);
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
BIN
static/images/learnpath/notpath.png
Normal file
BIN
static/images/learnpath/notpath.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 416 B |
BIN
static/images/learnpath/otherpath.png
Normal file
BIN
static/images/learnpath/otherpath.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 435 B |
BIN
static/images/learnpath/thispath.png
Normal file
BIN
static/images/learnpath/thispath.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 362 B |
BIN
static/images/learnpath/uotdown.png
Normal file
BIN
static/images/learnpath/uotdown.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 290 B |
BIN
static/images/learnpath/updown.png
Normal file
BIN
static/images/learnpath/updown.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 282 B |
Reference in New Issue
Block a user