mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
Merge branch 'third'
This commit is contained in:
BIN
public/images/medal/xz20230101.png
Normal file
BIN
public/images/medal/xz20230101.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 91 KiB |
@@ -9,7 +9,7 @@ const baseURL = process.env.VUE_APP_BOE_BASE_API;
|
||||
/**
|
||||
* 导出授课记录
|
||||
*
|
||||
* @param {Object} kid
|
||||
* @param {Object} data
|
||||
*/
|
||||
const courseRecordExport = function(data) {
|
||||
return axios.request({
|
||||
@@ -20,14 +20,42 @@ const courseRecordExport = function(data) {
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
responseType: 'blob'
|
||||
})
|
||||
|
||||
// return ajax.postJson('/b1/system/teacher/teacher-course-export',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出课程下的学员信息
|
||||
*
|
||||
*/
|
||||
const exportStudentOfCourse = function(userId,courseId) {
|
||||
return axios.request({
|
||||
baseURL,
|
||||
url: '/b1/system/teacher/teacher-course-student-export?userId='+userId+'&courseId='+courseId,
|
||||
method: 'post',
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出教师下的所有授课记录下的学员信息
|
||||
*
|
||||
*/
|
||||
const exportStudentOfTearcher = function(userId) {
|
||||
return axios.request({
|
||||
baseURL,
|
||||
url: '/b1/system/teacher/teacher-course-student-export?userId='+userId,
|
||||
method: 'post',
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 授课记录列表
|
||||
*
|
||||
* @param {Object} kid
|
||||
* @param {Object} data
|
||||
*/
|
||||
const courseRecordList = function(data) {
|
||||
return ajax.postJson('/b1/system/teacher/teacher-course-list',data);
|
||||
@@ -37,6 +65,8 @@ const courseRecordList = function(data) {
|
||||
|
||||
export default {
|
||||
courseRecordExport,
|
||||
courseRecordList
|
||||
courseRecordList,
|
||||
exportStudentOfCourse,
|
||||
exportStudentOfTearcher
|
||||
|
||||
}
|
||||
|
||||
@@ -274,6 +274,7 @@ const countWaitAudit = function() {
|
||||
}
|
||||
|
||||
/**
|
||||
* [已用courseAudit中的hrbpAuditList替换]
|
||||
* 当前用户需要审核的课程列表
|
||||
* @param {Object} query 同pageList
|
||||
*/
|
||||
@@ -282,7 +283,10 @@ const auditList = function(query) {
|
||||
}
|
||||
|
||||
|
||||
/**教师需要审核的课程列表*/
|
||||
/**
|
||||
* 【已移到courseAudit中】
|
||||
* 教师需要审核的课程列表
|
||||
*/
|
||||
const teacherAuditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/audit/teacher-course', query);
|
||||
}
|
||||
@@ -305,15 +309,6 @@ const getAuditInfo = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/infos', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核日志,此功能是为了管理员查看课程的审核日志。
|
||||
* 为后续查看增加的接口
|
||||
* @param {courseId:'课程ID',teacherId:'可以不填写,系统会查询当前人'} data
|
||||
*/
|
||||
const getAuditLogs = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/logs', data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 管理员的课程审核处理
|
||||
@@ -339,7 +334,7 @@ const auditCourseRecords = function(data) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员的课程发布
|
||||
* 管理员的课程发布,当前已经不再使用了
|
||||
* @param {Object} query {ids:课程id,多个使用逗号分隔,title:课程的名称, Boolean pass 是否发布}
|
||||
*/
|
||||
const publish = function(data) {
|
||||
@@ -382,7 +377,7 @@ const detailFew=function(id){
|
||||
}
|
||||
|
||||
/*
|
||||
直接审核
|
||||
直接审核,教师提交审核
|
||||
*/
|
||||
const sumbits=function(data){
|
||||
return ajax.post('/xboe/m/course/manage/sumbits',data);
|
||||
@@ -463,7 +458,6 @@ export default {
|
||||
teacherAuditList,
|
||||
auditAppoint,
|
||||
getAuditInfo,
|
||||
getAuditLogs,
|
||||
audit,
|
||||
auditPageRecords,
|
||||
auditCourseRecords,
|
||||
|
||||
124
src/api/modules/courseAudit.js
Normal file
124
src/api/modules/courseAudit.js
Normal file
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* 课程审核的操作,因为是后续添加,有些处理还在course.js中
|
||||
* 针对于管理员,教师的功能
|
||||
*
|
||||
**/
|
||||
import ajax from '@/utils/xajax.js'
|
||||
|
||||
/**计算待审核课程*/
|
||||
const countWaitAudit = function() {
|
||||
return ajax.get('/xboe/m/course/manage/wait-audit-num');
|
||||
}
|
||||
|
||||
/**
|
||||
* HRBP要审核的课程列表
|
||||
* @param {Object} query 同pageList
|
||||
*/
|
||||
const hrbpAuditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/manage/audit-pagelist', query);
|
||||
}
|
||||
|
||||
/**HRBP已审核的列表*/
|
||||
const hrbpHasAuditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/manage/audit-pagelist', query);
|
||||
}
|
||||
|
||||
/**
|
||||
* hrbp审核提交
|
||||
* @param {Object} data
|
||||
* {String auditId,String courseId,String title,Boolean open, Boolean pass,String remark}
|
||||
*/
|
||||
const hrbpAuditSubmit=function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/hrbp-submit-audit', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定审核人,转审核人
|
||||
* 点击“转审” 弹出教师查询窗口,查询教师,填写备注,提交,调用此接口
|
||||
* @param {Object} data
|
||||
* {courseId:课程id,teacherId:指定的审核人教师的id,teacherName:教师名称,remark:备注}
|
||||
*/
|
||||
const hrbpAuditAppoint = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/appoint', data);
|
||||
}
|
||||
|
||||
/**教师需要审核的课程列表*/
|
||||
const teacherAuditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/audit/teacher-course', query);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Object} data
|
||||
* String auditId,Boolean pass,String remark
|
||||
*/
|
||||
const teacherAuditSubmit = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/teacher-submit-audit', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后的审核(公开课审核)查询列表
|
||||
* @param {Object} data
|
||||
* CourseHRBPAuditDto
|
||||
*/
|
||||
const lastAuditList = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/last-audit-list', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后的审核(公开课审核)提交审核
|
||||
* @param {Object} data
|
||||
* String auditId,String courseId,Boolean pass,String remark
|
||||
*/
|
||||
const lastAuditSubmit = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/last-audit-submit', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交并发布,对于默认管理员调用此方法
|
||||
* @param {Object} data
|
||||
* CourseFullDto
|
||||
*/
|
||||
const submitAndPublish = function(data) {
|
||||
return ajax.postJson('/xboe/m/course/audit/submit-publish', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核信息,上面教师点击审核课程时,用于查询,上面“转审”时,用户填写的备注信息
|
||||
* @param {courseId:'课程id',teacherId:'可以不填写,系统会查询当前人'} data
|
||||
*/
|
||||
const getAuditInfo = function(auditId) {
|
||||
return ajax.post('/xboe/m/course/audit/hrbp-detail', {auditId});
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核记录列表,分页查询
|
||||
*/
|
||||
const auditPageRecords = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/page-records', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核记录列表,要卖课程id,查询出审核列记录信息
|
||||
* { courseId:必须}
|
||||
*/
|
||||
const auditCourseRecords = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/course-records', data);
|
||||
}
|
||||
|
||||
export default {
|
||||
countWaitAudit,
|
||||
hrbpAuditList,
|
||||
hrbpAuditSubmit,
|
||||
hrbpAuditAppoint,
|
||||
teacherAuditList,
|
||||
teacherAuditSubmit,
|
||||
lastAuditList,
|
||||
lastAuditSubmit,
|
||||
submitAndPublish,
|
||||
getAuditInfo,
|
||||
auditPageRecords,
|
||||
auditCourseRecords
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -184,6 +184,8 @@
|
||||
// this.cware.content.contentRefId=rs.result.id;
|
||||
// this.cware.content.contentName=result.displayName;
|
||||
// this.cware.content.content=result.filePath;
|
||||
}else{
|
||||
this.$message.error(rs.message);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
|
||||
@@ -397,6 +397,7 @@ import apiTag from '../../api/modules/tag.js';
|
||||
import apiHRBP from '../../api/boe/HRBP.js';
|
||||
import apiUserBasic from '../../api/boe/userbasic.js';
|
||||
import apiCourse from '../../api/modules/course.js';
|
||||
import apiCourseAudit from '../../api/modules/courseAudit.js';
|
||||
import apiOrg from '../../api/system/organiza.js';
|
||||
import apiUser from '../../api/system/user.js';
|
||||
import WxEditor from '@/components/Editor/index.vue';
|
||||
@@ -1300,7 +1301,6 @@ export default {
|
||||
return true;
|
||||
},
|
||||
submitCourse() {
|
||||
|
||||
if(this.biaoke.dlgShow && !this.unsavedContent()){
|
||||
this.$message.error('您有未保存的内容,请先保存');
|
||||
return;
|
||||
@@ -1420,60 +1420,64 @@ export default {
|
||||
};
|
||||
this.btnLoading = true;
|
||||
let $this = this;
|
||||
//console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
|
||||
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
|
||||
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
|
||||
if(rs.status==200 && rs.result){
|
||||
postData.auditUser={
|
||||
email:rs.result.email,
|
||||
code:rs.result.userNo,
|
||||
name:rs.result.name,
|
||||
aid:rs.result.id,
|
||||
orgId:rs.result.orgId
|
||||
}
|
||||
postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
|
||||
|
||||
// apiHRBP.getHRBP(this.orgKid).then(rs=>{
|
||||
// if(rs.status==200 && rs.result.length>0){
|
||||
// let hrbpUser=rs.result[0];
|
||||
// postData.auditUser={
|
||||
// email:hrbpUser.email,
|
||||
// code:hrbpUser.user_no,
|
||||
// name:hrbpUser.real_name,
|
||||
// kid:hrbpUser.user_id,
|
||||
// orgId:hrbpUser.orgnization_id
|
||||
// }
|
||||
// postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
|
||||
|
||||
apiCourse.submitCourse(postData).then(res => {
|
||||
//this.btnLoading=false;
|
||||
//2023-1-5 对于默认管理员,不需要提交hrbp。直接提交并发布
|
||||
let adminType=this.userInfo.adminType;
|
||||
if(adminType==1){ //默认管理员,直接审核通过
|
||||
apiCourseAudit.submitAndPublish(postData).then(res=>{
|
||||
setTimeout(function() {
|
||||
$this.btnLoading = false;
|
||||
}, 1000);
|
||||
if (res.status === 200) {
|
||||
//提交成功,直接关闭当前窗口
|
||||
this.$message.success('提交成功!!!');
|
||||
this.biaoke.dlgShow = false;
|
||||
this.weike.dlgShow = false;
|
||||
//提交成功回调处理
|
||||
this.$emit('submitSuccess');
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
this.biaoke.dlgShow = false;
|
||||
this.weike.dlgShow = false;
|
||||
this.$emit('submitSuccess');
|
||||
}
|
||||
this.biaoke.dlgShow = false;
|
||||
this.weike.dlgShow = false;
|
||||
this.$emit('submitSuccess');
|
||||
});
|
||||
}else{
|
||||
$this.btnLoading = false;
|
||||
this.$message.error('获取审核HRBP失败:'+rs.message);
|
||||
}
|
||||
}).catch(err=>{
|
||||
//this.$message.error('获取审核HRBP失败:'+err);
|
||||
this.$message.error('获取审核HRBP失败,请检查资源归属下是否有HRBP审核人员');
|
||||
$this.btnLoading = false;
|
||||
})
|
||||
|
||||
}else{
|
||||
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
|
||||
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
|
||||
if(rs.status==200 && rs.result){
|
||||
postData.auditUser={
|
||||
email:rs.result.email,
|
||||
code:rs.result.userNo,
|
||||
name:rs.result.name,
|
||||
aid:rs.result.id,
|
||||
orgId:rs.result.orgId
|
||||
}
|
||||
postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
|
||||
apiCourse.submitCourse(postData).then(res => {
|
||||
//this.btnLoading=false;
|
||||
setTimeout(function() {
|
||||
$this.btnLoading = false;
|
||||
}, 1000);
|
||||
if (res.status === 200) {
|
||||
//提交成功,直接关闭当前窗口
|
||||
this.$message.success('提交成功!!!');
|
||||
this.biaoke.dlgShow = false;
|
||||
this.weike.dlgShow = false;
|
||||
//提交成功回调处理
|
||||
this.$emit('submitSuccess');
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
this.biaoke.dlgShow = false;
|
||||
this.weike.dlgShow = false;
|
||||
this.$emit('submitSuccess');
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$this.btnLoading = false;
|
||||
this.$message.error('获取审核HRBP失败:'+rs.message);
|
||||
}
|
||||
}).catch(err=>{
|
||||
//this.$message.error('获取审核HRBP失败:'+err);
|
||||
this.$message.error('获取审核HRBP失败,请检查资源归属下是否有HRBP审核人员');
|
||||
$this.btnLoading = false;
|
||||
})
|
||||
}
|
||||
},
|
||||
// 教师列标,远程查询
|
||||
async remoteFindTeacher(query) {
|
||||
|
||||
@@ -11,9 +11,8 @@
|
||||
<i class="el-icon-picture-outline"></i>
|
||||
</div>
|
||||
</el-image>
|
||||
<div v-if="isShow">
|
||||
<p v-if="imageTextSize == 4" class="te-max text effect06" v-html="name">
|
||||
</p>
|
||||
<div v-if="isShow && text">
|
||||
<p v-if="imageTextSize == 4" class="te-max text effect06" v-html="name"></p>
|
||||
<p v-if="imageTextSize == 3" class="max text effect06" v-html="name">
|
||||
<!-- {{ course.name || course.courseName || course.title}} -->
|
||||
</p>
|
||||
@@ -39,6 +38,10 @@ export default {
|
||||
type: String,
|
||||
default: "100%",
|
||||
},
|
||||
text:{
|
||||
type: Boolean,
|
||||
default:true,
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: "100%",
|
||||
|
||||
@@ -240,6 +240,56 @@
|
||||
})
|
||||
},
|
||||
save(){
|
||||
|
||||
let qidMap=new Map();
|
||||
let hasItem=null;
|
||||
let allScore=true;
|
||||
let allAnswer=true;
|
||||
this.qitems.some(qitem=>{
|
||||
//console.log(qitem,'qitem');
|
||||
if(qitem.type==3){
|
||||
if(!qitem.answer){
|
||||
allAnswer=false;
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
var optHasAnswer=qitem.optionList.some(opt=>{
|
||||
return opt.isAnswer;
|
||||
})
|
||||
if(!optHasAnswer){
|
||||
allAnswer=false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(!qitem.defaultScore || qitem.defaultScore=='0'){
|
||||
allScore=false;
|
||||
return true;
|
||||
}
|
||||
if(qidMap.has(qitem.id)){
|
||||
hasItem=qitem;
|
||||
return true;
|
||||
}else{
|
||||
qidMap.set(qitem.id,qitem.id);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if(!allAnswer){
|
||||
this.$message.error('还有试题未设置答案,请设置完整再保存');
|
||||
return;
|
||||
}
|
||||
|
||||
if(!allScore){
|
||||
this.$message.error('有试题未设置分数');
|
||||
return;
|
||||
}
|
||||
|
||||
if(hasItem!=null){
|
||||
console.log(hasItem);
|
||||
this.$message.error('选择的试题重复:'+hasItem.title)
|
||||
return
|
||||
}
|
||||
|
||||
this.loading=true;
|
||||
this.paper.paperContent=JSON.stringify(this.qitems);
|
||||
apiPaper.update(this.paper).then((res)=>{
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
},
|
||||
components: {
|
||||
courseImage,
|
||||
},
|
||||
},
|
||||
props:{
|
||||
list:{
|
||||
type:Array,
|
||||
|
||||
@@ -156,7 +156,7 @@ export default {
|
||||
|
||||
components:{popup,yearMedal},
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'userMsg','identity','studyTaskCount']),
|
||||
...mapGetters(['userInfo','curIdentity', 'userMsg','identity','studyTaskCount']),
|
||||
|
||||
avatarText(){
|
||||
return userAvatarText(this.userInfo.name);
|
||||
|
||||
@@ -180,19 +180,19 @@
|
||||
{{scope.row.chapterName}}{{scope.row.chapterName? '--': ''}}{{scope.row.contentName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<!-- <el-table-column prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.status == 9? '已完成':'未开始'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="duration" label="时长(分)">
|
||||
<el-table-column prop="duration" label="时长(分)">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.duration == 0?'0':scope.row.duration/60}}
|
||||
{{scope.row.duration == 0?'0':(scope.row.duration/60).toFixed(2)}}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作" width="100">
|
||||
</el-table-column>-->
|
||||
<el-table-column label="学习人员" width="110">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="info" @click="getCatalogue(scope.row)" >详情</el-button>
|
||||
<el-button size="mini" type="info" @click="getCatalogue(scope.row)" >学习人员</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
<el-menu-item index="/examine/notapproved">
|
||||
<span class="textl"><el-badge :value="messagesBeReviewed" class="item" :hidden="messagesBeReviewed == 0">待审核的课程</el-badge></span>
|
||||
</el-menu-item>
|
||||
<!-- <el-menu-item index="/course/opencourse/audit">
|
||||
<!-- 毛继禹 110858,只有这个人才可以看到这个菜单,如果是本地开发测试,把这个先去掉-->
|
||||
<el-menu-item v-if="userInfo.userNo=='110858'" index="/course/opencourse/audit">
|
||||
<span class="textl">公开课审核</span>
|
||||
</el-menu-item> -->
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
<el-submenu index="manageFinish" v-show="curIdentity == 3">
|
||||
<template slot="title">
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
<div>
|
||||
<el-dropdown class="person-action-index" style="margin-left: 44px;">
|
||||
<span class="el-dropdown-link">
|
||||
<span v-if="current == 'qa'" style="color: #333;">学员</span>
|
||||
<span v-else style="color: #fff;">学员</span><i class="el-icon-arrow-down el-icon--right"></i>
|
||||
<span v-if="current == 'qa'" style="color: #333;">{{curIdentity==3? '管理员':curIdentity==2? '教师':'学员'}}</span>
|
||||
<span v-else style="color: #fff;">{{curIdentity==3? '管理员':curIdentity==2? '教师':'学员'}}</span><i class="el-icon-arrow-down el-icon--right"></i>
|
||||
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
@@ -149,7 +149,7 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'userMsg','identity']),
|
||||
...mapGetters(['userInfo', 'userMsg','curIdentity','identity']),
|
||||
showName: function() {
|
||||
//console.log('name='+this.name);
|
||||
//console.log('loginName='+this.loginName);
|
||||
|
||||
@@ -51,7 +51,7 @@ export const constantRoutes = [{
|
||||
hidden: true,
|
||||
component: (resolve) => require(['@/views/portal/course/Index'], resolve),
|
||||
name: 'course',
|
||||
meta: { title: '课程', icon: 'dashboard', noCache: true, affix: false },
|
||||
meta: { title: '课程',keepAlive:true, icon: 'dashboard', noCache: true, affix: false },
|
||||
},
|
||||
{
|
||||
path: '/course/micro',
|
||||
@@ -65,7 +65,7 @@ export const constantRoutes = [{
|
||||
hidden: true,
|
||||
component: (resolve) => require(['@/views/portal/course/Detail'], resolve),
|
||||
name: 'courseDetail',
|
||||
meta: { title: '课程详情', icon: 'dashboard', noCache: true, affix: false },
|
||||
meta: { title: '课程详情',keepAlive:true, icon: 'dashboard', noCache: true, affix: false },
|
||||
},
|
||||
// 课程预览
|
||||
{
|
||||
@@ -105,21 +105,21 @@ export const constantRoutes = [{
|
||||
hidden: true,
|
||||
component: (resolve) => require(['@/views/study/coursenew'], resolve),
|
||||
name: 'courseStudyIndex',
|
||||
meta: { title: '课程学习', icon: 'dashboard', noCache: true, affix: false },
|
||||
meta: { title: '课程学习',keepAlive:true, icon: 'dashboard', noCache: true, affix: false },
|
||||
},
|
||||
{
|
||||
path: '/case',
|
||||
hidden: true,
|
||||
component: (resolve) => require(['@/views/portal/case/Index'], resolve),
|
||||
name: 'case',
|
||||
meta: { title: '案例', icon: 'dashboard', noCache: true, affix: false },
|
||||
meta: { title: '案例',keepAlive:true, icon: 'dashboard', noCache: false, affix: true },
|
||||
},
|
||||
{
|
||||
path: '/case/detail',
|
||||
hidden: true,
|
||||
component: (resolve) => require(['@/views/portal/case/Detail'], resolve),
|
||||
name: 'caseDetail',
|
||||
meta: { title: '案例详情', icon: 'dashboard', noCache: true, affix: false },
|
||||
meta: { title: '案例详情',keepAlive:true, icon: 'dashboard', noCache: false, affix: true },
|
||||
},
|
||||
{
|
||||
path: '/article',
|
||||
|
||||
@@ -36,6 +36,8 @@ router.beforeEach((to, from, next) => {
|
||||
} else {
|
||||
//后续这里需要增加一定的控制
|
||||
if (!store.getters.init) {
|
||||
sessionStorage.removeItem(xpage.constants.localCaseFiltersKey);
|
||||
sessionStorage.removeItem(xpage.constants.localCourseFiltersKey);
|
||||
// 判断当前控制台是否已拉取完数据
|
||||
store.dispatch('InitData').then(res => {
|
||||
//加载白名单信息
|
||||
@@ -60,6 +62,7 @@ router.beforeEach((to, from, next) => {
|
||||
//NProgress.done();
|
||||
})
|
||||
} else {
|
||||
to.meta.keepAlive = true
|
||||
next();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/**页面设置的一些常量,方便,用于一个处理只写一处,不要多处写*/
|
||||
const constants={
|
||||
fileBaseUrl:'/upload',
|
||||
newLoginKey:'boe_new_login'
|
||||
newLoginKey:'boe_new_login',
|
||||
localCaseFiltersKey:'local_case_ids', //本地临时查询条件的缓存
|
||||
localCourseFiltersKey:'local_course_ids',//本地临时查询条件的缓存
|
||||
}
|
||||
|
||||
/**返回个人主页的id参数*/
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<li>
|
||||
<router-link @click.native="setCurIdentity(1)" to="/user/ucurrency">
|
||||
<span class="label">我的U币</span>
|
||||
<p><span>{{userData.uvalue}}</span>个</p>
|
||||
<p><span>{{userData.uvalue>0? userData.uvalue:0 }}</span>个</p>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -178,7 +178,7 @@
|
||||
<div class="list-active">
|
||||
<div class="list-content">
|
||||
<div class="list-img">
|
||||
<course-image :course="item"></course-image>
|
||||
<course-image :text="false" :course="item"></course-image>
|
||||
<span v-if="item.type < 21" class="course-type">录播</span>
|
||||
<span v-if="item.type==30" class="course-type">线下课</span>
|
||||
<span v-if="item.type==40" class="course-type">学习项目</span>
|
||||
|
||||
@@ -33,15 +33,16 @@
|
||||
<!-- <el-table-column label="摘要" show-overflow-tooltip prop="content">
|
||||
</el-table-column> -->
|
||||
<el-table-column label="作者" width="80px" prop="authorName"></el-table-column>
|
||||
<el-table-column label="密级" width="80px" prop="confidentialityLevel"></el-table-column>
|
||||
<el-table-column label="导入时间" prop="sysCreateTime"></el-table-column>
|
||||
<el-table-column label="设置优秀时间" prop="excellentTime"></el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button-group>
|
||||
<!-- <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" type="text" @click="setTop(scope.row)" icon="el-icon-top">置顶</el-button>
|
||||
<el-button style="margin:0 5px" v-if="scope.row.isTop" type="text" @click="setTop(scope.row)" icon="el-icon-bottom">取消置顶</el-button>
|
||||
<el-button type="text" icon="el-icon-medal" v-if="scope.row.filePath" ><span @click="cancal(scope.row)" v-if="scope.row.excellent">取消优秀</span><span @click="open(scope.row)" v-else>设为优秀</span></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>
|
||||
<el-button style="margin:0 5px" v-if="scope.row.isTop && scope.row.confidentialityLevel=='内部'" type="text" @click="setTop(scope.row)" icon="el-icon-bottom">取消置顶</el-button>
|
||||
<el-button type="text" icon="el-icon-medal" v-if="scope.row.filePath && scope.row.confidentialityLevel=='内部'" ><span @click="cancal(scope.row)" v-if="scope.row.excellent">取消优秀</span><span @click="open(scope.row)" v-else>设为优秀</span></el-button>
|
||||
<el-button style="margin:0 5px" type="text" @click="delItem(scope.row)" icon="el-icon-delete">删除</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
@@ -414,7 +415,12 @@ export default {
|
||||
};
|
||||
},
|
||||
viewTopic(data) {
|
||||
if(data.confidentialityLevel=='内部'){
|
||||
this.$router.push({path:'/case/detail',query:{id:data.id}})
|
||||
}else{
|
||||
this.$message.warning("非内部密级案例不能查看");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<div style="margin-top:20px;">
|
||||
<el-table :data="params" border stripe >
|
||||
<el-table-column label="案例名称" prop="title" width="200px"> </el-table-column>
|
||||
<el-table-column label="密级" width="80px" prop="confidentialityLevel"></el-table-column>
|
||||
<el-table-column label="审批完成时间" prop="endTime" width="200px"></el-table-column>
|
||||
<el-table-column label="公开范围" prop="caseScope" width="100px"> </el-table-column>
|
||||
<el-table-column label="浏览量" prop="views" ></el-table-column>
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
<div>
|
||||
<div style="line-height: 30px;">
|
||||
<div>请在当前面板选择需要上传的课件</div>
|
||||
<div style="">提示:课件大小超过1G时,无法上传,请先压缩视频,或剪切成多个再上传。</div>
|
||||
<div style="">提示:课件大小超过1G时,无法上传,请先压缩视频,或剪切成多个再上传。如果上传zip文件必须是scorm标准打包文件</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="display: flex;line-height: 30px;padding: 5px 0px;">
|
||||
@@ -254,7 +254,7 @@
|
||||
<el-checkbox label="pc端" v-model="form.device2"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="允许下载">
|
||||
<el-checkbox label="移动端" v-model="form.down"></el-checkbox>
|
||||
<el-checkbox label="允许" v-model="form.down"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@@ -587,27 +587,27 @@ export default {
|
||||
|
||||
},
|
||||
// 课程查询
|
||||
async searchData(pageReset) {
|
||||
if(pageReset){
|
||||
this.page.pageIndex=1;
|
||||
}
|
||||
this.params.resOwner1 = this.resOwner[0];
|
||||
this.params.resOwner2 = this.resOwner[1];
|
||||
this.params.resOwner3 = this.resOwner[2];
|
||||
this.params.pageIndex = this.page.pageIndex;
|
||||
this.params.pageSize = this.page.pageSize;
|
||||
this.params.sysType1 = this.sysTypeList[0];
|
||||
this.params.sysType2 = this.sysTypeList[1];
|
||||
this.params.sysType3 = this.sysTypeList[2];
|
||||
try {
|
||||
const {result, status} = await apiCourse.pageList(this.params);
|
||||
if(status === 200) {
|
||||
this.pageData = result.list;
|
||||
this.page.count = result.count;
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
searchData(pageReset) {
|
||||
if(pageReset){
|
||||
this.page.pageIndex=1;
|
||||
}
|
||||
this.params.resOwner1 = this.resOwner[0];
|
||||
this.params.resOwner2 = this.resOwner[1];
|
||||
this.params.resOwner3 = this.resOwner[2];
|
||||
this.params.pageIndex = this.page.pageIndex;
|
||||
this.params.pageSize = this.page.pageSize;
|
||||
this.params.sysType1 = this.sysTypeList[0];
|
||||
this.params.sysType2 = this.sysTypeList[1];
|
||||
this.params.sysType3 = this.sysTypeList[2];
|
||||
apiCourse.pageList(this.params).then(rs=>{
|
||||
if(rs.status==200){
|
||||
this.pageData = rs.result.list;
|
||||
this.page.count = rs.result.count;
|
||||
}else{
|
||||
return this.$message.error(rs.message);
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
viewTopic(row) {
|
||||
if(row.status == 1) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<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> -->
|
||||
@@ -57,7 +58,7 @@
|
||||
width="100px"
|
||||
prop="score"
|
||||
></el-table-column>
|
||||
<!-- <el-table-column
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150px"
|
||||
@@ -65,9 +66,9 @@
|
||||
fixed="right"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" size="small">导出学员信息</el-button>
|
||||
<el-button type="text" @click="exportStudentOfCourse(scope.row.courseId)" size="small">导出学员信息</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -109,10 +110,11 @@ export default {
|
||||
|
||||
methods: {
|
||||
|
||||
// 导出所有记录
|
||||
exportFile(){
|
||||
let req = {
|
||||
userId: this.userInfo.sysId
|
||||
// teacherId:"70F80F4E-34BA-10AB-894A-8FA812B19637"
|
||||
// userId:"70F80F4E-34BA-10AB-894A-8FA812B19637"
|
||||
}
|
||||
apiCourse.courseRecordExport(req).then(res=>{
|
||||
const link = document.createElement('a');// 创建a标签
|
||||
@@ -126,9 +128,42 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 导出课程下的学员信息
|
||||
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);
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
recordList(pageIndex){
|
||||
let req = {
|
||||
// teacherId:"70F80F4E-34BA-10AB-894A-8FA812B19637",
|
||||
// userId:"6B049FAF-C314-7CCF-0D28-0D23F4C42531",
|
||||
userId: this.userInfo.sysId,
|
||||
keyword:this.keyword,
|
||||
page:pageIndex,
|
||||
|
||||
@@ -1,9 +1,348 @@
|
||||
<template>
|
||||
<!--公开课审核-->
|
||||
<div class="u-page">
|
||||
<div style="padding: 2px 0px 10px 0px;">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<el-input placeholder="课程名" v-model="params.courseName" clearable></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="params.status" placeholder="审核状态" clearable>
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="未审核" :value="1"></el-option>
|
||||
<el-option label="审核通过" :value="9"></el-option>
|
||||
<el-option label="审核未通过" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-button type="primary" @click="getseatch();" icon="el-icon-search">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table :data="pageData" border stripe>
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="名称" prop="courseName" show-overflow-tooltip width="200px">
|
||||
<template slot-scope="scope">
|
||||
<span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.courseName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="status" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.lastState == 1">待审核</span>
|
||||
<span v-if="scope.row.lastState == 9">已审核</span>
|
||||
<span v-if="scope.row.lastState == 2">审核未通过</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" prop="auditUser"></el-table-column>
|
||||
<el-table-column label="hrbp审核时间" prop="auditTime" width="200px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="hrbp" prop="auditInfo" width="150px">
|
||||
<template slot-scope="scope">{{scope.row.auditUser}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.lastState == 1" @click="toExamine(scope.row)" type="text" >审核</el-button>
|
||||
<el-button @click="toPreview(scope.row)" type="text" >预览</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div v-if="pageData.length > 0" style="text-align: center;margin-top:70px">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="page.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="page.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="page.count"
|
||||
></el-pagination>
|
||||
</div>
|
||||
<div style="height: 100px;"></div>
|
||||
<!-- 审核 -->
|
||||
<el-dialog title="审核" :visible.sync="dialogVisible" width="900px" custom-class="g-dialog" @close="examin={}">
|
||||
<div v-show="expandDetails">
|
||||
<div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :id="examin.examineId"></auditCourse1></div>
|
||||
<div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :id="examin.examineId"></auditCourse2></div>
|
||||
</div>
|
||||
<div style="border-top: 1px solid #eee; background-color: #eee; padding: 5px;">
|
||||
<div style="text-align: center;margin-bottom: 10px;">
|
||||
<el-button @click="expandDetails = !expandDetails">{{expandDetails? '详情折叠':'详情展开'}}</el-button>
|
||||
</div>
|
||||
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="审核">
|
||||
<el-radio-group v-model="auditInfo.pass">
|
||||
<el-radio :label="true">通过</el-radio>
|
||||
<el-radio :label="false">不通过</el-radio>
|
||||
</el-radio-group>
|
||||
<span v-if="auditInfo.pass" style="margin-left: 50px; color: #1381e8; ">审核通过提交后同时会发布课程</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见"><el-input v-model="auditInfo.remark" type="textarea" rows="3"></el-input></el-form-item>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false;examin={}">取 消</el-button>
|
||||
<el-button :loading="btnLoading" type="primary" @click="examineData(true)">提交审核</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="课程详情" :visible.sync="showDetails" @close="examin = {};" width="900px" custom-class="g-dialog">
|
||||
<!-- <div v-show="expandDetails"> -->
|
||||
<div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse1></div>
|
||||
<div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse2></div>
|
||||
<!-- </div> -->
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="showDetails = false;examin = {};">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import auditCourse1 from '@/components/Course/auditCourse1.vue';
|
||||
import auditCourse2 from '@/components/Course/auditCourse2.vue';
|
||||
import {courseType} from '../../utils/tools.js';
|
||||
import apiType from '../../api/modules/type.js';
|
||||
import apiCourse from '../../api/modules/course.js';
|
||||
import apiCourseAudit from '../../api/modules/courseAudit.js';
|
||||
import { mapGetters,mapActions} from 'vuex';
|
||||
export default {
|
||||
name: 'lastAuditCourse',
|
||||
components: {auditCourse1, auditCourse2 },
|
||||
computed: {
|
||||
...mapGetters(['sysTypeMap']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
btnLoading:false,
|
||||
params: {courseName:'',status:1},
|
||||
sysTypeList: [],
|
||||
sysTypeListMap:[],
|
||||
showDetails:false,
|
||||
audit:{},
|
||||
examin:{
|
||||
detailType: '',
|
||||
examineId: '',
|
||||
auditId:'',
|
||||
examineName: '',
|
||||
},
|
||||
courseType: courseType,
|
||||
page: {
|
||||
pageIndex: 1,//第几页
|
||||
pageSize: 10, // 每页多少条
|
||||
count: 0
|
||||
},
|
||||
resOwner: [],
|
||||
defaultProps:{ value: 'code', label: 'name'},
|
||||
defaultTypeProps:{ value: 'id', label: 'name' },
|
||||
expandDetails: false,
|
||||
auditInfo: {
|
||||
pass: true,
|
||||
remark: ''
|
||||
},
|
||||
detailType: 1,
|
||||
dialogVisible: false,
|
||||
pageData:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.searchData();
|
||||
// this.getResOwnerTree().then(rs=>{
|
||||
// this.resOwnerListMap=rs;
|
||||
// });
|
||||
this.getSysTypeTree().then(rs=>{
|
||||
this.sysTypeListMap=rs;
|
||||
})
|
||||
//this.loadResOwners();
|
||||
this.loadSysTypes();
|
||||
},
|
||||
methods: {
|
||||
getseatch(){
|
||||
this.params.pageIndex= 1;
|
||||
this.searchData();
|
||||
},
|
||||
reset(){
|
||||
this.resOwner = ''
|
||||
this.params.sysType = ''
|
||||
this.params.createUser = ''
|
||||
this.params.keyword = ''
|
||||
this.params.status = ''
|
||||
this.params.publish = ''
|
||||
this.sysTypeList = [];
|
||||
this.params.sysType1 = '';
|
||||
this.params.sysType2 = '';
|
||||
this.params.sysType3 = '';
|
||||
this.params.pageIndex= 1;
|
||||
this.searchData();
|
||||
},
|
||||
...mapActions({
|
||||
//getResOwnerTree:'resOwner/getResOwnerTree',
|
||||
//loadResOwners:'resOwner/loadResOwners',
|
||||
getSysTypeTree:'sysType/getSysTypeTree',
|
||||
loadSysTypes:'sysType/loadSysTypes'
|
||||
}),
|
||||
// resOwnerName(code){
|
||||
// if(code==''){return '';}
|
||||
// return this.resOwnerMap.get(code);
|
||||
// },
|
||||
sysTypeName(code){
|
||||
if(code==''){return '';}
|
||||
return this.sysTypeMap.get(code);
|
||||
},
|
||||
//预览跳转页面
|
||||
toPreview(row) {
|
||||
// if(row.type == 10) {
|
||||
// window.open(`${this.webBaseUrl}/course/microPreview?id=${row.id}`);
|
||||
// } else{
|
||||
window.open(`${this.webBaseUrl}/course/rePreview?id=${row.courseId}`);
|
||||
// }
|
||||
|
||||
},
|
||||
// 直接审核
|
||||
examineData(flag) {
|
||||
|
||||
let params = {
|
||||
auditId:this.examin.auditId,
|
||||
courseId:this.examin.examineId,//课程id,
|
||||
title:this.examin.examineName,//课程的名称,
|
||||
pass: this.auditInfo.pass,//Boolean 是否通过,
|
||||
remark: this.auditInfo.remark// 备注
|
||||
}
|
||||
this.btnLoading=true;
|
||||
apiCourseAudit.lastAuditSubmit(params).then(res=>{
|
||||
if(res.status === 200) {
|
||||
this.$message.success('操作成功!');
|
||||
this.dialogVisible = false;
|
||||
this.searchData();
|
||||
this.$store.dispatch('refrashReviewed');
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
this.btnLoading=false;
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
// 课程查询
|
||||
async searchData() {
|
||||
this.params.pageIndex = this.page.pageIndex;
|
||||
this.params.pageSize = this.page.pageSize;
|
||||
|
||||
try {
|
||||
this.loading = true;
|
||||
const {result, status,message} = await apiCourseAudit.lastAuditList(this.params);
|
||||
if(status === 200) {
|
||||
|
||||
this.pageData = result.list;
|
||||
this.page.count = result.count;
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
}
|
||||
this.loading = false;
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
viewTopic(row) {
|
||||
this.examin.detailType = row.courseType;
|
||||
this.examin.examineId = row.courseId;
|
||||
this.examin.examineName = row.courseName;
|
||||
this.showDetails = true;
|
||||
},
|
||||
editCurriculum(row) {
|
||||
this.editData = row;
|
||||
},
|
||||
jumpDetails() {
|
||||
// 跳转打开新页面
|
||||
let routeData = this.$router.resolve({ path: '/course/detail'});
|
||||
window.open(this.webBaseUrl+routeData.href, '_blank');
|
||||
},
|
||||
toExamine(row) {
|
||||
this.audit = {};
|
||||
this.examin.auditId=row.id;
|
||||
this.examin.detailType = row.courseType;
|
||||
this.examin.examineId = row.courseId;
|
||||
this.examin.examineName = row.courseName;
|
||||
this.auditInfo.pass=true;//审核状态重置回true
|
||||
this.auditInfo.remark = '';
|
||||
this.dialogVisible = true;
|
||||
apiCourse.getAuditInfo({courseId:row.courseId}).then(res=>{
|
||||
if(res.status == 200) {
|
||||
if(res.result.length > 0) {
|
||||
this.audit = res.result[0];
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
enSure() {
|
||||
// 确认事件
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.page.pageSize = val;
|
||||
this.page.pageIndex = 1;
|
||||
this.searchData();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.page.pageIndex = val;
|
||||
this.searchData();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.audit-text{
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
font-weight: 700;
|
||||
}
|
||||
.course-types {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
.course-type {
|
||||
margin: 10px;
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
img {
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
}
|
||||
.info {
|
||||
padding-top: 10px;
|
||||
}
|
||||
}
|
||||
.choose {
|
||||
border: 2px solid #008000;
|
||||
}
|
||||
}
|
||||
|
||||
.el-aside {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.cctree {
|
||||
.cctree-chapter {
|
||||
.cctree-chapter-name {
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
.cctree-chapter-cells {
|
||||
margin: 0px;
|
||||
list-style-type: circle;
|
||||
padding: 0px;
|
||||
.cctree-chapter-cell {
|
||||
line-height: 30px;
|
||||
list-style-type: circle;
|
||||
padding-left: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
<!-- <el-button @click="isExamine = 2">邀请审核</el-button> -->
|
||||
</div>
|
||||
|
||||
<el-form label-width="80px" v-if="isExamine === 1">
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="审核">
|
||||
<el-radio-group v-model="auditInfo.pass">
|
||||
<el-radio :label="true">通过</el-radio>
|
||||
@@ -116,32 +116,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见"><el-input v-model="auditInfo.remark" type="textarea" rows="3"></el-input></el-form-item>
|
||||
</el-form>
|
||||
<div v-if="isExamine === 2">
|
||||
<div style="display: flex;justify-content:flex-start;padding-bottom: 10px;">
|
||||
<div style="padding: 0px 5px;"><el-input placeholder="姓名" v-model="inviteTeacher.params.name"></el-input></div>
|
||||
<div style="padding: 0px 5px;"><el-button @click="findTeachers()" icon="el-icon-search" type="primary" >搜索</el-button></div>
|
||||
</div>
|
||||
<div>
|
||||
<el-table v-if="inviteTeacher.list.length !== 0" max-height="500" border :data="inviteTeacher.list" style="width: 100%;margin-bottom: 10px;">
|
||||
<el-table-column prop="name" label="姓名" width="180"></el-table-column>
|
||||
<el-table-column prop="code" label="工号"></el-table-column>
|
||||
<el-table-column prop="orgInfo" label="组织"></el-table-column>
|
||||
<el-table-column prop="orgInfo" label="选择">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="scope.row.checked">选择</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div>审核记录:</div>
|
||||
<el-table max-height="500" border :data="inviteTeacher.list" style="width: 100%;">
|
||||
<el-table-column prop="name" label="姓名" width="180"></el-table-column>
|
||||
<el-table-column prop="code" label="工号"></el-table-column>
|
||||
<el-table-column prop="orgInfo" label="组织"></el-table-column>
|
||||
<el-table-column prop="type" label="审核状态"></el-table-column>
|
||||
<el-table-column prop="text" label="备注"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="audit.length > 0" style="border-top: 1px solid #eee; background-color: #eee; padding: 10px 20px;margin-top: 10px;">
|
||||
<div style="line-height: 36px;">
|
||||
@@ -165,7 +140,7 @@
|
||||
<!-- </div> -->
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="showDetails = false;examin = {};">取 消</el-button>
|
||||
<el-button @click="showDetails = false;examin = {};">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -181,6 +156,7 @@ import adminPage from '@/components/Administration/adminPage.vue';
|
||||
import {courseType} from '../../utils/tools.js';
|
||||
import apiType from '../../api/modules/type.js';
|
||||
import apiCourse from '../../api/modules/course.js';
|
||||
import apiCourseAudit from '../../api/modules/courseAudit.js';
|
||||
import { mapGetters,mapActions} from 'vuex';
|
||||
export default {
|
||||
name: 'manageCourse',
|
||||
@@ -203,25 +179,14 @@ export default {
|
||||
auditId:'',
|
||||
examineName: '',
|
||||
},
|
||||
paperJson:{items:[]},
|
||||
courseType: courseType,
|
||||
page: {
|
||||
pageIndex: 1,//第几页
|
||||
pageSize: 10, // 每页多少条
|
||||
count: 0
|
||||
},
|
||||
params: {},
|
||||
pageData:[],
|
||||
page: {pageIndex: 1,pageSize: 10,count: 0},
|
||||
resOwner: [],
|
||||
defaultProps:{
|
||||
value: 'code',
|
||||
label: 'name',
|
||||
},
|
||||
defaultTypeProps:{
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
},
|
||||
manageStudyData: {},
|
||||
defaultProps:{value: 'code',label: 'name'},
|
||||
defaultTypeProps:{value: 'id',label: 'name'},
|
||||
expandDetails: false,
|
||||
qrcode: '',
|
||||
isExamine: 1,
|
||||
auditInfo: {
|
||||
pass: true,
|
||||
@@ -229,39 +194,6 @@ export default {
|
||||
},
|
||||
detailType: 1,
|
||||
dialogVisible: false,
|
||||
qrcodeShow: false,
|
||||
currentPage4: 4,
|
||||
inviteTeacher: {
|
||||
//邀请
|
||||
dlgShow: false,
|
||||
params: { name: '' },
|
||||
list: []
|
||||
},
|
||||
manageStudy: {
|
||||
dlgShow: false
|
||||
},
|
||||
params: {},
|
||||
pageData:[],
|
||||
courseChooseShow: false,
|
||||
courseChooseId: '',
|
||||
weike: {
|
||||
onlyRequired: false,
|
||||
dlgShow: false,
|
||||
fileType: '',
|
||||
info: {
|
||||
shebei: ''
|
||||
}
|
||||
},
|
||||
biaoke: {
|
||||
dlgShow: false
|
||||
},
|
||||
recommend: {
|
||||
dlgShow: false,
|
||||
},
|
||||
catalogs: {
|
||||
addNewZhang: false,
|
||||
addNewCell: false,
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -320,8 +252,8 @@ export default {
|
||||
},
|
||||
// 直接审核
|
||||
examineData(flag) {
|
||||
if(this.isExamine == 1) {
|
||||
let params = {
|
||||
|
||||
let params = {
|
||||
auditId:this.examin.auditId,
|
||||
from:2,
|
||||
courseId:this.examin.examineId,//课程id,
|
||||
@@ -330,35 +262,18 @@ export default {
|
||||
remark: this.auditInfo.remark// 备注
|
||||
}
|
||||
this.btnLoading=true;
|
||||
if(flag){
|
||||
apiCourse.auditAndPublish(params).then(res=>{
|
||||
if(res.status === 200) {
|
||||
this.$message.success('操作成功!');
|
||||
this.dialogVisible = false;
|
||||
this.searchData();
|
||||
this.$store.dispatch('refrashReviewed');
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
this.btnLoading=false;
|
||||
})
|
||||
}else{
|
||||
apiCourse.audit(params).then(res=>{
|
||||
if(res.status === 200) {
|
||||
this.$message.success('操作成功!');
|
||||
this.dialogVisible = false;
|
||||
this.searchData();
|
||||
this.$store.dispatch('refrashReviewed');
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
this.btnLoading=false;
|
||||
})
|
||||
}
|
||||
apiCourseAudit.teacherAuditSubmit(params).then(res=>{
|
||||
if(res.status === 200) {
|
||||
this.$message.success('操作成功!');
|
||||
this.dialogVisible = false;
|
||||
this.searchData();
|
||||
this.$store.dispatch('refrashReviewed');
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
this.btnLoading=false;
|
||||
})
|
||||
|
||||
} else {
|
||||
this.$message.warning('暂未开放!');
|
||||
}
|
||||
|
||||
},
|
||||
// 课程查询
|
||||
@@ -375,7 +290,7 @@ export default {
|
||||
this.params.sysType3 = this.sysTypeList[2];
|
||||
try {
|
||||
this.loading = true;
|
||||
const {result, status,message} = await apiCourse.teacherAuditList(this.params);
|
||||
const {result, status,message} = await apiCourseAudit.teacherAuditList(this.params);
|
||||
if(status === 200) {
|
||||
|
||||
this.pageData = result.list;
|
||||
@@ -395,9 +310,6 @@ export default {
|
||||
this.examin.examineName = row.name;
|
||||
this.showDetails = true;
|
||||
},
|
||||
editCurriculum(row) {
|
||||
this.editData = row;
|
||||
},
|
||||
jumpDetails() {
|
||||
// 跳转打开新页面
|
||||
let routeData = this.$router.resolve({ path: '/course/detail'});
|
||||
@@ -422,9 +334,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
enSure() {
|
||||
// 确认事件
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.page.pageSize = val;
|
||||
this.page.pageIndex = 1;
|
||||
@@ -433,128 +342,6 @@ export default {
|
||||
handleCurrentChange(val) {
|
||||
this.page.pageIndex = val;
|
||||
this.searchData();
|
||||
},
|
||||
chooseInvite(row) {
|
||||
//邀请老师审核
|
||||
this.inviteTeacher.dlgShow = true;
|
||||
},
|
||||
findTeachers() {
|
||||
this.inviteTeacher.list = [];
|
||||
},
|
||||
showQrimage() {
|
||||
this.qrcodeShow = true;
|
||||
// 二维码内容,一般是由后台返回的跳转链接,这里是写死的一个链接
|
||||
this.qrcode = 'https://yuchengkai.cn/docs/frontend/#typeof';
|
||||
// 使用$nextTick确保数据渲染
|
||||
this.$nextTick(() => {
|
||||
this.crateQrcode();
|
||||
});
|
||||
},
|
||||
// creatQrCode() {
|
||||
|
||||
// },
|
||||
// 生成二维码
|
||||
crateQrcode() {
|
||||
this.qr = new QRCode('qrcode', {
|
||||
width: 150,
|
||||
height: 150, // 高度
|
||||
text: this.qrcode // 二维码内容
|
||||
// render: 'canvas' // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
|
||||
// background: '#f0f'
|
||||
// foreground: '#ff0'
|
||||
});
|
||||
},
|
||||
// 关闭弹框,清除已经生成的二维码
|
||||
closeCode() {
|
||||
this.$refs.qrcode.innerHTML = '';
|
||||
},
|
||||
showManageStudy(row) {
|
||||
this.manageStudyData = row;
|
||||
this.manageStudy.dlgShow = true;
|
||||
},
|
||||
releaseData(row) {
|
||||
this.$confirm('正在发布考试, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.pageData.list.forEach((item, index) => {
|
||||
if (item.id === row.id) {
|
||||
item.collectNumber = 1;
|
||||
}
|
||||
});
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '发布成功!'
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
showChooseCourse() {
|
||||
this.courseChooseShow = true;
|
||||
},
|
||||
chooseCourseType(item, idx) {
|
||||
this.courseChooseId = item.id;
|
||||
},
|
||||
toInputCourse() {
|
||||
if (this.courseChooseId == '1') {
|
||||
this.showWeike();
|
||||
} else if (this.courseChooseId == '2') {
|
||||
this.showBiaoke();
|
||||
}
|
||||
this.courseChooseShow = false;
|
||||
},
|
||||
newHandleClick() {},
|
||||
showRecords(item) {
|
||||
this.recommend.dlgShow = true;
|
||||
},
|
||||
showWeike() {
|
||||
this.weike.dlgShow = true;
|
||||
},
|
||||
showBiaoke() {
|
||||
this.biaoke.dlgShow = true;
|
||||
},
|
||||
setTop(item, idx) {
|
||||
let msg = '已设置置顶';
|
||||
if (item.isTop) {
|
||||
item.isTop = false;
|
||||
msg = '已取消置顶';
|
||||
} else {
|
||||
item.isTop = true;
|
||||
}
|
||||
this.$message({ message: msg, type: 'success', offset: 50 });
|
||||
},
|
||||
delItem(item, idx) {
|
||||
this.$confirm('您确定要删除所选课程吗?', '删除提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.items.splice(idx, 1);
|
||||
this.$message({ type: 'success', message: '删除成功!', offset: 50 });
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({ type: 'info', message: '已取消删除', offset: 50 });
|
||||
});
|
||||
},
|
||||
showAddCatalogZhang(bal) {
|
||||
this.catalogs.addNewZhang = bal;
|
||||
},
|
||||
saveNewCatalogZhang() {
|
||||
this.catalogs.addNewZhang = false;
|
||||
},
|
||||
filterType(value, row) {
|
||||
return row.type === value;
|
||||
},
|
||||
filterStatus(value, row) {
|
||||
return row.status === value;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" prop="status" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status == 2">不通过</span>
|
||||
<span v-if="scope.row.status == 9">通过</span>
|
||||
<span v-if="scope.row.toState == 2">不通过</span>
|
||||
<span v-if="scope.row.toState == 9">通过</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" prop="courseUser"></el-table-column>
|
||||
<el-table-column label="审核时间" prop="auditTime" width="200px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="审核说明" prop="auditRemark" width="200px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="审核时间" prop="toAuditTime" width="200px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="审核说明" prop="toRemark" width="200px" show-overflow-tooltip></el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="100px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
@@ -62,28 +62,52 @@
|
||||
</div>
|
||||
<div style="height: 100px;"></div>
|
||||
<el-dialog title="审核记录" :visible.sync="dialogVisible" width="900px" custom-class="g-dialog">
|
||||
<div>
|
||||
<el-table max-height="500" border :data="auditRecords" style="width: 100%;">
|
||||
<el-table-column prop="auditUser" label="审核人" width="180"></el-table-column>
|
||||
<el-table-column prop="type" label="审核状态">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status==9">通过</span>
|
||||
<span v-if="scope.row.status==2">不通过</span>
|
||||
</template>
|
||||
<div>
|
||||
<el-table max-height="500" border :data="auditRecords" stripe style="width: 100%;">
|
||||
<el-table-column prop="auditUser" label="HRBP审核" width="170">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<span>{{scope.row.auditUser}} 审核 </span>
|
||||
<span v-if="scope.row.status==9" style="color: green;">通过</span>
|
||||
<span v-if="scope.row.status==2" style="color: red;">不通过</span>
|
||||
</div>
|
||||
<div>{{scope.row.auditTime}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="auditTime" label="审核时间"></el-table-column>
|
||||
<el-table-column prop="auditRemark" label="备注"></el-table-column>
|
||||
<el-table-column prop="auditRemark" label="HRBP备注"></el-table-column>
|
||||
<el-table-column prop="type" label="转审" width="170">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.toAid">
|
||||
<span>{{scope.row.toName}} 审核 </span>
|
||||
<span v-if="scope.row.toState==9" style="color: green;">通过</span>
|
||||
<span v-if="scope.row.toState==2" style="color: red;">不通过</span>
|
||||
</div>
|
||||
<div>{{scope.row.toAuditTime}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="toRemark" label="转审备注"></el-table-column>
|
||||
<el-table-column prop="auditTime" label="公开课审核" width="170">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.lastAid">
|
||||
<span>{{scope.row.lastAname}} 审核 </span>
|
||||
<span v-if="scope.row.lastState==9" style="color: green;">通过</span>
|
||||
<span v-if="scope.row.lastState==2" style="color: red;">不通过</span>
|
||||
</div>
|
||||
<div>{{scope.row.lastTime}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastRemark" label="公开课审备注"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="课程详情" :visible.sync="showDetails" @close="examin = {};" width="900px" custom-class="g-dialog">
|
||||
<div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse1></div>
|
||||
<div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse2></div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="showDetails = false;examin = {};">取 消</el-button>
|
||||
<el-button @click="showDetails = false;examin = {};">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -180,8 +204,9 @@ export default {
|
||||
return this.sysTypeMap.get(code);
|
||||
},
|
||||
async searchData() {
|
||||
this.params.status = 9;
|
||||
this.params.toState = 9;
|
||||
this.params.forward=2;//未转发的处理
|
||||
this.params.userType=1;//教师
|
||||
this.params.toAid=this.userInfo.aid;
|
||||
this.params.pageIndex = this.page.pageIndex;
|
||||
this.params.pageSize = this.page.pageSize;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<div><span style="color: #999999;">时间:</span> <span>{{ item.startTime}} 到 {{ item.endTime}}</span></div>
|
||||
<div><span style="color: #999999;">时长:</span>{{item.testDuration}}分钟</div>
|
||||
<div><span style="color: #999999;">总分:</span>100分</div>
|
||||
<div><span style="color: #999999;">成绩:</span><span style="color: #366fff;">{{toScoreTow(item.score)}}</span></div>
|
||||
<div><span style="color: #999999;">成绩:</span><span style="color: #366fff;">{{item.score==0? '无':toScoreTow(item.score)}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="task-btns" >
|
||||
|
||||
@@ -626,7 +626,7 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
//console.log('实际得分:'+total)
|
||||
console.log('实际得分:'+total)
|
||||
return total;
|
||||
},
|
||||
reStartTest(row){ //继续考试
|
||||
|
||||
@@ -572,10 +572,17 @@ export default {
|
||||
if(!this.paper.testName) {
|
||||
return this.$message.warning('请您完善基本信息必填项!')
|
||||
}
|
||||
//检查是否都有分数了
|
||||
|
||||
//检查是否有重复的试卷
|
||||
let qidMap=new Map();
|
||||
let hasItem=null;
|
||||
let allScore=true;
|
||||
this.paper.data.some(qitem=>{
|
||||
if(!qitem.defaultScore || qitem.defaultScore=='0'){
|
||||
allScore=false;
|
||||
return true;
|
||||
}
|
||||
if(qidMap.has(qitem.id)){
|
||||
hasItem=qitem;
|
||||
return true;
|
||||
@@ -583,7 +590,13 @@ export default {
|
||||
qidMap.set(qitem.id,qitem.id);
|
||||
return false;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
if(!allScore){
|
||||
this.$message.error('有试题未设置分数');
|
||||
return;
|
||||
}
|
||||
|
||||
if(hasItem!=null){
|
||||
console.log(hasItem);
|
||||
this.$message.error('选择的试题重复:'+hasItem.title)
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
<el-table-column label="转审" width="130px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.auditForward == 2">已转审</el-tag>
|
||||
<el-tag @click="showAuditInfo(scope.row)" title="点击查看审核信息" style="cursor: pointer;" type="success" v-if="scope.row.auditForward == 3">转审完成</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" prop="sysCreateBy"></el-table-column>
|
||||
@@ -97,7 +98,7 @@
|
||||
</div>
|
||||
<div style="height: 100px;"></div>
|
||||
<!--邀请审核-->
|
||||
<el-dialog custom-class="g-dialog" title="邀请教师审核课程" :visible.sync="inviteTeacher.dlgShow">
|
||||
<!-- <el-dialog custom-class="g-dialog" title="邀请教师审核课程" :visible.sync="inviteTeacher.dlgShow">
|
||||
<div style="display: flex;justify-content:flex-start;padding-bottom: 10px;">
|
||||
<div style="padding: 0px 5px;"><el-input placeholder="姓名" v-model="inviteTeacher.params.name"></el-input></div>
|
||||
<div style="padding: 0px 5px;"><el-button @click="findTeachers()" icon="el-icon-search" type="primary" size="small">搜索</el-button></div>
|
||||
@@ -119,7 +120,7 @@
|
||||
<el-button @click="inviteTeacher.dlgShow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="enSure">确认</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-dialog> -->
|
||||
<!-- 审核 -->
|
||||
<el-dialog title="审核" :visible.sync="dialogVisible" width="900px" custom-class="g-dialog" @close="examin={}">
|
||||
<div v-show="expandDetails">
|
||||
@@ -143,7 +144,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见"><el-input v-model="auditInfo.remark" type="textarea" rows="3"></el-input></el-form-item>
|
||||
</el-form>
|
||||
<div v-if="isExamine === 2">
|
||||
<!-- <div v-if="isExamine === 2">
|
||||
<div style="display: flex;justify-content:flex-start;padding-bottom: 10px;">
|
||||
<div style="padding: 0px 5px;"><el-input placeholder="姓名" v-model="inviteTeacher.params.name"></el-input></div>
|
||||
<div style="padding: 0px 5px;"><el-button @click="findTeachers()" icon="el-icon-search" type="primary" >搜索</el-button></div>
|
||||
@@ -168,7 +169,7 @@
|
||||
<el-table-column prop="text" label="备注"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false;examin={}">取 消</el-button>
|
||||
@@ -183,6 +184,23 @@
|
||||
<el-button @click="showDetails = false;examin = {};">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="审核信息" :visible.sync="dlgAudit.show" @close="dlgAudit.show=false;dlgAudit.data = {};" width="500px" custom-class="g-dialog">
|
||||
<div>
|
||||
<el-form label-width="100px" @submit.native.prevent >
|
||||
<el-form-item label="审核人">{{dlgAudit.data.toName}}</el-form-item>
|
||||
<el-form-item label="审核结果">
|
||||
<el-tag type="danger" v-if="dlgAudit.data.toState == 2">不通过</el-tag>
|
||||
<el-tag type="success" v-if="dlgAudit.data.toState == 9">通过</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核备注">{{dlgAudit.data.toRemark}}</el-form-item>
|
||||
<el-form-item label="审核时间">{{dlgAudit.data.toTime}}</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dlgAudit.show=false;dlgAudit.data = {};">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--邀请审核-->
|
||||
<el-dialog title="请选择教师" :visible.sync="teacherInfo.show" :close-on-click-modal="false" :append-to-body="true" width="500px" custom-class="g-dialog">
|
||||
<div style="height: 200px;padding-right: 30px;">
|
||||
<el-form label-width="100px" @submit.native.prevent >
|
||||
@@ -210,7 +228,6 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import courseForm from '@/components/Course/courseForm.vue';
|
||||
import manager from '@/components/Study/manager.vue';
|
||||
@@ -218,8 +235,8 @@ import QRCode from 'qrcodejs2';
|
||||
import auditCourse1 from '@/components/Course/auditCourse1.vue';
|
||||
import auditCourse2 from '@/components/Course/auditCourse2.vue';
|
||||
import adminPage from '@/components/Administration/adminPage.vue';
|
||||
import {courseType} from '../../utils/tools.js';
|
||||
import apiCourse from '../../api/modules/course.js';
|
||||
import apiCourseAudit from '../../api/modules/courseAudit.js';
|
||||
import apiUser from '@/api/system/user.js'
|
||||
import { mapGetters,mapActions} from 'vuex';
|
||||
export default {
|
||||
@@ -231,6 +248,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
btnLoading:false,
|
||||
params: {},
|
||||
selectedTeacher:'',
|
||||
teacherInfo:{
|
||||
show:false,
|
||||
@@ -254,13 +272,8 @@ export default {
|
||||
auditId:'',
|
||||
examineName: '',
|
||||
},
|
||||
paperJson:{items:[]},
|
||||
courseType: courseType,
|
||||
page: {
|
||||
pageIndex: 1,//第几页
|
||||
pageSize: 10, // 每页多少条
|
||||
count: 0
|
||||
},
|
||||
pageData:[],
|
||||
page: { pageIndex: 1,pageSize: 10, count: 0},
|
||||
resOwner: [],
|
||||
defaultProps:{
|
||||
value: 'code',
|
||||
@@ -270,48 +283,14 @@ export default {
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
},
|
||||
manageStudyData: {},
|
||||
expandDetails: false,
|
||||
qrcode: '',
|
||||
isExamine: 1,
|
||||
auditInfo: {
|
||||
pass: true,
|
||||
remark: ''
|
||||
},
|
||||
auditInfo: { pass: true, remark: '' },
|
||||
detailType: 1,
|
||||
dialogVisible: false,
|
||||
qrcodeShow: false,
|
||||
currentPage4: 4,
|
||||
inviteTeacher: {
|
||||
//邀请
|
||||
dlgShow: false,
|
||||
params: { name: '' },
|
||||
list: []
|
||||
},
|
||||
manageStudy: {
|
||||
dlgShow: false
|
||||
},
|
||||
params: {},
|
||||
pageData:[],
|
||||
courseChooseShow: false,
|
||||
courseChooseId: '',
|
||||
weike: {
|
||||
onlyRequired: false,
|
||||
dlgShow: false,
|
||||
fileType: '',
|
||||
info: {
|
||||
shebei: ''
|
||||
}
|
||||
},
|
||||
biaoke: {
|
||||
dlgShow: false
|
||||
},
|
||||
recommend: {
|
||||
dlgShow: false,
|
||||
},
|
||||
catalogs: {
|
||||
addNewZhang: false,
|
||||
addNewCell: false,
|
||||
dlgAudit:{
|
||||
show:false,
|
||||
data:{id:'',toName:'',toRemark:'',toTime:'',toState:0}
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -362,7 +341,7 @@ export default {
|
||||
this.findUser();
|
||||
return false;
|
||||
},
|
||||
findUser(){
|
||||
findUser(){
|
||||
this.teacherInfo.load=false;
|
||||
this.teacherInfo.list=[];
|
||||
this.selectedTeacher=[];
|
||||
@@ -438,10 +417,20 @@ export default {
|
||||
window.open(`${this.webBaseUrl}/course/rePreview?id=${row.id}`);
|
||||
// }
|
||||
|
||||
},
|
||||
showAuditInfo(row){ //显示审核信息
|
||||
apiCourseAudit.getAuditInfo(row.auditId).then(rs=>{
|
||||
if(rs.status==200){
|
||||
this.dlgAudit.data=rs.result;
|
||||
this.dlgAudit.show=true;
|
||||
}else{
|
||||
this.$message.error(rs.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
//直接审核
|
||||
examineData(flag) {
|
||||
if(this.isExamine == 1) {
|
||||
console.log('提交')
|
||||
let params = {
|
||||
auditId:this.examin.auditId,//审核记录的id
|
||||
from:1,
|
||||
@@ -451,35 +440,17 @@ export default {
|
||||
remark: this.auditInfo.remark// 备注
|
||||
}
|
||||
this.btnLoading=true;
|
||||
if(flag){
|
||||
apiCourse.auditAndPublish(params).then(res=>{
|
||||
if(res.status === 200) {
|
||||
this.$message.success('操作成功!');
|
||||
this.dialogVisible = false;
|
||||
this.searchData();
|
||||
this.$store.dispatch('refrashReviewed');
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
this.btnLoading=false;
|
||||
})
|
||||
}else{
|
||||
apiCourse.audit(params).then(res=>{
|
||||
if(res.status === 200) {
|
||||
this.$message.success('操作成功!');
|
||||
this.dialogVisible = false;
|
||||
this.searchData();
|
||||
this.$store.dispatch('refrashReviewed');
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
this.btnLoading=false;
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$message.warning('暂未开放!');
|
||||
}
|
||||
apiCourseAudit.hrbpAuditSubmit(params).then(res=>{
|
||||
if(res.status === 200) {
|
||||
this.$message.success('操作成功!');
|
||||
this.dialogVisible = false;
|
||||
this.searchData();
|
||||
this.$store.dispatch('refrashReviewed');
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
this.btnLoading=false;
|
||||
})
|
||||
|
||||
},
|
||||
// 课程查询
|
||||
@@ -494,7 +465,7 @@ export default {
|
||||
this.params.sysType2 = this.sysTypeList[1];
|
||||
this.params.sysType3 = this.sysTypeList[2];
|
||||
try {
|
||||
const {result, status,message} = await apiCourse.auditList(this.params);
|
||||
const {result, status,message} = await apiCourseAudit.hrbpAuditList(this.params);
|
||||
if(status === 200) {
|
||||
this.pageData = result.list;
|
||||
this.page.count = result.count;
|
||||
@@ -511,9 +482,6 @@ export default {
|
||||
this.examin.examineName = row.name;
|
||||
this.showDetails = true;
|
||||
},
|
||||
editCurriculum(row) {
|
||||
this.editData = row;
|
||||
},
|
||||
jumpDetails() {
|
||||
// 跳转打开新页面
|
||||
let routeData = this.$router.resolve({ path: '/course/detail'});
|
||||
@@ -540,109 +508,6 @@ export default {
|
||||
handleCurrentChange(val) {
|
||||
this.page.pageIndex = val;
|
||||
this.searchData();
|
||||
},
|
||||
chooseInvite(row) {
|
||||
//邀请老师审核
|
||||
this.inviteTeacher.dlgShow = true;
|
||||
},
|
||||
findTeachers() {
|
||||
this.inviteTeacher.list = [
|
||||
{ id: '1', name: '李玉冰', type:'通过',text: '实用',sex: '男', code: '1023123', orgInfo: '教育技术中心', checked: false },
|
||||
{ id: '2', name: '李玉冰', type:'未通过',text: '内容在调整',sex: '男', code: '1023123', orgInfo: '教育技术中心', checked: false },
|
||||
{ id: '3', name: '李玉冰', type:'驳回',text: '内容重复',sex: '男', code: '1023123', orgInfo: '教育技术中心', checked: false }
|
||||
];
|
||||
},
|
||||
// 关闭弹框,清除已经生成的二维码
|
||||
closeCode() {
|
||||
this.$refs.qrcode.innerHTML = '';
|
||||
},
|
||||
showManageStudy(row) {
|
||||
this.manageStudyData = row;
|
||||
this.manageStudy.dlgShow = true;
|
||||
},
|
||||
releaseData(row) {
|
||||
this.$confirm('正在发布考试, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.pageData.list.forEach((item, index) => {
|
||||
if (item.id === row.id) {
|
||||
item.collectNumber = 1;
|
||||
}
|
||||
});
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '发布成功!'
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
showChooseCourse() {
|
||||
this.courseChooseShow = true;
|
||||
},
|
||||
chooseCourseType(item, idx) {
|
||||
this.courseChooseId = item.id;
|
||||
},
|
||||
toInputCourse() {
|
||||
if (this.courseChooseId == '1') {
|
||||
this.showWeike();
|
||||
} else if (this.courseChooseId == '2') {
|
||||
this.showBiaoke();
|
||||
}
|
||||
this.courseChooseShow = false;
|
||||
},
|
||||
newHandleClick() {},
|
||||
showRecords(item) {
|
||||
this.recommend.dlgShow = true;
|
||||
},
|
||||
showWeike() {
|
||||
this.weike.dlgShow = true;
|
||||
},
|
||||
showBiaoke() {
|
||||
this.biaoke.dlgShow = true;
|
||||
},
|
||||
setTop(item, idx) {
|
||||
let msg = '已设置置顶';
|
||||
if (item.isTop) {
|
||||
item.isTop = false;
|
||||
msg = '已取消置顶';
|
||||
} else {
|
||||
item.isTop = true;
|
||||
}
|
||||
this.$message({ message: msg, type: 'success', offset: 50 });
|
||||
},
|
||||
delItem(item, idx) {
|
||||
this.$confirm('您确定要删除所选课程吗?', '删除提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.items.splice(idx, 1);
|
||||
this.$message({ type: 'success', message: '删除成功!', offset: 50 });
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({ type: 'info', message: '已取消删除', offset: 50 });
|
||||
});
|
||||
},
|
||||
showAddCatalogZhang(bal) {
|
||||
this.catalogs.addNewZhang = bal;
|
||||
},
|
||||
saveNewCatalogZhang() {
|
||||
this.catalogs.addNewZhang = false;
|
||||
},
|
||||
filterType(value, row) {
|
||||
return row.type === value;
|
||||
},
|
||||
filterStatus(value, row) {
|
||||
return row.status === value;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="u-page">
|
||||
<div style="padding: 2px 0px 10px 0px;">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-cascader placeholder="内容分类" clearable v-model="sysTypeList" :props="defaultTypeProps" :options="sysTypeListMap"></el-cascader>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
@@ -70,29 +70,53 @@
|
||||
></el-pagination>
|
||||
</div>
|
||||
<div style="height: 100px;"></div>
|
||||
<el-dialog title="审核记录" :visible.sync="dialogVisible" width="900px" custom-class="g-dialog">
|
||||
<div>
|
||||
<el-table max-height="500" border :data="auditRecords" style="width: 100%;">
|
||||
<el-table-column prop="auditUser" label="审核人" width="180"></el-table-column>
|
||||
<el-table-column prop="type" label="审核状态">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status==9">通过</span>
|
||||
<span v-if="scope.row.status==2">不通过</span>
|
||||
</template>
|
||||
<el-dialog title="审核记录" :visible.sync="dialogVisible" width="950px" custom-class="g-dialog">
|
||||
<div>
|
||||
<el-table max-height="500" border :data="auditRecords" stripe style="width: 100%;">
|
||||
<el-table-column prop="auditUser" label="HRBP审核" width="170">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<span>{{scope.row.auditUser}} 审核 </span>
|
||||
<span v-if="scope.row.status==9" style="color: green;">通过</span>
|
||||
<span v-if="scope.row.status==2" style="color: red;">不通过</span>
|
||||
</div>
|
||||
<div>{{scope.row.auditTime}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="auditTime" label="审核时间"></el-table-column>
|
||||
<el-table-column prop="auditRemark" label="备注"></el-table-column>
|
||||
<el-table-column prop="auditRemark" label="HRBP备注"></el-table-column>
|
||||
<el-table-column prop="type" label="转审" width="170">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.toAid">
|
||||
<span>{{scope.row.toName}} 审核 </span>
|
||||
<span v-if="scope.row.toState==9" style="color: green;">通过</span>
|
||||
<span v-if="scope.row.toState==2" style="color: red;">不通过</span>
|
||||
</div>
|
||||
<div>{{scope.row.toAuditTime}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="toRemark" label="转审备注"></el-table-column>
|
||||
<el-table-column prop="auditTime" label="公开课审核" width="170">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.lastAid">
|
||||
<span>{{scope.row.lastAname}} 审核 </span>
|
||||
<span v-if="scope.row.lastState==9" style="color: green;">通过</span>
|
||||
<span v-if="scope.row.lastState==2" style="color: red;">不通过</span>
|
||||
</div>
|
||||
<div>{{scope.row.lastTime}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastRemark" label="公开课审备注"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="课程详情" :visible.sync="showDetails" @close="examin = {};" width="900px" custom-class="g-dialog">
|
||||
<div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse1></div>
|
||||
<div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse2></div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="showDetails = false;examin = {};">取 消</el-button>
|
||||
<el-button @click="showDetails = false;examin = {};">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -190,8 +214,8 @@ export default {
|
||||
},
|
||||
async searchData() {
|
||||
this.params.status = 9;
|
||||
this.params.forward=1;//未转发的处理
|
||||
this.params.aid=this.userInfo.aid;
|
||||
this.params.auditAid=this.userInfo.aid;
|
||||
this.params.userType=2;//这里指hrbp管理查询
|
||||
this.params.pageIndex = this.page.pageIndex;
|
||||
this.params.pageSize = this.page.pageSize;
|
||||
this.params.courseType1 = this.sysTypeList[0];
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<el-button class="btn" style="margin-top:48px" type="primary" @click="showLoginMedal = true">查看详情</el-button>
|
||||
</div>
|
||||
<div v-if="activeName=='first' && year2023" class="medal-index">
|
||||
<img style="width:162px;height:161px" :src="`${webBaseUrl}/images/medal/20230101.png`" alt="">
|
||||
<p class="index-title">元旦勋章</p>
|
||||
<img style="width:138px;height:151px" :src="`${webBaseUrl}/images/medal/xz20230101.png`" alt="">
|
||||
<p class="index-title" style="padding-top: 10px;">元旦勋章</p>
|
||||
<!-- <p class="index-text">您已超过{{item.exceed}}人</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -235,6 +235,10 @@ export default {
|
||||
);
|
||||
|
||||
},
|
||||
beforeRouteLeave(to, from, next){
|
||||
to.meta.keepAlive=true;
|
||||
next();
|
||||
},
|
||||
beforeDestroy(){
|
||||
window.removeEventListener("scroll",this.handleScroll);
|
||||
clearInterval(this.setTimeCase);
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
<div class="field">
|
||||
<div style="padding:0;" :class="fielclassjor ? 'fieldactive' :'' " @click="majorall()">全部</div>
|
||||
<div class="fieldbox">
|
||||
<div :class="item.fielclass ? 'fieldactive' :'' " @click="fieldmajor(item)" v-for="(item,idx) in speciData" :key="'d'+idx">{{item.name}}</div>
|
||||
<div :class="item.fielclass ? 'fieldactive' :'' " @click="fieldmajor(item)" v-for="(item,idx) in speciData" :key="'d'+idx">{{item.name}}({{item.explanation}})</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- <el-radio-group style="display:flex;" v-model="queryCondition.majorType" size="mini" @change="search()">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
@@ -243,41 +243,6 @@ export default {
|
||||
timeShow,
|
||||
author
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["userInfo", "portalCase"]),
|
||||
word: function() {
|
||||
if (this.showAll == false) {
|
||||
//对文字进行处理
|
||||
return "展开";
|
||||
} else {
|
||||
return "收起";
|
||||
}
|
||||
},
|
||||
isMore() {
|
||||
let isOk = true;
|
||||
if (this.caseList.list.length === this.caseList.count) {
|
||||
isOk = false;
|
||||
}
|
||||
return isOk;
|
||||
},
|
||||
tagList(){ //列表属性,用于计算
|
||||
let list=[];
|
||||
if(this.keyWord){
|
||||
list.push({ type:'0', code:'keyword', name:this.keyWord, checked:true})
|
||||
}
|
||||
this.domain.forEach(item=>{
|
||||
if(item.fielclass){
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
this.speciData.forEach(item=>{
|
||||
if(item.fielclass){
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
@@ -298,8 +263,6 @@ export default {
|
||||
ankingList: [],//排行数据1
|
||||
Popularity: [],//排行数据2
|
||||
Positive: [],//排行数据3
|
||||
//Profess: [],
|
||||
//optionsList: [],
|
||||
protocolDialogVisible: false,
|
||||
protocolConfirmButton: true,
|
||||
queryCondition: {
|
||||
@@ -321,27 +284,78 @@ export default {
|
||||
type2: 0,
|
||||
type3: 0,
|
||||
isFind: false,
|
||||
//searchTags: [],
|
||||
//orgData: [],
|
||||
fielclass:true,
|
||||
fielclassjor:true,
|
||||
// orgDomainData:'',
|
||||
// orgsto:[],
|
||||
// majorTypeData:'',
|
||||
// majsto:[],
|
||||
// Domarr:[],
|
||||
// majarr:[],
|
||||
// domData:[],
|
||||
// majData:[],
|
||||
localSessionKey:this.$xpage.constants.localCaseFiltersKey
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(["userInfo", "portalCase"]),
|
||||
word: function() {
|
||||
if (this.showAll == false) {
|
||||
//对文字进行处理
|
||||
return "展开";
|
||||
} else {
|
||||
return "收起";
|
||||
}
|
||||
},
|
||||
isMore() {
|
||||
let isOk = true;
|
||||
if (this.caseList.list.length === this.caseList.count) {
|
||||
isOk = false;
|
||||
}
|
||||
return isOk;
|
||||
},
|
||||
tagList(){ //列表属性,用于计算
|
||||
let list=[];
|
||||
if(this.keyWord){
|
||||
list.push({type:'0', code:'keyword', name:this.keyWord, checked:true})
|
||||
}
|
||||
this.domain.forEach(item=>{
|
||||
if(item.fielclass){
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
this.speciData.forEach(item=>{
|
||||
if(item.fielclass){
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// if(this.searchTags.length == 0){
|
||||
// this.queryCondition.majorType = null;
|
||||
// this.queryCondition.orgDomain = null;
|
||||
// };
|
||||
this.specialized();
|
||||
let $this=this;
|
||||
// if(this.speciData.length==0){
|
||||
// this.specialized();
|
||||
// }
|
||||
// if(this.domain.length==0){
|
||||
// this.getdomain();
|
||||
// }
|
||||
|
||||
Promise.all([apiDict.items("org_domain"),apiCase.majorTypes()]).then(rs=>{
|
||||
if(rs[0].status==200){
|
||||
rs[0].result.forEach(item =>{
|
||||
item.fielclass = false;
|
||||
item.type='org_domain';
|
||||
})
|
||||
this.domain = rs[0].result;
|
||||
}
|
||||
if(rs[1].status==200){
|
||||
rs[1].result.forEach(item =>{
|
||||
item.fielclass = false;
|
||||
item.type='major_type';
|
||||
})
|
||||
this.speciData = rs[1].result;
|
||||
}
|
||||
this.loadLocalFilters();
|
||||
this.$nextTick(function() {
|
||||
$this.initHeight = document.getElementById("searchBox").offsetHeight;
|
||||
$this.closeSearch();
|
||||
});
|
||||
this.search();
|
||||
});
|
||||
|
||||
if (!this.portalCase.readProtocol) {
|
||||
this.protocolDialogVisible = true;
|
||||
}
|
||||
@@ -353,47 +367,61 @@ export default {
|
||||
this.getPopularity();
|
||||
this.searchterm();
|
||||
this.getPositive();
|
||||
//this.getProfess();
|
||||
this.getdomain();
|
||||
// this.getCaseData();
|
||||
this.search();
|
||||
this.couresreso();
|
||||
window.addEventListener("scroll", this.handleScroll);
|
||||
|
||||
},
|
||||
|
||||
watch: {
|
||||
// queryCondition:{
|
||||
// handler(newValue,oldValue){
|
||||
// this.getCaseData()
|
||||
// },
|
||||
// deep:true,
|
||||
// immediate:true
|
||||
// }
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener("scroll", this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
saveLocalFilters(){
|
||||
let typeCodeList=[];
|
||||
this.tagList.forEach(item=>{
|
||||
typeCodeList.push({
|
||||
type:item.type,
|
||||
code:item.code,
|
||||
name:item.name
|
||||
})
|
||||
});
|
||||
let typeCodeString=JSON.stringify(typeCodeList);
|
||||
sessionStorage.setItem(this.localSessionKey,typeCodeString);
|
||||
},
|
||||
loadLocalFilters(t){
|
||||
let hasData=sessionStorage.getItem(this.localSessionKey);
|
||||
if(hasData){
|
||||
let typeCodeList=JSON.parse(hasData);
|
||||
typeCodeList.forEach(item=>{
|
||||
if(item.type=='0'){
|
||||
this.keyWord=item.name;
|
||||
}else if(item.type=='major_type'){
|
||||
this.speciData.some(m=>{
|
||||
if(m.code==item.code){
|
||||
m.fielclass=true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
}else if(item.type=='org_domain'){
|
||||
this.domain.some(m=>{
|
||||
if(m.code==item.code){
|
||||
m.fielclass=true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
majorall(){
|
||||
this.queryCondition.majorType = '';
|
||||
this.fielclassjor=true;
|
||||
this.speciData.forEach(item=>{
|
||||
item.fielclass = false;
|
||||
})
|
||||
// if(this.fielclassjor){
|
||||
// let narr = this.fieldData;
|
||||
// this.fieldData = narr.filter(item => {
|
||||
// if(item.type == 'major_type') {
|
||||
// console.log(item);
|
||||
// item.fielclass = false;
|
||||
// return false;
|
||||
// }else{
|
||||
// return true;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
//this.getCaseData();
|
||||
this.search();
|
||||
},
|
||||
domainall(){
|
||||
@@ -403,116 +431,17 @@ export default {
|
||||
item.fielclass = false;
|
||||
})
|
||||
this.fielclass=true;
|
||||
|
||||
// if(this.fielclass){
|
||||
// var newArr = this.fieldData;
|
||||
// this.fieldData = newArr.filter(item => {
|
||||
// if(item.type == 'org_domain') {
|
||||
// console.log(item);
|
||||
// item.fielclass = false;
|
||||
// return false;
|
||||
// console.log(this.fieldData)
|
||||
// }else{
|
||||
// return true;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
//this.getCaseData();
|
||||
this.search();
|
||||
},
|
||||
fieldmajor(item){//专业分类
|
||||
this.fielclassjor = false;
|
||||
item.fielclass = !item.fielclass;
|
||||
this.search();
|
||||
// if(item.fielclass){
|
||||
// let has=this.fieldData.some(fd=>{
|
||||
// return fd.code==item.code;
|
||||
// });
|
||||
// if(!has){
|
||||
// this.fieldData.push(item);
|
||||
// }
|
||||
// }else{
|
||||
// let delIdx=-1;
|
||||
// this.fieldData.some((fd,fdidx)=>{
|
||||
// if(fd.code==item.code){
|
||||
// delIdx=fdidx;
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// });
|
||||
// if(delIdx>-1){
|
||||
// this.fieldData.splice(delIdx,1);
|
||||
// }
|
||||
// }
|
||||
// this.majsto.push(item.code);
|
||||
// this.majorTypeData = this.majsto.toString()//传给后端
|
||||
// this.queryCondition.majorType = this.majorTypeData;
|
||||
//this.getCaseData();
|
||||
|
||||
//this.ceshiorg();
|
||||
},
|
||||
// ceshiorg(){//判断专业
|
||||
// this.majData = [];
|
||||
// this.fieldData.forEach(itx =>{
|
||||
// if(itx.type == 'major_type'){
|
||||
// console.log(typeof itx);
|
||||
// if(itx.fielclass == true){
|
||||
// this.majData.push(itx)
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// console.log(this.majData);
|
||||
// let b = JSON.stringify(this.majData);
|
||||
// if(b == '[]'){
|
||||
// this.fielclassjor=true;
|
||||
// }
|
||||
// },
|
||||
// ceshidom(){//判断组织
|
||||
// this.domData = [];
|
||||
// this.fieldData.forEach(itx =>{
|
||||
// if(itx.type == 'org_domain'){
|
||||
// console.log(typeof itx);
|
||||
// if(itx.fielclass == true){
|
||||
// this.domData.push(itx)
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// let b = JSON.stringify(this.domData);
|
||||
// if(b == '[]'){
|
||||
// this.fielclass=true;
|
||||
// }
|
||||
// },
|
||||
fieldswich(item){//组织领域
|
||||
this.fielclass=false;
|
||||
item.fielclass = !item.fielclass;
|
||||
|
||||
// if(item.fielclass){
|
||||
// let has=this.fieldData.some(fd=>{
|
||||
// return fd.code==item.code;
|
||||
// });
|
||||
// //console.log(has,'has')
|
||||
// if(!has){
|
||||
// this.fieldData.push(item);
|
||||
// }
|
||||
// }else{
|
||||
// let delIdx=-1;
|
||||
// this.fieldData.some((fd,fdidx)=>{
|
||||
// if(fd.code==item.code){
|
||||
// delIdx=fdidx;
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// });
|
||||
// if(delIdx>-1){
|
||||
// this.fieldData.splice(delIdx,1);
|
||||
// }
|
||||
// }
|
||||
// this.orgsto.push(item.code);
|
||||
// this.orgDomainData = this.orgsto.toString()//传给后端
|
||||
// this.queryCondition.orgDomain = this.orgDomainData;
|
||||
//this.getCaseData();
|
||||
this.search();
|
||||
//this.ceshidom();
|
||||
},
|
||||
|
||||
banJump() {
|
||||
@@ -527,30 +456,28 @@ export default {
|
||||
this.resonimg = lmj[0]
|
||||
})
|
||||
},
|
||||
specialized(){
|
||||
let $this=this;
|
||||
apiCase.majorTypes().then(res =>{
|
||||
if(res.status == 200){
|
||||
if (res.status == 200) {
|
||||
res.result.forEach(item =>{
|
||||
item.fielclass = false;
|
||||
item.type='major_type';
|
||||
})
|
||||
specialized(){
|
||||
let $this=this;
|
||||
apiCase.majorTypes().then(res =>{
|
||||
if(res.status == 200){
|
||||
if (res.status == 200){
|
||||
res.result.forEach(item =>{
|
||||
item.fielclass = false;
|
||||
item.type='major_type';
|
||||
})
|
||||
}
|
||||
this.speciData = res.result;
|
||||
this.loadLocalFilters(1);
|
||||
//this.Profess=res.result;
|
||||
this.$nextTick(function() {
|
||||
$this.initHeight = document.getElementById("searchBox").offsetHeight;
|
||||
$this.closeSearch();
|
||||
});
|
||||
}
|
||||
this.speciData = res.result;
|
||||
//this.Profess=res.result;
|
||||
this.$nextTick(function() {
|
||||
$this.initHeight = document.getElementById("searchBox").offsetHeight;
|
||||
$this.closeSearch();
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
jumcasedet(item) {
|
||||
this.$router.push({path:'/case/detail',query:{id:item.id}});
|
||||
|
||||
this.$router.push({path:'/case/detail',query:{id:item.id}});
|
||||
},
|
||||
debounce(func, wait) {
|
||||
// 非立即执行
|
||||
@@ -614,13 +541,14 @@ export default {
|
||||
},
|
||||
async getdomain() {
|
||||
let key = "org_domain";
|
||||
await apiDict.items(key).then(res => {
|
||||
await apiDict.items("org_domain").then(res => {
|
||||
if (res.status == 200) {
|
||||
res.result.forEach(item =>{
|
||||
item.fielclass = false;
|
||||
item.type=key;
|
||||
})
|
||||
this.domain = res.result;
|
||||
this.loadLocalFilters(2);
|
||||
// if(res.result.length > 0) {
|
||||
// this.orgDomainLevel(res.result)
|
||||
// }
|
||||
@@ -758,6 +686,7 @@ export default {
|
||||
this.getCaseData();
|
||||
},
|
||||
async getCaseData() {
|
||||
this.saveLocalFilters();
|
||||
// this.fieldData
|
||||
//this.queryCondition.pageIndex = 1;
|
||||
let orgDomainList=[];
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<div class="xcontent2">
|
||||
<div class="xcontent2-main content-div">
|
||||
<div class="search-div" style="margin-right:36px">
|
||||
<div class="searchbar" v-if="stagList.length > 0">
|
||||
<div class="searchbar" style="padding-right: 40px;" v-if="stagList.length > 0">
|
||||
<span @click="handleClearTags" style="float: right;margin-top: 6px;margin-right: -20px;color: #858585;cursor: pointer;" title="清除查询条件"><i class="el-icon-close"></i> 清除</span>
|
||||
<div style="line-height: 30px;">
|
||||
<span class="item-title"> 搜索条件</span>
|
||||
<el-tag closable v-for="(tag, tagIdx) in stagList" :key="'t'+tagIdx" @close="stagClose(tag,tagIdx)">{{ tag.name }}</el-tag>
|
||||
@@ -35,7 +36,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<a @click="handleTypeAllClick(11)" class="option-item" :class="{'option-active':oneTagAll}">全部</a>
|
||||
<a v-for="one in oneList" @click="handleOptionClick(one,oneList)" class="option-item" :class="{'option-active':one.checked}">{{one.name}}</a>
|
||||
<a v-for="one in oneList" @click="handleOptionClick(one,oneList,1)" class="option-item" :class="{'option-active':one.checked}">{{one.name}}</a>
|
||||
<a class="option-border"> </a>
|
||||
<a class="option-item">
|
||||
<span @click="jumUX()" class="Uxtext" style=""> U选小课堂
|
||||
@@ -56,7 +57,7 @@
|
||||
<a @click="handleTypeAllClick(12)" class="option-item" :class="{'option-active':twoTagAll}">全部</a>
|
||||
</div>
|
||||
<div>
|
||||
<a v-for="two in twoList" @click="handleOptionClick(two,twoList)" class="option-item" :class="{'option-active':two.checked}">{{two.name}}</a>
|
||||
<a v-for="two in twoList" @click="handleOptionClick(two,twoList,2)" class="option-item" :class="{'option-active':two.checked}">{{two.name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -69,7 +70,7 @@
|
||||
<a @click="handleTypeAllClick(13)" class="option-item" :class="{'option-active':threeTagAll}">全部</a>
|
||||
</div>
|
||||
<div>
|
||||
<a v-for="three in threeList" :key="three.id" @click="handleOptionClick(three,threeList)" class="option-item" :class="{'option-active':three.checked}">{{three.name}}</a>
|
||||
<a v-for="three in threeList" :key="three.id" @click="handleOptionClick(three,threeList,3)" class="option-item" :class="{'option-active':three.checked}">{{three.name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,7 +91,7 @@
|
||||
<!-- <a :href="toCourseDetail(cinfo)"> -->
|
||||
<a @click="toCourseDetail(cinfo)">
|
||||
<div class="course-image-box">
|
||||
<course-image :course="cinfo"></course-image>
|
||||
<course-image :text="true" :course="cinfo"></course-image>
|
||||
<span v-if="cinfo.type == 20 || 10" class="course-type-left">录播课</span>
|
||||
<span v-if="cinfo.type == 30" class="course-type-left">线下课</span>
|
||||
<span v-if="cinfo.type == 40" class="course-type-left">学习项目</span>
|
||||
@@ -170,7 +171,7 @@
|
||||
<div class="list-active">
|
||||
<div class="list-content">
|
||||
<div class="list-img">
|
||||
<course-image :course="item" width="108px" height="60px"></course-image>
|
||||
<course-image :course="item" :text="false" width="108px" height="60px"></course-image>
|
||||
<span v-if="item.type < 21" class="course-type">录播</span>
|
||||
<span v-if="item.type==30" class="course-type">线下课</span>
|
||||
<span v-if="item.type==40" class="course-type">学习项目</span>
|
||||
@@ -219,7 +220,7 @@
|
||||
<div class="list-active">
|
||||
<div class="list-content">
|
||||
<div class="list-img">
|
||||
<course-image :course="item" width="108px" height="60px"></course-image>
|
||||
<course-image :course="item" :text="false" width="108px" height="60px"></course-image>
|
||||
<span v-if="item.type < 21" class="course-type">录播</span>
|
||||
<span v-if="item.type==30" class="course-type">线下课</span>
|
||||
<span v-if="item.type==40" class="course-type">学习项目</span>
|
||||
@@ -267,7 +268,7 @@
|
||||
<div class="list-active">
|
||||
<div class="list-content">
|
||||
<div class="list-img">
|
||||
<course-image :course="item" width="108px" height="60px"></course-image>
|
||||
<course-image :course="item" :text="false" width="108px" height="60px"></course-image>
|
||||
<!-- <img style="width:96px;height:52px" :src="fileBaseUrl + item.images" alt=""/> -->
|
||||
<span v-if="item.type < 21" class="course-type">录播</span>
|
||||
<span v-if="item.type==30" class="course-type">线下课</span>
|
||||
@@ -353,21 +354,42 @@ export default {
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
this.oneList.forEach(item=>{
|
||||
if(item.checked){
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
this.twoList.forEach(item=>{
|
||||
if(item.checked){
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
this.threeList.forEach(item=>{
|
||||
if(item.checked){
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
this.oneList.forEach(one=>{
|
||||
var twoChildChecked=false;//是否有下级
|
||||
one.children.forEach(two=>{
|
||||
if(two.checked){
|
||||
twoChildChecked=true;
|
||||
}
|
||||
var threeChildChecked=false;
|
||||
two.children.forEach(three=>{
|
||||
if(three.checked){
|
||||
list.push(three);
|
||||
threeChildChecked=true;
|
||||
}
|
||||
});
|
||||
if(two.checked && !threeChildChecked){
|
||||
list.push(two);
|
||||
}
|
||||
});
|
||||
if(one.checked && !twoChildChecked){
|
||||
list.push(one);
|
||||
}
|
||||
})
|
||||
// this.oneList.forEach(item=>{
|
||||
// if(item.checked){
|
||||
// list.push(item);
|
||||
// }
|
||||
// });
|
||||
// this.twoList.forEach(item=>{
|
||||
// if(item.checked){
|
||||
// list.push(item);
|
||||
// }
|
||||
// });
|
||||
// this.threeList.forEach(item=>{
|
||||
// if(item.checked){
|
||||
// list.push(item);
|
||||
// }
|
||||
// });
|
||||
//console.log(list,'list');
|
||||
return list;
|
||||
},
|
||||
@@ -523,6 +545,7 @@ export default {
|
||||
}
|
||||
this.searchData();
|
||||
},
|
||||
|
||||
handleTypeAllClick(t){
|
||||
if(t==1){
|
||||
this.ctypeList.forEach(ct=>{
|
||||
@@ -555,42 +578,116 @@ export default {
|
||||
}
|
||||
this.searchData();
|
||||
},
|
||||
handleClearTags(){
|
||||
//清空所有的条件
|
||||
this.keyword='';
|
||||
this.ctypeList.forEach(item=>{
|
||||
item.checked=false;
|
||||
});
|
||||
this.oneList.forEach(one=>{
|
||||
one.checked=false;
|
||||
one.children.forEach(two=>{
|
||||
two.checked=false;
|
||||
two.children.forEach(three=>{
|
||||
three.checked=false;
|
||||
})
|
||||
})
|
||||
});
|
||||
this.twoList=[];
|
||||
this.threeList=[];
|
||||
this.searchData();
|
||||
},
|
||||
handleTypeClick(item,list){
|
||||
//item.checked=!item.checked;
|
||||
item.checked=!item.checked;
|
||||
//使用上面一行是可以多选,使用下面是单选
|
||||
list.forEach(row=>{
|
||||
row.checked=false;
|
||||
})
|
||||
item.checked=true;
|
||||
// list.forEach(row=>{
|
||||
// row.checked=false;
|
||||
// })
|
||||
// item.checked=true;
|
||||
|
||||
this.searchData();
|
||||
},
|
||||
handleOptionClick(item,list){
|
||||
//item.checked=!item.checked;
|
||||
handleOptionClick(item,list,level){
|
||||
item.checked=!item.checked;
|
||||
//使用上面一行是可以多选,使用下面是单选
|
||||
list.forEach(row=>{
|
||||
row.checked=false;
|
||||
})
|
||||
item.checked=true;
|
||||
// list.forEach(row=>{
|
||||
// row.checked=false;
|
||||
// })
|
||||
// item.checked=true;
|
||||
//以下是新的规则的修改,
|
||||
if(!item.checked){
|
||||
//清空它下面的所有的中的
|
||||
item.children.forEach(subItem=>{
|
||||
subItem.checked=false;
|
||||
if(subItem.children){
|
||||
subItem.children.forEach(sub=>{
|
||||
sub.checked=false;
|
||||
})
|
||||
}
|
||||
});
|
||||
if(level==1){
|
||||
this.twoList=[];
|
||||
this.threeList=[];
|
||||
}
|
||||
if(level==2){
|
||||
this.threeList=[];
|
||||
}
|
||||
this.searchData();
|
||||
return;
|
||||
}
|
||||
|
||||
this.handleChangeTypes();
|
||||
let $this=this;
|
||||
if(level==1){ //一级的情况
|
||||
this.twoList=[];
|
||||
this.threeList=[];
|
||||
let lastCheked=null;
|
||||
item.children.forEach(two=>{
|
||||
$this.twoList.push(two);
|
||||
if(two.checked){
|
||||
lastCheked=two;
|
||||
}
|
||||
});
|
||||
if(lastCheked!=null){
|
||||
$this.threeList=lastCheked.children;
|
||||
item.children.forEach(three=>{
|
||||
});
|
||||
}
|
||||
}else if(level==2){ //二级的情况
|
||||
this.threeList=item.children;
|
||||
}else if(level==3){ //三级的情况
|
||||
|
||||
}
|
||||
//this.handleChangeTypes(item);
|
||||
this.searchData();
|
||||
},
|
||||
handleChangeTypes(){
|
||||
handleChangeTypes(item){
|
||||
console.log(item);
|
||||
//重新计算
|
||||
this.twoList=[];
|
||||
this.threeList=[];
|
||||
let $this=this;
|
||||
// this.oneList.forEach(one=>{
|
||||
// if(one.checked){
|
||||
// one.children.forEach(two=>{
|
||||
// $this.twoList.push(two);
|
||||
// if(two.checked){
|
||||
// two.children.forEach(three=>{
|
||||
// $this.threeList.push(three);
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
this.oneList.forEach(one=>{
|
||||
if(one.checked){
|
||||
one.children.forEach(two=>{
|
||||
$this.twoList.push(two);
|
||||
if(two.checked){
|
||||
one.children.forEach(two=>{
|
||||
$this.twoList.push(two);
|
||||
if(two.checked){
|
||||
two.children.forEach(three=>{
|
||||
$this.threeList.push(three);
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -599,6 +696,7 @@ export default {
|
||||
try {
|
||||
const { result, status } = await apiType.tree(1);
|
||||
if (status === 200) {
|
||||
let tree=[];
|
||||
result.forEach(item=>{
|
||||
let newItem={
|
||||
type:11,
|
||||
@@ -634,6 +732,7 @@ export default {
|
||||
}
|
||||
$this.oneList.push(newItem);
|
||||
});
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
@@ -803,6 +902,31 @@ export default {
|
||||
return res;
|
||||
}
|
||||
},
|
||||
getAllChecked(){ //获取全部选中的标签
|
||||
let list=[];
|
||||
|
||||
this.ctypeList.forEach(item=>{
|
||||
if(item.checked){
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
this.oneList.forEach(one=>{
|
||||
one.children.forEach(two=>{
|
||||
two.children.forEach(three=>{
|
||||
if(three.checked){
|
||||
list.push(three);
|
||||
}
|
||||
});
|
||||
if(two.checked ){
|
||||
list.push(two);
|
||||
}
|
||||
});
|
||||
if(one.checked){
|
||||
list.push(one);
|
||||
}
|
||||
})
|
||||
return list;
|
||||
},
|
||||
async search() {
|
||||
//测试时间格式化
|
||||
// let s=1650973801;
|
||||
@@ -825,11 +949,8 @@ export default {
|
||||
this.course.sysType2 = "";
|
||||
this.course.sysType3 = "";
|
||||
this.course.keyword=this.keyword;
|
||||
|
||||
this.stagList.forEach(item=>{
|
||||
if(item.checked){
|
||||
|
||||
}
|
||||
let allChecked=this.getAllChecked();
|
||||
allChecked.forEach(item=>{
|
||||
if(item.type==1){
|
||||
if(that.course.types){ that.course.types+='-'; }
|
||||
that.course.types+=item.id;
|
||||
@@ -1064,7 +1185,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.course-image-box:hover{
|
||||
transform: scale(1.3);
|
||||
transform: scale(1.3) translateY(-15px);
|
||||
transition: all 0.6s;
|
||||
}
|
||||
|
||||
|
||||
@@ -611,15 +611,49 @@
|
||||
apiCourseStudy.followIds(params).then(res=>{
|
||||
if(res.status == 200) {
|
||||
list.forEach((item, index) => {
|
||||
res.result.some(con => {
|
||||
if (item.contentId == con.courseId && item.aid == con.aid) {
|
||||
|
||||
res.result.some(con => {
|
||||
if (item.contentId == con.courseId){
|
||||
//item.info = con;
|
||||
if (item.aid == con.aid) {
|
||||
//不是一个人的进度,如何处理?
|
||||
item.info = con;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
//给没有加的加上课程内容,只是复制课程信息
|
||||
list.forEach((item, index) => {
|
||||
if(!item.info.courseId){
|
||||
res.result.some(con => {
|
||||
if(item.contentId == con.courseId){
|
||||
item.info={
|
||||
addTime:con.addTime,
|
||||
aid: item.aid,
|
||||
courseId:con.courseId,
|
||||
courseImage:con.courseImage,
|
||||
courseName:con.courseName,
|
||||
courseType:con.courseType,
|
||||
deleted:con.deleted,
|
||||
enabled:con.enabled,
|
||||
id:"",
|
||||
lastScore:con.lastScore,
|
||||
progress:0,
|
||||
source:con.source,
|
||||
sysType1: con.sysType1,
|
||||
sysType2: con.sysType2,
|
||||
sysType3: con.sysType3
|
||||
};
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
// this.getArticleUserData(list);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -435,6 +435,9 @@
|
||||
return treeList;
|
||||
}
|
||||
},
|
||||
destroyed(){
|
||||
this.stopStudyTime();
|
||||
},
|
||||
methods: {
|
||||
toUserHome(tea){
|
||||
this.$router.push({path:this.$xpage.getHomePath(tea.teacherId)})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page-ranking">
|
||||
<!--
|
||||
|
||||
<div class="page-ranking-col experience">
|
||||
<div class="exp-hear">
|
||||
<div class="exp-hear-text">
|
||||
@@ -23,9 +23,9 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="total">累计</el-dropdown-item>
|
||||
<el-dropdown-item command="weeks">本周</el-dropdown-item>
|
||||
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
|
||||
<el-dropdown-item command="months">本月</el-dropdown-item>
|
||||
<el-dropdown-item command="years">本年</el-dropdown-item>
|
||||
<el-dropdown-item command="years">本年</el-dropdown-item> -->
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
@@ -116,9 +116,9 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="total">累计</el-dropdown-item>
|
||||
<el-dropdown-item command="weeks">本周</el-dropdown-item>
|
||||
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
|
||||
<el-dropdown-item command="months">本月</el-dropdown-item>
|
||||
<el-dropdown-item command="years">本年</el-dropdown-item>
|
||||
<el-dropdown-item command="years">本年</el-dropdown-item> -->
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
@@ -135,7 +135,7 @@
|
||||
<div class="table-hear">
|
||||
<div style="margin-left:5px">排名</div>
|
||||
<div style="margin-left:5px">姓名</div>
|
||||
<div style="margin-left:30%;">学习时长:小时</div>
|
||||
<div style="margin-left:25%;">学习时长:小时</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="table-hear" style="margin-top:40px;border-bottom: 1px solid #ddd;padding-bottom:20px" v-for="(lan,idx) in learningDuration.list" :key="lan.id">
|
||||
@@ -185,7 +185,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
<div class="page-ranking-col Duration">
|
||||
<div class="exp-hear study-info">
|
||||
|
||||
Reference in New Issue
Block a user