提交 60e3e749 authored 作者: 王鹏飞's avatar 王鹏飞

国际化

上级 226c1d78
module.exports = {
domain: 'dev.ezijing.com',
url: 'https://sofia-learning.ezijing.com/api',
url: 'https://sofia-learning2.ezijing.com/api',
apiBaseURL: '/',
others: {
url: '/app/learn/course',
loginUrl: 'https://login.ezijing.com/sofia/login/index'
loginUrl: 'https://login2.ezijing.com/sofia/login/index'
},
webpack: {
externals: {
......
......@@ -212,7 +212,7 @@ export default class CourseAction extends BaseACTION {
})
if (cur.course_examination) {
let courseExamChildren = []
if (data.exist_examination.length > 1) {
if (data.exist_examination && data.exist_examination.length > 1) {
courseExamChildren = data.exist_examination.map((item, index) => {
const map = ['一', '二', '三']
return {
......
<template>
<div style="height: 100%; width: 100%;">
<div style="height: 100%; width: 100%">
<router-view></router-view>
<hanguage-switch></hanguage-switch>
</div>
</template>
<script>
import HanguageSwitch from './components/languageSwitch/index.vue'
export default {
components: { HanguageSwitch }
}
</script>
<style lang="scss" scoped>
// language-Switch {
// width: 200px;
// height: 200px;
// position: relative;
// bottom: 0px;
// left: 50%;
// background-color: #000;
// }
</style>
{
"Login": {
"title": "紫荆教育MBA学习系统",
"title1": "紫荆教育MBA学习系统",
"title2": "教学系统",
"codeLogin": "验证码登录",
"normalLogin": "账号登录",
"forgetPassword": "忘记密码",
"findPwdStr": "请联系管理员找回密码"
},
"action": {
"courseAction": {
"all": "全部",
......@@ -62,7 +54,6 @@
"btnName": "点击上传",
"approvalTime": "审核时间",
"saveSubmit": "保存并提交",
"backlist": "返回列表",
"remarks": "备注",
"applyforrerepair": "重修申请",
......@@ -80,7 +71,6 @@
"newEvent": "申请新的活动",
"tip": "提示",
"ok": "确定",
"title": "办事大厅",
"applyfornewmusicsharing": "申请新乐分享",
"applyforrerepair": "申请重修",
......@@ -98,18 +88,16 @@
"activityContent": "学术活动内容",
"entActCon": "请输入活动内容",
"approvalTime": "审核时间",
"backlist": "返回列表",
"beizhu": "备注",
"people": "主 讲 人",
"people2": "请输入主讲人",
"savesubmit" : "保存提交"
"savesubmit": "保存提交"
},
"myApply": {
"index": "序号",
"matter": "事项",
"submitTime": "提交时间",
"query": "查询",
"Approvalresults": "审批结果",
"Approvaltime": "审批时间",
......@@ -117,12 +105,11 @@
"peopleclass": "提交人班级",
"choose": "请选择",
"Ongoing": "进行中的",
"Completed" : "已完成"
"Completed": "已完成"
},
"shareAdd": {
"sname": "姓名",
"approvalTime": "审核时间",
"shareapplication": "乐分享申请",
"inputname": "请输入您的姓名",
"industry": "行业",
......@@ -137,16 +124,15 @@
"inputSharingthemes": "请输入分享主题",
"backlist": "返回列表",
"remarks": "备注",
"savesubmit" : "保存提交"
"savesubmit": "保存提交"
},
"uploadReport": {
"savesubmit" : "保存提交",
"savesubmit": "保存提交",
"name": "学术报告主题",
"placename": "请输入报告主题",
"labeltitle": "学术报告摘要",
"placetitle": "请输入报告摘要",
"file": "附 件",
"title": "学术报告提交",
"backText": "返回活动列表",
"uploadButtonText": "点击上传",
......@@ -157,33 +143,30 @@
"viewReport": {
"title": "学术报告所在活动列表",
"backText": "返回活动列表",
"clickup" : "点击上传",
"canup" : "(可以上传word、ppt等资源。系统提供模板下载)",
"Templatedownload" : "模板下载",
"Downloaduploaded" : "下载已上传附件",
"savesubmit" : "保存提交"
"clickup": "点击上传",
"canup": "(可以上传word、ppt等资源。系统提供模板下载)",
"Templatedownload": "模板下载",
"Downloaduploaded": "下载已上传附件",
"savesubmit": "保存提交"
},
"hall-form": {
"examSubmitted": "已提交",
"examSubmit": "提交",
"phone": "电话",
"email": "邮箱",
"email2": "邮箱",
"printed": "需打印的份数",
"electronicreportcard": "电子成绩单",
"Paperreportcard": "纸质成绩单",
"graduatetip" : "毕业生可申请成绩单。",
"msgtip" : "(请仔细核查您填写的信息后提交,提交后不可修改。电子成绩单将发送至您填写的邮箱。",
"msgtip2" : "(请仔细核查您填写的信息后提交,提交后不可修改。电子成绩单将发送至您填写的邮箱。"
"graduatetip": "毕业生可申请成绩单。",
"msgtip": "(请仔细核查您填写的信息后提交,提交后不可修改。电子成绩单将发送至您填写的邮箱。",
"msgtip2": "(请仔细核查您填写的信息后提交,提交后不可修改。电子成绩单将发送至您填写的邮箱。"
},
"pay": {
"Newpayment": "新增缴费凭证"
},
"payItem": {
"approvalStatus": "审核状态",
"paytime": "支付时间",
"paytimemsg": "请选择日期",
"pay": "支付方式",
......@@ -198,7 +181,6 @@
"bank3": "支付宝户名:清控紫荆(北京)教育科技股份有限公司",
"bank4": "支付宝户名:清控紫荆(北京)教育科技股份有限公司"
}
},
"learn": {
"course": {
......@@ -359,39 +341,6 @@
"Appliedactivities": "已申请的活动"
}
},
"feedback": {
"feedbackList": {
"technology": "技术",
"administration": "教务",
"all": "全部",
"title": "系统反馈",
"btnQuestion": "提出问题",
"tapType": "分类",
"pending": "待处理",
"processing": "处理中",
"processed": "已处理",
"probDesc": "问题描述:",
"downloadAtta": "下载附件:",
"publishTime": "发布时间:",
"questionReply": "问题回复:",
"no": "暂无"
},
"feedbackCreate": {
"title": "系统反馈",
"probDesc": "问题描述:",
"enterDesc": "请输入问题描述",
"problemDetails": "问题详情:",
"uploadAtta": "上传附件",
"limit": "(可以上传 word、ppt、png、jpg、zip、rar等资源,多文件请先压缩打包成一个文件后,再上传)",
"submitTo": "提交给",
"technology": "技术",
"administration": "教务",
"all": "全部",
"btnUpload": "点击上传",
"downloadButtonText": "下载已上传附件",
"subBtn": "提交"
}
},
"grade": {
"credit": {
"title": "我的学分",
......@@ -437,48 +386,11 @@
"previouspage": "上一页",
"submit": "提交",
"nextpage": "下一页"
}
},
"other": {
"message": {
"title": "通知",
"tip": "您没有收到任何通知"
},
"setPwd": {
"title": "修改密码",
"Oldpassword": "旧密码",
"inputOldpassword": "请输入密码",
"newpassword": "新密码",
"inputnewpassword": "请输入新密码",
"Repeatnewpassword": "重复新密码",
"inputRepeatnewpassword": "请重复输入新密码",
"save": "保存"
},
"updatePic": {
"title": "修改头像",
"student": "学员姓名:",
"studentnum": "学员学号:",
"studentid": "学员sid:",
"studentsoid": "学员sso_id:",
"msg": "支持jpg、gif、png或bmp格式的图片,建议文件小于5M",
"clickup": "点击上传",
"Oldpassword": "旧密码",
"inputOldpassword": "请输入密码",
"newpassword": "新密码",
"inputnewpassword": "请输入新密码",
"Repeatnewpassword": "重复新密码",
"inputRepeatnewpassword": "请重复输入新密码",
"save": "保存"
}
},
"mobile": {
"studentHelp": {
"title": "使用指南 - 学生端"
},
"teacherHelp": {
"title": "使用指南 - 教师端"
......@@ -500,5 +412,60 @@
"goLive": "进入直播",
"startTime": "将于{time}开始",
"replayTips": "提示语:已参加的课程请到电脑端学习系统观看回放"
},
"password": {
"title": "修改密码",
"Oldpassword": "旧密码",
"inputOldpassword": "请输入密码",
"newpassword": "新密码",
"inputnewpassword": "请输入新密码",
"Repeatnewpassword": "重复新密码",
"inputRepeatnewpassword": "请重复输入新密码",
"save": "保存"
},
"avatar": {
"title": "修改头像",
"student": "学员姓名:",
"studentnum": "学员学号:",
"studentid": "学员sid:",
"studentsoid": "学员sso_id:",
"msg": "支持jpg、gif、png或bmp格式的图片,建议文件小于5M",
"clickup": "点击上传",
"save": "保存"
},
"message": {
"title": "通知",
"tip": "您没有收到任何通知"
},
"feedbackList": {
"technology": "技术",
"administration": "教务",
"all": "全部",
"title": "系统反馈",
"btnQuestion": "提出问题",
"tapType": "分类",
"pending": "待处理",
"processing": "处理中",
"processed": "已处理",
"probDesc": "问题描述:",
"downloadAtta": "下载附件:",
"publishTime": "发布时间:",
"questionReply": "问题回复:",
"no": "暂无"
},
"feedbackCreate": {
"title": "系统反馈",
"probDesc": "问题描述:",
"enterDesc": "请输入问题描述",
"problemDetails": "问题详情:",
"uploadAtta": "上传附件",
"limit": "(可以上传 word、ppt、png、jpg、zip、rar等资源,多文件请先压缩打包成一个文件后,再上传)",
"submitTo": "提交给",
"technology": "技术",
"administration": "教务",
"all": "全部",
"btnUpload": "点击上传",
"downloadButtonText": "下载已上传附件",
"subBtn": "提交"
}
}
......@@ -33,6 +33,7 @@ export default {
methods: {
createEditor() {
const config = {
language: this.$i18n.locale.toLocaleLowerCase(),
height: 400,
uiColor: '#eeeeee',
filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload',
......
<template>
<div class="tap-language-switch">
<el-menu class="el-menu-demo" mode="horizontal" @select="handleSelect">
<el-submenu index="1">
<template slot="title">{{ show }}</template>
<template v-for="item in language.arr">
<template v-for="(v, k) in item">
<el-menu-item :key="k" :index="k">{{v}}</el-menu-item>
</template>
</template>
</el-submenu>
</el-menu>
</div>
<div class="language-switch">
<el-select size="medium" v-model="value" @change="handleChange">
<el-option v-for="item in languages" :key="item.value" :label="item.name" :value="item.value"> </el-option>
</el-select>
</div>
</template>
<script>
import Cookies from 'js-cookie'
import language from '@/assets/languages/language'
export default {
name: 'sLanguage',
componentName: 'sLanguage',
data () {
const _defaultLocale = 'zh-CN'
const _lang = Cookies.get('lang') || window.navigator.language || window.navigator.userLanguage || ''
if (_lang) {
if (language[_lang]) {
this.$i18n.locale = _lang
} else {
let flag = true
/* 做一下 兼容性处理 */
for (const k in language) {
const reg = new RegExp(k, 'gi')
if (reg.test(_lang)) {
this.$i18n.locale = k
flag = false
break
}
}
if (flag) {
/* 当前语言版本 - 不再我们的语言库中,那么默认 en */
this.$i18n.locale = _defaultLocale
Cookies.set('lang', _defaultLocale, { expires: 30, domain: '.ezijing.com' })
}
}
} else {
this.$i18n.locale = _defaultLocale
Cookies.set('lang', _defaultLocale, { expires: 30, domain: '.ezijing.com' })
}
let show = language[this.$i18n.locale].show
language[this.$i18n.locale].arr.forEach((item, i) => {
if (item[this.$i18n.locale]) {
show = item[this.$i18n.locale]
}
})
name: 'LanguageSwitch',
data() {
return {
show: show,
language: language[this.$i18n.locale]
value: this.$i18n.locale,
languages: [
{ name: '中文', value: 'zh-CN' },
{ name: 'English', value: 'en' }
]
}
},
mounted () {},
methods: {
handleSelect (key, val) {
Cookies.set('lang', key, { expires: 30, domain: '.ezijing.com' })
this.$i18n.locale = key
handleChange(value) {
Cookies.set('lang', value, { expires: 30, domain: '.ezijing.com' })
this.$i18n.locale = value
/* 刷新页面 */
this.$router.go(0)
}
......@@ -71,17 +32,11 @@ export default {
</script>
<style lang="scss" scoped>
.tap-language-switch {
position: absolute;
right: 150px;
top: 0px;
z-index: 9999999999;
.el-menu {
border: none;
.language-switch {
width: 100px;
::v-deep .el-input__inner {
background: transparent;
}
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
border: none;
border: 0;
}
}
</style>
......@@ -4,45 +4,42 @@
<img class="logo" src="@/assets/images/logo-header.png" alt="logo" />
<div class="text-title" @click="setStatus">{{ $t('components.learnSysLayout.navigation.title') }}</div>
</div>
<!-- <s-language></s-language> -->
<div class="notify" @click="goNotify()">{{ $t('components.learnSysLayout.navigation.tip') }}
<div class="num" v-if="this.$store.getters.myMsg !=0">{{ this.$store.getters.myMsg }}</div>
<div class="nav-right">
<div class="notify" @click="goNotify()">
{{ $t('components.learnSysLayout.navigation.tip') }}
<div class="num" v-if="this.$store.getters.myMsg != 0">{{ this.$store.getters.myMsg }}</div>
</div>
<language-switch />
</div>
</div>
</template>
<script>
// import sLanguage from '@/components/languageSwitch/index.vue'
import LanguageSwitch from '@/components/languageSwitch/index.vue'
import cAction from '../../action'
export default {
components: {},
data () {
components: { LanguageSwitch },
data() {
return {
num: this.$store.getters.myMsg
}
},
mounted () {
// request({
// component: this,
// actionName: 'Other',
// functionName: 'getNavMsg',
// data: {},
// thenCallback: data => {
// this.$store.commit('myMsg', data.num)
// },
// catchCallback: () => {},
// finallyCallback: () => {}
// })
cAction.Other.getNavMsg().then(data => {
this.$store.commit('myMsg', data.num)
}).catch(e => { this.$message.error(e.message) }).finally(() => { })
mounted() {
cAction.Other.getNavMsg()
.then(data => {
this.$store.commit('myMsg', data.num)
})
.catch(e => {
this.$message.error(e.message)
})
.finally(() => {})
},
methods: {
goNotify () {
goNotify() {
this.$router.push({ path: '/app/other/message' })
},
setStatus () {
setStatus() {
if (this.status) {
this.status = false
} else {
......@@ -56,9 +53,10 @@ export default {
<style scoped lang="scss">
.menu {
width: 100%;
height: 100%;
color: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
color: #fff;
.nav-left {
float: left;
position: relative;
......@@ -78,6 +76,10 @@ export default {
font-size: 16px;
}
}
.nav-right {
display: flex;
align-items: center;
}
.notify {
position: relative;
float: right;
......
......@@ -33,6 +33,7 @@ export default {
methods: {
createEditor() {
const config = {
language: this.$i18n.locale.toLocaleLowerCase(),
height: 400,
uiColor: '#eeeeee',
filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload',
......
......@@ -2,7 +2,7 @@
<div class="upload">
<el-upload action :disabled="disabled" :show-file-list="false" :http-request="httpRequest">
<slot></slot>
<el-button type="text" icon="el-icon-upload">点击上传</el-button>
<el-button type="text" icon="el-icon-upload">{{ $t('viewerWork.clickUpload') }}</el-button>
<template v-slot:tip>
<div class="el-upload__tips">
<slot name="tip"></slot>
......@@ -17,12 +17,12 @@
</a>
<div>
<a href="javascript:;" @click="handleRemove(index)" style="margin-right: 10px" v-if="!disabled">
<el-tooltip effect="dark" content="删除">
<el-tooltip effect="dark" :content="$t('viewerWork.delete')">
<i class="el-icon-delete"></i>
</el-tooltip>
</a>
<a :href="item.url" :download="item.name" target="_blank">
<el-tooltip effect="dark" content="下载">
<el-tooltip effect="dark" :content="$t('viewerWork.download')">
<i class="el-icon-download"></i>
</el-tooltip>
</a>
......@@ -59,7 +59,7 @@ export default {
return { name: item.name || item, url: item.url || item }
})
} else {
fileList.push({ name: '附件下载', url: value })
fileList.push({ name: this.$t('viewerWork.downloadName'), url: value })
}
this.fileList = fileList
}
......
<template>
<container :title="detail.paper_title" v-loading="loading">
<template v-slot:header-aside v-if="isExamComplete">分数:{{exam.score.total}}</template>
<template v-slot:header-aside v-if="isExamComplete">
{{ $t('viewerWork.fraction') }}{{ exam.score.total }}{{ $t('viewerWork.fractionUnit') }}
</template>
<div class="exam">
<template v-if="isSubmited && !isExamComplete">
<div class="no-exam">试卷批改中,请耐心等待</div>
<div class="no-exam">{{ $t('viewerWork.examSubmitedTips') }}</div>
</template>
<template v-else>
<!-- 考试期间,未开始考试 -->
<div class="exam-welcome" v-if="!isStartExam">
<div v-if="detail.paper_deadline">考试截止时间:{{detail.paper_deadline}}</div>
<el-button
type="primary"
:disabled="!isExamTime"
@click="onStartExam"
>{{startExamButtonText}}</el-button>
<div v-if="detail.paper_deadline">{{ $t('viewerWork.examDeadline') }}{{ detail.paper_deadline }}</div>
<el-button type="primary" :disabled="!isExamTime" @click="onStartExam">{{ startExamButtonText }}</el-button>
</div>
<!-- 考试试题 -->
<div class="exam-form" v-if="isStartExam">
......@@ -30,8 +28,8 @@
></exam-item>
</template>
<div class="exam-buttons">
<el-tooltip effect="dark" content="提交之后就不能修改了哦" placement="right">
<el-button type="primary" :loading="submitLoading" @click="onSubmit">{{submitText}}</el-button>
<el-tooltip effect="dark" :content="$t('viewerWork.examSubmitButtonTips')" placement="right">
<el-button type="primary" :loading="submitLoading" @click="onSubmit">{{ submitText }}</el-button>
</el-tooltip>
</div>
</el-form>
......@@ -87,9 +85,7 @@ export default {
immediate: true,
handler(data) {
this.detail = data.paper
this.questions = data.paper
? this.genQuestions(data.paper.examination)
: []
this.questions = data.paper ? this.genQuestions(data.paper.examination) : []
}
}
},
......@@ -118,7 +114,7 @@ export default {
},
// 考试按钮
startExamButtonText() {
return this.isExamTime ? '开始考试' : '考试结束'
return this.isExamTime ? this.$t('viewerWork.examStartButtonText') : this.$t('viewerWork.examEndButtonText')
},
// 考试完成
isExamComplete() {
......@@ -131,7 +127,7 @@ export default {
},
// 提交按钮文本
submitText() {
return this.isSubmited ? '已提交' : '提交'
return this.isSubmited ? this.$t('viewerWork.submitedText') : this.$t('viewerWork.submitText')
}
},
methods: {
......@@ -170,9 +166,7 @@ export default {
type: 3,
formModel: {
id: item.id,
user_answer: item.user_answer
? Base64.decode(item.user_answer.replace(/ /gi, '+'))
: '',
user_answer: item.user_answer ? Base64.decode(item.user_answer.replace(/ /gi, '+')) : '',
attachments: item.attachments || []
}
}
......@@ -183,20 +177,18 @@ export default {
},
// 获取考试结果
getExamResult() {
api
.getCourseExamResult(this.sid, this.cid, this.pid, { paper_type: 0 })
.then(response => {
// 设置问题列表数据
if (response.code !== 8001) {
this.isStartExam = true
this.exam = response
this.questions = this.genQuestions(response.sheet)
// 自动提交
if (this.isStartExam && !this.isSubmited && !this.isExamComplete) {
this.autoSubmit()
}
api.getCourseExamResult(this.sid, this.cid, this.pid, { paper_type: 0 }).then(response => {
// 设置问题列表数据
if (response.code !== 8001) {
this.isStartExam = true
this.exam = response
this.questions = this.genQuestions(response.sheet)
// 自动提交
if (this.isStartExam && !this.isSubmited && !this.isExamComplete) {
this.autoSubmit()
}
})
}
})
},
// 提交校验
checkSubmit() {
......@@ -216,7 +208,7 @@ export default {
// 校验
if (!this.checkSubmit()) {
this.messageInstance && this.messageInstance.close()
this.messageInstance = this.$message.error('还有题目未做,不能提交')
this.messageInstance = this.$message.error(this.$t('viewerWork.examSubmitError'))
return
}
// 提交的答案数据
......@@ -276,7 +268,7 @@ export default {
return
}
if (response.code === 200) {
this.$message.success('考试答卷提交成功')
this.$message.success(this.$t('viewerWork.examSubmitSuccess'))
this.autoSubmitTimer && clearInterval(this.autoSubmitTimer)
this.getExamResult()
} else {
......
<template>
<container :title="chapter.name" v-loading="loading">
<template v-slot:header-aside v-if="isSubmited">正确率{{ detail.score }}%</template>
<template v-slot:header-aside v-if="isSubmited">{{ $t('viewerWork.correctRate') }}{{ detail.score }}%</template>
<div class="exam">
<div class="exam-form">
<el-form :disabled="isSubmited">
......@@ -14,7 +14,7 @@
:key="item.id"
></exam-item>
<div class="exam-buttons">
<el-tooltip effect="dark" content="提交之后就不能修改了哦" placement="right">
<el-tooltip effect="dark" :content="$t('viewerWork.examSubmitButtonTips')" placement="right">
<el-button type="primary" :loading="submitLoading" @click="onSubmit">{{ submitText }}</el-button>
</el-tooltip>
</div>
......@@ -93,7 +93,7 @@ export default {
},
// 提交按钮文本
submitText() {
return this.isSubmited ? '已提交' : '提交'
return this.isSubmited ? this.$t('viewerWork.submitedText') : this.$t('viewerWork.submitText')
}
},
methods: {
......@@ -179,7 +179,7 @@ export default {
// 校验
if (!this.checkSubmit()) {
this.messageInstance && this.messageInstance.close()
this.messageInstance = this.$message.error('还有题目未做,不能提交')
this.messageInstance = this.$message.error(this.$t('viewerWork.examSubmitError'))
return
}
// 计算答题时间
......
......@@ -13,26 +13,26 @@
></exam-item>
</el-form>
</div>
<p style="color:red;" v-if="deadline">请于截止日期 {{ deadline }} 前提交</p>
<p style="color: red" v-if="deadline">{{ $t('viewerWork.deadline', { deadline }) }}</p>
<!-- 驳回状态 -->
<template v-if="detail && detail.status === 1">
<div class="work-bottom">
<div class="info">
<div class="paper-check">
<h4>作业被驳回,点击“重新编辑”按钮重新编辑内容再次提交</h4>
<h4>{{ $t('viewerWork.rejectTips') }}</h4>
<div class="paper-check-item">
<b>驳回时间</b>
<b>{{ $t('viewerWork.rejectTime') }}</b>
{{ detail.checker_time }}
</div>
<div class="paper-check-item">
<b>驳回说明</b>
<b>{{ $t('viewerWork.rejectContent') }}</b>
<div class="edit_html" v-html="detail.check_comments"></div>
</div>
</div>
</div>
</div>
<div class="buttons">
<el-button type="primary" @click="onReEdit" :disabled="!isWorkTime">重新编辑</el-button>
<el-button type="primary" @click="onReEdit" :disabled="!isWorkTime">{{ $t('viewerWork.reEdit') }}</el-button>
</div>
</template>
<!-- 正常状态 -->
......@@ -41,38 +41,30 @@
<div class="info">
<template v-if="isRevised">
<div class="paper-check">
<p>批改时间{{ detail.checker_time }}</p>
<p>{{ $t('viewerWork.correctionTime') }}{{ detail.checker_time }}</p>
<div class="paper-check-item">
<b>评分</b>
<b>{{ $t('viewerWork.score') }}</b>
{{ detail.score }}
</div>
<div class="paper-check-item">
<b>评语</b>
<b>{{ $t('viewerWork.comments') }}</b>
<div class="edit_html" v-html="detail.check_comments"></div>
</div>
</div>
</template>
<template v-else-if="detail.created_time">
<p class="help">已于 {{ detail.created_time }} 提交,等待老师批改中。</p>
<template
v-if="
detail.updated_time &&
detail.updated_time !== detail.created_time
"
>
<p class="help">最近提交时间: {{ detail.updated_time }}</p>
<p class="help">{{ $t('viewerWork.deadline', { time: detail.created_time }) }}</p>
<template v-if="detail.updated_time && detail.updated_time !== detail.created_time">
<p class="help">{{ $t('viewerWork.submitDateTime') }} {{ detail.updated_time }}</p>
</template>
</template>
</div>
</div>
<div class="buttons">
<el-tooltip content="在获老师批改之前,可以多次提交,将以最后一次提交为准" placement="right">
<el-button
type="primary"
:disabled="disabled || !isWorkTime"
:loading="submitLoading"
@click="onSubmit"
>{{ submitText }}</el-button>
<el-tooltip :content="$t('viewerWork.workSubmitButtonTips')" placement="right">
<el-button type="primary" :disabled="disabled || !isWorkTime" :loading="submitLoading" @click="onSubmit">{{
submitText
}}</el-button>
</el-tooltip>
</div>
</template>
......@@ -124,9 +116,7 @@ export default {
chapter: {
immediate: true,
handler(data) {
this.questions = data.homework
? this.genQuenstions(data.homework.questions)
: []
this.questions = data.homework ? this.genQuenstions(data.homework.questions) : []
}
}
},
......@@ -153,7 +143,7 @@ export default {
},
// 提交按钮文本
submitText() {
return this.isRevised ? '已批改' : '提交'
return this.isRevised ? this.$t('viewerWork.revisedButtonText') : this.$t('viewerWork.submitText')
},
// 是否是提交作业时间
isWorkTime() {
......@@ -169,11 +159,9 @@ export default {
methods: {
// 获取作业截止时间
getDeadline() {
api
.getChapterHomeworkDeadline(this.sid, this.cid, this.pid)
.then(response => {
this.deadline = response.dead_line
})
api.getChapterHomeworkDeadline(this.sid, this.cid, this.pid).then(response => {
this.deadline = response.dead_line
})
},
// 获取详情
getDetail() {
......@@ -188,9 +176,7 @@ export default {
const parseAnswers = JSON.parse(this.detail.work_contents)
// 设置答案
this.questions = this.questions.map(item => {
const found = parseAnswers.find(
answer => answer.question_id === item.id
)
const found = parseAnswers.find(answer => answer.question_id === item.id)
if (found) {
item.user_answer = found.descreption
item.attachments = found.file_url
......@@ -226,9 +212,7 @@ export default {
temp = {
formModel: {
id: item.id,
user_answer: item.user_answer
? Base64.decode(item.user_answer)
: '',
user_answer: item.user_answer ? Base64.decode(item.user_answer) : '',
attachments: item.attachments || ''
}
}
......@@ -238,9 +222,7 @@ export default {
item,
{
content: item.question_content,
options: item.question_options
? JSON.parse(item.question_options)
: []
options: item.question_options ? JSON.parse(item.question_options) : []
},
temp
)
......@@ -262,23 +244,17 @@ export default {
// 校验
if (!this.checkSubmit()) {
this.messageInstance && this.messageInstance.close()
this.messageInstance = this.$message.error(
'答题内容不能为空,请检查并输入内容'
)
this.messageInstance = this.$message.error(this.$t('viewerWork.examSubmitError'))
return
}
// 计算答题时间
const duration = Math.floor(
(new Date().getTime() - this.startTime) / 1000
)
const duration = Math.floor((new Date().getTime() - this.startTime) / 1000)
// 提交的答案数据
const answers = this.questions.map(item => {
return {
question_id: item.id,
descreption:
item.question_type === 3
? Base64.encode(item.formModel.user_answer)
: item.formModel.user_answer,
item.question_type === 3 ? Base64.encode(item.formModel.user_answer) : item.formModel.user_answer,
file_url: item.formModel.attachments,
is_encoded: 1
}
......@@ -302,7 +278,7 @@ export default {
.sbumitChapterHomework(params)
.then(response => {
if (response.status) {
this.$message.success('提交成功,等待批改')
this.$message.success(this.$t('viewerWork.examSubmitSuccess'))
this.getDetail()
} else {
this.$message.error(response.data.error)
......
<template>
<container :title="exam.title" v-loading="!loaded">
<template v-slot:header-aside>
<template v-if="isCompleted">分数:{{ exam.score.total }}</template>
<template v-else>考试时间:{{ status.start_time }} ~ {{ status.terminate_time }}</template>
<template v-if="isCompleted">
{{ $t('viewerWork.fraction') }}{{ exam.score.total }}{{ $t('viewerWork.fractionUnit') }}
</template>
<template v-else>{{ $t('viewerWork.examTime') }}{{ status.start_time }} ~ {{ status.terminate_time }}</template>
</template>
<div class="exam">
<template v-if="status.examination_status === '00'">
<div class="no-exam">暂无考试</div>
<div class="no-exam">{{ $t('viewerWork.examEmpty') }}</div>
</template>
<template v-else-if="isSubmited && !isCompleted && !isMultipleExams">
<div class="no-exam">试卷批改中,请耐心等待</div>
<div class="no-exam">{{ $t('viewerWork.examSubmitedTips') }}</div>
</template>
<template v-else>
<!-- 考试试题 -->
......@@ -31,12 +33,14 @@
<div class="exam-buttons">
<!-- 允许多次提交 -->
<template v-if="isMultipleExams">
<el-button type="primary" @click="handlePrev" v-if="hasPrev">上一套试卷</el-button>
<el-button type="primary" @click="handleNext" v-if="hasNext">下一套试卷</el-button>
<el-button type="primary" @click="handleNewExam" v-if="hasResubmit">再考一次</el-button>
<el-button type="primary" @click="handlePrev" v-if="hasPrev">{{ $t('viewerWork.prevPapers') }}</el-button>
<el-button type="primary" @click="handleNext" v-if="hasNext">{{ $t('viewerWork.nextPapers') }}</el-button>
<el-button type="primary" @click="handleNewExam" v-if="hasResubmit">
{{ $t('viewerWork.anotherSubmitText') }}
</el-button>
</template>
<template v-if="!(isSubmited && isMultipleExams)">
<el-tooltip effect="dark" content="提交之后就不能修改了哦" placement="right">
<el-tooltip effect="dark" :content="$t('viewerWork.examSubmitButtonTips')" placement="right">
<el-button type="primary" :disabled="!canEditable" :loading="submitLoading" @click="onSubmit">{{
submitText
}}</el-button>
......@@ -91,7 +95,7 @@ export default {
submitLoading: false,
isMultipleExams: false, // 是否可以多次考试
maxExams: 3, // 最多考试几次
examCount: this.data.exist_examination.length || 0 // 试卷数量
examCount: this.data.exist_examination ? this.data.exist_examination.length : 0 // 试卷数量
}
},
watch: {
......@@ -135,7 +139,7 @@ export default {
},
// 提交按钮文本
submitText() {
return this.isSubmited ? '已提交' : '提交'
return this.isSubmited ? this.$t('viewerWork.submitedText') : this.$t('viewerWork.submitText')
},
// 试卷页码
offset() {
......@@ -268,7 +272,7 @@ export default {
// 校验
if (!this.checkSubmit()) {
this.messageInstance && this.messageInstance.close()
this.messageInstance = this.$message.error('还有题目未做,不能提交')
this.messageInstance = this.$message.error(this.$t('viewerWork.examSubmitError'))
return
}
// 提交的答案数据
......@@ -328,7 +332,7 @@ export default {
return
}
if (response.code === 200) {
this.$message.success('考试答卷提交成功')
this.$message.success(this.$t('viewerWork.examSubmitSuccess'))
this.autoSubmitTimer && clearInterval(this.autoSubmitTimer)
this.getExam()
} else {
......
......@@ -2,13 +2,13 @@
<template>
<container :title="chapter.name" v-loading="loading">
<el-steps direction="vertical" v-if="data.curriculum">
<el-step title="阅读大作业要求" status="process">
<el-step :title="$t('viewerWork.workStep1')" status="process">
<template v-slot:description>
<div v-html="data.curriculum.curriculum_essay"></div>
<p>截止日期:{{data.essay_date}}</p>
<p>{{ $t('viewerWork.workDeadline') }}{{ data.essay_date }}</p>
</template>
</el-step>
<el-step title="填写作业主题、正文,上传附件(点击“提交”保存)" status="process">
<el-step :title="$t('viewerWork.workStep2')" status="process">
<template v-slot:description>
<el-form
:model="ruleForm"
......@@ -18,56 +18,59 @@
label-position="top"
ref="ruleForm"
>
<el-form-item label="主题" prop="essay_name">
<el-input v-model="ruleForm.essay_name" placeholder="主题" maxlength="50"></el-input>
<el-form-item :label="$t('viewerWork.workTheme.label')" prop="essay_name">
<el-input
v-model="ruleForm.essay_name"
:placeholder="$t('viewerWork.workTheme.placeholder')"
maxlength="50"
></el-input>
</el-form-item>
<el-form-item label="正文" prop="essay_description">
<el-form-item :label="$t('viewerWork.workDescription.label')" prop="essay_description">
<!-- 编辑器 -->
<v-editor :disabled="isRevised" v-model="ruleForm.essay_description"></v-editor>
</el-form-item>
<el-form-item prop="url">
<!-- 文件上传 -->
<v-upload v-model="ruleForm.url">
请上传对应的文件附件:
{{ $t('viewerWork.workUrl.label') }}
<!-- <template v-slot:tip>只支持docx格式的文件,文件小于10M</template> -->
</v-upload>
</el-form-item>
</el-form>
</template>
</el-step>
<el-step title="截止日期前提交" status="process">
<el-step :title="$t('viewerWork.workStep3')" status="process">
<template v-slot:description>
<div class="work-bottom" v-if="detail">
<div class="info">
<template v-if="isRevised">
<div class="paper-check">
<p>批改时间:{{detail.check_date}}</p>
<p>{{ $t('viewerWork.correctionTime') }}{{ detail.check_date }}</p>
<div class="paper-check-item">
<b>评分</b>
{{detail.score}}
<b>{{ $t('viewerWork.score') }}</b>
{{ detail.score }}
</div>
<div class="paper-check-item">
<b>评语</b>
<b>{{ $t('viewerWork.comments') }}</b>
<div class="edit_html" v-html="detail.check_comments"></div>
</div>
</div>
</template>
<template v-else-if="detail.created_time">
<p class="help">已于 {{detail.created_time}} 提交,等待老师批改中。</p>
<p class="help">
{{ $t('viewerWork.submitted', { time: detail.created_time }) }}
</p>
<template v-if="detail.updated_time && detail.updated_time !== detail.created_time">
<p class="help">最近提交时间: {{detail.updated_time}}</p>
<p class="help">{{ $t('viewerWork.submitDateTime') }} {{ detail.updated_time }}</p>
</template>
</template>
</div>
</div>
<div class="buttons">
<el-tooltip content="在获老师批改之前,可以多次提交,将以最后一次提交为准" placement="right">
<el-button
type="primary"
:disabled="isRevised"
:loading="submitLoading"
@click="onSubmit"
>{{submitText}}</el-button>
<el-tooltip :content="$t('viewerWork.workSubmitButtonTips')" placement="right">
<el-button type="primary" :disabled="isRevised" :loading="submitLoading" @click="onSubmit">{{
submitText
}}</el-button>
</el-tooltip>
</div>
</template>
......@@ -112,13 +115,9 @@ export default {
url: ''
},
rules: {
essay_name: [
{ required: true, message: '请输入主题', trigger: 'blur' }
],
essay_description: [
{ required: true, message: '请输入正文', trigger: 'change' }
],
url: [{ required: true, message: '请上传附件', trigger: 'change' }]
essay_name: [{ required: true, message: this.$t('viewerWork.workTheme.rule'), trigger: 'blur' }],
essay_description: [{ required: true, message: this.$t('viewerWork.workDescription.rule'), trigger: 'change' }],
url: [{ required: true, message: this.$t('viewerWork.workUrl.rule'), trigger: 'change' }]
},
detail: null,
loading: false,
......@@ -141,7 +140,7 @@ export default {
},
// 提交按钮文本
submitText() {
return this.isRevised ? '已批改' : '提交'
return this.isRevised ? this.$t('viewerWork.revisedButtonText') : this.$t('viewerWork.submitText')
}
},
methods: {
......@@ -166,15 +165,15 @@ export default {
onSubmit() {
this.messageInstance && this.messageInstance.close()
if (!this.ruleForm.essay_name) {
this.messageInstance = this.$message.error('请输入主题')
this.messageInstance = this.$message.error(this.$t('viewerWork.workTheme.rule'))
return
}
if (!this.ruleForm.essay_description) {
this.messageInstance = this.$message.error('请输入正文')
this.messageInstance = this.$message.error(this.$t('viewerWork.workDescription.rule'))
return
}
if (!this.ruleForm.url) {
this.messageInstance = this.$message.error('请上传附件')
this.messageInstance = this.$message.error(this.$t('viewerWork.workUrl.rule'))
return
}
const params = Object.assign(this.ruleForm, {
......@@ -190,7 +189,7 @@ export default {
.updateCourseWork(this.sid, this.cid, params)
.then(response => {
if (response.status) {
this.$message.success('提交成功,等待批改')
this.$message.success(this.$t('viewerWork.examSubmitSuccess'))
this.getDetail()
} else {
this.$message.error(response.data.error)
......
......@@ -5,7 +5,7 @@
<div class="q-item-title" v-html="data.content"></div>
<div class="q-item-aside">
<template v-if="typeText">({{ typeText }})</template>
<template v-if="data.hasOwnProperty('score')">({{ data.score }})</template>
<template v-if="data.hasOwnProperty('score')">({{ data.score }}{{ $t('viewerWork.fractionUnit') }})</template>
</div>
</div>
<div class="q-item-bd">
......@@ -28,36 +28,40 @@
<!-- 简答题 -->
<template v-if="type === 3">
<v-editor v-model="currentValue.user_answer" :disabled="disabled"></v-editor>
<v-upload :disabled="disabled" v-model="currentValue.attachments">请上传对应的文件附件:</v-upload>
<v-upload :disabled="disabled" v-model="currentValue.attachments"
>{{ $t('viewerWork.workUrl.label') }}</v-upload
>
</template>
</div>
<div class="q-item-ft" v-if="disabled && showResult">
<template v-if="type === 3">
<p v-if="data.check_comment">
<span>评语</span>
<span>{{ $t('viewerWork.comments') }}</span>
<span>{{ data.check_comment }}</span>
</p>
</template>
<template v-else>
<div class="result">
<p>
<span>学生答案</span>
<span>{{ $t('viewerWork.studentAnswer') }}</span>
<span :class="isCorrect ? 'is-success' : 'is-error'">{{ submitAnswerText }}</span>
</p>
<p>
<span>正确答案</span>
<span>{{ $t('viewerWork.correctAnswer') }}</span>
<span>{{ correctAnswerText }}</span>
</p>
</div>
</template>
<p v-if="data.hasOwnProperty('get_score')">
<span>评分</span>
<span>{{ data.get_score }}</span>
<span>{{ $t('viewerWork.score') }}</span>
<span>{{ data.get_score }}{{ $t('viewerWork.fractionUnit') }}</span>
</p>
<div class="analyze" v-if="data.analysis">
<span>解析</span>
<span>{{ $t('viewerWork.analyze') }}</span>
<div class="analyze-main">
<span style="color: blue; cursor: pointer" @click="showAnalyze = !showAnalyze">查看解析</span>
<span style="color: blue; cursor: pointer" @click="showAnalyze = !showAnalyze">{{
$t('viewerWork.viewResolution')
}}</span>
<div v-html="data.analysis" v-if="data.analysis" v-show="showAnalyze" class="analyze-content"></div>
</div>
</div>
......@@ -121,7 +125,7 @@ export default {
},
// 选项类型
typeText() {
const map = { 1: '单选题', 2: '多选题' }
const map = { 1: this.$t('viewerWork.singleChoice'), 2: this.$t('viewerWork.multipleChoice') }
return map[this.type]
},
// 处理后的options数据
......
......@@ -22,7 +22,55 @@ export default {
pptClose: 'Close PPT',
pptPageText: 'Page'
},
viewerWork: {},
viewerWork: {
submitText: 'Submit',
submitedText: 'Submitted',
fraction: 'Score',
fractionUnit: '分',
examEmpty: 'No exam',
examTime: 'Exam time ',
examDeadline: 'Exam deadline',
examSubmitedTips: 'The test paper is being revised, please wait patiently',
examSubmitButtonTips: 'You cannot modify it after submitting',
examStartButtonText: 'Start exam',
examEndButtonText: 'End of exam',
examSubmitError: 'There are still questions that have not been done and cannot be submitted',
examSubmitSuccess: 'Submitted successfully',
prevPapers: 'Last set of test papers',
nextPapers: 'Next set of test papers',
anotherSubmitText: 'Take another test',
correctRate: 'Correct rate',
revisedButtonText: 'Corrected',
deadline: 'Please submit before the deadline {date}',
rejectTips: 'The assignment is rejected, click the "re-edit" button to re-edit the content and submit again',
rejectTime: 'Rejection time',
rejectContent: 'Rejection instructions',
reEdit: 're-edit',
correctionTime: 'Correction time',
score: 'Score',
comments: 'Comment',
submitted: 'Submitted at {time}, waiting for correction',
submitDateTime: 'Last submission time',
workSubmitButtonTips:
'It can be submitted multiple times before being approved by the teacher, and the last submission will prevail',
workDeadline: 'Deadline',
workStep1: 'Requirements',
workStep2: "Fill in the subject and text of the assignment and upload the attachment (click 'Submit' to save)",
workStep3: 'Submit before the deadline',
workTheme: { label: 'Theme', placeholder: 'Theme', rule: 'Please enter Theme' },
workDescription: { label: 'Text', placeholder: 'Text', rule: 'Please enter the text' },
workUrl: { label: 'Please upload the corresponding file attachment', rule: 'Please upload attachment' },
studentAnswer: 'Student answer',
correctAnswer: 'Correct answer',
analyze: 'Parsing',
viewResolution: 'View resolution',
singleChoice: 'Single Choice',
multipleChoice: 'Multiple Choice',
clickUpload: 'Click upload',
delete: 'Delete',
download: 'Download',
downloadName: 'Download attachment'
},
viewerExam: {},
viewerRead: {
download: 'Download',
......
......@@ -22,8 +22,54 @@ export default {
pptClose: '关闭PPT',
pptPageText: '页'
},
viewerWork: {},
viewerExam: {},
viewerWork: {
submitText: '提交',
submitedText: '已提交',
fraction: '分数',
fractionUnit: '分',
examEmpty: '暂无考试',
examTime: '考试时间',
examDeadline: '考试截止时间',
examSubmitedTips: '试卷批改中,请耐心等待',
examSubmitButtonTips: '提交之后就不能修改了哦',
examStartButtonText: '开始考试',
examEndButtonText: '考试结束',
examSubmitError: '还有题目未做,不能提交',
examSubmitSuccess: '提交成功',
prevPapers: '上一套试卷',
nextPapers: '下一套试卷',
anotherSubmitText: '再考一次',
correctRate: '正确率',
revisedButtonText: '已批改',
deadline: '请于截止日期 {date} 前提交',
rejectTips: '作业被驳回,点击“重新编辑”按钮重新编辑内容再次提交',
rejectTime: '驳回时间',
rejectContent: '驳回说明',
reEdit: '重新编辑',
correctionTime: '批改时间',
score: '评分',
comments: '评语',
submitted: '已于 {time} 提交,等待老师批改中。',
submitDateTime: '最近提交时间',
workSubmitButtonTips: '在获老师批改之前,可以多次提交,将以最后一次提交为准',
workDeadline: '截止日期',
workStep1: '阅读大作业要求',
workStep2: '填写作业主题、正文,上传附件(点击“提交”保存)',
workStep3: '截止日期前提交',
workTheme: { label: '主题', placeholder: '主题', rule: '请输入主题' },
workDescription: { label: '正文', placeholder: '主题', rule: '请输入正文' },
workUrl: { label: '请上传对应的文件附件', rule: '请上传附件' },
studentAnswer: '学生答案',
correctAnswer: '正确答案',
analyze: '解析',
viewResolution: '查看解析',
singleChoice: '单选题',
multipleChoice: '多选题',
clickUpload: '点击上传',
delete: '删除',
download: '下载',
downloadName: '附件下载'
},
viewerRead: {
download: '下载',
courseData: '课程资料',
......
<template>
<div>
<div class="con-title">{{ $t('pages.feedback.feedbackCreate.title') }}</div>
<div class="con-title">{{ $t('feedbackCreate.title') }}</div>
<div class="con-box">
<el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
<el-form ref="setApplyForm" :model="setApply" :rules="applyRules">
<el-form-item :label="$t('pages.feedback.feedbackCreate.probDesc')" prop="name">
<el-input v-model="setApply.name" :placeholder="$t('pages.feedback.feedbackCreate.enterDesc')" type="text" />
<el-form-item :label="$t('feedbackCreate.probDesc')" prop="name">
<el-input v-model="setApply.name" :placeholder="$t('feedbackCreate.enterDesc')" type="text" />
</el-form-item>
<div style="width: 100%; height: 10px;"></div>
<div class="label" style="font-size: 14px; line-height: 2;">{{ $t('pages.feedback.feedbackCreate.problemDetails') }}</div>
<div class="label" style="font-size: 14px; line-height: 2;">{{ $t('feedbackCreate.problemDetails') }}</div>
<textarea id="editor"></textarea>
<div style="width: 100%; height: 10px;"></div>
<el-form-item :label="$t('pages.feedback.feedbackCreate.uploadAtta')" prop="file">
<el-form-item :label="$t('feedbackCreate.uploadAtta')" prop="file">
<el-upload
ref="upFile"
class="upload-demo"
......@@ -23,17 +23,17 @@
:on-change="handleChange"
:http-request="uploadFile"
:file-list="filesArr">
<el-button size="small" type="primary">{{ $t('pages.feedback.feedbackCreate.btnUpload') }}</el-button>
<div slot="tip" class="el-upload__tip">{{ $t('pages.feedback.feedbackCreate.limit') }}</div>
<el-button size="small" type="primary">{{ $t('feedbackCreate.btnUpload') }}</el-button>
<div slot="tip" class="el-upload__tip">{{ $t('feedbackCreate.limit') }}</div>
<template v-if="successFileUrl">
{{successFileUrl.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}}
</template>
</el-upload>
<template v-if="successFileUrl">
<a :href="successFileUrl">{{ $t('pages.feedback.feedbackCreate.downloadButtonText') }}</a>
<a :href="successFileUrl">{{ $t('feedbackCreate.downloadButtonText') }}</a>
</template>
</el-form-item>
<el-form-item :label="$t('pages.feedback.feedbackCreate.submitTo')" prop="type_id">
<el-form-item :label="$t('feedbackCreate.submitTo')" prop="type_id">
<el-select v-model="value">
<el-option
v-for="item in options"
......@@ -44,7 +44,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onApplyFrom">{{$t('pages.feedback.feedbackCreate.subBtn')}}</el-button>
<el-button type="primary" @click="onApplyFrom">{{$t('feedbackCreate.subBtn')}}</el-button>
</el-form-item>
</el-form>
</el-col>
......@@ -83,9 +83,9 @@ export default {
file: ''
},
options: [
{ value: '0', label: this.$t('pages.feedback.feedbackCreate.all') },
{ value: '1', label: this.$t('pages.feedback.feedbackCreate.administration') },
{ value: '2', label: this.$t('pages.feedback.feedbackCreate.technology') }
{ value: '0', label: this.$t('feedbackCreate.all') },
{ value: '1', label: this.$t('feedbackCreate.administration') },
{ value: '2', label: this.$t('feedbackCreate.technology') }
],
value: '2'
}
......@@ -142,6 +142,7 @@ export default {
/* 初始化 ckeditor */
initckeditor () {
!this.ckeditor && (this.ckeditor = CKEDITOR.replace('editor', {
language: this.$i18n.locale.toLocaleLowerCase(),
height: 300,
uiColor: '#eeeeee',
filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload',
......
<template>
<div>
<div class="con-title">{{ $t('pages.feedback.feedbackList.title') }}<el-button style="float: right; margin: 8px;" type="primary" size="mini" round @click="goCreate">{{ $t('pages.feedback.feedbackList.btnQuestion') }}</el-button></div>
<div class="con-title">{{ $t('feedbackList.title') }}<el-button style="float: right; margin: 8px;" type="primary" size="mini" round @click="goCreate">{{ $t('feedbackList.btnQuestion') }}</el-button></div>
<div class="con-box">
<template v-for="(item, index) in find">
<ul v-bind:key="index" class="tabs-list">
......@@ -21,9 +21,9 @@
<template slot="title">
{{item.feedback_title}}<div style="position: absolute; right: 70px;" v-html="item.status"></div>
</template>
<div style="font-size: 15px; font-weight: 700;">{{ $t('pages.feedback.feedbackList.probDesc') }}({{ $t('pages.feedback.feedbackList.publishTime') }} {{item.created_time}})</div>
<div style="font-size: 15px; font-weight: 700;">{{ $t('feedbackList.probDesc') }}({{ $t('feedbackList.publishTime') }} {{item.created_time}})</div>
<div style="text-indent: 20px;" v-html="item.feedback_contents"></div>
<div style="font-size: 15px; font-weight: 700;">{{ $t('pages.feedback.feedbackList.downloadAtta') }}</div>
<div style="font-size: 15px; font-weight: 700;">{{ $t('feedbackList.downloadAtta') }}</div>
<div style="overflow: hidden; text-indent: 20px;">
<template v-if="item.isEmpty">
暂无附件内容
......@@ -31,12 +31,12 @@
<template v-else>
<template v-for="(item1, index1) in item.feedback_attachments">
<template v-if="item1.url">
<a style="float: left; margin-right: 10px;" :href="item1.url">{{ $t('pages.feedback.feedbackList.downloadAtta') }}{{index1+1}}</a>
<a style="float: left; margin-right: 10px;" :href="item1.url">{{ $t('feedbackList.downloadAtta') }}{{index1+1}}</a>
</template>
</template>
</template>
</div>
<div style="font-size: 15px; font-weight: 700;">{{ $t('pages.feedback.feedbackList.questionReply') }}</div>
<div style="font-size: 15px; font-weight: 700;">{{ $t('feedbackList.questionReply') }}</div>
<template v-if="item.replies.length">
<template v-for="(item1, index1) in item.replies">
<div class="discuss-feedback-scroll">
......@@ -88,14 +88,14 @@ export default {
data () {
return {
find: [{
name: this.$t('pages.feedback.feedbackList.tapType'),
name: this.$t('feedbackList.tapType'),
isShow: false,
selectIndex: 0,
key: 'type_id',
arrItem: [ // 从后台请求
{ val: '0', name: this.$t('pages.feedback.feedbackList.all') },
{ val: '1', name: this.$t('pages.feedback.feedbackList.administration') },
{ val: '2', name: this.$t('pages.feedback.feedbackList.technology') }
{ val: '0', name: this.$t('feedbackList.all') },
{ val: '1', name: this.$t('feedbackList.administration') },
{ val: '2', name: this.$t('feedbackList.technology') }
]
}],
param: {
......@@ -135,7 +135,7 @@ export default {
}
}
/* 对状态 做一下单独处理 */
temp.status = temp.status === '0' ? `<em style="color: #f34b4b">${this.$t('pages.feedback.feedbackList.pending')}</em>` : temp.status === '1' ? `<em style="color: #f3c74b">${this.$t('pages.feedback.feedbackList.processing')}</em>` : temp.status === '2' ? `<em style="color: #44a706">${this.$t('pages.feedback.feedbackList.processed')}</em>` : this.$t('pages.feedback.feedbackList.no')
temp.status = temp.status === '0' ? `<em style="color: #f34b4b">${this.$t('feedbackList.pending')}</em>` : temp.status === '1' ? `<em style="color: #f3c74b">${this.$t('feedbackList.processing')}</em>` : temp.status === '2' ? `<em style="color: #44a706">${this.$t('feedbackList.processed')}</em>` : this.$t('feedbackList.no')
/* 对回复 做一下单独处理 */
temp.replyContent = ''
}
......
......@@ -569,6 +569,7 @@ export default {
initckeditor() {
!this.ckeditor &&
(this.ckeditor = CKEDITOR.replace('editor', {
language: this.$i18n.locale.toLocaleLowerCase(),
height: 300,
uiColor: '#eeeeee',
filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload',
......
......@@ -2,6 +2,9 @@
<div class="pages">
<div class="head">
<img class="logo" src="../../assets/images/logo-header.png" />
<div class="language" style="overflow: hidden">
<language-switch style="float: right" />
</div>
<div class="user">
<div class="nickname">{{ nickName }}</div>
<div class="logout" @click="logout">{{ $t('components.learnSysLayout.sideBar.outLogin') }}</div>
......@@ -36,7 +39,10 @@
</template>
<script>
import cAction from '@action'
import LanguageSwitch from '@/components/languageSwitch/index.vue'
export default {
components: { LanguageSwitch },
data() {
return {
latest: null,
......
<template>
<div>
<div class="con-title">{{ $t('pages.other.message.title') }}</div>
<div class="con-title">{{ $t('message.title') }}</div>
<div class="con-box">
<el-collapse accordion v-model="activeName" @change="handleChange" v-if="msgList.length">
<template v-for="(item, index) in msgList">
......@@ -12,7 +12,7 @@
</el-collapse-item>
</template>
</el-collapse>
<div class="empty" v-else>{{ $t('pages.other.message.tip') }}</div>
<div class="empty" v-else>{{ $t('message.tip') }}</div>
<el-pagination
background
layout="prev, pager, next"
......
<template>
<div>
<div class="con-title">{{ $t('pages.other.setPwd.tip') }}</div>
<div class="con-title">{{ $t('password.title') }}</div>
<div class="con-box">
<el-row>
<!-- <el-col class="hidden-sm-and-down" :md="6" :lg="7" :xl="8" style="height: 1px;"></el-col> -->
<el-col :xs="24" :sm="16" :md="12" :lg="10" :xl="8">
<el-form ref="setpwdform" label-width="100px" :model="accountSetPwd" :rules="rules">
<el-form-item :label="$t('pages.other.setPwd.Oldpassword')" prop="oldPwd">
<el-form ref="setpwdform" label-width="160px" :model="accountSetPwd" :rules="rules">
<el-form-item :label="$t('password.Oldpassword')" prop="oldPwd">
<el-input
v-model="accountSetPwd.oldPwd"
type="password"
:placeholder="$t('pages.other.setPwd.inputOldpassword')"
:placeholder="$t('password.inputOldpassword')"
@keyup.enter.native="onSubmitSetPwd"
></el-input>
</el-form-item>
<el-form-item :label="$t('pages.other.setPwd.newpassword')" prop="newPwd">
<el-form-item :label="$t('password.newpassword')" prop="newPwd">
<el-input
v-model="accountSetPwd.newPwd"
type="password"
placeholder="$t('pages.other.setPwd.inputnewpassword')"
:placeholder="$t('password.inputnewpassword')"
@keyup.enter.native="onSubmitSetPwd"
></el-input>
</el-form-item>
<el-form-item :label="$t('pages.other.setPwd.Repeatnewpassword')" prop="newPwdAgain">
<el-form-item :label="$t('password.Repeatnewpassword')" prop="newPwdAgain">
<el-input
v-model="accountSetPwd.newPwdAgain"
type="password"
placeholder="$t('pages.other.setPwd.inputRepeatnewpassword')"
:placeholder="$t('password.inputRepeatnewpassword')"
@keyup.enter.native="onSubmitSetPwd"
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmitSetPwd">{{ $t('pages.other.setPwd.save') }}</el-button>
<el-button type="primary" @click="onSubmitSetPwd">{{ $t('password.save') }}</el-button>
</el-form-item>
</el-form>
</el-col>
......@@ -108,7 +107,6 @@ export default {
actionName: 'Other',
functionName: 'updatePwd',
data: {
// old_password: md5('uokoaduw' + this.accountSetPwd.oldPwd.split('').reverse().join('') + 'auhgniq'),
old_password: this.accountSetPwd.oldPwd,
password: this.accountSetPwd.newPwd,
passwordR: this.accountSetPwd.newPwdAgain
......@@ -123,9 +121,6 @@ export default {
catchCallback: () => {},
finallyCallback: () => {}
})
} else {
this.$message.error('请检查输入项,确认无误后,重新提交')
return false
}
})
}
......
<template>
<div>
<div class="con-title">{{ $t('pages.other.setPwd.title') }}</div>
<div class="con-box">
<el-row justify="center">
<el-col :xs="24" :sm="9" :md="8" :lg="7" :xl="6">
<div class="pic-show">
<img :src="imgUrl" alt />
</div>
</el-col>
<el-col :xs="24" :sm="15" :md="16" :lg="17" :xl="18">
<div class="info">
{{ $t('pages.other.setPwd.student') }}
<b>{{user.student_name}}</b>
</div>
<div class="info">{{ $t('pages.other.setPwd.studentnum') }}{{user.student_no}}</div>
<div class="info" style="display: none;">{{ $t('pages.other.setPwd.studentid') }}{{user.student_id}}</div>
<div class="info" style="display: none;">{{ $t('pages.other.setPwd.studentsoid') }}{{user.sso_id}}</div>
<div class="info">{{ $t('pages.other.setPwd.msg') }}</div>
<el-upload ref="upFile" class="upload-demo" action :multiple="false" :limit="1" :show-file-list="false" :on-change="handleChange" :http-request="uploadFile" :file-list="filesArr">
<el-button type="primary">{{ $t('pages.other.setPwd.clickup') }}</el-button>
</el-upload>
</el-col>
</el-row>
<div>
<div class="con-title">{{ $t('avatar.title') }}</div>
<div class="con-box">
<el-row justify="center">
<el-col :xs="24" :sm="9" :md="8" :lg="7" :xl="6">
<div class="pic-show">
<img :src="imgUrl" alt />
</div>
</el-col>
<el-col :xs="24" :sm="15" :md="16" :lg="17" :xl="18">
<div class="info">
{{ $t('avatar.student') }}
<b>{{ user.student_name }}</b>
</div>
<div class="info">{{ $t('avatar.studentnum') }}{{ user.student_no }}</div>
<div class="info" style="display: none">{{ $t('avatar.studentid') }}{{ user.student_id }}</div>
<div class="info" style="display: none">{{ $t('avatar.studentsoid') }}{{ user.sso_id }}</div>
<div class="info">{{ $t('avatar.msg') }}</div>
<el-upload
ref="upFile"
class="upload-demo"
action
:multiple="false"
:limit="1"
:show-file-list="false"
:on-change="handleChange"
:http-request="uploadFile"
:file-list="filesArr"
>
<el-button type="primary">{{ $t('avatar.clickup') }}</el-button>
</el-upload>
</el-col>
</el-row>
</div>
</div>
</div>
</template>
<script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论