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

国际化

上级 226c1d78
module.exports = { module.exports = {
domain: 'dev.ezijing.com', domain: 'dev.ezijing.com',
url: 'https://sofia-learning.ezijing.com/api', url: 'https://sofia-learning2.ezijing.com/api',
apiBaseURL: '/', apiBaseURL: '/',
others: { others: {
url: '/app/learn/course', url: '/app/learn/course',
loginUrl: 'https://login.ezijing.com/sofia/login/index' loginUrl: 'https://login2.ezijing.com/sofia/login/index'
}, },
webpack: { webpack: {
externals: { externals: {
......
...@@ -212,7 +212,7 @@ export default class CourseAction extends BaseACTION { ...@@ -212,7 +212,7 @@ export default class CourseAction extends BaseACTION {
}) })
if (cur.course_examination) { if (cur.course_examination) {
let courseExamChildren = [] let courseExamChildren = []
if (data.exist_examination.length > 1) { if (data.exist_examination && data.exist_examination.length > 1) {
courseExamChildren = data.exist_examination.map((item, index) => { courseExamChildren = data.exist_examination.map((item, index) => {
const map = ['一', '二', '三'] const map = ['一', '二', '三']
return { return {
......
<template> <template>
<div style="height: 100%; width: 100%;"> <div style="height: 100%; width: 100%">
<router-view></router-view> <router-view></router-view>
<hanguage-switch></hanguage-switch>
</div> </div>
</template> </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": "Wudaokou School of Finance, Tsinghua University",
"title1": "Wudaokou School of Finance, Tsinghua University",
"title2": "Teaching system",
"codeLogin": "Code Login",
"normalLogin": "Account Login",
"forgetPassword": "Forgot Password?",
"findPwdStr": "Contact Admin"
},
"action": { "action": {
"courseAction": { "courseAction": {
"all": "All", "all": "All",
"mustLearn": "Required", "mustLearn": "Required",
"changeLearn": "Elective", "changeLearn": "Elective",
"repeatLearn": "Retake", "repeatLearn": "Retake",
"changeStatus": "选修状态", "changeStatus": "Elective status",
"noChange": "未选修", "noChange": "Not elective",
"alreadyChange": "已选修", "alreadyChange": "Elected",
"publish": "Published", "publish": "Published",
"noPublish": "Unpublished", "noPublish": "Unpublished",
"credit": "Credits", "credit": "Credits",
"to": " to ", "to": " to ",
"totalScore": "总成绩:", "totalScore": "Overall result:",
"none": "暂无" "none": "No"
} }
}, },
"components": { "components": {
...@@ -62,7 +53,6 @@ ...@@ -62,7 +53,6 @@
"btnName": "Click upload", "btnName": "Click upload",
"approvalTime": "Approval Time", "approvalTime": "Approval Time",
"saveSubmit": "Save and submit", "saveSubmit": "Save and submit",
"backlist": "Back to list", "backlist": "Back to list",
"remarks": "remarks", "remarks": "remarks",
"applyforrerepair": "Application for revision", "applyforrerepair": "Application for revision",
...@@ -97,12 +87,11 @@ ...@@ -97,12 +87,11 @@
"activityContent": "Academic activity content", "activityContent": "Academic activity content",
"entActCon": "Enter activity content", "entActCon": "Enter activity content",
"approvalTime": "Approval Time", "approvalTime": "Approval Time",
"backlist": "Back to list", "backlist": "Back to list",
"beizhu": "remarks", "beizhu": "remarks",
"people": "speaker", "people": "speaker",
"people2": "Please input speaker", "people2": "Please input speaker",
"savesubmit" : "Save submit" "savesubmit": "Save submit"
}, },
"myApply": { "myApply": {
"index": "No", "index": "No",
...@@ -116,7 +105,7 @@ ...@@ -116,7 +105,7 @@
"peopleclass": "Author's class", "peopleclass": "Author's class",
"choose": "Please select", "choose": "Please select",
"Ongoing": "Ongoing", "Ongoing": "Ongoing",
"Completed" : "Completed" "Completed": "Completed"
}, },
"shareAdd": { "shareAdd": {
"sname": "Name", "sname": "Name",
...@@ -136,7 +125,7 @@ ...@@ -136,7 +125,7 @@
"inputSharingthemes": "Please enter the sharing topic", "inputSharingthemes": "Please enter the sharing topic",
"backlist": "Back to list", "backlist": "Back to list",
"remarks": "remarks", "remarks": "remarks",
"savesubmit" : "Save submit" "savesubmit": "Save submit"
}, },
"uploadReport": { "uploadReport": {
"name": "Topic", "name": "Topic",
...@@ -150,39 +139,35 @@ ...@@ -150,39 +139,35 @@
"uploadTips": "(You can upload resources such as word and ppt. The system provides templates to download)", "uploadTips": "(You can upload resources such as word and ppt. The system provides templates to download)",
"downloadTemplateText": "Template download", "downloadTemplateText": "Template download",
"downloadButtonText": "Download uploaded attachments", "downloadButtonText": "Download uploaded attachments",
"savesubmit": "Save submit"
"savesubmit" : "Save submit"
}, },
"viewReport": { "viewReport": {
"title": "List of activities where the academic report is located", "title": "List of activities where the academic report is located",
"backText": "Back to activities list", "backText": "Back to activities list",
"clickup" : "Click upload", "clickup": "Click upload",
"canup" : "(You can upload resources such as word and ppt. The system provides templates to download)", "canup": "(You can upload resources such as word and ppt. The system provides templates to download)",
"Templatedownload" : "Template download", "Templatedownload": "Template download",
"Downloaduploaded" : "Download uploaded attachments", "Downloaduploaded": "Download uploaded attachments",
"savesubmit": "Save submit"
"savesubmit" : "Save submit"
}, },
"hall-form": { "hall-form": {
"examSubmitted": "Submitted", "examSubmitted": "Submitted",
"examSubmit": "Submit", "examSubmit": "Submit",
"phone": "Telephone", "phone": "Telephone",
"email": "mailbox", "email": "mailbox",
"email2": "mailbox", "email2": "mailbox",
"printed": "Number of copies to be printed", "printed": "Number of copies to be printed",
"electronicreportcard": "Electronic report card", "electronicreportcard": "Electronic report card",
"Paperreportcard": "Paper report card", "Paperreportcard": "Paper report card",
"graduatetip" : "Graduates can apply for transcripts.", "graduatetip": "Graduates can apply for transcripts.",
"msgtip" : "Please submit the information carefully after submitting. The e-report card will be sent to your email address.", "msgtip": "Please submit the information carefully after submitting. The e-report card will be sent to your email address.",
"msgtip2" : "Please check your information carefully and submit it. It cannot be modified after submission. The e-report card will be sent to your email address." "msgtip2": "Please check your information carefully and submit it. It cannot be modified after submission. The e-report card will be sent to your email address."
}, },
"pay": { "pay": {
"Newpayment": "New payment voucher" "Newpayment": "New payment voucher"
}, },
"payItem": { "payItem": {
"approvalStatus": "Approval", "approvalStatus": "Approval",
"paytime": "Payment time", "paytime": "Payment time",
"paytimemsg": "Please select the date", "paytimemsg": "Please select the date",
"pay": "Payment method", "pay": "Payment method",
...@@ -197,7 +182,6 @@ ...@@ -197,7 +182,6 @@
"bank3": "Alipay's name: clear control Bauhinia (Beijing) education Polytron Technologies Inc", "bank3": "Alipay's name: clear control Bauhinia (Beijing) education Polytron Technologies Inc",
"bank4": "Alipay's name: clear control Bauhinia (Beijing) education Polytron Technologies Inc" "bank4": "Alipay's name: clear control Bauhinia (Beijing) education Polytron Technologies Inc"
} }
}, },
"learn": { "learn": {
"course": { "course": {
...@@ -353,39 +337,6 @@ ...@@ -353,39 +337,6 @@
"Appliedactivities": "Applied" "Appliedactivities": "Applied"
} }
}, },
"feedback": {
"feedbackList": {
"technology": "Technology",
"administration": "Administration",
"all": "All",
"title": "Feedback",
"btnQuestion": "Question",
"tapType": "Type",
"pending": "Pending",
"processing": "Processing",
"processed": "Processed",
"probDesc": "Problem Description:",
"downloadAtta": "Download attachments:",
"publishTime": "Publish time:",
"questionReply": "Question reply:",
"no": "No time"
},
"feedbackCreate": {
"title": "Feedback",
"probDesc": "Problem Description:",
"enterDesc": "Please enter a question description",
"problemDetails": "Details of the problem:",
"uploadAtta": "Upload attachments",
"limit": "(resources such as word, PPT, PNG, JPG, zip, rar can be uploaded. For multiple files, please compress and package them into one file before uploading.)",
"submitTo": "Submit to",
"technology": "Technology",
"administration": "Administration",
"all": "All",
"btnUpload": "Click upload",
"downloadButtonText": "Download uploaded attachments",
"subBtn": "Submit"
}
},
"grade": { "grade": {
"credit": { "credit": {
"title": "Credits", "title": "Credits",
...@@ -431,48 +382,11 @@ ...@@ -431,48 +382,11 @@
"previouspage": "previous page", "previouspage": "previous page",
"submit": "Submit", "submit": "Submit",
"nextpage": "next page" "nextpage": "next page"
}
},
"other": {
"message": {
"title": "Notifications",
"tip": "You have not received any notice"
},
"setPwd": {
"title": "Change password",
"Oldpassword": "Old password",
"inputOldpassword": "Please enter the password",
"newpassword": "new password",
"inputnewpassword": "Enter a new password",
"Repeatnewpassword": "Re-enter the new password",
"inputRepeatnewpassword": "Please enter the new password again",
"save": "Save"
},
"updatePic": {
"title": "Change profile photo",
"student": "Student name:",
"studentnum": "College ID:",
"studentid": "Student Sid:",
"studentsoid": "Student SSO_ id:",
"msg": "Supports jpg, gif, png or bmp format pictures, the recommended file size is less than 5M",
"clickup": "Click upload",
"Oldpassword": "Old password",
"inputOldpassword": "Enter the password",
"newpassword": "new password",
"inputnewpassword": "Enter a new password",
"Repeatnewpassword": "Re-enter the new password",
"inputRepeatnewpassword": "Please enter the new password again",
"save": "Save"
} }
}, },
"mobile": { "mobile": {
"studentHelp": { "studentHelp": {
"title": "User Guide - student end" "title": "User Guide - student end"
}, },
"teacherHelp": { "teacherHelp": {
"title": "User Guide - teacher side" "title": "User Guide - teacher side"
...@@ -494,5 +408,60 @@ ...@@ -494,5 +408,60 @@
"goLive": "Go live", "goLive": "Go live",
"startTime": "will start at {time}", "startTime": "will start at {time}",
"replayTips": "Tip: Please watch the playback of the courses you have attended at the computer-side learning system" "replayTips": "Tip: Please watch the playback of the courses you have attended at the computer-side learning system"
},
"password": {
"title": "Change password",
"Oldpassword": "Old password",
"inputOldpassword": "Please enter the password",
"newpassword": "new password",
"inputnewpassword": "Enter a new password",
"Repeatnewpassword": "Repeat",
"inputRepeatnewpassword": "Please enter the new password again",
"save": "Save"
},
"avatar": {
"title": "Change profile photo",
"student": "Student name:",
"studentnum": "College ID:",
"studentid": "Student Sid:",
"studentsoid": "Student SSO_ id:",
"msg": "Supports jpg, gif, png or bmp format pictures, the recommended file size is less than 5M",
"clickup": "Click upload",
"save": "Save"
},
"message": {
"title": "Notifications",
"tip": "You have not received any notice"
},
"feedbackList": {
"technology": "Technology",
"administration": "Administration",
"all": "All",
"title": "Feedback",
"btnQuestion": "Question",
"tapType": "Type",
"pending": "Pending",
"processing": "Processing",
"processed": "Processed",
"probDesc": "Problem Description:",
"downloadAtta": "Download attachments:",
"publishTime": "Publish time:",
"questionReply": "Question reply:",
"no": "No time"
},
"feedbackCreate": {
"title": "Feedback",
"probDesc": "Problem Description:",
"enterDesc": "Please enter a question description",
"problemDetails": "Details of the problem:",
"uploadAtta": "Upload attachments",
"limit": "(resources such as word, PPT, PNG, JPG, zip, rar can be uploaded. For multiple files, please compress and package them into one file before uploading.)",
"submitTo": "Submit to",
"technology": "Technology",
"administration": "Administration",
"all": "All",
"btnUpload": "Click upload",
"downloadButtonText": "Download uploaded attachments",
"subBtn": "Submit"
} }
} }
{ {
"Login": {
"title": "紫荆教育MBA学习系统",
"title1": "紫荆教育MBA学习系统",
"title2": "教学系统",
"codeLogin": "验证码登录",
"normalLogin": "账号登录",
"forgetPassword": "忘记密码",
"findPwdStr": "请联系管理员找回密码"
},
"action": { "action": {
"courseAction": { "courseAction": {
"all": "全部", "all": "全部",
...@@ -62,7 +54,6 @@ ...@@ -62,7 +54,6 @@
"btnName": "点击上传", "btnName": "点击上传",
"approvalTime": "审核时间", "approvalTime": "审核时间",
"saveSubmit": "保存并提交", "saveSubmit": "保存并提交",
"backlist": "返回列表", "backlist": "返回列表",
"remarks": "备注", "remarks": "备注",
"applyforrerepair": "重修申请", "applyforrerepair": "重修申请",
...@@ -80,7 +71,6 @@ ...@@ -80,7 +71,6 @@
"newEvent": "申请新的活动", "newEvent": "申请新的活动",
"tip": "提示", "tip": "提示",
"ok": "确定", "ok": "确定",
"title": "办事大厅", "title": "办事大厅",
"applyfornewmusicsharing": "申请新乐分享", "applyfornewmusicsharing": "申请新乐分享",
"applyforrerepair": "申请重修", "applyforrerepair": "申请重修",
...@@ -98,18 +88,16 @@ ...@@ -98,18 +88,16 @@
"activityContent": "学术活动内容", "activityContent": "学术活动内容",
"entActCon": "请输入活动内容", "entActCon": "请输入活动内容",
"approvalTime": "审核时间", "approvalTime": "审核时间",
"backlist": "返回列表", "backlist": "返回列表",
"beizhu": "备注", "beizhu": "备注",
"people": "主 讲 人", "people": "主 讲 人",
"people2": "请输入主讲人", "people2": "请输入主讲人",
"savesubmit" : "保存提交" "savesubmit": "保存提交"
}, },
"myApply": { "myApply": {
"index": "序号", "index": "序号",
"matter": "事项", "matter": "事项",
"submitTime": "提交时间", "submitTime": "提交时间",
"query": "查询", "query": "查询",
"Approvalresults": "审批结果", "Approvalresults": "审批结果",
"Approvaltime": "审批时间", "Approvaltime": "审批时间",
...@@ -117,12 +105,11 @@ ...@@ -117,12 +105,11 @@
"peopleclass": "提交人班级", "peopleclass": "提交人班级",
"choose": "请选择", "choose": "请选择",
"Ongoing": "进行中的", "Ongoing": "进行中的",
"Completed" : "已完成" "Completed": "已完成"
}, },
"shareAdd": { "shareAdd": {
"sname": "姓名", "sname": "姓名",
"approvalTime": "审核时间", "approvalTime": "审核时间",
"shareapplication": "乐分享申请", "shareapplication": "乐分享申请",
"inputname": "请输入您的姓名", "inputname": "请输入您的姓名",
"industry": "行业", "industry": "行业",
...@@ -137,16 +124,15 @@ ...@@ -137,16 +124,15 @@
"inputSharingthemes": "请输入分享主题", "inputSharingthemes": "请输入分享主题",
"backlist": "返回列表", "backlist": "返回列表",
"remarks": "备注", "remarks": "备注",
"savesubmit" : "保存提交" "savesubmit": "保存提交"
}, },
"uploadReport": { "uploadReport": {
"savesubmit" : "保存提交", "savesubmit": "保存提交",
"name": "学术报告主题", "name": "学术报告主题",
"placename": "请输入报告主题", "placename": "请输入报告主题",
"labeltitle": "学术报告摘要", "labeltitle": "学术报告摘要",
"placetitle": "请输入报告摘要", "placetitle": "请输入报告摘要",
"file": "附 件", "file": "附 件",
"title": "学术报告提交", "title": "学术报告提交",
"backText": "返回活动列表", "backText": "返回活动列表",
"uploadButtonText": "点击上传", "uploadButtonText": "点击上传",
...@@ -157,33 +143,30 @@ ...@@ -157,33 +143,30 @@
"viewReport": { "viewReport": {
"title": "学术报告所在活动列表", "title": "学术报告所在活动列表",
"backText": "返回活动列表", "backText": "返回活动列表",
"clickup": "点击上传",
"clickup" : "点击上传", "canup": "(可以上传word、ppt等资源。系统提供模板下载)",
"canup" : "(可以上传word、ppt等资源。系统提供模板下载)", "Templatedownload": "模板下载",
"Templatedownload" : "模板下载", "Downloaduploaded": "下载已上传附件",
"Downloaduploaded" : "下载已上传附件", "savesubmit": "保存提交"
"savesubmit" : "保存提交"
}, },
"hall-form": { "hall-form": {
"examSubmitted": "已提交", "examSubmitted": "已提交",
"examSubmit": "提交", "examSubmit": "提交",
"phone": "电话", "phone": "电话",
"email": "邮箱", "email": "邮箱",
"email2": "邮箱", "email2": "邮箱",
"printed": "需打印的份数", "printed": "需打印的份数",
"electronicreportcard": "电子成绩单", "electronicreportcard": "电子成绩单",
"Paperreportcard": "纸质成绩单", "Paperreportcard": "纸质成绩单",
"graduatetip" : "毕业生可申请成绩单。", "graduatetip": "毕业生可申请成绩单。",
"msgtip" : "(请仔细核查您填写的信息后提交,提交后不可修改。电子成绩单将发送至您填写的邮箱。", "msgtip": "(请仔细核查您填写的信息后提交,提交后不可修改。电子成绩单将发送至您填写的邮箱。",
"msgtip2" : "(请仔细核查您填写的信息后提交,提交后不可修改。电子成绩单将发送至您填写的邮箱。" "msgtip2": "(请仔细核查您填写的信息后提交,提交后不可修改。电子成绩单将发送至您填写的邮箱。"
}, },
"pay": { "pay": {
"Newpayment": "新增缴费凭证" "Newpayment": "新增缴费凭证"
}, },
"payItem": { "payItem": {
"approvalStatus": "审核状态", "approvalStatus": "审核状态",
"paytime": "支付时间", "paytime": "支付时间",
"paytimemsg": "请选择日期", "paytimemsg": "请选择日期",
"pay": "支付方式", "pay": "支付方式",
...@@ -198,7 +181,6 @@ ...@@ -198,7 +181,6 @@
"bank3": "支付宝户名:清控紫荆(北京)教育科技股份有限公司", "bank3": "支付宝户名:清控紫荆(北京)教育科技股份有限公司",
"bank4": "支付宝户名:清控紫荆(北京)教育科技股份有限公司" "bank4": "支付宝户名:清控紫荆(北京)教育科技股份有限公司"
} }
}, },
"learn": { "learn": {
"course": { "course": {
...@@ -359,39 +341,6 @@ ...@@ -359,39 +341,6 @@
"Appliedactivities": "已申请的活动" "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": { "grade": {
"credit": { "credit": {
"title": "我的学分", "title": "我的学分",
...@@ -437,48 +386,11 @@ ...@@ -437,48 +386,11 @@
"previouspage": "上一页", "previouspage": "上一页",
"submit": "提交", "submit": "提交",
"nextpage": "下一页" "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": { "mobile": {
"studentHelp": { "studentHelp": {
"title": "使用指南 - 学生端" "title": "使用指南 - 学生端"
}, },
"teacherHelp": { "teacherHelp": {
"title": "使用指南 - 教师端" "title": "使用指南 - 教师端"
...@@ -500,5 +412,60 @@ ...@@ -500,5 +412,60 @@
"goLive": "进入直播", "goLive": "进入直播",
"startTime": "将于{time}开始", "startTime": "将于{time}开始",
"replayTips": "提示语:已参加的课程请到电脑端学习系统观看回放" "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 { ...@@ -33,6 +33,7 @@ export default {
methods: { methods: {
createEditor() { createEditor() {
const config = { const config = {
language: this.$i18n.locale.toLocaleLowerCase(),
height: 400, height: 400,
uiColor: '#eeeeee', uiColor: '#eeeeee',
filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload', filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload',
......
<template> <template>
<div class="tap-language-switch"> <div class="language-switch">
<el-menu class="el-menu-demo" mode="horizontal" @select="handleSelect"> <el-select size="medium" v-model="value" @change="handleChange">
<el-submenu index="1"> <el-option v-for="item in languages" :key="item.value" :label="item.name" :value="item.value"> </el-option>
<template slot="title">{{ show }}</template> </el-select>
<template v-for="item in language.arr"> </div>
<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>
</template> </template>
<script> <script>
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import language from '@/assets/languages/language'
export default { export default {
name: 'sLanguage', name: 'LanguageSwitch',
componentName: 'sLanguage', data() {
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]
}
})
return { return {
show: show, value: this.$i18n.locale,
language: language[this.$i18n.locale] languages: [
{ name: '中文', value: 'zh-CN' },
{ name: 'English', value: 'en' }
]
} }
}, },
mounted () {},
methods: { methods: {
handleSelect (key, val) { handleChange(value) {
Cookies.set('lang', key, { expires: 30, domain: '.ezijing.com' }) Cookies.set('lang', value, { expires: 30, domain: '.ezijing.com' })
this.$i18n.locale = key this.$i18n.locale = value
/* 刷新页面 */ /* 刷新页面 */
this.$router.go(0) this.$router.go(0)
} }
...@@ -71,17 +32,11 @@ export default { ...@@ -71,17 +32,11 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tap-language-switch { .language-switch {
position: absolute; width: 100px;
right: 150px; ::v-deep .el-input__inner {
top: 0px;
z-index: 9999999999;
.el-menu {
border: none;
background: transparent; background: transparent;
} border: 0;
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
border: none;
} }
} }
</style> </style>
...@@ -4,45 +4,42 @@ ...@@ -4,45 +4,42 @@
<img class="logo" src="@/assets/images/logo-header.png" alt="logo" /> <img class="logo" src="@/assets/images/logo-header.png" alt="logo" />
<div class="text-title" @click="setStatus">{{ $t('components.learnSysLayout.navigation.title') }}</div> <div class="text-title" @click="setStatus">{{ $t('components.learnSysLayout.navigation.title') }}</div>
</div> </div>
<!-- <s-language></s-language> --> <div class="nav-right">
<div class="notify" @click="goNotify()">{{ $t('components.learnSysLayout.navigation.tip') }} <div class="notify" @click="goNotify()">
<div class="num" v-if="this.$store.getters.myMsg !=0">{{ this.$store.getters.myMsg }}</div> {{ $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>
</div> </div>
</template> </template>
<script> <script>
// import sLanguage from '@/components/languageSwitch/index.vue' import LanguageSwitch from '@/components/languageSwitch/index.vue'
import cAction from '../../action' import cAction from '../../action'
export default { export default {
components: {}, components: { LanguageSwitch },
data () { data() {
return { return {
num: this.$store.getters.myMsg num: this.$store.getters.myMsg
} }
}, },
mounted () { mounted() {
// request({ cAction.Other.getNavMsg()
// component: this, .then(data => {
// 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) this.$store.commit('myMsg', data.num)
}).catch(e => { this.$message.error(e.message) }).finally(() => { }) })
.catch(e => {
this.$message.error(e.message)
})
.finally(() => {})
}, },
methods: { methods: {
goNotify () { goNotify() {
this.$router.push({ path: '/app/other/message' }) this.$router.push({ path: '/app/other/message' })
}, },
setStatus () { setStatus() {
if (this.status) { if (this.status) {
this.status = false this.status = false
} else { } else {
...@@ -56,9 +53,10 @@ export default { ...@@ -56,9 +53,10 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.menu { .menu {
width: 100%; display: flex;
height: 100%; align-items: center;
color: #ffffff; justify-content: space-between;
color: #fff;
.nav-left { .nav-left {
float: left; float: left;
position: relative; position: relative;
...@@ -78,6 +76,10 @@ export default { ...@@ -78,6 +76,10 @@ export default {
font-size: 16px; font-size: 16px;
} }
} }
.nav-right {
display: flex;
align-items: center;
}
.notify { .notify {
position: relative; position: relative;
float: right; float: right;
......
...@@ -33,6 +33,7 @@ export default { ...@@ -33,6 +33,7 @@ export default {
methods: { methods: {
createEditor() { createEditor() {
const config = { const config = {
language: this.$i18n.locale.toLocaleLowerCase(),
height: 400, height: 400,
uiColor: '#eeeeee', uiColor: '#eeeeee',
filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload', filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="upload"> <div class="upload">
<el-upload action :disabled="disabled" :show-file-list="false" :http-request="httpRequest"> <el-upload action :disabled="disabled" :show-file-list="false" :http-request="httpRequest">
<slot></slot> <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> <template v-slot:tip>
<div class="el-upload__tips"> <div class="el-upload__tips">
<slot name="tip"></slot> <slot name="tip"></slot>
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
</a> </a>
<div> <div>
<a href="javascript:;" @click="handleRemove(index)" style="margin-right: 10px" v-if="!disabled"> <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> <i class="el-icon-delete"></i>
</el-tooltip> </el-tooltip>
</a> </a>
<a :href="item.url" :download="item.name" target="_blank"> <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> <i class="el-icon-download"></i>
</el-tooltip> </el-tooltip>
</a> </a>
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
return { name: item.name || item, url: item.url || item } return { name: item.name || item, url: item.url || item }
}) })
} else { } else {
fileList.push({ name: '附件下载', url: value }) fileList.push({ name: this.$t('viewerWork.downloadName'), url: value })
} }
this.fileList = fileList this.fileList = fileList
} }
......
<template> <template>
<container :title="detail.paper_title" v-loading="loading"> <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"> <div class="exam">
<template v-if="isSubmited && !isExamComplete"> <template v-if="isSubmited && !isExamComplete">
<div class="no-exam">试卷批改中,请耐心等待</div> <div class="no-exam">{{ $t('viewerWork.examSubmitedTips') }}</div>
</template> </template>
<template v-else> <template v-else>
<!-- 考试期间,未开始考试 --> <!-- 考试期间,未开始考试 -->
<div class="exam-welcome" v-if="!isStartExam"> <div class="exam-welcome" v-if="!isStartExam">
<div v-if="detail.paper_deadline">考试截止时间:{{detail.paper_deadline}}</div> <div v-if="detail.paper_deadline">{{ $t('viewerWork.examDeadline') }}{{ detail.paper_deadline }}</div>
<el-button <el-button type="primary" :disabled="!isExamTime" @click="onStartExam">{{ startExamButtonText }}</el-button>
type="primary"
:disabled="!isExamTime"
@click="onStartExam"
>{{startExamButtonText}}</el-button>
</div> </div>
<!-- 考试试题 --> <!-- 考试试题 -->
<div class="exam-form" v-if="isStartExam"> <div class="exam-form" v-if="isStartExam">
...@@ -30,8 +28,8 @@ ...@@ -30,8 +28,8 @@
></exam-item> ></exam-item>
</template> </template>
<div class="exam-buttons"> <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-button type="primary" :loading="submitLoading" @click="onSubmit">{{ submitText }}</el-button>
</el-tooltip> </el-tooltip>
</div> </div>
</el-form> </el-form>
...@@ -87,9 +85,7 @@ export default { ...@@ -87,9 +85,7 @@ export default {
immediate: true, immediate: true,
handler(data) { handler(data) {
this.detail = data.paper this.detail = data.paper
this.questions = data.paper this.questions = data.paper ? this.genQuestions(data.paper.examination) : []
? this.genQuestions(data.paper.examination)
: []
} }
} }
}, },
...@@ -118,7 +114,7 @@ export default { ...@@ -118,7 +114,7 @@ export default {
}, },
// 考试按钮 // 考试按钮
startExamButtonText() { startExamButtonText() {
return this.isExamTime ? '开始考试' : '考试结束' return this.isExamTime ? this.$t('viewerWork.examStartButtonText') : this.$t('viewerWork.examEndButtonText')
}, },
// 考试完成 // 考试完成
isExamComplete() { isExamComplete() {
...@@ -131,7 +127,7 @@ export default { ...@@ -131,7 +127,7 @@ export default {
}, },
// 提交按钮文本 // 提交按钮文本
submitText() { submitText() {
return this.isSubmited ? '已提交' : '提交' return this.isSubmited ? this.$t('viewerWork.submitedText') : this.$t('viewerWork.submitText')
} }
}, },
methods: { methods: {
...@@ -170,9 +166,7 @@ export default { ...@@ -170,9 +166,7 @@ export default {
type: 3, type: 3,
formModel: { formModel: {
id: item.id, id: item.id,
user_answer: item.user_answer user_answer: item.user_answer ? Base64.decode(item.user_answer.replace(/ /gi, '+')) : '',
? Base64.decode(item.user_answer.replace(/ /gi, '+'))
: '',
attachments: item.attachments || [] attachments: item.attachments || []
} }
} }
...@@ -183,9 +177,7 @@ export default { ...@@ -183,9 +177,7 @@ export default {
}, },
// 获取考试结果 // 获取考试结果
getExamResult() { getExamResult() {
api api.getCourseExamResult(this.sid, this.cid, this.pid, { paper_type: 0 }).then(response => {
.getCourseExamResult(this.sid, this.cid, this.pid, { paper_type: 0 })
.then(response => {
// 设置问题列表数据 // 设置问题列表数据
if (response.code !== 8001) { if (response.code !== 8001) {
this.isStartExam = true this.isStartExam = true
...@@ -216,7 +208,7 @@ export default { ...@@ -216,7 +208,7 @@ export default {
// 校验 // 校验
if (!this.checkSubmit()) { if (!this.checkSubmit()) {
this.messageInstance && this.messageInstance.close() this.messageInstance && this.messageInstance.close()
this.messageInstance = this.$message.error('还有题目未做,不能提交') this.messageInstance = this.$message.error(this.$t('viewerWork.examSubmitError'))
return return
} }
// 提交的答案数据 // 提交的答案数据
...@@ -276,7 +268,7 @@ export default { ...@@ -276,7 +268,7 @@ export default {
return return
} }
if (response.code === 200) { if (response.code === 200) {
this.$message.success('考试答卷提交成功') this.$message.success(this.$t('viewerWork.examSubmitSuccess'))
this.autoSubmitTimer && clearInterval(this.autoSubmitTimer) this.autoSubmitTimer && clearInterval(this.autoSubmitTimer)
this.getExamResult() this.getExamResult()
} else { } else {
......
<template> <template>
<container :title="chapter.name" v-loading="loading"> <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">
<div class="exam-form"> <div class="exam-form">
<el-form :disabled="isSubmited"> <el-form :disabled="isSubmited">
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
:key="item.id" :key="item.id"
></exam-item> ></exam-item>
<div class="exam-buttons"> <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-button type="primary" :loading="submitLoading" @click="onSubmit">{{ submitText }}</el-button>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
}, },
// 提交按钮文本 // 提交按钮文本
submitText() { submitText() {
return this.isSubmited ? '已提交' : '提交' return this.isSubmited ? this.$t('viewerWork.submitedText') : this.$t('viewerWork.submitText')
} }
}, },
methods: { methods: {
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
// 校验 // 校验
if (!this.checkSubmit()) { if (!this.checkSubmit()) {
this.messageInstance && this.messageInstance.close() this.messageInstance && this.messageInstance.close()
this.messageInstance = this.$message.error('还有题目未做,不能提交') this.messageInstance = this.$message.error(this.$t('viewerWork.examSubmitError'))
return return
} }
// 计算答题时间 // 计算答题时间
......
...@@ -13,26 +13,26 @@ ...@@ -13,26 +13,26 @@
></exam-item> ></exam-item>
</el-form> </el-form>
</div> </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"> <template v-if="detail && detail.status === 1">
<div class="work-bottom"> <div class="work-bottom">
<div class="info"> <div class="info">
<div class="paper-check"> <div class="paper-check">
<h4>作业被驳回,点击“重新编辑”按钮重新编辑内容再次提交</h4> <h4>{{ $t('viewerWork.rejectTips') }}</h4>
<div class="paper-check-item"> <div class="paper-check-item">
<b>驳回时间</b> <b>{{ $t('viewerWork.rejectTime') }}</b>
{{ detail.checker_time }} {{ detail.checker_time }}
</div> </div>
<div class="paper-check-item"> <div class="paper-check-item">
<b>驳回说明</b> <b>{{ $t('viewerWork.rejectContent') }}</b>
<div class="edit_html" v-html="detail.check_comments"></div> <div class="edit_html" v-html="detail.check_comments"></div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="buttons"> <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> </div>
</template> </template>
<!-- 正常状态 --> <!-- 正常状态 -->
...@@ -41,38 +41,30 @@ ...@@ -41,38 +41,30 @@
<div class="info"> <div class="info">
<template v-if="isRevised"> <template v-if="isRevised">
<div class="paper-check"> <div class="paper-check">
<p>批改时间{{ detail.checker_time }}</p> <p>{{ $t('viewerWork.correctionTime') }}{{ detail.checker_time }}</p>
<div class="paper-check-item"> <div class="paper-check-item">
<b>评分</b> <b>{{ $t('viewerWork.score') }}</b>
{{ detail.score }} {{ detail.score }}
</div> </div>
<div class="paper-check-item"> <div class="paper-check-item">
<b>评语</b> <b>{{ $t('viewerWork.comments') }}</b>
<div class="edit_html" v-html="detail.check_comments"></div> <div class="edit_html" v-html="detail.check_comments"></div>
</div> </div>
</div> </div>
</template> </template>
<template v-else-if="detail.created_time"> <template v-else-if="detail.created_time">
<p class="help">已于 {{ detail.created_time }} 提交,等待老师批改中。</p> <p class="help">{{ $t('viewerWork.deadline', { time: detail.created_time }) }}</p>
<template <template v-if="detail.updated_time && detail.updated_time !== detail.created_time">
v-if=" <p class="help">{{ $t('viewerWork.submitDateTime') }} {{ detail.updated_time }}</p>
detail.updated_time &&
detail.updated_time !== detail.created_time
"
>
<p class="help">最近提交时间: {{ detail.updated_time }}</p>
</template> </template>
</template> </template>
</div> </div>
</div> </div>
<div class="buttons"> <div class="buttons">
<el-tooltip content="在获老师批改之前,可以多次提交,将以最后一次提交为准" placement="right"> <el-tooltip :content="$t('viewerWork.workSubmitButtonTips')" placement="right">
<el-button <el-button type="primary" :disabled="disabled || !isWorkTime" :loading="submitLoading" @click="onSubmit">{{
type="primary" submitText
:disabled="disabled || !isWorkTime" }}</el-button>
:loading="submitLoading"
@click="onSubmit"
>{{ submitText }}</el-button>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
...@@ -124,9 +116,7 @@ export default { ...@@ -124,9 +116,7 @@ export default {
chapter: { chapter: {
immediate: true, immediate: true,
handler(data) { handler(data) {
this.questions = data.homework this.questions = data.homework ? this.genQuenstions(data.homework.questions) : []
? this.genQuenstions(data.homework.questions)
: []
} }
} }
}, },
...@@ -153,7 +143,7 @@ export default { ...@@ -153,7 +143,7 @@ export default {
}, },
// 提交按钮文本 // 提交按钮文本
submitText() { submitText() {
return this.isRevised ? '已批改' : '提交' return this.isRevised ? this.$t('viewerWork.revisedButtonText') : this.$t('viewerWork.submitText')
}, },
// 是否是提交作业时间 // 是否是提交作业时间
isWorkTime() { isWorkTime() {
...@@ -169,9 +159,7 @@ export default { ...@@ -169,9 +159,7 @@ export default {
methods: { methods: {
// 获取作业截止时间 // 获取作业截止时间
getDeadline() { getDeadline() {
api api.getChapterHomeworkDeadline(this.sid, this.cid, this.pid).then(response => {
.getChapterHomeworkDeadline(this.sid, this.cid, this.pid)
.then(response => {
this.deadline = response.dead_line this.deadline = response.dead_line
}) })
}, },
...@@ -188,9 +176,7 @@ export default { ...@@ -188,9 +176,7 @@ export default {
const parseAnswers = JSON.parse(this.detail.work_contents) const parseAnswers = JSON.parse(this.detail.work_contents)
// 设置答案 // 设置答案
this.questions = this.questions.map(item => { this.questions = this.questions.map(item => {
const found = parseAnswers.find( const found = parseAnswers.find(answer => answer.question_id === item.id)
answer => answer.question_id === item.id
)
if (found) { if (found) {
item.user_answer = found.descreption item.user_answer = found.descreption
item.attachments = found.file_url item.attachments = found.file_url
...@@ -226,9 +212,7 @@ export default { ...@@ -226,9 +212,7 @@ export default {
temp = { temp = {
formModel: { formModel: {
id: item.id, id: item.id,
user_answer: item.user_answer user_answer: item.user_answer ? Base64.decode(item.user_answer) : '',
? Base64.decode(item.user_answer)
: '',
attachments: item.attachments || '' attachments: item.attachments || ''
} }
} }
...@@ -238,9 +222,7 @@ export default { ...@@ -238,9 +222,7 @@ export default {
item, item,
{ {
content: item.question_content, content: item.question_content,
options: item.question_options options: item.question_options ? JSON.parse(item.question_options) : []
? JSON.parse(item.question_options)
: []
}, },
temp temp
) )
...@@ -262,23 +244,17 @@ export default { ...@@ -262,23 +244,17 @@ export default {
// 校验 // 校验
if (!this.checkSubmit()) { if (!this.checkSubmit()) {
this.messageInstance && this.messageInstance.close() this.messageInstance && this.messageInstance.close()
this.messageInstance = this.$message.error( this.messageInstance = this.$message.error(this.$t('viewerWork.examSubmitError'))
'答题内容不能为空,请检查并输入内容'
)
return return
} }
// 计算答题时间 // 计算答题时间
const duration = Math.floor( const duration = Math.floor((new Date().getTime() - this.startTime) / 1000)
(new Date().getTime() - this.startTime) / 1000
)
// 提交的答案数据 // 提交的答案数据
const answers = this.questions.map(item => { const answers = this.questions.map(item => {
return { return {
question_id: item.id, question_id: item.id,
descreption: descreption:
item.question_type === 3 item.question_type === 3 ? Base64.encode(item.formModel.user_answer) : item.formModel.user_answer,
? Base64.encode(item.formModel.user_answer)
: item.formModel.user_answer,
file_url: item.formModel.attachments, file_url: item.formModel.attachments,
is_encoded: 1 is_encoded: 1
} }
...@@ -302,7 +278,7 @@ export default { ...@@ -302,7 +278,7 @@ export default {
.sbumitChapterHomework(params) .sbumitChapterHomework(params)
.then(response => { .then(response => {
if (response.status) { if (response.status) {
this.$message.success('提交成功,等待批改') this.$message.success(this.$t('viewerWork.examSubmitSuccess'))
this.getDetail() this.getDetail()
} else { } else {
this.$message.error(response.data.error) this.$message.error(response.data.error)
......
<template> <template>
<container :title="exam.title" v-loading="!loaded"> <container :title="exam.title" v-loading="!loaded">
<template v-slot:header-aside> <template v-slot:header-aside>
<template v-if="isCompleted">分数:{{ exam.score.total }}</template> <template v-if="isCompleted">
<template v-else>考试时间:{{ status.start_time }} ~ {{ status.terminate_time }}</template> {{ $t('viewerWork.fraction') }}{{ exam.score.total }}{{ $t('viewerWork.fractionUnit') }}
</template>
<template v-else>{{ $t('viewerWork.examTime') }}{{ status.start_time }} ~ {{ status.terminate_time }}</template>
</template> </template>
<div class="exam"> <div class="exam">
<template v-if="status.examination_status === '00'"> <template v-if="status.examination_status === '00'">
<div class="no-exam">暂无考试</div> <div class="no-exam">{{ $t('viewerWork.examEmpty') }}</div>
</template> </template>
<template v-else-if="isSubmited && !isCompleted && !isMultipleExams"> <template v-else-if="isSubmited && !isCompleted && !isMultipleExams">
<div class="no-exam">试卷批改中,请耐心等待</div> <div class="no-exam">{{ $t('viewerWork.examSubmitedTips') }}</div>
</template> </template>
<template v-else> <template v-else>
<!-- 考试试题 --> <!-- 考试试题 -->
...@@ -31,12 +33,14 @@ ...@@ -31,12 +33,14 @@
<div class="exam-buttons"> <div class="exam-buttons">
<!-- 允许多次提交 --> <!-- 允许多次提交 -->
<template v-if="isMultipleExams"> <template v-if="isMultipleExams">
<el-button type="primary" @click="handlePrev" v-if="hasPrev">上一套试卷</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">下一套试卷</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">再考一次</el-button> <el-button type="primary" @click="handleNewExam" v-if="hasResubmit">
{{ $t('viewerWork.anotherSubmitText') }}
</el-button>
</template> </template>
<template v-if="!(isSubmited && isMultipleExams)"> <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">{{ <el-button type="primary" :disabled="!canEditable" :loading="submitLoading" @click="onSubmit">{{
submitText submitText
}}</el-button> }}</el-button>
...@@ -91,7 +95,7 @@ export default { ...@@ -91,7 +95,7 @@ export default {
submitLoading: false, submitLoading: false,
isMultipleExams: false, // 是否可以多次考试 isMultipleExams: false, // 是否可以多次考试
maxExams: 3, // 最多考试几次 maxExams: 3, // 最多考试几次
examCount: this.data.exist_examination.length || 0 // 试卷数量 examCount: this.data.exist_examination ? this.data.exist_examination.length : 0 // 试卷数量
} }
}, },
watch: { watch: {
...@@ -135,7 +139,7 @@ export default { ...@@ -135,7 +139,7 @@ export default {
}, },
// 提交按钮文本 // 提交按钮文本
submitText() { submitText() {
return this.isSubmited ? '已提交' : '提交' return this.isSubmited ? this.$t('viewerWork.submitedText') : this.$t('viewerWork.submitText')
}, },
// 试卷页码 // 试卷页码
offset() { offset() {
...@@ -268,7 +272,7 @@ export default { ...@@ -268,7 +272,7 @@ export default {
// 校验 // 校验
if (!this.checkSubmit()) { if (!this.checkSubmit()) {
this.messageInstance && this.messageInstance.close() this.messageInstance && this.messageInstance.close()
this.messageInstance = this.$message.error('还有题目未做,不能提交') this.messageInstance = this.$message.error(this.$t('viewerWork.examSubmitError'))
return return
} }
// 提交的答案数据 // 提交的答案数据
...@@ -328,7 +332,7 @@ export default { ...@@ -328,7 +332,7 @@ export default {
return return
} }
if (response.code === 200) { if (response.code === 200) {
this.$message.success('考试答卷提交成功') this.$message.success(this.$t('viewerWork.examSubmitSuccess'))
this.autoSubmitTimer && clearInterval(this.autoSubmitTimer) this.autoSubmitTimer && clearInterval(this.autoSubmitTimer)
this.getExam() this.getExam()
} else { } else {
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<template> <template>
<container :title="chapter.name" v-loading="loading"> <container :title="chapter.name" v-loading="loading">
<el-steps direction="vertical" v-if="data.curriculum"> <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> <template v-slot:description>
<div v-html="data.curriculum.curriculum_essay"></div> <div v-html="data.curriculum.curriculum_essay"></div>
<p>截止日期:{{data.essay_date}}</p> <p>{{ $t('viewerWork.workDeadline') }}{{ data.essay_date }}</p>
</template> </template>
</el-step> </el-step>
<el-step title="填写作业主题、正文,上传附件(点击“提交”保存)" status="process"> <el-step :title="$t('viewerWork.workStep2')" status="process">
<template v-slot:description> <template v-slot:description>
<el-form <el-form
:model="ruleForm" :model="ruleForm"
...@@ -18,56 +18,59 @@ ...@@ -18,56 +18,59 @@
label-position="top" label-position="top"
ref="ruleForm" ref="ruleForm"
> >
<el-form-item label="主题" prop="essay_name"> <el-form-item :label="$t('viewerWork.workTheme.label')" prop="essay_name">
<el-input v-model="ruleForm.essay_name" placeholder="主题" maxlength="50"></el-input> <el-input
v-model="ruleForm.essay_name"
:placeholder="$t('viewerWork.workTheme.placeholder')"
maxlength="50"
></el-input>
</el-form-item> </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> <v-editor :disabled="isRevised" v-model="ruleForm.essay_description"></v-editor>
</el-form-item> </el-form-item>
<el-form-item prop="url"> <el-form-item prop="url">
<!-- 文件上传 --> <!-- 文件上传 -->
<v-upload v-model="ruleForm.url"> <v-upload v-model="ruleForm.url">
请上传对应的文件附件: {{ $t('viewerWork.workUrl.label') }}
<!-- <template v-slot:tip>只支持docx格式的文件,文件小于10M</template> --> <!-- <template v-slot:tip>只支持docx格式的文件,文件小于10M</template> -->
</v-upload> </v-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
</el-step> </el-step>
<el-step title="截止日期前提交" status="process"> <el-step :title="$t('viewerWork.workStep3')" status="process">
<template v-slot:description> <template v-slot:description>
<div class="work-bottom" v-if="detail"> <div class="work-bottom" v-if="detail">
<div class="info"> <div class="info">
<template v-if="isRevised"> <template v-if="isRevised">
<div class="paper-check"> <div class="paper-check">
<p>批改时间:{{detail.check_date}}</p> <p>{{ $t('viewerWork.correctionTime') }}{{ detail.check_date }}</p>
<div class="paper-check-item"> <div class="paper-check-item">
<b>评分</b> <b>{{ $t('viewerWork.score') }}</b>
{{detail.score}} {{ detail.score }}
</div> </div>
<div class="paper-check-item"> <div class="paper-check-item">
<b>评语</b> <b>{{ $t('viewerWork.comments') }}</b>
<div class="edit_html" v-html="detail.check_comments"></div> <div class="edit_html" v-html="detail.check_comments"></div>
</div> </div>
</div> </div>
</template> </template>
<template v-else-if="detail.created_time"> <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"> <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>
</template> </template>
</div> </div>
</div> </div>
<div class="buttons"> <div class="buttons">
<el-tooltip content="在获老师批改之前,可以多次提交,将以最后一次提交为准" placement="right"> <el-tooltip :content="$t('viewerWork.workSubmitButtonTips')" placement="right">
<el-button <el-button type="primary" :disabled="isRevised" :loading="submitLoading" @click="onSubmit">{{
type="primary" submitText
:disabled="isRevised" }}</el-button>
:loading="submitLoading"
@click="onSubmit"
>{{submitText}}</el-button>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
...@@ -112,13 +115,9 @@ export default { ...@@ -112,13 +115,9 @@ export default {
url: '' url: ''
}, },
rules: { rules: {
essay_name: [ essay_name: [{ required: true, message: this.$t('viewerWork.workTheme.rule'), trigger: 'blur' }],
{ required: true, message: '请输入主题', 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' }]
essay_description: [
{ required: true, message: '请输入正文', trigger: 'change' }
],
url: [{ required: true, message: '请上传附件', trigger: 'change' }]
}, },
detail: null, detail: null,
loading: false, loading: false,
...@@ -141,7 +140,7 @@ export default { ...@@ -141,7 +140,7 @@ export default {
}, },
// 提交按钮文本 // 提交按钮文本
submitText() { submitText() {
return this.isRevised ? '已批改' : '提交' return this.isRevised ? this.$t('viewerWork.revisedButtonText') : this.$t('viewerWork.submitText')
} }
}, },
methods: { methods: {
...@@ -166,15 +165,15 @@ export default { ...@@ -166,15 +165,15 @@ export default {
onSubmit() { onSubmit() {
this.messageInstance && this.messageInstance.close() this.messageInstance && this.messageInstance.close()
if (!this.ruleForm.essay_name) { if (!this.ruleForm.essay_name) {
this.messageInstance = this.$message.error('请输入主题') this.messageInstance = this.$message.error(this.$t('viewerWork.workTheme.rule'))
return return
} }
if (!this.ruleForm.essay_description) { if (!this.ruleForm.essay_description) {
this.messageInstance = this.$message.error('请输入正文') this.messageInstance = this.$message.error(this.$t('viewerWork.workDescription.rule'))
return return
} }
if (!this.ruleForm.url) { if (!this.ruleForm.url) {
this.messageInstance = this.$message.error('请上传附件') this.messageInstance = this.$message.error(this.$t('viewerWork.workUrl.rule'))
return return
} }
const params = Object.assign(this.ruleForm, { const params = Object.assign(this.ruleForm, {
...@@ -190,7 +189,7 @@ export default { ...@@ -190,7 +189,7 @@ export default {
.updateCourseWork(this.sid, this.cid, params) .updateCourseWork(this.sid, this.cid, params)
.then(response => { .then(response => {
if (response.status) { if (response.status) {
this.$message.success('提交成功,等待批改') this.$message.success(this.$t('viewerWork.examSubmitSuccess'))
this.getDetail() this.getDetail()
} else { } else {
this.$message.error(response.data.error) this.$message.error(response.data.error)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="q-item-title" v-html="data.content"></div> <div class="q-item-title" v-html="data.content"></div>
<div class="q-item-aside"> <div class="q-item-aside">
<template v-if="typeText">({{ typeText }})</template> <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> </div>
<div class="q-item-bd"> <div class="q-item-bd">
...@@ -28,36 +28,40 @@ ...@@ -28,36 +28,40 @@
<!-- 简答题 --> <!-- 简答题 -->
<template v-if="type === 3"> <template v-if="type === 3">
<v-editor v-model="currentValue.user_answer" :disabled="disabled"></v-editor> <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> </template>
</div> </div>
<div class="q-item-ft" v-if="disabled && showResult"> <div class="q-item-ft" v-if="disabled && showResult">
<template v-if="type === 3"> <template v-if="type === 3">
<p v-if="data.check_comment"> <p v-if="data.check_comment">
<span>评语</span> <span>{{ $t('viewerWork.comments') }}</span>
<span>{{ data.check_comment }}</span> <span>{{ data.check_comment }}</span>
</p> </p>
</template> </template>
<template v-else> <template v-else>
<div class="result"> <div class="result">
<p> <p>
<span>学生答案</span> <span>{{ $t('viewerWork.studentAnswer') }}</span>
<span :class="isCorrect ? 'is-success' : 'is-error'">{{ submitAnswerText }}</span> <span :class="isCorrect ? 'is-success' : 'is-error'">{{ submitAnswerText }}</span>
</p> </p>
<p> <p>
<span>正确答案</span> <span>{{ $t('viewerWork.correctAnswer') }}</span>
<span>{{ correctAnswerText }}</span> <span>{{ correctAnswerText }}</span>
</p> </p>
</div> </div>
</template> </template>
<p v-if="data.hasOwnProperty('get_score')"> <p v-if="data.hasOwnProperty('get_score')">
<span>评分</span> <span>{{ $t('viewerWork.score') }}</span>
<span>{{ data.get_score }}</span> <span>{{ data.get_score }}{{ $t('viewerWork.fractionUnit') }}</span>
</p> </p>
<div class="analyze" v-if="data.analysis"> <div class="analyze" v-if="data.analysis">
<span>解析</span> <span>{{ $t('viewerWork.analyze') }}</span>
<div class="analyze-main"> <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 v-html="data.analysis" v-if="data.analysis" v-show="showAnalyze" class="analyze-content"></div>
</div> </div>
</div> </div>
...@@ -121,7 +125,7 @@ export default { ...@@ -121,7 +125,7 @@ export default {
}, },
// 选项类型 // 选项类型
typeText() { typeText() {
const map = { 1: '单选题', 2: '多选题' } const map = { 1: this.$t('viewerWork.singleChoice'), 2: this.$t('viewerWork.multipleChoice') }
return map[this.type] return map[this.type]
}, },
// 处理后的options数据 // 处理后的options数据
......
...@@ -22,7 +22,55 @@ export default { ...@@ -22,7 +22,55 @@ export default {
pptClose: 'Close PPT', pptClose: 'Close PPT',
pptPageText: 'Page' 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: {}, viewerExam: {},
viewerRead: { viewerRead: {
download: 'Download', download: 'Download',
......
...@@ -22,8 +22,54 @@ export default { ...@@ -22,8 +22,54 @@ export default {
pptClose: '关闭PPT', pptClose: '关闭PPT',
pptPageText: '页' pptPageText: '页'
}, },
viewerWork: {}, viewerWork: {
viewerExam: {}, 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: { viewerRead: {
download: '下载', download: '下载',
courseData: '课程资料', courseData: '课程资料',
......
<template> <template>
<div> <div>
<div class="con-title">{{ $t('pages.feedback.feedbackCreate.title') }}</div> <div class="con-title">{{ $t('feedbackCreate.title') }}</div>
<div class="con-box"> <div class="con-box">
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"> <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
<el-form ref="setApplyForm" :model="setApply" :rules="applyRules"> <el-form ref="setApplyForm" :model="setApply" :rules="applyRules">
<el-form-item :label="$t('pages.feedback.feedbackCreate.probDesc')" prop="name"> <el-form-item :label="$t('feedbackCreate.probDesc')" prop="name">
<el-input v-model="setApply.name" :placeholder="$t('pages.feedback.feedbackCreate.enterDesc')" type="text" /> <el-input v-model="setApply.name" :placeholder="$t('feedbackCreate.enterDesc')" type="text" />
</el-form-item> </el-form-item>
<div style="width: 100%; height: 10px;"></div> <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> <textarea id="editor"></textarea>
<div style="width: 100%; height: 10px;"></div> <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 <el-upload
ref="upFile" ref="upFile"
class="upload-demo" class="upload-demo"
...@@ -23,17 +23,17 @@ ...@@ -23,17 +23,17 @@
:on-change="handleChange" :on-change="handleChange"
:http-request="uploadFile" :http-request="uploadFile"
:file-list="filesArr"> :file-list="filesArr">
<el-button size="small" type="primary">{{ $t('pages.feedback.feedbackCreate.btnUpload') }}</el-button> <el-button size="small" type="primary">{{ $t('feedbackCreate.btnUpload') }}</el-button>
<div slot="tip" class="el-upload__tip">{{ $t('pages.feedback.feedbackCreate.limit') }}</div> <div slot="tip" class="el-upload__tip">{{ $t('feedbackCreate.limit') }}</div>
<template v-if="successFileUrl"> <template v-if="successFileUrl">
{{successFileUrl.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}} {{successFileUrl.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}}
</template> </template>
</el-upload> </el-upload>
<template v-if="successFileUrl"> <template v-if="successFileUrl">
<a :href="successFileUrl">{{ $t('pages.feedback.feedbackCreate.downloadButtonText') }}</a> <a :href="successFileUrl">{{ $t('feedbackCreate.downloadButtonText') }}</a>
</template> </template>
</el-form-item> </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-select v-model="value">
<el-option <el-option
v-for="item in options" v-for="item in options"
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<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-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -83,9 +83,9 @@ export default { ...@@ -83,9 +83,9 @@ export default {
file: '' file: ''
}, },
options: [ options: [
{ value: '0', label: this.$t('pages.feedback.feedbackCreate.all') }, { value: '0', label: this.$t('feedbackCreate.all') },
{ value: '1', label: this.$t('pages.feedback.feedbackCreate.administration') }, { value: '1', label: this.$t('feedbackCreate.administration') },
{ value: '2', label: this.$t('pages.feedback.feedbackCreate.technology') } { value: '2', label: this.$t('feedbackCreate.technology') }
], ],
value: '2' value: '2'
} }
...@@ -142,6 +142,7 @@ export default { ...@@ -142,6 +142,7 @@ export default {
/* 初始化 ckeditor */ /* 初始化 ckeditor */
initckeditor () { initckeditor () {
!this.ckeditor && (this.ckeditor = CKEDITOR.replace('editor', { !this.ckeditor && (this.ckeditor = CKEDITOR.replace('editor', {
language: this.$i18n.locale.toLocaleLowerCase(),
height: 300, height: 300,
uiColor: '#eeeeee', uiColor: '#eeeeee',
filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload', filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload',
......
<template> <template>
<div> <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"> <div class="con-box">
<template v-for="(item, index) in find"> <template v-for="(item, index) in find">
<ul v-bind:key="index" class="tabs-list"> <ul v-bind:key="index" class="tabs-list">
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
<template slot="title"> <template slot="title">
{{item.feedback_title}}<div style="position: absolute; right: 70px;" v-html="item.status"></div> {{item.feedback_title}}<div style="position: absolute; right: 70px;" v-html="item.status"></div>
</template> </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="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;"> <div style="overflow: hidden; text-indent: 20px;">
<template v-if="item.isEmpty"> <template v-if="item.isEmpty">
暂无附件内容 暂无附件内容
...@@ -31,12 +31,12 @@ ...@@ -31,12 +31,12 @@
<template v-else> <template v-else>
<template v-for="(item1, index1) in item.feedback_attachments"> <template v-for="(item1, index1) in item.feedback_attachments">
<template v-if="item1.url"> <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> </template>
</template> </template>
</div> </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-if="item.replies.length">
<template v-for="(item1, index1) in item.replies"> <template v-for="(item1, index1) in item.replies">
<div class="discuss-feedback-scroll"> <div class="discuss-feedback-scroll">
...@@ -88,14 +88,14 @@ export default { ...@@ -88,14 +88,14 @@ export default {
data () { data () {
return { return {
find: [{ find: [{
name: this.$t('pages.feedback.feedbackList.tapType'), name: this.$t('feedbackList.tapType'),
isShow: false, isShow: false,
selectIndex: 0, selectIndex: 0,
key: 'type_id', key: 'type_id',
arrItem: [ // 从后台请求 arrItem: [ // 从后台请求
{ val: '0', name: this.$t('pages.feedback.feedbackList.all') }, { val: '0', name: this.$t('feedbackList.all') },
{ val: '1', name: this.$t('pages.feedback.feedbackList.administration') }, { val: '1', name: this.$t('feedbackList.administration') },
{ val: '2', name: this.$t('pages.feedback.feedbackList.technology') } { val: '2', name: this.$t('feedbackList.technology') }
] ]
}], }],
param: { param: {
...@@ -135,7 +135,7 @@ export default { ...@@ -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 = '' temp.replyContent = ''
} }
......
...@@ -569,6 +569,7 @@ export default { ...@@ -569,6 +569,7 @@ export default {
initckeditor() { initckeditor() {
!this.ckeditor && !this.ckeditor &&
(this.ckeditor = CKEDITOR.replace('editor', { (this.ckeditor = CKEDITOR.replace('editor', {
language: this.$i18n.locale.toLocaleLowerCase(),
height: 300, height: 300,
uiColor: '#eeeeee', uiColor: '#eeeeee',
filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload', filebrowserImageUploadUrl: '/api/ck/form/ckeditor-upload',
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
<div class="pages"> <div class="pages">
<div class="head"> <div class="head">
<img class="logo" src="../../assets/images/logo-header.png" /> <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="user">
<div class="nickname">{{ nickName }}</div> <div class="nickname">{{ nickName }}</div>
<div class="logout" @click="logout">{{ $t('components.learnSysLayout.sideBar.outLogin') }}</div> <div class="logout" @click="logout">{{ $t('components.learnSysLayout.sideBar.outLogin') }}</div>
...@@ -36,7 +39,10 @@ ...@@ -36,7 +39,10 @@
</template> </template>
<script> <script>
import cAction from '@action' import cAction from '@action'
import LanguageSwitch from '@/components/languageSwitch/index.vue'
export default { export default {
components: { LanguageSwitch },
data() { data() {
return { return {
latest: null, latest: null,
......
<template> <template>
<div> <div>
<div class="con-title">{{ $t('pages.other.message.title') }}</div> <div class="con-title">{{ $t('message.title') }}</div>
<div class="con-box"> <div class="con-box">
<el-collapse accordion v-model="activeName" @change="handleChange" v-if="msgList.length"> <el-collapse accordion v-model="activeName" @change="handleChange" v-if="msgList.length">
<template v-for="(item, index) in msgList"> <template v-for="(item, index) in msgList">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</el-collapse-item> </el-collapse-item>
</template> </template>
</el-collapse> </el-collapse>
<div class="empty" v-else>{{ $t('pages.other.message.tip') }}</div> <div class="empty" v-else>{{ $t('message.tip') }}</div>
<el-pagination <el-pagination
background background
layout="prev, pager, next" layout="prev, pager, next"
......
<template> <template>
<div> <div>
<div class="con-title">{{ $t('pages.other.setPwd.tip') }}</div> <div class="con-title">{{ $t('password.title') }}</div>
<div class="con-box"> <div class="con-box">
<el-row> <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-col :xs="24" :sm="16" :md="12" :lg="10" :xl="8">
<el-form ref="setpwdform" label-width="100px" :model="accountSetPwd" :rules="rules"> <el-form ref="setpwdform" label-width="160px" :model="accountSetPwd" :rules="rules">
<el-form-item :label="$t('pages.other.setPwd.Oldpassword')" prop="oldPwd"> <el-form-item :label="$t('password.Oldpassword')" prop="oldPwd">
<el-input <el-input
v-model="accountSetPwd.oldPwd" v-model="accountSetPwd.oldPwd"
type="password" type="password"
:placeholder="$t('pages.other.setPwd.inputOldpassword')" :placeholder="$t('password.inputOldpassword')"
@keyup.enter.native="onSubmitSetPwd" @keyup.enter.native="onSubmitSetPwd"
></el-input> ></el-input>
</el-form-item> </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 <el-input
v-model="accountSetPwd.newPwd" v-model="accountSetPwd.newPwd"
type="password" type="password"
placeholder="$t('pages.other.setPwd.inputnewpassword')" :placeholder="$t('password.inputnewpassword')"
@keyup.enter.native="onSubmitSetPwd" @keyup.enter.native="onSubmitSetPwd"
></el-input> ></el-input>
</el-form-item> </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 <el-input
v-model="accountSetPwd.newPwdAgain" v-model="accountSetPwd.newPwdAgain"
type="password" type="password"
placeholder="$t('pages.other.setPwd.inputRepeatnewpassword')" :placeholder="$t('password.inputRepeatnewpassword')"
@keyup.enter.native="onSubmitSetPwd" @keyup.enter.native="onSubmitSetPwd"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<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-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -108,7 +107,6 @@ export default { ...@@ -108,7 +107,6 @@ export default {
actionName: 'Other', actionName: 'Other',
functionName: 'updatePwd', functionName: 'updatePwd',
data: { data: {
// old_password: md5('uokoaduw' + this.accountSetPwd.oldPwd.split('').reverse().join('') + 'auhgniq'),
old_password: this.accountSetPwd.oldPwd, old_password: this.accountSetPwd.oldPwd,
password: this.accountSetPwd.newPwd, password: this.accountSetPwd.newPwd,
passwordR: this.accountSetPwd.newPwdAgain passwordR: this.accountSetPwd.newPwdAgain
...@@ -123,9 +121,6 @@ export default { ...@@ -123,9 +121,6 @@ export default {
catchCallback: () => {}, catchCallback: () => {},
finallyCallback: () => {} finallyCallback: () => {}
}) })
} else {
this.$message.error('请检查输入项,确认无误后,重新提交')
return false
} }
}) })
} }
......
<template> <template>
<div> <div>
<div class="con-title">{{ $t('pages.other.setPwd.title') }}</div> <div class="con-title">{{ $t('avatar.title') }}</div>
<div class="con-box"> <div class="con-box">
<el-row justify="center"> <el-row justify="center">
<el-col :xs="24" :sm="9" :md="8" :lg="7" :xl="6"> <el-col :xs="24" :sm="9" :md="8" :lg="7" :xl="6">
...@@ -10,20 +10,30 @@ ...@@ -10,20 +10,30 @@
</el-col> </el-col>
<el-col :xs="24" :sm="15" :md="16" :lg="17" :xl="18"> <el-col :xs="24" :sm="15" :md="16" :lg="17" :xl="18">
<div class="info"> <div class="info">
{{ $t('pages.other.setPwd.student') }} {{ $t('avatar.student') }}
<b>{{user.student_name}}</b> <b>{{ user.student_name }}</b>
</div> </div>
<div class="info">{{ $t('pages.other.setPwd.studentnum') }}{{user.student_no}}</div> <div class="info">{{ $t('avatar.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('avatar.studentid') }}{{ user.student_id }}</div>
<div class="info" style="display: none;">{{ $t('pages.other.setPwd.studentsoid') }}{{user.sso_id}}</div> <div class="info" style="display: none">{{ $t('avatar.studentsoid') }}{{ user.sso_id }}</div>
<div class="info">{{ $t('pages.other.setPwd.msg') }}</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-upload
<el-button type="primary">{{ $t('pages.other.setPwd.clickup') }}</el-button> 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-upload>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论