mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal into online
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template><!--pdf连接分页处理-->
|
<template><!--pdf连接分页处理-->
|
||||||
<div class="pdf-perView" id="pdf-perView">
|
<div class="pdf-perView" id="pdf-perView" v-loading="loading" element-loading-text="加载中">
|
||||||
<div class="pdf-box">
|
<div class="pdf-box">
|
||||||
<transition name="progress">
|
<transition name="progress">
|
||||||
<el-progress v-if="showProgress" :percentage="Math.floor(loadedRatio * 100)" :text-inside="true" :show-text="false"></el-progress>
|
<el-progress v-if="showProgress" :percentage="Math.floor(loadedRatio * 100)" :text-inside="true" :show-text="false"></el-progress>
|
||||||
@@ -30,16 +30,6 @@
|
|||||||
<!-- <el-button type="primary" @click="clickMore()" >加载更多</el-button> -->
|
<!-- <el-button type="primary" @click="clickMore()" >加载更多</el-button> -->
|
||||||
<span class="pag-text" @click="clickMore()" style="cursor: pointer;">加载更多</span>
|
<span class="pag-text" @click="clickMore()" style="cursor: pointer;">加载更多</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div v-if="likeBox" class="xcontent postfixt-bot">
|
|
||||||
<div class="postfixt-bot-box">
|
|
||||||
<div style="display:inline-block">
|
|
||||||
<interactBar :data="data" :type="3" :comments="false" :shares="true"></interactBar>
|
|
||||||
</div>
|
|
||||||
<div style="display:inline-block;margin: 0 20px;">
|
|
||||||
<el-button type="primary" @click="goTop()">返回顶部</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -64,6 +54,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loading:false,
|
||||||
src: "",
|
src: "",
|
||||||
showPages: undefined,
|
showPages: undefined,
|
||||||
totalPages:0,
|
totalPages:0,
|
||||||
@@ -79,6 +70,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
// /case/demo.pdf
|
// /case/demo.pdf
|
||||||
if(this.filePath){
|
if(this.filePath){
|
||||||
|
this.loading = true;
|
||||||
this.loadInitPdf(this.filePath);
|
this.loadInitPdf(this.filePath);
|
||||||
}
|
}
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
@@ -129,6 +121,7 @@ export default {
|
|||||||
let loadingTask = pdf.createLoadingTask(url);
|
let loadingTask = pdf.createLoadingTask(url);
|
||||||
this.src=loadingTask;
|
this.src=loadingTask;
|
||||||
loadingTask.promise.then((pdf) =>{
|
loadingTask.promise.then((pdf) =>{
|
||||||
|
this.loading = false;
|
||||||
this.totalPages=pdf.numPages;
|
this.totalPages=pdf.numPages;
|
||||||
if(pdf.numPages>this.initNum){
|
if(pdf.numPages>this.initNum){
|
||||||
this.showPages = this.initNum;
|
this.showPages = this.initNum;
|
||||||
@@ -136,6 +129,7 @@ export default {
|
|||||||
this.showPages =pdf.numPages;
|
this.showPages =pdf.numPages;
|
||||||
}
|
}
|
||||||
}).catch((err) =>{
|
}).catch((err) =>{
|
||||||
|
this.loading = false;
|
||||||
this.$message.error("加载内容失败,请联系管理员");
|
this.$message.error("加载内容失败,请联系管理员");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -157,15 +151,7 @@ export default {
|
|||||||
if(this.isscroll){
|
if(this.isscroll){
|
||||||
this.showPages++
|
this.showPages++
|
||||||
this.moreState = 2;
|
this.moreState = 2;
|
||||||
// this.debounce(this.loadInitPdf($this.filePath),5000);
|
|
||||||
// this.debounce(,200000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(scrollTop > 400) {
|
|
||||||
// document.querySelector('#articleAnking').style.cssText = "position: fixed;top: 0;width:242.5px";
|
|
||||||
// } else {
|
|
||||||
// document.querySelector('#articleAnking').style.cssText = "position: static";
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
debounce(func, wait) {// 非立即执行
|
debounce(func, wait) {// 非立即执行
|
||||||
let timeout;
|
let timeout;
|
||||||
|
|||||||
@@ -459,7 +459,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitShare(){
|
submitShare(){
|
||||||
|
|
||||||
if(this.shareUsers.length==0){
|
if(this.shareUsers.length==0){
|
||||||
this.$message.error('请选择分享人');
|
this.$message.error('请选择分享人');
|
||||||
return;
|
return;
|
||||||
@@ -472,7 +471,7 @@ export default {
|
|||||||
let postData={
|
let postData={
|
||||||
objType:this.type,
|
objType:this.type,
|
||||||
objId:this.data.id,
|
objId:this.data.id,
|
||||||
content:'',
|
content:this.data.title,
|
||||||
isRead:false,
|
isRead:false,
|
||||||
toAid:'',
|
toAid:'',
|
||||||
toAname:'',
|
toAname:'',
|
||||||
|
|||||||
@@ -369,7 +369,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
//console.log(this.$Constants.fileBaseUrl,'fileBaseUrl地址');
|
|
||||||
this.getCourseData(1);
|
this.getCourseData(1);
|
||||||
this.getCaseData();
|
this.getCaseData();
|
||||||
this.getArticleData();
|
this.getArticleData();
|
||||||
@@ -380,7 +379,6 @@ export default {
|
|||||||
window.open('https://m.qingxuetang.com/x/?appId=qxtcorp306130','_blank');
|
window.open('https://m.qingxuetang.com/x/?appId=qxtcorp306130','_blank');
|
||||||
},
|
},
|
||||||
toCourseDetail(item) {
|
toCourseDetail(item) {
|
||||||
|
|
||||||
if (item.type == 10) {
|
if (item.type == 10) {
|
||||||
return this.webBaseUrl + '/course/micro?id=' + item.id;
|
return this.webBaseUrl + '/course/micro?id=' + item.id;
|
||||||
} else if (item.type == 20) {
|
} else if (item.type == 20) {
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
viewTopic(data) {
|
viewTopic(data) {
|
||||||
window.open(this.webBaseUrl+'/case/detail?id='+data.id, '_blank');
|
this.$router.push({path:'/case/detail',query:{id:data.id}})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -203,8 +203,8 @@
|
|||||||
<el-dialog title="二维码" center :visible.sync="qrcodeShow" @close="closeCode" width="500px">
|
<el-dialog title="二维码" center :visible.sync="qrcodeShow" @close="closeCode" width="500px">
|
||||||
<div style="height:250px;display: flex;flex-direction:column;justify-content: space-evenly;align-items: center;">
|
<div style="height:250px;display: flex;flex-direction:column;justify-content: space-evenly;align-items: center;">
|
||||||
<div id="qrcode" ref="qrcode"></div>
|
<div id="qrcode" ref="qrcode"></div>
|
||||||
<el-input v-model="qrcode"></el-input>
|
<el-input v-model="pcDetailUrl" id="text"></el-input>
|
||||||
<el-button type="primary" size="mini">复制链接</el-button>
|
<el-button type="primary" size="mini" @click="myCopy()">复制链接</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
@@ -330,6 +330,7 @@ export default {
|
|||||||
manageStudyData: {},
|
manageStudyData: {},
|
||||||
expandDetails: true,
|
expandDetails: true,
|
||||||
qrcode: '',
|
qrcode: '',
|
||||||
|
pcDetailUrl:'',
|
||||||
isExamine: 1,
|
isExamine: 1,
|
||||||
auditInfo: {
|
auditInfo: {
|
||||||
pass: true,
|
pass: true,
|
||||||
@@ -397,6 +398,11 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
myCopy(){
|
||||||
|
var ele = document.getElementById("text");
|
||||||
|
ele.select();
|
||||||
|
document.execCommand("Copy");
|
||||||
|
},
|
||||||
inputOn() {
|
inputOn() {
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
@@ -663,9 +669,16 @@ export default {
|
|||||||
this.qrcodeShow = true;
|
this.qrcodeShow = true;
|
||||||
|
|
||||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||||
this.qrcode = urlPre+'/mobile/pages/resource/microDetail?id='+row.id;
|
|
||||||
|
//动态的地址
|
||||||
|
//urlPre=urlPre+'/m?returnUrl='+urlPre+'/mobile/pages/login/loading?returnUrl=';
|
||||||
|
//固定的地址
|
||||||
|
let mobilePre='https://u.boe.com/m?returnUrl=https://u.boe.com/mobile/pages/login/loading?returnUrl=';
|
||||||
|
this.qrcode = mobilePre+'/pages/resource/microDetail?id='+row.id;
|
||||||
|
this.pcDetailUrl=urlPre+this.webBaseUrl+'/course/micro?id='+row.id;
|
||||||
if(row.type==20){
|
if(row.type==20){
|
||||||
this.qrcode = urlPre+'/mobile/pages/resource/courseDetail?id='+row.id;
|
this.qrcode = mobilePre+'/pages/resource/courseDetail?id='+row.id;
|
||||||
|
this.pcDetailUrl=urlPre+this.webBaseUrl+'/course/detail?id='+row.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 使用$nextTick确保数据渲染
|
// 使用$nextTick确保数据渲染
|
||||||
|
|||||||
@@ -231,8 +231,9 @@ export default {
|
|||||||
showQrimage(){
|
showQrimage(){
|
||||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||||
// this.qrcode = this.webBaseUrl+'/mobile/pages/resource/courseDetail?id='+this.courseInfo.id;
|
// this.qrcode = this.webBaseUrl+'/mobile/pages/resource/courseDetail?id='+this.courseInfo.id;
|
||||||
this.qrcode = urlPre+'/mobile/pages/resource/courseDetail?id='+this.courseInfo.id;
|
urlPre='https://u.boe.com/m?returnUrl=https://u.boe.com/mobile/pages/login/loading?returnUrl=';
|
||||||
console.log(this.qrcode,'qrcode');
|
this.qrcode = urlPre+'/pages/resource/courseDetail?id='+this.courseInfo.id;
|
||||||
|
//console.log(this.qrcode,'qrcode');
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.crateQrcode();
|
this.crateQrcode();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -521,7 +521,8 @@ export default {
|
|||||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||||
// https://u.boe.com/mobile/pages/resource/microDetail?id=963456709515939840
|
// https://u.boe.com/mobile/pages/resource/microDetail?id=963456709515939840
|
||||||
// this.qrcode = this.webBaseUrl+'/mobile/pages/resource/microDetail?id='+this.courseInfo.id;
|
// this.qrcode = this.webBaseUrl+'/mobile/pages/resource/microDetail?id='+this.courseInfo.id;
|
||||||
this.qrcode =urlPre+ '/mobile/pages/resource/microDetail?id='+this.courseInfo.id;
|
urlPre='https://u.boe.com/m?returnUrl=https://u.boe.com/mobile/pages/login/loading?returnUrl=';
|
||||||
|
this.qrcode =urlPre+ '/pages/resource/microDetail?id='+this.courseInfo.id;
|
||||||
//console.log(this.qrcode,'qrcode');
|
//console.log(this.qrcode,'qrcode');
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.crateQrcode();
|
this.crateQrcode();
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ export default {
|
|||||||
}else{
|
}else{
|
||||||
this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/cware/resource?sign='+urlSign;
|
this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/cware/resource?sign='+urlSign;
|
||||||
}
|
}
|
||||||
console.log(this.blobUrl,'this.blobUrl');
|
//console.log(this.blobUrl,'this.blobUrl');
|
||||||
},
|
},
|
||||||
widthOpen(url) {
|
widthOpen(url) {
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
|
|||||||
@@ -511,6 +511,9 @@ export default {
|
|||||||
return author.aid == item.question.sysCreateAid;
|
return author.aid == item.question.sysCreateAid;
|
||||||
});
|
});
|
||||||
item = Object.assign(item, obj);
|
item = Object.assign(item, obj);
|
||||||
|
if(item.orgInfo){
|
||||||
|
item.orgInfo=cutFullName(obj.orgInfo,1);
|
||||||
|
}
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -597,6 +600,9 @@ export default {
|
|||||||
return author.aid == item.cases.authorId;
|
return author.aid == item.cases.authorId;
|
||||||
});
|
});
|
||||||
item = Object.assign(item, obj);
|
item = Object.assign(item, obj);
|
||||||
|
if(item.orgInfo){
|
||||||
|
item.orgInfo=cutFullName(obj.orgInfo,1);
|
||||||
|
}
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -636,6 +642,9 @@ export default {
|
|||||||
return author.aid == item.sysCreateAid;
|
return author.aid == item.sysCreateAid;
|
||||||
});
|
});
|
||||||
item = Object.assign(item, obj);
|
item = Object.assign(item, obj);
|
||||||
|
if(item.orgInfo){
|
||||||
|
item.orgInfo=cutFullName(obj.orgInfo,1);
|
||||||
|
}
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user