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:
@@ -197,11 +197,6 @@ export default {
|
||||
res.result.some(author => {
|
||||
if (author.aid == item.sysCreateAid) {
|
||||
let { aid, avatar, name, orgInfo, code ,sex} = author;
|
||||
// if (!avatar) {
|
||||
// avatar = this.$config.fileUrl + avatar;
|
||||
// }else{
|
||||
// avatar='';
|
||||
// }
|
||||
item.name = name;
|
||||
item.aid = aid;
|
||||
item.orgInfo = orgInfo;
|
||||
|
||||
@@ -1,64 +1,46 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="tabbar">
|
||||
<view class="tabbar-item" @click="clicktab(0)" :class="{'active':tabIndex===0}">
|
||||
<u-badge :type="type" max="99" :value="value" class="tabber-co"></u-badge>
|
||||
学习任务
|
||||
<view style="background-color: #fff;">
|
||||
<view class="listbox-top" style="background-color: #fff;">
|
||||
<!-- <view class="top-ten" style="margin-top: 21px;margin-left: 13px;">
|
||||
<text class="textbtn" @click="loadstatusSelecShow=!loadstatusSelecShow">状态</text>
|
||||
</view> -->
|
||||
<view class="searchView">
|
||||
<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="tabber-item" @click="clicktab(1)" :class="{'active':tabIndex===1}">我报名的</view>
|
||||
<!-- <view class="tabbar-item" @click="clicktab(2)" :class="{'active':tabIndex===2}">历史记录</view> -->
|
||||
</view>
|
||||
<view class="tabbar">
|
||||
<view class="tabbar-item" style="text-align: right;margin-right: 26upx;" @click="clicktab(0)" :class="{'active':tabIndex===0}">
|
||||
<u-badge :type="type" max="99" :value="value" class="tabber-co"></u-badge>学习任务<view class="border-bottom-one"></view></view>
|
||||
<view class="tabbar-item" style="text-align: left;margin-left: 26upx;" @click="clicktab(1)" :class="{'active':tabIndex===1}">我报名的<view class="border-bottom-two"></view></view>
|
||||
|
||||
</view>
|
||||
<!-- 学习任务 -->
|
||||
<view class="listbox" v-show="tabIndex===0">
|
||||
<view class="listbox-top">
|
||||
<view class="top-ten" style="margin-top: 21px;margin-left: 13px;">
|
||||
<!-- <u-picker v-model="loadstatus" :show="loadstatusSelecShow" @cancel="loadstatusSelecShow = false"
|
||||
@confirm="loadchooseStatust" :columns="statustList" keyName="name"></u-picker> -->
|
||||
<!-- <text class="textbtn" @click="loadstatusSelecShow = !loadstatusSelecShow">状态</text> -->
|
||||
<text class="textbtn" @click="loadstatusSelecShow=!loadstatusSelecShow">状态</text>
|
||||
</view>
|
||||
<view class="searchView">
|
||||
<u-search :clearabled="true" @search="loadBoeData(true)" @clear="loadBoeData(true)"
|
||||
placeholder="搜索关键字" v-model="loadkeyword" :showAction="false" shape="square" bgColor="#ffffff">
|
||||
</u-search>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="sea-show" v-show="loadstatusSelecShow">
|
||||
<text v-for="(item,index) in statustList" :key="index"
|
||||
:class="[item.value === boeStatus?'sea-active':'','sea-index' ]"
|
||||
@click="loadchooseStatust(item.value)">{{item.name}}</text>
|
||||
</view>
|
||||
<!-- <view class="sea-show" v-show="loadstatusSelecShow">
|
||||
<text v-for="(item,index) in statustList" :class="[item.value == boeStatus?'sea-active':'','sea-index' ]" @click="loadchooseStatust(item.value)">{{item.name}}</text>
|
||||
</view> -->
|
||||
<view class="course content" v-for="(task,idx) in couresList" :key="idx" @click="loaddetail(task)">
|
||||
<view class="course-info">
|
||||
<!-- <view class="course-title two-line-ellipsis" style="margin-bottom: 20upx;"><text
|
||||
style="font-size: 32upx;color: #343434; font-weight: bold;" v-html="task.cmtask_name"></text></view> -->
|
||||
<view class="course-info-left">
|
||||
<!-- <img :src="task.cmtask_imgurl" style="width: 152upx;height: 88upx; border-radius: 8upx;"> -->
|
||||
<!-- <view class="courseimage" style="width: 152rpx;height: 88rpx;"> -->
|
||||
<course-image :course="task" width="265upx" height="154upx"></course-image>
|
||||
<!-- </view> -->
|
||||
<course-image :course="task" width="256upx" height="148upx"></course-image>
|
||||
<view class="course-text">
|
||||
<!-- <view class="course">
|
||||
<u-line-progress inactiveColor="#e2e2e2" :percentage="task.percentage" :showText="false"
|
||||
height="5" activeColor="#18C6FB"></u-line-progress>
|
||||
</view> -->
|
||||
<view class="course-title one-line-ellipsis" style="margin-bottom: auto"><text
|
||||
style="font-size: 32upx; font-weight: bold;" v-html="task.cmtask_name"></text>
|
||||
style="font-size: 32upx; font-weight: 500;" v-html="task.cmtask_name"></text>
|
||||
</view>
|
||||
<view class="course-btn">
|
||||
<view style="font-size: 24upx;color: #BFBFBF;margin-top: 14upx;margin-bottom: 6upx">
|
||||
推送时间:
|
||||
{{task.created_at}}
|
||||
<view class="task-bottom">
|
||||
<view class="course-aut">
|
||||
<author-info :avatar="task.avatar" :name="task.authorName" :info="task.orgInfo" :sex="task.sex"></author-info>
|
||||
</view>
|
||||
<view class="coures-staus">
|
||||
<text v-if="task.cmtask_status == 0">未开始</text>
|
||||
<text v-if="task.cmtask_status == 1">进行中</text>
|
||||
<text v-if="task.cmtask_status == 2">已完成</text>
|
||||
</view>
|
||||
<!-- <view class="" style="font-weight: 600;margin-left: 25px;">{{task.percentage}}%</view> -->
|
||||
</view>
|
||||
<view class="coures-staus">
|
||||
<text v-if="task.cmtask_status == 0">未开始</text>
|
||||
<text v-if="task.cmtask_status == 1">进行中</text>
|
||||
<text v-if="task.cmtask_status == 2">已完成</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -70,38 +52,25 @@
|
||||
</view>
|
||||
<!-- 自主学习 -->
|
||||
<view class="listbox" v-show="tabIndex===1">
|
||||
<view class="listbox-top">
|
||||
<!-- 自主学习状态查询 -->
|
||||
<!-- <view class="top-ten">
|
||||
<u-picker v-model="classType" :show="statusSelectShow" @cancel="statusSelectShow = false"
|
||||
@confirm="chooseStatus" :columns="statustList" keyName="name"></u-picker>
|
||||
<text class="textbtn" @click="statusSelectShow = true">{{statusBtnName}}</text>
|
||||
</view> -->
|
||||
<!-- <view class="listbox-top"> -->
|
||||
<!-- 自主学习类型查询 -->
|
||||
<view class="top-ten" style="margin-top: 21px;margin-left: 13px;">
|
||||
<!-- <u-picker v-model="statust" :show="statusSelecShow" @cancel="statusSelecShow = false"
|
||||
@confirm="chooseStatust" :columns="typeArray" keyName="name"></u-picker>
|
||||
<text class="textbtn" @click="statusSelecShow = true">{{statusBtns}}</text> -->
|
||||
<!-- <view class="top-ten" style="margin-top: 21px;margin-left: 13px;">
|
||||
<text class="textbtn" @click="statusSelecShow=!statusSelecShow;autonomyStatusShow=false">类型</text>
|
||||
<text class="textbtn" style="margin:0 20upx;"
|
||||
@click="autonomyStatusShow=!autonomyStatusShow;statusSelecShow=false">进度</text>
|
||||
</view>
|
||||
<view class="searchView" style="margin-left: 0;">
|
||||
<u-search :clearabled="true" @search="searchData()" @clear="searchData()" placeholder="搜索关键字"
|
||||
v-model="autonomy.keyword" :showAction="false" shape="square" bgColor="#ffffff"></u-search>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sea-show" v-show="statusSelecShow">
|
||||
</view> -->
|
||||
<!-- </view> -->
|
||||
<!-- <view class="sea-show" v-show="statusSelecShow">
|
||||
<text v-for="(item,tidx) in typeArray" :key="tidx"
|
||||
:class="[item.value == classType ?'sea-active':'','sea-index' ]"
|
||||
@click="Application(item.value)">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="sea-show" v-show="autonomyStatusShow">
|
||||
</view> -->
|
||||
<!-- <view class="sea-show" v-show="autonomyStatusShow">
|
||||
<text :class="[autonomy.status == 0?'sea-active':'','sea-index']" @click="autonomyStatus(0)">全部</text>
|
||||
<text :class="[autonomy.status == 1?'sea-active':'','sea-index']" @click="autonomyStatus(1)">未开始</text>
|
||||
<text :class="[autonomy.status == 2?'sea-active':'','sea-index']" @click="autonomyStatus(2)">进行中</text>
|
||||
<text :class="[autonomy.status == 9?'sea-active':'','sea-index']" @click="autonomyStatus(9)">已完成</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-if="studyList.length == 0 && couresList.length == 0 && isOne" class="zan-wu">
|
||||
您还没有学习课程,快去学习吧~
|
||||
</view>
|
||||
@@ -121,44 +90,22 @@
|
||||
|
||||
<view class="course-text" style="justify-content: space-between;position: relative;">
|
||||
<view class="course-title one-line-ellipsis" style="width: 90%;">
|
||||
<text style="font-size: 30upx; font-weight: bold;"
|
||||
v-html="$keywordActiveShow(c.courseName, autonomy.keyword)"></text>
|
||||
<text style="font-size: 30upx; font-weight: bold;" v-html="$keywordActiveShow(c.courseName, autonomy.keyword)"></text>
|
||||
</view>
|
||||
<view class="coures-midd">
|
||||
<view class="course-author">
|
||||
{{c.teacherName}}
|
||||
</view>
|
||||
<!-- <view class="coures-button"> -->
|
||||
<!-- <text class="toStudyText">
|
||||
<u-icon v-if="c.progress==100" @click.native.stop="toStudy(c)" :size="16" label="回顾"
|
||||
:bold="true" :labelSize="11" labelColor="#FF8E00" color="#FF8E00" name="reload">
|
||||
</u-icon>
|
||||
<u-icon v-else @click.native.stop="toStudy(c)" :size="16" label="播放" :bold="true"
|
||||
:labelSize="11" labelColor="#FF8E00" color="#FF8E00" name="play-right"></u-icon>
|
||||
</text> -->
|
||||
<!-- </view> -->
|
||||
|
||||
</view>
|
||||
<view class="rowbtn">
|
||||
<image @click.native.stop="rowbtn(c)" style="width: 100%;height: 100%;"
|
||||
src="../../static/images/icon/more.png" alt="">
|
||||
</view>
|
||||
<view class="coures-bottom coures-midd">
|
||||
<view class="course-author">
|
||||
{{c.teacherName}}
|
||||
</view>
|
||||
<view class="coures-staus">
|
||||
<text v-html="displayWord(c)"></text>
|
||||
</view>
|
||||
<view class="coures-button">
|
||||
<text class="toStudyText">
|
||||
<u-icon v-if="c.progress==100" @click.native.stop="toStudy(c)" :size="16"
|
||||
label="回顾" :bold="true" :labelSize="11" labelColor="#FF8E00" color="#FF8E00"
|
||||
name="reload">
|
||||
</u-icon>
|
||||
<u-icon v-else @click.native.stop="toStudy(c)" :size="16" label="播放"
|
||||
:bold="true" :labelSize="11" labelColor="#FF8E00" color="#FF8E00"
|
||||
name="play-right"></u-icon>
|
||||
</text>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -298,13 +245,9 @@
|
||||
import apicourseStudy from "../../api/modules/courseStudy.js"
|
||||
import apiCoursePortal from '@/api/modules/coursePortal.js'
|
||||
import apiBoeCourse from '@/api/boe/course.js';
|
||||
import {
|
||||
formatDate
|
||||
} from '@/utils/tools.js';
|
||||
import { formatDate } from '@/utils/tools.js';
|
||||
import apiUser from '@/api/system/user.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'isOneStady'])
|
||||
@@ -606,7 +549,7 @@
|
||||
});
|
||||
// window.open(`/loaddetail?id=${task.cmtask_id}`)
|
||||
},
|
||||
|
||||
|
||||
loadBoeData(flag) {
|
||||
if (flag) {
|
||||
this.taskPageIndex = 1; //回到首页
|
||||
@@ -621,14 +564,15 @@
|
||||
params.cmtask_name = this.keyWord;
|
||||
}
|
||||
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];
|
||||
// item.created_at = this.formatDate(item.created_at*1000);
|
||||
// userIds.push(item.sysCreateAid);
|
||||
});
|
||||
// this.loadUserInfos(rs.result.list, userIds);
|
||||
this.couresList = res.result.list;
|
||||
this.taskCount = res.result.count;
|
||||
if (this.taskCount > this.taskPageIndex * this.taskPageSize) {
|
||||
this.taskHasMore = true;
|
||||
} else {
|
||||
@@ -646,7 +590,37 @@
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
loadUserInfos(list, userIds) {
|
||||
const noReapetIds = [...new Set(userIds)];
|
||||
apiUser.getByIds(noReapetIds).then(res => {
|
||||
if (res.status == 200) {
|
||||
list.forEach(item => {
|
||||
res.result.some(author => {
|
||||
if (author.aid == item.sysCreateAid) {
|
||||
let { aid, avatar, name, orgInfo, code ,sex} = author;
|
||||
item.name = name;
|
||||
item.aid = aid;
|
||||
item.orgInfo = orgInfo;
|
||||
item.code = code;
|
||||
item.avatar = avatar;
|
||||
item.sex =sex;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 100);
|
||||
});
|
||||
},
|
||||
message() {
|
||||
uni.navigateTo({
|
||||
url: './message'
|
||||
@@ -865,7 +839,7 @@
|
||||
} else if (data.progress == 100) {
|
||||
return '已完成'
|
||||
} else {
|
||||
return `已学<text style="color:#FF8E00">${data.progress}%</text>`
|
||||
return '进行中'
|
||||
}
|
||||
},
|
||||
jumpToDetail(data) {
|
||||
@@ -876,25 +850,41 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.listbox-top {
|
||||
height: 92upx;
|
||||
padding-top: 28upx;
|
||||
background: #fff;
|
||||
.top-ten {
|
||||
// margin-top: 20upx;
|
||||
margin-left: 24upx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.searchView {
|
||||
margin-left: 32upx;
|
||||
line-height: 62upx;
|
||||
height: 72upx;
|
||||
margin-right: 110upx;
|
||||
border-radius: 76upx;
|
||||
display: flex;
|
||||
background-color: #F2F5F7;
|
||||
::v-deep .u-search {
|
||||
width: 195px;
|
||||
border-radius: 76upx !important;
|
||||
}
|
||||
}
|
||||
.course-aut{
|
||||
font-size: 24upx;
|
||||
color: #333333;
|
||||
}
|
||||
.task-bottom{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.coures-staus {
|
||||
flex: 1;
|
||||
font-size: 24upx;
|
||||
font-size: 28upx;
|
||||
color: #777980;
|
||||
// position: relative;
|
||||
|
||||
|
||||
// /deep/ .toStudyText{
|
||||
// font-size: 8px;
|
||||
// background: #EEEEEE;
|
||||
// padding: 4px 10px;
|
||||
// border-radius: 40px;
|
||||
// color: #FF8E00;
|
||||
// >span{
|
||||
// display:flex;
|
||||
// justify-content:center;
|
||||
// align-items:center;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
.big-button {
|
||||
@@ -908,9 +898,8 @@
|
||||
display: flex;
|
||||
|
||||
.course-author {
|
||||
// color: #777980;
|
||||
margin-right: 30upx;
|
||||
font-size: 28upx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.coures-button {
|
||||
@@ -1183,33 +1172,50 @@
|
||||
.tabbar {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
background: linear-gradient(to bottom, #6ba0fc, #6297fd);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
color: #ffffff;
|
||||
|
||||
color: #666;
|
||||
font-size: 32upx;
|
||||
.tabbar-item {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
.border-bottom-one{
|
||||
width: 120upx;
|
||||
position: absolute;
|
||||
right: 28upx;
|
||||
height: 8upx;
|
||||
background: #387DF7;
|
||||
border-radius: 8upx;
|
||||
display: none;
|
||||
}
|
||||
.border-bottom-two{
|
||||
width: 120upx;
|
||||
position: absolute;
|
||||
left: 22upx;
|
||||
height: 8upx;
|
||||
background: #387DF7;
|
||||
border-radius: 8upx;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.tabbar-item :nth-child(1) {
|
||||
text-align: center;
|
||||
line-height: 20upx;
|
||||
height: 20upx;
|
||||
}
|
||||
|
||||
.tabber-co {
|
||||
position: absolute;
|
||||
right: -30upx;
|
||||
margin-top: 20upx;
|
||||
}
|
||||
|
||||
.active {
|
||||
border-bottom: 2px solid #ffffff;
|
||||
color: #387DF7;
|
||||
font-size: 44upx;
|
||||
font-weight: 500;
|
||||
.border-bottom-two{
|
||||
display: block;
|
||||
}
|
||||
.border-bottom-one{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.listbox {
|
||||
background-color: #F9f9f9;
|
||||
.course-info-text {
|
||||
padding: 15upx;
|
||||
margin-bottom: 15upx;
|
||||
@@ -1232,73 +1238,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.listbox-top {
|
||||
height: 90upx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
.top-ten {
|
||||
// width: 120upx;
|
||||
// height: 62upx;
|
||||
margin-top: 20upx;
|
||||
margin-left: 24upx;
|
||||
// background-color: #fff;
|
||||
text-align: center;
|
||||
// line-height: 62upx;
|
||||
}
|
||||
|
||||
.searchView {
|
||||
background-color: #fff;
|
||||
flex: 1;
|
||||
height: 62upx;
|
||||
line-height: 62upx;
|
||||
margin-left: 20upx;
|
||||
margin-top: 30upx;
|
||||
border-radius: 8px;
|
||||
margin-right: 20upx;
|
||||
display: flex;
|
||||
|
||||
.u-search {
|
||||
width: 195px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .listboxtwo-top {
|
||||
// height: 120upx;
|
||||
// display: flex;
|
||||
// justify-content: space-around;
|
||||
|
||||
// .top-ten {
|
||||
// width: 120upx;
|
||||
// height: 62upx;
|
||||
// margin-top: 30upx;
|
||||
// margin-left: 53upx;
|
||||
// background-color: #fff;
|
||||
// text-align: center;
|
||||
// line-height: 62upx;
|
||||
// border-radius: 8px;
|
||||
// }
|
||||
|
||||
// .searchView {
|
||||
// background-color: #fff;
|
||||
// flex: 1;
|
||||
// height: 62upx;
|
||||
// line-height: 62upx;
|
||||
// margin-left: 20upx;
|
||||
// margin-top: 30upx;
|
||||
// border-radius: 8px;
|
||||
// margin-right: 8upx;
|
||||
|
||||
// .u-search {
|
||||
// width: 195px;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
padding: 20upx 30upx;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
@@ -1373,12 +1316,11 @@
|
||||
|
||||
.course-text {
|
||||
display: flex;
|
||||
height: 80px;
|
||||
height: 140upx;
|
||||
margin-top: -6px;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
// font-size: 28upx;
|
||||
// color: #777980;
|
||||
|
||||
margin-left: 10px;
|
||||
margin-right: 1px;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user