Compare commits

..

8 Commits

Author SHA1 Message Date
zhangsir
7375f9df04 上传视频修改逻辑 2024-12-04 16:47:57 +08:00
zhangsir
efb70690c3 视频选择回显修改 2024-11-11 09:38:25 +08:00
zhangsir
f32d6992fa 视频选择回显修改 2024-11-10 19:50:23 +08:00
zhangsir
c84c338442 视频选择修改 2024-11-10 19:22:50 +08:00
zhangsir
ff7dd81608 视频选择修改 2024-11-10 17:25:48 +08:00
zhangsir
ea2740542e 视频拖动修改 2024-11-08 19:35:32 +08:00
zhangsir
7ccb624724 视频选择修改 2024-11-08 19:13:15 +08:00
zhangsir
638d6c5677 视频长传修改逻辑 2024-11-08 13:39:10 +08:00
43 changed files with 660 additions and 17169 deletions

View File

@@ -41,7 +41,6 @@ VUE_APP_PUBLIC_PATH='/pc'
VUE_APP_MANAGER_PATH='/manage'
VUE_APP_STUDENT_PATH='/fe-student'
VUE_APP_MANAGER_API_PATH='/manageApi'
VUE_APP_GROWTH_API_PATH=''
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@@ -37,7 +37,6 @@ VUE_APP_PUBLIC_PATH='/pc-release'
VUE_APP_MANAGER_PATH='/manage-release'
VUE_APP_STUDENT_PATH='/fe-student-release'
VUE_APP_MANAGER_API_PATH='/manageApi-release'
VUE_APP_GROWTH_API_PATH='/growth'
# 登录地址
VUE_APP_LOGIN_URL='https://u.boe.com/web-release/'

View File

@@ -28,7 +28,7 @@ VUE_APP_FILE_BASE_URL='https://u.boe.com/upload'
VUE_APP_FILE_RELATIVE_PATH = '/upload'
# 受众批量导入人员信息URL
VUE_APP_AUDIENCE_IMPORT_URL = 'http://10.251.132.177/userbasic/audience/import'
VUE_APP_AUDIENCE_IMPORT_URL = 'https://u.boe.com/userbasic/audience/import'
@@ -37,13 +37,12 @@ VUE_APP_PUBLIC_PATH='/pc'
VUE_APP_MANAGER_PATH='/manage'
VUE_APP_STUDENT_PATH='/fe-student'
VUE_APP_MANAGER_API_PATH='/manageApi'
VUE_APP_GROWTH_API_PATH='/growth'
# 登录地址
VUE_APP_LOGIN_URL='http://10.251.132.177/web/'
VUE_APP_LOGIN_URL='https://u.boe.com/web/'
# scorm课件的播放url地址
VUE_APP_SCORM_URL = 'http://10.251.132.177/newscorm/scorm-player'
VUE_APP_SCORM_URL = 'https://u.boe.com/newscorm/scorm-player'
#案例组织领域类型
VUE_APP_CASE_TYPE = '155'

View File

@@ -36,7 +36,6 @@ VUE_APP_PUBLIC_PATH='/pc'
VUE_APP_MANAGER_PATH='/manage'
VUE_APP_STUDENT_PATH='/fe-student'
VUE_APP_MANAGER_API_PATH='/manageApi'
VUE_APP_GROWTH_API_PATH='/growth'
# 登录地址
VUE_APP_LOGIN_URL='https://u-pre.boe.com/web/'

16369
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,9 +16,9 @@
<meta name="referrer" content="strict-origin-when-cross-origin"/>
<link rel="icon" href="<%= BASE_URL %>logo/favicon.ico">
<title>京东方大学堂</title>
<script>
// if(window.top != window.self){
// window.top.location=window.self.location;
// }

View File

