mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-17 06:46:43 +08:00
Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal
This commit is contained in:
@@ -122,7 +122,7 @@
|
||||
this.comTypes.some(ct=>{
|
||||
if(ct.resType==$this.resType){
|
||||
$this.curComType=ct;
|
||||
//this.findCourseFile();
|
||||
//this.findCourseFile();//
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<div style="text-align: center;padding-top: 10px; overflow-y: auto;">
|
||||
<el-table style="100%" height="480" :data="usePaper.list" border stripe>
|
||||
<el-table :empty-text="emptyText" style="100%" height="480" :data="usePaper.list" border stripe>
|
||||
<el-table-column prop="testName" label="试卷"></el-table-column>
|
||||
<el-table-column prop="sysCreateTime" label="创建时间"></el-table-column>
|
||||
<el-table-column prop="sysCreateBy" label="创建人" width="80px" ></el-table-column>
|
||||
@@ -105,7 +105,7 @@
|
||||
{{examInfo.paperType==1? '自定义试卷':'使用考试试卷: '+usePaper.paperName}}
|
||||
</el-form-item>
|
||||
<el-form-item label="考试时长">
|
||||
<el-col :span="6">{{examInfo.passScore}}分钟</el-col>
|
||||
<el-col :span="6">{{examInfo.testDuration}}分钟</el-col>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="及格线">{{examInfo.passLine}}%</el-form-item>
|
||||
</el-col>
|
||||
@@ -161,6 +161,7 @@
|
||||
data(){
|
||||
return {
|
||||
loading:false,
|
||||
emptyText:'加载中...',
|
||||
examChange:{}, //用于保存,检查是否改变
|
||||
showTab:0, //显示哪个
|
||||
onlyQuestion:false, //只显示问题
|
||||
@@ -217,7 +218,8 @@
|
||||
},
|
||||
methods:{
|
||||
reloadExam(){
|
||||
console.log('contentId='+this.contentId);
|
||||
//console.log('contentId='+this.contentId);
|
||||
this.emptyText='加载中...';
|
||||
this.examPaper={items:[]};
|
||||
this.examInfo.id='';
|
||||
this.examInfo.paperType=1;
|
||||
@@ -312,9 +314,12 @@
|
||||
this.showTab=2;
|
||||
this.examInfo.paperType=2; //选择试卷
|
||||
this.examInfo.paperId='';
|
||||
|
||||
this.findExamPapers();
|
||||
},
|
||||
findExamPapers(){ //查询已有的考试试卷
|
||||
this.usePaper.pageIndex=1;
|
||||
this.emptyText='加载中...';
|
||||
this.loadExamPapers();
|
||||
},
|
||||
loadExamPapers(){
|
||||
@@ -323,7 +328,7 @@
|
||||
pageSize:this.usePaper.pageSize,
|
||||
keyWord:this.usePaper.keyword
|
||||
}
|
||||
|
||||
|
||||
apiExamPaper.querylist(pars).then(rs=>{
|
||||
if(rs.status==200){
|
||||
this.usePaper.list=rs.result.list;
|
||||
@@ -331,6 +336,7 @@
|
||||
}else{
|
||||
this.$message.error('查询可用试卷失败');
|
||||
}
|
||||
this.emptyText='暂无搜索内容';
|
||||
})
|
||||
},
|
||||
changePaperPage(pindex){
|
||||
|
||||
@@ -558,12 +558,18 @@ export default {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
confirmChooseOrg(orgInfo){
|
||||
confirmChooseOrg(orgInfo,parentInfo){
|
||||
//console.log(orgInfo,'orgInfo');
|
||||
if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){
|
||||
this.$message.error("此机构无HRBP审核人信息,请重新选择");
|
||||
return;
|
||||
}
|
||||
// let hrbpData=orgInfo;
|
||||
// if(!orgInfo.hrbpId){
|
||||
// hrbpData=parentInfo;
|
||||
// //没有,就直接找此机构的上级,如果没有上线就提示,如果有就不提示
|
||||
|
||||
// }
|
||||
// if(hrbpData && (!hrbpData.hrbpId || hrbpData.hrbpId=='-1')){
|
||||
// this.$message.error("此机构及上级都无HRBP审核人信息,请重新选择");
|
||||
// return;
|
||||
// }
|
||||
this.orgName=orgInfo.name;
|
||||
this.orgKid=orgInfo.kid; //kid已不存在
|
||||
this.courseInfo.orgId=orgInfo.id;
|
||||
@@ -1044,7 +1050,7 @@ export default {
|
||||
//设置状态
|
||||
},
|
||||
addNewContent(sec) {
|
||||
console.log(sec,'sec');
|
||||
//console.log(sec,'sec');
|
||||
this.resetCurCourseContent();
|
||||
this.curContent.csectionId = sec.id;
|
||||
this.orderValue(sec.id);
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
//let gen= snowflakeGenerator(512).next().value;
|
||||
//let qid=snowflakeGenerator(512).next().value;
|
||||
let qid=this.generator.next().value;
|
||||
console.log(qid);
|
||||
//console.log(qid);
|
||||
let q={
|
||||
id: qid,
|
||||
type: t,
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<div style="text-align: center;padding-top: 10px; overflow-y: auto;">
|
||||
<el-table style="100%" height="480" :data="usePaper.list" border stripe>
|
||||
<el-table :empty-text="emptyText" style="100%" height="480" :data="usePaper.list" border stripe>
|
||||
<el-table-column prop="testName" label="考试名称"></el-table-column>
|
||||
<el-table-column prop="sysCreateTime" label="创建时间"></el-table-column>
|
||||
<el-table-column prop="sysCreateBy" label="创建人" width="80px" ></el-table-column>
|
||||
@@ -422,7 +422,7 @@
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="考试时长">
|
||||
<el-col :span="6">{{exam.info.passScore}}分钟</el-col>
|
||||
<el-col :span="6">{{exam.info.testDuration}}分钟</el-col>
|
||||
<!-- <el-col :span="9">
|
||||
<el-form-item label="尝试次数">{{exam.info.times}}</el-form-item>
|
||||
</el-col> -->
|
||||
@@ -705,6 +705,7 @@
|
||||
paperName:'',//选择的试卷的名称
|
||||
paperJson:{items:[]},
|
||||
},
|
||||
emptyText:'加载中...',
|
||||
exam:{
|
||||
show:1,
|
||||
content:{id:'',contentType:61,sortIndex:3},
|
||||
@@ -1300,8 +1301,10 @@
|
||||
this.exam.show=2;
|
||||
this.exam.info.paperType=2; //选择试卷
|
||||
this.exam.info.paperId='';
|
||||
this.findExamPapers();
|
||||
},
|
||||
findExamPapers(){ //查询已有的考试试卷
|
||||
this.emptyText='加载中...';
|
||||
this.usePaper.pageIndex=1;
|
||||
this.loadExamPapers();
|
||||
},
|
||||
@@ -1318,6 +1321,7 @@
|
||||
}else{
|
||||
this.$message.error('查询可用试卷失败');
|
||||
}
|
||||
this.emptyText='暂无搜索内容';
|
||||
})
|
||||
},
|
||||
changePaperPage(pindex){
|
||||
|
||||
@@ -185,7 +185,7 @@ export default {
|
||||
},
|
||||
// 文件个数超出
|
||||
handleExceed(res) {
|
||||
this.$message({message:`只允许上传单个文件`,type:'error',offset:100});
|
||||
this.$message({message:`一次性最多上传${this.limit}个文件`,type:'error',offset:100});
|
||||
},
|
||||
// 上传失败
|
||||
handleUploadError(err) {
|
||||
@@ -193,16 +193,31 @@ export default {
|
||||
this.$message({message:"上传失败, 请重试",type:'error',offset:100});
|
||||
},
|
||||
// 上传成功回调
|
||||
handleUploadSuccess(res, file) {
|
||||
handleUploadSuccess(res, file,fileList) {
|
||||
if(res.status == 200) {
|
||||
this.fileList = [];
|
||||
//this.fileList = [];
|
||||
//console.log(file,'file');
|
||||
//console.log(fileList,'fileList');
|
||||
this.isLoading = false;
|
||||
this.$message({message:"上传成功",type:'success',offset:100});
|
||||
let delIdx=-1;
|
||||
fileList.some((fl,flIndx)=>{
|
||||
if(fl.uid==file.uid){
|
||||
delIdx=flIndx;
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if(delIdx>-1){
|
||||
fileList.splice(delIdx,1);
|
||||
}
|
||||
} else {
|
||||
this.isLoading = false;
|
||||
this.fileList = [];
|
||||
//this.fileList = [];
|
||||
this.$message({message:"上传失败",type:'error',offset:100});
|
||||
}
|
||||
|
||||
this.$emit("success", res);
|
||||
},
|
||||
// 删除文件
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="component-upload-image" :style="`width:${width};height:${height};`">
|
||||
<div class="component-upload-image" :style="`width:${width};height:${height};`">
|
||||
<el-upload
|
||||
:action="uploadImgUrl"
|
||||
class="image-upload"
|
||||
@@ -15,8 +15,8 @@
|
||||
:show-file-list="false"
|
||||
:headers="headers"
|
||||
style="display: inline-block; vertical-align: top;">
|
||||
|
||||
<el-image v-if="!value" :src="value" :style="`width:${width};height:${height};`">
|
||||
|
||||
<el-image v-if="!value" :style="`width:${width};height:${height};`"> -->
|
||||
<div slot="error" class="image-slot" :style="`line-height:${height};`">
|
||||
<i class="el-icon-plus" />
|
||||
</div>
|
||||
@@ -133,7 +133,7 @@ export default {
|
||||
}else if(that.endWith(this.fileSizeLimit,"KB")){
|
||||
sizeLimt = size * 1024;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sizeLimt > 0 && file.size > sizeLimt) {
|
||||
that.$message.error("图片不能超过"+this.fileSizeLimit+",请重新上传!")
|
||||
@@ -152,7 +152,7 @@ export default {
|
||||
}
|
||||
}
|
||||
resolve(file)
|
||||
})
|
||||
})
|
||||
},
|
||||
handleUploadError() {
|
||||
this.$message({
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
dlgShow:false,
|
||||
orgName:'',
|
||||
chooseOrg:{},
|
||||
chooseParent:{},
|
||||
treeData:[],
|
||||
departData:[],
|
||||
departProps: {
|
||||
@@ -122,7 +123,7 @@
|
||||
});
|
||||
}else{
|
||||
parentId = node.data.id;
|
||||
|
||||
|
||||
apiUserBasic.getOrgInfo(parentId).then(rs=>{
|
||||
if(rs.status==200){
|
||||
let treeList=[];
|
||||
@@ -159,8 +160,11 @@
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
handleDepartNodeClick(data){
|
||||
handleDepartNodeClick(data,node,element){
|
||||
this.chooseOrg = data;
|
||||
this.chooseParent=node.parent.data;
|
||||
//console.log(node,'node');
|
||||
//console.log(element,'element');
|
||||
},
|
||||
confirm(){
|
||||
if(!this.chooseOrg.id){
|
||||
@@ -168,7 +172,7 @@
|
||||
return;
|
||||
}
|
||||
//this.dlgShow=false;
|
||||
this.$emit('confirm',this.chooseOrg);
|
||||
this.$emit('confirm',this.chooseOrg,this.chooseParent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,9 +415,9 @@ export default {
|
||||
this.getLastStudy();
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.userInfo.loginName,'this.userInfo.loginName');
|
||||
//console.log(this.userInfo.loginName,'this.userInfo.loginName');
|
||||
let flag=testUser.isTest(this.userInfo.loginName);
|
||||
console.log(flag,'this.isTest22');
|
||||
//console.log(flag,'this.isTest22');
|
||||
this.isTest=flag;
|
||||
// if(testUser.isTest(this.userInfo.loginName)){
|
||||
// console.log(this.isTest,'this.isTest');
|
||||
|
||||
Reference in New Issue
Block a user