mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-23 01:36:44 +08:00
案例修改
This commit is contained in:
@@ -50,10 +50,18 @@
|
||||
<pdfPreview v-if="pdfPath" :filePath="pdfPath"></pdfPreview>
|
||||
</el-card>
|
||||
<el-card v-if="Internet == 2" style="background-color:#eee" class="jianjie pdftext" id="pdfPreview">
|
||||
<span>案例内容只能在内网环境下查看</span>
|
||||
<div style="margin-top:40px">
|
||||
<span>十分抱歉,您当前的网络环境不符合观看要求。为了保障案例信息的安全,您需要接入公司内网才能观看。</span>
|
||||
</div>
|
||||
<div style="margin-top:20px" @click="retest">
|
||||
<el-button type="primary">重新检测</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-else-if="Internet == 3" style="background-color:#eee" class="jianjie pdftext" id="pdfPreview">
|
||||
<div style="margin-top:40px">
|
||||
<span>网络安全检测中</span>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<div class="postfixt-bot">
|
||||
@@ -124,9 +132,11 @@
|
||||
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
|
||||
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||
</el-col>
|
||||
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title + '(' + item.authorName+ ')'" placement="bottom" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
|
||||
</el-tooltip>
|
||||
<!-- <el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title + '(' + item.authorName+ ')'" placement="bottom" :visible-arrow="false" popper-class="text-tooltip"> -->
|
||||
<div :title="item.title">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
|
||||
</div>
|
||||
<!-- </el-tooltip> -->
|
||||
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -148,9 +158,12 @@
|
||||
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
|
||||
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||
</el-col>
|
||||
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title + '(' + item.authorName+ ')'" placement="bottom" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<!-- <el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title + '(' + item.authorName+ ')'" placement="bottom" :visible-arrow="false" popper-class="text-tooltip"> -->
|
||||
<div :title="item.title">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
|
||||
</el-tooltip>
|
||||
|
||||
</div>
|
||||
<!-- </el-tooltip> -->
|
||||
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -214,30 +227,7 @@ export default {
|
||||
mounted() {
|
||||
let $this = this;
|
||||
this.Intsucc();
|
||||
let xmlhttp=this.getXmlHttpRequest();
|
||||
let timedOut = false;
|
||||
let timer = setTimeout(function(){
|
||||
timedOut = true;
|
||||
xmlhttp.abort();
|
||||
}, 5000);
|
||||
xmlhttp.open("HEAD", window.location.protocol+"//uapi.boe.com.cn",true);
|
||||
xmlhttp.send();
|
||||
xmlhttp.onreadystatechange=function() {
|
||||
if (xmlhttp.readyState==4) {
|
||||
if (xmlhttp.status==200){
|
||||
clearTimeout(timer);
|
||||
$this.Internet = 1;
|
||||
}else{
|
||||
clearTimeout(timer);
|
||||
$this.Internet = 2;
|
||||
|
||||
}
|
||||
}else{
|
||||
if(timedOut) return;//忽略中止请求
|
||||
clearTimeout(timer);//取消等待的超时
|
||||
}
|
||||
}
|
||||
|
||||
this.retest();
|
||||
|
||||
this.resolveId = this.$route.query.id;
|
||||
this.$watermark.set(this.userInfo.name+this.userInfo.loginName);
|
||||
@@ -255,6 +245,31 @@ export default {
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
retest(){
|
||||
let $this=this;
|
||||
let xmlhttp=this.getXmlHttpRequest();
|
||||
let timedOut = false;
|
||||
let timer = setTimeout(function(){
|
||||
timedOut = true;
|
||||
xmlhttp.abort();
|
||||
}, 5000);
|
||||
xmlhttp.open("HEAD", window.location.protocol+"//uapi.boe.com.cn",true);
|
||||
xmlhttp.send();
|
||||
xmlhttp.onreadystatechange=function() {
|
||||
if (xmlhttp.readyState==4) {
|
||||
if (xmlhttp.status==200){
|
||||
clearTimeout(timer);
|
||||
$this.Internet = 1;
|
||||
}else{
|
||||
clearTimeout(timer);
|
||||
$this.Internet = 2;
|
||||
}
|
||||
}else{
|
||||
if(timedOut) return;//忽略中止请求
|
||||
clearTimeout(timer);//取消等待的超时
|
||||
}
|
||||
}
|
||||
},
|
||||
getXmlHttpRequest() {
|
||||
if (window.XMLHttpRequest) {
|
||||
return new XMLHttpRequest();
|
||||
@@ -457,11 +472,13 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.pdftext{
|
||||
// padding: 0 20px;
|
||||
span{
|
||||
font-size: 25px;
|
||||
font-size: 22px;
|
||||
color: #ccc;
|
||||
font-weight: bold;
|
||||
line-height: 200px;
|
||||
line-height: 40px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user