mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 20:36:43 +08:00
解决冲突
This commit is contained in:
@@ -253,6 +253,7 @@ import apiCourseFile from '@/api/modules/courseFile.js';
|
|||||||
import filecloud from '@/components/FileCloud/index.vue';
|
import filecloud from '@/components/FileCloud/index.vue';
|
||||||
import { mapGetters, mapActions } from "vuex";
|
import { mapGetters, mapActions } from "vuex";
|
||||||
import chooseOrg from '@/components/System/chooseOrg.vue';
|
import chooseOrg from '@/components/System/chooseOrg.vue';
|
||||||
|
import apiUserBasic from '../../api/boe/userbasic.js';
|
||||||
// import hyperLink from '@/components/Course/hyperLink.vue';
|
// import hyperLink from '@/components/Course/hyperLink.vue';
|
||||||
export default {
|
export default {
|
||||||
name: "auditCourse1",
|
name: "auditCourse1",
|
||||||
@@ -586,7 +587,7 @@ export default {
|
|||||||
this.courseCoverurl = "";
|
this.courseCoverurl = "";
|
||||||
this.courseInfo.coverImg = "";
|
this.courseInfo.coverImg = "";
|
||||||
},
|
},
|
||||||
getDetail() {
|
getDetail(){
|
||||||
let $this = this;
|
let $this = this;
|
||||||
apiCoursePortal.detail(this.id,true).then(rs => {
|
apiCoursePortal.detail(this.id,true).then(rs => {
|
||||||
if (rs.status == 200) {
|
if (rs.status == 200) {
|
||||||
@@ -594,23 +595,37 @@ export default {
|
|||||||
//加载所属机构名称
|
//加载所属机构名称
|
||||||
this.orgKid='';
|
this.orgKid='';
|
||||||
if(this.courseInfo.orgId){
|
if(this.courseInfo.orgId){
|
||||||
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rrs=>{
|
||||||
if(rrs.status==200){
|
if(rs.status==200){
|
||||||
this.orgName=rrs.result.name;
|
this.orgName=rrs.result.name;
|
||||||
this.orgKid=rrs.result.kid;
|
//this.orgKid=rrs.result.kid;
|
||||||
|
//this.orgNamePath=rrs.result.namePath;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
// apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
||||||
|
// if(rrs.status==200){
|
||||||
|
// this.orgName=rrs.result.name;
|
||||||
|
// this.orgKid=rrs.result.kid;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
}else{
|
}else{
|
||||||
//根据课程创建者获取机构id
|
//根据课程创建者获取机构id
|
||||||
apiUser.getOrgSimpleByUserId(this.courseInfo.sysCreateAid).then(ors=>{
|
apiUser.getOrgSimpleByUserId(this.courseInfo.sysCreateAid).then(ors=>{
|
||||||
if(ors.status==200){
|
if(ors.status==200){
|
||||||
$this.courseInfo.orgId=ors.result.id;
|
$this.courseInfo.orgId=ors.result.id;
|
||||||
apiOrg.getSimple(ors.result.id).then(rrs=>{
|
apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
|
||||||
if(rrs.status==200){
|
if(rs.status==200){
|
||||||
$this.orgName=rrs.result.name;
|
$this.orgName=rrs.result.name;
|
||||||
$this.orgKid=rrs.result.kid;
|
//this.orgKid=rrs.result.kid;
|
||||||
|
//$this.orgNamePath=rrs.result.namePath;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
// apiOrg.getSimple(ors.result.id).then(rrs=>{
|
||||||
|
// if(rrs.status==200){
|
||||||
|
// $this.orgName=rrs.result.name;
|
||||||
|
// $this.orgKid=rrs.result.kid;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
}else{
|
}else{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ import { mapGetters,mapActions} from 'vuex';
|
|||||||
import hyperLink from '@/components/Course/hyperLink.vue';
|
import hyperLink from '@/components/Course/hyperLink.vue';
|
||||||
import apiCourseFile from '../../api/modules/courseFile.js';
|
import apiCourseFile from '../../api/modules/courseFile.js';
|
||||||
import filecloud from '@/components/FileCloud/index.vue';
|
import filecloud from '@/components/FileCloud/index.vue';
|
||||||
|
import apiUserBasic from '../../api/boe/userbasic.js';
|
||||||
export default {
|
export default {
|
||||||
name:"auditCourse2",
|
name:"auditCourse2",
|
||||||
components: {
|
components: {
|
||||||
@@ -634,23 +635,38 @@ export default {
|
|||||||
//加载所属机构名称
|
//加载所属机构名称
|
||||||
this.orgKid='';
|
this.orgKid='';
|
||||||
if(this.courseInfo.orgId){
|
if(this.courseInfo.orgId){
|
||||||
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rrs=>{
|
||||||
if(rrs.status==200){
|
if(rs.status==200){
|
||||||
this.orgName=rrs.result.name;
|
this.orgName=rrs.result.name;
|
||||||
this.orgKid=rrs.result.kid;
|
//this.orgKid=rrs.result.kid;
|
||||||
|
//this.orgNamePath=rrs.result.namePath;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
// apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
||||||
|
// if(rrs.status==200){
|
||||||
|
// this.orgName=rrs.result.name;
|
||||||
|
// this.orgKid=rrs.result.kid;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
}else{
|
}else{
|
||||||
//根据课程创建者获取机构id
|
//根据课程创建者获取机构id
|
||||||
apiUser.getOrgSimpleByUserId(this.courseInfo.sysCreateAid).then(ors=>{
|
apiUser.getOrgSimpleByUserId(this.courseInfo.sysCreateAid).then(ors=>{
|
||||||
if(ors.status==200){
|
if(ors.status==200){
|
||||||
$this.courseInfo.orgId=ors.result.id;
|
$this.courseInfo.orgId=ors.result.id;
|
||||||
apiOrg.getSimple(ors.result.id).then(rrs=>{
|
|
||||||
if(rrs.status==200){
|
apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
|
||||||
|
if(rs.status==200){
|
||||||
$this.orgName=rrs.result.name;
|
$this.orgName=rrs.result.name;
|
||||||
$this.orgKid=rrs.result.kid;
|
//this.orgKid=rrs.result.kid;
|
||||||
|
//$this.orgNamePath=rrs.result.namePath;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
// apiOrg.getSimple(ors.result.id).then(rrs=>{
|
||||||
|
// if(rrs.status==200){
|
||||||
|
// $this.orgName=rrs.result.name;
|
||||||
|
// $this.orgKid=rrs.result.kid;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
}else{
|
}else{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -598,32 +598,32 @@ export default {
|
|||||||
}),
|
}),
|
||||||
loadUserGroup(){
|
loadUserGroup(){
|
||||||
let $this=this;
|
let $this=this;
|
||||||
// apiUserGroup.findByName('').then(rs=>{
|
apiUserGroup.findByName('').then(rs=>{
|
||||||
// if(rs.status==200){
|
|
||||||
// let crowdList=[];
|
|
||||||
// rs.result.forEach(item=>{
|
|
||||||
// crowdList.push({
|
|
||||||
// id:item.key,
|
|
||||||
// name:item.value,
|
|
||||||
// disabled:false
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// this.userGroupList=crowdList;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
apiUserBasic.getUserCrowds().then(rs=>{
|
|
||||||
if(rs.status==200){
|
if(rs.status==200){
|
||||||
let crowdList=[];
|
let crowdList=[];
|
||||||
rs.result.forEach(item=>{
|
rs.result.forEach(item=>{
|
||||||
crowdList.push({
|
crowdList.push({
|
||||||
id:item.kid,
|
id:item.key,
|
||||||
name:item.audienceName,
|
name:item.value,
|
||||||
disabled:false
|
disabled:false
|
||||||
})
|
})
|
||||||
});
|
})
|
||||||
this.userGroupList=crowdList;
|
this.userGroupList=crowdList;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
// apiUserBasic.getUserCrowds().then(rs=>{
|
||||||
|
// if(rs.status==200){
|
||||||
|
// let crowdList=[];
|
||||||
|
// rs.result.forEach(item=>{
|
||||||
|
// crowdList.push({
|
||||||
|
// id:item.kid,
|
||||||
|
// name:item.audienceName,
|
||||||
|
// disabled:false
|
||||||
|
// })
|
||||||
|
// });
|
||||||
|
// this.userGroupList=crowdList;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
resOwnerName(code) {
|
resOwnerName(code) {
|
||||||
if (code == '') {
|
if (code == '') {
|
||||||
@@ -839,6 +839,13 @@ export default {
|
|||||||
apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{
|
apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{
|
||||||
if(ors.status==200){
|
if(ors.status==200){
|
||||||
$this.courseInfo.orgId=ors.result.id;
|
$this.courseInfo.orgId=ors.result.id;
|
||||||
|
// apiOrg.getSimple(ors.result.id).then(rrs=>{
|
||||||
|
// if(rrs.status==200){
|
||||||
|
// $this.orgName=rrs.result.name;
|
||||||
|
// $this.orgKid=rrs.result.kid;
|
||||||
|
// $this.orgNamePath=rrs.result.namePath;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
|
apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
|
||||||
if(rrs.status==200){
|
if(rrs.status==200){
|
||||||
$this.orgName=rrs.result.name;
|
$this.orgName=rrs.result.name;
|
||||||
@@ -1404,7 +1411,6 @@ export default {
|
|||||||
//console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
|
//console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
|
||||||
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
|
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
|
||||||
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
|
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
|
||||||
|
|
||||||
if(rs.status==200 && rs.result){
|
if(rs.status==200 && rs.result){
|
||||||
postData.auditUser={
|
postData.auditUser={
|
||||||
email:rs.result.email,
|
email:rs.result.email,
|
||||||
|
|||||||
@@ -278,6 +278,7 @@ export default {
|
|||||||
this.total=paper.items.length;
|
this.total=paper.items.length;
|
||||||
this.paper =paper;
|
this.paper =paper;
|
||||||
//console.log(this.paper);
|
//console.log(this.paper);
|
||||||
|
|
||||||
this.curItem=paper.items[this.curIndex];
|
this.curItem=paper.items[this.curIndex];
|
||||||
this.startTime=new Date();//记录开始时间
|
this.startTime=new Date();//记录开始时间
|
||||||
this.timerValue=this.info.testDuration;
|
this.timerValue=this.info.testDuration;
|
||||||
@@ -335,12 +336,12 @@ export default {
|
|||||||
showClose:false,
|
showClose:false,
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.submitTest()
|
this.submitTest(score);
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
|
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.submitTest()
|
this.submitTest(score);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
countTest(){ //计算考试的分数
|
countTest(){ //计算考试的分数
|
||||||
@@ -382,11 +383,20 @@ export default {
|
|||||||
noAnswers.push(idx+1);
|
noAnswers.push(idx+1);
|
||||||
}
|
}
|
||||||
let allRight = true;
|
let allRight = true;
|
||||||
|
//console.log('用户的答案',item.userAnswer);
|
||||||
item.options.forEach(it =>{
|
item.options.forEach(it =>{
|
||||||
if(it.answer && item.userAnswer.indexOf(it.id)==-1) {
|
//console.log('选项',it.answer,it.id,item.userAnswer.indexOf(it.id));
|
||||||
|
if(it.answer){ //正确答案
|
||||||
|
if(item.userAnswer.indexOf(it.id)==-1){
|
||||||
allRight=false;
|
allRight=false;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
if(item.userAnswer.indexOf(it.id)>-1){
|
||||||
|
allRight=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
//console.log('是否回答正确',allRight)
|
||||||
if(allRight){
|
if(allRight){
|
||||||
scoreNum+=item.score;
|
scoreNum+=item.score;
|
||||||
}
|
}
|
||||||
@@ -404,14 +414,15 @@ export default {
|
|||||||
//console.log('本次得分='+this.lastScore);
|
//console.log('本次得分='+this.lastScore);
|
||||||
return this.lastScore;
|
return this.lastScore;
|
||||||
},
|
},
|
||||||
submitTest(){ //提交处理
|
submitTest(testScore){ //提交处理
|
||||||
//清空提示
|
//清空提示
|
||||||
if(this.timer){
|
if(this.timer){
|
||||||
window.clearInterval(this.timer);
|
window.clearInterval(this.timer);
|
||||||
}
|
}
|
||||||
let now=new Date();
|
let now=new Date();
|
||||||
let testScore=this.countTest();
|
if(!testScore){
|
||||||
|
testScore=this.countTest();
|
||||||
|
}
|
||||||
let postData={
|
let postData={
|
||||||
studyId:this.studyId,//
|
studyId:this.studyId,//
|
||||||
studyItemId:this.studyItemId,//前面已经给了
|
studyItemId:this.studyItemId,//前面已经给了
|
||||||
@@ -423,7 +434,7 @@ export default {
|
|||||||
arrange:this.info.arrange,
|
arrange:this.info.arrange,
|
||||||
passLine:this.info.passLine,
|
passLine:this.info.passLine,
|
||||||
randomMode:this.info.randomMode,
|
randomMode:this.info.randomMode,
|
||||||
score:this.lastScore,//分数需要计算,在检查是否填写完整性时就可以计算出分数
|
score:testScore,
|
||||||
paperJson:JSON.stringify(this.paper),//原来是对象,这里要也要对象
|
paperJson:JSON.stringify(this.paper),//原来是对象,这里要也要对象
|
||||||
//startTime:formatDate(this.startTime),//此时间需要格式化,格式化时间可以放在util中
|
//startTime:formatDate(this.startTime),//此时间需要格式化,格式化时间可以放在util中
|
||||||
//endTime:formatDate(now),
|
//endTime:formatDate(now),
|
||||||
@@ -445,6 +456,8 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.testStart = false;
|
this.testStart = false;
|
||||||
|
//获取最新的成绩
|
||||||
|
this.loadStudyItemId();
|
||||||
this.$emit('submit',this.lastScore);//考试提交回调处理
|
this.$emit('submit',this.lastScore);//考试提交回调处理
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
}else{
|
}else{
|
||||||
let $this=this;
|
let $this=this;
|
||||||
if(node.level === 1){
|
if(node.level === 1){
|
||||||
// parentId = '-1';
|
parentId = '-1';
|
||||||
apiUserBasic.findOrgsByKeyword('').then(rs=>{
|
apiUserBasic.findOrgsByKeyword('').then(rs=>{
|
||||||
let treeList=[];
|
let treeList=[];
|
||||||
rs.result.forEach(item=>{
|
rs.result.forEach(item=>{
|
||||||
@@ -122,6 +122,7 @@
|
|||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
parentId = node.data.id;
|
parentId = node.data.id;
|
||||||
|
|
||||||
apiUserBasic.getOrgInfo(parentId).then(rs=>{
|
apiUserBasic.getOrgInfo(parentId).then(rs=>{
|
||||||
if(rs.status==200){
|
if(rs.status==200){
|
||||||
let treeList=[];
|
let treeList=[];
|
||||||
@@ -141,28 +142,6 @@
|
|||||||
resolve([]);
|
resolve([]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// apiUserBasic.findOrgTreeByOrgId(parentId).then(rs=>{
|
|
||||||
// if(rs.status==200){
|
|
||||||
// let treeList=[];
|
|
||||||
// if(rs.result.length>0 && rs.result[0].treeChildList){
|
|
||||||
// rs.result[0].treeChildList.forEach(item=>{
|
|
||||||
// let node={
|
|
||||||
// id:item.id,
|
|
||||||
// name:item.name,
|
|
||||||
// hrbpId:item.hrbpId,
|
|
||||||
// children:[]
|
|
||||||
// }
|
|
||||||
// if(item.treeChildList){
|
|
||||||
// $this.readTreeNode(node,item.treeChildList);
|
|
||||||
// }
|
|
||||||
// treeList.push(node);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// resolve(treeList);
|
|
||||||
// }else{
|
|
||||||
// resolve([]);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
// usergroupApi.userOrgs(parentId).then(res =>{
|
// usergroupApi.userOrgs(parentId).then(res =>{
|
||||||
// if (res.status == 200) {
|
// if (res.status == 200) {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<div style="margin-top:10px">
|
<div style="margin-top:10px">
|
||||||
<router-link to="/study/index"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
|
<router-link to="/study/index"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
|
||||||
<router-link to="/teacher/index"><span v-if="identity == 2 || identity == 5" :class="{identity:true,active:curIdentity==2}" @click="setCurIdentity(2)">教师</span></router-link>
|
<router-link to="/teacher/index"><span v-if="identity == 2 || identity == 5" :class="{identity:true,active:curIdentity==2}" @click="setCurIdentity(2)">教师</span></router-link>
|
||||||
<router-link :to="isTest? '/manage/learningpath':'/manager/index'"><span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" @click="setCurIdentity(3)">管理员</span></router-link>
|
<span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" @click="setCurIdentity(3)">管理员</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,7 +78,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="learning-info">
|
<div class="learning-info">
|
||||||
|
|
||||||
<div @click="jumrank" style="cursor: pointer;" class="ranking-link"> BOE 排行榜 >></div>
|
<div @click="jumrank" style="cursor: pointer;" class="ranking-link"> BOE 排行榜 >></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -130,11 +132,11 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
|||||||
this.loadUserStat();
|
this.loadUserStat();
|
||||||
this.$bus.$on('u-Currency',(num)=>{
|
this.$bus.$on('u-Currency',(num)=>{
|
||||||
this.statData.uvalue = num;
|
this.statData.uvalue = num;
|
||||||
});
|
})
|
||||||
if(userTest.isTest(this.userInfo.code)){
|
//console.log(this.userInfo.loginName,'this.userInfo.loginName')
|
||||||
|
if(testUser.isTest(this.userInfo.loginName)){
|
||||||
this.isTest=true;
|
this.isTest=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
loadUserStat(){//获取经验值和等级
|
loadUserStat(){//获取经验值和等级
|
||||||
@@ -160,6 +162,13 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
|||||||
|
|
||||||
setCurIdentity(iden){
|
setCurIdentity(iden){
|
||||||
this.$store.dispatch('SetCurIdentity',iden);
|
this.$store.dispatch('SetCurIdentity',iden);
|
||||||
|
|
||||||
|
if(this.isTest){
|
||||||
|
//this.$router.push('/manage/learningpath');
|
||||||
|
location.href=process.env.BASE_URL+'manage/learningpath';
|
||||||
|
}else{
|
||||||
|
this.$router.push('/manager/index');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
jumrank(){
|
jumrank(){
|
||||||
this.$router.push('/user/ranking');
|
this.$router.push('/user/ranking');
|
||||||
|
|||||||
@@ -99,12 +99,12 @@
|
|||||||
<span><a href="/resource/index.html" target="_blank" style="color:#303133;">旧版管理员界面</a></span>
|
<span><a href="/resource/index.html" target="_blank" style="color:#303133;">旧版管理员界面</a></span>
|
||||||
</template>
|
</template>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item v-show="curIdentity == 3">
|
<!-- <el-menu-item v-show="curIdentity == 3">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<svg-icon icon-class="administrator" style="font-size:17px"></svg-icon>
|
<svg-icon icon-class="administrator" style="font-size:17px"></svg-icon>
|
||||||
<span><a href="/manage/learningpath" target="_blank" style="color:#303133;">新版管理员界面</a></span>
|
<span><a href="/manage/learningpath" target="_blank" style="color:#303133;">新版管理员界面</a></span>
|
||||||
</template>
|
</template>
|
||||||
</el-menu-item>
|
</el-menu-item> -->
|
||||||
<el-menu-item v-show="curIdentity == 3">
|
<el-menu-item v-show="curIdentity == 3">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<svg-icon icon-class="management" style="font-size:16px"></svg-icon>
|
<svg-icon icon-class="management" style="font-size:16px"></svg-icon>
|
||||||
|
|||||||
@@ -4,17 +4,35 @@ const userCodes=[
|
|||||||
'00004409'
|
'00004409'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const userCodesPro=[
|
||||||
|
'00004409'
|
||||||
|
]
|
||||||
|
|
||||||
/**是否是测试人员*/
|
/**是否是测试人员*/
|
||||||
const isTest=function(code){
|
const isTest=function(code){
|
||||||
var testUser=false;
|
var testUser=false;
|
||||||
|
var mode=process.env.NODE_ENV;
|
||||||
|
|
||||||
|
if(mode=='testing'){
|
||||||
userCodes.some(item=>{
|
userCodes.some(item=>{
|
||||||
if(item===code){
|
if(item===code){
|
||||||
testUer=true;
|
testUser=true;
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}else if(mode=='preview' || mode=='production' ){
|
||||||
|
userCodesPro.some(item=>{
|
||||||
|
if(item===code){
|
||||||
|
testUser=true;
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return testUser;
|
return testUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -267,7 +267,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
resOwnerListMap: [],
|
resOwnerListMap: [],
|
||||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
//fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||||
|
fileBaseUrl:this.$xpage.constants.fileBaseUrl, //获成动态获取的处理
|
||||||
getType: getType,
|
getType: getType,
|
||||||
loading: false,
|
loading: false,
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
|
|||||||
@@ -82,7 +82,10 @@
|
|||||||
<div class="title">{{item.section.name}}</div>
|
<div class="title">{{item.section.name}}</div>
|
||||||
<div class="subnode" v-for="(it,itIdx) in item.contents" :key="it.id">
|
<div class="subnode" v-for="(it,itIdx) in item.contents" :key="it.id">
|
||||||
<div class="sub-title">
|
<div class="sub-title">
|
||||||
<div class="tip"><span class="tip-type">{{getType(it.contentType)}}</span>{{it.contentName}}</div>
|
<div class="tip">
|
||||||
|
<span class="tip-type">{{getType(it.contentType)}}</span>
|
||||||
|
<a :href="'studyindex?id='+it.courseId+'&contentId='+it.id"> {{it.contentName}}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -392,6 +392,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
|
this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
|
||||||
this.courseId = this.$route.query.id;
|
this.courseId = this.$route.query.id;
|
||||||
|
this.initContentId = this.$route.query.contentId;
|
||||||
this.loadData();
|
this.loadData();
|
||||||
//console.log(this.$xpage.constants.fileBaseUrl,'this.$xpage.constants.fileBaseUrl');
|
//console.log(this.$xpage.constants.fileBaseUrl,'this.$xpage.constants.fileBaseUrl');
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user