mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 02:46:46 +08:00
我报名的完善
This commit is contained in:
@@ -4,11 +4,16 @@
|
||||
<!-- <view class="top-ten" style="margin-top: 21px;margin-left: 13px;">
|
||||
<text class="textbtn" @click="loadstatusSelecShow=!loadstatusSelecShow">状态</text>
|
||||
</view> -->
|
||||
<view class="searchView">
|
||||
<view class="searchView" v-show="tabIndex===0">
|
||||
<u-search :clearabled="true" @search="loadBoeData(true)" @clear="loadBoeData(true)"
|
||||
placeholder="搜索关键字" v-model="loadkeyword" :showAction="false" shape="square" bgColor="##F2F5F7">
|
||||
</u-search>
|
||||
</view>
|
||||
<view class="searchView" v-show="tabIndex===1">
|
||||
<u-search :clearabled="true" @search="getLearning()" @clear="getLearning()"
|
||||
placeholder="搜索关键字" v-model="learkeyword" :showAction="false" shape="square" bgColor="##F2F5F7">
|
||||
</u-search>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tabbar" style="position: relative;">
|
||||
<view class="tabbar-item" style="text-align: right;margin-right: 26upx;" @click="clicktab(0)" :class="{'active':tabIndex===0}">
|
||||
@@ -20,14 +25,25 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 筛选状态 -->
|
||||
<view class="addition" v-if="tabIndex===1">
|
||||
<view class="addition" v-show="tabIndex===0">
|
||||
<view class="textbtn" style="color:#666;font-size: 28upx;" @click="statusSelectShow = !statusSelectShow">
|
||||
<text>筛选</text>
|
||||
<u-icon style="margin-left: 18upx;" name="arrow-down"></u-icon>
|
||||
</view>
|
||||
<view class="sea-show" v-show="statusSelectShow">
|
||||
<view v-for="(status,index) in selectData" :key="index" :class="[articleList.status == status.value? 'sea-active':'','sea-index']" @click="chooseStatus(status)">
|
||||
{{status.label}}
|
||||
<view v-for="(status,index) in statustList" :key="index" :class="[classType == status.value? 'sea-active':'','sea-index']" @click="autonomyStatus(status.value)">
|
||||
{{status.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="addition" v-show="tabIndex===1">
|
||||
<view class="textbtn" style="color:#666;font-size: 28upx;" @click="statusSelectShow = !statusSelectShow">
|
||||
<text>筛选</text>
|
||||
<u-icon style="margin-left: 18upx;" name="arrow-down"></u-icon>
|
||||
</view>
|
||||
<view class="sea-show" v-show="statusSelectShow">
|
||||
<view v-for="(status,index) in statustList" :key="index" :class="[classType == status.value? 'sea-active':'','sea-index']" @click="taskStatus(status.value)">
|
||||
{{status.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -108,11 +124,13 @@
|
||||
<text style="font-size: 30upx; font-weight: bold;" v-html="$keywordActiveShow(c.courseName, autonomy.keyword)"></text>
|
||||
</view>
|
||||
<view class="coures-midd">
|
||||
|
||||
</view>
|
||||
<view class="rowbtn">
|
||||
<image @click.native.stop="rowbtn(c)" style="width: 100%;height: 100%;"
|
||||
<view class="rowbtn" >
|
||||
<image @click.native.stop="removecour(c)" style="width: 100%;height: 100%;position: relative"
|
||||
src="../../static/images/icon/more.png" alt="">
|
||||
<view class="delcoures" v-show="c.delcour" @click.native.stop="rowbtn(c)">
|
||||
<u-icon style="line-height: 90upx;" name="trash" label="删除课程"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coures-bottom coures-midd">
|
||||
<view v-if="c.teacherName" class="course-author">
|
||||
@@ -295,7 +313,7 @@
|
||||
couresList: '',
|
||||
switch: '',
|
||||
hisswitch: '',
|
||||
classType: 0,
|
||||
classType: '',
|
||||
hisclassType: '',
|
||||
historyList: '',
|
||||
studyList: [],
|
||||
@@ -413,6 +431,10 @@
|
||||
}, 500);
|
||||
},
|
||||
methods: {
|
||||
removecour(item){
|
||||
console.log(item);
|
||||
item.delcour = !item.delcour
|
||||
},
|
||||
rowbtn(row) {
|
||||
this.delData = row;
|
||||
this.btnsShow = true;
|
||||
@@ -427,6 +449,7 @@
|
||||
});
|
||||
this.studyList.forEach((item, index) => {
|
||||
if (item.id === this.delData.id) {
|
||||
// item.delcour = false;
|
||||
this.studyList.splice(index, 1);
|
||||
}
|
||||
})
|
||||
@@ -514,16 +537,17 @@
|
||||
})
|
||||
},
|
||||
autonomyStatus(num) {
|
||||
// this.isSelect = num;
|
||||
this.autonomy.status = num;
|
||||
this.searchData();
|
||||
this.status = num;
|
||||
this.getLearning();
|
||||
},
|
||||
taskStatus(num) {
|
||||
this.boeStatus = num;
|
||||
this.loadBoeData(true);
|
||||
},
|
||||
closeBtns() {
|
||||
this.btnsShow = false;
|
||||
},
|
||||
searchData() {
|
||||
// this.page.pageIndex = 1;
|
||||
// this.isListOne = true;
|
||||
let list = this.studyData;
|
||||
let type;
|
||||
let wei;
|
||||
@@ -580,13 +604,10 @@
|
||||
}
|
||||
apiBoeCourse.cmtaskList(params).then(res => {
|
||||
this.taskCount = res.result.count;
|
||||
// let userIds=[];
|
||||
res.result.list.forEach(item => {
|
||||
let time = this.formatDate(item.created_at * 1000);
|
||||
item.created_at = time.split(' ')[0];
|
||||
// userIds.push(item.sysCreateAid);
|
||||
});
|
||||
// this.loadUserInfos(rs.result.list, userIds);
|
||||
this.couresList = res.result.list;
|
||||
if (this.taskCount > this.taskPageIndex * this.taskPageSize) {
|
||||
this.taskHasMore = true;
|
||||
@@ -700,23 +721,20 @@
|
||||
title: '加载中...'
|
||||
});
|
||||
this.loadStatus = 'loading';
|
||||
// let classType = null;
|
||||
|
||||
let data = [];
|
||||
let lear = {
|
||||
pageIndex: 1, //第几页
|
||||
pageSize: 200,
|
||||
courseName: this.learkeyword,
|
||||
// courseType: classType,
|
||||
status: this.status,
|
||||
}
|
||||
// if(this.classType == 'online-course' || this.classType == '') {
|
||||
await apicourseStudy.myStudyList(lear).then(res => {
|
||||
if (res.status == 200) {
|
||||
// 我报名的接口
|
||||
//console.log(res)
|
||||
let courseIds = [];
|
||||
res.result.list.forEach(item => {
|
||||
item.delcour = false;
|
||||
item.teachersName = '';
|
||||
item.addTime = item.addTime.split(' ')[0];
|
||||
courseIds.push(item.courseId);
|
||||
@@ -733,10 +751,14 @@
|
||||
type: this.classType
|
||||
}
|
||||
await apiBoeCourse.myLearning(learData).then(res => {
|
||||
|
||||
|
||||
if (res.status == 200) {
|
||||
res.result.dataList.forEach(item => {
|
||||
item.delcour = false;
|
||||
})
|
||||
let list = this.filterConversion(res.result.dataList);
|
||||
data.push(...list);
|
||||
|
||||
}
|
||||
})
|
||||
this.loadStatus = 'noMore';
|
||||
@@ -865,6 +887,18 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.delcoures{
|
||||
position: absolute;
|
||||
width: 180upx;
|
||||
top: 40upx;
|
||||
right: 0;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 1px 4px 1px rgba(0,0,0,0.08);
|
||||
border-radius: 8upx;
|
||||
z-index: 77;
|
||||
padding: 30upx 30upx;
|
||||
color: #333333;
|
||||
}
|
||||
.addition {
|
||||
position: absolute;
|
||||
right: 10upx;
|
||||
@@ -875,7 +909,7 @@
|
||||
color: #4f4f4f;
|
||||
font-size: 28upx;
|
||||
}
|
||||
.sea-show{
|
||||
.sea-show {
|
||||
width: 130upx;
|
||||
position: absolute;
|
||||
top: 80upx;
|
||||
@@ -1022,15 +1056,10 @@
|
||||
padding: 20upx 30upx 10upx 30upx;
|
||||
|
||||
.sea-active {
|
||||
border: 1rpx solid #679cfc !important;
|
||||
color: #679cfc;
|
||||
}
|
||||
|
||||
.sea-index {
|
||||
font-size: 26rpx;
|
||||
padding: 6rpx 16rpx;
|
||||
border: 1rpx solid #ccc;
|
||||
border-radius: 20rpx;
|
||||
margin-right: 16rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user