mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
内网环境判断
This commit is contained in:
@@ -22,92 +22,103 @@
|
|||||||
<div class="course-playbox" ref="coursePlayerBox" id="id_course_player_box">
|
<div class="course-playbox" ref="coursePlayerBox" id="id_course_player_box">
|
||||||
<div class="course-player" ref="coursePlayer" id="id_course_player">
|
<div class="course-player" ref="coursePlayer" id="id_course_player">
|
||||||
<div>
|
<div>
|
||||||
<div v-if="resType == null || resType == 0">
|
<div v-if="Internet != 2">
|
||||||
<!--先显示视频图片-->
|
<div v-if="resType == null || resType == 0">
|
||||||
<course-image v-if="courseInfo.id != ''" :course="courseInfo"></course-image>
|
<!--先显示视频图片-->
|
||||||
</div>
|
<course-image v-if="courseInfo.id != ''" :course="courseInfo"></course-image>
|
||||||
<div v-if="resType == 10" style="position: relative;">
|
</div>
|
||||||
<videoPlayer ref="myVideoPlayer" id="myVideoPlayer" @progress="progress" :src="blobUrl" :blobId="blobId" @onPlayerPlaying="onPlayerPlaying"
|
<div v-if="resType == 10" style="position: relative;">
|
||||||
:initTime="contentData.lastStudyTime" :notePlay="notePlay" @onPlayerPlay="onPlayerPlay"
|
<videoPlayer ref="myVideoPlayer" id="myVideoPlayer" @progress="progress" :src="blobUrl" :blobId="blobId" @onPlayerPlaying="onPlayerPlaying"
|
||||||
:isDrag="curriculumData.isDrag" @onFullscreen="onFullscreen" @onPlayerPause="onPlayerPause"
|
:initTime="contentData.lastStudyTime" :notePlay="notePlay" @onPlayerPlay="onPlayerPlay"
|
||||||
@onPlayerEnded="onPlayerEnded" :isCrowd="isCrowd" @onTimeUpdate="handleAudioTimeUpdate"></videoPlayer>
|
:isDrag="curriculumData.isDrag" @onFullscreen="onFullscreen" @onPlayerPause="onPlayerPause"
|
||||||
<div class="player-box" v-if="playerBoxShow">
|
@onPlayerEnded="onPlayerEnded" :isCrowd="isCrowd" @onTimeUpdate="handleAudioTimeUpdate"></videoPlayer>
|
||||||
<div class="player-praise" style="cursor: pointer;">
|
<div class="player-box" v-if="playerBoxShow">
|
||||||
<div @click="praiseContent">
|
<div class="player-praise" style="cursor: pointer;">
|
||||||
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')" />
|
<div @click="praiseContent">
|
||||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/zhan.png')" />
|
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')" />
|
||||||
<!-- {{ courseInfo.praises }} -->
|
<img class="icon-small" v-else :src="require('@/assets/images/icon/zhan.png')" />
|
||||||
<div style="color:#fff;cursor: pointer;">赞</div>
|
<!-- {{ courseInfo.praises }} -->
|
||||||
|
<div style="color:#fff;cursor: pointer;">赞</div>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left: 15px;cursor: pointer;" @click="treadContent">
|
||||||
|
<img class="icon-small" v-if="isTrample"
|
||||||
|
:src="require('@/assets/images/icon/trample-active.png')" />
|
||||||
|
<img class="icon-small" v-else :src="require('@/assets/images/icon/cai.png')" />
|
||||||
|
<!-- {{ courseInfo.trampleCount }} -->
|
||||||
|
<div style="color:#fff;cursor: pointer;">踩</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 15px;cursor: pointer;" @click="treadContent">
|
<div v-if="!scoreInfo.has" class="player-rate">
|
||||||
<img class="icon-small" v-if="isTrample"
|
|
||||||
:src="require('@/assets/images/icon/trample-active.png')" />
|
|
||||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/cai.png')" />
|
|
||||||
<!-- {{ courseInfo.trampleCount }} -->
|
|
||||||
<div style="color:#fff;cursor: pointer;">踩</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="!scoreInfo.has" class="player-rate">
|
|
||||||
|
|
||||||
<el-rate v-model="scoreInfo.score" text-color="#ff9900" score-template="{value}" void-color="#fff" @change="addScore"></el-rate>
|
<el-rate v-model="scoreInfo.score" text-color="#ff9900" score-template="{value}" void-color="#fff" @change="addScore"></el-rate>
|
||||||
</div>
|
|
||||||
<div v-if="scoreInfo.has" style="padding-top: 5px;display: flex;">
|
|
||||||
<div class="player-rate" style="padding-left: 35px;">
|
|
||||||
<el-rate disabled v-model="courseInfo.score" :allow-half="true"></el-rate>
|
|
||||||
</div>
|
</div>
|
||||||
<span class="score-text" style="margin-top:35px">
|
<div v-if="scoreInfo.has" style="padding-top: 5px;display: flex;">
|
||||||
|
<div class="player-rate" style="padding-left: 35px;">
|
||||||
|
<el-rate disabled v-model="courseInfo.score" :allow-half="true"></el-rate>
|
||||||
|
</div>
|
||||||
|
<span class="score-text" style="margin-top:35px">
|
||||||
<span style="color:#ffb30f;">{{ toScore(courseInfo.score) }}</span>
|
<span style="color:#ffb30f;">{{ toScore(courseInfo.score) }}</span>
|
||||||
<span style="font-size: 12px;color: #fff">分</span>
|
<span style="font-size: 12px;color: #fff">分</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div v-if="resType == 20">
|
||||||
<div v-if="resType == 20">
|
<div class="con-audio">
|
||||||
<div class="con-audio">
|
<div class="con-audio-title">{{ contentData.contentName }}</div>
|
||||||
<div class="con-audio-title">{{ contentData.contentName }}</div>
|
<div class="con-audio-player">
|
||||||
<div class="con-audio-player">
|
<audioPlayer v-if="resType == 20" :url="blobUrl" :name="contentData.contentName" @onPlaying="audioPlaying" :isDrag="curriculumData.isDrag"
|
||||||
<audioPlayer v-if="resType == 20" :url="blobUrl" :name="contentData.contentName" @onPlaying="audioPlaying" :isDrag="curriculumData.isDrag"
|
@onPlay="audioPlay" @onPause="audioPause" @onPlayEnd="audioEnd"></audioPlayer>
|
||||||
@onPlay="audioPlay" @onPause="audioPause" @onPlayEnd="audioEnd"></audioPlayer>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div v-if="resType == 40">
|
||||||
<div v-if="resType == 40">
|
<div style="padding: 10px;color: #ed0000; " v-if="curCFile.converStatus < 2 && !contentData.content">
|
||||||
<div style="padding: 10px;color: #ed0000; " v-if="curCFile.converStatus < 2 && !contentData.content">
|
<div>此课程内容无法预览,请联系管理员</div>
|
||||||
<div>此课程内容无法预览,请联系管理员</div>
|
|
||||||
</div>
|
|
||||||
<div style="padding: 10px;color: #ed0000;" v-if="curCFile.converStatus == 3 && !contentData.content">
|
|
||||||
此课程内容无法预览,请联系管理员
|
|
||||||
</div>
|
|
||||||
<pdfPreview :autoScroll="true" v-if="resType == 40" :filePath="fileBaseUrl + contentData.content">
|
|
||||||
</pdfPreview>
|
|
||||||
</div>
|
|
||||||
<div v-if="resType == 41">
|
|
||||||
<div style="padding: 20px;" v-html="contentData.content"></div>
|
|
||||||
</div>
|
|
||||||
<div v-if="resType == 50" style="min-height: 500px;">
|
|
||||||
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" border="0px" style="width:100%;height:500px;border:0px;"></iframe>
|
|
||||||
</div>
|
|
||||||
<div v-if="resType == 52">
|
|
||||||
<div v-if="contentData.content != ''">
|
|
||||||
<div class="hyper-link" v-if="conLink.openType == 2">
|
|
||||||
<div class="hyper-link-row">{{ contentData.contentName }}</div>
|
|
||||||
<div class="hyper-link-row">{{ conLink.url }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="conLink.openType == 1"><iframe :src="conLink.url"
|
<div style="padding: 10px;color: #ed0000;" v-if="curCFile.converStatus == 3 && !contentData.content">
|
||||||
style="width: 100%;border:0px;min-height: 473px;" frameborder="0"></iframe></div>
|
此课程内容无法预览,请联系管理员
|
||||||
|
</div>
|
||||||
|
<pdfPreview :autoScroll="true" v-if="resType == 40" :filePath="fileBaseUrl + contentData.content">
|
||||||
|
</pdfPreview>
|
||||||
|
</div>
|
||||||
|
<div v-if="resType == 41">
|
||||||
|
<div style="padding: 20px;" v-html="contentData.content"></div>
|
||||||
|
</div>
|
||||||
|
<div v-if="resType == 50" style="min-height: 500px;">
|
||||||
|
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" border="0px" style="width:100%;height:500px;border:0px;"></iframe>
|
||||||
|
</div>
|
||||||
|
<div v-if="resType == 52">
|
||||||
|
<div v-if="contentData.content != ''">
|
||||||
|
<div class="hyper-link" v-if="conLink.openType == 2">
|
||||||
|
<div class="hyper-link-row">{{ contentData.contentName }}</div>
|
||||||
|
<div class="hyper-link-row">{{ conLink.url }}</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="conLink.openType == 1"><iframe :src="conLink.url"
|
||||||
|
style="width: 100%;border:0px;min-height: 473px;" frameborder="0"></iframe></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="resType == 60">
|
||||||
|
<homework @submit="homeWorkSubmit" v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework>
|
||||||
|
</div>
|
||||||
|
<div v-if="resType == 61">
|
||||||
|
<exam @startTest="startTest" v-if="resType == 61 && studyId != '' " :studyId="studyId" :content="contentData"></exam>
|
||||||
|
</div>
|
||||||
|
<div v-if="resType == 62" style="padding:5px">
|
||||||
|
<assess v-if="resType == 62 && studyId != '' && contentData.id" :studyId="studyId" :content="contentData">
|
||||||
|
</assess>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="resType == 60">
|
<el-card v-if="Internet == 2" style="background-color:#eee" class="jianjie pdftext" id="pdfPreview">
|
||||||
<homework @submit="homeWorkSubmit" v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework>
|
<div style="margin-top:40px">
|
||||||
</div>
|
<span>十分抱歉,您当前的网络环境不符合观看要求。<br />
|
||||||
<div v-if="resType == 61">
|
为了保障案例信息的安全,您需要接入公司内网才能观看。</span>
|
||||||
<exam @startTest="startTest" v-if="resType == 61 && studyId != '' " :studyId="studyId" :content="contentData"></exam>
|
</div>
|
||||||
</div>
|
<div style="margin-top:20px" @click="getInternet">
|
||||||
<div v-if="resType == 62" style="padding:5px">
|
<el-button type="primary">重新检测</el-button>
|
||||||
<assess v-if="resType == 62 && studyId != '' && contentData.id" :studyId="studyId" :content="contentData">
|
</div>
|
||||||
</assess>
|
</el-card>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!--交互部分-->
|
<!--交互部分-->
|
||||||
<div>
|
<div>
|
||||||
@@ -303,6 +314,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<el-dialog class="protocol" :close-on-click-modal="false" :visible="protocolDialogVisible" width="30%"
|
||||||
|
:show-close="false">
|
||||||
|
<div class="protocol-title">{{warnTitle}}</div>
|
||||||
|
<div class="protocol-content">
|
||||||
|
  {{warn}}
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="protocolDialogVisible = false">确
|
||||||
|
定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
<!-- <div><portal-footer></portal-footer></div> -->
|
<!-- <div><portal-footer></portal-footer></div> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -369,6 +391,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
protocolDialogVisible: false,
|
||||||
tentative: false,
|
tentative: false,
|
||||||
isContentTypeTwo: null,
|
isContentTypeTwo: null,
|
||||||
isContentType: null,
|
isContentType: null,
|
||||||
@@ -390,6 +413,7 @@
|
|||||||
curCFile: {
|
curCFile: {
|
||||||
converStatus: 4,
|
converStatus: 4,
|
||||||
},
|
},
|
||||||
|
Internet: 3,//1是成功 2是是失败 3是检测中
|
||||||
radio: '',
|
radio: '',
|
||||||
interactRuning: false,
|
interactRuning: false,
|
||||||
playerBoxShow: false,
|
playerBoxShow: false,
|
||||||
@@ -454,6 +478,8 @@
|
|||||||
cumulativeDuration:0, //非音频累计时长
|
cumulativeDuration:0, //非音频累计时长
|
||||||
maxDuration:0, //非音频最大时长
|
maxDuration:0, //非音频最大时长
|
||||||
defaultMaxTime:1800, //非音频默认最大时间
|
defaultMaxTime:1800, //非音频默认最大时间
|
||||||
|
warn:"测试内容",
|
||||||
|
warnTitle:"测试标题",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -1357,7 +1383,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.courseInfo = rs.result.course;
|
this.courseInfo = rs.result.course;
|
||||||
|
this.warn = rs.result.warn;
|
||||||
|
this.warnTitle = rs.result.warnTitle;
|
||||||
if (rs.result.teachers && rs.result.teachers.length > 0) {
|
if (rs.result.teachers && rs.result.teachers.length > 0) {
|
||||||
let userIds = [];
|
let userIds = [];
|
||||||
let ctoUsers = [];
|
let ctoUsers = [];
|
||||||
@@ -1387,6 +1414,7 @@
|
|||||||
//加载学习的数据
|
//加载学习的数据
|
||||||
this.loadStudyData(rs.result);
|
this.loadStudyData(rs.result);
|
||||||
if (rs.result.isPermission){
|
if (rs.result.isPermission){
|
||||||
|
// if (true){
|
||||||
this.getInternet()
|
this.getInternet()
|
||||||
console.log('需要内网环境')
|
console.log('需要内网环境')
|
||||||
}
|
}
|
||||||
@@ -1420,22 +1448,11 @@
|
|||||||
if (xmlhttp.status == 200) {
|
if (xmlhttp.status == 200) {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
$this.Internet = 1;
|
$this.Internet = 1;
|
||||||
$this.$store.dispatch("userTrigger", {
|
$this.protocolDialogVisible=true
|
||||||
key: "ViewCase",//后台的事件key 发布文章且审核通过
|
|
||||||
title: '查看案例',//事件的标题
|
|
||||||
parameters: "",//用户自定义参数 name:value,name:value
|
|
||||||
content: '查看了案例',//事件的内容
|
|
||||||
objId: $this.resolveId,//关联的id
|
|
||||||
objType: "3",//关联的类型
|
|
||||||
objInfo: $this.caseDetail?.title,
|
|
||||||
aid: $this.userInfo.aid, //当前登录人的id
|
|
||||||
aname: $this.userInfo.name,//当前人的姓名
|
|
||||||
status: 1 //状态,直接写1
|
|
||||||
});
|
|
||||||
$this.sendEventData();
|
|
||||||
} else {
|
} else {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
$this.Internet = 2;
|
$this.Internet = 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (timedOut) return;//忽略中止请求
|
if (timedOut) return;//忽略中止请求
|
||||||
@@ -2419,4 +2436,18 @@
|
|||||||
height: 200px;
|
height: 200px;
|
||||||
background: url('../../../public/images/couresdetail.png');
|
background: url('../../../public/images/couresdetail.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.protocol {
|
||||||
|
.protocol-title {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.protocol-content {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user