@@ -1,6 +1,5 @@
/**我的授课记录*/
import ajax from '@/api/boe/boeApiAjax.js'
import ajax2 from '@/api/unionAjax.js'
import axios from 'axios'
import { getToken } from '@/utils/token'
const baseURL = process.env.VUE_APP_BOE_BASE_API;
@@ -61,15 +60,12 @@ const exportStudentOfTearcher = function(userId) {
const courseRecordList = function(data) {
return ajax.postJson('/b1/system/teacher/teacher-course-list',data);
}
const getListByToken = function(data) {
return ajax2.get('/manageApi',`/admin/teacherRecord/getListByToken?courseName=${data.courseName}&page=${data.page}&pageSize=${data.pageSize}`);
}
export default {
courseRecordExport,
courseRecordList,
getListByToken,
exportStudentOfCourse,
exportStudentOfTearcher

View File

@@ -1,8 +0,0 @@
// import ajax from '@/utils/xajax.js'
import ajax from '../ajax';
// const baseURL = process.env.VUE_APP_GROWTH_API_PATH;
const baseURL = '/growth';
// 查询专业力必修列表
export const listData = (obj) => ajax.get(baseURL, '/professional/student/studentGrowthList', { params: obj })
// 查询专业力统计
export const getTotalGrowthTaskDetail = (obj) => ajax.get(baseURL, '/professional/student/getTotalGrowthTaskDetail', { params: obj })

View File

@@ -3,6 +3,7 @@
* 下载课件,一期是直接在新的窗口打开文件的地址就可以了。不采用流的方式下载
*/
import ajax from '@/utils/xajax.js'
import ajax2 from '@/utils/xajax2.js'
/**
* 分页查询,课件的管理列表
@@ -49,6 +50,9 @@ const findList = function(data) {
const saveUpload = function(data) {
return ajax.post('/xboe/m/course/file/upload/save', data);
}
const saveUpload2 = function(data) {
return ajax2.post('/xboe/m/course/file/upload/save', data);
}
/**
* 批量更新,上传时,一个一个上传,下面的列表的保存,使用此方法
@@ -85,6 +89,7 @@ const detail = function(id) {
export default {
pageList,
saveUpload,
saveUpload2,
batchUpdate,
detail,
delFile

View File

@@ -1,5 +1,5 @@
import ajax from '@/utils/xajax.js'
import ajax2 from '../unionAjax.js';
/**
* 按名称查询
@@ -9,9 +9,7 @@ const findByName = function(name) {
return ajax.get('/xboe/teacher/name?name=' + name);
}
const findByNameNew = function(name) {
return ajax2.get('/manageApi/admin/teacher/selectTeacher?name=' + name);
}
const updateTeacher=function(data){
return ajax.postJson('/xboe/teacher/update-teacher',data);
}
@@ -219,7 +217,7 @@ export default {
update,
del,
detail,
findByNameNew,
findByName,
updateSysId,
has,
start,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -13,7 +13,7 @@
</el-input>
<div class="choice-box" v-if="teacherDownList.length>0">
<ul>
<li v-for="te in teacherDownList" :key="te.key" @click="changeTeachers(te)">{{te.teacherName + '(' + te.teacherCode + ')'}}</li>
<li v-for="te in teacherDownList" :key="te.key" @click="changeTeachers(te)">{{te.teacherName + te.teacherCode}}</li>
</ul>
</div>
<!-- <el-select
@@ -88,15 +88,15 @@
if (this.teacherValues !== '') {
this.loading = true;
try {
const { data, message, code } = await apiTeacher.findByNameNew(this.teacherValues);
const { result, message, status } = await apiTeacher.findByName(this.teacherValues);
this.loading = false;
if (code === 200) {
if (status === 200) {
let list = [];
data.forEach(item => {
result.forEach(item => {
list.push({
teacherId: item.id,
teacherName: item.name,
teacherCode: item.mobile
teacherCode: item.code
});
});
this.teacherDownList = list;

View File

@@ -25,7 +25,7 @@
<el-table-column label="创建时间" prop="sysCreateTime" width="100"></el-table-column>
<el-table-column label="选择" width="70" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="chooseCourseFile(scope.row)" type="primary">选择</el-button>
<el-button size="mini" @click="chooseCourseFile(scope.row,false)" type="primary">选择</el-button>
</template>
</el-table-column>
</el-table>
@@ -43,23 +43,34 @@
</div>
</el-tab-pane>
<el-tab-pane :label="'上传新'+curComType.name">
<div v-if="!courseFile.id">
<div v-if="!courseFile.id||resType==10||resType==20">
<div v-if="resType>20" style="padding-bottom: 10px;">
<span style="font-weight: 700;">内容时长</span>
<span>
<el-input-number v-model="duration" size="mini" :min="1" :max="100"></el-input-number>
</span>
</div>
<el-upload class="upload-demo" :headers="headers" :data="data" drag :action="uploadFileUrl" :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload">
<el-upload class="upload-demo" :limit="1" :on-exceed="handleExceed" :on-remove="handleDelete" :headers="headers" :data="data" drag :action="uploadFileUrl" :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">文件大小限制{{curComType.maxSizeName}},支持的文件类型{{curComType.fileTypes.join(',')}}</div>
</el-upload>
<div v-if="courseFile.id&&resType==10||resType==20" class="video_audio_info">
<div class="info_item">
<div class="item_text">名称</div>
<el-input v-model="courseFile.fileName" size="mini" style="width:300px;" placeholder="请输入名称"></el-input>
</div>
<div class="info_item">
<div class="item_text">时长</div>
<el-input-number style="width:260px;" v-model="courseFile.duration" :precision="0" size="mini" :min="1" :max="999999999" placeholder="请输入时长" controls-position="right"></el-input-number>
<div style="margin-left: 10px;">分钟</div>
</div>
<div class="btn"><el-button @click="chooseCourseFile(courseFile,true)" type="primary" size="mini">确定</el-button></div>
</div>
</div>
<div v-else style="text-align: center;">
<div style="padding: 20px;">{{courseFile.fileName}} <span style="color: green;">上传成功</span></div>
<div><el-button @click="chooseCourseFile(courseFile)" type="primary" size="mini">确定</el-button></div>
<div><el-button @click="chooseCourseFile(courseFile,true)" type="primary" size="mini">确定</el-button></div>
</div>
</el-tab-pane>
</el-tabs>
@@ -90,6 +101,7 @@
},
data(){
return {
courseWare: {},
uploadFileUrl: process.env.VUE_APP_BASE_API + "/xboe/sys/xuploader/file/upload", // 上传的图片服务器地址
data:{
dir:'course'
@@ -118,6 +130,7 @@
},
mounted() {
this.courseFile={};
this.courseWare = {};
let $this=this;
this.comTypes.some(ct=>{
if(ct.resType==$this.resType){
@@ -139,6 +152,9 @@
}
},
methods:{
handleExceed(){
this.$message({message:`只允许一次性上传一个`,type:'error',offset:100})
},
handleBeforeUpload(file) {
if(file.name.lastIndexOf(".") ==-1) {
this.$message({message:`文件格式不正确!`,type:'error',offset:100})
@@ -172,21 +188,28 @@
},
// 上传成功回调
handleUploadSuccess(res, file) {
//console.log(res);
// console.log(res,file,'xixixixiix');
if(res.status == 200) {
//上传到课件库
//console.log(res.result);
let courseWare={
this.courseWare={
fileName:res.result.displayName,
fileType:res.result.fileType,
filePath:res.result.filePath,
resType:this.resType,
orgId:this.orgId,
orgName:this.orgName,
duration:this.duration,
duration:res.result.duration||this.duration,
remark:'课程中直接上传'
}
apiCourseFile.saveUpload(courseWare).then(rs=>{
this.$message({message:"上传成功",type:'success',offset:100});
this.courseFile = {
id: res.result.filePath,
fileName:res.result.displayName.replace(/\.[^/.]+$/, ""),
duration:res.result.duration,
}
return
apiCourseFile.saveUpload(this.courseWare).then(rs=>{
if(rs.status==200){
this.courseFile=rs.result;
this.$message({message:"上传成功",type:'success',offset:100});
@@ -205,7 +228,8 @@
},
// 删除文件
handleDelete(index) {
this.fileList.splice(index, 1);
this.courseFile = {};
// this.fileList.splice(index, 1);
//注意删除处理
//this.$emit("remove", '');
},
@@ -248,7 +272,33 @@
})
},
chooseCourseFile(ccfile){
chooseCourseFile(ccfile,isUpload){
if(isUpload){
if(this.resType == 10||this.resType == 20){
if(!this.courseFile.fileName){
this.$message({message:`${this.resType == 10?'视频':'音频'}名称不能为空`,type:'error',offset:100});
return
}
if(!this.courseFile.duration){
this.$message({message:"时长不能为空",type:'error',offset:100});
return
}
this.courseWare.fileName = this.courseFile.fileName + '.' + this.courseWare.fileType
this.courseWare.duration = this.courseFile.duration
}
apiCourseFile.saveUpload(this.courseWare).then(rs=>{
if(rs.status==200){
this.courseFile=rs.result;
this.$message({message:"保存成功",type:'success',offset:100});
this.$emit('choose', this.courseFile);
}else{
this.$message.error(rs.message);
}
}).catch(err=>{
this.$message.error(err.message);
})
return
}
this.$emit('choose', ccfile);
}
}
@@ -256,4 +306,24 @@
</script>
<style>
.video_audio_info{
margin-top: 10px;
.info_item{
width: 360px;
margin-top: 10px;
display: flex;
align-items: center;
.el-input-number .el-input__inner{
text-align: left;
}
.item_text{
margin-right: 10px;
}
}
.btn{
margin-top: 10px;
width: 360px;
text-align: center;
}
}
</style>

View File

@@ -1328,6 +1328,7 @@ export default {
pass = false;
}
} else if(this.curContent.contentType == 10 || this.curContent.contentType == 20) {// 视频
courseware.curriculumData.duration = Number((courseware.curriculumData.duration*60).toFixed(0));
if(this.curContent.content !== JSON.stringify(courseware.curriculumData)) {
pass = false;
}

View File

@@ -327,7 +327,7 @@ export default {
},
startTest(){
apiExamPaper.newPaperContent(this.info.id).then(res=>{
if(!res.error&&res.result != ''){
if(res.error == ''&&res.result != ''){
if(this.info.paperType==2){
this.examPaper.json=res.result;
let qitems=this.convertToItems(this.examPaper.json);

View File

@@ -12,6 +12,7 @@
:show-file-list="showList"
:data="data"
:headers="headers"
:on-remove="handleRemove"
class="upload-file-uploader"
ref="upload"
>
@@ -142,6 +143,9 @@ export default {
},
},
methods: {
handleRemove(file, fileList){
this.$emit('isTrue',false)
},
// 上传前校检格式和大小
handleBeforeUpload(file) {
if(this.beforeMsg){
@@ -195,6 +199,7 @@ export default {
// 上传失败
handleUploadError(err) {
this.isLoading = false;
this.$emit('isTrue',false)
this.$message({message:"上传失败, 请重试",type:'error',offset:100});
},
// 上传成功回调
@@ -217,7 +222,8 @@ export default {
if(delIdx>-1){
fileList.splice(delIdx,1);
}
this.$emit("success", res);
this.$emit('isTrue',true)
this.$emit('isFalse',true)
} else {
this.isLoading = false;
if(this.limit == 1){
@@ -225,8 +231,7 @@ export default {
}
this.$message({message:"上传失败",type:'error',offset:100});
}
// this.$emit("success", res);
this.$emit("success", res);
},
// 删除文件
handleDelete(index) {

View File

@@ -51,8 +51,7 @@
<el-dropdown placement="bottom" @command="handleContributor">
<span class="el-dropdown-link" style="font-size:16px;cursor: pointer;" :style="{color:textColor}">贡献者大会</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="three">2024</el-dropdown-item>
<el-dropdown-item command="one" divided>2023</el-dropdown-item>
<el-dropdown-item command="one">2023</el-dropdown-item>
<el-dropdown-item command="two" divided>2022</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@@ -247,7 +246,6 @@ export default {
let obj = {
one: urlPre + "/web/contributornew/index",
two: urlPre + "/web/contributor/index",
three: urlPre + "/web/contributor_2024/index"
};
window.open(obj[val]);
},

View File

@@ -13,7 +13,7 @@
</div>
<!-- <div style="color: red;">下面的表格标题及内容需要调整完善</div> -->
<div>
<el-tabs style="width: 100%;" v-model="tabName" @tab-click="handleTabClick">
<el-tabs v-model="tabName" @tab-click="handleTabClick">
<el-tab-pane label="报名管理" name="second">
<!-- <div>已报名{{study.list.length}}共有0人报名未成功共有{{study.list.length}}人通过审核</div> -->
<el-row style="margin: 20px 0;" :gutter="20">
@@ -863,19 +863,4 @@ export default {
height: 400px;
overflow: auto;
}
.el-tabs__nav-wrap::after {
display: none; /* 隐藏滚动条轨道 */
}
.el-tabs__nav-scroll {
overflow: hidden; /* 隐藏滚动条滑块 */
}
/* 隐藏垂直滚动条 */
.el-table .el-table__body-wrapper::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera*/
}
</style>

