mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal
This commit is contained in:
@@ -37,7 +37,7 @@ const formRequest=axios.create({
|
|||||||
//是否需要设置 token
|
//是否需要设置 token
|
||||||
const isToken = (config.headers || {}).isToken === false
|
const isToken = (config.headers || {}).isToken === false
|
||||||
let curToken=getToken();
|
let curToken=getToken();
|
||||||
//curToken='eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkxMDgyMDIsImV4cCI6MTY2OTExNTQwMiwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjAxNTU1M0RELTQ0NUUtNjlENC0zNTFGLUREOUExQTU2NDIwRSIsInVJZCI6Ijk2NTM0MTk5OTY0MzIzNDMwNCIsInBlcm1pc3Npb24iOiIifQ==.152729feaf062a11e0c49dc657ca3f965e82228f818e31dfccd21abf0fb53fab'
|
//curToken='eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NzIzMTE2MTIsImV4cCI6MTY3MjMxODgxMiwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.a4f41376e994c5fcd3ab537ce17572ef4c633863f87785cf7b6ffa353e2ed51c';
|
||||||
if (curToken && !isToken) {
|
if (curToken && !isToken) {
|
||||||
config.headers[TokenName] = curToken // 让每个请求携带自定义token 请根据实际情况自行修改
|
config.headers[TokenName] = curToken // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ const refreshToken = function(token){
|
|||||||
// boe登录
|
// boe登录
|
||||||
const boeLogin = function(token){
|
const boeLogin = function(token){
|
||||||
return ajax.post('/xboe/account/boelogin',{token:token});
|
return ajax.post('/xboe/account/boelogin',{token:token});
|
||||||
|
//登录时,新的用户接口调用查询用户信息
|
||||||
//return ajax.post('/xboe/account/boenewlogin',{token:token});
|
//return ajax.post('/xboe/account/boenewlogin',{token:token});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
this.comTypes.some(ct=>{
|
this.comTypes.some(ct=>{
|
||||||
if(ct.resType==$this.resType){
|
if(ct.resType==$this.resType){
|
||||||
$this.curComType=ct;
|
$this.curComType=ct;
|
||||||
//this.findCourseFile();
|
//this.findCourseFile();//
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div style="text-align: center;padding-top: 10px; overflow-y: auto;">
|
<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="testName" label="试卷"></el-table-column>
|
||||||
<el-table-column prop="sysCreateTime" label="创建时间"></el-table-column>
|
<el-table-column prop="sysCreateTime" label="创建时间"></el-table-column>
|
||||||
<el-table-column prop="sysCreateBy" label="创建人" width="80px" ></el-table-column>
|
<el-table-column prop="sysCreateBy" label="创建人" width="80px" ></el-table-column>
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
{{examInfo.paperType==1? '自定义试卷':'使用考试试卷: '+usePaper.paperName}}
|
{{examInfo.paperType==1? '自定义试卷':'使用考试试卷: '+usePaper.paperName}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="考试时长">
|
<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-col :span="9">
|
||||||
<el-form-item label="及格线">{{examInfo.passLine}}%</el-form-item>
|
<el-form-item label="及格线">{{examInfo.passLine}}%</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -161,6 +161,7 @@
|
|||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
loading:false,
|
loading:false,
|
||||||
|
emptyText:'加载中...',
|
||||||
examChange:{}, //用于保存,检查是否改变
|
examChange:{}, //用于保存,检查是否改变
|
||||||
showTab:0, //显示哪个
|
showTab:0, //显示哪个
|
||||||
onlyQuestion:false, //只显示问题
|
onlyQuestion:false, //只显示问题
|
||||||
@@ -217,7 +218,8 @@
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
reloadExam(){
|
reloadExam(){
|
||||||
console.log('contentId='+this.contentId);
|
//console.log('contentId='+this.contentId);
|
||||||
|
this.emptyText='加载中...';
|
||||||
this.examPaper={items:[]};
|
this.examPaper={items:[]};
|
||||||
this.examInfo.id='';
|
this.examInfo.id='';
|
||||||
this.examInfo.paperType=1;
|
this.examInfo.paperType=1;
|
||||||
@@ -312,9 +314,12 @@
|
|||||||
this.showTab=2;
|
this.showTab=2;
|
||||||
this.examInfo.paperType=2; //选择试卷
|
this.examInfo.paperType=2; //选择试卷
|
||||||
this.examInfo.paperId='';
|
this.examInfo.paperId='';
|
||||||
|
|
||||||
|
this.findExamPapers();
|
||||||
},
|
},
|
||||||
findExamPapers(){ //查询已有的考试试卷
|
findExamPapers(){ //查询已有的考试试卷
|
||||||
this.usePaper.pageIndex=1;
|
this.usePaper.pageIndex=1;
|
||||||
|
this.emptyText='加载中...';
|
||||||
this.loadExamPapers();
|
this.loadExamPapers();
|
||||||
},
|
},
|
||||||
loadExamPapers(){
|
loadExamPapers(){
|
||||||
@@ -331,6 +336,7 @@
|
|||||||
}else{
|
}else{
|
||||||
this.$message.error('查询可用试卷失败');
|
this.$message.error('查询可用试卷失败');
|
||||||
}
|
}
|
||||||
|
this.emptyText='暂无搜索内容';
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changePaperPage(pindex){
|
changePaperPage(pindex){
|
||||||
|
|||||||
@@ -558,12 +558,18 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirmChooseOrg(orgInfo){
|
confirmChooseOrg(orgInfo,parentInfo){
|
||||||
//console.log(orgInfo,'orgInfo');
|
//console.log(orgInfo,'orgInfo');
|
||||||
if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){
|
// let hrbpData=orgInfo;
|
||||||
this.$message.error("此机构无HRBP审核人信息,请重新选择");
|
// if(!orgInfo.hrbpId){
|
||||||
return;
|
// hrbpData=parentInfo;
|
||||||
}
|
// //没有,就直接找此机构的上级,如果没有上线就提示,如果有就不提示
|
||||||
|
|
||||||
|
// }
|
||||||
|
// if(hrbpData && (!hrbpData.hrbpId || hrbpData.hrbpId=='-1')){
|
||||||
|
// this.$message.error("此机构及上级都无HRBP审核人信息,请重新选择");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
this.orgName=orgInfo.name;
|
this.orgName=orgInfo.name;
|
||||||
this.orgKid=orgInfo.kid; //kid已不存在
|
this.orgKid=orgInfo.kid; //kid已不存在
|
||||||
this.courseInfo.orgId=orgInfo.id;
|
this.courseInfo.orgId=orgInfo.id;
|
||||||
@@ -1044,7 +1050,7 @@ export default {
|
|||||||
//设置状态
|
//设置状态
|
||||||
},
|
},
|
||||||
addNewContent(sec) {
|
addNewContent(sec) {
|
||||||
console.log(sec,'sec');
|
//console.log(sec,'sec');
|
||||||
this.resetCurCourseContent();
|
this.resetCurCourseContent();
|
||||||
this.curContent.csectionId = sec.id;
|
this.curContent.csectionId = sec.id;
|
||||||
this.orderValue(sec.id);
|
this.orderValue(sec.id);
|
||||||
|
|||||||
@@ -177,7 +177,7 @@
|
|||||||
//let gen= snowflakeGenerator(512).next().value;
|
//let gen= snowflakeGenerator(512).next().value;
|
||||||
//let qid=snowflakeGenerator(512).next().value;
|
//let qid=snowflakeGenerator(512).next().value;
|
||||||
let qid=this.generator.next().value;
|
let qid=this.generator.next().value;
|
||||||
console.log(qid);
|
//console.log(qid);
|
||||||
let q={
|
let q={
|
||||||
id: qid,
|
id: qid,
|
||||||
type: t,
|
type: t,
|
||||||
|
|||||||
@@ -295,7 +295,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div style="text-align: center;padding-top: 10px; overflow-y: auto;">
|
<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="testName" label="考试名称"></el-table-column>
|
||||||
<el-table-column prop="sysCreateTime" label="创建时间"></el-table-column>
|
<el-table-column prop="sysCreateTime" label="创建时间"></el-table-column>
|
||||||
<el-table-column prop="sysCreateBy" label="创建人" width="80px" ></el-table-column>
|
<el-table-column prop="sysCreateBy" label="创建人" width="80px" ></el-table-column>
|
||||||
@@ -422,7 +422,7 @@
|
|||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="考试时长">
|
<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-col :span="9">
|
||||||
<el-form-item label="尝试次数">{{exam.info.times}}</el-form-item>
|
<el-form-item label="尝试次数">{{exam.info.times}}</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
@@ -705,6 +705,7 @@
|
|||||||
paperName:'',//选择的试卷的名称
|
paperName:'',//选择的试卷的名称
|
||||||
paperJson:{items:[]},
|
paperJson:{items:[]},
|
||||||
},
|
},
|
||||||
|
emptyText:'加载中...',
|
||||||
exam:{
|
exam:{
|
||||||
show:1,
|
show:1,
|
||||||
content:{id:'',contentType:61,sortIndex:3},
|
content:{id:'',contentType:61,sortIndex:3},
|
||||||
@@ -1300,8 +1301,10 @@
|
|||||||
this.exam.show=2;
|
this.exam.show=2;
|
||||||
this.exam.info.paperType=2; //选择试卷
|
this.exam.info.paperType=2; //选择试卷
|
||||||
this.exam.info.paperId='';
|
this.exam.info.paperId='';
|
||||||
|
this.findExamPapers();
|
||||||
},
|
},
|
||||||
findExamPapers(){ //查询已有的考试试卷
|
findExamPapers(){ //查询已有的考试试卷
|
||||||
|
this.emptyText='加载中...';
|
||||||
this.usePaper.pageIndex=1;
|
this.usePaper.pageIndex=1;
|
||||||
this.loadExamPapers();
|
this.loadExamPapers();
|
||||||
},
|
},
|
||||||
@@ -1318,6 +1321,7 @@
|
|||||||
}else{
|
}else{
|
||||||
this.$message.error('查询可用试卷失败');
|
this.$message.error('查询可用试卷失败');
|
||||||
}
|
}
|
||||||
|
this.emptyText='暂无搜索内容';
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changePaperPage(pindex){
|
changePaperPage(pindex){
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 文件个数超出
|
// 文件个数超出
|
||||||
handleExceed(res) {
|
handleExceed(res) {
|
||||||
this.$message({message:`只允许上传单个文件`,type:'error',offset:100});
|
this.$message({message:`一次性最多上传${this.limit}个文件`,type:'error',offset:100});
|
||||||
},
|
},
|
||||||
// 上传失败
|
// 上传失败
|
||||||
handleUploadError(err) {
|
handleUploadError(err) {
|
||||||
@@ -193,16 +193,31 @@ export default {
|
|||||||
this.$message({message:"上传失败, 请重试",type:'error',offset:100});
|
this.$message({message:"上传失败, 请重试",type:'error',offset:100});
|
||||||
},
|
},
|
||||||
// 上传成功回调
|
// 上传成功回调
|
||||||
handleUploadSuccess(res, file) {
|
handleUploadSuccess(res, file,fileList) {
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
this.fileList = [];
|
//this.fileList = [];
|
||||||
|
//console.log(file,'file');
|
||||||
|
//console.log(fileList,'fileList');
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.$message({message:"上传成功",type:'success',offset:100});
|
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 {
|
} else {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.fileList = [];
|
//this.fileList = [];
|
||||||
this.$message({message:"上传失败",type:'error',offset:100});
|
this.$message({message:"上传失败",type:'error',offset:100});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$emit("success", res);
|
this.$emit("success", res);
|
||||||
},
|
},
|
||||||
// 删除文件
|
// 删除文件
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="display: inline-block; vertical-align: top;">
|
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};`">
|
<div slot="error" class="image-slot" :style="`line-height:${height};`">
|
||||||
<i class="el-icon-plus" />
|
<i class="el-icon-plus" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
dlgShow:false,
|
dlgShow:false,
|
||||||
orgName:'',
|
orgName:'',
|
||||||
chooseOrg:{},
|
chooseOrg:{},
|
||||||
|
chooseParent:{},
|
||||||
treeData:[],
|
treeData:[],
|
||||||
departData:[],
|
departData:[],
|
||||||
departProps: {
|
departProps: {
|
||||||
@@ -159,8 +160,11 @@
|
|||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.multipleSelection = val;
|
this.multipleSelection = val;
|
||||||
},
|
},
|
||||||
handleDepartNodeClick(data){
|
handleDepartNodeClick(data,node,element){
|
||||||
this.chooseOrg = data;
|
this.chooseOrg = data;
|
||||||
|
this.chooseParent=node.parent.data;
|
||||||
|
//console.log(node,'node');
|
||||||
|
//console.log(element,'element');
|
||||||
},
|
},
|
||||||
confirm(){
|
confirm(){
|
||||||
if(!this.chooseOrg.id){
|
if(!this.chooseOrg.id){
|
||||||
@@ -168,7 +172,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//this.dlgShow=false;
|
//this.dlgShow=false;
|
||||||
this.$emit('confirm',this.chooseOrg);
|
this.$emit('confirm',this.chooseOrg,this.chooseParent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -415,9 +415,9 @@ export default {
|
|||||||
this.getLastStudy();
|
this.getLastStudy();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.userInfo.loginName,'this.userInfo.loginName');
|
//console.log(this.userInfo.loginName,'this.userInfo.loginName');
|
||||||
let flag=testUser.isTest(this.userInfo.loginName);
|
let flag=testUser.isTest(this.userInfo.loginName);
|
||||||
console.log(flag,'this.isTest22');
|
//console.log(flag,'this.isTest22');
|
||||||
this.isTest=flag;
|
this.isTest=flag;
|
||||||
// if(testUser.isTest(this.userInfo.loginName)){
|
// if(testUser.isTest(this.userInfo.loginName)){
|
||||||
// console.log(this.isTest,'this.isTest');
|
// console.log(this.isTest,'this.isTest');
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<el-select v-model="queryObj.isTop" style="width: 110px;" clearable placeholder="置顶">
|
<el-select v-model="queryObj.isTop" style="width: 110px;" clearable placeholder="置顶">
|
||||||
<el-option label="已置顶" :value="true"></el-option>
|
<el-option label="已置顶" :value="true"></el-option>
|
||||||
<el-option label="未置顶" :value="false"></el-option>
|
<el-option label="未置顶" :value="false"></el-option>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 0px 5px;"><el-input placeholder="关键词搜索" v-model="queryObj.keyWord" @input="inputOn($event)" clearable></el-input></div>
|
<div style="padding: 0px 5px;"><el-input placeholder="关键词搜索" v-model="queryObj.keyWord" @input="inputOn($event)" clearable></el-input></div>
|
||||||
@@ -19,8 +20,7 @@
|
|||||||
<el-button @click="getData(1)" icon="el-icon-search" type="primary" >搜索</el-button>
|
<el-button @click="getData(1)" icon="el-icon-search" type="primary" >搜索</el-button>
|
||||||
<!-- <el-button @click="showRecords()" icon="el-icon-tickets" type="info" >推荐记录</el-button> -->
|
<!-- <el-button @click="showRecords()" icon="el-icon-tickets" type="info" >推荐记录</el-button> -->
|
||||||
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
|
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
|
||||||
<el-checkbox style="margin-left:10px" v-model="queryObj.excellent" @change="getData()">只查看我上传的</el-checkbox>
|
<el-checkbox style="margin-left:10px" v-model="queryObj.excellent" @change="getData()">优秀案例</el-checkbox>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -229,7 +229,7 @@ export default {
|
|||||||
this.queryObj.isTop = '';
|
this.queryObj.isTop = '';
|
||||||
this.queryObj.keyWord = '';
|
this.queryObj.keyWord = '';
|
||||||
this.queryObj.pageIndex = 1;
|
this.queryObj.pageIndex = 1;
|
||||||
this.queryObj.excellent = null;
|
this.queryObj.excellent = '';
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
//获取案例列表数据
|
//获取案例列表数据
|
||||||
@@ -237,17 +237,15 @@ export default {
|
|||||||
if(num === 1) {
|
if(num === 1) {
|
||||||
this.queryObj.pageIndex = 1;
|
this.queryObj.pageIndex = 1;
|
||||||
}
|
}
|
||||||
apiCase
|
if(!this.queryObj.excellent){
|
||||||
.isTopList(this.queryObj)
|
this.queryObj.excellent='';
|
||||||
.then(res => {
|
}
|
||||||
|
apiCase.isTopList(this.queryObj).then(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.count=res.result.count
|
this.count=res.result.count
|
||||||
this.caseList = res.result.list;
|
this.caseList = res.result.list;
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({type: 'error', message: '查询数据失败'});
|
||||||
type: 'error',
|
|
||||||
message: '查询数据失败'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
|||||||
@@ -130,34 +130,43 @@
|
|||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-container>
|
</el-container>
|
||||||
<el-dialog title="上传课件" :close-on-click-modal="false" width="800px" :visible.sync="upload.show" custom-class="g-dialog">
|
<el-dialog title="上传课件" :close-on-click-modal="false" :close-on-press-escape="false" top="10vh" width="800px" :visible.sync="upload.show" :before-close="handleCloseCheck" custom-class="g-dialog">
|
||||||
<div>
|
<div>
|
||||||
<div style="line-height: 30px;">
|
<div style="line-height: 30px;">
|
||||||
<div>请在当前面板选择需要上传的课件</div>
|
<div>请在当前面板选择需要上传的课件</div>
|
||||||
<div style="">提示:课件大小超过1G时,无法上传,请先压缩视频,或剪切成多个再上传。</div>
|
<div style="">提示:课件大小超过1G时,无法上传,请先压缩视频,或剪切成多个再上传。</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div style="display: flex;line-height: 30px;">
|
<div style="display: flex;line-height: 30px;padding: 5px 0px;">
|
||||||
<span style="font-weight: 600;">资源归属:</span>
|
<el-input :readonly="true" placeholder="请选择资源归属" v-model="upload.orgName" style="width: 300px;">
|
||||||
<el-input placeholder="请选择" v-model="upload.orgName" style="width: 300px;">
|
|
||||||
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" size="small" slot="append" icon="el-icon-search">选择</el-button>
|
<el-button v-if="identity==3 || identity==5" @click="showChooseOrg()" size="small" slot="append" icon="el-icon-search">选择</el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
<!-- <el-cascader clearable v-model="projectOwnership" :options="resOwnerListMap" :props="defaultProps" @change="handleChange"></el-cascader> -->
|
<!-- <el-cascader clearable v-model="projectOwnership" :options="resOwnerListMap" :props="defaultProps" @change="handleChange"></el-cascader> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- <div style="margin-top: 10px" v-if="isUpload"><el-button type="primary" size="mini" @click="isUploadHandle()">选择文件并上传</el-button></div> -->
|
<!-- <div style="margin-top: 10px" v-if="isUpload"><el-button type="primary" size="mini" @click="isUploadHandle()">选择文件并上传</el-button></div> -->
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px;margin-bottom: 10px;">
|
||||||
|
<div style="float: right;">
|
||||||
|
<el-checkbox v-model="deviceMobile" @change="isVisible(1)" label="移动端可见" border></el-checkbox>
|
||||||
|
<el-checkbox v-model="devicePc" @change="isVisible(2)" label="pc端可见" border></el-checkbox>
|
||||||
|
</div>
|
||||||
<file-upload scorm="zip" dir="files" :beforeMsg="needOrg" :showList="true" :value="imageShowUrl" :limit="5" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
|
<file-upload scorm="zip" dir="files" :beforeMsg="needOrg" :showList="true" :value="imageShowUrl" :limit="5" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
<el-table border stripe :data="fileList" style="width: 100%" @selection-change="handleSelectionChange">
|
<el-table border stripe :data="fileList" style="width: 100%" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="40"></el-table-column>
|
<!-- <el-table-column type="selection" width="40"></el-table-column> -->
|
||||||
<el-table-column prop="fileName" label="文件名称"></el-table-column>
|
<el-table-column prop="fileName" label="文件名称"></el-table-column>
|
||||||
<el-table-column prop="name" label="课件名称">
|
<el-table-column prop="name" label="课件名称">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input type="text" v-model="scope.row.name"></el-input>
|
<el-input type="text" v-model="scope.row.name"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="resType" label="类型" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ getType(scope.row.resType) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="duration" label="时长(分)" width="100">
|
<el-table-column prop="duration" label="时长(分)" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input type="number" size="small" v-model="scope.row.minute"></el-input>
|
<el-input type="number" size="small" v-model="scope.row.minute"></el-input>
|
||||||
@@ -183,8 +192,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer">
|
<span slot="footer">
|
||||||
<el-button type="infor" @click="isVisible(1)">移动端可见</el-button>
|
<!-- <el-button type="infor" @click="isVisible(1)">移动端可见</el-button>
|
||||||
<el-button type="infor" @click="isVisible(2)">pc端可见</el-button>
|
<el-button type="infor" @click="isVisible(2)">pc端可见</el-button> -->
|
||||||
<el-button type="primary" @click="saveUpload()">保存</el-button>
|
<el-button type="primary" @click="saveUpload()">保存</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -334,9 +343,11 @@ export default {
|
|||||||
orgId:'',
|
orgId:'',
|
||||||
orgName:''
|
orgName:''
|
||||||
},
|
},
|
||||||
needOrg:'请先选择资源归属',
|
needOrg:'',//如果有值,上传前会提示
|
||||||
fileList: [],
|
fileList: [],
|
||||||
courseShow: false,
|
courseShow: false,
|
||||||
|
devicePc:true,
|
||||||
|
deviceMobile:true,
|
||||||
scormUrl:'',//scorm的播放地址
|
scormUrl:'',//scorm的播放地址
|
||||||
multipleSelection: []
|
multipleSelection: []
|
||||||
};
|
};
|
||||||
@@ -363,6 +374,8 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.upload.orgId=this.userInfo.departId;
|
this.upload.orgId=this.userInfo.departId;
|
||||||
|
// this.upload.orgName=this.userInfo.departName;
|
||||||
|
// this.needOrg='';
|
||||||
//console.log(this.upload.orgId,'this.upload.orgId')
|
//console.log(this.upload.orgId,'this.upload.orgId')
|
||||||
if(this.upload.orgId){
|
if(this.upload.orgId){
|
||||||
apiUserBasic.getOrgInfo(this.upload.orgId).then(rs=>{
|
apiUserBasic.getOrgInfo(this.upload.orgId).then(rs=>{
|
||||||
@@ -488,27 +501,39 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
isVisible(num) {
|
isVisible(num) {
|
||||||
let ids = [];
|
var mflag=this.deviceMobile;
|
||||||
this.multipleSelection.forEach(item => {
|
var pflag=this.devicePc;
|
||||||
ids.push(item.id);
|
|
||||||
});
|
|
||||||
//待完善
|
|
||||||
for (let index = 0; index < ids.length; index++) {
|
|
||||||
this.fileList.forEach((item, i) => {
|
this.fileList.forEach((item, i) => {
|
||||||
if (item.id === ids[index]) {
|
|
||||||
if (num === 1) {
|
if (num === 1) {
|
||||||
item.device1 = true;
|
item.device1 = mflag;
|
||||||
this.$set(this.fileList, i, item);
|
this.$set(this.fileList, i, item);
|
||||||
} else {
|
} else {
|
||||||
item.device2 = true;
|
item.device2 = pflag;
|
||||||
this.$set(this.fileList, i, item);
|
this.$set(this.fileList, i, item);
|
||||||
}
|
}
|
||||||
this.$forceUpdate();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
this.$forceUpdate();
|
||||||
|
// let ids = [];
|
||||||
|
// this.multipleSelection.forEach(item => {
|
||||||
|
// ids.push(item.id);
|
||||||
|
// });
|
||||||
|
// //待完善
|
||||||
|
// for (let index = 0; index < ids.length; index++) {
|
||||||
|
// this.fileList.forEach((item, i) => {
|
||||||
|
// if (item.id === ids[index]) {
|
||||||
|
// if (num === 1) {
|
||||||
|
// item.device1 = true;
|
||||||
|
// this.$set(this.fileList, i, item);
|
||||||
|
// } else {
|
||||||
|
// item.device2 = true;
|
||||||
|
// this.$set(this.fileList, i, item);
|
||||||
|
// }
|
||||||
|
// this.$forceUpdate();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
async handleUploadSuccess(rs) {
|
handleUploadSuccess(rs) {
|
||||||
if (rs.status === 200) {
|
if (rs.status === 200) {
|
||||||
let type = toContentType(rs.result.fileType);
|
let type = toContentType(rs.result.fileType);
|
||||||
// ["doc", "xls", "ppt","docx", "xlsx", "pptx","png","txt", "pdf","jpg","gif","bmp","mp4","mp3"]
|
// ["doc", "xls", "ppt","docx", "xlsx", "pptx","png","txt", "pdf","jpg","gif","bmp","mp4","mp3"]
|
||||||
@@ -516,6 +541,7 @@ export default {
|
|||||||
this.$message.error('文件名称请不要超过100个字符');
|
this.$message.error('文件名称请不要超过100个字符');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//console.log('上传文件:'+rs.result.displayName);
|
||||||
const data = {
|
const data = {
|
||||||
orgId:this.upload.orgId,
|
orgId:this.upload.orgId,
|
||||||
orgName:this.upload.orgName,
|
orgName:this.upload.orgName,
|
||||||
@@ -528,30 +554,64 @@ export default {
|
|||||||
resType: type //文件类型,10视频,20音频,30图片, 40 文档,50表图文,60表scrom包,90表其它,
|
resType: type //文件类型,10视频,20音频,30图片, 40 文档,50表图文,60表scrom包,90表其它,
|
||||||
// remark: 备注说明,可以为空,不填
|
// remark: 备注说明,可以为空,不填
|
||||||
};
|
};
|
||||||
try {
|
//try {
|
||||||
const { result, status } = await coueseFile.saveUpload(data);
|
coueseFile.saveUpload(data).then(res=>{
|
||||||
if (status === 200) {
|
if(res.status==200){
|
||||||
result.device1 = true;
|
//console.log('上传文件成功:'+rs.result.displayName);
|
||||||
result.device2 = true;
|
res.result.device1 = true;
|
||||||
result.minute='';
|
res.result.device2 = true;
|
||||||
if(result.duration){
|
res.result.minute='';
|
||||||
result.minute=Math.round(result.duration/60); //四舍五入
|
if(res.result.duration){
|
||||||
|
res.result.minute=Math.round(res.result.duration/60); //四舍五入
|
||||||
}
|
}
|
||||||
|
this.fileList.push(res.result);
|
||||||
this.fileList.push(result);
|
|
||||||
}else{
|
}else{
|
||||||
this.$message.error(error);
|
this.$message.error(res.message);
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
this.$message.error(error);
|
|
||||||
}
|
}
|
||||||
|
}).catch (error=>{
|
||||||
|
console.log(error,'error')
|
||||||
|
//this.$message.error(error);
|
||||||
|
});
|
||||||
|
// const { result, status } = coueseFile.saveUpload(data);
|
||||||
|
// if (status === 200) {
|
||||||
|
// console.log('上传文件成功:'+rs.result.displayName);
|
||||||
|
// result.device1 = true;
|
||||||
|
// result.device2 = true;
|
||||||
|
// result.minute='';
|
||||||
|
// if(result.duration){
|
||||||
|
// result.minute=Math.round(result.duration/60); //四舍五入
|
||||||
|
// }
|
||||||
|
|
||||||
|
// this.fileList.push(result);
|
||||||
|
// } else {
|
||||||
|
// this.$message.error(error);
|
||||||
|
// }
|
||||||
|
//} catch (error) {
|
||||||
|
// this.$message.error(error);
|
||||||
|
//}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(rs.message);
|
this.$message.error(rs.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleRemoveSuccess(res) {},
|
handleRemoveSuccess(res) {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleCloseCheck(done){
|
||||||
|
//console.log('关闭的处理aaaaa');
|
||||||
|
if(this.fileList.length>0){
|
||||||
|
this.$message.error('有待保存的上传文件,请执行保存操作');
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return done(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
// 文件上传保存
|
// 文件上传保存
|
||||||
saveUpload() {
|
saveUpload() {
|
||||||
|
if(!this.upload.orgName){
|
||||||
|
this.$message.success('请选择资源归属');
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.fileList.forEach(item => {
|
this.fileList.forEach(item => {
|
||||||
if (item.device1 === true && item.device2 === true) {
|
if (item.device1 === true && item.device2 === true) {
|
||||||
item.device = 3;
|
item.device = 3;
|
||||||
@@ -570,6 +630,7 @@ export default {
|
|||||||
coueseFile.batchUpdate(this.fileList).then(rs => {
|
coueseFile.batchUpdate(this.fileList).then(rs => {
|
||||||
if (rs.status === 200) {
|
if (rs.status === 200) {
|
||||||
this.$message.success('保存成功');
|
this.$message.success('保存成功');
|
||||||
|
this.fileList=[];
|
||||||
this.getSearch();
|
this.getSearch();
|
||||||
this.upload.show = false;
|
this.upload.show = false;
|
||||||
} else {
|
} else {
|
||||||
@@ -698,9 +759,6 @@ export default {
|
|||||||
this.coursewareShow = true;
|
this.coursewareShow = true;
|
||||||
this.videoPathUrl = row.pathUrl;
|
this.videoPathUrl = row.pathUrl;
|
||||||
},
|
},
|
||||||
handleNodeClick(data) {
|
|
||||||
console.log(data);
|
|
||||||
},
|
|
||||||
viewTopic(row) {
|
viewTopic(row) {
|
||||||
this.fileInfo = row;//这里的fileInfo 相当于内容对象
|
this.fileInfo = row;//这里的fileInfo 相当于内容对象
|
||||||
if(row.resType==50){
|
if(row.resType==50){
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<p style="line-height:30px;text-align: center;">{{showMessage}}</p>
|
<p style="line-height:30px;text-align: center;">{{showMessage}}</p>
|
||||||
|
|
||||||
|
|
||||||
<!-- 临时增加,上线一段时间后删除 开始 -->
|
<!-- 临时增加,上线一段时间后删除 开始
|
||||||
<div class="msg-list">
|
<div class="msg-list">
|
||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);">
|
||||||
<div class="msg-top">
|
<div class="msg-top">
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<div class="msg-time">2022-10-20 10:21:50</div>
|
<div class="msg-time">2022-10-20 10:21:50</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- 临时增加,上线一段时间后删除 结束 -->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<div class="msg-list">
|
<div class="msg-list">
|
||||||
@@ -48,9 +48,24 @@
|
|||||||
<div class="msg-top">
|
<div class="msg-top">
|
||||||
<div>
|
<div>
|
||||||
<span style="padding-right: 10px;"><el-checkbox disabled></el-checkbox></span>
|
<span style="padding-right: 10px;"><el-checkbox disabled></el-checkbox></span>
|
||||||
<!-- <router-link to="../../user/Myresearch.vue" > -->
|
<span @click="showMsgDg()">系统消息</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="msg-body" @click="dialogMsgVisible=true">
|
||||||
|
<div class="msg-body-content">新功能说明</div>
|
||||||
|
</div>
|
||||||
|
<div class="msg-time">2022-12-30 11:23:33</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<div class="msg-list">
|
||||||
|
<a href="javascript:void(0);">
|
||||||
|
<div class="msg-top">
|
||||||
|
<div>
|
||||||
|
<span style="padding-right: 10px;"><el-checkbox disabled></el-checkbox></span>
|
||||||
<span @click="jumResearch()">系统消息</span>
|
<span @click="jumResearch()">系统消息</span>
|
||||||
<!-- </router-link> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="msg-body" @click="jumResearch()">
|
<div class="msg-body" @click="jumResearch()">
|
||||||
@@ -59,6 +74,9 @@
|
|||||||
<div class="msg-time">2022-11-23 12:40:50</div>
|
<div class="msg-time">2022-11-23 12:40:50</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="msg-list" v-for="(item, index) in data" :key="index">
|
<div class="msg-list" v-for="(item, index) in data" :key="index">
|
||||||
|
|
||||||
@@ -99,7 +117,43 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <portal-footer></portal-footer> -->
|
<!-- <portal-footer></portal-footer> -->
|
||||||
<guide-box ref="guide"></guide-box> <!-- 引导页 -->
|
<guide-box ref="guide"></guide-box> <!-- 引导页 -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 对话框 -->
|
||||||
|
<el-dialog :visible.sync="dialogMsgVisible" title="新功能说明" width="30%" append-to-body>
|
||||||
|
<div>
|
||||||
|
教师端:<br/>
|
||||||
|
1、支持个人授课记录/案例记录查询<br/>
|
||||||
|
2、支持个人修改/完善教师介绍并在个人主页中展示<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
管理员端:<br/>
|
||||||
|
1、新增学习路径图功能<br/>
|
||||||
|
2、新增学习项目功能<br/>
|
||||||
|
3、新增课程库功能<br/>
|
||||||
|
4、升级案例管理(设置优秀案例等)<br/>
|
||||||
|
5、升级考试功能(试题及提干支持图片,修改已发布考试的部分信息等)<br/>
|
||||||
|
6、课件支持 Scorm 格式<br/>
|
||||||
|
及上述功能配套的学员端功能<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
我们会在1月份提供线上操作培训及详细的使用手册,便于大家熟悉和使用新增功能。
|
||||||
</div>
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="dialogMsgVisible = false" type="primary">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -120,6 +174,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dialogMsgVisible:false,
|
||||||
queryData: {
|
queryData: {
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 6,
|
pageSize: 6,
|
||||||
@@ -154,6 +209,9 @@ export default {
|
|||||||
this.isReadChooseList();
|
this.isReadChooseList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showMsgDg(){
|
||||||
|
this.dialogMsgVisible = true;
|
||||||
|
},
|
||||||
jumResearch(){
|
jumResearch(){
|
||||||
this.$router.push('/user/research');
|
this.$router.push('/user/research');
|
||||||
// return this.webBaseUrl + '/src/views/user/myResearch.vue';
|
// return this.webBaseUrl + '/src/views/user/myResearch.vue';
|
||||||
|
|||||||
@@ -394,7 +394,6 @@
|
|||||||
Teacherinfo(){
|
Teacherinfo(){
|
||||||
this.workname=[];
|
this.workname=[];
|
||||||
this.checkboxtearGroup=[];
|
this.checkboxtearGroup=[];
|
||||||
|
|
||||||
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
|
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
|
||||||
if(res.result.courses){
|
if(res.result.courses){
|
||||||
this.teachform.courses = res.result.courses;
|
this.teachform.courses = res.result.courses;
|
||||||
@@ -409,13 +408,13 @@
|
|||||||
|
|
||||||
apiBoeTeahcer.simpleInfo(this.userInfo.sysId).then(sinfo=>{
|
apiBoeTeahcer.simpleInfo(this.userInfo.sysId).then(sinfo=>{
|
||||||
if(sinfo.status=='200'){
|
if(sinfo.status=='200'){
|
||||||
if(sinfo.result.courses){
|
if(!this.teachform.courses){
|
||||||
this.teachform.courses = sinfo.result.courses;
|
this.teachform.courses = sinfo.result.courses;
|
||||||
}
|
}
|
||||||
if(sinfo.result.work){
|
if(!this.teachform.workExperience){
|
||||||
this.teachform.workExperience = sinfo.result.work;
|
this.teachform.workExperience = sinfo.result.work;
|
||||||
}
|
}
|
||||||
if(sinfo.result.photo){
|
if(!this.teachform.photo){
|
||||||
this.teachform.photo = sinfo.result.photo;
|
this.teachform.photo = sinfo.result.photo;
|
||||||
this.tearchUrl = this.fileBaseUrl + sinfo.result.photo;
|
this.tearchUrl = this.fileBaseUrl + sinfo.result.photo;
|
||||||
}
|
}
|
||||||
@@ -537,7 +536,7 @@
|
|||||||
//console.log('编辑成功')
|
//console.log('编辑成功')
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.Edittearch = true;
|
this.Edittearch = true;
|
||||||
this.Teacherinfo();
|
//this.Teacherinfo();
|
||||||
//更新远程
|
//更新远程
|
||||||
let simpleData={
|
let simpleData={
|
||||||
teacher_user_id:this.userInfo.sysId,
|
teacher_user_id:this.userInfo.sysId,
|
||||||
@@ -553,6 +552,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
this.$message.error(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -615,10 +616,12 @@
|
|||||||
this.tearchUrl= res.result.httpPath;
|
this.tearchUrl= res.result.httpPath;
|
||||||
},
|
},
|
||||||
removetearchHandle(){
|
removetearchHandle(){
|
||||||
this.avatarUrl='';
|
//this.$message.error('移除图片');
|
||||||
|
this.tearchUrl='';
|
||||||
this.teachform.photo = '';
|
this.teachform.photo = '';
|
||||||
},
|
},
|
||||||
removeHandle(){
|
removeHandle(){
|
||||||
|
|
||||||
this.avatarUrl='';
|
this.avatarUrl='';
|
||||||
this.form.account.avatar = '';
|
this.form.account.avatar = '';
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user