Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal into online

This commit is contained in:
dongruihua
2022-07-15 22:25:04 +08:00
28 changed files with 872 additions and 633 deletions

Binary file not shown.

View File

@@ -97,15 +97,14 @@ const delReply=function(data){
return ajax.post('/xboe/m/comment/delete-reply',data);
}
export default{
del,
update,
add,
pagelist,
pageQuery,
reply,
replyList,
userReplyList,
delReply
reply,
replyList,
userReplyList,
delReply,
}

View File

@@ -139,16 +139,15 @@ export default {
}
this.loading=true;
this.addForm.status = 2;
let content= this.addForm.content.replace(/<.*?>/ig,"");
console.log(content)
if(content.trim() == ''){
// let content= this.addForm.content.replace(/<.*?>/ig,"");
// let content= this.addForm.content.replace(/[^\u4E00-\u9FA5|\d|\a-zA-Z|\r\n\s,.?!,。?!<>…—&$=()-+/*{}[\]]|\r\n\s/g,"");
if(this.addForm.content.trim() == ''){
this.$message('您输入的内容为空,无法发布')
type: 'warning'
this.loading=false
return
}
this.addForm.content=content.trim()
console.log(this.addForm.content,'iguighui')
this.addForm.content=this.addForm.content.trim()
apiArticle.save(this.addForm).then(res => {
if (res.status == 200) {
if(res.message=='服务处理成功'){

View File

@@ -15,7 +15,7 @@
<router-link :to="'/case/detail?id='+item.cases.id" > {{item.cases.summary}}</router-link>
</div>
<div class="article-info-tools">
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo>
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo" :sex="item.sex"></authorInfo>
<span style="margin-top:2px">发布时间{{ item.cases.sysCreateTime || item.publishTime | timeFilter }}</span>
<span style="margin-top:2px">收藏时间{{ item.time || item.favoritesTime | timeFilter }}</span>
<!-- <interactBar :type="0" :data="item.cases" :shares="false" :views="false"></interactBar> -->

View File

@@ -547,7 +547,7 @@
apiCourse.updateContentName({id:this.content.id,name:value}).then(rs=>{
if(rs.status!=200){
console.log('更新名称失败:'+rs.message);
}saveData
}
})
},
// 作业上传

View File

@@ -0,0 +1,113 @@
<template>
<div class="choice">
<el-tag type="info"
closable
v-for="(item,index) in teacherValueList"
:key="item.teacherId"
@close="handleClose(item,index)">{{item.teacherName}}</el-tag>
<el-select
style="width: 100%;"
v-model="teacherValues"
filterable
remote
clearable
value-key="teacherId"
ref="elSelect"
reserve-keyword
placeholder="请输入授课教师姓名"
@change="changeTeachers"
:remote-method="remoteFindTeacher"
:loading="loading">
<el-option v-for="item in teacherDownList" :key="item.teacherId" :label="item.teacherName + item.teacherCode" :value="item"></el-option>
</el-select>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import apiTeacher from '../../api/modules/teacher.js';
export default{
name: 'choice',
computed: {
...mapGetters(['userInfo'])
},
props: {
teacherValue:{
type:Array,
},
},
data(){
return {
teacherValueList:[],
teacherValues:{},
loading:false,
teacherDownList:[],
}
},
watch:{
teacherValue(val) {
this.teacherValueList = val;
}
},
mounted(){
},
methods:{
handleClose(item,index){
this.teacherValueList.splice(index, 1);
this.$emit('getTeacherList',this.teacherValueList);
},
changeTeachers(t) {
if(t) {
let isCan = this.teacherValueList.some(it=>it.teacherId == t.teacherId);
if(isCan){
this.teacherValues = {};
this.teacherDownList = [];
this.$message.warning('教师重复,请重新选择!')
return;
}
this.teacherValueList.push(t);
this.teacherDownList = [];
this.teacherValues = {};
this.$emit('getTeacherList',this.teacherValueList);
}
},
// 教师列标,远程查询
async remoteFindTeacher(query) {
if (query) {
this.loading = true;
try {
const { result, message, status } = await apiTeacher.findByName(query);
this.loading = false;
if (status === 200) {
let list = [];
result.forEach(item => {
list.push({
teacherId: item.id,
teacherName: item.name,
teacherCode: item.code
});
});
this.teacherDownList = list;
} else {
this.$message.error('查询教师信息失败:' + message);
}
} catch (err) {
this.loading = false;
}
} else {
this.teacherDownList = [];
}
},
}
}
</script>
<style lang="scss">
.choice{
.el-tag--info{
height: 22px;
line-height: 22px;
}
}
</style>

View File

@@ -90,20 +90,22 @@
</el-form-item>
<el-form-item label="授课教师" required>
<!--授课老师默认是当前操作人-->
<el-select
<!-- <el-select
style="width: 100%;"
v-model="teacherValues"
multiple
filterable
remote
value-key="teacherId"
ref="elSelect"
reserve-keyword
placeholder="请输入授课教师姓名"
@change="changeTeachers"
:remote-method="remoteFindTeacher"
:loading="loading">
<el-option v-for="item in teacherDownList" :key="item.teacherId" :label="item.teacherName + item.teacherCode" :value="item"></el-option>
</el-select>
</el-select> -->
<choice :teacherValue="teacherValues" @getTeacherList="getTeacherList"></choice>
</el-form-item>
<el-form-item label="目标人群" required>
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
@@ -233,20 +235,22 @@
</el-form-item>
<el-form-item label="授课教师" required>
<!--授课老师默认是当前操作人-->
<el-select
<!-- <el-select
style="width: 100%;"
v-model="teacherValues"
multiple
filterable
remote
value-key="teacherId"
ref="elSelect"
reserve-keyword
placeholder="请输入授课教师姓名"
@change="changeTeachers"
:remote-method="remoteFindTeacher"
:loading="loading">
<el-option v-for="item in teacherDownList" :key="item.teacherId" :label="item.teacherName + item.teacherCode" :value="item"></el-option>
</el-select>
</el-select> -->
<choice :teacherValue="teacherValues" @getTeacherList="getTeacherList"></choice>
</el-form-item>
</el-col>
</el-form-item>
@@ -377,7 +381,8 @@
</div>
</template>
<script>
import agreement from '@/components/Portal/agreement.vue'
import choice from '@/components/Course/choice.vue';
import agreement from '@/components/Portal/agreement.vue';
import weikeContent from '@/components/Course/weikeContent.vue';
import catalogCourseware from '@/components/Course/catalogCourseware.vue';
import imageUpload from '@/components/ImageUpload/index.vue';
@@ -394,7 +399,7 @@ import { mapGetters, mapActions } from 'vuex';
import filecloud from '@/components/FileCloud/index.vue';
export default {
props: {},
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud},
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice},
data() {
return {
checked:false,
@@ -528,6 +533,9 @@ export default {
this.loadUserGroup();
},
methods: {
getTeacherList(res) {
this.teacherValues = res;
},
chooseFile(){
this.dlgFileChoose.show=true;
},
@@ -538,7 +546,6 @@ export default {
if(!img.path){
return;
}
//console.log(img);
this.dlgFileChoose.show=false;
this.courseInfo.coverImg = img.path;
this.courseCoverurl = this.fileUrl+img.path;
@@ -800,8 +807,8 @@ export default {
},
changeTeachers(t) {
//用于监听教师列表的选择变化
//console.log(t);
this.requireSaveCourse = true;
this.$refs.elSelect.query = '';
},
formartTeacher() {},
addNewSection() {
@@ -1205,7 +1212,8 @@ export default {
if (index == -1) {
this.contentInfo.list.push(cc);
} else {
this.contentInfo.list[index] = cc;
// this.contentInfo.list[index] = cc;
this.contentInfo.list.splice(index,1,cc);
}
//计算顺序值
},

View File

@@ -164,6 +164,7 @@ export default {
change(e) {
let file = e.target.files[0]
const formData = new FormData()
console.log(file,'file');
formData.append('file', file)
upload(formData)
.then(res => {
@@ -185,6 +186,12 @@ export default {
</script>
<style>
.editor{
min-height: 250px !important;
}
.ql-editor{
min-height: 250px !important;
}
.ql-container{
font-size: 15px;
}

View File

@@ -15,14 +15,11 @@
<div v-if="!onlyAvatar" style="padding-left: 5px;padding-top: 6px;font-size: 14px;color: #666666;">
<span>{{userName}}</span>
<span class="author-text" v-if="userInfo && userInfo!=''">({{userInfo}})</span>
</div>
</div>
</template>
<script>
import {
userAvatarText
} from "@/utils/tools.js";
import { userAvatarText } from "@/utils/tools.js";
export default {
props:{
avatar:{

View File

@@ -36,8 +36,7 @@
class="reference-tag"
v-for="item in toUsers"
:key="item.aid"
:label="item.aid">{{ item.name }}</el-radio-button
>
:label="item.aid">{{ item.name }}</el-radio-button>
</el-radio-group>
</div>
@@ -68,7 +67,7 @@
type="textarea"
class="hideControl"
show-word-limit
v-model.trim="inputValue"
v-model="inputValue"
maxlength="800"
placeholder="写下您的评论(800字以内),可以@案主哦~"
></el-input>
@@ -97,7 +96,7 @@
<div class="comment-body" >
<div class="comment-info" @mouseover="showButtons(com.id)" @mouseout="hideButtons()">
<div class="comment-content" @click="cancelReply()">
{{displayAll(com)}}
<span style="color: #303133" v-html="displayAll(com)"></span>
<span v-if="com.content.length>170" @click="changeIsAll(com)">
{{com.isAll?'收起':'全文'}}
</span>
@@ -138,7 +137,7 @@
<div class="comment-body" @mouseover="showButtons(reply.id)" @mouseout="hideButtons()">
<div class="comment-info" >
<div class="comment-content" @click="cancelReply()">
{{displayAll(reply)}}
<span style="color: #303133" v-html="displayAll(reply)"></span>
<span v-if="reply.content.length>170" @click="changeIsAll(reply)">
{{reply.isAll?'收起':'全文'}}
</span>
@@ -488,7 +487,7 @@
objType:this.objType,
objId:this.objId,
parentId:'-1',
content:this.inputValue,
content:this.inputValue.trim(),
clevel:1,
toAid:'',
toAname:'',
@@ -533,7 +532,9 @@
},
//展示全部
displayAll(item) {
//console.log(item,'item');
let content = '';
content = item.content.replace(/(\n){2,}/,'<br>');
item.content = content;
if(!item.isAll && item.content && item.content.length > 170) {
return item.content.slice(0, 170) + "...";
}
@@ -554,6 +555,7 @@
this.replyInfo.parentId='';
},
submitReply(comment){
this.replyInfo.content = this.replyInfo.content.trim();
if(this.replyInfo.content==''){
return;
}
@@ -660,6 +662,7 @@
this.replyShow=true;
},
submitDlgReply(){
this.replyInfo.content = this.replyInfo.content.trim();
if(this.replyInfo.content==''){
return;
}

View File

@@ -7,7 +7,7 @@
<div style="display: flex;justify-content: space-around;margin-left: 20px;">
<div class="top-nav" :class="current == 'index' ? 'current-nav' : ''"><router-link to="/index">首页</router-link></div>
<div class="top-nav" :class="current == 'course' ? 'current-nav' : ''"><router-link to="/course">课程</router-link></div>
<div class="top-nav" v-if="caseShow" :class="current == 'case' ? 'current-nav' : ''"><router-link to="/case">案例</router-link></div>
<div class="top-nav" :class="current == 'case' ? 'current-nav' : ''"><router-link to="/case">案例</router-link></div>
<div class="top-nav" :class="current == 'article' ? 'current-nav' : ''"><router-link to="/article">文章</router-link></div>
<div class="top-nav" :class="current == 'qa' ? 'current-nav' : ''"><router-link to="/qa">问答</router-link></div>
<div class="top-nav">
@@ -29,7 +29,7 @@
<el-input v-show="!hideSearch" placeholder="请输入标题搜索" style="width: 260px;" @keyup.enter.native="searchJump()" clearable maxlength="20" v-model="keyword" class="input-with-select">
<el-select v-if="current == 'index'" v-model="findType" style="width: 75px;" slot="prepend" placeholder="请选择">
<el-option label="课程" value="1"></el-option>
<el-option v-if="caseShow" label="案例" value="2"></el-option>
<el-option label="案例" value="2"></el-option>
<el-option label="文章" value="3"></el-option>
<el-option label="问答" value="4"></el-option>
<!-- <el-option label="专区" value="5"></el-option> -->
@@ -86,7 +86,7 @@ export default {
},
computed: {
...mapGetters(['userInfo', 'userMsg','caseShow']),
...mapGetters(['userInfo', 'userMsg']),
avatarText(){
return userAvatarText(this.userInfo.name);

View File

@@ -4,7 +4,7 @@
<el-form-item label="回答内容">
<el-input
type="textarea"
v-model.trim="editData.content"
v-model="editData.content"
placeholder="请输入详细描述"
rows="8"
minlength="1"
@@ -45,6 +45,7 @@
type: 'warning'
});
}
this.editData.content = this.editData.content.trim();
// if(this.editData.content.length<0||this.editData.content.length>255){
// return this.$message({
// message: '回复内容为0-800个字',

View File

@@ -14,7 +14,7 @@
:default-active="activeMenu"
router
active-text-color="#00aaff"
:default-openeds="['manageTodo','manageFinish','teacherTodo','teacherFinish','myqa', 'mystudy', 'course', 'exam', 'u001', 'u002', 'u003', 'u004']"
:default-openeds="['manageTodo','manageFinish','teacherTodo','teacherFinish','myqa', 'mystudy', 'course', 'exam', 'u001', 'u002', 'u003', 'u004','u009','u008']"
class="el-menu-vertical"
@open="handleOpen"
@close="handleClose"
@@ -93,7 +93,7 @@
<svg-icon icon-class="interlocution"></svg-icon>
<span slot="title">问答管理</span>
</el-menu-item>
<el-menu-item v-show="curIdentity == 3">
<el-menu-item v-show="curIdentity == 3" index="u008">
<template slot="title">
<!-- <i class="el-icon-s-grid"></i> -->
<svg-icon icon-class="administrator" style="font-size:17px"></svg-icon>
@@ -102,7 +102,7 @@
</template>
<!-- <i class="el-icon-menu"></i> -->
</el-menu-item>
<el-menu-item v-show="curIdentity == 3">
<el-menu-item v-show="curIdentity == 3" index="u009">
<template slot="title">
<svg-icon icon-class="management" style="font-size:16px"></svg-icon>
<span><a href="https://u.boe.com/train/manager/index.html" target="_blank">业务支援读书会管理</a></span>
@@ -344,8 +344,7 @@ export default {
activeMenu() {
const route = this.$route;
const { meta, path } = route;
console.log(meta)
if(meta.title == '添加受众'){
if(meta.title == '添加受众' || meta.title == '查看受众'){
meta.activeMenu = '/manage/ugroups'
}
if (meta.activeMenu) {

View File

@@ -9,7 +9,7 @@
<div class="xtop-nav">
<div><a :href="`${webBaseUrl}/index`">首页</a></div>
<div><a :href="`${webBaseUrl}/course`">课程</a></div>
<div v-if="caseShow"><a :href="`${webBaseUrl}/case`">案例</a></div>
<div><a :href="`${webBaseUrl}/case`">案例</a></div>
<div><a :href="`${webBaseUrl}/article`">文章</a></div>
<div><a :href="`${webBaseUrl}/qa`">问答</a></div>
<div>
@@ -113,7 +113,7 @@ export default {
};
},
computed: {
...mapGetters(['userInfo', 'userMsg','caseShow']),
...mapGetters(['userInfo', 'userMsg']),
showName: function() {
//console.log('name='+this.name);
//console.log('loginName='+this.loginName);

View File

@@ -7,7 +7,6 @@ const getters = {
cachedViews: state => state.tagsView.cachedViews,
avatar: state => state.user.info.avatar,
userInfo: state => state.user.info,
caseShow: state => state.user.caseShow,
newslist: state => state.user.newslist,
orgId: state => state.user.orgId,
permissions: state => state.user.permissions,

View File

@@ -5,7 +5,6 @@ import apiMessage from '@/api/system/message.js'
import apiCourse from "@/api/modules/course.js";
import apiBoeCourse from "@/api/boe/course.js";
import apiBoeLogout from "@/api/boe/login.js";
import caseUser from "@/utils/caseShow.js"
const user = {
state: {
@@ -16,7 +15,6 @@ const user = {
studyTaskCount:0,//学习任务数
curIdentity: sessionStorage.getItem("curIdentity") == null ? 1 : sessionStorage.getItem("curIdentity"), // 用户当前选择的身份 1学员 2教师 3管理员
permissions: [],
caseShow:false,
},
mutations: {
SET_Identity: (state, iden) => {
@@ -41,9 +39,6 @@ const user = {
SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions
},
SET_caseShow:(state, iden) => {
state.caseShow = iden
},
},
actions: {
refrashMsg({ commit }) {
@@ -133,19 +128,6 @@ const user = {
dfn = res.result.departFullName;
}
}
let nowTime = new Date() //当前时间
let endTime = new Date('2022/07/01 09:30:00') //对比时间
if(nowTime.getTime() < endTime.getTime()){
if (res.result.userNo != '') {
for(let key in caseUser){
if(res.result.userNo == key) {
commit('SET_caseShow',true);
}
}
}
}else{
commit('SET_caseShow',true);
}
const user = {
aid: res.result.aid,
sysId:res.result.sysId,

View File

@@ -1,29 +0,0 @@
/**页面设置的一些常量*/
const caseUser={
'12345601': '测试',
'00004409': '李玉冰',
'101215': '徐涛',
'00005011': '邱炜玮',
'107863': '苗怡',
'00004928': '夏辉',
'110858': '毛继禹',
'10726944': '王芮',
'boeutest': '测试小助手',
'boeuadmin': '运营小助手',
'10181457': '董瑞华',
'10149996':'李曼钰',
'30114900':'虞节星',
'00004006':'吴丽娜',
'10611675':'辛月',
'00002197':'李晓雪',
'104612':'李仙',
'10532630':'谭骁育',
'102321':'沈水',
'10290110':'王梦迪',
'104719':'黄华',
'132501':'吴广霞',
'10364371':'刘俊'
}
export default caseUser;

View File

@@ -107,7 +107,7 @@
</div>
</div>
<!-- 推荐案例2版 -->
<div class="modules" v-if="caseShow">
<div class="modules">
<div class="modules-title">
<span class="modules-text">推荐案例</span>
@@ -139,7 +139,7 @@
<div class="case-inter">
<interactBar :type="3" :readonly="true" :data="ca" :shares="false" :views="false"></interactBar>
</div>
<div class="case-orginfo" style="margin-top:10px">
<div class="case-orginfo" style="margin-top:18px">
<authorInfo :avatar="ca.authorInfo.avatar" :info="ca.authorInfo.orgInfo" :name="ca.authorInfo.name" :sex="ca.authorInfo.sex"></authorInfo></div>
</div>
</div>
@@ -339,7 +339,7 @@ export default {
name: 'index',
components: { portalHeader,ad, portalFooter, articleImage, portalFloatTools, authorInfo, interactRowBar, interactBar, courseImage },
computed: {
...mapGetters(['userInfo','caseShow'])
...mapGetters(['userInfo'])
},
data() {
return {

View File

@@ -96,8 +96,8 @@ export default {
},
saveSuccess(data){
this.diagSync=false;
this.articleList.pageIndex = 1;
this.articleList.list = [];
this.pageData.pageIndex = 1;
this.pageData.list = [];
this.getArticleList();
},
//获取文章列表数据

View File

@@ -8,7 +8,7 @@
<div style="padding: 10px 22px 10px 23px;">
<el-select v-model="dataList.type" style="margin-right: 10px" placeholder="类型">
<!-- <el-option label="全部" :value="0"></el-option> -->
<el-option label="全部" :value="null"></el-option>
<el-option label="文章" :value="2"></el-option>
<!-- <el-option label="课程" :value="1"></el-option> -->
<el-option label="案例" :value="3"></el-option>
@@ -42,13 +42,11 @@
<span style="font-size: 16px; color: #666666; line-height:30px">
<!-- <i class="el-icon-time"> -->
{{item.sysCreateBy}}@
</span>
<span style="margin-left:5px; font-size: 16px; color: #666666; line-height:25px ">
{{ item.content }}
</span>
</div>
<!-- <el-button type="primary" v-if="!item.isread" size="mini">标记已读</el-button> -->
</div>
<div style="margin-top:10px; position: relative;">
@@ -121,7 +119,7 @@ export default {
type:0,
dataList: {
pageIndex:1,
type:4,
type:'',
pageSize:10,
count:0,
list:[],
@@ -149,13 +147,13 @@ export default {
// let routeData = this.$router.resolve({ path:'/article/detail?id='+item.objId}); // , query: { id: 1 }
// window.open(routeData.href, '_blank');
// this.$router.push({path:'/article/detail',query:{id:item.objId}})
if(this.dataList.type == 2){
if(item.objType == 2){
this.$router.push({path:'/article/detail',query:{id:item.objId}})
}else if(this.dataList.type == 1){
}else if(item.objType == 1){
}else if(this.dataList.type == 4){
}else if(item.objType == 4){
this.$router.push({ path: '/qa/answer', query: { id: item.objId } });
} else if(this.dataList.type == 3){
} else if(item.objType == 3){
this.$router.push({ path: '/case/detail', query: { id: item.objId } });
}
},
@@ -189,9 +187,10 @@ export default {
this.$message.error("数据搜索失败")
})
},
reset(){
reset(){
this.dataList.pageIndex = 1;
this.dataList.send = '',
this.dataList.type = '',
this.type = 0;
this.getData();
this.isSearh = false;

View File

@@ -28,23 +28,25 @@
placeholder="题干"
clearable></el-input>
</el-col>
<el-col :span="14">
<el-button type="primary" @click="getsearch(1)" style="margin-left: 20px" icon="el-icon-search" >搜索</el-button>
<el-button icon="el-icon-refresh-right" type="primary" @click="reset"> 重置 </el-button>
<el-button type="primary" @click="addQuestion(1)" style="margin-left: 10px" icon="el-icon-plus"> 添加 </el-button>
<div style="display: inline-block;margin-left: 10px;">
<file-upload
dir="files"
text="导入"
:loading="true"
size="medium"
url="/xboe/m/exam/question/import"
:isShowTip="false"
@success="uploadFile"
@remove="removeFile" >
</file-upload>
<el-col :span="17" style="display:flex;justify-content: space-between;">
<div style="flex: 1;">
<el-button type="primary" @click="getsearch(1)" style="margin-left: 20px" icon="el-icon-search" >搜索</el-button>
<el-button icon="el-icon-refresh-right" type="primary" @click="reset"> 重置 </el-button>
<el-button type="primary" @click="addQuestion(1)" style="margin-left: 10px" icon="el-icon-plus"> 添加 </el-button>
<div style="display: inline-block;margin-left: 10px;">
<file-upload
dir="files"
text="导入"
:loading="true"
size="medium"
url="/xboe/m/exam/question/import"
:isShowTip="false"
@success="uploadFile"
@remove="removeFile" >
</file-upload>
</div>
</div>
<div style="display: inline-block;margin-top: 10px;"><el-link @click="downloadTemplate">下载模板文件</el-link></div>
</el-col>
</el-row>
</el-header>
@@ -380,6 +382,18 @@ export default {
});
},
methods: {
downloadTemplate(){
let fileName = "试题导入模板.xls";
let link = document.createElement('a'); //创建a标签
link.style.display = 'none'; //使其隐藏
link.download = this.webBaseUrl+'/template/test-question-template.xls';
link.setAttribute('target', '_blank');
link.href = this.webBaseUrl+'/template/test-question-template.xls'; //赋予文件下载地址
link.setAttribute('download', fileName); //设置下载属性 以及文件名
document.body.appendChild(link); //a标签插至页面中
link.click(); //强制触发a标签事件
document.body.removeChild(link);
},
uploadFile(file) {
this.loadData(1);
setTimeout(this.$message.warning('请耐心等待片刻,正在导入'), 2000 );

View File

@@ -33,11 +33,14 @@
<div v-if="examStatus==2" style="text-align: center;color:#6d6d6d; ">考试已结束</div>
</div>
<div v-else class="no-text">
<span>您没有需要的考试</span>
<span v-if="noExam">您没有需要的考试</span>
</div>
<div class="re-list" v-if="canExam">
<p>历史记录</p>
<el-table :data="tableData" style="width: 100%">
<div style="height:300px" v-if="loading == 1" v-loading="loading == 1">
</div>
<el-table :data="tableData" style="width: 100%" v-if="loading == 2">
<el-table-column prop="startTime" label="完成时间" width="180"></el-table-column>
<el-table-column prop="score" align="center" label="成绩">
<template slot-scope="scope">
@@ -235,11 +238,13 @@ import { formatSeconds } from '@/utils/datetime.js'
export default {
data() {
return {
loading:0,
toScoreTow,
examId:'',//考试的id
taskId:'',//考试任务的id
lastId:'',//最后一次提交的答卷
canExam:false,//能否参加考试
noExam:false,//不能参加考试
tipText:'',//提示信息
examStatus:0,//0表无1表考试中2表已结束
btnText:'开始考试',
@@ -301,6 +306,9 @@ export default {
apiTestPaper.getTestInfo(this.examId).then(res=>{
if(res.status==200){
this.canExam = res.result.hasTask;
if(!this.canExam) {
this.noExam = true;
}
this.examStatus=res.result.examStatus;
this.testPaper = res.result.exam;
this.taskId=res.result.taskId;
@@ -400,8 +408,10 @@ export default {
})
},
testAnswers(){ //获取当前考试的历史记录
this.loading = 1;
apiTestPaper.myTestAnswers(this.examId).then(res=>{
if(res.status ==200) {
this.loading = 2;
this.tableData = res.result;
let len=res.result.length;
let times=this.testPaper.times? this.testPaper.times:0;
@@ -410,6 +420,7 @@ export default {
this.tipText='已达到允许考试次数上限';
}
}else{
this.loading = 2;
this.$message.error('加载考试记录失败');
}
})

View File

@@ -69,7 +69,7 @@
</span>
</el-dialog>
<el-dialog center custom-class="g-dialog" title="导入人员数据" :close-on-click-modal="false" :visible.sync="importUserShow">
<div style="padding: 10px 0px;color: #009ae7; ">单个导入文件受众成员请勿超过200条记录以员工号为准必须是本系统人员</div>
<div style="padding: 10px 0px;color: #009ae7; ">单个导入文件受众成员请勿超过5000条记录以员工号为准必须是本系统人员</div>
<el-row type="flex" align="middle" justify="start" style="margin-bottom: 10px;">
文件名称<el-input style="width: 200px;" disabled v-model="selectFile"></el-input>
<el-upload

View File

@@ -146,6 +146,7 @@
},
viewDetail(row){
this.$router.push({path:'/manage/viewugroup', query: {id: row.id}})
// this.$router.push({path:'/manage/addaudiences', query: {id: row.id}})
},
jumpRouter(type){
if(type==1){

File diff suppressed because it is too large Load Diff

View File

@@ -252,7 +252,7 @@ export default {
apiQa
.saveAnswer({
qid: this.answer.id,
content: this.answer.inputValue
content: this.answer.inputValue.trim()
})
.then(res => {
if (res.status == 200) {

View File

@@ -313,7 +313,8 @@ export default {
isAppendTime:false,//是否追加学习时长
appentId:'',//当前追加的学习时长的id
appentInterval:30000,//追加学习时间的间隔 30秒加一次
handleTimeout:null
handleTimeout:null,
completed:[],
};
},
mounted() {
@@ -325,6 +326,7 @@ export default {
...mapGetters(['userInfo']),
catalogTree() {
let treeList = [];
this.completed = [];
let $this = this;
$this.sectionList.forEach(sec => {
let treeNode = { section: sec, children: [] };
@@ -338,6 +340,9 @@ export default {
finishCount++;
}
}
if(c.status == 9) {
$this.completed.push(c.id);
}
treeNode.children.push(c);
}
});
@@ -648,8 +653,9 @@ export default {
});
});
//如果没有,就定位第一项内容
if (playIndex == -1) {
this.showRes(this.contentList[0]);
if (playIndex === -1) {
// this.showRes(this.contentList[0]);
this.showRes(this.catalogTree[0].children[0])
} else {
this.showRes(this.contentList[playIndex]);
}
@@ -785,8 +791,9 @@ export default {
//console.log(e);
},
showRes(r,i,index) {//i:子节下标index:章下标
if(i!=undefined && index!=undefined) {
if(i!=undefined && index!=undefined && r.status<9) {
if(this.courseInfo.orderStudy) {
//判断上个是否学完
if(i == 0) {
if(index > 0) { //第一章 第一节
let preCatalog=this.catalogTree[index-1];
@@ -799,9 +806,31 @@ export default {
}else{
let pre=this.catalogTree[index].children[i-1];
if(pre.status!=9){
this.$message.warning('请按顺序学习');
this.$message.warning('请按顺序学习');
return;
}
}
}
//判断是否是第一个未学完的
let isAllow=false;
let has=this.catalogTree.some(treeNode=>{
let hasNo=treeNode.children.some(child=>{
if(child.status<9){
if(child.id==r.id){
isAllow=true;
}
return true;
}else{
return false;
}
});
return hasNo;
});
if(has){
if(!isAllow){
this.$message.warning('请按顺序学习');
return;
}
}
}
}

View File

@@ -26,6 +26,11 @@
}
},
mounted(){
let protocol=window.location.protocol;
let idx=this.fileBaseUrl.indexOf('://');
if(!this.fileBaseUrl.startsWith(protocol)){
this.fileBaseUrl=protocol+this.fileBaseUrl.substring(idx+1);
}
this.loadData();
},
methods:{