View File

@@ -14,7 +14,7 @@
:default-active="activeMenu"
router
active-text-color="#3379FB"
:default-openeds="['manageTodo','manageFinish','teacherTodo','teacherFinish','lecturer','myqa','notice','mystudy','myGrowth', 'course', 'exam', 'u001', 'u002', 'u003', 'u004','mylecnotes','mycaseRecord']"
:default-openeds="['manageTodo','manageFinish','teacherTodo','teacherFinish','lecturer','myqa','notice','mystudy', 'course', 'exam', 'u001', 'u002', 'u003', 'u004','mylecnotes','mycaseRecord']"
class="el-menu-vertical"
@open="handleOpen"
@close="handleClose"
@@ -242,17 +242,6 @@
<svg-icon :icon-class="activeMenu == '/user/medal'?'myxunzhang-active':'myxunzhang'"></svg-icon>
<span slot="title">我的勋章</span>
</el-menu-item>
<el-submenu index="myGrowth" v-show="curIdentity == 1">
<template slot="title">
<!-- <i class="el-icon-s-grid"></i> -->
<img src="../../assets/images/myGrowth.jpg" style="width: 1em;height: 1em;margin-right: 8px;"></img>
<span>我的必修</span>
</template>
<el-menu-item index="/growth/growthPage">
<!-- <i class="el-icon-menu"></i> -->
<span slot="title" class="study textl">专业力必修</span>
</el-menu-item>
</el-submenu>
<el-submenu index="mystudy" v-show="curIdentity == 1">
<template slot="title">
<!-- <i class="el-icon-s-grid"></i> -->
@@ -433,7 +422,6 @@ export default {
this.getLastStudy();
//获取讲师认证中条数
this.instructorCertification()
console.log(this.userInfo,'userInfouserInfo')
},
mounted() {
//console.log(this.userInfo.loginName,'this.userInfo.loginName');

View File

@@ -18,6 +18,7 @@
@keydown.right.prevent="forwardCurrentTime"
@keydown.up.prevent="increaseVolume"
@keydown.down.prevent="lowerVolume"
@keydown.esc.prevent="toggleFullScreen"
tabindex="0"
width="100%"
height="100%"
@@ -384,26 +385,9 @@ export default {
console.log('\x1b[31m%s\x1b[0m','*****************加载失败**********')
})
// 监听全屏事件的变化,保存数据
window.addEventListener("F", () => {
window.addEventListener("fullscreenchange", () => {
this.isFullscreen = this.isFullScreen();
});
document.addEventListener('fullscreenchange',this.handleFullscreenChange);
document.addEventListener('webkitfullscreenchange',this.handleFullscreenChange );
// this.videoDom.addEventListener('keydown', function(e){
// //console.log('\x1b[31m%s\x1b[0m','*****************加载失败**********')
// console.log("video is exit");
// if(e.key === "Escape"){
// console.log("按键 退出全屏 执行")
// }
// })
// this.videoDom.addEventListener("keydown", (e) => {
// console.log("是否监听到");
// if(e.keyCode == 27){
// console.log("是否监听到 esc");
// this.toggleFullScreen();
// }
// });
},
methods: {
//当视频由于需要缓冲下一帧而停止,解决一直计时的问题
@@ -556,7 +540,6 @@ export default {
/* 切换“全屏”和“非全屏”模式
*/
toggleFullScreen() {
console.log("toggleFullScreen 执行 ",this.isFullScreen())
let element = this.$refs.area;
if (!this.isFullScreen()) {
if (element.requestFullscreen) {
@@ -613,24 +596,6 @@ export default {
const currentTime = this.$refs.video.currentTime;
this.$emit('onTimeUpdate', currentTime);
},
/**
* 监听全屏变化
*/
handleFullscreenChange() {
console.log("handleFullscreenChange gx this.isFullScreen()",this.isFullScreen())
console.log("handleFullscreenChange gx this.isFullscreen",this.isFullscreen)
if(this.isFullscreen){
this.isFullscreen = !!document.fullscreenElement;
if (!this.isFullscreen) {
// 退出全屏后的逻辑(如暂停视频、更新 UI 等)
console.log('ESC 已退出全屏 handleFullscreenChange',this.isFullscreen);
this.$emit('onFullscreen',false);//全屏
}
}
}
},
watch: {
currentVolume: function () {

View File

@@ -92,7 +92,7 @@ export default {
this.$emit("updateProgress", current);
// }
},
move(e) {
if (this.is_mousedown_progress) {
@@ -124,7 +124,7 @@ export default {
// 禁止拖动
if(!this.isDrag && time && arr[this.blobId] < current) return;
this.$emit("updateProgress", current);
}
},
},
@@ -176,4 +176,4 @@ export default {
.progress-bar:hover .progress-current::after {
opacity: 1;
}
</style>
</style>

View File

@@ -82,9 +82,6 @@ export const pages=[
{title:'学习路径图',path:'path',component:'study/StudyPath',hidden:false},
{title:'学习项目',path:'project',component:'study/StudyProject',hidden:false}
]},
{title:'我的必修',path:'/growth',hidden:false,children:[
{title:'专业力必修',path:'growthPage',component:'growth/index',hidden:false},
]},
{title:'个人中心',path:'/uc',hidden:false,children:[
{title:'首页',path:'index',component:'StudyIndex',hidden:false}
]},

View File

@@ -6,10 +6,7 @@
<!-- <div style="height: 20px;"></div> -->
</div>
<!-- width: 990px; -->
<div class="main-body" :style="{
backgroundColor: bgColor,
padding
}" style="flex:1; margin-left: 20px;">
<div class="main-body" style="padding: 30px 20px;flex:1; background-color: #fff;margin-left: 20px;">
<!-- <div style="margin-bottom: 10px;padding:10px; border-bottom: 1px solid #dbdbdb;"> -->
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/uc/index' }"><i class="el-icon-arrow-right"></i>个人中心</el-breadcrumb-item>
@@ -18,12 +15,10 @@
<!-- </div> -->
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<div :style="{
backgroundColor: bgColor
}" style="min-height: 600px;padding-bottom: 50px;">
<div style="background-color: #FFFFFF;min-height: 600px;padding-bottom: 50px;">
<router-view :key="key" />
</div>
</keep-alive>
</keep-alive>
</transition>
</div>
</div>
@@ -44,14 +39,7 @@ export default {
return this.$route.meta.title;
},
key() {
console.log(this.$route)
return this.$route.path
},
bgColor() {
return this.$route.path === "/growth/growthPage" ? "rgba(0,0,0,0)" : "#fff";
},
padding(){
return this.$route.path === "/growth/growthPage" ? "0" : "30px 20px";
}
}
}

233
src/utils/xajax2.js Normal file
View File

@@ -0,0 +1,233 @@
import axios from 'axios'
import qs from 'qs'
import { Notification, MessageBox, Message } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/token'
import errorCode from '@/utils/errorCode'
/**
*request请求 axios.request(config)
*requestJson请求 axios.request(config)
*get请求 axios.get(url[, config])
*post请求 axios.post(url[, data[, config]])
*postJson请求 axios.post(url[, data[, config]])
*put请求 axios.put(url[, data[, config]])
*putJson请求 axios.put(url[, data[, config]])
*patch请求 axios.patch(url[, data[, config]])
*patchJson请求 axios.patch(url[, data[, config]])
*delete请求 axios.delete(url[, config])
*/
//const ReLoginUrl="/login";
const ReLoginUrl=process.env.VUE_APP_LOGIN_URL;
const TokenName='XBOE-Access-Token';
/**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/
//只是用于发送json对象数据时使用post,put,patch
const jsonRequest=axios.create({
headers:{'Content-Type':'application/json;charset=utf-8'},
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API,
//超时
timeout: 60000,
});
//发送json对象的拦截器
jsonRequest.interceptors.request.use(config => {
//是否需要设置 token
const isToken = (config.headers || {}).isToken === false
if (getToken() && !isToken) {
config.headers[TokenName] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
}
return config
}, error => {
console.log(error)
Promise.reject(error)
})
// 响应拦截器
jsonRequest.interceptors.response.use(res => {
const code = res.data.status || 200;
if(code===200){
return res.data
}else{
if(code == 6001){ //针对于老系统的处理
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
})
}else if(code === 401){
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
})
}else if(code === 402){
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
})
}else if(code===403){
var msg='当前操作没有权限';
Message({message: msg, type: 'error'});
return Promise.reject(new Error(msg))
//return res.data;
}else if(code===302){
location.href = ReLoginUrl;
}else{
//Message({message: res.data.message, type: 'error'});
//console.log('err:' + res.data.error);
//return Promise.reject(new Error(res.data.message))
return res.data;
}
}
},
error => {
console.log('err' + error)
let { message } = error;
if (message == "Network Error") {
message = "网络异常,请稍后重试";
}
else if (message.includes("timeout")) {
message = "系统接口请求超时";
//location.href = this.webBaseUrl + ReLoginUrl;
}
else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常";
}
Message({
message: message,
type: 'error',
duration: 5 * 1000
})
return Promise.reject(error)
}
)
//用于普通的发送请求
const formRequest=axios.create({
headers:{'Content-Type':'application/x-www-form-urlencoded'},
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API,
//超时
timeout: 10000,
})
//发送json对象的拦截器
formRequest.interceptors.request.use(config => {
//是否需要设置 token
const isToken = (config.headers || {}).isToken === false
if (getToken() && !isToken) {
config.headers[TokenName] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
}
return config
}, error => {
console.log(error)
Promise.reject(error)
});
formRequest.interceptors.response.use(res => {
const code = res.data.status || 200;
if(code===200){
return res.data
}else{
if(code == 6001){ //针对于老系统的处理,因为老系统是字符串,所以这里不使用三等于号
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
})
}else if(code === 401){
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
})
}else if(code === 402){
store.dispatch('LogOut').then(() => {
location.href = ReLoginUrl;
})
}else if(code===403){
var msg='当前操作没有权限';
Message({message: msg, type: 'error'});
return Promise.reject(new Error(msg))
}else if(code===302){
location.href = ReLoginUrl;
}else{
//Message({message: res.data.message, type: 'error'});
//console.log('err' + res.data.error);
//return Promise.reject(new Error(res.data.message))
return res.data;//返回给用户做业务处理
}
}
},
error => {
console.log('err' + error)
let { message } = error;
if (message == "Network Error") {
message = "网络异常,请稍后重试";
}
else if (message.includes("timeout")) {
message = "接口超时,请检查是否上传成功";
//location.href = this.webBaseUrl + ReLoginUrl;
}
else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常";
}
Message({
message: message,
type: 'error',
duration: 5 * 1000
})
return Promise.reject(error)
}
)
//request请求
const request=function(cfg){
if(cfg.data){
cfg.data=qs.stringify(cfg.data);
}
};
//requestJson请求
const requestJson=jsonRequest.request;
//get请求
const get=formRequest.request;
//post请求
const post=function(url,data,config){
if(data){
data=qs.stringify(data);
}
return formRequest.post(url,data,config);
}
//post请求
const postForm=function(url,data,config){
return formRequest.post(url,data,config);
}
//postJson请求
const postJson=jsonRequest.post;
//put请求
const put=function(url,data,config){
if(data){
data=qs.stringify(data);
}
return formRequest.put(url,data,config);
}
//putJson请求
const putJson=jsonRequest.put;
//patch请求
const patch=function(url,data,config){
if(data){
data=qs.stringify(data);
}
return formRequest.patch(url,data,config);
}
//patchJson请求
const patchJson=jsonRequest.patch;
//delete请求
const del=formRequest.delete;
export default {
request,
requestJson,
get,
post,
postJson,
put,
putJson,
patch,
patchJson,
del,
postForm
}

View File

@@ -2,7 +2,7 @@
<div class="box" :class="{ incl: url.includes('projectdetails') }">
<portal-header style="background: #387DF7;" :hideSearch="true" textColor="#ffffff"></portal-header>
<iframe :src="url" style="width: 100%;height: 100%;" frameborder="0" ref="iframe"></iframe>
<portal-footer v-if="isShowFooter"></portal-footer>
<portal-footer></portal-footer>
</div>
</template>
<script>
@@ -16,8 +16,7 @@ import portalFooter from "@/components/PortalFooter.vue";
data(){
return {
url: "",
boeUrl:process.env.VUE_APP_BOE_WEB_URL,
isShowFooter:true
boeUrl:process.env.VUE_APP_BOE_WEB_URL
}
},
mounted() {
@@ -25,10 +24,6 @@ import portalFooter from "@/components/PortalFooter.vue";
let to = this.$route.query.to;//跳转的地址,以 /开头的地址
let urlPre=window.location.protocol+'//'+window.location.host;
this.url=urlPre+to
if(to.includes('growthList')){
this.isShowFooter = false
}
if(params){
this.url=this.url+'?'+params;
}

View File

@@ -52,7 +52,7 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button-group>
<el-button style="margin:0 5px" type="text" v-if="scope.row.recommendRank === ''||scope.row.recommendRank === null" @click="suggest(scope.row)" icon="el-icon-medal">榜单推荐</el-button>
<el-button style="margin:0 5px" type="text" v-if="scope.row.recommendRank === ''" @click="suggest(scope.row)" icon="el-icon-medal">榜单推荐</el-button>
<!-- <el-button type="text" @click="shareItem(scope.row)" icon="el-icon-share" style="margin:0 5px">推荐</el-button> -->
<el-button style="margin:0 5px" v-if="!scope.row.isTop && scope.row.confidentialityLevel == '内部'" type="text"
@click="setTop(scope.row)" icon="el-icon-top">置顶</el-button>

View File

@@ -149,7 +149,7 @@
<el-checkbox v-model="deviceMobile" @change="isVisible(1)" label="移动端可见" border></el-checkbox>
<el-checkbox v-model="devicePc" @change="isVisible(2)" label="pc端可见" border></el-checkbox>
</div>
<file-upload scorm="zip" dir="files" :beforeMsg="needOrg" :showList="true" :value="imageShowUrl" :limit="5" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
<file-upload scorm="zip" dir="files" @isFalse="isFalseChange" @isTrue="isTrueChange" :beforeMsg="needOrg" :showList="true" :value="imageShowUrl" :limit="5" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
</div>
</div>
@@ -159,7 +159,7 @@
<el-table-column prop="fileName" label="文件名称"></el-table-column>
<el-table-column prop="name" label="课件名称">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.name"></el-input>
<el-input type="text" maxlength="50" v-model="scope.row.name"></el-input>
</template>
</el-table-column>
<el-table-column prop="resType" label="类型" width="80">
@@ -169,7 +169,8 @@
</el-table-column>
<el-table-column prop="duration" label="时长(分)" width="100">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.minute"></el-input>
<!-- <el-input type="number" :stpe="1" min="0" size="small" step-strictly v-model="scope.row.minute"></el-input> -->
<el-input-number style="width: 78px;" :max="999" controls-position="right" size="small" :min="0" v-model="scope.row.minute" :step="1" step-strictly></el-input-number>
</template>
</el-table-column>
<el-table-column label="可见性" width="100">
@@ -194,7 +195,7 @@
<span slot="footer">
<!-- <el-button type="infor" @click="isVisible(1)">移动端可见</el-button>
<el-button type="infor" @click="isVisible(2)">pc端可见</el-button> -->
<el-button type="primary" @click="saveUpload()">保存</el-button>
<el-button type="primary" @click="saveUpload()" :loading="isTrue">保存</el-button>
</span>
</el-dialog>
<el-dialog v-if="coursewareShow" title="预览课件" :close-on-click-modal="false" width="800px" :visible.sync="coursewareShow" custom-class="g-dialog">
@@ -246,7 +247,7 @@
<el-form-item label="课件类型">{{ getType(form.resType) }}</el-form-item>
<el-form-item label="时长(分)">
<!-- <el-input v-model="form.duration"></el-input> -->
<el-input type="number" placeholder="请输入数字" :maxlength="32" show-word-limit v-model="form.minute"></el-input>
<el-input-number :precision="0" style="width:100%;text-align:left;" :min="1" placeholder="请输入数字" :max="99999999" show-word-limit controls-position="right" v-model="form.minute"></el-input-number>
<!-- <el-input-number max="" v-model="form.duration" controls-position="right"></el-input-number> -->
</el-form-item>
<el-form-item label="可见性">
@@ -280,6 +281,8 @@ export default {
},
data() {
return {
isTrue: false,
isFalse: false,
resOwnerListMap: [],
//fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
fileBaseUrl:this.$xpage.constants.fileBaseUrl, //获成动态获取的处理
@@ -392,6 +395,12 @@ export default {
this.search();
},
methods: {
isTrueChange(val){
this.isTrue = val
},
isFalseChange(val){
this.isFalse = val
},
beforeCheck(){
if(!this.upload.orgId ||!this.upload.orgName){
return false;
@@ -484,7 +493,11 @@ export default {
this.form.device = 2;
}
//时长,秒与分钟的转化
//if(this.form.)
if(!this.form.minute){
return this.$message.error('请输入时长');
}else{
this.form.duration = Number(this.form.minute) * 60;
}
try {
const { status,message} = await coueseFile.batchUpdate([this.form]);
if (status === 200) {
@@ -555,7 +568,7 @@ export default {
// remark: 备注说明,可以为空,不填
};
//try {
coueseFile.saveUpload(data).then(res=>{
coueseFile.saveUpload2(data).then(res=>{
if(res.status==200){
//console.log('上传文件成功:'+rs.result.displayName);
res.result.device1 = true;
@@ -564,12 +577,18 @@ export default {
if(res.result.duration){
res.result.minute=Math.round(res.result.duration/60); //四舍五入
}
if(res.result.duration==0){
this.$message.error('上传的视频时长不能为0请手动编辑时长');
}
this.fileList.push(res.result);
this.isTrue = false;
}else{
this.$message.error(res.message);
this.isFalse = false
}
}).catch (error=>{
console.log(error,'error')
this.isFalse = false
//this.$message.error(error);
});
// const { result, status } = coueseFile.saveUpload(data);
@@ -598,16 +617,26 @@ export default {
},
handleCloseCheck(done){
//console.log('关闭的处理aaaaa');
if(this.isTrue&&this.isFalse){
this.$message.error('文件正在上传中,请耐心等待');
return false;
}
if(this.fileList.length>0){
this.$message.error('有待保存的上传文件,请执行保存操作');
return false;
}else{
this.isTrue = false
this.isFalse = false
return done(true);
}
},
// 文件上传保存
saveUpload() {
if(this.fileList.length<=0){
this.$message.error('请上传文件');
return;
}
if(!this.upload.orgName){
this.$message.success('请选择资源归属');
return;
@@ -628,6 +657,20 @@ export default {
item.duration = item.minute ? parseFloat(item.minute) * 60 : 1800;
});
this.loading = true;
const messageD = this.fileList.some(item =>{
if(item.name == ''){
this.$message.error('课件名称不能为空');
return true;
}else if(!item.minute||item.minute == undefined){
this.$message.error('时长不能为空并且不能为0');
return true;
}else{
return false
}
})
if(messageD){
return
}
coueseFile.batchUpdate(this.fileList).then(rs => {
if (rs.status === 200) {
this.$message.success('保存成功');
@@ -793,6 +836,17 @@ export default {
</script>
<style lang="scss" scoped>
::v-deep .el-input-number.is-controls-right .el-input__inner{
padding-right: 20px;
padding-left: 8px;
text-align: left;
}
::v-deep .el-input-number__decrease{
width: 16px;
}
::v-deep .el-input-number__increase{
width: 16px;
}
.butpost{
position: absolute;
right: 1%;

View File

@@ -195,15 +195,7 @@
</template>
</el-dialog>
<!--课程管理-->
<el-dialog
custom-class="g-dialog"
title="课程学习管理"
width="900px"
height="900px"
:visible.sync="manageStudy.dlgShow"
:close-on-click-modal="false"
>
<el-dialog custom-class="g-dialog" title="课程学习管理" width="900px" :visible.sync="manageStudy.dlgShow" :close-on-click-modal="false">
<manager :manageStudyData="manageStudyData" :isShowDialog="manageStudy.dlgShow"></manager>
<template #footer>
<el-button @click="manageStudy.dlgShow = false">关闭</el-button>
@@ -947,8 +939,4 @@ export default {
}
}
}
.el-dialog__body {
overflow: hidden;
}
</style>

View File

@@ -1,206 +1,206 @@
<template>
<div style="padding: 12px 32px 10px 12px;">
<div style="display: flex;justify-content: flex-start;">
<div style="padding: 12px 32px 10px 12px;">
<div style="display: flex;justify-content: flex-start;">
<div><el-input v-model="keyword" placeholder="输入课程名称搜索" clearable></el-input></div>
<div style="padding-left: 10px;"><el-button @click="recordList()" type="primary" icon="el-icon-search">搜索</el-button></div>
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" @click="keyword = ''" type="primary" >重置</el-button></div>
<div style="padding: 0px 5px;"><el-button type="primary" @click="exportFile()" icon="el-icon-search" size="small" round>导出</el-button></div>
<div style="padding: 0px 5px;"><el-button type="primary" @click="exportStudentOfTearcher()" icon="el-icon-search" size="small" round>导出学员信息</el-button></div>
</div>
<div class="Export">
<!-- <div style="padding-left: 10px;"><el-button type="primary" @click="exportFile()" icon="el-icon-search" size="small" round>导出</el-button></div> -->
<!-- <div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" size="small" round>导出学员信息</el-button></div> -->
</div>
<div style="margin-top:20px;">
<el-table :data="pageData" border stripe>
<el-table-column
label="课程时间"
prop="courseTime"
width="200px">
</el-table-column>
<el-table-column
label="课程名称"
prop="courseName"
width="200px">
</el-table-column>
<el-table-column
label="开课场地"
prop="address"
width="240px">
</el-table-column>
<el-table-column
label="所属课程"
prop="parentCourse"
width="120px">
</el-table-column>
<el-table-column
label="所属项目"
prop="parentProject"
></el-table-column>
<el-table-column
label="所属路径"
prop="parentRoute"
width="200px"
></el-table-column>
<el-table-column
label="学习总人数"
prop="studentNumber"
width="100px"
></el-table-column>
<el-table-column
label="时长(分钟)"
width="100px"
prop="period"
></el-table-column>
<el-table-column
label="评分"
width="100px"
prop="score"
></el-table-column>
<el-table-column
label="操作"
align="center"
width="150px"
prop="cz"
fixed="right"
>
<template v-slot="scope">
<el-button type="text" @click="exportStudentOfCourse(scope.row.courseId)" size="small">导出学员信息</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div><el-input v-model="keyword" placeholder="输入课程名称搜索" clearable></el-input></div>
<div style="padding-left: 10px;"><el-button @click="recordList()" type="primary" icon="el-icon-search">搜索</el-button></div>
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" @click="keyword = ''" type="primary" >重置</el-button></div>
<div style="padding: 0px 5px;"><el-button type="primary" @click="exportFile()" icon="el-icon-search" size="small" round>导出</el-button></div>
<div style="padding: 0px 5px;"><el-button type="primary" @click="exportStudentOfTearcher()" icon="el-icon-search" size="small" round>导出学员信息</el-button></div>
</div>
<div class="Export">
<!-- <div style="padding-left: 10px;"><el-button type="primary" @click="exportFile()" icon="el-icon-search" size="small" round>导出</el-button></div> -->
<!-- <div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" size="small" round>导出学员信息</el-button></div> -->
</div>
<div style="margin-top:20px;">
<el-table :data="pageData" border stripe>
<el-table-column
label="课程时间"
prop="courseTime"
width="200px">
</el-table-column>
<el-table-column
label="课程名称"
prop="courseName"
width="200px">
</el-table-column>
<el-table-column
label="开课场地"
prop="address"
width="240px">
</el-table-column>
<el-table-column
label="所属课程"
prop="parentCourse"
width="120px">
</el-table-column>
<el-table-column
label="所属项目"
prop="parentProject"
></el-table-column>
<el-table-column
label="所属路径"
prop="parentRoute"
width="200px"
></el-table-column>
<el-table-column
label="学习总人数"
prop="studentNumber"
width="100px"
></el-table-column>
<el-table-column
label="时长(分钟)"
width="100px"
prop="period"
></el-table-column>
<el-table-column
label="评分"
width="100px"
prop="score"
></el-table-column>
<el-table-column
label="操作"
align="center"
width="150px"
prop="cz"
fixed="right"
>
<template v-slot="scope">
<el-button type="text" @click="exportStudentOfCourse(scope.row.courseId)" size="small">导出学员信息</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div style="text-align: center; margin-top:57px">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageInfo.page"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageInfo.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pageInfo.total"
></el-pagination>
</div>
<div style="text-align: center; margin-top:57px">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageInfo.page"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageInfo.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pageInfo.total"
></el-pagination>
</div>
</div>
</div>
</template>
<script>
import apiCourse from '../../api/boe/courseRecord.js';
import { mapGetters } from 'vuex';
export default {
data(){
return {
pageData:[],
keyword:'',
pageInfo:{},
}
},
data(){
return {
pageData:[],
keyword:'',
pageInfo:{},
}
},
mounted() {
this.recordList(1);
mounted() {
this.recordList(1);
},
computed: {
...mapGetters(['userInfo'])
},
},
computed: {
...mapGetters(['userInfo'])
},
methods: {
methods: {
// 导出所有记录
exportFile(){
let req = {
userId: this.userInfo.sysId
// userId:"70F80F4E-34BA-10AB-894A-8FA812B19637"
}
apiCourse.courseRecordExport(req).then(res=>{
const link = document.createElement('a');// 创建a标签
let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); // 设置文件类型
link.style.display = "none";
link.href = URL.createObjectURL(blob); // 创建URL
link.setAttribute("download", "授课记录.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})
},
// 导出所有记录
exportFile(){
let req = {
userId: this.userInfo.sysId
// userId:"70F80F4E-34BA-10AB-894A-8FA812B19637"
}
apiCourse.courseRecordExport(req).then(res=>{
const link = document.createElement('a');// 创建a标签
let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); // 设置文件类型
link.style.display = "none";
link.href = URL.createObjectURL(blob); // 创建URL
link.setAttribute("download", "授课记录.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})
},
// 导出课程下的学员信息
exportStudentOfCourse(courseId){
let userId = this.userInfo.sysId;
apiCourse.exportStudentOfCourse(userId,courseId).then(res=>{
const link = document.createElement('a');// 创建a标签
let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); // 设置文件类型
link.style.display = "none";
link.href = URL.createObjectURL(blob); // 创建URL
link.setAttribute("download", "授课记录.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})
},
// 导出课程下的学员信息
exportStudentOfCourse(courseId){
let userId = this.userInfo.sysId;
apiCourse.exportStudentOfCourse(userId,courseId).then(res=>{
const link = document.createElement('a');// 创建a标签
let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); // 设置文件类型
link.style.display = "none";
link.href = URL.createObjectURL(blob); // 创建URL
link.setAttribute("download", "授课记录.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})
},
// 导出教师下的所有授课记录下的学员信息
exportStudentOfTearcher(){
let userId = this.userInfo.sysId;
// let userId = '5D36C207-64F4-C512-312D-C9598257695C';
apiCourse.exportStudentOfTearcher(userId).then(res=>{
const link = document.createElement('a');// 创建a标签
let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); // 设置文件类型
link.style.display = "none";
link.href = URL.createObjectURL(blob); // 创建URL
link.setAttribute("download", "授课记录.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})
},
// 导出教师下的所有授课记录下的学员信息
exportStudentOfTearcher(){
let userId = this.userInfo.sysId;
// let userId = '5D36C207-64F4-C512-312D-C9598257695C';
apiCourse.exportStudentOfTearcher(userId).then(res=>{
const link = document.createElement('a');// 创建a标签
let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); // 设置文件类型
link.style.display = "none";
link.href = URL.createObjectURL(blob); // 创建URL
link.setAttribute("download", "授课记录.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})
},
recordList(pageIndex){
let req = {
//     userId:"6B049FAF-C314-7CCF-0D28-0D23F4C42531",
userId: this.userInfo.sysId,
keyword:this.keyword,
    page:pageIndex,
    pageSize:10
}
apiCourse.courseRecordList(req).then(res=>{
if(res.status == 200) {
this.pageData = res.result.list;
this.pageInfo = res.result.pageInfo;
} else {
this.$message({
type: 'error',
message: res.message
});
}
})
},
recordList(pageIndex){
let req = {
//     userId:"6B049FAF-C314-7CCF-0D28-0D23F4C42531",
userId: this.userInfo.sysId,
keyword:this.keyword,
    page:pageIndex,
    pageSize:10
}
apiCourse.courseRecordList(req).then(res=>{
if(res.status == 200) {
this.pageData = res.result.list;
this.pageInfo = res.result.pageInfo;
} else {
this.$message({
type: 'error',
message: res.message
});
}
})
},
// 每页显示的条数事件
handleSizeChange(val){
this.pageInfo.pageSize = val;
this.recordList(1);
},
// 显示制定页的数据
handleCurrentChange(val){
this.pageInfo.pageIndex = val;
this.recordList(this.pageInfo.pageIndex);
},
// 每页显示的条数事件
handleSizeChange(val){
this.pageInfo.pageSize = val;
this.recordList(1);
},
// 显示制定页的数据
handleCurrentChange(val){
this.pageInfo.pageIndex = val;
this.recordList(this.pageInfo.pageIndex);
},
},
},
}
</script>
<style lang="scss" scoped>
.Export{
display: flex;
padding-top: 10px;
display: flex;
padding-top: 10px;
}
</style>

View File

@@ -1,390 +0,0 @@
<template>
<div class="growth" v-loading="loading" id="scrollContainer">
<div class="growth-left">
<div class="navbar">
<div style="display: flex; flex: 1">
<div class="nav-title">我的专业力必修</div>
</div>
</div>
<div class="growth-item" v-for="item of list" :id="item.id">
<div class="growth-nav">
<div class="growth-name">{{ item.growthName }}</div>
<div class="f-a-c">
<div
class="growth-state"
:style="{
color:
item.learningState === 0
? '#999999'
: item.learningState === 1
? '#6ba158'
: '#F2903D',
}"
>
{{
item.learningState === 0
? "未开始"
: item.learningState === 1
? "已完成"
: "进行中"
}}
</div>
<div class="growth-btn" @click="jumpRouter(item)">去学习</div>
</div>
</div>
<template v-if="item.description">
<div class="tip-title">说明</div>
<div class="tip-content">
{{ item.description || "暂无说明" }}
</div>
</template>
<div class="progress-title">学习进度</div>
<div class="progress-content">
<div class="f-j-b" style="margin-bottom: 10px">
<div class="f-a-c">
<div style="font-size: 16px; color: #333333">必修进度</div>
<div style="font-size: 18px; color: #999999; margin-left: 12px">
{{ item.requiredTaskCompletedNum }}/{{ item.requiredTaskNum }}
</div>
</div>
<div style="font-size: 18px; color: #0077ec">
{{ requiredTaskCompletionRate(item) }}%
</div>
</div>
<el-progress
:stroke-width="6"
:show-text="false"
:percentage="requiredTaskCompletionRate(item)"
color="#0077EC"
></el-progress>
</div>
<template v-if="item.electiveTaskNum !== 0">
<div class="progress-content">
<div class="f-j-b" style="margin-bottom: 10px">
<div class="f-a-c">
<div style="font-size: 16px; color: #333333">选修进度</div>
<div style="font-size: 18px; color: #999999; margin-left: 12px">
{{ item.electiveTaskCompletedNum }}/{{ item.electiveTaskNum }}
</div>
<el-tooltip
class="item"
effect="light"
:content="`还需完成${item.electivePoorNum}个选修任务`"
placement="top-start"
>
<i class="el-icon-question"></i>
</el-tooltip>
</div>
<div style="font-size: 18px; color: #0077ec">
{{ electiveTaskCompletionRate(item) }}%
</div>
</div>
<el-progress
:stroke-width="6"
:show-text="false"
color="#0077EC"
:percentage="electiveTaskCompletionRate(item)"
></el-progress>
</div>
</template>
<div class="progress-content">
<div class="f-j-b" style="margin-bottom: 10px">
<div class="f-a-c">
<div style="font-size: 16px; color: #333333">总进度</div>
<div style="font-size: 18px; color: #999999; margin-left: 12px">
{{ item.totalTaskCompletedNum }}/{{ item.totalTaskNum }}
</div>
</div>
<div style="font-size: 18px; color: #0077ec">
{{ totalTaskCompletionRate(item) }}%
</div>
</div>
<el-progress
:stroke-width="6"
:show-text="false"
color="#0077EC"
:percentage="totalTaskCompletionRate(item)"
></el-progress>
</div>
<div class="growth-bg-icon">
<img src="@/assets/images/growth/growth-bg-icon.png" />
</div>
</div>
<template v-if="!list.length">
<div class="empty">
<el-empty :image-size="200"></el-empty>
</div>
</template>
</div>
<!-- <template v-if="!list || list.length < 2">
<div class="growth-right">
<div class="title">专业力必修</div>
<div
:key="item.id"
class="item-growth"
:class="activeItem.id == item.id ? 'active' : ''"
v-for="item of list"
>
<div class="icon"></div>
<div @click="handlerAnchor(item)">
{{ item.growthName }}
</div>
</div>
</div>
</template> -->
</div>
</template>
<script>
import { listData, getTotalGrowthTaskDetail } from "@/api/growth/growthpath";
export default {
data() {
return {
list: [],
loading: false,
totalData: {},
activeItem: {},
};
},
computed: {
// 完成进度
totalTaskCompletionRate() {
return (item) => {
if (item.totalTaskCompletedNum && item.totalTaskNum) {
let num = item.totalTaskCompletedNum / item.totalTaskNum;
num = num * 100;
num = num.toFixed(0);
return Number(num);
} else {
return 0;
}
};
},
// 选修进度
electiveTaskCompletionRate() {
return (item) => {
if (item.electiveTaskCompletedNum && item.electiveTaskNum) {
let num = item.electiveTaskCompletedNum / item.electiveTaskNum;
num = num * 100;
num = num.toFixed(0);
return Number(num);
} else if (item.electiveTaskNum == 0) {
return 100;
} else {
return 0;
}
};
},
// 必修进度
requiredTaskCompletionRate() {
return (item) => {
if (item.requiredTaskCompletedNum && item.requiredTaskNum) {
let num = item.requiredTaskCompletedNum / item.requiredTaskNum;
num = num * 100;
num = num.toFixed(0);
return Number(num);
} else {
return 0;
}
};
},
},
methods: {
select(item) {},
jumpRouter(item) {
let studentPath = process.env.VUE_APP_STUDENT_PATH;
let params = encodeURIComponent("routerId=" + item.id);
this.$router.push(
"/forward?to=" + studentPath + "/growthList&params=" + params
);
},
handlerAnchor(item, index) {
this.activeItem = item;
let dom = document.getElementById(`${item.id}`);
dom.classList.add("handler-add-padding");
dom.scrollIntoView({ behavior: "smooth" });
},
},
created() {
this.loading = true;
listData().then((res) => {
this.activeItem = res.data[0];
this.list = res.data;
this.loading = false;
});
getTotalGrowthTaskDetail().then((res) => {
this.totalData = res.data;
});
// 处理滚动事件的代码
let that = this;
window.addEventListener("scroll", function () {
let dom = document.getElementById(`${that.activeItem.id}`);
if (dom) {
dom.classList.remove("handler-add-padding");
}
});
},
};
</script>
<style lang="less" scoped>
.f-a-c {
display: flex;
align-items: center;
}
.f-j-b {
display: flex;
justify-content: space-between;
}
.f-j-c {
display: flex;
justify-content: center;
}
.growth {
.empty {
height: 600px;
display: flex;
justify-content: center;
align-items: center;
background-color: #ffffff;
}
.el-icon-question {
color: #387df7;
font-size: 16px;
margin-left: 5px;
}
.handler-add-padding {
padding: 100px 38px 66px 40px !important;
margin-top: -80px;
}
display: flex;
.growth-left {
margin-right: 10px;
flex: 1;
.growth-item {
background: #ffffff;
padding: 30px 38px 66px 40px;
margin-bottom: 35px;
position: relative;
.growth-bg-icon {
position: absolute;
right: 92px;
bottom: 0;
}
.progress-title {
// font-weight: 700;
font-size: 18px;
color: #000000;
margin: 28px 0 20px 0;
}
.progress-content {
margin-bottom: 28px;
}
.tip-title {
// font-weight: 700;
font-size: 18px;
color: #000000;
margin: 30px 0 10px 0;
}
.tip-content {
font-size: 16px;
color: #333333;
line-height: 30px;
}
.growth-nav {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 28px;
border-bottom: 2px solid #f5f5f5;
}
.growth-name {
font-weight: bold;
font-size: 18px;
color: #0071ed;
}
.growth-state {
font-size: 15px;
margin-right: 18px;
}
.growth-btn {
display: flex;
justify-content: center;
align-items: center;
width: 120px;
height: 36px;
background: #f2903d;
border-radius: 4px;
font-size: 16px;
color: #ffffff;
cursor: pointer;
}
}
.navbar {
display: flex;
align-items: center;
height: 90px;
padding-left: 40px;
margin-bottom: 10px;
color: #ffffff;
background-image: url(../../assets/images/growth/growth-bg.png);
background-size: 100% 100%;
.nav-title {
font-weight: 700;
font-size: 18px;
margin-right: 10%;
}
.nav-total {
// margin-left: 15%;
width: 20%;
}
.total-num {
font-weight: bold;
font-size: 22px;
}
}
}
.growth-right {
width: 30%;
max-width: 464px;
margin-bottom: 35px;
background-color: #ffffff;
padding: 35px 20px 20px 30px;
.title {
font-size: 18px;
color: #000000;
font-weight: 700;
margin-bottom: 30px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.item-growth {
display: flex;
align-items: center;
border-radius: 5px;
font-size: 14px;
color: #666666;
padding: 10px 20px 10px 8px;
cursor: pointer;
}
.icon {
width: 4px;
height: 4px;
background: #4c5564;
border-radius: 50%;
margin-right: 10px;
}
.active {
background: #e3edfe;
color: #000;
.icon {
background: #0077ec;
}
}
}
}
</style>

View File

@@ -22,7 +22,7 @@
{img:'01',url:'1265897142383042560'},
{img:'02',url:'1265697724606210048'},
{img:'003',url:'1280185851054231552'},
{img:'04',url:'1321778585966247936'},
{img:'4',url:''},
],
}
},
@@ -97,7 +97,7 @@
padding: 28px;
padding-top: 62px;
margin-bottom: 59px;
.img {
width: 100%; // 图片宽度占满item宽度
height: auto; // 自动调整高度
@@ -132,7 +132,7 @@
padding: 14px;
padding-top: 26px;
margin-bottom: 30px;
.img {
width: 100%; // 图片宽度占满item宽度
height: auto; // 自动调整高度
@@ -176,4 +176,4 @@
}
}
}
</style>
</style>

View File

@@ -22,14 +22,14 @@ export default {
},
methods:{
getTeacherList() {
addTeacher({pageNo:1,pageSize:20,keyword:''}).then(res=>{
addTeacher({pageNo:1,pageSize:100,userNo:''}).then(res=>{
this.options = res.data.map(item => {
return { value: item.realName, label: item.realName };
});
})
},
getCoachingTeacher(val){
addTeacher({pageNo:1,pageSize:20,keyword:val}).then(res=>{
addTeacher({pageNo:1,pageSize:20,userNo:val}).then(res=>{
this.options = res.data.map(item => {
return { value: item.realName, label: item.realName };
});

View File

@@ -64,17 +64,16 @@ export default {
getProgress({teacherId:id}).then(res=>{
this.progressData=res.data
if ( res.data.length>=1 ){
const isAll = true;
res.data.some(item => {
if (item.progress != 100) {
this.disabled = true;
isAll = false;
return true;
res.data.forEach((item,index)=>{
if (item.progress==100 && index==res.data.length-1){
this.disabled=false
}else if (item.progress==100) {
}else {
this.disabled=true
return
}
});
if (isAll) {
this.disabled = false;
}
})
}
})
},

View File

@@ -25,14 +25,14 @@ export default {
},
methods:{
getTeacherList() {
addTeacher({pageNo:1,pageSize:20,keyword:''}).then(res=>{
addTeacher({pageNo:1,pageSize:100,userNo:''}).then(res=>{
this.options = res.data.map(item => {
return { value: item.realName, label: item.realName };
});
})
},
getCoachingTeacher(val){
addTeacher({pageNo:1,pageSize:20,keyword:val}).then(res=>{
addTeacher({pageNo:1,pageSize:20,userNo:val}).then(res=>{
this.options = res.data.map(item => {
return { value: item.realName, label: item.realName };
});

View File

@@ -185,11 +185,11 @@
<div class="back_num" v-if="numIsFalse">
<div class="search_div_num">
当前已检索 <span style="color:#FF4040 ;">
{{ this.caseList.count }}</span> 条数据
{{ caseList.count }}</span> 条数据
</div>
</div>
<div class="data-content">
<div v-for="item in this.caseList.list" :key="isTimeData?item.browsingHistoryId : item.id" class="case-list">
<div v-for="item in caseList.list" :key="isTimeData?item.browsingHistoryId : item.id" class="case-list">
<div class="case-info">
<div class="case-info-cont">
<!-- <router-link :to="'/case/detail?id=' + item.id"> -->
@@ -270,7 +270,7 @@
</div>
</div>
</div>
<div v-if="this.caseList.showPagCount > queryCondition.pageSize">
<div v-if="caseList.showPagCount > queryCondition.pageSize">
<pagination :size="queryCondition.pageSize" :total="caseList.count" :page="queryCondition.pageIndex"
layout="total, prev, pager, next, jumper" @change-page="currentChange"></pagination>
</div>
@@ -279,7 +279,7 @@
<!-- <span class="pag-text" @click="loadMore()" v-if="moreState == 1">加载更多</span>
<span class="pag-text-msg" v-else-if="moreState == 2">数据加载中</span>
<span class="pag-text-msg" v-else-if="moreState == 3">没有更多数据了</span> -->
<span class="notcoures" v-if="this.caseList.list.length == 0">
<span class="notcoures" v-if="caseList.list.length == 0">
<img :src="`${webBaseUrl}/images/nocase.png`" alt="">
<h5>暂无案例请优先学习其它案例吧</h5>
</span>
@@ -555,7 +555,7 @@ export default {
name: '',
years: [],
// 随机
// notInIds: [],//重复的id
notInIds: [],//重复的id
orderField: "id",
orderAsc: false,//排序
sysType1:'',
@@ -1507,7 +1507,7 @@ export default {
};
});
res.result.list.forEach(item=>{
item.viewRankTags = item.viewRankTags?.slice(0,2)||[]
item.viewRankTags = item.viewRankTags.slice(0,2)
})
this.caseList.list = res.result.list
this.getCaseUserData(res.result.list);
@@ -1562,7 +1562,7 @@ export default {
};
});
res.result.list.forEach(item=>{
item.viewRankTags = item.viewRankTags?.slice(0,2)||[]
item.viewRankTags = item.viewRankTags.slice(0,2)
})
this.caseList.list = res.result.list
this.getCaseUserData(res.result.list);
@@ -1599,17 +1599,12 @@ export default {
} else {
this.moreState = 3;
}
if(res.result.list.length ===0){
this.moreState = 3;
this.isSeach = false;
}
console.log(res?.result?.list ,'有没有数据1');
// console.log(res?.result?.list ,'有没有数据');
res.result.list.forEach(item=>{
item.viewRankTags = item.viewRankTags?.slice(0,2)||[]
item.viewRankTags = item.viewRankTags.slice(0,2)
})
console.log(res?.result?.list ,'有没有数据2');
this.caseList.list = res.result.list
// this.getCaseUserData(res.result.list);
this.getCaseUserData(res.result.list);
// 给所有的赋值
this.caseList.count = res.result.count;
this.caseList.showPagCount = res.result.count;

View File

@@ -253,8 +253,8 @@ export default {
if(res.status==200){
let localCourseIds=[];//本地在线课程的id集合
res.result.list.forEach(item=>{
if(item.courseImage?.startsWith('/upload')){
item.courseImage=$this.fileUrl+item.courseImage?.substring(7)
if(item.courseImage.startsWith('/upload')){
item.courseImage=$this.fileUrl+item.courseImage.substring(7)
}
if(item.source==2){
localCourseIds.push(item.id);

View File

@@ -167,6 +167,7 @@
</div>
<!-- 课程单元 -->
<div class="course-units" v-if="tab == 1">
<div :style="`height: ${controlHeight}px;overflow-y: auto;`">
<div class="catalog" v-if="courseInfo.type == 20">
<div v-for="(item, index) in catalogTree" :key="index" :name="index">
@@ -754,7 +755,7 @@
if (this.contentData.status < 2) {
// this.contentData.status = 2; //进行中
if(r.contentType != 61&&r.contentType != 20 && r.contentType != 10){
setTimeout(() => {
setTimeout(() => {
this.isContentTypeTwo = r.contentType
$this.isShowTime()
}, 2000);
@@ -816,7 +817,7 @@
//console.log(h,$this.controlHeight,'$this.controlHeight');
})
//console.log('this.contentData11:',this.contentData,this.curriculumData)
// 视频设置禁用处理逻辑,如果用户已全部观看完该视频则设置为能全部拖动的逻辑把isDrag设置为true即可,同时删除本地存储的数据
if(this.contentData.progressVideo ===1){
@@ -1139,8 +1140,6 @@
// }
// }
this.playerBoxShow = false;
// this.onPlayerPlayFullscreen()
// this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
let $this = this;
//这里有些不准备,如果文件未能加载,这个事件就是错误的
this.isAppendTime=true;
@@ -1158,7 +1157,6 @@
// }
// }
},
onFullscreen(full) {
let divId = 'videowatermark';
var div = document.getElementById('myVideoPlayer')
@@ -1178,12 +1176,9 @@
"position:absolute;pointer-events: none; width: 100%;height: 100%;top:0;left:0;bottom: 0;right: 0; display: flex;justify-content: center;flex-wrap: wrap;overflow: hidden; opacity:0.3;padding-top:10px";
div.appendChild(div3);
} else {
console.log("去除水印 ---- gx ----");
var markDiv = div.querySelector("#" + divId);
console.log("去除水印 ---- gx markDiv ----",markDiv);
if (markDiv) {
console.log("执行去除水印 ---- gx markDiv ----",markDiv);
div.removeChild(markDiv);
div.removeChild(markDiv);
}
}
},
@@ -1551,7 +1546,7 @@
}
}
},
progress(val) {
progress(val) {
const progressValue = parseFloat(val) * 100;
this.sendEventProgress = Number(progressValue.toFixed(2));
},

View File

@@ -85,28 +85,28 @@ module.exports = {
.end()
config
.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
})
}
})
config.optimization.runtimeChunk('single'), {
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
to: './', //到根目录下
@@ -124,17 +124,6 @@ module.exports = {
// 114.115.162.187 测试环境
// 192.168.0.107 晋宇
proxy: {
// "/professional": {
// // target: 'https://u-pre.boe.com',
// // target: 'http://192.168.86.195:32002',
// target: 'http://192.168.68.211:32002',
// changeOrigin: true,
// },
"/growth": {
target: 'https://u-pre.boe.com',
// target: 'http://192.168.86.195:32002',
changeOrigin: true,
},
'/manageApi': {
// 目标代理服务器地址
target: 'https://u-pre.boe.com',