提交 8102f02f authored 作者: 王鹏飞's avatar 王鹏飞

学员须知增加国际化

上级 56e185a8
...@@ -25,7 +25,16 @@ ...@@ -25,7 +25,16 @@
"learnSysLayout": { "learnSysLayout": {
"navigation": { "navigation": {
"title": "Online Learning System", "title": "Online Learning System",
"tip": "Notifications" "tip": "Notifications",
"handlbook": "Handlbook",
"library": "Library",
"dialogTitle": "Notice",
"dialogMessage1": "Before using this online learning system, please read ",
"dialogMessage2": "\"Zijing-CIIS MAP Program Student Manual\"",
"dialogMessage3": " very carefully, and agree to follow the instructions, policies and requirements.",
"dialogMessageHref": "https://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/pc/ciis/CIIS%E5%AD%A6%E7%94%9F%E6%89%8B%E5%86%8C.pdf",
"dialogCheckbox": "I have read and agreed.",
"dialogButton": "OK"
}, },
"sideBar": { "sideBar": {
"updatePic": "Change profile photo", "updatePic": "Change profile photo",
......
...@@ -25,7 +25,16 @@ ...@@ -25,7 +25,16 @@
"learnSysLayout": { "learnSysLayout": {
"navigation": { "navigation": {
"title": "在线学习系统", "title": "在线学习系统",
"tip": "通知" "tip": "通知",
"handlbook": "查看学员手册",
"library": "电子图书馆",
"dialogTitle": "学员须知",
"dialogMessage1": "使用学习平台前,请认真阅读",
"dialogMessage2": "《紫荆教育-CIIS应用心理学硕士项目学员手册》",
"dialogMessage3": "内容,并同意遵守其中的各项要求。",
"dialogMessageHref": "https://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/pc/ciis/CIIS%E5%AD%A6%E7%94%9F%E6%89%8B%E5%86%8C.pdf",
"dialogCheckbox": "我已阅读并同意",
"dialogButton": "确定"
}, },
"sideBar": { "sideBar": {
"updatePic": "修改头像", "updatePic": "修改头像",
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
</div> </div>
<div class="nav-right"> <div class="nav-right">
<div class="nav-a"> <div class="nav-a">
<a :href="documentUrl" target="_blank">查看学员手册</a> <a :href="documentUrl" target="_blank">{{ $t('components.learnSysLayout.navigation.handlbook') }}</a>
<a href="https://library.ciis.edu" target="_blank">电子图书馆</a> <a href="https://library.ciis.edu" target="_blank">{{ $t('components.learnSysLayout.navigation.library') }}</a>
</div> </div>
<div class="notify" @click="goNotify()"> <div class="notify" @click="goNotify()">
{{ $t('components.learnSysLayout.navigation.tip') }} {{ $t('components.learnSysLayout.navigation.tip') }}
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<language-switch /> <language-switch />
</div> </div>
<el-dialog <el-dialog
title="学员须知" :title="$t('components.learnSysLayout.navigation.dialogTitle')"
width="460px" width="460px"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:center="true" :center="true"
...@@ -27,16 +27,18 @@ ...@@ -27,16 +27,18 @@
> >
<div class="sign"> <div class="sign">
<p> <p>
使用学习平台前,请认真阅读<a {{ $t('components.learnSysLayout.navigation.dialogMessage1')
href="https://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/pc/ciis/CIIS%E5%AD%A6%E7%94%9F%E6%89%8B%E5%86%8C.pdf" }}<a :href="$t('components.learnSysLayout.navigation.dialogMessageHref')" target="_blank">{{
target="_blank" $t('components.learnSysLayout.navigation.dialogMessage2')
>《紫荆教育-CIIS应用心理学硕士项目学员手册》</a }}</a
>内容,并同意遵守其中的各项要求。 >{{ $t('components.learnSysLayout.navigation.dialogMessage3') }}
</p> </p>
<el-checkbox v-model="checked">我已阅读并同意</el-checkbox> <el-checkbox v-model="checked">{{ $t('components.learnSysLayout.navigation.dialogCheckbox') }}</el-checkbox>
</div> </div>
<template #footer> <template #footer>
<el-button type="primary" :disabled="!checked" @click="handlePrimary">确 定</el-button> <el-button type="primary" :disabled="!checked" @click="handlePrimary">{{
$t('components.learnSysLayout.navigation.dialogButton')
}}</el-button>
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
...@@ -54,7 +56,8 @@ export default { ...@@ -54,7 +56,8 @@ export default {
dialogVisible: false, dialogVisible: false,
checked: false, checked: false,
sign: {}, sign: {},
documentUrl: '' documentUrl: '',
timer: null
} }
}, },
mounted() { mounted() {
...@@ -103,23 +106,27 @@ export default { ...@@ -103,23 +106,27 @@ export default {
return response return response
}) })
}, },
setTimer() {
this.timer = setInterval(() => {
this.getSignDocument(this.sign.flowid).then(response => {
if (this.documentUrl) {
this.clearTimer()
this.dialogVisible = false
} else {
this.dialogVisible = true
}
})
}, 5000)
},
clearTimer() {
this.timer && this.clearTimer(this.timer)
},
handlePrimary() { handlePrimary() {
this.getSignDocument(this.sign.flowid).then(response => { this.setTimer()
if (this.documentUrl) { this.newWindowPreview(this.sign.shortUrl)
this.dialogVisible = false
} else {
this.newWindowPreview(this.sign.shortUrl)
}
})
}, },
handleClose() { handleClose() {
this.getSignDocument(this.sign.flowid).then(response => { window.location.href = webConf.others.loginUrl
if (this.documentUrl) {
this.dialogVisible = false
} else {
window.location.href = webConf.others.loginUrl
}
})
}, },
// 新窗口预览 // 新窗口预览
newWindowPreview(url) { newWindowPreview(url) {
...@@ -133,6 +140,9 @@ export default { ...@@ -133,6 +140,9 @@ export default {
}, },
beforeMount() { beforeMount() {
this.createSign() this.createSign()
},
destroyed() {
this.clearTimer()
} }
} }
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论