UI_2022-02-10
yujialong 3 years ago
parent bc11841b59
commit 6277ff7435
  1. 15
      src/App.vue
  2. 129
      src/api/index.js
  3. 50
      src/components/pdf/index.vue
  4. 72
      src/components/quill/index.vue
  5. 30
      src/components/quill/options.js
  6. 40
      src/i18n/index.js
  7. 11
      src/layouts/footer/index.vue
  8. 40
      src/layouts/header/index.vue
  9. 38
      src/layouts/home/index.vue
  10. 55
      src/layouts/navbar/index.vue
  11. 19
      src/libs/auth/generateBtnPermission.js
  12. 2
      src/libs/bus.js
  13. 4
      src/libs/random_str.js
  14. 14
      src/libs/resize/index.js
  15. 26
      src/libs/route/addRoutes.js
  16. 28
      src/libs/route/generateRoutes.js
  17. 6
      src/libs/route/resetRouter.js
  18. 10
      src/libs/util.cookies.js
  19. 10
      src/libs/util.db.js
  20. 131
      src/libs/util.js
  21. 1558
      src/libs/videoList.js
  22. 40
      src/main.js
  23. 2
      src/mixins/app.js
  24. 6
      src/mixins/setBackground/index.js
  25. 376
      src/pages/account/login/index.vue
  26. 122
      src/pages/account/register/index.vue
  27. 396
      src/pages/ass/list/index.vue
  28. 266
      src/pages/course/list/index.vue
  29. 9
      src/pages/exception/error/403/index.vue
  30. 9
      src/pages/exception/error/404/index.vue
  31. 27
      src/pages/exception/i18n/index.vue
  32. 265
      src/pages/exception/icon/index.vue
  33. 13
      src/pages/index/list/index.vue
  34. 32
      src/pages/information/list/index.vue
  35. 551
      src/pages/match/list/index.vue
  36. 437
      src/pages/preview/list/index.vue
  37. 65
      src/pages/record/list/ass.vue
  38. 102
      src/pages/record/list/index.vue
  39. 77
      src/pages/record/list/practice.vue
  40. 240
      src/pages/record/show/index.vue
  41. 612
      src/pages/setting/person/index.vue
  42. 169
      src/pages/station/list/index.vue
  43. 16
      src/plugins/auth/index.js
  44. 6
      src/plugins/filters/index.js
  45. 10
      src/plugins/index.js
  46. 117
      src/plugins/requests/index.js
  47. 12
      src/plugins/throttle/index.js
  48. 24
      src/router/index.js
  49. 16
      src/router/modules/ass.js
  50. 14
      src/router/modules/index.js
  51. 16
      src/router/modules/preview.js
  52. 29
      src/router/modules/record.js
  53. 16
      src/router/modules/setting.js
  54. 20
      src/router/modules/station.js
  55. 26
      src/router/permission.js
  56. 62
      src/router/routes.js
  57. 8
      src/setting.env.js
  58. 74
      src/setting.js
  59. 6
      src/store/getters.js
  60. 22
      src/store/index.js
  61. 14
      src/store/modules/layout.js
  62. 14
      src/store/modules/project.js
  63. 97
      src/store/modules/user.js
  64. 53
      src/styles/common.scss
  65. 28
      src/styles/font/icon/demo_index.html
  66. 9
      src/styles/font/icon/iconfont.css
  67. 51
      src/styles/font/icon/iconfont.svg
  68. 1
      src/styles/layout/index.scss
  69. 4
      src/styles/lib/_flex.scss
  70. 2
      src/styles/lib/_float.scss
  71. 1
      src/styles/lib/_link.scss
  72. 1
      src/styles/lib/_position.scss
  73. 1
      src/styles/lib/_reset.scss
  74. 3
      src/styles/var.scss

@ -5,20 +5,21 @@
</template> </template>
<script> <script>
import Setting from '@/setting'; import Setting from "@/setting";
import util from '@/libs/util'; import util from "@/libs/util";
export default { export default {
name: 'App', name: "App",
created() { created() {
//localStorage //localStorage
if (util.local.get(Setting.storeKey)) { if (util.local.get(Setting.storeKey)) {
this.$store.replaceState(Object.assign({}, this.$store.state,util.local.get(Setting.storeKey))) this.$store.replaceState(Object.assign({}, this.$store.state, util.local.get(Setting.storeKey)));
} }
//vuexlocalStorage //vuexlocalStorage
window.addEventListener("beforeunload", () => { window.addEventListener("beforeunload", () => {
util.local.get(Setting.tokenKey) && util.local.set(Setting.storeKey,this.$store.state) util.local.get(Setting.tokenKey) && util.local.set(Setting.storeKey, this.$store.state);
}) });
}
} }
};
</script> </script>

@ -1,24 +1,94 @@
import Setting from '@/setting' import Setting from "@/setting";
let host = `${Setting.apiBaseURL}evaluation/`
let loginhost = `${Setting.apiBaseURL}liuwanr/` // let host = `${Setting.apiBaseURL}evaluation/`;
let loginhost = `${Setting.apiBaseURL}liuwanr/`;
let host = "http://192.168.31.151:9000/"; // 榕
export default { export default {
host, host,
logins: `${loginhost}userInfo/logins`, //登录 
updateLogInNumber: `${loginhost}userInfo/updateLogInNumber`, //用户登录修改登录次数和登陆时间 // 登录
logins: `${host}users/users/user/login`, //登录
verification: `${host}users/users/user/captcha`,// 验证码图片
//实验台
experimentOverview: `${host}occupationlab/achievement/experimentOverview`, //实验概览
queryAssessmentByStudent: `${host}occupationlab/achievement/queryAssessmentByStudent`, //学生端考核成绩
queryPracticeByStudent: `${host}occupationlab/achievement/queryPracticeByStudent`, //学生端练习成绩
exportAssessmentInfo: `${host}occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `${host}occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
// 能力测评
canExperiment: `${host}occupationlab/occupationlab/evaluationrecord/can_experiment`, // 查询是否能够开启实验
experimentDetail: `${host}occupationlab/occupationlab/evaluationrecord/detail`, // 成绩详情
experimentNext: `${host}occupationlab/occupationlab/evaluationrecord/next`, // 下一题
experimentNotmade: `${host}occupationlab/occupationlab/evaluationrecord/not_made`, // 提交之前查询是否还有未做完的试题
openExercise: `${host}occupationlab/occupationlab/evaluationrecord/openExercise`, // 查询是否能开启虚拟仿真实验
openTeaching: `${host}occupationlab/occupationlab/evaluationrecord/openTeaching`, // 查询是否能开启教学实验
experimentPrevious: `${host}occupationlab/occupationlab/evaluationrecord/previous`, // 上一题
experimentRemaining: `${host}occupationlab/occupationlab/evaluationrecord/remaining`, // 获取测评剩余时间
experimentStart: `${host}occupationlab/occupationlab/evaluationrecord/start`, // 开始测评
experimentSubmit: `${host}occupationlab/occupationlab/evaluationrecord/submit`, // 提交测评
// 考核列表
pageStuAssessment: `${host}occupationlab/assessment/pageStuAssessment`, // 学生端——学生考核列表
getPythonSysByStuAccountId: `${host}occupationlab/assessment/getPythonSysByStuAccountId`, // 学生端——课程名称
myClassByStudent: `${host}occupationlab/achievement/myClassByStudent`, // 学生端:我的班级
getStudentInfoByAccountId: `${host}occupationlab/architecture/getStudentInfoByAccountId`, // 查看学生信息
enterExam: `${host}occupationlab/assessment/enterExam`, // 学生端——进入考试
// 课程学习
queryGlClassification: `${host}occupationlab/management/edu/courseClassification/queryGlClassification`, // 查询课程分类
queryCourseByCondition: `${host}occupationlab/management/edu/course/queryCourseByCondition`, // 课程列表分页条件查询
getCourseById: `${host}occupationlab/management/edu/course/getCourse`, // 根据id查询课程
queryChaptersAndSubsections: `${host}occupationlab/management/edu/courseChapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构
getSubsection: `${host}occupationlab/management/edu/courseSubsection/getSubsection`, // 根据小节id获取预览文件地址
getPlayAuth: `${host}nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证
// 资讯
queryAllColumns: `${host}occupationlab/enterprise/information/column/queryAllColumns`, // 栏目树
queryArticleByCondition: `${host}occupationlab/enterprise/information/article/queryArticleByCondition`, // 文章列表分页条件查询
getArticle: `${host}occupationlab/enterprise/information/article/getArticle`, // 根据id查询文章
// 线上赛事
onlineContestQuery: `${host}occupationlab/enterprise/match/onlineContest/onlineContestQuery`, // 线上赛事列表分页条件查询
addApplicant: `${host}occupationlab/enterprise/match/applicant/addApplicant`, // 添加报名人员
getContestProgress: `${host}occupationlab/enterprise/match/contest-progress/getContestProgress`, // 根据赛事id查询竞赛进展
getContest: `${host}occupationlab/enterprise/match/contest/getContest`, // 根据id查询赛事
// logins: `${loginhost}userInfo/logins`, //登录
updateLogInNumber: `${loginhost}userInfo/updateLogInNumber`, //用户登录修改登录次数和登陆时间
uploadUserAvatars: `${loginhost}userInfo/uploadUserAvatars`, //上传头像 uploadUserAvatars: `${loginhost}userInfo/uploadUserAvatars`, //上传头像
loginSchool: `${loginhost}userInfo/loginSchoolClient`, //登陆查询学校 loginSchool: `${loginhost}userInfo/loginSchoolClient`, //登陆查询学校
loginRole: `${loginhost}userInfo/loginRole`, //登陆查询角色 loginRole: `${loginhost}userInfo/loginRole`, //登陆查询角色
save: `${host}tms/userInfo/add`, //注册 save: `${host}tms/userInfo/add`, //注册
queryToken: `${loginhost}userInfo/queryToken`, queryToken: `${loginhost}userInfo/queryToken`,
queryWorkNumberIsExist: `${loginhost}userInfo/queryWorkNumberIsExist`,//查询学号、工号是否存在 queryWorkNumberIsExist: `${loginhost}userInfo/queryWorkNumberIsExist`,//查询学号、工号是否存在
queryAccountIsExist: `${loginhost}userInfo/queryAccountIsExist`,//查询员工,学生账号是否存在接口 queryAccountIsExist: `${loginhost}userInfo/queryAccountIsExist`,//查询员工,学生账号是否存在接口
addStuPro: `${host}stuProfessionalArchitecture/addStuProfessionalArchitecture`, //添加学生专业 addStuPro: `${host}stuProfessionalArchitecture/addStuProfessionalArchitecture`, //添加学生专业
queryStuPro: `${host}stuProfessionalArchitecture/queryStuProfessionalArchitecture`, //查询学生专业 queryStuPro: `${host}stuProfessionalArchitecture/queryStuProfessionalArchitecture`, //查询学生专业
queryStuGrade: `${host}stuProfessionalArchitecture/queryStuGrade`, //查询学生年级 // queryStuGrade: `${host}stuProfessionalArchitecture/queryStuGrade`, //查询学生年级
queryStuClass: `${host}stuProfessionalArchitecture/queryStuClass`, //查询学生班级 // queryStuClass: `${host}stuProfessionalArchitecture/queryStuClass`, //查询学生班级
deleteStuPro: `${host}stuProfessionalArchitecture/deleteStuProfessionalArchitecture`, //删除学生专业 deleteStuPro: `${host}stuProfessionalArchitecture/deleteStuProfessionalArchitecture`, //删除学生专业
updateStuPro: `${host}stuProfessionalArchitecture/updateStuProfessionalArchitecture`, //编辑学生专业 updateStuPro: `${host}stuProfessionalArchitecture/updateStuProfessionalArchitecture`, //编辑学生专业
@ -66,7 +136,7 @@ export default {
queryAssesmentcondition: `${host}assesment/queryAssesmentcondition`,//考核成绩表格 queryAssesmentcondition: `${host}assesment/queryAssesmentcondition`,//考核成绩表格
queryGetById: `${host}assesment/queryGetById`,//查询考核信息 queryGetById: `${host}assesment/queryGetById`,//查询考核信息
updateAssesment: `${host}assesment/updateAssesment`,//修改考核 updateAssesment: `${host}assesment/updateAssesment`,//修改考核
updateState:`${host}assesment/updateState`,//点击启动修改考核时间 // updateState: `${host}assesment/updateState`,//点击启动修改考核时间
updateAssesmentTime: `${host}assesment/updateAssesmentTime`,//点击提前结束获取当前时间 updateAssesmentTime: `${host}assesment/updateAssesmentTime`,//点击提前结束获取当前时间
queryAssesmentScore: `${host}assesment/queryAssesmentScore`,//获取查询成绩页面 queryAssesmentScore: `${host}assesment/queryAssesmentScore`,//获取查询成绩页面
queryAssesmentAchievement: `${host}assesment/queryAssesmentAchievement`,//查询成绩明细板块 queryAssesmentAchievement: `${host}assesment/queryAssesmentAchievement`,//查询成绩明细板块
@ -132,27 +202,14 @@ export default {
sendPhoneCode: `${host}tms/user/sendPhoneCode`,//发送手机验证码 sendPhoneCode: `${host}tms/user/sendPhoneCode`,//发送手机验证码
bindPhone: `${host}tms/user/bindPhone`,//校验手机验证码 bindPhone: `${host}tms/user/bindPhone`,//校验手机验证码
canExperiment: `${host}tms/evaluationrecord/can_experiment`, //查询是否能够开启实验
openExercise: `${host}tms/evaluationrecord/openExercise`, //查询是否能够开启虚拟仿真实验
openTeaching: `${host}tms/evaluationrecord/openTeaching`, //查询是否能够开启教学实验
experimentDetail: `${host}tms/evaluationrecord/detail`, //成绩详情
experimentNext: `${host}tms/evaluationrecord/next`, //下一题 joinPractice: `${host}tms/classTech/joinPractice`, //通过邀请码进入实验
experimentNotmade: `${host}tms/evaluationrecord/not_made`, //提交之前查询是否还有未做完的试题 queryArchievement: `${host}tms/classTech/queryExperimentalReport`, //查看教学实验报告
experimentPrevious: `${host}tms/evaluationrecord/previous`, //上一题 queryVirtualReport: `${host}tms/classTech/queryVirtualReport`, //查看虚仿实验报告
experimentRemaining: `${host}tms/evaluationrecord/remaining`, //获取测评剩余时间 checkInvitationCode: `${host}tms/classTech/checkInvitationCode`, //校验是否需要邀请码
experimentStart: `${host}tms/evaluationrecord/start`, //开始测评 userRecord: `${host}tms/classTech/userRecord`, //查询班级实验列表信息
experimentSubmit: `${host}tms/evaluationrecord/submit`, //提交测评 modifyReport: `${host}Achievement/modify`
};
fictitiousRecord: `${host}fictitious/projectrecord/user/record`, //用户端实验记录
exportProjectRecord: `${host}fictitious/projectrecord/user/exportProjectRecord`, //虚拟实验记录导出
exportExperimentProjectRecord: `${host}fictitious/projectrecord/user/exportExperimentProjectRecord`, //个人实验记录导出
fictitiousScore: `${host}fictitious/projectrecord/user/score`, //个人实验概览
experimentRecord: `${host}fictitious/projectrecord/user/experimentRecord`, //用户端教学实验记录
joinPractice: `${host}tms/classTech/joinPractice`, //通过邀请码进入实验
queryArchievement: `${host}tms/classTech/queryExperimentalReport`, //查看教学实验报告
queryVirtualReport: `${host}tms/classTech/queryVirtualReport`, //查看虚仿实验报告
checkInvitationCode: `${host}tms/classTech/checkInvitationCode`, //校验是否需要邀请码
userRecord: `${host}tms/classTech/userRecord`, //查询班级实验列表信息
modifyReport: `${host}Achievement/modify`,
}

@ -9,12 +9,15 @@
:modal="false" :modal="false"
:append-to-body="true"> :append-to-body="true">
<div> <div>
<button type="button" aria-label="Close" class="el-dialog__headerbtn" @click="closePdf"><i class="el-dialog__close el-icon el-icon-close"></i></button> <button type="button" aria-label="Close" class="el-dialog__headerbtn" @click="closePdf"><i
class="el-dialog__close el-icon el-icon-close"></i></button>
<div class="pdf"> <div class="pdf">
<p class="arrow"> <p class="arrow">
<span @click="changePdfPage(0)" class="turn el-icon-arrow-left" :class="{grey: currentPage==1}"></span> <span @click="changePdfPage(0)" class="turn el-icon-arrow-left"
:class="{grey: currentPage==1}"></span>
{{ currentPage }} / {{ pageCount }} {{ currentPage }} / {{ pageCount }}
<span @click="changePdfPage(1)" class="turn el-icon-arrow-right" :class="{grey: currentPage==pageCount}"></span> <span @click="changePdfPage(1)" class="turn el-icon-arrow-right"
:class="{grey: currentPage==pageCount}"></span>
</p> </p>
<pdf <pdf
class="pdf-wrap" class="pdf-wrap"
@ -32,50 +35,51 @@
</template> </template>
<script> <script>
import pdf from "vue-pdf"; import pdf from "vue-pdf";
export default { export default {
props: ['visible','src'], props: ["visible", "src"],
data() { data() {
return { return {
pdfVisible: false, pdfVisible: false,
pdfSrc: '', pdfSrc: "",
currentPage: 0, currentPage: 0,
pageCount: 0, pageCount: 0,
fileType: 'pdf', fileType: "pdf"
}; };
}, },
components: { pdf }, components: { pdf },
mounted() { mounted() {
this.addEvent() this.addEvent();
}, },
methods: { methods: {
closePdf() { closePdf() {
this.$emit('update:visible',false) this.$emit("update:visible", false);
this.$emit('update:src','') this.$emit("update:src", "");
this.currentPage = 1 this.currentPage = 1;
}, },
changePdfPage(val) { changePdfPage(val) {
if (val === 0 && this.currentPage > 1) { if (val === 0 && this.currentPage > 1) {
this.currentPage-- this.currentPage--;
} }
if (val === 1 && this.currentPage < this.pageCount) { if (val === 1 && this.currentPage < this.pageCount) {
this.currentPage++ this.currentPage++;
} }
}, },
loadPdfHandler(e) { loadPdfHandler(e) {
this.currentPage = 1 this.currentPage = 1;
}, },
addEvent() { addEvent() {
document.onkeydown = e => { document.onkeydown = e => {
let key = window.event.keyCode let key = window.event.keyCode;
if (key == 37) { if (key == 37) {
this.changePdfPage(0) this.changePdfPage(0);
} else if (key == 39) { } else if (key == 39) {
this.changePdfPage(1) this.changePdfPage(1);
}
} }
this.$once('hook:beforeDestroy',() => { };
document.onkeydown = null this.$once("hook:beforeDestroy", () => {
}) document.onkeydown = null;
});
} }
} }
}; };
@ -83,14 +87,18 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .pdf-dia { /deep/ .pdf-dia {
border-radius: 0 !important; border-radius: 0 !important;
.el-dialog__header { .el-dialog__header {
display: none; display: none;
} }
.el-dialog__body { .el-dialog__body {
padding: 0; padding: 0;
} }
.el-dialog__headerbtn { .el-dialog__headerbtn {
top: 10px; top: 10px;
.el-dialog__close { .el-dialog__close {
color: #fff; color: #fff;
font-size: 16px; font-size: 16px;
@ -107,12 +115,14 @@ export default {
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
background-color: #333; background-color: #333;
.turn { .turn {
margin: 0 10px; margin: 0 10px;
font-size: 18px; font-size: 18px;
cursor: pointer; cursor: pointer;
} }
} }
.pdf-wrap { .pdf-wrap {
height: calc(100vh - 45px); height: calc(100vh - 45px);
margin: 0 auto; margin: 0 auto;

@ -2,25 +2,26 @@
<div class="quill" :class="classes"> <div class="quill" :class="classes">
<div ref="editor" :style="styles" v-loading="loading"></div> <div ref="editor" :style="styles" v-loading="loading"></div>
<el-upload :action="this.api.fileupload" :before-upload="beforeUpload" :on-success="editorUploadSuccess" style="display: none"> <el-upload :action="this.api.fileupload" :before-upload="beforeUpload" :on-success="editorUploadSuccess"
style="display: none">
<el-button class="editorUpload" size="small" type="primary">点击上传</el-button> <el-button class="editorUpload" size="small" type="primary">点击上传</el-button>
</el-upload> </el-upload>
</div> </div>
</template> </template>
<script> <script>
import Quill from 'quill'; import Quill from "quill";
import 'quill/dist/quill.core.css'; import "quill/dist/quill.core.css";
import 'quill/dist/quill.snow.css'; import "quill/dist/quill.snow.css";
import 'quill/dist/quill.bubble.css'; import "quill/dist/quill.bubble.css";
import toolbarOptions from './options' import toolbarOptions from "./options";
export default { export default {
name: 'quill', name: "quill",
props: { props: {
value: { value: {
type: String, type: String,
default: '' default: ""
}, },
readonly: { readonly: {
type: Boolean, type: Boolean,
@ -44,37 +45,37 @@
data() { data() {
return { return {
Quill: null, Quill: null,
currentValue: '', currentValue: "",
options: { options: {
theme: 'snow', theme: "snow",
bounds: document.body, bounds: document.body,
debug: 'warn', debug: "warn",
modules: { modules: {
toolbar: { toolbar: {
container: toolbarOptions, container: toolbarOptions,
handlers: { handlers: {
'image': function (value) { "image": function(value) {
if (value) { if (value) {
// iview // iview
document.querySelector('.editorUpload').click() document.querySelector(".editorUpload").click();
} else { } else {
this.Quill.format('image', false); this.Quill.format("image", false);
} }
} }
} }
} }
}, },
placeholder: '', placeholder: "",
readOnly: this.readonly readOnly: this.readonly
}, },
loading: false loading: false
} };
}, },
computed: { computed: {
classes() { classes() {
return [ return [
{ {
'quill-no-border': !this.border "quill-no-border": !this.border
} }
]; ];
}, },
@ -118,53 +119,53 @@
this.Quill.pasteHTML(this.currentValue); this.Quill.pasteHTML(this.currentValue);
if (this.toTop) { if (this.toTop) {
this.$nextTick(() => { this.$nextTick(() => {
window.scrollTo(0,0) window.scrollTo(0, 0);
}) });
} }
// //
this.Quill.on('text-change', (delta, oldDelta, source) => { this.Quill.on("text-change", (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML; const html = this.$refs.editor.children[0].innerHTML;
const text = this.Quill.getText(); const text = this.Quill.getText();
const quill = this.Quill; const quill = this.Quill;
// //
this.currentValue = html; this.currentValue = html;
// v-model // v-model
this.$emit('input', html); this.$emit("input", html);
// //
this.$emit('on-change', { html, text, quill }); this.$emit("on-change", { html, text, quill });
}); });
// quill // quill
this.Quill.on('text-change', (delta, oldDelta, source) => { this.Quill.on("text-change", (delta, oldDelta, source) => {
this.$emit('on-text-change', delta, oldDelta, source); this.$emit("on-text-change", delta, oldDelta, source);
}); });
this.Quill.on('selection-change', (range, oldRange, source) => { this.Quill.on("selection-change", (range, oldRange, source) => {
this.$emit('on-selection-change', range, oldRange, source); this.$emit("on-selection-change", range, oldRange, source);
}); });
this.Quill.on('editor-change', (eventName, ...args) => { this.Quill.on("editor-change", (eventName, ...args) => {
this.$emit('on-editor-change', eventName, ...args); this.$emit("on-editor-change", eventName, ...args);
}); });
}, },
beforeUpload(file) { beforeUpload(file) {
this.loading = true this.loading = true;
}, },
editorUploadSuccess(res) { editorUploadSuccess(res) {
// //
let quill = this.Quill let quill = this.Quill;
// //
if (res.data.filesResult.fileUrl) { if (res.data.filesResult.fileUrl) {
// //
let length = quill.getSelection().index; let length = quill.getSelection().index;
// res // res
quill.insertEmbed(length, 'image', res.data.filesResult.fileUrl) quill.insertEmbed(length, "image", res.data.filesResult.fileUrl);
// //
quill.setSelection(length + 1) quill.setSelection(length + 1);
} else { } else {
this.$message.success('图片插入失败') this.$message.success("图片插入失败");
} }
this.loading = false this.loading = false;
},
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.quill-no-border { .quill-no-border {
@ -172,6 +173,7 @@
border: none; border: none;
border-bottom: 1px solid #e8eaec; border-bottom: 1px solid #e8eaec;
} }
.ql-container.ql-snow { .ql-container.ql-snow {
border: none; border: none;
} }

@ -1,16 +1,16 @@
export default [ export default [
['bold', 'italic', 'underline', 'strike'], ["bold", "italic", "underline", "strike"],
['blockquote', 'code-block'], ["blockquote", "code-block"],
[{ 'header': 1 }, { 'header': 2 }], [{ "header": 1 }, { "header": 2 }],
[{ 'list': 'ordered' }, { 'list': 'bullet' }], [{ "list": "ordered" }, { "list": "bullet" }],
[{ 'script': 'sub' }, { 'script': 'super' }], [{ "script": "sub" }, { "script": "super" }],
[{ 'indent': '-1' }, { 'indent': '+1' }], [{ "indent": "-1" }, { "indent": "+1" }],
[{ 'direction': 'rtl' }], [{ "direction": "rtl" }],
[{ 'size': ['small', false, 'large', 'huge'] }], [{ "size": ["small", false, "large", "huge"] }],
[{ 'header': [1, 2, 3, 4, 5, 6, false] }], [{ "header": [1, 2, 3, 4, 5, 6, false] }],
[{ 'color': [] }, { 'background': [] }], [{ "color": [] }, { "background": [] }],
[{ 'font': [] }], [{ "font": [] }],
[{ 'align': [] }], [{ "align": [] }],
['clean'], ["clean"],
['link', 'image', 'video'] ["link", "image", "video"]
] ];

@ -1,30 +1,30 @@
export const messages = { export const messages = {
'zh': { "zh": {
i18n: { i18n: {
breadcrumb: '国际化产品', breadcrumb: "国际化产品",
tips: '通过切换语言按钮,来改变当前内容的语言。', tips: "通过切换语言按钮,来改变当前内容的语言。",
btn: '切换英文', btn: "切换英文",
title1: '常用用法', title1: "常用用法",
p1: '要是你把你的秘密告诉了风,那就别怪风把它带给树。', p1: "要是你把你的秘密告诉了风,那就别怪风把它带给树。",
p2: '没有什么比信念更能支撑我们度过艰难的时光了。', p2: "没有什么比信念更能支撑我们度过艰难的时光了。",
p3: '只要能把自己的事做好,并让自己快乐,你就领先于大多数人了。', p3: "只要能把自己的事做好,并让自己快乐,你就领先于大多数人了。",
title2: '组件插值', title2: "组件插值",
info: 'Element组件需要国际化,请参考 {action}。', info: "Element组件需要国际化,请参考 {action}。",
value: '文档' value: "文档"
} }
}, },
'en': { "en": {
i18n: { i18n: {
breadcrumb: 'International Products', breadcrumb: "International Products",
tips: 'Click on the button to change the current language. ', tips: "Click on the button to change the current language. ",
btn: 'Switch Chinese', btn: "Switch Chinese",
title1: 'Common usage', title1: "Common usage",
p1: "If you reveal your secrets to the wind you should not blame the wind for revealing them to the trees.", p1: "If you reveal your secrets to the wind you should not blame the wind for revealing them to the trees.",
p2: "Nothing can help us endure dark times better than our faith. ", p2: "Nothing can help us endure dark times better than our faith. ",
p3: "If you can do what you do best and be happy, you're further along in life than most people.", p3: "If you can do what you do best and be happy, you're further along in life than most people.",
title2: 'Component interpolation', title2: "Component interpolation",
info: 'The default language of Element is Chinese. If you wish to use another language, please refer to the {action}.', info: "The default language of Element is Chinese. If you wish to use another language, please refer to the {action}.",
value: 'documentation' value: "documentation"
}
} }
} }
};

@ -8,16 +8,12 @@
<script> <script>
export default { export default {
data() { data() {
return { return {};
};
}, },
mounted() { mounted() {
}, },
methods: { methods: {}
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -27,14 +23,17 @@ export default {
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
background-color: #333; background-color: #333;
p { p {
margin-bottom: 10px; margin-bottom: 10px;
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
} }
a { a {
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
&:hover { &:hover {
opacity: .8; opacity: .8;
} }

@ -1,6 +1,7 @@
<template> <template>
<div class="header"> <div class="header">
<div v-if="this.$route.path=='/setting/person'" class="goBack" @click="back"><i class="el-icon-arrow-left"></i>返回</div> <div v-if="this.$route.path=='/setting/person'" class="goBack" @click="back"><i class="el-icon-arrow-left"></i>返回
</div>
<template v-else> <template v-else>
<img class="logo hh" v-if="isHh" src="@/assets/img/logo-hh.png" /> <img class="logo hh" v-if="isHh" src="@/assets/img/logo-hh.png" />
<img class="logo" v-else src="@/assets/img/logo.png"> <img class="logo" v-else src="@/assets/img/logo.png">
@ -18,34 +19,35 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import util from '@/libs/util' import util from "@/libs/util";
import Setting from '@/setting' import Setting from "@/setting";
export default { export default {
data() { data() {
return { return {
isHh: Setting.isHh, isHh: Setting.isHh
}; };
}, },
computed: { computed: {
...mapState('user', [ ...mapState("user", [
'avatar','userName' "avatar", "userName"
]), ])
}, },
mounted() { mounted() {
}, },
methods: { methods: {
...mapActions('user', [ ...mapActions("user", [
'logout' "logout"
]), ]),
toPersonal() { toPersonal() {
this.$router.push('/setting/person') this.$router.push("/setting/person");
}, },
back() { back() {
this.$router.go(-1) this.$router.go(-1);
}
} }
},
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -57,10 +59,12 @@ export default {
font-weight: bold; font-weight: bold;
margin-left: 20px; margin-left: 20px;
} }
.goBack i { .goBack i {
color: #9278ff; color: #9278ff;
font-size: 20px; font-size: 20px;
} }
.header { .header {
position: relative; position: relative;
display: flex; display: flex;
@ -72,16 +76,20 @@ export default {
font-size: 16px; font-size: 16px;
color: #333; color: #333;
} }
.header .logo { .header .logo {
width: 150px; width: 150px;
margin-left: 20px; margin-left: 20px;
&.hh { &.hh {
width: 500px; width: 500px;
} }
} }
.header-right { .header-right {
padding-right: 50px; padding-right: 50px;
} }
.header-user-con { .header-user-con {
display: flex; display: flex;
align-items: center; align-items: center;
@ -92,25 +100,31 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.user-avator { .user-avator {
margin-left: 10px; margin-left: 10px;
} }
.ml20 { .ml20 {
margin-left: 20px; margin-left: 20px;
} }
.user-avator img { .user-avator img {
display: block; display: block;
width: 40px; width: 40px;
height: 40px; height: 40px;
border-radius: 50%; border-radius: 50%;
} }
.header-right .el-button--text { .header-right .el-button--text {
color: #333; color: #333;
} }
.header-right .el-divider--vertical { .header-right .el-divider--vertical {
width: 2px; width: 2px;
height: 15px; height: 15px;
} }
.header-right .el-divider { .header-right .el-divider {
background-color: #333; background-color: #333;
} }

@ -15,16 +15,17 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import util from '@/libs/util' import util from "@/libs/util";
import Setting from '@/setting' import Setting from "@/setting";
import vHead from '../header' import vHead from "../header";
import navbar from '../navbar' import navbar from "../navbar";
import vFooter from '../footer' import vFooter from "../footer";
export default { export default {
data() { data() {
return { return {
hideNavList: ['/record/show','/setting/person'] hideNavList: ["/record/show", "/setting/person"]
}; };
}, },
components: { components: {
@ -32,29 +33,27 @@ export default {
navbar, navbar,
vFooter vFooter
}, },
computed: { computed: {},
},
mounted() { mounted() {
this.autoLogout() this.autoLogout();
}, },
methods: { methods: {
...mapActions('user', [ ...mapActions("user", [
'logout' "logout"
]), ]),
// ,退 // ,退
autoLogout() { autoLogout() {
let lastTime = new Date().getTime() let lastTime = new Date().getTime();
document.onmousedown = () => { document.onmousedown = () => {
lastTime = new Date().getTime() lastTime = new Date().getTime();
} };
setInterval(() => { setInterval(() => {
if (util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > Setting.autoLogoutTime) { if (util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > Setting.autoLogoutTime) {
util.errorMsg('用户登录过期,请重新登录') util.errorMsg("用户登录过期,请重新登录");
setTimeout(this.logout,1500) setTimeout(this.logout, 1500);
} }
},1000) }, 1000);
} }
} }
}; };
@ -62,6 +61,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
min-height: 100%; min-height: 100%;
.view { .view {
min-height: calc(100vh - 175px); min-height: calc(100vh - 175px);
padding: 24px; padding: 24px;

@ -1,54 +1,56 @@
<template> <template>
<div> <div>
<el-tabs v-model="active" @tab-click="jump"> <el-tabs v-model="active" @tab-click="jump">
<el-tab-pane v-for="(item,index) in menus" :key="index" :label="item.label" :name="item.index"></el-tab-pane> <el-tab-pane v-for="(item,index) in menus" :key="index" :label="item.label"
:name="item.index"></el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
<script> <script>
import { mapState,mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import Setting from '@/setting' import Setting from "@/setting";
import util from '@/libs/util' import util from "@/libs/util";
export default { export default {
data() { data() {
return { return {
active: this.$route.path, active: this.$route.path,
menus: [ menus: [
{ {
index: '/station/list', index: "/station/list",
label: '实验台' label: "实验台"
}, },
{ {
index: '/preview/list', index: "/appraisal/list",
label: '能力测评' label: "能力测评"
}, },
{ {
index: '/record/list', index: "/record/list",
label: '实验记录' label: "实验记录"
}, },
{ {
index: '/ass/list', index: "/ass/list",
label: '考核列表' label: "考核列表"
}, },
{ {
index: '/course/list', index: "/course/list",
label: '课程学习' label: "课程学习"
}, },
{ {
index: '/information/list', index: "/info/list",
label: '资讯' label: "资讯"
}, },
{ {
index: '/match/list', index: "/match/list",
label: '线上赛事' label: "线上赛事"
}, }
], ]
}; };
}, },
watch: { watch: {
'$route'(to,from) { "$route"(to, from) {
this.active = this.$route.path this.active = this.$route.path;
} }
}, },
mounted() { mounted() {
@ -57,9 +59,10 @@ export default {
methods: { methods: {
// //
jump(tab) { jump(tab) {
this.active = tab.name this.active = tab.name;
this.$router.push(tab.name).catch(err => {}) this.$router.push(tab.name).catch(err => {
}, });
}
} }
}; };
</script> </script>
@ -71,8 +74,10 @@ export default {
margin: 0; margin: 0;
box-shadow: 0px 0px 25px 2px rgba(48, 115, 248, 0.14); box-shadow: 0px 0px 25px 2px rgba(48, 115, 248, 0.14);
background-color: #fff; background-color: #fff;
.el-tabs__nav-wrap::after { .el-tabs__nav-wrap::after {
background-color: #fff; background-color: #fff;
.el-tabs__item { .el-tabs__item {
padding: 0 30px; padding: 0 30px;
outline: none; outline: none;

@ -2,24 +2,25 @@
* @description 生成按钮级别权限组 * @description 生成按钮级别权限组
* */ * */
import store from '@/store'; import store from "@/store";
export default function(data) { export default function(data) {
let result = [] let result = [];
data.map(e => { data.map(e => {
if (e.select) { if (e.select) {
e.children.map(n => { e.children.map(n => {
if (n.select) { if (n.select) {
if (n.children.length) { if (n.children.length) {
result.push(`${e.name}:${n.name}`) result.push(`${e.name}:${n.name}`);
n.children.map(j => { n.children.map(j => {
j.select && (e.path ? result.push(`${e.path}:${n.name}:${j.name}`) : result.push(`${n.path}:${j.name}`)) j.select && (e.path ? result.push(`${e.path}:${n.name}:${j.name}`) : result.push(`${n.path}:${j.name}`));
}) });
} else { } else {
result.push(`${e.path}:${n.name}`) result.push(`${e.path}:${n.name}`);
} }
} }
}) });
} }
}) });
store.dispatch('auth/addBtnAuth',result) store.dispatch("auth/addBtnAuth", result);
} }

@ -1,4 +1,4 @@
import Vue from 'vue'; import Vue from "vue";
// 使用 Event Bus // 使用 Event Bus
const bus = new Vue(); const bus = new Vue();

@ -1,8 +1,8 @@
// 生成随机字符串 // 生成随机字符串
export default function(len = 32) { export default function(len = 32) {
const $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; const $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
const maxPos = $chars.length; const maxPos = $chars.length;
let str = ''; let str = "";
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
str += $chars.charAt(Math.floor(Math.random() * maxPos)); str += $chars.charAt(Math.floor(Math.random() * maxPos));
} }

@ -1,16 +1,18 @@
// rem等比适配配置文件 // rem等比适配配置文件
// 基准大小 // 基准大小
const baseSize = 16 const baseSize = 16;
// 设置 rem 函数 // 设置 rem 函数
function setRem() { function setRem() {
// 当前页面宽度相对于 1920宽的缩放比例,可根据自己需要修改。 // 当前页面宽度相对于 1920宽的缩放比例,可根据自己需要修改。
const scale = document.documentElement.clientWidth / 1920 const scale = document.documentElement.clientWidth / 1920;
// 设置页面根节点字体大小(“Math.min(scale, 2)” 指最高放大比例为2,可根据实际业务需求调整) // 设置页面根节点字体大小(“Math.min(scale, 2)” 指最高放大比例为2,可根据实际业务需求调整)
document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px' document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + "px";
} }
// 初始化 // 初始化
setRem() setRem();
// 改变窗口大小时重新设置 rem // 改变窗口大小时重新设置 rem
window.onresize = function() { window.onresize = function() {
setRem() setRem();
} };

@ -1,31 +1,31 @@
import store from '@/store'; import store from "@/store";
import router from '@/router'; import router from "@/router";
import generateBtnPermission from '../auth/generateBtnPermission'; import generateBtnPermission from "../auth/generateBtnPermission";
const newRoutes = [] const newRoutes = [];
function createMeta(item) { function createMeta(item) {
let meta = { title: item.name } let meta = { title: item.name };
return meta return meta;
} }
function createRoute(data) { function createRoute(data) {
data.map(e => { data.map(e => {
if (e.select && e.path) { if (e.select && e.path) {
let meta = createMeta(e) let meta = createMeta(e);
newRoutes.push({ newRoutes.push({
name: e.path, name: e.path,
path: () => import(`@/pages/${e.path}.vue`), path: () => import(`@/pages/${e.path}.vue`),
meta meta
}) });
} }
e.children && e.children.length && createRoute(e.children) e.children && e.children.length && createRoute(e.children);
}) });
} }
export default function(data, path) { export default function(data, path) {
generateBtnPermission(data) generateBtnPermission(data);
createRoute(data) createRoute(data);
store.dispatch('auth/addRoutes',newRoutes) store.dispatch("auth/addRoutes", newRoutes);
// router.addRoutes(routes) // router.addRoutes(routes)
} }

@ -1,26 +1,26 @@
import store from '@/store'; import store from "@/store";
import router from '@/router'; import router from "@/router";
export default function() { export default function() {
setTimeout(() => { setTimeout(() => {
let routes = store.state.auth.routes let routes = store.state.auth.routes;
routes.forEach(e => { routes.forEach(e => {
if(e.path == '/'){ if (e.path == "/") {
e.component = () => import('@/layouts/home/index.vue') e.component = () => import("@/layouts/home/index.vue");
} else { } else {
e.component = () => import(`@/pages/${e.path}.vue`) e.component = () => import(`@/pages/${e.path}.vue`);
} }
e.children && e.children.forEach(n => { e.children && e.children.forEach(n => {
n.path && (n.component = () => import(`@/pages/${n.path}.vue`)) n.path && (n.component = () => import(`@/pages/${n.path}.vue`));
}) });
}) });
routes.push({ routes.push({
path: '*', path: "*",
redirect: '404' redirect: "404"
}) });
router.addRoutes(routes) router.addRoutes(routes);
},500) }, 500);
} }

@ -1,6 +1,6 @@
import router from '@/router'; import router from "@/router";
export default function() { export default function() {
const newRouter = createRouter() const newRouter = createRouter();
router.matcher = newRouter.matcher router.matcher = newRouter.matcher;
} }

@ -1,5 +1,5 @@
import Cookies from 'js-cookie'; import Cookies from "js-cookie";
import Setting from '@/setting'; import Setting from "@/setting";
const cookies = {}; const cookies = {};
@ -9,7 +9,7 @@ const cookies = {};
* @param {String} value cookie value * @param {String} value cookie value
* @param {Object} cookieSetting cookie setting * @param {Object} cookieSetting cookie setting
*/ */
cookies.set = function (name = 'default', value = '', cookieSetting = {}) { cookies.set = function(name = "default", value = "", cookieSetting = {}) {
let currentCookieSetting = { let currentCookieSetting = {
expires: Setting.cookiesExpires expires: Setting.cookiesExpires
}; };
@ -21,7 +21,7 @@ cookies.set = function (name = 'default', value = '', cookieSetting = {}) {
* @description 拿到 cookie * @description 拿到 cookie
* @param {String} name cookie name * @param {String} name cookie name
*/ */
cookies.get = function (name = 'default') { cookies.get = function(name = "default") {
return Cookies.get(`admin-${name}`); return Cookies.get(`admin-${name}`);
}; };
@ -36,7 +36,7 @@ cookies.getAll = function () {
* @description 删除 cookie * @description 删除 cookie
* @param {String} name cookie name * @param {String} name cookie name
*/ */
cookies.remove = function (name = 'default') { cookies.remove = function(name = "default") {
return Cookies.remove(`admin-${name}`); return Cookies.remove(`admin-${name}`);
}; };

@ -13,10 +13,10 @@ var _local = {
var data = Object.assign(params, { startTime: new Date().getTime() }); var data = Object.assign(params, { startTime: new Date().getTime() });
localStorage.setItem(key, JSON.stringify(data)); localStorage.setItem(key, JSON.stringify(data));
} else { } else {
if (Object.prototype.toString.call(value) == '[object Object]') { if (Object.prototype.toString.call(value) == "[object Object]") {
value = JSON.stringify(value); value = JSON.stringify(value);
} }
if (Object.prototype.toString.call(value) == '[object Array]') { if (Object.prototype.toString.call(value) == "[object Array]") {
value = JSON.stringify(value); value = JSON.stringify(value);
} }
localStorage.setItem(key, value); localStorage.setItem(key, value);
@ -55,7 +55,7 @@ var _local = {
clear() { clear() {
localStorage.clear(); localStorage.clear();
} }
} };
/** /**
* sessionStorage * sessionStorage
@ -79,5 +79,5 @@ var _session = {
clear() { clear() {
sessionStorage.clear(); sessionStorage.clear();
} }
} };
export { _local, _session } export { _local, _session };

@ -1,12 +1,12 @@
import cookies from './util.cookies' import cookies from "./util.cookies";
import {_local,_session} from './util.db' import { _local, _session } from "./util.db";
import { Message } from 'element-ui' import { Message } from "element-ui";
import store from '@/store' import store from "@/store";
import axios from 'axios' import axios from "axios";
import api from '@/api' import api from "@/api";
import Setting from '@/setting' import Setting from "@/setting";
let logout = false let logout = false;
const util = { const util = {
cookies, cookies,
local: _local, local: _local,
@ -27,15 +27,15 @@ const util = {
}, },
// new Date('2020-11-12 00:00:00') 在IE下失效,因此把-替换成/ // new Date('2020-11-12 00:00:00') 在IE下失效,因此把-替换成/
dateCompatible(date) { dateCompatible(date) {
return date.replace(/\-/g, '/') return date.replace(/\-/g, "/");
}, },
// 日期时间前面补零 // 日期时间前面补零
formateTime(num) { formateTime(num) {
return num < 10 ? `0${num}` : num return num < 10 ? `0${num}` : num;
}, },
//返回格式化时间,传参例如:"yyyy-MM-dd hh:mm:ss" //返回格式化时间,传参例如:"yyyy-MM-dd hh:mm:ss"
formatDate(fmt, date) { formatDate(fmt, date) {
var date = date ? date : new Date() var date = date ? date : new Date();
var o = { var o = {
"M+": date.getMonth() + 1, //月份 "M+": date.getMonth() + 1, //月份
"d+": date.getDate(), //日 "d+": date.getDate(), //日
@ -66,94 +66,113 @@ const util = {
}, },
// 传入文件后缀判断是否是视频 // 传入文件后缀判断是否是视频
isVideo(ext) { isVideo(ext) {
if('mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv'.includes(ext)) return true if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return true;
return false return false;
}, },
// 传入文件后缀判断是否是音频 // 传入文件后缀判断是否是音频
isAudio(ext) { isAudio(ext) {
if('mp3,aac,ape,flac,wav,wma,amr,mid'.includes(ext)) return true if ("mp3,aac,ape,flac,wav,wma,amr,mid".includes(ext)) return true;
return false return false;
}, },
// 传入文件后缀判断是否是图片 // 传入文件后缀判断是否是图片
isImg(ext) { isImg(ext) {
if('jpg,jpeg,png,gif,svg,psd'.includes(ext)) return true if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return true;
return false return false;
}, },
// 传入文件后缀判断是否是pdf以外的文档 // 传入文件后缀判断是否是pdf以外的文档
isDoc(ext) { isDoc(ext) {
if(!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && ext != 'pdf') return true if (!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && ext != "pdf") return true;
return false return false;
}, },
// 循环去除html标签 // 循环去除html标签
removeHtmlTag(list, attr) { removeHtmlTag(list, attr) {
list.map(n => { list.map(n => {
n[attr] = n[attr].replace(/<\/?.+?>/gi,'') n[attr] = n[attr].replace(/<\/?.+?>/gi, "");
}) });
return list return list;
}, },
// 传入文件名获取文件后缀 // 传入文件名获取文件后缀
getFileExt(fileName) { getFileExt(fileName) {
return fileName.substring(fileName.lastIndexOf('.') + 1) return fileName.substring(fileName.lastIndexOf(".") + 1);
}, },
// 传入文件名和路径,下载图片视频,支持跨域,a标签加download不支持跨域 // 传入文件名和路径,下载图片视频,支持跨域,a标签加download不支持跨域
downloadFile(fileName, url) { downloadFile(fileName, url) {
var x = new XMLHttpRequest() var x = new XMLHttpRequest();
x.open("GET", url, true) x.open("GET", url, true);
x.responseType = 'blob' x.responseType = "blob";
x.onload = function(e) { x.onload = function(e) {
var url = window.URL.createObjectURL(x.response) var url = window.URL.createObjectURL(x.response);
var a = document.createElement('a') var a = document.createElement("a");
a.href = url a.href = url;
a.download = fileName a.download = fileName;
a.click() a.click();
} };
x.send() x.send();
}, },
// 传入文件名和数据,下载文件 // 传入文件名和数据,下载文件
downloadFileDirect(fileName, data) { downloadFileDirect(fileName, data) {
if ('download' in document.createElement('a')) { // 非IE下载 if ("download" in document.createElement("a")) { // 非IE下载
const elink = document.createElement('a') const elink = document.createElement("a");
elink.download = fileName elink.download = fileName;
elink.style.display = 'none' elink.style.display = "none";
elink.href = URL.createObjectURL(data) elink.href = URL.createObjectURL(data);
document.body.appendChild(elink) document.body.appendChild(elink);
elink.click() elink.click();
URL.revokeObjectURL(elink.href) // 释放URL 对象 URL.revokeObjectURL(elink.href); // 释放URL 对象
document.body.removeChild(elink) document.body.removeChild(elink);
} else { // IE10+下载 } else { // IE10+下载
navigator.msSaveBlob(data, fileName) navigator.msSaveBlob(data, fileName);
} }
}, },
// 成功提示 // 成功提示
successMsg(message, duration = 3000) { successMsg(message, duration = 3000) {
return Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) Message.closeAll();
return Message.success({
message,
showClose: true,
offset: (document.documentElement.clientHeight - 40) / 2,
duration
});
}, },
// 警告提示 // 警告提示
warningMsg(message, duration = 3000) { warningMsg(message, duration = 3000) {
return Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) Message.closeAll();
return Message.warning({
message,
showClose: true,
offset: (document.documentElement.clientHeight - 40) / 2,
duration
});
}, },
// 错误提示 // 错误提示
errorMsg(message, duration = 3000) { errorMsg(message, duration = 3000) {
return Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) Message.closeAll();
return Message.error({
message,
showClose: true,
offset: (document.documentElement.clientHeight - 40) / 2,
duration
});
}, },
// 登录互踢 // 登录互踢
getToken() { getToken() {
if(process.env.NODE_ENV == 'production'){ if (process.env.NODE_ENV == "production") {
if (store.state.user.dataTime && !logout) { if (store.state.user.dataTime && !logout) {
axios.get(`${api.queryToken}?token=${_local.get(Setting.tokenKey)}`).then(res => { axios.get(`${api.queryToken}?token=${_local.get(Setting.tokenKey)}`).then(res => {
if (store.state.user.dataTime && (res.data.message != store.state.user.dataTime)) { if (store.state.user.dataTime && (res.data.message != store.state.user.dataTime)) {
logout || Message.error('您已在另一台设备登录,本次登录已下线!') logout || Message.error("您已在另一台设备登录,本次登录已下线!");
logout = true logout = true;
setTimeout(() => { setTimeout(() => {
_local.remove(Setting.storeKey) _local.remove(Setting.storeKey);
_local.remove(Setting.tokenKey) _local.remove(Setting.tokenKey);
location.reload() location.reload();
},1500) }, 1500);
}
}).catch(err => {})
} }
}).catch(err => {
});
} }
} }
} }
};
export default util export default util;

File diff suppressed because it is too large Load Diff

@ -1,32 +1,34 @@
import Vue from 'vue'; import Vue from "vue";
import App from '@/App.vue'; import App from "@/App.vue";
import router from '@/router'; import router from "@/router";
import ElementUI from 'element-ui'; import ElementUI from "element-ui";
import '@/styles/index.scss' import "@/styles/index.scss";
import VueI18n from 'vue-i18n'; import VueI18n from "vue-i18n";
import mixinApp from '@/mixins/app'; import mixinApp from "@/mixins/app";
import { messages } from '@/i18n'; import { messages } from "@/i18n";
import 'babel-polyfill'; import "babel-polyfill";
import '@/libs/resize'; import "@/libs/resize";
import {post,get,del,put} from '@/plugins/requests/index.js'; import { post, get, del, put } from "@/plugins/requests/index.js";
import api from '@/api'; import core from '@/libs/core'
import store from '@/store' import api from "@/api";
import Setting from '@/setting'; import store from "@/store";
import permission from '@/router/permission'; import Setting from "@/setting";
import permission from "@/router/permission";
// 插件 // 插件
import plugins from '@/plugins'; import plugins from "@/plugins";
import filters from '@/plugins/filters' import filters from "@/plugins/filters";
Vue.use(plugins); Vue.use(plugins);
Object.keys(filters).forEach(item => Vue.filter(item,filters[item])) Object.keys(filters).forEach(item => Vue.filter(item, filters[item]));
Vue.prototype.api = api; Vue.prototype.api = api;
Vue.prototype.$get = get; Vue.prototype.$get = get;
Vue.prototype.$post = post; Vue.prototype.$post = post;
Vue.prototype.$del = del; Vue.prototype.$del = del;
Vue.prototype.$put = put; Vue.prototype.$put = put;
Vue.prototype.core = core
Vue.config.productionTip = false; Vue.config.productionTip = false;
Vue.use(VueI18n); Vue.use(VueI18n);
@ -42,4 +44,4 @@ new Vue({
i18n, i18n,
store, store,
render: h => h(App) render: h => h(App)
}).$mount('#app'); }).$mount("#app");

@ -8,4 +8,4 @@ export default {
} }
} }
} };

@ -1,8 +1,8 @@
export default { export default {
beforeCreate() { beforeCreate() {
document.querySelector('body').setAttribute('style', 'background-color:#fff') document.querySelector("body").setAttribute("style", "background-color:#fff");
}, },
beforeDestroy() { beforeDestroy() {
document.body.removeAttribute('style') document.body.removeAttribute("style");
}
} }
};

@ -28,26 +28,34 @@
</div> </div>
<div v-if="!isReg"> <div v-if="!isReg">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="账号登录" name="0"> <el-tab-pane label="账号登录" name="1">
<el-form :model="loginForm" :rules="loginRules" ref="loginForm" style="margin-top: 20px"> <el-form v-if="activeName === '1'" :model="loginForm" :rules="loginRules" ref="loginForm" style="margin-top: 20px">
<el-form-item label="用户名" prop="username"> <el-form-item label="用户名" prop="username">
<el-input v-model="loginForm.username" placeholder="请输入账号"></el-input> <el-input v-model.trim="loginForm.account" placeholder="请输入账号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="密码" prop="password"> <el-form-item label="密码" prop="password">
<el-input <el-input
type="password" type="password"
placeholder="请输入密码" placeholder="请输入密码"
v-model="loginForm.password" v-model.trim="loginForm.password"
@keyup.enter.native="getSchool('loginForm')"
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-button class="submit" type="primary" @click="getSchool('loginForm')">登录</el-button> <el-form-item label="验证码" prop="code">
<el-input
placeholder="请输入验证码"
v-model.trim="loginForm.code"
@keyup.enter.native="submitFormLogin('loginForm')"
>
</el-input>
<img @click="blur" :src="verificationIMG" class="verification" alt="">
</el-form-item>
<el-button class="submit" type="primary" @click="submitFormLogin('loginForm')">登录</el-button>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="手机号/邮箱登录" name="1"> <el-tab-pane label="手机号/邮箱登录" name="2">
<el-form :model="phoneParam" :rules="phoneRules" ref="phoneParam" style="margin-top: 20px"> <el-form v-if="activeName === '2'" :model="phoneParam" :rules="phoneRules" ref="phoneParam" style="margin-top: 20px">
<el-form-item label="手机号/邮箱" prop="userphone"> <el-form-item label="手机号/邮箱" prop="userphone">
<el-input v-model="phoneParam.userphone" placeholder="请输入手机号/邮箱"></el-input> <el-input v-model="phoneParam.userphone" placeholder="请输入手机号/邮箱"></el-input>
</el-form-item> </el-form-item>
@ -78,7 +86,8 @@
<el-dialog title="选择角色" :visible.sync="roleDialog" width="24%" center :close-on-click-modal="false"> <el-dialog title="选择角色" :visible.sync="roleDialog" width="24%" center :close-on-click-modal="false">
<div> <div>
<el-select v-model="roleId" placeholder="请选择角色"> <el-select v-model="roleId" placeholder="请选择角色">
<el-option v-for="(item,index) in roleList" :key="index" :label="item.roleName" :value="item.roleId"></el-option> <el-option v-for="(item,index) in roleList" :key="index" :label="item.roleName"
:value="item.roleId"></el-option>
</el-select> </el-select>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -88,7 +97,8 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog :title="phoneReset ? '手机重置密码' : '邮箱重置密码'" :visible.sync="forgetVisible" :close-on-click-modal="false" @close="closeForget" width="30%"> <el-dialog :title="phoneReset ? '手机重置密码' : '邮箱重置密码'" :visible.sync="forgetVisible" :close-on-click-modal="false"
@close="closeForget" width="30%">
<template v-if="phoneReset"> <template v-if="phoneReset">
<el-form ref="form" label-width="60px"> <el-form ref="form" label-width="60px">
<el-form-item label="手机号"> <el-form-item label="手机号">
@ -97,7 +107,9 @@
<el-form-item label="验证码"> <el-form-item label="验证码">
<div class="flex-between"> <div class="flex-between">
<el-input v-model.number="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input> <el-input v-model.number="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="margin-left: 10px" type="text" @click="sendPhoneCode" :disabled="phoneDisabled">{{phoneBtnText}}</el-button> <el-button style="margin-left: 10px" type="text" @click="sendPhoneCode"
:disabled="phoneDisabled">{{ phoneBtnText }}
</el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
@ -118,7 +130,9 @@
<el-form-item label="验证码"> <el-form-item label="验证码">
<div class="flex-between"> <div class="flex-between">
<el-input v-model.number="emailCode" placeholder="请输入验证码" maxlength="6"></el-input> <el-input v-model.number="emailCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="margin-left: 10px" type="text" @click="sendEmailCode" :disabled="emailDisabled">{{emailBtnText}}</el-button> <el-button style="margin-left: 10px" type="text" @click="sendEmailCode"
:disabled="emailDisabled">{{ emailBtnText }}
</el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
@ -136,53 +150,60 @@
</template> </template>
<script> <script>
import register from '../register' import register from "../register";
import vFooter from '@/layouts/footer' import vFooter from "@/layouts/footer";
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import util from '@/libs/util' import util from "@/libs/util";
import Setting from '@/setting' import Setting from "@/setting";
export default { export default {
data: function() { data: function() {
return { return {
verificationIMG: "",
isHh: Setting.isHh, isHh: Setting.isHh,
schoolId: Setting.schoolId, schoolId: Setting.schoolId,
activeName: '0', activeName: "1",
isReg: false, isReg: false,
loginForm: { loginForm: {
username: '', account: "admin",
password: '', password: "111aaa",
code: "", //
random: "", //
distinguish: null, // ,1,2
platform: 3 // 123
}, },
loginRules: { loginRules: {
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }], account: [{ required: true, message: "请输入用户名", trigger: "blur" }],
password: [{ required: true, message: '请输入密码', trigger: 'blur' }], password: [{ required: true, message: "请输入密码", trigger: "blur" }],
code: [{ required: true, message: "请输入验证码", trigger: "blur" }]
}, },
phoneParam: { phoneParam: {
userphone: '', userphone: "",
phonePassword: '' phonePassword: ""
}, },
phoneRules: { phoneRules: {
userphone: [{ required: true, message: '请输入手机号/邮箱', trigger: 'blur' }], userphone: [{ required: true, message: "请输入手机号/邮箱", trigger: "blur" }],
phonePassword: [{ required: true, message: '请输入密码', trigger: 'blur' }], phonePassword: [{ required: true, message: "请输入密码", trigger: "blur" }]
}, },
roleDialog: false, roleDialog: false,
userId: '', userId: "",
roleId: '', roleId: "",
roleList: [], roleList: [],
forgetVisible: false, forgetVisible: false,
phoneReset: true, phoneReset: true,
email: '', email: "",
emailBtnText: '发送验证码', emailBtnText: "发送验证码",
emailCode: '', emailCode: "",
emailDisabled: false, emailDisabled: false,
emailTimer: null, emailTimer: null,
phone: '', phone: "",
phoneBtnText: '发送验证码', phoneBtnText: "发送验证码",
phoneCode: '', phoneCode: "",
phoneDisabled: false, phoneDisabled: false,
phoneTimer: null, phoneTimer: null,
newPassword: '', newPassword: "",
emailOpener: '', emailOpener: "",
phoneOpener: '' phoneOpener: ""
}; };
}, },
components: { components: {
@ -191,48 +212,49 @@ export default {
}, },
mounted() { mounted() {
// //
this.$once('hook:beforeDestroy', function () { this.$once("hook:beforeDestroy", function() {
clearInterval(this.phoneTimer) clearInterval(this.phoneTimer);
this.phoneTimer = null this.phoneTimer = null;
clearInterval(this.emailTimer) clearInterval(this.emailTimer);
this.emailTimer = null this.emailTimer = null;
}) });
}, },
methods: { methods: {
...mapActions('user', [ ...mapActions("user", [
'setInfo' "login", "setInfo"
]), ]),
// //
getSchool(form) { getSchool(form) {
this.$refs[form].validate(valid => { this.$refs[form].validate(valid => {
if (valid) { if (valid) {
let data = { let data = {
account: this.activeName == '0' ? this.loginForm.username : this.phoneParam.userphone, account: this.activeName == "0" ? this.loginForm.username : this.phoneParam.userphone,
password: this.activeName == '0' ? this.loginForm.password : this.phoneParam.phonePassword, password: this.activeName == "0" ? this.loginForm.password : this.phoneParam.phonePassword,
schoolId: this.schoolId, schoolId: this.schoolId,
source: this.activeName source: this.activeName
}; };
this.$get(this.api.loginSchool, data) this.$get(this.api.loginSchool, data)
.then(res => { .then(res => {
this.schoolList = [...res.message.staffList,...res.message.studentList] this.schoolList = [...res.message.staffList, ...res.message.studentList];
let indexs = {} let indexs = {};
this.schoolList = this.schoolList.reduce((cur, next) => { this.schoolList = this.schoolList.reduce((cur, next) => {
indexs[next.schoolId] ? '' : indexs[next.schoolId] = true && cur.push(next) indexs[next.schoolId] ? "" : indexs[next.schoolId] = true && cur.push(next);
return cur return cur;
},[]) }, []);
if (this.schoolList.length >= 1) { if (this.schoolList.length >= 1) {
this.schoolId = this.schoolList[0].schoolId this.schoolId = this.schoolList[0].schoolId;
this.userId = this.schoolList[0].userId this.userId = this.schoolList[0].userId;
this.studentId = this.schoolList[0].studentId this.studentId = this.schoolList[0].studentId;
this.getRole(form) this.getRole(form);
} else { } else {
util.errorMsg('账号不存在') util.errorMsg("账号不存在");
} }
}) })
.catch(res => {}) .catch(res => {
});
} else { } else {
util.errorMsg('请输入账号和密码') util.errorMsg("请输入账号和密码");
return false return false;
} }
}); });
}, },
@ -244,43 +266,44 @@ export default {
}; };
this.$get(this.api.loginRole, data) this.$get(this.api.loginRole, data)
.then(res => { .then(res => {
this.roleList = [...res.message.staffList,...res.message.studentList] this.roleList = [...res.message.staffList, ...res.message.studentList];
let indexs = {} let indexs = {};
this.roleList = this.roleList.reduce((cur, next) => { this.roleList = this.roleList.reduce((cur, next) => {
indexs[next.roleId] ? '' : indexs[next.roleId] = true && cur.push(next) indexs[next.roleId] ? "" : indexs[next.roleId] = true && cur.push(next);
return cur return cur;
},[]) }, []);
this.roleList.forEach((n, k) => { this.roleList.forEach((n, k) => {
switch (n.roleId) { switch (n.roleId) {
case 2: case 2:
n.roleName = '管理员' n.roleName = "管理员";
break break;
case 3: case 3:
n.roleName = '老师' n.roleName = "老师";
break break;
case 4: case 4:
n.roleName = '学生' n.roleName = "学生";
break break;
} }
}) });
if (this.roleList.length > 1) { if (this.roleList.length > 1) {
this.roleDialog = true this.roleDialog = true;
} else { } else {
this.roleId = this.roleList[0].roleId this.roleId = this.roleList[0].roleId;
this.submitForm(form) this.submitForm(form);
} }
}) })
.catch(res => {}); .catch(res => {
});
}, },
updateInfo(data) { updateInfo(data) {
this.loginForm.username = data.username this.loginForm.account = data.username;
this.loginForm.password = data.password this.loginForm.password = data.password;
}, },
roleSure(form) { roleSure(form) {
if (this.roleId) { if (this.roleId) {
this.submitForm(form) this.submitForm(form);
} else { } else {
util.errorMsg('请选择角色!') util.errorMsg("请选择角色!");
} }
}, },
submitForm(form) { submitForm(form) {
@ -290,11 +313,13 @@ export default {
roleId: this.roleId, roleId: this.roleId,
userId: this.userId, userId: this.userId,
schoolId: this.schoolId schoolId: this.schoolId
} };
this.$get(this.api.logins, data).then(res => { this.$get(this.api.logins, data).then(res => {
this.$post(this.api.updateLogInNumber,{userId: this.userId}).then(res => {}).catch(res => {}) // this.$post(this.api.updateLogInNumber, { userId: this.userId }).then(res => {
let data = res.message.user }).catch(res => {
util.local.set(Setting.tokenKey,data.token,Setting.tokenExpires) }); //
let data = res.message.user;
util.local.set(Setting.tokenKey, data.token, Setting.tokenExpires);
this.setInfo({ this.setInfo({
userId: this.userId, userId: this.userId,
roleId: this.roleId, roleId: this.roleId,
@ -302,128 +327,152 @@ export default {
schoolId: this.schoolId, schoolId: this.schoolId,
avatar: data.userAvatars, avatar: data.userAvatars,
userName: data.userName, userName: data.userName,
dataTime: data.dataTime, dataTime: data.dataTime
}) });
util.successMsg('登录成功') util.successMsg("登录成功");
let redirect = decodeURIComponent(this.$route.query.redirect || '/index') let redirect = decodeURIComponent(this.$route.query.redirect || "/index");
this.$router.replace(redirect) this.$router.replace(redirect);
}).catch(res => {}); }).catch(res => {
});
} }
}); });
}, },
cancleRoleDia() { cancleRoleDia() {
this.roleId = '' this.roleId = "";
this.roleDialog = false this.roleDialog = false;
}, },
toReg(status) { toReg(status) {
this.isReg = status this.isReg = status;
}, },
forget() { forget() {
this.forgetVisible = true this.forgetVisible = true;
}, },
emailCountdown() { emailCountdown() {
let count = 60 let count = 60;
if (!this.emailTimer) { if (!this.emailTimer) {
this.emailDisabled = true this.emailDisabled = true;
this.emailTimer = setInterval(() => { this.emailTimer = setInterval(() => {
if (count > 0) { if (count > 0) {
count-- count--;
this.emailBtnText = `${count}秒后重试` this.emailBtnText = `${count}秒后重试`;
} else { } else {
this.emailDisabled = false this.emailDisabled = false;
clearInterval(this.emailTimer) clearInterval(this.emailTimer);
this.emailTimer = null this.emailTimer = null;
this.emailBtnText = `发送验证码` this.emailBtnText = `发送验证码`;
} }
},1000) }, 1000);
} }
}, },
phoneCountdown() { phoneCountdown() {
let count = 60 let count = 60;
if (!this.phoneTimer) { if (!this.phoneTimer) {
this.phoneDisabled = true this.phoneDisabled = true;
this.phoneTimer = setInterval(() => { this.phoneTimer = setInterval(() => {
if (count > 0) { if (count > 0) {
count-- count--;
this.phoneBtnText = `${count}秒后重试` this.phoneBtnText = `${count}秒后重试`;
} else { } else {
this.phoneDisabled = false this.phoneDisabled = false;
clearInterval(this.phoneTimer) clearInterval(this.phoneTimer);
this.phoneTimer = null this.phoneTimer = null;
this.phoneBtnText = `发送验证码` this.phoneBtnText = `发送验证码`;
} }
},1000) }, 1000);
} }
}, },
closeForget() { closeForget() {
this.phoneCode = '' this.phoneCode = "";
this.emailCode = '' this.emailCode = "";
this.userId = '' this.userId = "";
this.newPassword = '' this.newPassword = "";
}, },
sendEmailCode() { sendEmailCode() {
if(!this.email) return util.warningMsg('请输入邮箱') if (!this.email) return util.warningMsg("请输入邮箱");
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg('请输入正确的邮箱') if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg("请输入正确的邮箱");
let data = { let data = {
email: this.email email: this.email
} };
this.$get(this.api.findPasswordByEmail, data).then(res => { this.$get(this.api.findPasswordByEmail, data).then(res => {
if(res.errmessage == 'success'){ if (res.errmessage == "success") {
util.successMsg('发送成功') util.successMsg("发送成功");
this.emailCountdown() this.emailCountdown();
this.userId = res.data.userId this.userId = res.data.userId;
this.emailOpener = res.data.opener this.emailOpener = res.data.opener;
} }
}).catch(res => {}) }).catch(res => {
});
}, },
sendPhoneCode() { sendPhoneCode() {
if(!this.phone) return util.warningMsg('请输入手机号') if (!this.phone) return util.warningMsg("请输入手机号");
if(!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg('请输入正确的手机号') if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号");
let data = { let data = {
phone: this.phone phone: this.phone
} };
this.$get(this.api.findPasswordByPhone, data).then(res => { this.$get(this.api.findPasswordByPhone, data).then(res => {
if(res.errmessage == 'success'){ if (res.errmessage == "success") {
util.successMsg('发送成功') util.successMsg("发送成功");
this.phoneCountdown() this.phoneCountdown();
this.userId = res.data.userId this.userId = res.data.userId;
this.phoneOpener = res.data.opener this.phoneOpener = res.data.opener;
} }
}).catch(res => {}) }).catch(res => {
});
}, },
async updatePassword(type) { async updatePassword(type) {
if (type == 1) { if (type == 1) {
if(!this.phone) return util.warningMsg('请输入手机号') if (!this.phone) return util.warningMsg("请输入手机号");
if(!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg('请输入正确的手机号') if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号");
if(!this.phoneCode) return util.warningMsg('请输入验证码') if (!this.phoneCode) return util.warningMsg("请输入验证码");
} else { } else {
if(!this.email) return util.warningMsg('请输入邮箱') if (!this.email) return util.warningMsg("请输入邮箱");
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg('请输入正确的邮箱') if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg("请输入正确的邮箱");
if(!this.emailCode) return util.warningMsg('请输入验证码') if (!this.emailCode) return util.warningMsg("请输入验证码");
} }
if(!this.newPassword) return util.warningMsg('请输入新密码') if (!this.newPassword) return util.warningMsg("请输入新密码");
let checkData = { let checkData = {
code: type == 1 ? this.phoneCode : this.emailCode, code: type == 1 ? this.phoneCode : this.emailCode,
opener: type == 1 ? this.phoneOpener : this.emailOpener opener: type == 1 ? this.phoneOpener : this.emailOpener
} };
let checkRes = await this.$post(this.api.checkCode,checkData) let checkRes = await this.$post(this.api.checkCode, checkData);
if(checkRes.errmessage == 'success'){ if (checkRes.errmessage == "success") {
let resetData = { let resetData = {
userId: this.userId, userId: this.userId,
password: this.newPassword password: this.newPassword
} };
let resetRes = await this.$post(this.api.resetPassword,resetData) let resetRes = await this.$post(this.api.resetPassword, resetData);
if(resetRes.errmessage == 'success'){ if (resetRes.errmessage == "success") {
util.successMsg('重置成功') util.successMsg("重置成功");
this.forgetVisible = false this.forgetVisible = false;
} }
} }
}, },
switchType(type) { switchType(type) {
this.phoneReset = type this.phoneReset = type;
},
submitFormLogin(form) {
this.$refs[form].validate(valid => {
if (valid) {
this.loginForm.distinguish = this.activeName === "1" ? 1 : 2;
this.login(this.loginForm).then(() => {
let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : "/index";
this.$router.replace(redirect);
}).catch(res => {
});
} else {
return util.errorMsg("请检查表单数据");
} }
});
}, },
blur() {
this.loginForm.random = Math.floor(Math.random() * 999999999);
this.verificationIMG = this.api.verification + "?random=" + `${this.loginForm.random}`;
}
},
created() {
this.blur();
}
}; };
</script> </script>
@ -443,21 +492,25 @@ export default {
align-items: center; align-items: center;
font-size: 18px; font-size: 18px;
box-shadow: 1px 1px 3px 2px #ececec; box-shadow: 1px 1px 3px 2px #ececec;
.logo { .logo {
width: 150px; width: 150px;
margin-left: 20px; margin-left: 20px;
} }
} }
.bg { .bg {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: calc(100% - 116px); height: calc(100% - 116px);
.left { .left {
position: relative; position: relative;
width: 40%; width: 40%;
height: 100%; height: 100%;
background: url(../../../assets/img/bg_2.png) 0 0/100% 100% no-repeat; background: url(../../../assets/img/bg_2.png) 0 0/100% 100% no-repeat;
.text { .text {
position: absolute; position: absolute;
top: 35%; top: 35%;
@ -465,11 +518,13 @@ export default {
color: #fff; color: #fff;
font-size: 46px; font-size: 46px;
font-weight: bold; font-weight: bold;
p:first-child { p:first-child {
margin-bottom: 20px; margin-bottom: 20px;
} }
} }
} }
.right { .right {
width: 50%; width: 50%;
height: 100%; height: 100%;
@ -489,6 +544,7 @@ export default {
width: 100%; width: 100%;
margin-bottom: 40px; margin-bottom: 40px;
} }
.form { .form {
padding: 50px 20px 20px; padding: 50px 20px 20px;
background-color: #fff; background-color: #fff;
@ -496,6 +552,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
box-shadow: 0 1px 20px rgba(146, 120, 255, 0.3); box-shadow: 0 1px 20px rgba(146, 120, 255, 0.3);
} }
.back { .back {
position: absolute; position: absolute;
top: 20px; top: 20px;
@ -508,6 +565,7 @@ export default {
opacity: .8; opacity: .8;
} }
} }
.el-tabs__nav-scroll { .el-tabs__nav-scroll {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -521,13 +579,16 @@ export default {
text-align: center; text-align: center;
border-bottom: 1px solid #f3f3f3; border-bottom: 1px solid #f3f3f3;
} }
.el-form { .el-form {
width: 70%; width: 70%;
margin: 30px auto 0; margin: 30px auto 0;
.label { .label {
line-height: 1.8; line-height: 1.8;
color: #929292; color: #929292;
} }
/deep/ .el-input__inner { /deep/ .el-input__inner {
height: 46px; height: 46px;
padding: 0 23px; padding: 0 23px;
@ -535,12 +596,23 @@ export default {
border: 1px solid #E5E5E5; border: 1px solid #E5E5E5;
border-radius: 8px !important; border-radius: 8px !important;
} }
/deep/ .el-form-item__error { /deep/ .el-form-item__error {
top: 105%; top: 105%;
left: auto; left: auto;
right: 0; right: 0;
color: #FFA94E; color: #FFA94E;
} }
.verification {
position: absolute;
right: 0px;
width: 100px;
height: 40px;
border: 1px solid #DCDFE6;
cursor: pointer;
}
.submit { .submit {
width: 100%; width: 100%;
height: 48px; height: 48px;
@ -555,21 +627,25 @@ export default {
} }
} }
} }
.switch { .switch {
span { span {
cursor: pointer; cursor: pointer;
color: #9076FF; color: #9076FF;
} }
} }
.links { .links {
width: 70%; width: 70%;
margin: 20px auto 0; margin: 20px auto 0;
text-align: right; text-align: right;
} }
.ques { .ques {
color: #9278ff; color: #9278ff;
font-size: 14px; font-size: 14px;
} }
.forget { .forget {
color: #ffa94e; color: #ffa94e;
font-size: 14px; font-size: 14px;

@ -46,7 +46,8 @@
<el-form-item prop="schoolAppellationId"> <el-form-item prop="schoolAppellationId">
<p class="prop">学校</p> <p class="prop">学校</p>
<el-select v-model="regForm.schoolAppellationId" placeholder="学校名称"> <el-select v-model="regForm.schoolAppellationId" placeholder="学校名称">
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> <el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
@ -68,7 +69,8 @@
<el-input type="password" v-model="regForm.password" placeholder="请输入密码"></el-input> <el-input type="password" v-model="regForm.password" placeholder="请输入密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="rePassword"> <el-form-item prop="rePassword">
<el-input type="password" v-model="regForm.rePassword" placeholder="请再次输入密码" @keyup.enter.native="registerForm"></el-input> <el-input type="password" v-model="regForm.rePassword" placeholder="请再次输入密码"
@keyup.enter.native="registerForm"></el-input>
</el-form-item> </el-form-item>
</div> </div>
@ -82,34 +84,34 @@ export default {
data: function() { data: function() {
return { return {
regForm: { regForm: {
userName: '', userName: "",
workNumber: '', workNumber: "",
provinceId: '', provinceId: "",
cityId: '', cityId: "",
schoolAppellationId: '', schoolAppellationId: "",
phone: '', phone: "",
password: '', password: "",
rePassword: '', rePassword: "",
roleId: 4, roleId: 4,
schoolId: this.$config.schoolId schoolId: this.$config.schoolId
}, },
regRules: { regRules: {
userName: [{ required: true, message: '请输入学生姓名', trigger: 'blur' }], userName: [{ required: true, message: "请输入学生姓名", trigger: "blur" }],
workNumber: [{ required: true, message: '请输入学生学号', trigger: 'blur' }], workNumber: [{ required: true, message: "请输入学生学号", trigger: "blur" }],
provinceId: [{ required: true, message: '请选择省份', trigger: 'change' }], provinceId: [{ required: true, message: "请选择省份", trigger: "change" }],
cityId: [{ required: true, message: '请选择城市', trigger: 'change' }], cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
schoolAppellationId: [{ required: true, message: '请选择学校', trigger: 'change' }], schoolAppellationId: [{ required: true, message: "请选择学校", trigger: "change" }],
phone: [ phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' }, { required: true, message: "请输入手机号", trigger: "blur" },
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' } { pattern: /^1[3456789]\d{9}$/, message: "请输入正确的手机号", trigger: "blur" }
], ],
password: [ password: [
{ required: true, message: '请输入密码', trigger: 'blur' }, { required: true, message: "请输入密码", trigger: "blur" },
{ pattern: /^.{6,}$/, message: '请输入6位数以上的密码', trigger: 'blur' } { pattern: /^.{6,}$/, message: "请输入6位数以上的密码", trigger: "blur" }
], ],
rePassword: [ rePassword: [
{ required: true, message: '请再次输入密码', trigger: 'blur' }, { required: true, message: "请再次输入密码", trigger: "blur" },
{ pattern: /^.{6,}$/, message: '请输入6位数以上的密码', trigger: 'blur' } { pattern: /^.{6,}$/, message: "请输入6位数以上的密码", trigger: "blur" }
] ]
}, },
provinceList: this.$store.state.provinceList, // provinceList: this.$store.state.provinceList, //
@ -120,47 +122,55 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getProvince() this.getProvince();
this.getSchoolData() this.getSchoolData();
}, },
methods: { methods: {
getProvince() { getProvince() {
this.$get(this.api.queryProvince).then(res => { this.$get(this.api.queryProvince).then(res => {
this.provinceList = res.message this.provinceList = res.message;
this.$store.commit("provinceData", { provinceList: this.provinceList }); this.$store.commit("provinceData", { provinceList: this.provinceList });
}).catch(res => {}); }).catch(res => {
});
}, },
// //
getCity() { getCity() {
this.regForm.cityId = '' this.regForm.cityId = "";
this.$get(this.api.queryCity, { provinceId: this.regForm.provinceId }).then(res => { this.$get(this.api.queryCity, { provinceId: this.regForm.provinceId }).then(res => {
this.cityList = res.message this.cityList = res.message;
this.getSchoolData() this.getSchoolData();
}).catch(res => {}) }).catch(res => {
});
}, },
// //
getSchoolData() { getSchoolData() {
this.regForm.schoolAppellationId = '' this.regForm.schoolAppellationId = "";
this.$get(this.api.querySchoolData,{provinceId: this.regForm.provinceId,cityId: this.regForm.cityId,schoolName: ''}).then(res => { this.$get(this.api.querySchoolData, {
this.schoolList = res.message provinceId: this.regForm.provinceId,
}).catch(res => {}); cityId: this.regForm.cityId,
schoolName: ""
}).then(res => {
this.schoolList = res.message;
}).catch(res => {
});
}, },
registerForm() { registerForm() {
this.$refs.reg.validate(valid => { this.$refs.reg.validate(valid => {
if (valid) { if (valid) {
if(this.phoneRepeat) return util.warningMsg('该手机号已存在') if (this.phoneRepeat) return util.warningMsg("该手机号已存在");
if(this.workNumberReapeat) return util.warningMsg('该学生学号已存在') if (this.workNumberReapeat) return util.warningMsg("该学生学号已存在");
if(this.regForm.password !== this.regForm.rePassword) return util.warningMsg('两次输入的密码不一致,请重新输入') if (this.regForm.password !== this.regForm.rePassword) return util.warningMsg("两次输入的密码不一致,请重新输入");
let data = this.regForm let data = this.regForm;
data.account = data.phone data.account = data.phone;
data.uniqueIdentificationAccount = new Date().getTime() data.uniqueIdentificationAccount = new Date().getTime();
this.$post(`${this.api.save}?workNumber=${this.regForm.workNumber}`, data).then(res => { this.$post(`${this.api.save}?workNumber=${this.regForm.workNumber}`, data).then(res => {
util.successMsg('注册成功') util.successMsg("注册成功");
this.$emit('update:isReg',false) this.$emit("update:isReg", false);
this.$emit('updateInfo',{username: this.regForm.phone,password: this.regForm.password}) this.$emit("updateInfo", { username: this.regForm.phone, password: this.regForm.password });
this.$refs.reg.resetFields() this.$refs.reg.resetFields();
}).catch(res => {}); }).catch(res => {
});
} else { } else {
// util.errorMsg(''); // util.errorMsg('');
return false; return false;
@ -170,10 +180,10 @@ export default {
async phoneChange() { async phoneChange() {
let res = await this.$get(this.api.queryPhone, { phone: this.regForm.phone }); let res = await this.$get(this.api.queryPhone, { phone: this.regForm.phone });
if (res.message.length != 0) { if (res.message.length != 0) {
util.warningMsg('该手机号已存在'); util.warningMsg("该手机号已存在");
this.phoneRepeat = true this.phoneRepeat = true;
} else { } else {
this.phoneRepeat = false this.phoneRepeat = false;
} }
}, },
async worknumberChange() { async worknumberChange() {
@ -182,17 +192,17 @@ export default {
roleId: 4, roleId: 4,
schoolAppellationId: this.regForm.schoolAppellationId schoolAppellationId: this.regForm.schoolAppellationId
}); });
if(JSON.stringify(res.message) != '{}'){ if (JSON.stringify(res.message) != "{}") {
util.warningMsg('该学生学号已存在'); util.warningMsg("该学生学号已存在");
this.workNumberReapeat = true this.workNumberReapeat = true;
} else { } else {
this.workNumberReapeat = false this.workNumberReapeat = false;
} }
}, },
toLogin() { toLogin() {
this.$emit('update:isReg',false) this.$emit("update:isReg", false);
}
} }
},
}; };
</script> </script>
@ -201,22 +211,27 @@ export default {
.form { .form {
.register { .register {
width: 90% !important; width: 90% !important;
.line { .line {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-end; align-items: flex-end;
} }
.el-form-item { .el-form-item {
&:first-child { &:first-child {
margin-right: 5%; margin-right: 5%;
} }
} }
.label { .label {
margin-bottom: 0; margin-bottom: 0;
} }
.prop { .prop {
color: #929292; color: #929292;
} }
.code-btn { .code-btn {
min-width: 120px; min-width: 120px;
height: 46px; height: 46px;
@ -228,6 +243,7 @@ export default {
border: 0; border: 0;
background-color: #105cb2; background-color: #105cb2;
} }
.submit { .submit {
margin-bottom: 20px; margin-bottom: 20px;
} }

@ -7,45 +7,81 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>考核时间</label> <label>考核时间</label>
<el-radio-group size="small" v-model="form.month" @change="getData"> <el-radio-group size="small" v-model="form.month" @change="initData">
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{item.name}}</el-radio> <el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>
{{ item.name }}
</el-radio>
</el-radio-group> </el-radio-group>
<el-date-picker size="small" v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable></el-date-picker> <el-date-picker
size="small"
v-model="date"
align="right"
unlink-panels type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
clearable
></el-date-picker>
</li> </li>
<li> <li>
<label>实验状态</label> <label>实验状态</label>
<el-select size="small" v-model="form.status" placeholder="请选择实验状态" @change="getData"> <el-select size="small" v-model="form.status" @change="initData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option
v-for="(item,index) in statusList"
:key="index" :label="item.name"
:value="item.value"
></el-option>
</el-select> </el-select>
</li> </li>
</ul>
</div>
<div class="tool">
<ul class="filter">
<li> <li>
<el-input size="small" placeholder="请输入实验班级/考核名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> <label>实验班级</label>
<el-select size="small" v-model="form.classId" @change="initData">
<el-option
v-for="(item,index) in classList"
:key="index"
:label="item.className"
:value="item.value"
></el-option>
</el-select>
</li> </li>
<li>
<label>课程名称</label>
<el-select size="small" v-model="form.systemId" @change="initData">
<el-option
v-for="(item,index) in courseList"
:key="index"
:label="item.sysName"
:value="item.sysId"
></el-option>
</el-select>
</li>
</ul> </ul>
</div> </div>
<el-table :data="listData" class="table" stripe header-align="center" :row-key="getRowKeys"> <el-table :data="listData" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="experimentalName" label="考核名称" align="center"> <el-table-column prop="sysName" label="课程名称" align="center"></el-table-column>
</el-table-column> <el-table-column prop="experimentalName" label="考核名称" align="center"></el-table-column>
<el-table-column prop="experimentalClassName" label="实验班级" align="center"> <el-table-column prop="className" label="实验班级" align="center"></el-table-column>
</el-table-column>
<el-table-column prop="experimentalNumber" label="实验人数" align="center"></el-table-column> <el-table-column prop="experimentalNumber" label="实验人数" align="center"></el-table-column>
<el-table-column prop="experimentDuration" label="考试时长" align="center"> <el-table-column prop="experimentDuration" label="考试时长" align="center"></el-table-column>
</el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="creationTime" label="创建时间" align="center"> <el-table-column prop="startTime" label="起始时间" align="center"></el-table-column>
</el-table-column> <el-table-column prop="stopTime" label="结束时间" align="center"></el-table-column>
<el-table-column prop="startTime" label="起始时间" align="center">
</el-table-column>
<el-table-column prop="stopTime" label="结束时间" align="center">
</el-table-column>
<el-table-column label="倒计时" align="center"> <el-table-column label="倒计时" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-countdown="scope.row.surplusTime">{{scope.row.surplusTime}}</span> <!-- <span v-countdown="scope.row.surplusTime">{{ scope.row.surplusTime }}</span>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实验状态" align="center"> <el-table-column label="实验状态" align="center">
@ -55,19 +91,27 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.status == 3 && !scope.row.done" type="text" disabled>未参加</el-button> <!--status:考核状态(0待开始 1进行中 2已结束); stuState:学生考试状态(0未考 1在考 2已考)-->
<el-button v-if="scope.row.status != 3 && !scope.row.done" type="text" @click="entry(scope.row)" :disabled="scope.row.status != 2">进入</el-button> <el-button v-if="scope.row.status === 2 && scope.row.stuState === 0" type="text" disabled>未参加</el-button>
<el-button v-if="scope.row.status == 2 && scope.row.done" type="text" disabled>已提交</el-button> <el-button v-if="scope.row.status !== 2 && scope.row.stuState === 0" type="text" @click="entry(scope.row)" :disabled="scope.row.status !== 1">进入</el-button>
<el-button v-if="scope.row.status == 3 && scope.row.done" type="text" @click="show(scope.row)">查看成绩</el-button> <el-button v-if="scope.row.status === 1 && scope.row.stuState === 2" type="text" disabled>已提交</el-button>
<el-button v-if="scope.row.status === 2 && scope.row.stuState === 2" type="text" @click="show(scope.row)">查看成绩</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="page"></el-pagination> <el-pagination
background
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
:current-page="page"
></el-pagination>
</div> </div>
</div> </div>
<el-dialog title="请输入邀请码" :visible.sync="icVisible" width="30%" @close="closeIc" center :close-on-click-modal="false"> <el-dialog title="请输入邀请码" :visible.sync="icVisible" width="30%" @close="closeIc" center
:close-on-click-modal="false">
<el-input v-model="invitationCode" placeholder="邀请码" maxlength="6"></el-input> <el-input v-model="invitationCode" placeholder="邀请码" maxlength="6"></el-input>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveIc"> </el-button> <el-button type="primary" @click="saveIc"> </el-button>
@ -77,282 +121,260 @@
</template> </template>
<script> <script>
import { mapState,mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import Setting from '@/setting' import Setting from "@/setting";
import util from '@/libs/util' import util from "@/libs/util";
export default { export default {
name: 'ass', name: "ass",
data() { data() {
return { return {
classList: [],
courseList: [],
host: Setting.apiBaseURL, host: Setting.apiBaseURL,
status: ['','待开始','进行中','已完成'], status: ["待开始", "进行中", "已完成"],
statusList: [{ statusList: [{
name:'不限', name: "不限",
value: ""
}, {
name: "待开始",
value: 0 value: 0
}, { }, {
name:'待开始', name: "进行中",
value: 1 value: 1
}, { }, {
name:'进行中', name: "已完成",
value: 2 value: 2
},{
name:'已完成',
value: 3
}], }],
listData: [], listData: [],
date: [], date: [],
form: { form: {
month:'', month: "",
startTime: '', startTime: "",
endTime: '', endTime: "",
status: 0, status: "",
systemId: "",
classId: "",
}, },
keyword: '', keyword: "",
dateList: [ dateList: [
{ {
id: '', id: "",
name: '不限' name: "不限"
}, },
{ {
id: 1, id: 1,
name: '近一个月' name: "近一个月"
}, },
{ {
id: 3, id: 3,
name: '近三个月' name: "近三个月"
}, },
{ {
id: 6, id: 6,
name: '近六个月' name: "近六个月"
} }
], ],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
totals: 0, totals: 0,
icVisible: false, icVisible: false,
invitationCode: '', invitationCode: "",
searchTimer: null, searchTimer: null,
timerList: [], timerList: [],
curRow: {} curRow: {}
}; };
}, },
computed: { computed: {
...mapState('user', [ ...mapState("user", [
'userId','schoolId','studentId','userName' "userId", "schoolId", "studentId", "userName"
]), ])
}, },
watch: { watch: {
'form.month': function(val){ "form.month": function(val) {
if (val) { if (val) {
let unit = 24 * 60 * 60 * 1000 let unit = 24 * 60 * 60 * 1000;
this.date = [util.formatDate('yyyy-MM-dd',new Date(new Date().getTime() - unit * 30 * val)),util.formatDate('yyyy-MM-dd',new Date(new Date().getTime() + unit))] this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))];
} else { } else {
this.date = [] this.date = [];
} }
}, },
date: function(val) { date: function(val) {
if (val) { if (val) {
this.form.startTime = val[0] this.form.startTime = val[0];
this.form.endTime = val[1] this.form.endTime = val[1];
} else { } else {
this.form.startTime = '' this.form.startTime = "";
this.form.endTime = '' this.form.endTime = "";
} }
this.getData() this.getData();
}, },
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData();
},500) }, 500);
} }
}, },
mounted() { mounted() {
this.getData() this.getData();
this.$once('hook:beforeDestroy', function () { this.getCourseData();
this.getClassData();
this.$once("hook:beforeDestroy", function() {
this.timerList.forEach((n, k) => { this.timerList.forEach((n, k) => {
clearInterval(n) clearInterval(n);
}) });
this.timerList = [] this.timerList = [];
}) });
}, },
directives: { directives: {
countdown: { countdown: {
bind: function(el, binding, vnode) { bind: function(el, binding, vnode) {
let that = vnode.context let that = vnode.context;
let time = binding.value let time = binding.value;
let timer = setInterval(() => { let timer = setInterval(() => {
let timeList = time.split(':') let timeList = time.split(":");
let total = Number.parseInt(timeList[0] * 60 * 60) + Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2]) let total = Number.parseInt(timeList[0] * 60 * 60) + Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2]);
if (total > 0) { if (total > 0) {
--total --total;
let hours = Math.floor(total / (60 * 60)) let hours = Math.floor(total / (60 * 60));
let minutes = Math.floor(total % (60 * 60) / 60) let minutes = Math.floor(total % (60 * 60) / 60);
let seconds = Math.floor(total % (60 * 60) % 60) let seconds = Math.floor(total % (60 * 60) % 60);
time = `${util.formateTime(hours)}:${util.formateTime(minutes)}:${util.formateTime(seconds)}` time = `${util.formateTime(hours)}:${util.formateTime(minutes)}:${util.formateTime(seconds)}`;
} else { } else {
clearInterval(timer) clearInterval(timer);
} }
el.innerHTML = time el.innerHTML = time;
},1000) }, 1000);
that.timerList.push(timer) that.timerList.push(timer);
} }
} }
}, },
methods: { methods: {
getData() { getCourseData () {
let data = { this.$get(this.api.getPythonSysByStuAccountId).then(res => {
schoolId: this.schoolId, this.courseList = res.list;
month: this.form.month, }).catch(err => {
startTime: this.form.startTime, });
endTime: this.form.endTime,
condition: this.keyword,
status: this.form.status,
page: this.page,
size: this.pageSize,
rowId: '',
projectId: ''
}
this.$get(this.api.userRecord,data).then(res => {
let list = res.page.list
this.totals = res.page.totalCount
let doneNum = 0
let recordList = []
for(let i = 1; i < 11; i++){
if(i != 2 && i != 3){
this.$get(this.api.experimentRecord, {
userid: this.userId,
page: 1,
size: 10000,
systemId: i
}).then(res => {
doneNum++
recordList = recordList.concat(res.data.list)
if(doneNum == 8){
list.map(n => {
let same = recordList.find(e => e.id == n.id)
if(same){
n.done = true
n.recordid = same.recordid
n.reportId = same.reportId
}
})
this.listData = list
}
}).catch(err => {})
}
}
}).catch(res => {})
},
add(){
this.$store.commit("listData", { customer_id : ''});
this.$router.push('/addclass');
}, },
edit(row){ getClassData () {
this.$store.commit("listData", { customer_id : row.customerId }); this.$post(this.api.myClassByStudent).then(res => {
this.$router.push('/addcustomer'); if (res.status === 200) {
this.classList = res.data;
} else {
util.errorMsg(res.message);
}
}).catch(err => {});
}, },
getRowKeys(row) { getData() {
return row.customerId; let data = {
...this.form,
pageNum: this.page,
pageSize: this.pageSize,
};
this.$post(this.api.pageStuAssessment, data).then(res => {
this.listData = res.list;
this.totals = res.page.totalCount;
}).catch(err => {
});
}, },
onSearch(){ initData() {
this.page = 1 this.page = 1;
this.getData() this.getData();
}, },
handleCurrentChange(val) { handleCurrentChange(val) { //
this.page = val this.page = val;
this.getData() this.getData();
}, },
entry(row) { entry(row) { //
if(row.status == 1){ if (row.status === 0) {
return util.warningMsg('该实验尚未开始') return util.warningMsg("该实验尚未开始");
}else if(row.status == 3){ } else if (row.status === 2) {
return util.warningMsg('该实验已经结束') return util.warningMsg("该实验已经结束");
} else { } else {
this.curRow = row this.curRow = row;
if (row.isCode == 1) { if (row.isCode == 1) {
this.goSubSystem() this.goSubSystem();
} else { } else {
this.$get(this.api.checkInvitationCode, { this.$get(this.api.checkInvitationCode, {
userId: this.userId, userId: this.userId,
id: row.id id: row.id
}).then(res => { }).then(res => {
if(res.errmessage == 'false'){ if (res.errmessage == "false") {
this.icVisible = true this.icVisible = true;
} else { } else {
this.goSubSystem() this.goSubSystem();
} }
}).catch(res => {}); }).catch(res => {
});
} }
} }
}, },
show(row) { show(row) { //
this.$router.push(`/record/list?id=${row.id}&recordId=${row.recordid}&reportId=${row.reportId}`) this.$router.push(`/record/list?id=${row.id}&recordId=${row.recordid}&reportId=${row.reportId}`);
}, },
saveIc() { saveIc() {
if(!this.invitationCode) return util.warningMsg('请输入邀请码') if (!this.invitationCode) return util.warningMsg("请输入邀请码");
if(!this.invitationCode || String(this.invitationCode).length < 6 || isNaN(this.invitationCode)) return util.warningMsg('请输入6位纯数字邀请码') if (!this.invitationCode || String(this.invitationCode).length < 6 || isNaN(this.invitationCode)) return util.warningMsg("请输入6位纯数字邀请码");
let data = { let data = {
id: this.curRow.id, id: this.curRow.id,
userId: this.userId, userId: this.userId,
invitationCode: Number(this.invitationCode) invitationCode: Number(this.invitationCode)
} };
this.$post(this.api.joinPractice, data).then(res => { this.$post(this.api.joinPractice, data).then(res => {
if(res.errmessage == 'success') { if (res.errmessage == "success") {
util.successMsg('验证成功!') util.successMsg("验证成功!");
this.icVisible = false this.icVisible = false;
setTimeout(() => { setTimeout(() => {
this.goSubSystem() this.goSubSystem();
},1000) }, 1000);
} }
}).catch(res => {}); }).catch(res => {
});
}, },
closeIc() { closeIc() {
this.invitationCode = '' this.invitationCode = "";
},
goback() {
this.$router.back()
}, },
goSubSystem() { goSubSystem() {
let host = this.host let host = this.host;
util.cookies.set("assessmentId",this.curRow.id) util.cookies.set("assessmentId", this.curRow.id);
util.cookies.set("studentId",this.studentId) util.cookies.set("studentId", this.studentId);
util.cookies.set("userId",this.userId) util.cookies.set("userId", this.userId);
util.cookies.set("projectId",this.curRow.projectId) util.cookies.set("projectId", this.curRow.projectId);
util.cookies.set("startTime",this.curRow.startTime) util.cookies.set("startTime", this.curRow.startTime);
util.cookies.set("stopTime",this.curRow.stopTime) util.cookies.set("stopTime", this.curRow.stopTime);
let systemId = this.curRow.systemId let systemId = this.curRow.systemId;
let href = '' let href = "";
switch (systemId) { switch (systemId) {
case 1: case 1:
href = `${host}pyTrials/#/` href = `${host}pyTrials/#/`;
break; break;
case 4: case 4:
href = `${host}pyFinance/#/` href = `${host}pyFinance/#/`;
break; break;
case 5: case 5:
href = `${host}pyProjects/#/` href = `${host}pyProjects/#/`;
break; break;
case 6: case 6:
href = `${host}pyRandom/#/` href = `${host}pyRandom/#/`;
break; break;
case 7: case 7:
href = `${host}pyQuantification/#/` href = `${host}pyQuantification/#/`;
break; break;
case 8: case 8:
href = `${host}pyAnalysis/#/` href = `${host}pyAnalysis/#/`;
break; break;
case 9: case 9:
href = `${host}pyDataclean/#/` href = `${host}pyDataclean/#/`;
break; break;
case 10: case 10:
href = `${host}pyAcquisition/#/` href = `${host}pyAcquisition/#/`;
break; break;
} }
if(!href) return util.errorMsg('该考核非Python考核,请选择其他考核') if (!href) return util.errorMsg("该考核非Python考核,请选择其他考核");
location.href = href location.href = href;
// location.href = 'http://192.168.31.154:8080/' // location.href = 'http://192.168.31.154:8080/'
}, }
} }
}; };
</script> </script>
@ -361,9 +383,11 @@ export default {
/deep/ .el-tabs__nav-wrap::after { /deep/ .el-tabs__nav-wrap::after {
display: none; display: none;
} }
.no-mb /deep/ .el-form-item { .no-mb /deep/ .el-form-item {
margin-bottom: 0; margin-bottom: 0;
} }
.el-radio.is-bordered + .el-radio.is-bordered { .el-radio.is-bordered + .el-radio.is-bordered {
margin-left: 0; margin-left: 0;
} }

@ -1,32 +1,278 @@
<template> <template>
<div class="box">
<div class="search">
<input type="text" placeholder="请输入课程名称" v-model="keyword" />
<button>搜索</button>
</div>
<div class="main">
<div class="filter">
<dl>
<dt>课程分类</dt>
<dd>
<el-select v-model="classificationId" clearable placeholder="请选择课程分类" size="small"
@change="getData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in classificationList" :key="index" :label="item.name"
:value="item.id"></el-option>
</el-select>
</dd>
</dl>
</div>
<div class="courses">
<template v-if="courseData.length">
<ul>
<li v-for="(item, index) in courseData" :key="index" @click="toDetail(item.id)">
<img :src="item.coverUrl" alt="" />
<div class="title">{{ item.name }}</div>
<div class="desc" :class="{ie: core.isIE(),ie: core.isFirefox()}" v-html="item.description"></div>
</li>
</ul>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals"
@current-change="handleCurrentChange" :current-page="pageNo">
</el-pagination>
</div>
</template>
<template v-else>
<div class="empty">
<div> <div>
课程学习 <img src="@/assets/img/none.png" alt="">
<p>暂无课程</p>
</div>
</div>
</template>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { Loading } from "element-ui";
import bus from "@/libs/bus";
export default { export default {
name: 'course', name: "course",
data() { data() {
return { return {
userId: this.$store.state.userId,
} schoolId: this.$store.state.schoolId,
classificationId: "",
classificationList: [],
courseData: [],
keyword: "",
totals: 0,
pageNo: 1,
pageSize: 8,
searchTimer: null,
loadIns: null
};
}, },
computed: { mounted() {
bus.$emit("setBg", "course");
this.getClassification();
this.getData();
}, },
watch: { watch: {
keyword: function(val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
}, },
methods: { methods: {
getData() {
this.loadIns = Loading.service();
let data = {
classificationId: this.classificationId,
name: this.keyword,
port: 0,
schoolId: this.schoolId
};
this.$get(`${this.api.queryCourseByCondition}/${this.pageNo}/${this.pageSize}`, data).then(res => {
this.courseData = res.courseList;
this.totals = res.total;
this.courseData.map(n => {
n.description = n.description.replace(/<img.*?(?:>|\/>)/gi, "");
});
this.loadIns.close();
}).catch(res => {
this.loadIns.close();
});
}, },
mounted() { initData() {
this.pageNo = 1;
this.getData();
}, },
getClassification() {
this.$get(this.api.queryGlClassification).then(res => {
this.classificationList = res.classificationList;
}).catch(res => {
});
},
changeType(type) {
this.classificationId = type;
this.initData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getData();
},
toDetail(id) {
this.$router.push(`/course/details?id=${id}`);
}
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box {
padding: 20px;
background-color: #fff;
.search {
position: relative;
width: 30%;
margin: 50px auto;
border-radius: 30px;
border: 1px solid #9076FF;
border-right: 0;
overflow: hidden;
input {
width: 100%;
height: 44px;
line-height: 44px;
padding: 0 20px;
font-size: 14px;
color: #333;
border: 0;
outline: none !important;
box-sizing: border-box;
}
button {
position: absolute;
top: 0;
right: 0;
padding: 0 20px;
line-height: 46px;
color: #fff;
background-color: #9076FF;
border: 0;
outline: none !important;
}
}
.main {
width: 70%;
min-width: 920px;
padding: 40px;
margin: 0 auto;
border-radius: 16px;
background-color: #fdfdfd;
box-sizing: border-box;
.filter {
margin-bottom: 10px;
dl {
display: flex;
line-height: 30px;
dt {
color: rgba(0, 0, 0, .85);
font-size: 14px;
}
dd {
display: inline-flex;
align-items: center;
span {
padding: 2px 10px;
margin: 0 10px;
color: rgba(0, 0, 0, .65);
font-size: 14px;
cursor: pointer;
&:hover {
color: #CC221C;
}
&.classification {
border-radius: 4px;
color: #fff;
background-color: #CC221C;
}
}
}
}
}
.courses {
ul {
display: flex;
flex-wrap: wrap;
li {
width: 24%;
min-height: 250px;
overflow: hidden;
padding: 10px;
margin: 10px .5%;
box-sizing: border-box;
cursor: pointer;
border-radius: 8px;
background-color: #fff;
transition: all 0.3s;
img {
width: 100%;
height: 165px;
}
.title {
margin: 10px 0 5px;
color: #333;
font-size: 16px;
word-wrap: break-word;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.desc span {
color: #f00;
font-size: 14px;
background-color: #f00;
}
.desc {
color: #999;
font-size: 14px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
&.ie {
height: 80px;
text-overflow: ellipsis;
white-space: nowrap;
}
}
&:hover {
box-shadow: 0px 5px 12px 4px rgba(142, 123, 253, 0.09), 0px 3px 6px 0px rgba(142, 123, 253, 0.12), 0px 1px 2px -2px rgba(142, 123, 253, 0.16);
}
}
}
}
}
}
</style> </style>

@ -15,13 +15,13 @@
export default { export default {
methods: { methods: {
toIndex() { toIndex() {
this.$router.push('/') this.$router.push("/");
}, },
goBack() { goBack() {
this.$router.go(-1); this.$router.go(-1);
} }
} }
} };
</script> </script>
@ -36,23 +36,28 @@ export default {
background: #f3f3f3; background: #f3f3f3;
box-sizing: border-box; box-sizing: border-box;
} }
.error-code { .error-code {
line-height: 1; line-height: 1;
font-size: 250px; font-size: 250px;
font-weight: bolder; font-weight: bolder;
color: #f02d2d; color: #f02d2d;
} }
.error-code span { .error-code span {
color: #00a854; color: #00a854;
} }
.error-desc { .error-desc {
font-size: 30px; font-size: 30px;
color: #777; color: #777;
} }
.error-handle { .error-handle {
margin-top: 30px; margin-top: 30px;
padding-bottom: 200px; padding-bottom: 200px;
} }
.error-btn { .error-btn {
margin-left: 100px; margin-left: 100px;
} }

@ -15,13 +15,13 @@
export default { export default {
methods: { methods: {
toIndex() { toIndex() {
this.$router.push('/') this.$router.push("/");
}, },
goBack() { goBack() {
this.$router.go(-1); this.$router.go(-1);
} }
} }
} };
</script> </script>
@ -36,23 +36,28 @@ export default {
background: #f3f3f3; background: #f3f3f3;
box-sizing: border-box; box-sizing: border-box;
} }
.error-code { .error-code {
line-height: 1; line-height: 1;
font-size: 250px; font-size: 250px;
font-weight: bolder; font-weight: bolder;
color: #2d8cf0; color: #2d8cf0;
} }
.error-code span { .error-code span {
color: #00a854; color: #00a854;
} }
.error-desc { .error-desc {
font-size: 30px; font-size: 30px;
color: #777; color: #777;
} }
.error-handle { .error-handle {
margin-top: 30px; margin-top: 30px;
padding-bottom: 200px; padding-bottom: 200px;
} }
.error-btn { .error-btn {
margin-left: 100px; margin-left: 100px;
} }

@ -2,22 +2,24 @@
<section class="main"> <section class="main">
<div class="crumbs"> <div class="crumbs">
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item><i class="el-icon-lx-global"></i> {{$t('i18n.breadcrumb')}}</el-breadcrumb-item> <el-breadcrumb-item><i class="el-icon-lx-global"></i> {{ $t("i18n.breadcrumb") }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="container"> <div class="container">
<span>{{$t('i18n.tips')}}</span> <span>{{ $t("i18n.tips") }}</span>
<el-button type="primary" @click="$i18n.locale = $i18n.locale === 'zh'?'en':'zh';">{{$t('i18n.btn')}}</el-button> <el-button type="primary" @click="$i18n.locale = $i18n.locale === 'zh'?'en':'zh';">{{ $t("i18n.btn") }}
</el-button>
<div class="list"> <div class="list">
<h2>{{$t('i18n.title1')}}</h2> <h2>{{ $t("i18n.title1") }}</h2>
<p>{{$t('i18n.p1')}}</p> <p>{{ $t("i18n.p1") }}</p>
<p>{{$t('i18n.p2')}}</p> <p>{{ $t("i18n.p2") }}</p>
<p>{{$t('i18n.p3')}}</p> <p>{{ $t("i18n.p3") }}</p>
</div> </div>
<h2>{{$t('i18n.title2')}}</h2> <h2>{{ $t("i18n.title2") }}</h2>
<div> <div>
<i18n path="i18n.info" tag="p"> <i18n path="i18n.info" tag="p">
<a place="action" href="https://element.eleme.cn/2.0/#/zh-CN/component/i18n">{{ $t('i18n.value') }}</a> <a place="action" href="https://element.eleme.cn/2.0/#/zh-CN/component/i18n">{{ $t("i18n.value")
}}</a>
</i18n> </i18n>
</div> </div>
</div> </div>
@ -27,19 +29,20 @@
<script> <script>
export default { export default {
data() { data() {
return { return {};
}
}
} }
};
</script> </script>
<style scoped> <style scoped>
.list { .list {
padding: 30px 0; padding: 30px 0;
} }
.list p { .list p {
margin-bottom: 20px; margin-bottom: 20px;
} }
a { a {
color: #cb221c; color: #cb221c;
} }

@ -44,144 +44,144 @@
export default { export default {
data: function() { data: function() {
return { return {
keyword: '', keyword: "",
iconList: [ iconList: [
'attentionforbid', "attentionforbid",
'attentionforbidfill', "attentionforbidfill",
'attention', "attention",
'attentionfill', "attentionfill",
'tag', "tag",
'tagfill', "tagfill",
'people', "people",
'peoplefill', "peoplefill",
'notice', "notice",
'noticefill', "noticefill",
'mobile', "mobile",
'mobilefill', "mobilefill",
'voice', "voice",
'voicefill', "voicefill",
'unlock', "unlock",
'lock', "lock",
'home', "home",
'homefill', "homefill",
'delete', "delete",
'deletefill', "deletefill",
'notification', "notification",
'notificationfill', "notificationfill",
'notificationforbidfill', "notificationforbidfill",
'like', "like",
'likefill', "likefill",
'comment', "comment",
'commentfill', "commentfill",
'camera', "camera",
'camerafill', "camerafill",
'warn', "warn",
'warnfill', "warnfill",
'time', "time",
'timefill', "timefill",
'location', "location",
'locationfill', "locationfill",
'favor', "favor",
'favorfill', "favorfill",
'skin', "skin",
'skinfill', "skinfill",
'news', "news",
'newsfill', "newsfill",
'record', "record",
'recordfill', "recordfill",
'emoji', "emoji",
'emojifill', "emojifill",
'message', "message",
'messagefill', "messagefill",
'goods', "goods",
'goodsfill', "goodsfill",
'crown', "crown",
'crownfill', "crownfill",
'move', "move",
'add', "add",
'hot', "hot",
'hotfill', "hotfill",
'service', "service",
'servicefill', "servicefill",
'present', "present",
'presentfill', "presentfill",
'pic', "pic",
'picfill', "picfill",
'rank', "rank",
'rankfill', "rankfill",
'male', "male",
'female', "female",
'down', "down",
'top', "top",
'recharge', "recharge",
'rechargefill', "rechargefill",
'forward', "forward",
'forwardfill', "forwardfill",
'info', "info",
'infofill', "infofill",
'redpacket', "redpacket",
'redpacket_fill', "redpacket_fill",
'roundadd', "roundadd",
'roundaddfill', "roundaddfill",
'friendadd', "friendadd",
'friendaddfill', "friendaddfill",
'cart', "cart",
'cartfill', "cartfill",
'more', "more",
'moreandroid', "moreandroid",
'back', "back",
'right', "right",
'shop', "shop",
'shopfill', "shopfill",
'question', "question",
'questionfill', "questionfill",
'roundclose', "roundclose",
'roundclosefill', "roundclosefill",
'roundcheck', "roundcheck",
'roundcheckfill', "roundcheckfill",
'global', "global",
'mail', "mail",
'punch', "punch",
'exit', "exit",
'upload', "upload",
'read', "read",
'file', "file",
'link', "link",
'full', "full",
'group', "group",
'friend', "friend",
'profile', "profile",
'addressbook', "addressbook",
'calendar', "calendar",
'text', "text",
'copy', "copy",
'share', "share",
'wifi', "wifi",
'vipcard', "vipcard",
'weibo', "weibo",
'remind', "remind",
'refresh', "refresh",
'filter', "filter",
'settings', "settings",
'scan', "scan",
'qrcode', "qrcode",
'cascades', "cascades",
'apps', "apps",
'sort', "sort",
'searchlist', "searchlist",
'search', "search",
'edit' "edit"
] ]
} };
}, },
computed: { computed: {
list() { list() {
return this.iconList.filter((item) => { return this.iconList.filter((item) => {
return item.indexOf(this.keyword) !== -1; return item.indexOf(this.keyword) !== -1;
}) });
}
} }
} }
};
</script> </script>
<style scoped> <style scoped>
@ -190,22 +190,27 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
.search-box { .search-box {
text-align: center; text-align: center;
margin-top: 10px; margin-top: 10px;
} }
.search { .search {
width: 300px; width: 300px;
} }
ul, li { ul, li {
list-style: none; list-style: none;
} }
.icon-li { .icon-li {
display: inline-block; display: inline-block;
padding: 10px; padding: 10px;
width: 120px; width: 120px;
height: 120px; height: 120px;
} }
.icon-li-content { .icon-li-content {
display: flex; display: flex;
height: 100%; height: 100%;
@ -214,10 +219,12 @@ ul,li{
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
} }
.icon-li-content i { .icon-li-content i {
font-size: 36px; font-size: 36px;
color: #606266; color: #606266;
} }
.icon-li-content span { .icon-li-content span {
margin-top: 10px; margin-top: 10px;
color: #787878; color: #787878;

@ -5,21 +5,20 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex' import { mapState } from "vuex";
export default { export default {
name: 'index', name: "index",
data() { data() {
return { return {};
}
}, },
mounted() { mounted() {
this.getHot() this.getHot();
}, },
methods: { methods: {
getData() { getData() {
}, }
} }
}; };
</script> </script>

@ -1,32 +0,0 @@
<template>
<div>
资讯
</div>
</template>
<script>
export default {
name: 'information',
data() {
return {
}
},
computed: {
},
watch: {
},
methods: {
},
mounted() {
},
}
</script>
<style lang="scss" scoped>
</style>

@ -1,32 +1,573 @@
<template> <template>
<div class="box">
<div class="search">
<input type="text" placeholder="请输入竞赛名称" v-model="keyword" />
<button>搜索</button>
</div>
<div class="main">
<div class="nav">
<div class="sub-title">赛事报名</div>
<div class="sidebar">
<div class="item" :class="{ active: way === item.id }" v-for="(item, index) in typeList"
:key="index" @click="changeType(item.id)">{{ item.name }}
</div>
</div>
</div>
<div class="list-wrap">
<div class="list">
<template v-if="listData.length">
<ul>
<li v-for="(item,index) in listData" :key="index" @click="toDetail(item)">
<div class="left">
<div class="cover">
<img :src="item.coverUrl" alt="">
</div>
<div class="info">
<div class="title">{{ item.name }}</div>
<div class="metas">
<div :class="{'flex-top': item.sponsor.split(',').length > 1}">
<span class="label">主办方</span>
<template v-if="item.sponsor.split(',').length > 1">
<div> <div>
线上赛事 <span v-for="(sponsor,index) in item.sponsor.split(',')"
:key="index" class="val a-line">{{ sponsor }}</span>
</div>
</template>
<span v-else class="val">{{ item.sponsor }}</span>
</div>
<div :class="{'flex-top': item.undertaker.split(',').length > 1}">
<span class="label">承办方</span>
<template v-if="item.undertaker.split(',').length > 1">
<div>
<span v-for="(undertaker,index) in item.undertaker.split(',')"
:key="index" class="val a-line">{{ undertaker }}</span>
</div>
</template>
<span v-else class="val">{{ item.undertaker }}</span>
</div>
<p>
<span class="label">报名时间</span><span class="val">{{ item.signUpStartTime}} ~ {{ item.signUpEndTime }}</span>
</p>
<p>
<span class="label">比赛时间</span><span class="val">{{ item.playStartTime}} ~ {{ item.playEndTime }}</span>
</p>
</div>
</div>
</div>
<div class="right">
<p class="status"
:class="{wait: item.status == 0 || item.status == 4,signing: item.status == 2,signed: item.status == 1,finish: item.status == 3 || item.status == 5}"
@click.stop="signup(item)">{{ statusList[item.status] }}</p>
<p class="end-text" v-if="item.status != 5">距离{{ endList[item.status] }}还有
<template v-if="item.end > 0">{{ item.end }}</template>
<em v-else v-countdown="index">{{ item.end }}</em></p>
</div>
</li>
</ul>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals"
@current-change="handleCurrentChange"
:current-page="pageNo">
</el-pagination>
</div>
</template>
<template v-else>
<div class="empty">
<div>
<img src="@/assets/img/none.png" alt="">
<p>暂无赛事</p>
</div>
</div>
</template>
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions } from "vuex";
import { Loading } from "element-ui";
import bus from "@/libs/bus";
export default { export default {
name: 'match', name: "match",
data() { data() {
return { return {
way: "",
statusList: ["等待报名", "已报名", "立即报名", "报名截止", "比赛中", "已结束"],
endList: ["报名开始", "报名截止", "报名截止", "竞赛开始", "竞赛结束", ""],
typeList: [
{
id: "",
name: "近期报名"
},
{
id: 0,
name: "最近更新"
},
{
id: 1,
name: "已报名"
} }
],
keyword: "",
searchTimer: null,
pageNo: 1,
pageSize: 10,
totals: 0,
listData: [],
covers: [],
loadIns: null,
contestIds: [],
isFirst: true,
timerList: []
};
}, },
computed: { computed: {
...mapState([
"userId",
"name",
"account",
"phone",
"schoolName"
])
},
directives: {
countdown: {
bind: function(el, binding, vnode) {
let that = vnode.context;
let item = that.listData[binding.value];
let time = "";
let second = 1000;
let minute = second * 60;
let hour = minute * 60;
let now = new Date().getTime();
let signUpStartTime = new Date(that.core.dateCompatible(item.signUpStartTime)).getTime(); //
let signUpEndTime = new Date(that.core.dateCompatible(item.signUpEndTime)).getTime(); //
let playStartTime = new Date(that.core.dateCompatible(item.playStartTime)).getTime(); //
let playEndTime = new Date(that.core.dateCompatible(item.playEndTime)).getTime(); //
switch (item.status) {
// statusgetData
case 0:
if (now > signUpStartTime) {
item.status = 1;
} else {
time = signUpStartTime - now;
}
break;
case 1:
if (now > signUpEndTime) {
item.status = 3;
} else {
time = signUpEndTime - now;
}
break;
case 2:
if (now > signUpEndTime) {
item.status = 3;
} else {
time = signUpEndTime - now;
}
break;
case 3:
if (now > playStartTime) {
item.status = 4;
} else {
time = playStartTime - now;
}
break;
case 4:
if (now > playEndTime) {
item.status = 5;
} else {
time = playEndTime - now;
}
break;
}
time = `${Math.floor(time / hour)}:${Math.floor(time % hour / minute)}:${Math.floor(time % hour % minute / second)}`;
let timer = setInterval(() => {
let timeList = time.split(":");
let total = Number.parseInt(timeList[0] * 60 * 60) + Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2]);
if (total > 0) {
--total;
let hours = Math.floor(total / (60 * 60));
let minutes = Math.floor(total % (60 * 60) / 60);
let seconds = Math.floor(total % (60 * 60) % 60);
time = `${that.core.formateTime(hours)}:${that.core.formateTime(minutes)}:${that.core.formateTime(seconds)}`;
} else {
clearInterval(timer);
}
el.innerHTML = time;
}, 1000);
that.timerList.push(timer);
}
}
}, },
watch: { watch: {
keyword: function(val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getData();
}, 500);
}
},
mounted() {
bus.$emit("setBg", "match");
this.getData();
this.$once("hook:beforeDestroy", function() {
this.timerList.forEach((n, k) => {
clearInterval(n);
});
this.timerList = [];
});
}, },
methods: { methods: {
...mapActions("match", [
"setMatchId", "setMatchSignupStatus"
]),
getData() {
let data = {
name: this.keyword,
way: this.way,
userId: this.userId
};
this.loadIns = Loading.service();
this.$get(`${this.api.onlineContestQuery}/${this.pageNo}/${this.pageSize}`, data).then(res => {
this.listData = res.contestList;
let contestIds = res.contestIds;
this.contestIds = contestIds;
let time = 60 * 60 * 1000 * 24;
let covers = [];
this.listData.forEach((n, k) => {
let now = new Date().getTime();
let signUpStartTime = new Date(this.core.dateCompatible(n.signUpStartTime)).getTime(); //
let signUpEndTime = new Date(this.core.dateCompatible(n.signUpEndTime)).getTime(); //
let playStartTime = new Date(this.core.dateCompatible(n.playStartTime)).getTime(); //
let playEndTime = new Date(this.core.dateCompatible(n.playEndTime)).getTime(); //
}, if (now < signUpStartTime) { //
mounted() { n.status = 0;
n.end = Math.floor((signUpStartTime - now) / time);
} else if (now > signUpStartTime && now < signUpEndTime) { //
n.status = 1;
n.end = Math.floor((signUpEndTime - now) / time);
} else if (now > signUpEndTime && now < playStartTime) { // ,
n.status = 3;
n.end = Math.floor((playStartTime - now) / time);
} else if (now > playStartTime && now < playEndTime) { //
n.status = 4;
n.end = Math.floor((playEndTime - now) / time);
} else if (now > playEndTime) { //
n.status = 5;
}
// idid
let isInclude = contestIds.includes(n.id);
if (n.status == 1 && !isInclude) { // ,,,status2,signuptrue,
n.status = 2;
n.signup = true;
} else {
n.signup = false;
}
(covers.length < 3 && n.carouselUrl) && covers.push(n);
});
if (this.isFirst) this.covers = covers;
this.totals = res.total;
this.loadIns.close();
this.isFirst = false;
}).catch(res => {
this.loadIns.close();
});
}, },
changeType(type) {
this.way = type;
if (type != 1) {
this.getData();
} else {
let listData = this.listData;
let result = [];
listData.forEach((n, k) => {
let isInclude = this.contestIds.includes(n.id);
if (n.status == 1 && isInclude) {
result.push(n);
}
});
this.listData = result;
this.totals = this.listData.length;
} }
},
toDetail(item) {
let status = item.status == 1 ? (item.signup ? true : false) : "hide";
this.setMatchId(item.id);
this.setMatchSignupStatus(status);
this.$router.push(`/match/details`);
},
handleCurrentChange(val) {
this.pageNo = val;
this.getData();
},
signup(item) {
if (item.status == 2 && item.signup) {
let data = {
contestId: item.id,
account: this.account,
phone: this.phone,
school: this.schoolName,
userId: this.userId,
username: this.name
};
this.$post(this.api.addApplicant, data).then(res => {
if (res.success) {
this.$message.success("报名成功");
this.getData();
} else {
this.$message.error(res.message);
}
}).catch(res => {
});
}
}
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box {
padding: 20px;
.search {
position: relative;
width: 30%;
margin: 50px auto;
border-radius: 30px;
border: 1px solid #9076FF;
border-right: 0;
overflow: hidden;
input {
width: 100%;
height: 44px;
line-height: 44px;
padding: 0 20px;
font-size: 14px;
color: #333;
border: 0;
outline: none !important;
box-sizing: border-box;
}
button {
position: absolute;
top: 0;
right: 0;
padding: 0 20px;
line-height: 46px;
color: #fff;
background-color: #9076FF;
border: 0;
outline: none !important;
}
}
.main {
display: flex;
justify-content: center;
align-items: flex-start;
padding-bottom: 40px;
margin-top: 20px;
.nav {
width: 220px;
border-radius: 8px;
overflow: hidden;
.sub-title {
line-height: 88px;
color: #fff;
font-size: 24px;
text-align: center;
background: #9076FF;
}
/deep/ .sidebar {
background-color: #fff;
.item {
padding: 15px 0;
color: rgba(0, 0, 0, .85);
font-size: 18px;
text-align: center;
cursor: pointer;
&.active {
color: #9076FF;
}
&:hover {
background-color: #f4f1ff;
}
}
}
}
.list-wrap {
width: 50%;
min-width: 790px;
margin-left: 40px;
.list {
padding: 32px;
background-color: #fff;
border-radius: 8px;
li {
display: flex;
justify-content: space-between;
padding-bottom: 24px;
margin-bottom: 20px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
transition: all 0.3s;
cursor: pointer;
.left {
display: inline-flex;
.cover {
img {
width: 200px;
height: 120px;
border-radius: 4px;
}
}
.info {
display: inline-flex;
flex-direction: column;
justify-content: space-between;
margin-left: 20px;
.title {
font-size: 20px;
color: rgba(0, 0, 0, .85);
}
.metas {
font-size: 14px;
color: #999;
div {
display: flex;
align-items: center;
margin-bottom: 5px;
&.flex-top {
align-items: flex-start;
}
}
.label, .val {
font-size: 14px;
color: rgba(0, 0, 0, .65);
white-space: nowrap;
}
.val {
max-width: 350px;
}
.a-line {
display: block;
}
}
.desc {
font-size: 14px;
}
}
}
.right {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-end;
flex: 1;
.status {
padding: 0 15px;
line-height: 32px;
font-size: 12px;
color: #fff;
background-color: #52C41A;
border-radius: 4px;
&.wait {
background-color: #FAAD14;
}
&.signing {
background-color: #9076FF;
}
&.signed {
background-color: #52C41A;
}
&.finish {
background-color: rgba(0, 0, 0, .45);
}
}
.btn {
padding: 12px 20px;
color: #fff;
background-color: #cb221c;
border-radius: 4px;
cursor: pointer;
&:hover {
opacity: .9;
}
&.disabled {
cursor: not-allowed;
background-color: #969696;
}
}
.end-text {
margin-top: 10px;
color: rgba(0, 0, 0, .65);
font-size: 14px;
white-space: nowrap;
em {
font-size: 20px;
font-style: normal;
font-weight: bold;
color: #cb221c;
}
}
}
&:hover {
.left {
.info {
.title {
color: #9076FF;
}
}
}
border-bottom-color: #9076FF;
}
}
}
}
}
}
</style> </style>

@ -13,7 +13,8 @@
</template> </template>
<template v-if="showMask1"> <template v-if="showMask1">
<div class="word-mask" style="height: 40px;"></div> <div class="word-mask" style="height: 40px;"></div>
<div class="word-mask2" style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div> <div class="word-mask2"
style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
</template> </template>
<template v-if="showMask2"> <template v-if="showMask2">
<div class="excel-mask1" style="height: 48px;"></div> <div class="excel-mask1" style="height: 48px;"></div>
@ -23,7 +24,8 @@
<pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf> <pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf>
</div> </div>
<div v-else> <div v-else>
<video ref="video" controls class="video_wid" :src="videoSrc" controlsList="nodownload"></video> <video ref="video" controls class="video_wid" :src="videoSrc"
controlsList="nodownload"></video>
</div> </div>
</div> </div>
</el-col> </el-col>
@ -53,63 +55,72 @@
<template v-if="systemId == 1"> <template v-if="systemId == 1">
<div v-for="(item,index) in videoList1" :key="index"> <div v-for="(item,index) in videoList1" :key="index">
<div class="flex-between list_catalog"> <div class="flex-between list_catalog">
<p class="experimental_title" :class="{active: curLink == item.title}" @click="preview(item)">{{index+1}} {{item.title}}</p> <p class="experimental_title" :class="{active: curLink == item.title}"
@click="preview(item)">{{ index + 1 }} {{ item.title }}</p>
</div> </div>
</div> </div>
</template> </template>
<template v-else-if="systemId == 4"> <template v-else-if="systemId == 4">
<div v-for="(item,index) in videoList4" :key="index"> <div v-for="(item,index) in videoList4" :key="index">
<div class="flex-between list_catalog"> <div class="flex-between list_catalog">
<p class="experimental_title" :class="{active: curLink == item.title}" @click="preview(item)">{{index+1}} {{item.title}}</p> <p class="experimental_title" :class="{active: curLink == item.title}"
@click="preview(item)">{{ index + 1 }} {{ item.title }}</p>
</div> </div>
</div> </div>
</template> </template>
<template v-else-if="systemId == 5"> <template v-else-if="systemId == 5">
<div v-for="(item,index) in videoList5" :key="index"> <div v-for="(item,index) in videoList5" :key="index">
<div class="flex-between list_catalog"> <div class="flex-between list_catalog">
<p class="experimental_title" :class="{active: curLink == item.title}" @click="preview(item)">{{index+1}} {{item.title}}</p> <p class="experimental_title" :class="{active: curLink == item.title}"
@click="preview(item)">{{ index + 1 }} {{ item.title }}</p>
</div> </div>
</div> </div>
</template> </template>
<template v-else-if="systemId == 6"> <template v-else-if="systemId == 6">
<div v-for="(item,index) in videoList6" :key="index"> <div v-for="(item,index) in videoList6" :key="index">
<div class="flex-between list_catalog"> <div class="flex-between list_catalog">
<p class="experimental_title" :class="{active: curLink == item.title}" @click="preview(item)">{{index+1}} {{item.title}}</p> <p class="experimental_title" :class="{active: curLink == item.title}"
@click="preview(item)">{{ index + 1 }} {{ item.title }}</p>
</div> </div>
</div> </div>
</template> </template>
<template v-else-if="systemId == 7"> <template v-else-if="systemId == 7">
<div v-for="(item,index) in videoList7" :key="index"> <div v-for="(item,index) in videoList7" :key="index">
<div class="flex-between list_catalog"> <div class="flex-between list_catalog">
<p class="experimental_title" :class="{active: curLink == item.title}" @click="preview(item)">{{index+1}} {{item.title}}</p> <p class="experimental_title" :class="{active: curLink == item.title}"
@click="preview(item)">{{ index + 1 }} {{ item.title }}</p>
</div> </div>
</div> </div>
</template> </template>
<template v-else-if="systemId == 8"> <template v-else-if="systemId == 8">
<div v-for="(item,index) in videoList8" :key="index"> <div v-for="(item,index) in videoList8" :key="index">
<div class="flex-between list_catalog"> <div class="flex-between list_catalog">
<p class="experimental_title" :class="{active: curLink == item.title}" @click="preview(item)">{{index+1}} {{item.title}}</p> <p class="experimental_title" :class="{active: curLink == item.title}"
@click="preview(item)">{{ index + 1 }} {{ item.title }}</p>
</div> </div>
</div> </div>
</template> </template>
<template v-else-if="systemId == 9"> <template v-else-if="systemId == 9">
<div v-for="(item,index) in videoList9" :key="index"> <div v-for="(item,index) in videoList9" :key="index">
<div class="flex-between list_catalog"> <div class="flex-between list_catalog">
<p class="experimental_title" :class="{active: curLink == item.title}" @click="preview(item)">{{index+1}} {{item.title}}</p> <p class="experimental_title" :class="{active: curLink == item.title}"
@click="preview(item)">{{ index + 1 }} {{ item.title }}</p>
</div> </div>
</div> </div>
</template> </template>
<template v-else-if="systemId == 10"> <template v-else-if="systemId == 10">
<div v-for="(item,index) in videoList10" :key="index"> <div v-for="(item,index) in videoList10" :key="index">
<div class="flex-between list_catalog"> <div class="flex-between list_catalog">
<p class="experimental_title" :class="{active: curLink == item.title}" @click="preview(item)">{{index+1}} {{item.title}}</p> <p class="experimental_title" :class="{active: curLink == item.title}"
@click="preview(item)">{{ index + 1 }} {{ item.title }}</p>
</div> </div>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div v-for="(item,index) in videoList1" :key="index"> <div v-for="(item,index) in videoList1" :key="index">
<div class="flex-between list_catalog"> <div class="flex-between list_catalog">
<p class="experimental_title" :class="{active: curLink == item.title}" @click="preview(item)">{{index+1}} {{item.title}}</p> <p class="experimental_title" :class="{active: curLink == item.title}"
@click="preview(item)">{{ index + 1 }} {{ item.title }}</p>
</div> </div>
</div> </div>
</template> </template>
@ -120,7 +131,8 @@
</el-row> </el-row>
<!-- 答题弹框 --> <!-- 答题弹框 -->
<el-dialog :visible.sync="evaluationVisible" width="30%" custom-class="evaluation_dialog" center :close-on-click-modal="false"> <el-dialog :visible.sync="evaluationVisible" width="30%" custom-class="evaluation_dialog" center
:close-on-click-modal="false">
<div class="title">能力测评</div> <div class="title">能力测评</div>
<div class="ques-wrap"> <div class="ques-wrap">
<p class="serial">{{ question.currentQuestionSortNo }}/{{ question.totalQuestionNum }}</p> <p class="serial">{{ question.currentQuestionSortNo }}/{{ question.totalQuestionNum }}</p>
@ -131,7 +143,8 @@
<span>倒计时{{ countdown }}</span> <span>倒计时{{ countdown }}</span>
</div> </div>
<ul class="options" :class="{isDone}"> <ul class="options" :class="{isDone}">
<li v-for="(item,key) in question.options" :key="key" :class="{active: selected.includes(key)}" @click="selectOption(key)"><em>{{key}}.</em><span>{{item}}</span></li> <li v-for="(item,key) in question.options" :key="key" :class="{active: selected.includes(key)}"
@click="selectOption(key)"><em>{{ key }}.</em><span>{{ item }}</span></li>
</ul> </ul>
</div> </div>
@ -148,25 +161,30 @@
</el-dialog> </el-dialog>
<!-- 提交成绩弹框 --> <!-- 提交成绩弹框 -->
<el-dialog :visible.sync="resultVisible" width="30%" custom-class="result_dialog" center :close-on-click-modal="false"> <el-dialog :visible.sync="resultVisible" width="30%" custom-class="result_dialog" center
:close-on-click-modal="false">
<div class="result"><span>{{ result.isPassed }}</span></div> <div class="result"><span>{{ result.isPassed }}</span></div>
<div class="ques-wrap"> <div class="ques-wrap">
<div class="point"> <div class="point">
<span>{{ result.totalScore }}</span> <span>{{ result.totalScore }}</span>
</div> </div>
<p class="tips">{{result.isPassed == '通过' ? '恭喜' : ''}}你答对{{result.correctQuestionNum}}正确率{{result.correctRate}}</p> <p class="tips">
{{ result.isPassed == "通过" ? "恭喜" : "" }}你答对{{ result.correctQuestionNum
}}正确率{{ result.correctRate }}</p>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button class="first" @click="toEvaluation(0)">再试一次</el-button> <el-button class="first" @click="toEvaluation(0)">再试一次</el-button>
<el-button class="second" type="primary" @click="getDetail">成绩详情</el-button> <el-button class="second" type="primary" @click="getDetail">成绩详情</el-button>
<el-button v-if="result.isPassed == '通过'" class="third" type="primary" @click="goSubSystem">进入实训</el-button> <el-button v-if="result.isPassed == '通过'" class="third" type="primary" @click="goSubSystem">进入实训
</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 成绩详情弹框 --> <!-- 成绩详情弹框 -->
<el-dialog :visible.sync="detailVisible" width="30%" custom-class="detail_dialog" center :close-on-click-modal="false"> <el-dialog :visible.sync="detailVisible" width="30%" custom-class="detail_dialog" center
:close-on-click-modal="false">
<div class="title">成绩详情</div> <div class="title">成绩详情</div>
<div style="min-height: 370px"> <div style="min-height: 370px">
<el-table :data="detailData" height="340" border style="width: 100%"> <el-table :data="detailData" height="340" border style="width: 100%">
@ -189,11 +207,11 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import util from '@/libs/util' import util from "@/libs/util";
import Setting from '@/setting' import Setting from "@/setting";
import pdf from '@/components/pdf' import pdf from "@/components/pdf";
import { videoList1, videoList4, videoList5, videoList6, videoList7, videoList8} from '@/libs/videoList' import { videoList1, videoList4, videoList5, videoList6, videoList7, videoList8 } from "@/libs/videoList";
export default { export default {
components: { pdf }, components: { pdf },
@ -201,9 +219,9 @@ export default {
return { return {
systemId: Setting.systemId, systemId: Setting.systemId,
systemList: Setting.systemList, systemList: Setting.systemList,
video: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4', video: "http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4",
videoSrc: '', videoSrc: "",
curLink: '', curLink: "",
videoList1, videoList1,
videoList4, videoList4,
videoList5, videoList5,
@ -217,8 +235,8 @@ export default {
question: { question: {
options: {} options: {}
}, },
countdown: '', countdown: "",
selected: '', selected: "",
result: {}, result: {},
detail: {}, detail: {},
timer: null, timer: null,
@ -228,11 +246,11 @@ export default {
history: [], history: [],
btnType: 1, btnType: 1,
coverUrl: '', coverUrl: "",
playAuth: '', playAuth: "",
player: null, player: null,
previewImg: '', previewImg: "",
iframeSrc: '', iframeSrc: "",
isWord: false, isWord: false,
isPPT: false, isPPT: false,
isExcel: false, isExcel: false,
@ -240,35 +258,35 @@ export default {
showMask1: false, showMask1: false,
showMask2: false, showMask2: false,
closePosi: { closePosi: {
top: '80px' top: "80px"
}, },
pdfVisible: false, pdfVisible: false,
pdfSrc: '', pdfSrc: ""
}; };
}, },
computed: { computed: {
...mapState('user', [ ...mapState("user", [
'studentId','userId' "studentId", "userId"
]), ])
}, },
watch: { watch: {
question: { question: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
for (let n in newVal.options) { for (let n in newVal.options) {
if(newVal.options[n] == '') delete(newVal.options[n]) if (newVal.options[n] == "") delete (newVal.options[n]);
} }
}, },
deep: true deep: true
} }
}, },
mounted() { mounted() {
this.insertScript() this.insertScript();
// this.getData() // this.getData()
this.preview(this.videoList1[0]) this.preview(this.videoList1[0]);
this.$once('hook:beforeDestroy', function () { this.$once("hook:beforeDestroy", function() {
clearInterval(this.timer) clearInterval(this.timer);
this.timer = null this.timer = null;
}) });
}, },
methods: { methods: {
// async getData(){ // async getData(){
@ -279,150 +297,150 @@ export default {
// this.videoList = res.data.list // this.videoList = res.data.list
// }, // },
async toEvaluation(type, btn) { async toEvaluation(type, btn) {
clearInterval(this.timer) clearInterval(this.timer);
this.lastOne = false this.lastOne = false;
this.selected = '' this.selected = "";
this.resultVisible = false this.resultVisible = false;
this.history = [] this.history = [];
if(btn) this.btnType = btn if (btn) this.btnType = btn;
if (type) { if (type) {
let res = null let res = null;
if (btn == 2) { if (btn == 2) {
res = await this.$get(this.api.openExercise, { userId: this.userId }) res = await this.$get(this.api.openExercise, { userId: this.userId });
} else { } else {
res = await this.$get(this.api.openTeaching, { userId: this.userId }) res = await this.$get(this.api.openTeaching, { userId: this.userId });
} }
if(res.errmessage == 'true'){ if (res.errmessage == "true") {
if (btn == 2) { if (btn == 2) {
this.goSubSystem() this.goSubSystem();
} }
if (btn == 3) { if (btn == 3) {
this.$router.push('/project') this.$router.push("/project");
} }
} else { } else {
this.$alert('请先完成能力测评并达到60分以上才可以进行实验', '提示', { this.$alert("请先完成能力测评并达到60分以上才可以进行实验", "提示", {
confirmButtonText: '进入测评', confirmButtonText: "进入测评",
callback: action => { callback: action => {
action == 'confirm' && this.toEvaluation(0) action == "confirm" && this.toEvaluation(0);
} }
}); });
} }
} else { } else {
this.start() this.start();
this.getCountdown() this.getCountdown();
} }
}, },
handleQues() { handleQues() {
this.question.options = {} this.question.options = {};
for (let n in this.question) { for (let n in this.question) {
if(n.includes('option') && n != 'options') { if (n.includes("option") && n != "options") {
this.question.options[n.replace('option','')] = this.question[n] this.question.options[n.replace("option", "")] = this.question[n];
} }
} }
if (this.question.currentQuestionSortNo == this.question.totalQuestionNum) { if (this.question.currentQuestionSortNo == this.question.totalQuestionNum) {
this.lastOne = true this.lastOne = true;
} else { } else {
this.lastOne = false this.lastOne = false;
} }
}, },
async start() { async start() {
let res = await this.$get(this.api.experimentStart, { userId: this.userId,types: this.btnType }) let res = await this.$get(this.api.experimentStart, { userId: this.userId, types: this.btnType });
if (res.data) { if (res.data) {
this.question = res.data this.question = res.data;
this.isDone = false this.isDone = false;
this.question.currentQuestionSortNo == 1 && this.$store.commit("answerHistoryData", { answerHistory : []}) this.question.currentQuestionSortNo == 1 && this.$store.commit("answerHistoryData", { answerHistory: [] });
this.handleQues() this.handleQues();
this.evaluationVisible = true this.evaluationVisible = true;
} else { } else {
util.warningMsg(res.message) util.warningMsg(res.message);
} }
}, },
async getCountdown() { async getCountdown() {
let res = await this.$get(this.api.experimentRemaining, { userId: this.userId }) let res = await this.$get(this.api.experimentRemaining, { userId: this.userId });
res.data && this.countDown(res.data) res.data && this.countDown(res.data);
// this.countDown('00:00:05') // this.countDown('00:00:05')
}, },
countDown(time) { countDown(time) {
this.countdown = time this.countdown = time;
this.timer = setInterval(() => { this.timer = setInterval(() => {
let timeList = this.countdown.split(':') let timeList = this.countdown.split(":");
let total = Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2]) let total = Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2]);
if (total > 0) { if (total > 0) {
--total --total;
let minutes = Math.floor(total / 60) let minutes = Math.floor(total / 60);
let seconds = Math.floor(total % 60) let seconds = Math.floor(total % 60);
this.countdown = `00:${util.formateTime(minutes)}:${util.formateTime(seconds)}` this.countdown = `00:${util.formateTime(minutes)}:${util.formateTime(seconds)}`;
} else { } else {
this.isDone = true this.isDone = true;
util.warningMsg('测评时间结束'); util.warningMsg("测评时间结束");
clearInterval(this.timer) clearInterval(this.timer);
this.prevQues() this.prevQues();
} }
},1000) }, 1000);
}, },
selectOption(option) { selectOption(option) {
if (!this.isDone) { if (!this.isDone) {
if (this.selected.includes(option)) { if (this.selected.includes(option)) {
this.selected = this.selected.replace(option,'') this.selected = this.selected.replace(option, "");
} else { } else {
if (this.question.questionType == 2) { if (this.question.questionType == 2) {
this.selected += option this.selected += option;
} else { } else {
this.selected = option this.selected = option;
} }
} }
} }
}, },
getHistory() { getHistory() {
this.history = this.$store.state.answerHistory this.history = this.$store.state.answerHistory;
}, },
async nextQues() { async nextQues() {
if(!this.selected) return util.warningMsg('请选择答案') if (!this.selected) return util.warningMsg("请选择答案");
this.getHistory() this.getHistory();
if (this.history.length > this.question.currentQuestionSortNo) { if (this.history.length > this.question.currentQuestionSortNo) {
this.history[this.question.currentQuestionSortNo-1] = this.selected this.history[this.question.currentQuestionSortNo - 1] = this.selected;
} else if (this.history.length < this.question.currentQuestionSortNo) { } else if (this.history.length < this.question.currentQuestionSortNo) {
this.history.push(this.selected) this.history.push(this.selected);
} }
this.$store.commit("answerHistoryData", { answerHistory : this.history}) this.$store.commit("answerHistoryData", { answerHistory: this.history });
let res = await this.$post(this.api.experimentNext, { let res = await this.$post(this.api.experimentNext, {
id: this.question.id, id: this.question.id,
currentQuestionSortNo: this.question.currentQuestionSortNo, currentQuestionSortNo: this.question.currentQuestionSortNo,
// userAnswer: this.selected.split('').sort().join(',') // userAnswer: this.selected.split('').sort().join(',')
userAnswer: this.selected userAnswer: this.selected
}) });
if (res.data) { if (res.data) {
this.question = res.data this.question = res.data;
this.selected = '' this.selected = "";
if (this.history.length >= this.question.currentQuestionSortNo) { if (this.history.length >= this.question.currentQuestionSortNo) {
this.selected = this.history[this.question.currentQuestionSortNo-1] this.selected = this.history[this.question.currentQuestionSortNo - 1];
} else { } else {
this.selected = '' this.selected = "";
} }
this.handleQues() this.handleQues();
} }
}, },
async prevQues() { async prevQues() {
if (this.question.currentQuestionSortNo > 1) { if (this.question.currentQuestionSortNo > 1) {
this.getHistory() this.getHistory();
let res = await this.$post(this.api.experimentPrevious, { let res = await this.$post(this.api.experimentPrevious, {
id: this.question.id, id: this.question.id,
currentQuestionSortNo: this.question.currentQuestionSortNo, currentQuestionSortNo: this.question.currentQuestionSortNo,
// userAnswer: this.selected.split('').sort().join(',') // userAnswer: this.selected.split('').sort().join(',')
userAnswer: this.selected userAnswer: this.selected
}) });
if (res.data) { if (res.data) {
this.question = res.data this.question = res.data;
this.selected = this.history[this.question.currentQuestionSortNo-1] this.selected = this.history[this.question.currentQuestionSortNo - 1];
this.isDone ? this.submitQues() : this.handleQues() this.isDone ? this.submitQues() : this.handleQues();
} }
} else if (this.isDone) { } else if (this.isDone) {
if(!this.selected) this.selected = 'A' if (!this.selected) this.selected = "A";
this.submitQues() this.submitQues();
} }
}, },
async submitQues() { async submitQues() {
if(!this.selected) return util.warningMsg('请选择答案'); if (!this.selected) return util.warningMsg("请选择答案");
let res = await this.$post(this.api.experimentSubmit, { let res = await this.$post(this.api.experimentSubmit, {
id: this.question.id, id: this.question.id,
currentQuestionSortNo: this.question.currentQuestionSortNo, currentQuestionSortNo: this.question.currentQuestionSortNo,
@ -430,112 +448,112 @@ export default {
userAnswer: this.selected, userAnswer: this.selected,
userId: this.userId, userId: this.userId,
types: this.btnType types: this.btnType
}) });
if (res.data) { if (res.data) {
this.result = res.data this.result = res.data;
this.evaluationVisible = false this.evaluationVisible = false;
this.resultVisible = true this.resultVisible = true;
} }
}, },
async getDetail() { async getDetail() {
let res = await this.$get(this.api.experimentDetail, { let res = await this.$get(this.api.experimentDetail, {
evaluationRecordId: this.question.id evaluationRecordId: this.question.id
}) });
if (res.data) { if (res.data) {
this.totalScore = res.data.totalScore this.totalScore = res.data.totalScore;
this.detailData = res.data.evaluationDetailVOS this.detailData = res.data.evaluationDetailVOS;
this.resultVisible = false this.resultVisible = false;
this.detailVisible = true this.detailVisible = true;
} }
}, },
systemChange() { systemChange() {
this.videoSrc = '' this.videoSrc = "";
this.preview(this[`videoList${this.systemId}`][0]) this.preview(this[`videoList${this.systemId}`][0]);
}, },
preview(row) { preview(row) {
let url = row.links let url = row.links;
this.videoSrc = '' this.videoSrc = "";
this.coverUrl = '' this.coverUrl = "";
this.pdfSrc = '' this.pdfSrc = "";
this.iframeSrc = '' this.iframeSrc = "";
this.curLink = row.title this.curLink = row.title;
let ext = util.getFileExt(url) let ext = util.getFileExt(url);
if (util.isVideo(ext)) { if (util.isVideo(ext)) {
this.videoSrc = url this.videoSrc = url;
}else if(ext == 'pdf'){ } else if (ext == "pdf") {
this.pdfSrc = url this.pdfSrc = url;
this.pdfVisible = true this.pdfVisible = true;
} else if (util.isImg(ext)) { } else if (util.isImg(ext)) {
window.open(url) window.open(url);
} else if (util.isDoc(ext)) { } else if (util.isDoc(ext)) {
if(ext == 'pptx'){ if (ext == "pptx") {
this.isPPT = true this.isPPT = true;
this.isWord = false this.isWord = false;
this.isExcel = false this.isExcel = false;
}else if(ext == 'doc' || ext == 'docx'){ } else if (ext == "doc" || ext == "docx") {
this.isPPT = false this.isPPT = false;
this.isWord = true this.isWord = true;
this.isExcel = false this.isExcel = false;
}else if(ext == 'xls' || ext == 'xlsx'){ } else if (ext == "xls" || ext == "xlsx") {
this.isExcel = true this.isExcel = true;
this.isPPT = false this.isPPT = false;
this.isWord = false this.isWord = false;
} else { } else {
this.isPPT = false this.isPPT = false;
this.isWord = false this.isWord = false;
this.isExcel = false this.isExcel = false;
} }
if (this.isPPT) { if (this.isPPT) {
this.showMask = true this.showMask = true;
} else { } else {
this.showMask = false this.showMask = false;
} }
if (this.isWord) { if (this.isWord) {
this.showMask1 = true this.showMask1 = true;
} else { } else {
this.showMask1 = false this.showMask1 = false;
} }
if (this.isExcel) { if (this.isExcel) {
this.showMask2 = true this.showMask2 = true;
} else { } else {
this.showMask2 = false this.showMask2 = false;
} }
this.iframeSrc = `https://view.officeapps.live.com/op/view.aspx?src=${url}` this.iframeSrc = `https://view.officeapps.live.com/op/view.aspx?src=${url}`;
} }
}, },
closeIframe() { closeIframe() {
this.iframeSrc = '' this.iframeSrc = "";
this.showMask = false this.showMask = false;
this.showMask1 = false this.showMask1 = false;
this.showMask2 = false this.showMask2 = false;
this.curLink = '' this.curLink = "";
}, },
// //
insertScript() { insertScript() {
const linkTag = document.createElement('link') const linkTag = document.createElement("link");
linkTag.id = 'aliplayerLink' linkTag.id = "aliplayerLink";
linkTag.rel = 'stylesheet' linkTag.rel = "stylesheet";
linkTag.href = 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css' linkTag.href = "https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css";
document.body.appendChild(linkTag) document.body.appendChild(linkTag);
const scriptTag = document.createElement('script') const scriptTag = document.createElement("script");
scriptTag.id = 'aliplayerScript' scriptTag.id = "aliplayerScript";
scriptTag.type = 'text/javascript' scriptTag.type = "text/javascript";
scriptTag.src = 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js' scriptTag.src = "https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js";
document.body.appendChild(scriptTag) document.body.appendChild(scriptTag);
this.$once('hook:beforeDestroy', function () { this.$once("hook:beforeDestroy", function() {
document.body.removeChild(document.querySelector('#aliplayerLink')) document.body.removeChild(document.querySelector("#aliplayerLink"));
document.body.removeChild(document.querySelector('#aliplayerScript')) document.body.removeChild(document.querySelector("#aliplayerScript"));
}) });
}, },
goSubSystem() { goSubSystem() {
util.cookies.set("assessmentId",'',-1) util.cookies.set("assessmentId", "", -1);
util.cookies.set("studentId",this.studentId) util.cookies.set("studentId", this.studentId);
util.cookies.set("projectId",'',-1) util.cookies.set("projectId", "", -1);
util.cookies.set("startTime",'',-1) util.cookies.set("startTime", "", -1);
util.cookies.set("stopTime",'',-1) util.cookies.set("stopTime", "", -1);
location.href = Setting.defaultSubSystem location.href = Setting.defaultSubSystem;
}, }
} }
}; };
</script> </script>
@ -546,24 +564,30 @@ export default {
height: 650px; height: 650px;
border: 0; border: 0;
} }
.video_wid:focus { .video_wid:focus {
outline: none; outline: none;
} }
.title_view { .title_view {
background-color: #2F3236; background-color: #2F3236;
padding: 12px 10px; padding: 12px 10px;
} }
h3 { h3 {
color: #9076FF; color: #9076FF;
margin-bottom: 10px; margin-bottom: 10px;
} }
.catalog .title_view .el-button { .catalog .title_view .el-button {
padding: 8px 20px; padding: 8px 20px;
} }
.btns { .btns {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.btns .el-button { .btns .el-button {
flex: 1; flex: 1;
height: 90px; height: 90px;
@ -571,95 +595,118 @@ h3{
background: transparent url(../../../assets/img/ques1.png) 0 0/100% 100% no-repeat; background: transparent url(../../../assets/img/ques1.png) 0 0/100% 100% no-repeat;
border: 0; border: 0;
} }
.list_he { .list_he {
height: 500px; height: 500px;
overflow-y: auto; overflow-y: auto;
padding: 20px 12px; padding: 20px 12px;
background: #3f4449; background: #3f4449;
} }
.list_he ul { .list_he ul {
padding: 20px 0; padding: 20px 0;
} }
.list_he ul li:first-child { .list_he ul li:first-child {
margin-top: 0; margin-top: 0;
} }
.list_he ul li { .list_he ul li {
margin-top: 10px; margin-top: 10px;
font-size: 14px; font-size: 14px;
} }
.list_title { .list_title {
color: #9278FF; color: #9278FF;
font-size: 20px; font-size: 20px;
margin-left: 12px; margin-left: 12px;
} }
.list_catalog { .list_catalog {
padding: 0 8px; padding: 0 8px;
font-size: 14px; font-size: 14px;
margin-top: 15px; margin-top: 15px;
cursor: pointer; cursor: pointer;
} }
.mar0 { .mar0 {
margin-top: 0; margin-top: 0;
} }
.list_catalog .catalog_button .el-button { .list_catalog .catalog_button .el-button {
background-color: #2F3236; background-color: #2F3236;
border: 1px solid rgba(144, 118, 255, 1); border: 1px solid rgba(144, 118, 255, 1);
color: #9278FF; color: #9278FF;
padding: 6px 8px; padding: 6px 8px;
} }
.experimental_title { .experimental_title {
color: #fff; color: #fff;
word-wrap: break-word; word-wrap: break-word;
&.active { &.active {
color: #9278FF; color: #9278FF;
} }
} }
.experimental_status { .experimental_status {
margin-right: 10px; margin-right: 10px;
color: #7A7A7A; color: #7A7A7A;
} }
.curriculum_name { .curriculum_name {
color: #fff; color: #fff;
} }
.curriculum_name i { .curriculum_name i {
margin-left: 5px; margin-left: 5px;
margin-right: 5px; margin-right: 5px;
} }
.curriculum_status { .curriculum_status {
color: #7A7A7A; color: #7A7A7A;
} }
/deep/ .evaluation_dialog { /deep/ .evaluation_dialog {
min-height: 700px; min-height: 700px;
background: url(../../../assets/img/evaluation_bg1.png) 0 0/100% 100% no-repeat; background: url(../../../assets/img/evaluation_bg1.png) 0 0/100% 100% no-repeat;
} }
/deep/ .evaluation_dialog .el-dialog__headerbtn, /deep/ .evaluation_dialog .el-dialog__headerbtn, /deep/ .detail_dialog .el-dialog__headerbtn { /deep/ .evaluation_dialog .el-dialog__headerbtn, /deep/ .evaluation_dialog .el-dialog__headerbtn, /deep/ .detail_dialog .el-dialog__headerbtn {
font-size: 28px; font-size: 28px;
} }
/deep/ .evaluation_dialog .title, /deep/ .detail_dialog .title { /deep/ .evaluation_dialog .title, /deep/ .detail_dialog .title {
margin-bottom: 45px; margin-bottom: 45px;
text-align: center; text-align: center;
font-size: 24px font-size: 24px
} }
/deep/ .evaluation_dialog .title { /deep/ .evaluation_dialog .title {
margin-bottom: 55px; margin-bottom: 55px;
} }
/deep/ .evaluation_dialog .serial { /deep/ .evaluation_dialog .serial {
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
} }
/deep/ .evaluation_dialog .ques-wrap { /deep/ .evaluation_dialog .ques-wrap {
width: 80%; width: 80%;
margin: 0 auto; margin: 0 auto;
} }
/deep/ .evaluation_dialog .type { /deep/ .evaluation_dialog .type {
color: #666; color: #666;
} }
/deep/ .evaluation_dialog .ques { /deep/ .evaluation_dialog .ques {
margin: 20px 0; margin: 20px 0;
min-height: 145px; min-height: 145px;
color: #666; color: #666;
font-size: 16px; font-size: 16px;
} }
/deep/ .evaluation_dialog .countdown { /deep/ .evaluation_dialog .countdown {
margin-bottom: 20px; margin-bottom: 20px;
justify-content: center; justify-content: center;
@ -667,18 +714,22 @@ h3{
color: #DC3434; color: #DC3434;
font-size: 14px; font-size: 14px;
} }
/deep/ .evaluation_dialog .countdown img { /deep/ .evaluation_dialog .countdown img {
width: 15px !important; width: 15px !important;
margin-right: 10px; margin-right: 10px;
} }
/deep/ .evaluation_dialog .options { /deep/ .evaluation_dialog .options {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 340px; min-height: 340px;
} }
/deep/ .evaluation_dialog .options.isDone { /deep/ .evaluation_dialog .options.isDone {
min-height: 395px; min-height: 395px;
} }
/deep/ .evaluation_dialog .options li { /deep/ .evaluation_dialog .options li {
padding: 0 15px; padding: 0 15px;
margin-bottom: 15px; margin-bottom: 15px;
@ -688,33 +739,40 @@ h3{
color: #666; color: #666;
cursor: pointer; cursor: pointer;
} }
/deep/ .evaluation_dialog .options li:hover { /deep/ .evaluation_dialog .options li:hover {
color: #fff; color: #fff;
background-color: #b038bb; background-color: #b038bb;
border-color: #b038bb; border-color: #b038bb;
} }
/deep/ .evaluation_dialog .options li.active { /deep/ .evaluation_dialog .options li.active {
color: #fff; color: #fff;
background-color: #916CFF; background-color: #916CFF;
border-color: #916CFF; border-color: #916CFF;
} }
/deep/ .evaluation_dialog .options em { /deep/ .evaluation_dialog .options em {
margin-right: 10px; margin-right: 10px;
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
font-size: 16px; font-size: 16px;
} }
/deep/ .evaluation_dialog .options span { /deep/ .evaluation_dialog .options span {
font-size: 16px; font-size: 16px;
} }
/deep/ .evaluation_dialog .el-dialog__footer { /deep/ .evaluation_dialog .el-dialog__footer {
text-align: center; text-align: center;
} }
/deep/ .evaluation_dialog .first, /deep/ .result_dialog .first { /deep/ .evaluation_dialog .first, /deep/ .result_dialog .first {
color: #fff; color: #fff;
background-color: #9268FF; background-color: #9268FF;
border-color: #9268FF; border-color: #9268FF;
} }
/deep/ .evaluation_dialog .second, /deep/ .result_dialog .second { /deep/ .evaluation_dialog .second, /deep/ .result_dialog .second {
color: #fff; color: #fff;
background-color: #E371DA; background-color: #E371DA;
@ -725,31 +783,37 @@ h3{
min-height: 500px; min-height: 500px;
background: url(../../../assets/img/evaluation_bg2.png) 0 0/100% 100% no-repeat; background: url(../../../assets/img/evaluation_bg2.png) 0 0/100% 100% no-repeat;
} }
/deep/ .result_dialog .el-dialog__headerbtn .el-dialog__close { /deep/ .result_dialog .el-dialog__headerbtn .el-dialog__close {
color: #5a5a5a; color: #5a5a5a;
font-size: 28px; font-size: 28px;
} }
/deep/ .result_dialog .result { /deep/ .result_dialog .result {
margin-top: 60px; margin-top: 60px;
text-align: center; text-align: center;
color: #fff; color: #fff;
font-size: 24px; font-size: 24px;
} }
/deep/ .result_dialog .point { /deep/ .result_dialog .point {
margin: 30px 0 20px; margin: 30px 0 20px;
text-align: center; text-align: center;
font-size: 30px; font-size: 30px;
color: #666; color: #666;
} }
/deep/ .result_dialog .point span { /deep/ .result_dialog .point span {
font-size: 120px; font-size: 120px;
font-weight: bold; font-weight: bold;
} }
/deep/ .result_dialog .tips { /deep/ .result_dialog .tips {
color: #666; color: #666;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
} }
/deep/ .result_dialog .third { /deep/ .result_dialog .third {
color: #fff; color: #fff;
background-color: #418cf5; background-color: #418cf5;
@ -759,18 +823,22 @@ h3{
/deep/ .detail_dialog { /deep/ .detail_dialog {
background: url(../../../assets/img/evaluation_bg3.png) 0 0/100% 100% no-repeat; background: url(../../../assets/img/evaluation_bg3.png) 0 0/100% 100% no-repeat;
} }
/deep/ .detail_dialog .title { /deep/ .detail_dialog .title {
margin-top: -20px; margin-top: -20px;
} }
/deep/ .detail_dialog .el-table__header th:nth-last-child(2) { /deep/ .detail_dialog .el-table__header th:nth-last-child(2) {
text-align: center; text-align: center;
} }
/deep/ .detail_dialog .total { /deep/ .detail_dialog .total {
margin-top: 20px; margin-top: 20px;
text-align: center; text-align: center;
font-size: 30px; font-size: 30px;
color: #DC3434; color: #DC3434;
} }
/deep/ .evaluation_dialog { /deep/ .evaluation_dialog {
margin: 0 !important; margin: 0 !important;
position: absolute; position: absolute;
@ -780,6 +848,7 @@ h3{
max-height: calc(100% - 30px); max-height: calc(100% - 30px);
max-width: calc(100% - 30px); max-width: calc(100% - 30px);
} }
/deep/ .evaluation_dialog .el-dialog__body { /deep/ .evaluation_dialog .el-dialog__body {
flex: 1; flex: 1;
overflow: auto; overflow: auto;
@ -790,6 +859,7 @@ h3{
position: absolute; position: absolute;
background-color: rgb(57, 58, 61); background-color: rgb(57, 58, 61);
} }
.word-mask { .word-mask {
z-index: 9; z-index: 9;
position: absolute; position: absolute;
@ -798,6 +868,7 @@ h3{
width: 100%; width: 100%;
background-color: rgb(243, 242, 241); background-color: rgb(243, 242, 241);
} }
.word-mask1 { .word-mask1 {
z-index: 9; z-index: 9;
position: absolute; position: absolute;
@ -806,11 +877,13 @@ h3{
width: 100%; width: 100%;
background-color: #185abd; background-color: #185abd;
} }
.word-mask2 { .word-mask2 {
z-index: 9; z-index: 9;
position: absolute; position: absolute;
background-color: transparent; background-color: transparent;
} }
.excel-mask1 { .excel-mask1 {
z-index: 9; z-index: 9;
position: absolute; position: absolute;
@ -819,11 +892,13 @@ h3{
width: 60%; width: 60%;
background-color: #107c41; background-color: #107c41;
} }
$height: 650px; $height: 650px;
.cover { .cover {
position: relative; position: relative;
height: $height; height: $height;
border: 0; border: 0;
.fileIframe { .fileIframe {
width: 100%; width: 100%;
height: $height !important; height: $height !important;

@ -1,19 +1,22 @@
<template> <template>
<div> <div>
<el-table <el-table
ref="table"
class="table"
:cell-style="tableRowStyle" :cell-style="tableRowStyle"
:header-cell-style="{background:'#9278FF',color:'#FFFFFF'}" :header-cell-style="{background:'#9278FF',color:'#FFFFFF'}"
:data="listData" :data="listData"
stripe stripe
> >
<el-table-column prop="id" label="次序" width="120" align="center" type="index"></el-table-column> <el-table-column prop="id" label="次序" width="120" align="center" type="index"></el-table-column>
<el-table-column prop="experimentalName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="experimentalName" label="考核名称" align="center"></el-table-column> <el-table-column prop="experimentalName" label="考核名称" align="center"></el-table-column>
<el-table-column prop="experimentalClassName" label="班级" align="center"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column> <el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="score" label="得分" align="center"></el-table-column> <el-table-column prop="score" label="得分" align="center"></el-table-column>
<el-table-column prop="timeSum" label="耗时" align="center"> <el-table-column prop="className" label="实验班级" align="center"></el-table-column>
<el-table-column prop="duration" label="耗时" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.timeSum}} {{ scope.row.duration }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="startTime" label="起始时间" align="center"></el-table-column> <el-table-column prop="startTime" label="起始时间" align="center"></el-table-column>
@ -31,62 +34,56 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import util from '@/libs/util' import util from "@/libs/util";
import Setting from '@/setting' import Setting from "@/setting";
export default { export default {
props: ['systemId'], props: ["systemId"],
data() { data() {
return { return {
listData: [], listData: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0
}; };
}, },
computed: { computed: {
...mapState('user', [ ...mapState("user", [
'userId' "userId"
]), ])
}, },
mounted() { mounted() {
this.getData() this.getData();
}, },
methods: { methods: {
...mapActions('project', [ ...mapActions("project", [
'setSystemId' "setSystemId"
]), ]),
tableRowStyle({ row, column, rowIndex, columnIndex }) { tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) { if (rowIndex % 2 === 0) {
return 'background-color: #FFF' return "background-color: #FFF";
} else { } else {
return 'background-color: #F5F2FF' return "background-color: #F5F2FF";
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val;
this.getData() this.getData();
}, },
getData() { getData() {
this.$get(this.api.experimentRecord, { this.$post(this.api.queryAssessmentByStudent, {
userid: this.userId, pageNum: this.page,
page: this.page, pageSize: this.pageSize,
size: this.pageSize,
systemId: this.systemId systemId: this.systemId
}) }).then(res => {
.then(res => { this.listData = res.page.records;
let data = res.data this.total = res.page.total;
this.listData = data.list }).catch(err => {});
this.total = data.totalCount
})
.catch(err => {})
},
exportData() {
location.href = `${this.api.exportProjectRecord}?userId=${this.userId}`
}, },
toReport(row) { toReport(row) {
this.setSystemId(this.systemId) this.setSystemId(this.systemId);
this.$router.push(`show?id=${row.id}&recordId=${row.recordid}&reportId=${row.reportId}`) this.$router.push(`show?id=${row.id}&recordId=${row.recordid}&reportId=${row.reportId}`);
} }
} }
}; };

@ -12,12 +12,12 @@
<div class="item"> <div class="item">
<p class="name">实验次数</p> <p class="name">实验次数</p>
<p class="val">{{overview.experimentNumber}}</p> <p class="val">{{ overview.experimentalNum }}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="name">实验总时长</p> <p class="name">实验总时长</p>
<p class="val">{{overview.totalTime ? overview.totalTime : 0}}小时</p> <p class="val">{{ overview.duration ? overview.duration : 0 }}小时</p>
</div> </div>
<div class="item"> <div class="item">
@ -30,18 +30,25 @@
<div class="page"> <div class="page">
<div class="tabs"> <div class="tabs">
<a class="item" v-for="(item,index) in tabList" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{item}}</a> <a class="item" v-for="(item,index) in tabList" :key="index" :class="{active: index == active}"
@click="tabChange(index)">{{ item }}</a>
</div> </div>
<div class="tool" style="align-items: center"> <div class="tool" style="align-items: center">
<p style="font-size: 16px">实验记录明细</p> <p style="font-size: 16px">实验记录明细</p>
<ul class="filter" style="flex: 0 1 auto;"> <ul class="filter" style="flex: 0 1 auto;">
<li style="margin-right: 0"> <li style="margin-right: 0">
<label>系统</label> <label>课程选择</label>
<el-select size="small" v-model="systemId" placeholder="请选择系统"> <el-select size="small" v-model="systemId">
<el-option v-for="item in systemList" :key="item.value" :label="item.label" :value="item.id"></el-option> <el-option
v-for="item in systemList"
:key="item.value"
:label="item.label"
:value="item.id"
></el-option>
</el-select> </el-select>
<el-button style="margin-left: 10px;" size="small" round type="primary" @click="exportData">导出</el-button> <el-button style="margin-left: 10px;" size="small" round type="primary" @click="exportData">导出
</el-button>
</li> </li>
</ul> </ul>
</div> </div>
@ -53,62 +60,67 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import util from '@/libs/util' import util from "@/libs/util";
import Setting from '@/setting' import Setting from "@/setting";
import practice from './practice' import practice from "./practice";
import ass from './ass' import ass from "./ass";
export default { export default {
components: {
practice,
ass
},
data() { data() {
return { return {
systemId: Setting.systemId, systemId: Setting.systemId,
systemList: Setting.systemList, systemList: Setting.systemList,
overview: {}, overview: {},
active: 'practice', active: "practice",
tabList: { tabList: {
practice: '练习', practice: "练习",
ass: '考核' ass: "考核"
} }
}; };
}, },
computed: { computed: {
...mapState('user', [ ...mapState("user", [
'userId' "userId"
]),
...mapState('project', [
'lastRecordType','lastSystemId'
]), ]),
...mapState("project", [
"lastRecordType", "lastSystemId"
])
}, },
mounted() { mounted() {
this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId;
this.active = this.lastRecordType ? this.lastRecordType : 'practice' this.active = this.lastRecordType ? this.lastRecordType : "practice";
this.getData() this.getData();
}, },
methods: { methods: {
...mapActions('user', [ ...mapActions("user", [
'setRecord' "setRecord"
]), ]),
getData() { getData() { //
this.$get(`${this.api.fictitiousScore}/${this.userId}`).then(res => { this.$get(this.api.experimentOverview).then(res => {
this.overview = res.data this.overview = res.data;
}).catch(err => {}) }).catch(err => {
});
}, },
exportData() { exportData() { //
if(this.active == 'practice'){ if (this.active == "practice") {
location.href = `${this.api.exportProjectRecord}?userId=${this.userId}` //
location.href = `${this.api.exportPracticeInfo}?ids=`;
} else { } else {
location.href = `${this.api.exportExperimentProjectRecord}?userId=${this.userId}` //
location.href = `${this.api.exportAssessmentInfo}?ids=`;
} }
}, },
tabChange(index) { tabChange(index) {
this.active = index this.active = index;
this.setRecord(this.actice) this.setRecord(this.actice);
},
},
components: {
practice,
ass
} }
},
}; };
</script> </script>
@ -119,6 +131,7 @@ export default {
padding: 20px 0 0; padding: 20px 0 0;
margin-bottom: 10px; margin-bottom: 10px;
background-color: #fff; background-color: #fff;
.item { .item {
padding: 12px 20px; padding: 12px 20px;
margin-right: 10px; margin-right: 10px;
@ -136,32 +149,39 @@ export default {
} }
} }
} }
.overview { .overview {
padding: 20px; padding: 20px;
margin-top: 20px; margin-top: 20px;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1); box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1);
border-radius: 10px; border-radius: 10px;
h6 { h6 {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
} }
.nums { .nums {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.item:nth-child(1) { .item:nth-child(1) {
background-image: url('../../../assets/img/student1.png'); background-image: url('../../../assets/img/student1.png');
box-shadow: 0px 25px 20px -22px #ec92e0; box-shadow: 0px 25px 20px -22px #ec92e0;
} }
.item:nth-child(2) { .item:nth-child(2) {
background-image: url('../../../assets/img/student2.png'); background-image: url('../../../assets/img/student2.png');
box-shadow: 0px 25px 20px -22px #60b8f6; box-shadow: 0px 25px 20px -22px #60b8f6;
} }
.item:nth-child(3) { .item:nth-child(3) {
background-image: url('../../../assets/img/student3.png'); background-image: url('../../../assets/img/student3.png');
box-shadow: 0px 25px 20px -22px #fe787a; box-shadow: 0px 25px 20px -22px #fe787a;
} }
.item:nth-child(4) { .item:nth-child(4) {
background-image: url('../../../assets/img/student4.png'); background-image: url('../../../assets/img/student4.png');
box-shadow: 0px 25px 20px -22px #fbbb6e; box-shadow: 0px 25px 20px -22px #fbbb6e;
@ -174,10 +194,12 @@ export default {
border-radius: 8px; border-radius: 8px;
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
.name { .name {
font-size: 18px; font-size: 18px;
color: #ffffff; color: #ffffff;
} }
.val { .val {
margin-top: 10px; margin-top: 10px;
color: #ffffff; color: #ffffff;

@ -1,34 +1,34 @@
<template> <template>
<div> <div>
<el-table :cell-style="tableRowStyle" :header-cell-style="{background:'#9278FF',color:'#FFFFFF'}" :data="listData" stripe> <el-table :cell-style="tableRowStyle" :header-cell-style="{background:'#9278FF',color:'#FFFFFF'}"
:data="listData" stripe>
<el-table-column prop="id" label="次序" width="120" align="center" type="index"></el-table-column> <el-table-column prop="id" label="次序" width="120" align="center" type="index"></el-table-column>
<el-table-column prop="projectName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column> <el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="score" label="得分" align="center"></el-table-column> <el-table-column prop="hightScore" label="实验最高得分" align="center"></el-table-column>
<el-table-column prop="timeSum" label="耗时" align="center"> <el-table-column prop="practiceNum" label="练习次数" align="center"></el-table-column>
<template slot-scope="scope"> <el-table-column prop="duration" label="累计实验时长(小时)" align="center"></el-table-column>
{{scope.row.timeSum}} <el-table-column prop="lastTime" label="最近实验时间" align="center"></el-table-column>
</template>
</el-table-column>
<el-table-column prop="startingTime" label="起始时间" align="center"></el-table-column>
<el-table-column prop="submitTime" label="结束时间" align="center"></el-table-column>
<el-table-column prop="creationTime" label="操作" align="center"> <el-table-column prop="creationTime" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="toReport(scope.row)">实验报告</el-button> <el-button type="text" @click="toDetails(scope.row)">实验情况</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background :current-page="page" layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange"></el-pagination> <el-pagination background :current-page="page" layout="total, prev, pager, next" :total="total"
@current-change="handleCurrentChange"></el-pagination>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import util from '@/libs/util' import util from "@/libs/util";
import Setting from '@/setting' import Setting from "@/setting";
export default { export default {
props: ['systemId'], props: ["systemId"],
data() { data() {
return { return {
listData: [], listData: [],
@ -38,49 +38,40 @@ export default {
}; };
}, },
computed: { computed: {
...mapState('user', [ ...mapState("user", [
'userId' "userId"
]), ])
}, },
mounted() { mounted() {
this.getData() this.getData();
}, },
methods: { methods: {
...mapActions('project', [ ...mapActions("project", [
'setSystemId' "setSystemId"
]), ]),
tableRowStyle({ row, column, rowIndex, columnIndex }) { tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) { if (rowIndex % 2 === 0) {
return 'background-color: #FFF' return "background-color: #FFF";
} else { } else {
return 'background-color: #F5F2FF' return "background-color: #F5F2FF";
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val;
this.getData() this.getData();
}, },
getData() { getData() {
this.$get(this.api.fictitiousRecord, { this.$post(this.api.queryPracticeByStudent, {
userId: this.userId, pageNum: this.page,
page: this.page, pageSize: this.pageSize,
size: this.pageSize,
projectPermissions: 0,
systemId: this.systemId systemId: this.systemId
}) }).then(res => {
.then(res => { this.listData = res.page.records;
let data = res.data this.total = res.page.total;
this.listData = data.list }).catch(err => {});
this.total = data.totalCount
})
.catch(err => {})
},
exportData() {
location.href = `${this.api.exportProjectRecord}?userId=${this.userId}`
}, },
toReport(row) { toDetails(row) {
this.setSystemId(this.systemId) this.$router.push(`/record/details?id=${row.recordId}`);
this.$router.push(`show?id=${row.recordId}&reportId=${row.reportId}&type=1`)
} }
} }
}; };

@ -12,7 +12,9 @@
<div class="report-wrap" :class="{loading}" id="pdfDom"> <div class="report-wrap" :class="{loading}" id="pdfDom">
<div style="position: relative;"> <div style="position: relative;">
<h6 style="text-align: center;font-size: 20px">标准实验报告</h6> <h6 style="text-align: center;font-size: 20px">标准实验报告</h6>
<el-button v-if="!loading" style="position: absolute;top: 0;right: 0;" size="mini" @click="editReport">{{editing ? '保存' : '编辑'}}</el-button> <el-button v-if="!loading" style="position: absolute;top: 0;right: 0;" size="mini" @click="editReport">
{{ editing ? "保存" : "编辑" }}
</el-button>
</div> </div>
<div class="flex-center m-b-20 user_header"> <div class="flex-center m-b-20 user_header">
@ -108,37 +110,38 @@
</template> </template>
<script> <script>
import { Loading } from 'element-ui' import { Loading } from "element-ui";
import html2Canvas from 'html2canvas' import html2Canvas from "html2canvas";
import JsPDF from 'jspdf' import JsPDF from "jspdf";
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import util from '@/libs/util' import util from "@/libs/util";
import Setting from '@/setting' import Setting from "@/setting";
export default { export default {
data() { data() {
return { return {
title: '实验报告', title: "实验报告",
form: { form: {
analysis: '', analysis: "",
conclusion: '', conclusion: "",
content: ``, content: ``,
data: '', data: "",
purpose: ``, purpose: ``,
experimentId: '', experimentId: "",
experimentalClassName: '', experimentalClassName: "",
improvement: '', improvement: "",
laboratory: '', laboratory: "",
period: '', period: "",
principle: ``, principle: ``,
proName: '', proName: "",
score: 0, score: 0,
step: ``, step: ``,
submitTime: '', submitTime: "",
summarize: '', summarize: "",
instructor: '', instructor: "",
userId: this.userId, userId: this.userId,
userName: '', userName: "",
workNumber: '', workNumber: ""
}, },
type: this.$route.query.type, // type == 1 ? '' : '' type: this.$route.query.type, // type == 1 ? '' : ''
id: this.$route.query.id, id: this.$route.query.id,
@ -147,56 +150,62 @@
infoData: [], infoData: [],
expData: [], expData: [],
accountData: [], accountData: [],
showData: '1', showData: "1",
autograph: '1', autograph: "1",
pages: 1, pages: 1,
ipVisible: false, ipVisible: false,
fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}], fileList: [{
name: "food.jpeg",
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"
}, {
name: "food2.jpeg",
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"
}],
conclusionOptions: [ conclusionOptions: [
{ {
value: 1, value: 1,
label: '结论符合预期' label: "结论符合预期"
} }
], ],
editing: false, editing: false,
loadIns: null, loadIns: null,
loading: false loading: false
} };
}, },
computed: { computed: {
...mapState('user', [ ...mapState("user", [
'userId','studentId' "userId", "studentId"
]), ])
}, },
mounted() { mounted() {
this.getData() this.getData();
}, },
methods: { methods: {
getData() { getData() {
if (this.type) { if (this.type) {
let data = { let data = {
recordId: this.id, recordId: this.id
} };
this.$get(this.api.queryVirtualReport, data).then(res => { this.$get(this.api.queryVirtualReport, data).then(res => {
this.form = res.data.report this.form = res.data.report;
let expData = res.data.data let expData = res.data.data;
let form = this.form let form = this.form;
let score = form.score let score = form.score;
if (expData) { if (expData) {
if (score) { if (score) {
expData.map(n => { expData.map(n => {
if (n.isError) { // isError1 if (n.isError) { // isError1
score -= n.codeScore score -= n.codeScore;
n.codeScore = 0 n.codeScore = 0;
} }
}) });
form.score = score form.score = score;
} }
expData[0].answer = expData[0].answer.replace('<pre class="ql-syntax" spellcheck="false">','') expData[0].answer = expData[0].answer.replace("<pre class=\"ql-syntax\" spellcheck=\"false\">", "");
expData[0].answer = expData[0].answer.replace('</pre>','') expData[0].answer = expData[0].answer.replace("</pre>", "");
this.expData = expData this.expData = expData;
} }
this.infoData.push({ this.infoData.push({
workNumber: form.workNumber, workNumber: form.workNumber,
@ -207,33 +216,34 @@
submitTime: form.submitTime, submitTime: form.submitTime,
score: form.score, score: form.score,
userName: form.userName userName: form.userName
}) });
}).catch(res => {}); }).catch(res => {
});
} else { } else {
let data = { let data = {
studentId: this.studentId, studentId: this.studentId,
projectId: this.id, projectId: this.id,
recordId: this.recordId, recordId: this.recordId,
reportId: this.reportId reportId: this.reportId
} };
this.$get(this.api.queryArchievement, data).then(res => { this.$get(this.api.queryArchievement, data).then(res => {
this.form = res.data.report ? res.data.report : {} this.form = res.data.report ? res.data.report : {};
let expData = res.data.data let expData = res.data.data;
let form = this.form let form = this.form;
let score = form.score let score = form.score;
if (expData) { if (expData) {
if (score) { if (score) {
expData.map(n => { expData.map(n => {
if (n.isError) { if (n.isError) {
score -= n.codeScore score -= n.codeScore;
n.codeScore = 0 n.codeScore = 0;
} }
}) });
form.score = score form.score = score;
} }
this.expData = expData this.expData = expData;
} }
this.infoData.push({ this.infoData.push({
workNumber: form.workNumber, workNumber: form.workNumber,
@ -244,8 +254,9 @@
submitTime: form.submitTime, submitTime: form.submitTime,
score: form.score, score: form.score,
userName: form.userName userName: form.userName
}) });
}).catch(res => {}); }).catch(res => {
});
} }
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
@ -259,20 +270,20 @@
systemId: this.configId, systemId: this.configId,
systemName: this.form.systemName, systemName: this.form.systemName,
systemType: this.form.systemType, systemType: this.form.systemType,
systemAttribution: this.form.systemAttribution, systemAttribution: this.form.systemAttribution
} };
if (this.configId) { if (this.configId) {
this.$post(this.api.updateServiceConfig, data).then((res) => { this.$post(this.api.updateServiceConfig, data).then((res) => {
util.successMsg('编辑成功'); util.successMsg("编辑成功");
this.goBack() this.goBack();
}).catch((res) => { }).catch((res) => {
}) });
} else { } else {
this.$post(this.api.updateServiceConfig, data).then((res) => { this.$post(this.api.updateServiceConfig, data).then((res) => {
util.successMsg('添加成功'); util.successMsg("添加成功");
this.goBack() this.goBack();
}).catch((res) => { }).catch((res) => {
}) });
} }
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
@ -295,50 +306,50 @@
} }
}, },
goBack() { goBack() {
this.$router.go(-1) this.$router.go(-1);
}, },
exportPage() { exportPage() {
document.querySelector('body').setAttribute('style', 'overflow: visible') document.querySelector("body").setAttribute("style", "overflow: visible");
this.loading = true this.loading = true;
this.loadIns = Loading.service({ this.loadIns = Loading.service({
background: 'rgba(255,255,255,.6)' background: "rgba(255,255,255,.6)"
}) });
document.querySelector('#pdfDom').scrollTop = 0 document.querySelector("#pdfDom").scrollTop = 0;
var title = this.title; var title = this.title;
let dom = document.querySelector('#pdfDom') let dom = document.querySelector("#pdfDom");
setTimeout(() => { setTimeout(() => {
html2Canvas(dom, { html2Canvas(dom, {
height: dom.scrollHeight, height: dom.scrollHeight,
allowTaint: true, allowTaint: true
}).then((canvas) => { }).then((canvas) => {
let contentWidth = canvas.width let contentWidth = canvas.width;
let contentHeight = canvas.height let contentHeight = canvas.height;
let pageHeight = contentWidth / 592.28 * 841.89 let pageHeight = contentWidth / 592.28 * 841.89;
let leftHeight = contentHeight let leftHeight = contentHeight;
let position = 0 let position = 0;
let imgWidth = 595.28 let imgWidth = 595.28;
let imgHeight = 592.28 / contentWidth * contentHeight let imgHeight = 592.28 / contentWidth * contentHeight;
let pageData = canvas.toDataURL('image/jpeg', 1.0) let pageData = canvas.toDataURL("image/jpeg", 1.0);
let PDF = new JsPDF('', 'pt', 'a4') let PDF = new JsPDF("", "pt", "a4");
if (leftHeight < pageHeight) { if (leftHeight < pageHeight) {
PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight) PDF.addImage(pageData, "JPEG", 0, 0, imgWidth, imgHeight);
} else { } else {
while (leftHeight > 0) { while (leftHeight > 0) {
PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight) PDF.addImage(pageData, "JPEG", 0, position, imgWidth, imgHeight);
leftHeight -= pageHeight leftHeight -= pageHeight;
position -= 841.89 position -= 841.89;
if (leftHeight > 0) { if (leftHeight > 0) {
PDF.addPage() PDF.addPage();
} }
} }
} }
this.loadIns.close() this.loadIns.close();
this.loading = false this.loading = false;
document.querySelector('body').setAttribute('style', 'overflow: hidden') document.querySelector("body").setAttribute("style", "overflow: hidden");
PDF.save(title + '.pdf') PDF.save(title + ".pdf");
} }
) );
},1000) }, 1000);
}, },
editReport() { editReport() {
if (this.editing) { if (this.editing) {
@ -350,81 +361,98 @@
instructor: this.form.instructor, instructor: this.form.instructor,
reportId: Number(this.reportId), reportId: Number(this.reportId),
experimentalClassName: this.form.experimentalClassName experimentalClassName: this.form.experimentalClassName
} };
this.$post(`${this.api.modifyReport}`, data) this.$post(`${this.api.modifyReport}`, data)
.then(res => { .then(res => {
this.editing = false this.editing = false;
util.successMsg('修改成功') util.successMsg("修改成功");
console.log(11,this.form) console.log(11, this.form);
}).catch(err => {}) }).catch(err => {
});
} else { } else {
this.editing = true this.editing = true;
}
} }
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box { .box {
background-color: #fff; background-color: #fff;
} }
.exp-header { .exp-header {
padding: 20px 100px; padding: 20px 100px;
box-shadow: 0px 0px 25px 2px rgba(48, 115, 248, 0.14); box-shadow: 0px 0px 25px 2px rgba(48, 115, 248, 0.14);
z-index: 999; z-index: 999;
margin-top: 2px; margin-top: 2px;
} }
/deep/ .el-textarea.is-disabled .el-textarea__inner { /deep/ .el-textarea.is-disabled .el-textarea__inner {
color: #777; color: #777;
background-color: #e5dfff; background-color: #e5dfff;
} }
#pdfDom { #pdfDom {
height: calc(100vh - 170px); height: calc(100vh - 170px);
overflow: auto; overflow: auto;
padding: 30px 100px; padding: 30px 100px;
box-sizing: border-box; box-sizing: border-box;
&.loading { &.loading {
height: auto; height: auto;
overflow: visible; overflow: visible;
} }
/deep/ .info-table { /deep/ .info-table {
margin-bottom: 40px; margin-bottom: 40px;
border: 0; border: 0;
th { th {
background-color: #fff !important; background-color: #fff !important;
.cell { .cell {
color: #444; color: #444;
} }
} }
tr { tr {
border: 0; border: 0;
} }
tr:hover, tr:hover > td { tr:hover, tr:hover > td {
background-color: #e5dfff !important; background-color: #e5dfff !important;
} }
td { td {
border: { border: {
left: 4px solid #fff; left: 4px solid #fff;
right: 4px solid #fff; right: 4px solid #fff;
} }
&:first-child { &:first-child {
border-left: 0; border-left: 0;
} }
&:last-child { &:last-child {
border-right: 0; border-right: 0;
} }
background-color: #e5dfff; background-color: #e5dfff;
border-bottom: 0; border-bottom: 0;
} }
} }
/deep/ .table th { /deep/ .table th {
background-color: #e1eaff !important; background-color: #e1eaff !important;
.cell { .cell {
color: #555555; color: #555555;
} }
} }
} }
.pre-wrap { .pre-wrap {
min-height: 117px; min-height: 117px;
padding: 5px 15px; padding: 5px 15px;
@ -435,6 +463,7 @@
/deep/ .cell { /deep/ .cell {
font-size: 12px; font-size: 12px;
} }
// /deep/.el-row{ // /deep/.el-row{
// // padding-top: 20px; // // padding-top: 20px;
// margin: 0 !important; // margin: 0 !important;
@ -443,27 +472,33 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
.form-item .el-input { .form-item .el-input {
width: auto; width: auto;
} }
.form-item span { .form-item span {
margin-right: 10px; margin-right: 10px;
} }
.meta-title-wrap { .meta-title-wrap {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
span { span {
font-size: 13px; font-size: 13px;
color: #444; color: #444;
} }
} }
.flex-between { .flex-between {
span { span {
font-size: 13px; font-size: 13px;
color: #444; color: #444;
} }
} }
.meta-title { .meta-title {
display: flex; display: flex;
align-items: center; align-items: center;
@ -472,16 +507,19 @@
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
background-color: #9278ff; background-color: #9278ff;
img { img {
width: 20px; width: 20px;
margin-right: 10px; margin-right: 10px;
} }
} }
.step-title { .step-title {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 16px; font-size: 16px;
color: #9278ff; color: #9278ff;
} }
.bd-title { .bd-title {
padding-top: 20px; padding-top: 20px;
border-top: 1px dashed #ccc; border-top: 1px dashed #ccc;

File diff suppressed because it is too large Load Diff

@ -7,7 +7,7 @@
</div> </div>
<div class="wrap" :class="isHh ? 'isHh' : (isBeta ? '' : 'isOccu')"> <div class="wrap" :class="isHh ? 'isHh' : (isBeta ? '' : 'isOccu')">
<template v-for="(item,index) in systemList"> <template v-for="(item,index) in systemList">
<a class="item" @click="goSubSystem(item)" :key="index" v-if="!keyword || item.name.includes(keyword)"> <a class="item" @click="goPreview(item)" :key="index" v-if="!keyword || item.name.includes(keyword)">
<img :src="item.imgSrc" alt=""> <img :src="item.imgSrc" alt="">
<p class="text" v-html="item.name"></p> <p class="text" v-html="item.name"></p>
</a> </a>
@ -17,83 +17,84 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
import util from '@/libs/util' import util from "@/libs/util";
import Setting from '@/setting' import Setting from "@/setting";
export default { export default {
name: 'backstage', name: "backstage",
data() { data() {
return { return {
host: Setting.apiBaseURL, host: Setting.apiBaseURL,
isHh: Setting.isHh, isHh: Setting.isHh,
isBeta: Setting.isBeta, isBeta: Setting.isBeta,
keyword: '', keyword: "",
searchTimer: null, searchTimer: null,
systemList: Setting.isHh ? [{ systemList: Setting.isHh ? [{
id: 1, id: 1,
imgSrc: require('@/assets/img/station1.png'), imgSrc: require("@/assets/img/station1.png"),
name: 'Python程序设计<br>教学系统' name: "Python程序设计<br>教学系统"
}, { }, {
id: 4, id: 4,
imgSrc: require('@/assets/img/station2.png'), imgSrc: require("@/assets/img/station2.png"),
name: '经济金融建模<br>实验教学系统' name: "经济金融建模<br>实验教学系统"
}, },
{ {
id: 6, id: 6,
imgSrc: require('@/assets/img/station8.png'), imgSrc: require("@/assets/img/station8.png"),
name: '金融随机过程<br>实验教学系统' name: "金融随机过程<br>实验教学系统"
}, { }, {
id: 7, id: 7,
imgSrc: require('@/assets/img/station9.png'), imgSrc: require("@/assets/img/station9.png"),
name: '量化投资策略建模<br>实验教学系统' name: "量化投资策略建模<br>实验教学系统"
}, { }, {
id: 8, id: 8,
imgSrc: require('@/assets/img/station10.png'), imgSrc: require("@/assets/img/station10.png"),
name: '大数据分析<br>实验教学系统' name: "大数据分析<br>实验教学系统"
}] }]
: :
(Setting.isBeta ? [{ (Setting.isBeta ? [{
id: 1, id: 1,
imgSrc: require('@/assets/img/station1.png'), imgSrc: require("@/assets/img/station1.png"),
name: 'Python程序设计<br>教学系统' name: "Python程序设计<br>教学系统"
}, { }, {
id: 4, id: 4,
imgSrc: require('@/assets/img/station2.png'), imgSrc: require("@/assets/img/station2.png"),
name: '经济金融建模<br>实验教学系统' name: "经济金融建模<br>实验教学系统"
}, { }, {
id: 5, id: 5,
imgSrc: require('@/assets/img/station3.png'), imgSrc: require("@/assets/img/station3.png"),
name: 'Python可视化<br>实验教学系统' name: "Python可视化<br>实验教学系统"
}, { }, {
id: 6, id: 6,
imgSrc: require('@/assets/img/station8.png'), imgSrc: require("@/assets/img/station8.png"),
name: '金融随机过程<br>实验教学系统' name: "金融随机过程<br>实验教学系统"
}, { }, {
id: 7, id: 7,
imgSrc: require('@/assets/img/station9.png'), imgSrc: require("@/assets/img/station9.png"),
name: '量化投资策略建模<br>实验教学系统' name: "量化投资策略建模<br>实验教学系统"
}, { }, {
id: 8, id: 8,
imgSrc: require('@/assets/img/station10.png'), imgSrc: require("@/assets/img/station10.png"),
name: '大数据分析<br>实验教学系统' name: "大数据分析<br>实验教学系统"
}, { }, {
id: 9, id: 9,
imgSrc: require('@/assets/img/station11.png'), imgSrc: require("@/assets/img/station11.png"),
name: 'Python数据清洗<br>教学实验系统' name: "Python数据清洗<br>教学实验系统"
}, { }, {
id: 10, id: 10,
imgSrc: require('@/assets/img/station12.png'), imgSrc: require("@/assets/img/station12.png"),
name: 'Python数据采集(爬虫)<br>教学实验系统' name: "Python数据采集(爬虫)<br>教学实验系统"
}, { }, {
id: 21, id: 21,
imgSrc: require('@/assets/img/station4.png'), imgSrc: require("@/assets/img/station4.png"),
name: '数字货币交易' name: "数字货币交易"
}, },
{ {
id: 22, id: 22,
imgSrc: require('@/assets/img/station6.png'), imgSrc: require("@/assets/img/station6.png"),
name: '担保实训教学系统' name: "担保实训教学系统"
}, }
// { // {
@ -108,88 +109,52 @@ export default {
: :
[{ [{
id: 1, id: 1,
imgSrc: require('@/assets/img/station1.png'), imgSrc: require("@/assets/img/station1.png"),
name: 'Python程序设计<br>教学系统' name: "Python程序设计<br>教学系统"
}, { }, {
id: 4, id: 4,
imgSrc: require('@/assets/img/station2.png'), imgSrc: require("@/assets/img/station2.png"),
name: '经济金融建模<br>实验教学系统' name: "经济金融建模<br>实验教学系统"
}, { }, {
id: 5, id: 5,
imgSrc: require('@/assets/img/station3.png'), imgSrc: require("@/assets/img/station3.png"),
name: 'Python可视化<br>实验教学系统' name: "Python可视化<br>实验教学系统"
}, { }, {
id: 6, id: 6,
imgSrc: require('@/assets/img/station8.png'), imgSrc: require("@/assets/img/station8.png"),
name: '金融随机过程<br>实验教学系统' name: "金融随机过程<br>实验教学系统"
}, { }, {
id: 7, id: 7,
imgSrc: require('@/assets/img/station9.png'), imgSrc: require("@/assets/img/station9.png"),
name: '量化投资策略建模<br>实验教学系统' name: "量化投资策略建模<br>实验教学系统"
}, { }, {
id: 8, id: 8,
imgSrc: require('@/assets/img/station10.png'), imgSrc: require("@/assets/img/station10.png"),
name: '大数据分析<br>实验教学系统' name: "大数据分析<br>实验教学系统"
}, { }, {
id: 9, id: 9,
imgSrc: require('@/assets/img/station11.png'), imgSrc: require("@/assets/img/station11.png"),
name: 'Python数据清洗<br>教学实验系统' name: "Python数据清洗<br>教学实验系统"
}, { }, {
id: 10, id: 10,
imgSrc: require('@/assets/img/station12.png'), imgSrc: require("@/assets/img/station12.png"),
name: 'Python数据采集(爬虫)<br>教学实验系统' name: "Python数据采集(爬虫)<br>教学实验系统"
}]) }])
}; };
}, },
computed: { computed: {
...mapState('user', [ ...mapState("user", [
'userId','schoolId','studentId','roleId','userName' "userId", "schoolId", "studentId", "roleId", "userName"
]), ])
}, },
mounted() { mounted() {
util.getToken() util.getToken();
console.log(this.host,'host'); console.log(this.host, "host");
}, },
methods: { methods: {
goSubSystem(item){ goPreview(item) {
let host = this.host let systemName = item.name.replace("<br>","")
let href = '' this.$router.push(`/station/preview?systemId=${item.id}&systemName=${systemName}`);
let roleId = this.roleId == 4 ? 0 : 1
let userName = window.btoa(encodeURIComponent(this.userName))
let type = item.id
if(type == 1){
href = `${host}pyTrials/#/`
// if(process.env.NODE_ENV === 'development') href = 'http://120.78.198.231/'
}else if(type == 4){
href = `${host}pyFinance/#/`
}else if(type == 5){
href = `${host}pyProjects/#/`
}else if(type == 6){
href = `${host}pyRandom/#/`
}else if(type == 7){
href = `${host}pyQuantification/#/`
}else if(type == 8){
href = `${host}pyAnalysis/#/`
}else if(type == 9){
href = `${host}pyDataclean/#/`
}else if(type == 10){
href = `${host}pyAcquisition/#/`
}else if(type == 21){
window.open(`http://121.37.29.24:80/yyyflogin?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=3989a0ad671849b99dcbdcc208782333&caseId=9681f86902314b10bc752909121f9ab9&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=7ff5d4715b114b7398b6f26c20fac460`)
}else if(type == 22){
window.open(`https://danbao.czcyedu.com/#/loginFromYyyf?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=eb7d8355119d449184c548b07dc01ed9&caseId=1198241070647873538&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=faaedd82adb9444285a5785e4a3dd4f9`)
}
if(type != 21 && type != 22){
util.cookies.set("userId",this.userId)
util.cookies.set("studentId",this.studentId)
util.cookies.set("schoolId",this.schoolId)
util.cookies.set("assessmentId",'',-1)
util.cookies.set("projectId",'',-1)
util.cookies.set("startTime",'',-1)
util.cookies.set("stopTime",'',-1)
location.href = href
}
}, },
} }
}; };
@ -200,9 +165,11 @@ export default {
padding: 20px; padding: 20px;
background-color: #fff; background-color: #fff;
} }
/deep/ .el-card { /deep/ .el-card {
margin-bottom: 0; margin-bottom: 0;
} }
.search { .search {
position: relative; position: relative;
width: 30%; width: 30%;
@ -211,6 +178,7 @@ export default {
border: 1px solid #9076FF; border: 1px solid #9076FF;
border-right: 0; border-right: 0;
overflow: hidden; overflow: hidden;
input { input {
width: 100%; width: 100%;
height: 44px; height: 44px;
@ -222,6 +190,7 @@ export default {
outline: none !important; outline: none !important;
box-sizing: border-box; box-sizing: border-box;
} }
button { button {
position: absolute; position: absolute;
top: 0; top: 0;
@ -234,6 +203,7 @@ export default {
outline: none !important; outline: none !important;
} }
} }
.wrap { .wrap {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -247,25 +217,30 @@ export default {
margin: 20px; margin: 20px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
opacity: .9; opacity: .9;
} }
img { img {
width: 100px; width: 100px;
height: 100px; height: 100px;
margin: 0 auto 6px; margin: 0 auto 6px;
} }
.text { .text {
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
color: #333; color: #333;
} }
} }
&.isHh { &.isHh {
.item { .item {
width: 16%; width: 16%;
} }
} }
&.isOccu { &.isOccu {
.item { .item {
width: 21%; width: 21%;

@ -3,23 +3,23 @@
* 当传入的权限当前用户没有时会移除该组件 * 当传入的权限当前用户没有时会移除该组件
* 用例<Tag v-auth>text</Tag> <Tag v-auth="'user:'">text</Tag> * 用例<Tag v-auth>text</Tag> <Tag v-auth="'user:'">text</Tag>
* */ * */
import store from '@/store' import store from "@/store";
export default { export default {
inserted(el, binding, vnode) { inserted(el, binding, vnode) {
let btnText = '' let btnText = "";
if (binding.value) { if (binding.value) {
btnText = binding.value btnText = binding.value;
} else { } else {
btnText = `${vnode.context.$route.path}:${el.innerText}` btnText = `${vnode.context.$route.path}:${el.innerText}`;
} }
const btnPermissions = store.state.auth.btns const btnPermissions = store.state.auth.btns;
if (btnText && btnPermissions && btnPermissions.length) { if (btnText && btnPermissions && btnPermissions.length) {
const isPermission = btnPermissions.includes(btnText) const isPermission = btnPermissions.includes(btnText);
if (!isPermission) { if (!isPermission) {
el.parentNode && el.parentNode.removeChild(el) el.parentNode && el.parentNode.removeChild(el);
}
} }
} }
} }
};

@ -4,9 +4,9 @@
* 用例<Tag :default="val">text</Tag> <Tag>{{val | default}}</Tag> * 用例<Tag :default="val">text</Tag> <Tag>{{val | default}}</Tag>
* */ * */
const defaultShow = (val) => { const defaultShow = (val) => {
return val == null ? '--' : val return val == null ? "--" : val;
} };
module.exports = { module.exports = {
defaultShow defaultShow
} };

@ -2,13 +2,13 @@
* 插件 * 插件
* */ * */
import directiveAuth from '@/plugins/auth'; import directiveAuth from "@/plugins/auth";
import throttle from '@/plugins/throttle'; import throttle from "@/plugins/throttle";
export default { export default {
async install(Vue, options) { async install(Vue, options) {
// 指令 // 指令
Vue.directive('auth', directiveAuth); Vue.directive("auth", directiveAuth);
Vue.directive('throttle', throttle); Vue.directive("throttle", throttle);
}
} }
};

@ -1,43 +1,43 @@
import axios from 'axios' import axios from "axios";
import util from '@/libs/util' import util from "@/libs/util";
import router from '@/router/index' import router from "@/router/index";
import Setting from '@/setting' import Setting from "@/setting";
const service = axios.create({ const service = axios.create({
baseURL: Setting.apiBaseURL, baseURL: Setting.apiBaseURL,
timeout: 10000000 timeout: 10000000
}) });
// post请求头 // post请求头
service.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8' service.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8";
// 请求拦截器 // 请求拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
util.getToken() util.getToken();
let token = util.local.get(Setting.tokenKey) let token = util.local.get(Setting.tokenKey);
if(token) config.headers.token = token if (token) config.headers.token = token;
return config return config;
}, err => { }, err => {
util.errorMsg({ util.errorMsg({
message: '退出登陆', message: "退出登陆",
onClose: function() { onClose: function() {
router.push({name: '/login'}) router.push({ name: "/login" });
} }
}) });
return Promise.reject(err) return Promise.reject(err);
}) });
// 响应拦截器 // 响应拦截器
service.interceptors.response.use( service.interceptors.response.use(
response => { response => {
const res = response.data const res = response.data;
if (res.status == 200 || res.status == 10000) { if (res.status == 200 || res.status == 10000) {
return Promise.resolve(res).catch(e => {}) return Promise.resolve(res).catch(e => {});
} else if (!res.status) { } else if (!res.status) {
return Promise.resolve(res).catch(e => {}) return Promise.resolve(res).catch(e => {});
} else { } else {
util.errorMsg(res.errmessage) util.errorMsg(res.errmessage || res.message);
return Promise.reject(res) return Promise.resolve(res).catch(e => {});
} }
}, },
// 服务器状态码不是200的情况 // 服务器状态码不是200的情况
@ -48,51 +48,51 @@ service.interceptors.response.use(
// 未登录则跳转登录页面,并携带当前页面的路径 // 未登录则跳转登录页面,并携带当前页面的路径
// 在登录成功后返回当前页面,这一步需要在登录页操作。 // 在登录成功后返回当前页面,这一步需要在登录页操作。
case 401: case 401:
util.local.remove(Setting.storeKey) util.local.remove(Setting.storeKey);
util.local.remove(Setting.tokenKey) util.local.remove(Setting.tokenKey);
util.errorMsg('登录过期,请重新登录') util.errorMsg("登录过期,请重新登录");
setTimeout(() => { setTimeout(() => {
router.replace({ router.replace({
path: '/login', path: "/login",
query: { query: {
redirect: router.currentRoute.fullPath redirect: router.currentRoute.fullPath
} }
}) });
}, 1000) }, 1000);
break break;
case 500: case 500:
util.errorMsg('网络错误') util.errorMsg("网络错误");
break break;
// 403 token过期 // 403 token过期
// 登录过期对用户进行提示 // 登录过期对用户进行提示
// 清除本地token和清空vuex中token对象 // 清除本地token和清空vuex中token对象
// 跳转登录页面 // 跳转登录页面
case 403: case 403:
util.local.remove(Setting.storeKey) util.local.remove(Setting.storeKey);
util.local.remove(Setting.tokenKey) util.local.remove(Setting.tokenKey);
util.errorMsg('登录过期,请重新登录') util.errorMsg("登录过期,请重新登录");
// 清除token // 清除token
// store.commit('loginSuccess', null); // store.commit('loginSuccess', null);
// 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面 // 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面
setTimeout(() => { setTimeout(() => {
router.replace({ router.replace({
path: '/login', path: "/login",
query: { query: {
redirect: router.currentRoute.fullPath redirect: router.currentRoute.fullPath
} }
}) });
}, 1000) }, 1000);
break break;
// 404请求不存在 // 404请求不存在
case 404: case 404:
util.errorMsg('网络请求不存在!') util.errorMsg("网络请求不存在!");
break break;
// 其他错误,直接抛出错误提示 // 其他错误,直接抛出错误提示
default: default:
util.errorMsg(error.response.data.message) util.errorMsg(error.response.data.message);
Promise.reject(res) Promise.reject(res);
} }
return Promise.reject(error.response) return Promise.reject(error.response);
} }
} }
); );
@ -100,21 +100,21 @@ service.interceptors.response.use(
function get(url, params) { function get(url, params) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
service.get(url, { params: params }).then(res => { service.get(url, { params: params }).then(res => {
resolve(res) resolve(res);
}).catch(err => { }).catch(err => {
reject(err) reject(err);
}) });
}) });
} }
function post(url, params) { function post(url, params) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
service.post(url, params).then(res => { service.post(url, params).then(res => {
resolve(res) resolve(res);
}).catch(err => { }).catch(err => {
reject(err.data) reject(err.data);
}) });
}) });
} }
function del(url, params) { function del(url, params) {
@ -122,20 +122,21 @@ function del(url, params){
service.delete(url, { service.delete(url, {
params params
}).then(res => { }).then(res => {
resolve(res) resolve(res);
}).catch(err => { }).catch(err => {
reject(err.data) reject(err.data);
}) });
}) });
} }
function put(url, params) { function put(url, params) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
service.put(url, params).then(res => { service.put(url, params).then(res => {
resolve(res) resolve(res);
}).catch(err => { }).catch(err => {
reject(err.data) reject(err.data);
}) });
}) });
} }
export { get,post,del,put }
export { get, post, del, put };

@ -6,13 +6,13 @@
export default { export default {
inserted(el, binding, vnode) { inserted(el, binding, vnode) {
el.addEventListener('click', () => { el.addEventListener("click", () => {
if (!el.disabled) { if (!el.disabled) {
el.disabled = true el.disabled = true;
setTimeout(() => { setTimeout(() => {
el.disabled = false el.disabled = false;
}, binding.value || 1000) }, binding.value || 1000);
}
})
} }
});
} }
};

@ -1,22 +1,22 @@
import Vue from 'vue' import Vue from "vue";
import Router from 'vue-router' import Router from "vue-router";
import routes from './routes' import routes from "./routes";
import Setting from '@/setting' import Setting from "@/setting";
Vue.use(Router) Vue.use(Router);
const createRouter = () => new Router({ const createRouter = () => new Router({
mode: Setting.routerMode, mode: Setting.routerMode,
    base: process.env.BASE_URL, base: process.env.BASE_URL,
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes routes
}) });
export function resetRouter() { export function resetRouter() {
const newRouter = createRouter() const newRouter = createRouter();
router.matcher = newRouter.matcher router.matcher = newRouter.matcher;
} }
let router = createRouter() let router = createRouter();
export default router export default router;

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home' import BasicLayout from "@/layouts/home";
const meta = {} const meta = {};
const pre = 'ass-' const pre = "ass-";
export default { export default {
path: '/ass', path: "/ass",
name: 'ass', name: "ass",
redirect: { redirect: {
name: `${pre}list` name: `${pre}list`
}, },
@ -16,8 +16,8 @@ export default {
{ {
name: `${pre}list`, name: `${pre}list`,
path: `list`, path: `list`,
component: () => import('@/pages/ass/list'), component: () => import("@/pages/ass/list"),
meta: { title: '考核列表' } meta: { title: "考核列表" }
}, }
] ]
}; };

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home'; import BasicLayout from "@/layouts/home";
const meta = {}; const meta = {};
const pre = 'index-'; const pre = "index-";
export default { export default {
path: '/index', path: "/index",
name: 'index', name: "index",
redirect: { redirect: {
name: `${pre}list` name: `${pre}list`
}, },
@ -16,8 +16,8 @@ export default {
{ {
name: `${pre}list`, name: `${pre}list`,
path: `list`, path: `list`,
component: () => import('@/pages/index/list'), component: () => import("@/pages/index/list"),
meta: { title: '首页' } meta: { title: "首页" }
}, }
] ]
}; };

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home' import BasicLayout from "@/layouts/home";
const meta = {} const meta = {};
const pre = 'preview-' const pre = "preview-";
export default { export default {
path: '/preview', path: "/preview",
name: 'preview', name: "preview",
redirect: { redirect: {
name: `${pre}list` name: `${pre}list`
}, },
@ -16,8 +16,8 @@ export default {
{ {
name: `${pre}list`, name: `${pre}list`,
path: `list`, path: `list`,
component: () => import('@/pages/preview/list'), component: () => import("@/pages/preview/list"),
meta: { title: '课前预习' } meta: { title: "课前预习" }
}, }
] ]
}; };

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home' import BasicLayout from "@/layouts/home";
const meta = {} const meta = {};
const pre = 'record-' const pre = "record-";
export default { export default {
path: '/record', path: "/record",
name: 'record', name: "record",
redirect: { redirect: {
name: `${pre}list` name: `${pre}list`
}, },
@ -16,13 +16,20 @@ export default {
{ {
name: `${pre}list`, name: `${pre}list`,
path: `list`, path: `list`,
component: () => import('@/pages/record/list'), component: () => import("@/pages/record/list"),
meta: { title: '实验记录' } meta: { title: "实验记录" }
},{ },
{
name: `${pre}details`,
path: `details`,
component: () => import("@/pages/record/details"),
meta: { title: "实验情况" }
},
{
name: `${pre}show`, name: `${pre}show`,
path: `show`, path: `show`,
component: () => import('@/pages/record/show'), component: () => import("@/pages/record/show"),
meta: { title: '查看报告' } meta: { title: "查看报告" }
}, }
] ]
}; };

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home' import BasicLayout from "@/layouts/home";
const meta = {} const meta = {};
const pre = 'setting-' const pre = "setting-";
export default { export default {
path: '/setting', path: "/setting",
name: 'setting', name: "setting",
redirect: { redirect: {
name: `${pre}person` name: `${pre}person`
}, },
@ -16,8 +16,8 @@ export default {
{ {
name: `${pre}person`, name: `${pre}person`,
path: `person`, path: `person`,
component: () => import('@/pages/setting/person'), component: () => import("@/pages/setting/person"),
meta: { title: '个人中心' } meta: { title: "个人中心" }
}, }
] ]
}; };

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home' import BasicLayout from "@/layouts/home";
const meta = {} const meta = {};
const pre = 'station-' const pre = "station-";
export default { export default {
path: '/station', path: "/station",
name: 'station', name: "station",
redirect: { redirect: {
name: `${pre}list` name: `${pre}list`
}, },
@ -16,8 +16,14 @@ export default {
{ {
name: `${pre}list`, name: `${pre}list`,
path: `list`, path: `list`,
component: () => import('@/pages/station/list'), component: () => import("@/pages/station/list"),
meta: { title: '实验台' } meta: { title: "实验台" }
}, },
{
name: `${pre}preview`,
path: `preview`,
component: () => import("@/pages/station/preview"),
meta: { title: "课程预览" }
}
] ]
}; };

@ -1,27 +1,27 @@
import router from './index' import router from "./index";
import Setting from '@/setting' import Setting from "@/setting";
import util from '@/libs/util' import util from "@/libs/util";
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
document.title = Setting.titleSuffix document.title = Setting.titleSuffix;
const role = util.local.get(Setting.tokenKey) const role = util.local.get(Setting.tokenKey);
if (!role && to.path !== '/login') { if (!role && to.path !== "/login") {
next('/login') next("/login");
} else if(role && to.path == '/login') { } else if (role && to.path == "/login") {
next('/index') next("/index");
} else { } else {
let mg = from.query.mg let mg = from.query.mg;
if (mg) { if (mg) {
if (!to.query.mg) { if (!to.query.mg) {
next({ next({
path: to.path, path: to.path,
query: { mg } query: { mg }
}) });
} else { } else {
next() next();
} }
} else { } else {
next() next();
} }
} }
}); });

@ -1,34 +1,40 @@
import index from './modules/index' import index from "./modules/index";
import preview from './modules/preview' import appraisal from "./modules/appraisal";
import station from './modules/station' import station from "./modules/station";
import ass from './modules/ass' import ass from "./modules/ass";
import record from './modules/record' import record from "./modules/record";
import setting from './modules/setting' import setting from "./modules/setting";
import course from "./modules/course";
import info from "./modules/info";
import match from "./modules/match";
import BasicLayout from '@/layouts/home' import BasicLayout from "@/layouts/home";
const frameIn = [ const frameIn = [
{ {
path: '/', path: "/",
redirect: '/login', redirect: "/login"
}, },
{ {
path: '/index', path: "/index",
redirect: '/preview', redirect: "/appraisal"
}, },
{ {
path: '/', path: "/",
component: () => BasicLayout, component: () => BasicLayout,
meta: { title: '首页' }, meta: { title: "首页" },
children: [] children: []
}, },
index, index,
preview, appraisal,
station, station,
ass, ass,
record, record,
setting setting,
] course,
info,
match
];
/** /**
* 在主框架之外显示 * 在主框架之外显示
@ -37,12 +43,12 @@ const frameIn = [
const frameOut = [ const frameOut = [
// 登录 // 登录
{ {
path: '/login', path: "/login",
name: 'login', name: "login",
meta: { meta: {
title: '登录' title: "登录"
}, },
component: () => import('@/pages/account/login') component: () => import("@/pages/account/login")
} }
]; ];
@ -52,20 +58,20 @@ const frameOut = [
const errorPage = [ const errorPage = [
{ {
path: '/403', path: "/403",
name: '403', name: "403",
meta: { meta: {
title: '403' title: "403"
}, },
component: () => import('@/pages/exception/error/403') component: () => import("@/pages/exception/error/403")
}, },
{ {
path: '*', path: "*",
name: '404', name: "404",
meta: { meta: {
title: '404' title: "404"
}, },
component: () => import('@/pages/exception/error/404') component: () => import("@/pages/exception/error/404")
} }
]; ];

@ -8,14 +8,14 @@ const Setting = {
// 是否使用 Mock 的数据,默认 开发环境为 true,生产环境为 false // 是否使用 Mock 的数据,默认 开发环境为 true,生产环境为 false
isMock: true, isMock: true,
// 部署应用包时的基本 URL // 部署应用包时的基本 URL
publicPath: env === 'development' ? './' : '', publicPath: env === "development" ? "./" : "",
// 生产环境构建文件的目录名 // 生产环境构建文件的目录名
outputDir: 'dist', outputDir: "dist",
// 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。 // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。
assetsDir: 'static', assetsDir: "static",
// 开发环境每次保存时 lint 代码,会将 lint 错误输出为编译警告 // 开发环境每次保存时 lint 代码,会将 lint 错误输出为编译警告
// true || false || error // true || false || error
lintOnSave: true, lintOnSave: true
}; };
module.exports = Setting; module.exports = Setting;

@ -2,23 +2,23 @@
* 业务配置 * 业务配置
* */ * */
const isDev = process.env.NODE_ENV === 'development' const isDev = process.env.NODE_ENV === "development";
const url = location.host const url = location.host;
const isHh = url.includes('10.196.131.73') //是否是河海版本 const isHh = url.includes("10.196.131.73"); //是否是河海版本
const isBeta = isDev || url.includes('120.78.198.231') //是否是职站测试 const isBeta = isDev || url.includes("120.78.198.231"); //是否是职站测试
const Setting = { const Setting = {
/** /**
* 基础配置 * 基础配置
* */ * */
// 网页标题的后缀 // 网页标题的后缀
titleSuffix: isHh ? '学生端' : '职站', titleSuffix: isHh ? "学生端" : "职站",
// 路由模式,可选值为 history 或 hash // 路由模式,可选值为 history 或 hash
routerMode: 'hash', routerMode: "hash",
// 页面切换时,是否显示模拟的进度条 // 页面切换时,是否显示模拟的进度条
showProgressBar: true, showProgressBar: true,
// 接口请求地址 // 接口请求地址
apiBaseURL: (isBeta) ? 'http://120.78.198.231/' : (isHh ? 'http://10.196.131.73/' : 'http://www.occupationlab.com/'), apiBaseURL: (isBeta) ? "http://120.78.198.231/" : (isHh ? "http://10.196.131.73/" : "http://www.occupationlab.com/"),
// 是否是河海版本 // 是否是河海版本
isHh, isHh,
// 是否职站测试服 // 是否职站测试服
@ -26,7 +26,7 @@ const Setting = {
// 学校id,河海为729,职站为2105 // 学校id,河海为729,职站为2105
schoolId: isHh ? 729 : 2105, schoolId: isHh ? 729 : 2105,
// 测评做完后跳转的默认子系统 // 测评做完后跳转的默认子系统
defaultSubSystem: (isBeta) ? 'http://120.78.198.231/pyTrials/#/' : (isHh ? 'http://10.196.131.73/pyTrials/#/' : 'http://www.occupationlab.com/pyTrials/#/'), defaultSubSystem: (isBeta) ? "http://120.78.198.231/pyTrials/#/" : (isHh ? "http://10.196.131.73/pyTrials/#/" : "http://www.occupationlab.com/pyTrials/#/"),
// 默认系统id // 默认系统id
systemId: 1, systemId: 1,
// 子系统列表.改的时候留意要改的是哪个环境,别影响到了其他环境 // 子系统列表.改的时候留意要改的是哪个环境,别影响到了其他环境
@ -35,26 +35,26 @@ const Setting = {
// 河海版 // 河海版
? [{ ? [{
id: 1, id: 1,
label: 'Python程序设计教学系统' label: "Python程序设计教学系统"
}, { }, {
id: 4, id: 4,
label: '经济金融建模实验教学系统' label: "经济金融建模实验教学系统"
}, { }, {
id: 6, id: 6,
label: '金融随机过程实验教学系统' label: "金融随机过程实验教学系统"
}, { }, {
id: 7, id: 7,
label: '量化投资策略建模实验教学系统' label: "量化投资策略建模实验教学系统"
}, { }, {
id: 8, id: 8,
label: '大数据分析实验教学系统' label: "大数据分析实验教学系统"
}] }]
// 职站测试服 // 职站测试服
: (isBeta : (isBeta
? [{ ? [{
id: 1, id: 1,
label: 'Python程序设计教学系统' label: "Python程序设计教学系统"
} }
// 下面这两个是川大和科大子系统,目前没有在职站开启,只有在科大川大才会开放对应的子系统 // 下面这两个是川大和科大子系统,目前没有在职站开启,只有在科大川大才会开放对应的子系统
// ,{ // ,{
@ -66,59 +66,59 @@ const Setting = {
// } // }
, { , {
id: 4, id: 4,
label: '经济金融建模实验教学系统' label: "经济金融建模实验教学系统"
}, { }, {
id: 5, id: 5,
label: 'Python可视化实验教学系统' label: "Python可视化实验教学系统"
}, { }, {
id: 6, id: 6,
label: '金融随机过程实验教学系统' label: "金融随机过程实验教学系统"
}, { }, {
id: 7, id: 7,
label: '量化投资策略建模实验教学系统' label: "量化投资策略建模实验教学系统"
}, { }, {
id: 8, id: 8,
label: '大数据分析实验教学系统' label: "大数据分析实验教学系统"
}, { }, {
id: 9, id: 9,
label: 'Python数据清洗教学实验系统' label: "Python数据清洗教学实验系统"
}, { }, {
id: 10, id: 10,
label: 'Python数据采集(爬虫)教学实验系统' label: "Python数据采集(爬虫)教学实验系统"
}] }]
// 职站正式服 // 职站正式服
: [{ : [{
id: 1, id: 1,
label: 'Python程序设计教学系统' label: "Python程序设计教学系统"
}, { }, {
id: 4, id: 4,
label: '经济金融建模实验教学系统' label: "经济金融建模实验教学系统"
}, { }, {
id: 5, id: 5,
label: 'Python可视化实验教学系统' label: "Python可视化实验教学系统"
}, { }, {
id: 6, id: 6,
label: '金融随机过程实验教学系统' label: "金融随机过程实验教学系统"
}, { }, {
id: 7, id: 7,
label: '量化投资策略建模实验教学系统' label: "量化投资策略建模实验教学系统"
}, { }, {
id: 8, id: 8,
label: '大数据分析实验教学系统' label: "大数据分析实验教学系统"
}, { }, {
id: 9, id: 9,
label: 'Python数据清洗教学实验系统' label: "Python数据清洗教学实验系统"
}, { }, {
id: 10, id: 10,
label: 'Python数据采集(爬虫)教学实验系统' label: "Python数据采集(爬虫)教学实验系统"
}]), }]),
// 长时间未操作,自动退出登录时间 // 长时间未操作,自动退出登录时间
autoLogoutTime: 3600000, autoLogoutTime: 3600000,
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3, modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
errorModalType: 'Message', errorModalType: "Message",
// Cookies 默认保存时间,单位:天 // Cookies 默认保存时间,单位:天
cookiesExpires: 1, cookiesExpires: 1,
// token在localStorage的时间(毫秒) // token在localStorage的时间(毫秒)
@ -126,37 +126,35 @@ const Setting = {
/** /**
* localStorage里保存的token的key * localStorage里保存的token的key
*/ */
tokenKey: 'oc_client_token', tokenKey: "oc_client_token",
/** /**
* localStorage里保存的vuex的key * localStorage里保存的vuex的key
*/ */
storeKey: 'oc_client_store', storeKey: "oc_client_store",
/** /**
* 默认密码 * 默认密码
*/ */
initialPassword: '111aaa', initialPassword: "111aaa",
/** /**
* 多语言配置 * 多语言配置
* */ * */
i18n: { i18n: {
// 默认语言 // 默认语言
default: 'zh', default: "zh",
// 是否根据用户电脑配置自动设置语言(仅第一次有效) // 是否根据用户电脑配置自动设置语言(仅第一次有效)
auto: false auto: false
}, },
/** /**
* 布局配置 * 布局配置
* */ * */
layout: { layout: {},
},
/** /**
* 功能配置 * 功能配置
* */ * */
// 相同路由,不同参数间进行切换,是否强力更新 // 相同路由,不同参数间进行切换,是否强力更新
sameRouteForceUpdate: false, sameRouteForceUpdate: false,
// 是否使用动态路由 // 是否使用动态路由
dynamicRoute: false, dynamicRoute: false
}; };
export default Setting; export default Setting;

@ -1,4 +1,2 @@
const getters = { const getters = {};
export default getters;
}
export default getters

@ -1,25 +1,25 @@
import Vue from 'vue'; import Vue from "vue";
import Vuex from 'vuex'; import Vuex from "vuex";
import getters from './getters' import getters from "./getters";
Vue.use(Vuex); Vue.use(Vuex);
// https://webpack.js.org/guides/dependency-management/#requirecontext // https://webpack.js.org/guides/dependency-management/#requirecontext
const modulesFiles = require.context('./modules', true, /\.js$/) const modulesFiles = require.context("./modules", true, /\.js$/);
// you do not need `import app from './modules/app'` // you do not need `import app from './modules/app'`
// it will auto require all vuex module from modules file // it will auto require all vuex module from modules file
const modules = modulesFiles.keys().reduce((modules, modulePath) => { const modules = modulesFiles.keys().reduce((modules, modulePath) => {
// set './app.js' => 'app' // set './app.js' => 'app'
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1') const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, "$1");
const value = modulesFiles(modulePath) const value = modulesFiles(modulePath);
modules[moduleName] = value.default modules[moduleName] = value.default;
return modules return modules;
}, {}) }, {});
const store = new Vuex.Store({ const store = new Vuex.Store({
modules, modules,
getters getters
}) });
export default store export default store;

@ -4,8 +4,8 @@
// 是否IE // 是否IE
function isIE() { function isIE() {
if (!!window.ActiveXObject || "ActiveXObject" in window) return true if (!!window.ActiveXObject || "ActiveXObject" in window) return true;
return false return false;
} }
export default { export default {
@ -15,10 +15,8 @@ export default {
}, },
mutations: { mutations: {
SET_IE: (state, val) => { SET_IE: (state, val) => {
state.isIE = val state.isIE = val;
},
},
actions: {
}
} }
},
actions: {}
};

@ -5,22 +5,22 @@
namespaced: true, namespaced: true,
state: { state: {
lastSystemId: 1, lastSystemId: 1,
lastRecordType: 'practice' lastRecordType: "practice"
}, },
mutations: { mutations: {
SET_SYSTEM_ID: (state, systemId) => { SET_SYSTEM_ID: (state, systemId) => {
state.lastSystemId = systemId state.lastSystemId = systemId;
}, },
SET_RECORD: (state, type) => { SET_RECORD: (state, type) => {
state.lastRecordType = type state.lastRecordType = type;
}, }
}, },
actions: { actions: {
setSystemId({ state, commit }, systemId) { setSystemId({ state, commit }, systemId) {
commit('SET_SYSTEM_ID',systemId) commit("SET_SYSTEM_ID", systemId);
}, },
setRecord({ state, commit }, type) { setRecord({ state, commit }, type) {
commit('SET_RECORD',type) commit("SET_RECORD", type);
},
} }
} }
};

@ -1,9 +1,8 @@
import Setting from "@/setting";
import Setting from '@/setting' import util from "@/libs/util";
import util from '@/libs/util' import { post, get, del, put } from "@/plugins/requests/index.js";
import {post,get,del,put} from '@/plugins/requests/index.js' import api from "@/api";
import api from '@/api' import addRoutes from "@/libs/route/addRoutes";
import addRoutes from '@/libs/route/addRoutes'
/** /**
* 用户信息 * 用户信息
@ -11,72 +10,72 @@ import addRoutes from '@/libs/route/addRoutes'
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png', avatar: "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
userId: '', userId: "",
studentId: '', studentId: "",
userName: '', userName: "",
schoolId: '', schoolId: "",
roleId: '', roleId: "",
dataTime: '' dataTime: ""
}, },
mutations: { mutations: {
SET_INFO: (state, info) => { SET_INFO: (state, info) => {
if(info.avatar) state.avatar = info.avatar if (info.avatar) state.avatar = info.avatar;
state.userId = info.userId state.userId = info.userId;
state.studentId = info.studentId state.studentId = info.studentId;
state.schoolId = info.schoolId state.schoolId = info.schoolId;
state.userName = info.userName state.userName = info.userName;
state.roleId = info.roleId state.roleId = info.roleId;
state.dataTime = info.dataTime state.dataTime = info.dataTime;
}, },
SET_AVATAR: (state, avatar) => { SET_AVATAR: (state, avatar) => {
state.avatar = avatar state.avatar = avatar;
}, },
SET_USERNAME: (state, userName) => { SET_USERNAME: (state, userName) => {
state.userName = userName state.userName = userName;
}, }
}, },
actions: { actions: {
login({ state, commit }, userInfo) { login({ state, commit }, userInfo) {
const { account, password, source } = userInfo
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
get(api.logins,{ post(api.logins, userInfo).then(res => {
account, console.log(JSON.stringify(res));
password,
source,
}).then(res => {
if (res.status == 200) { if (res.status == 200) {
let data = res.message.retvalue let { data } = res;
res.message.listValue && Setting.dynamicRoute && addRoutes(res.message.listValue) // 生成路由权限
util.local.set(Setting.tokenKey,data.token,Setting.tokenExpires) // 每个系统都是用这套角色权限代码的,后端也是基本一样,除了个别字段可能会不一样
util.successMsg('登录成功') // 总体来说就两个步骤: 1是生成能够访问的路由的数组集合,2是生成能看到的按钮的数组集合
commit('SET_INFO',data) //res.message.listValue && Setting.dynamicRoute && addRoutes(res.message.listValue)
resolve() util.local.set(Setting.tokenKey, data.token, Setting.tokenExpires);
util.successMsg("登录成功");
console.log(data, "登录保存的数据");
commit("SET_INFO", data);
resolve();
} else { } else {
util.errorMsg(res.errmessage) util.errorMsg(res.errmessage || res.message);
reject(res) reject(res);
} }
}).catch(error => { }).catch(error => {
reject(error) reject(error);
}) });
}) });
}, },
logout({ commit, state, dispatch }) { logout({ commit, state, dispatch }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
util.local.remove(Setting.storeKey) util.local.remove(Setting.storeKey);
util.local.remove(Setting.tokenKey) util.local.remove(Setting.tokenKey);
location.reload() location.reload();
resolve() resolve();
}) });
}, },
setAvatar({ state, commit }, avatar) { setAvatar({ state, commit }, avatar) {
commit('SET_AVATAR',avatar) commit("SET_AVATAR", avatar);
}, },
setInfo({ state, commit }, info) { setInfo({ state, commit }, info) {
commit('SET_INFO',info) commit("SET_INFO", info);
}, },
setUserName({ state, commit }, userName) { setUserName({ state, commit }, userName) {
commit('SET_USERNAME',userName) commit("SET_USERNAME", userName);
},
} }
} }
};

@ -19,6 +19,7 @@
width: 8px; width: 8px;
height: 8px; height: 8px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
width: 5px; width: 5px;
border-radius: 6px; border-radius: 6px;
@ -44,10 +45,12 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
flex: 1; flex: 1;
li { li {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
margin-right: 30px; margin-right: 30px;
label { label {
margin-right: 10px; margin-right: 10px;
font-size: 14px; font-size: 14px;
@ -55,19 +58,23 @@
color: rgba(0, 0, 0, .65); color: rgba(0, 0, 0, .65);
white-space: nowrap; white-space: nowrap;
} }
.el-radio { .el-radio {
margin-right: 10px !important; margin-right: 10px !important;
.el-radio__input { .el-radio__input {
display: none !important; display: none !important;
} }
} }
} }
} }
.page { .page {
position: relative; position: relative;
padding: 24px; padding: 24px;
background-color: #fff; background-color: #fff;
border-radius: 8px; border-radius: 8px;
.tool { .tool {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -77,15 +84,18 @@
dl { dl {
display: flex; display: flex;
line-height: 30px; line-height: 30px;
dt { dt {
color: rgba(0, 0, 0, .65); color: rgba(0, 0, 0, .65);
font-size: 14px; font-size: 14px;
white-space: nowrap; white-space: nowrap;
} }
dd { dd {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
span { span {
padding: 0 10px; padding: 0 10px;
margin: 0 10px; margin: 0 10px;
@ -95,9 +105,11 @@
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
color: $--color-primary; color: $--color-primary;
} }
&.active { &.active {
border-radius: 4px; border-radius: 4px;
color: #fff; color: #fff;
@ -113,15 +125,18 @@
.pagination { .pagination {
margin: 20px 0; margin: 20px 0;
text-align: center; text-align: center;
button, .number { button, .number {
color: rgba(0, 0, 0, .65) !important; color: rgba(0, 0, 0, .65) !important;
background-color: transparent !important; background-color: transparent !important;
border: 1px solid rgba(0, 0, 0, 0.15) !important; border: 1px solid rgba(0, 0, 0, 0.15) !important;
border-radius: 4px !important; border-radius: 4px !important;
} }
button i { button i {
color: #333; color: #333;
} }
.active { .active {
color: #fff !important; color: #fff !important;
background-color: $--color-primary !important; background-color: $--color-primary !important;
@ -132,12 +147,15 @@
border-radius: 8px; border-radius: 8px;
border: 1px solid rgba(0, 0, 0, 0.06); border: 1px solid rgba(0, 0, 0, 0.06);
border-bottom: 0; border-bottom: 0;
th { th {
background: $--color-primary !important; background: $--color-primary !important;
.cell { .cell {
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;
font-weight: normal; font-weight: normal;
.el-checkbox { .el-checkbox {
&:before { &:before {
opacity: 1; opacity: 1;
@ -149,27 +167,34 @@
.el-message { .el-message {
padding: 11px 20px; padding: 11px 20px;
.el-message__icon { .el-message__icon {
font-size: 16px; font-size: 16px;
} }
.el-message__content { .el-message__content {
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
.el-icon-close { .el-icon-close {
font-size: 14px; font-size: 14px;
color: #92998d; color: #92998d;
} }
.el-message--success { .el-message--success {
border: 1px solid #B7EB8F; border: 1px solid #B7EB8F;
background: #F6FFED; background: #F6FFED;
.el-message__icon { .el-message__icon {
color: #00c700; color: #00c700;
} }
} }
.el-message--warning { .el-message--warning {
border: 1px solid #FFE58F; border: 1px solid #FFE58F;
background: #FFFBE6; background: #FFFBE6;
.el-message__icon { .el-message__icon {
color: #ffa900; color: #ffa900;
} }
@ -178,32 +203,40 @@
.el-message-box { .el-message-box {
padding-bottom: 24px; padding-bottom: 24px;
.el-message-box__header { .el-message-box__header {
padding: 32px 32px 12px 50px; padding: 32px 32px 12px 50px;
span { span {
font-size: 16px; font-size: 16px;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
font-weight: 500; font-weight: 500;
} }
} }
.el-message-box__status { .el-message-box__status {
top: -30px; top: -30px;
} }
.el-message-box__status + .el-message-box__message { .el-message-box__status + .el-message-box__message {
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
.el-message-box__btns { .el-message-box__btns {
padding-right: 32px; padding-right: 32px;
&.el-icon-warning { &.el-icon-warning {
color: #ffa900; color: #ffa900;
} }
} }
&:not(.normal) { &:not(.normal) {
.el-button--primary { .el-button--primary {
color: #606266; color: #606266;
background: #fff; background: #fff;
border-color: #DCDFE6; border-color: #DCDFE6;
&:hover { &:hover {
color: $--color-primary; color: $--color-primary;
border-color: #efbdbb; border-color: #efbdbb;
@ -216,16 +249,20 @@
.el-dialog__wrapper { .el-dialog__wrapper {
.el-dialog { .el-dialog {
border-radius: 4px; border-radius: 4px;
.el-dialog__header { .el-dialog__header {
border-bottom: 1px solid rgba(0, 0, 0, 0.06); border-bottom: 1px solid rgba(0, 0, 0, 0.06);
.el-dialog__title { .el-dialog__title {
font-size: 16px; font-size: 16px;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
} }
} }
.el-dialog__footer { .el-dialog__footer {
padding: 10px 16px; padding: 10px 16px;
border-top: 1px solid rgba(0, 0, 0, 0.06); border-top: 1px solid rgba(0, 0, 0, 0.06);
.el-button { .el-button {
font-size: 14px; font-size: 14px;
border-radius: 4px; border-radius: 4px;
@ -246,3 +283,19 @@
} }
} }
} }
.empty{
display: flex;
justify-content: center;
align-items: center;
padding: 50px 0;
text-align: center;
img{
width: 471px;
}
p{
margin-top: 40px;
font-size: 18px;
color: rgba(0, 0, 0, 0.25);
}
}

@ -3,7 +3,8 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>IconFont Demo</title> <title>IconFont Demo</title>
<link rel="shortcut icon" href="https://img.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/> <link rel="shortcut icon" href="https://img.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico"
type="image/x-icon" />
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css"> <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
<link rel="stylesheet" href="demo.css"> <link rel="stylesheet" href="demo.css">
<link rel="stylesheet" href="iconfont.css"> <link rel="stylesheet" href="iconfont.css">
@ -23,7 +24,8 @@
<li class="dib"><span>Symbol</span></li> <li class="dib"><span>Symbol</span></li>
</ul> </ul>
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=1540265" target="_blank" class="nav-more">查看项目</a> <a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=1540265" target="_blank"
class="nav-more">查看项目</a>
</div> </div>
<div class="tab-container"> <div class="tab-container">
@ -425,22 +427,22 @@
</div> </div>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('.tab-container .content:first').show() $(".tab-container .content:first").show();
$('#tabs li').click(function (e) { $("#tabs li").click(function(e) {
var tabContent = $('.tab-container .content') var tabContent = $(".tab-container .content");
var index = $(this).index() var index = $(this).index();
if ($(this).hasClass('active')) { if ($(this).hasClass("active")) {
return return;
} else { } else {
$('#tabs li').removeClass('active') $("#tabs li").removeClass("active");
$(this).addClass('active') $(this).addClass("active");
tabContent.hide().eq(index).fadeIn() tabContent.hide().eq(index).fadeIn();
} }
}) });
}) });
</script> </script>
</body> </body>
</html> </html>

@ -1,10 +1,9 @@
@font-face {font-family: "iconfont"; @font-face {
font-family: "iconfont";
src: url('iconfont.eot?t=1589437921018'); /* IE9 */ src: url('iconfont.eot?t=1589437921018'); /* IE9 */
src: url('iconfont.eot?t=1589437921018#iefix') format('embedded-opentype'), /* IE6-IE8 */ src: url('iconfont.eot?t=1589437921018#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAdgAAsAAAAADwwAAAcTAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCESgqOeIt2ATYCJAM0CxwABCAFhG0HgTMbpQxRlHBSFNlX2JThXqSJ4cz0aLyxzNkVgYOP2N97wQhUeQbPDZA1QByDeHha+9+5M7PrD1FpdI8mCSqJLulDJPFDxCQTvUQS6Qtka3ukU0/kuK8wfBBwMr1kmeTIb8hUohVh6lTeCHDCrRPPf5v6f+sQfS+QqgmpiZLNw+ZI6zMXZGL3nXY47elJFnjALaE4zjzyjJN773yuzM/7H4oZ9NV+v/q1g1ddvP1QmE5JlPRM7uAv5klMk0vWTBWTLpoJEUIja6hWSkNhOklN/ds4n0BvhyLMuZ6hKdArLC1Q4a4iG0Gfi1JaHEMbXtfsW8S8SpsepzuAJ+HLx28hoSepMmvby3e6LdC2EN2eV0ykW36MR/MlQFiJjGNAEej7WvtLgB6aM6evXtwH1glnTloW1snRYnBhky+LxyuL9glaGNmaDbRsJYR1tl+seImrgUGtEtLc//GMeo1WR9QYfUSrp7nohWgXDRrJBqpBcoAqkGagAGkBSiADQBlkEKiAbAI/N/mCYHoWi1HDEgWoBbGjlg7M/OpbgEMgnUf0fxab8kjK0tvq8cZ6/dpKwk4bNsXFx4bHR4RHcty4LVnR4xp/2TFxDN42tgefhUpEMeeqppXCU50JyT/gkVCD+EiEgl56LOkMN+6cAfyKs3dvomHU7fvnq96Uc/duIXMMqWmhNRoax1m8jNWfPorp2jlqumvHrolfe/2TcuIPCt3K589dhUNiT5OSEh4KoM9Jp1vK2GMnFjDdyaeFMrd06ki1gn9CmEz3OErpebmp+GzyAN+lMLw6dwkKh6Ve5dOnzp4W0+Y25TTfhHB10isXpxIB5GHDKcggnof+NCpCD+okAFyTPNGuRVgahmhLjZo1rnqnMlpD0ORJSluuY6jT+gPWHtaIeDKOaoradNDPruOQzulPGcBtz0C2YdbLrSFPIMGTrcNRDGC3YnJOm1JLceYK2sCWY5lqxICXIEU0gki2nkPFUteBwoqLMyTdKE7ZlOzE3yHfdSyOU2shl8RoxPJlx1bQ6C0Li3DLg+Sdi+c5evEkhtF3rBdfXpe0IiNcfW27+x6u5U4vs8zZZdu1R7Gblyc6AV9OB4Xp65HRDqcvw0Pi1DGbddntOKzYgkbhXJq+Y4bRVqszl746KdRPFV5FxSUb6XmKomd1yCb0nJbpz+aOIZskx0phXx8sHfNKyRjPsM8LGU/xJ9Qrv2JugdVBkBg/ZpUIDvpN0jfHD550XPKNDgkKEZ46l4dwq0sOxIecJlX2pxxA8GTwkCGMFqxVFf5PRZplCky9uCIQL/s/RFabTYZNkhtkQXFR28vKXwKUP5rZbFg+s3VAFTu5dBZG4G07t5tHuM2cFirh2BisrHKYoE8lzO1h/LkwjSD+VZF0qs1hQVK+d0xHOLN80q4B/P9utxQDmGt4DaEKE6Lc5lnI6VxDf/35owQHCAuKw95VG6l1bvXPY3J1slpepPBXdCx8EM+ubbd2tV48b2UtWLtYb89PZhvg2jsq5+zkBdIVVTFHfhEwNv0CxNiT02LKVxGSus1dt9VsXDZulogOJB1AkGQVg4e833uzaWatx7bPrLKyhBeBqlC3xGqNoe3MVQHmDmBs4jm+xFjW/sjcAgOiPOFawwe3bUeTa20vGNZgbV6tCtL/qEL/fmiFLjqCCDpZdQpkdKgx6tSuzlCdqnrMFsLMhWn9sKH4ezmjmvpp9Selw9oCS0Vtcbox4f967yYpc1lNwUzPAUT3N0R32yz0bof5Wblw2jzkuw4VkWFptzoKckHRUwszvHJS8IgkAfys2IvKr/LtZBa1LzvfHBmFD6/V9enLD7LLJD2tz7n3E8BkFcwVyA/DL8P0fCpXAdLntBfy9tQCpuUP2QBAWkwyYccYGYFWWc/HS8Of6pVNf1r8p8n48bn+wPLzm5gyWoneAh3ivzATiiRKljoz8hQTN3S0itSojpnbgvjFod7uBf2Rtsa7dej63gKVRdenkDS2Q9baZyzWY1AZnIBa6yT0juo9eLCWhhOlwxFrCYRVjkKywhfIVrlrLNa3UNngB9RWBQe9mxF1zMGBUFCnRoyUWLBpCStm1SU5sRRFFSeI7HUYtawUeswQzaNk4PKSsmJBL3ERbY4dPD65glIJS5rqxD3kYsThULFbU23ETEuslLobSkuluh1LzKoTkLM0hBH1A1pgJku2CjOVizQ+hUrPP4GQeTkYaS0tarYzCI2HMnusXImyHsZe3dWrxb1U9/CRVaBMggS79TUqJ6yHSSAcdq4Kc9evZUOYUSWsI7LdGpQy7Ul99ZL1qfObT4CedX+zSJGjRBV1NNFGF30MMcYsVugeKLLqDXiNLuQnSQjRvRwtrRzlsSoBxeiSl1SvLVQoF1FcZj0Jqi46odWosl43b1H9Lp2FOAgl7OKibs6cgOICAA==') format('woff2'),
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAdgAAsAAAAADwwAAAcTAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCESgqOeIt2ATYCJAM0CxwABCAFhG0HgTMbpQxRlHBSFNlX2JThXqSJ4cz0aLyxzNkVgYOP2N97wQhUeQbPDZA1QByDeHha+9+5M7PrD1FpdI8mCSqJLulDJPFDxCQTvUQS6Qtka3ukU0/kuK8wfBBwMr1kmeTIb8hUohVh6lTeCHDCrRPPf5v6f+sQfS+QqgmpiZLNw+ZI6zMXZGL3nXY47elJFnjALaE4zjzyjJN773yuzM/7H4oZ9NV+v/q1g1ddvP1QmE5JlPRM7uAv5klMk0vWTBWTLpoJEUIja6hWSkNhOklN/ds4n0BvhyLMuZ6hKdArLC1Q4a4iG0Gfi1JaHEMbXtfsW8S8SpsepzuAJ+HLx28hoSepMmvby3e6LdC2EN2eV0ykW36MR/MlQFiJjGNAEej7WvtLgB6aM6evXtwH1glnTloW1snRYnBhky+LxyuL9glaGNmaDbRsJYR1tl+seImrgUGtEtLc//GMeo1WR9QYfUSrp7nohWgXDRrJBqpBcoAqkGagAGkBSiADQBlkEKiAbAI/N/mCYHoWi1HDEgWoBbGjlg7M/OpbgEMgnUf0fxab8kjK0tvq8cZ6/dpKwk4bNsXFx4bHR4RHcty4LVnR4xp/2TFxDN42tgefhUpEMeeqppXCU50JyT/gkVCD+EiEgl56LOkMN+6cAfyKs3dvomHU7fvnq96Uc/duIXMMqWmhNRoax1m8jNWfPorp2jlqumvHrolfe/2TcuIPCt3K589dhUNiT5OSEh4KoM9Jp1vK2GMnFjDdyaeFMrd06ki1gn9CmEz3OErpebmp+GzyAN+lMLw6dwkKh6Ve5dOnzp4W0+Y25TTfhHB10isXpxIB5GHDKcggnof+NCpCD+okAFyTPNGuRVgahmhLjZo1rnqnMlpD0ORJSluuY6jT+gPWHtaIeDKOaoradNDPruOQzulPGcBtz0C2YdbLrSFPIMGTrcNRDGC3YnJOm1JLceYK2sCWY5lqxICXIEU0gki2nkPFUteBwoqLMyTdKE7ZlOzE3yHfdSyOU2shl8RoxPJlx1bQ6C0Li3DLg+Sdi+c5evEkhtF3rBdfXpe0IiNcfW27+x6u5U4vs8zZZdu1R7Gblyc6AV9OB4Xp65HRDqcvw0Pi1DGbddntOKzYgkbhXJq+Y4bRVqszl746KdRPFV5FxSUb6XmKomd1yCb0nJbpz+aOIZskx0phXx8sHfNKyRjPsM8LGU/xJ9Qrv2JugdVBkBg/ZpUIDvpN0jfHD550XPKNDgkKEZ46l4dwq0sOxIecJlX2pxxA8GTwkCGMFqxVFf5PRZplCky9uCIQL/s/RFabTYZNkhtkQXFR28vKXwKUP5rZbFg+s3VAFTu5dBZG4G07t5tHuM2cFirh2BisrHKYoE8lzO1h/LkwjSD+VZF0qs1hQVK+d0xHOLN80q4B/P9utxQDmGt4DaEKE6Lc5lnI6VxDf/35owQHCAuKw95VG6l1bvXPY3J1slpepPBXdCx8EM+ubbd2tV48b2UtWLtYb89PZhvg2jsq5+zkBdIVVTFHfhEwNv0CxNiT02LKVxGSus1dt9VsXDZulogOJB1AkGQVg4e833uzaWatx7bPrLKyhBeBqlC3xGqNoe3MVQHmDmBs4jm+xFjW/sjcAgOiPOFawwe3bUeTa20vGNZgbV6tCtL/qEL/fmiFLjqCCDpZdQpkdKgx6tSuzlCdqnrMFsLMhWn9sKH4ezmjmvpp9Selw9oCS0Vtcbox4f967yYpc1lNwUzPAUT3N0R32yz0bof5Wblw2jzkuw4VkWFptzoKckHRUwszvHJS8IgkAfys2IvKr/LtZBa1LzvfHBmFD6/V9enLD7LLJD2tz7n3E8BkFcwVyA/DL8P0fCpXAdLntBfy9tQCpuUP2QBAWkwyYccYGYFWWc/HS8Of6pVNf1r8p8n48bn+wPLzm5gyWoneAh3ivzATiiRKljoz8hQTN3S0itSojpnbgvjFod7uBf2Rtsa7dej63gKVRdenkDS2Q9baZyzWY1AZnIBa6yT0juo9eLCWhhOlwxFrCYRVjkKywhfIVrlrLNa3UNngB9RWBQe9mxF1zMGBUFCnRoyUWLBpCStm1SU5sRRFFSeI7HUYtawUeswQzaNk4PKSsmJBL3ERbY4dPD65glIJS5rqxD3kYsThULFbU23ETEuslLobSkuluh1LzKoTkLM0hBH1A1pgJku2CjOVizQ+hUrPP4GQeTkYaS0tarYzCI2HMnusXImyHsZe3dWrxb1U9/CRVaBMggS79TUqJ6yHSSAcdq4Kc9evZUOYUSWsI7LdGpQy7Ul99ZL1qfObT4CedX+zSJGjRBV1NNFGF30MMcYsVugeKLLqDXiNLuQnSQjRvRwtrRzlsSoBxeiSl1SvLVQoF1FcZj0Jqi46odWosl43b1H9Lp2FOAgl7OKibs6cgOICAA==') format('woff2'),
url('iconfont.woff?t=1589437921018') format('woff'), url('iconfont.woff?t=1589437921018') format('woff'),
url('iconfont.ttf?t=1589437921018') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ url('iconfont.ttf?t=1589437921018') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ url('iconfont.svg?t=1589437921018#iconfont') format('svg'); /* iOS 4.1- */
url('iconfont.svg?t=1589437921018#iconfont') format('svg'); /* iOS 4.1- */
} }
.iconfont { .iconfont {

@ -20,43 +20,64 @@ Created by iconfont
/> />
<missing-glyph/> <missing-glyph/>
<glyph glyph-name="yigouxuan" unicode="&#58941;" d="M196.923077 896h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846a196.923077 196.923077 0 0 0-196.923077-196.923077H196.923077a196.923077 196.923077 0 0 0-196.923077 196.923077V699.076923a196.923077 196.923077 0 0 0 196.923077 196.923077z m0-78.769231a118.153846 118.153846 0 0 1-118.153846-118.153846v-630.153846a118.153846 118.153846 0 0 1 118.153846-118.153846h630.153846a118.153846 118.153846 0 0 1 118.153846 118.153846V699.076923a118.153846 118.153846 0 0 1-118.153846 118.153846H196.923077z m584.900923-258.205538a36.509538 36.509538 0 0 0 1.260308-51.633231l-299.480616-313.107692c-0.118154-0.157538-0.393846-0.236308-0.630154-0.472616l-0.393846-0.551384c-2.166154-2.126769-4.726154-3.229538-7.207384-4.726154-1.575385-0.866462-2.796308-2.166154-4.411077-2.835692a35.800615 35.800615 0 0 0-27.490462-0.07877c-1.260308 0.512-2.284308 1.614769-3.544615 2.284308-2.756923 1.457231-5.592615 2.835692-8.034462 5.12-0.196923 0.157538-0.275692 0.433231-0.512 0.669538-0.196923 0.118154-0.393846 0.196923-0.551384 0.354462l-150.843077 156.593231a36.430769 36.430769 0 0 0 0.945231 51.633231 36.391385 36.391385 0 0 0 51.63323-0.945231l124.455385-129.102769 273.092923 285.61723a36.548923 36.548923 0 0 0 51.712 1.181539z" horiz-adv-x="1024" /> <glyph glyph-name="yigouxuan" unicode="&#58941;"
d="M196.923077 896h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846a196.923077 196.923077 0 0 0-196.923077-196.923077H196.923077a196.923077 196.923077 0 0 0-196.923077 196.923077V699.076923a196.923077 196.923077 0 0 0 196.923077 196.923077z m0-78.769231a118.153846 118.153846 0 0 1-118.153846-118.153846v-630.153846a118.153846 118.153846 0 0 1 118.153846-118.153846h630.153846a118.153846 118.153846 0 0 1 118.153846 118.153846V699.076923a118.153846 118.153846 0 0 1-118.153846 118.153846H196.923077z m584.900923-258.205538a36.509538 36.509538 0 0 0 1.260308-51.633231l-299.480616-313.107692c-0.118154-0.157538-0.393846-0.236308-0.630154-0.472616l-0.393846-0.551384c-2.166154-2.126769-4.726154-3.229538-7.207384-4.726154-1.575385-0.866462-2.796308-2.166154-4.411077-2.835692a35.800615 35.800615 0 0 0-27.490462-0.07877c-1.260308 0.512-2.284308 1.614769-3.544615 2.284308-2.756923 1.457231-5.592615 2.835692-8.034462 5.12-0.196923 0.157538-0.275692 0.433231-0.512 0.669538-0.196923 0.118154-0.393846 0.196923-0.551384 0.354462l-150.843077 156.593231a36.430769 36.430769 0 0 0 0.945231 51.633231 36.391385 36.391385 0 0 0 51.63323-0.945231l124.455385-129.102769 273.092923 285.61723a36.548923 36.548923 0 0 0 51.712 1.181539z"
horiz-adv-x="1024"/>
<glyph glyph-name="weigouxuan" unicode="&#58942;" d="M196.923077 817.230769a118.153846 118.153846 0 0 1-118.153846-118.153846v-630.153846a118.153846 118.153846 0 0 1 118.153846-118.153846h630.153846a118.153846 118.153846 0 0 1 118.153846 118.153846V699.076923a118.153846 118.153846 0 0 1-118.153846 118.153846H196.923077z m0 78.769231h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846a196.923077 196.923077 0 0 0-196.923077-196.923077H196.923077a196.923077 196.923077 0 0 0-196.923077 196.923077V699.076923a196.923077 196.923077 0 0 0 196.923077 196.923077z" horiz-adv-x="1024" /> <glyph glyph-name="weigouxuan" unicode="&#58942;"
d="M196.923077 817.230769a118.153846 118.153846 0 0 1-118.153846-118.153846v-630.153846a118.153846 118.153846 0 0 1 118.153846-118.153846h630.153846a118.153846 118.153846 0 0 1 118.153846 118.153846V699.076923a118.153846 118.153846 0 0 1-118.153846 118.153846H196.923077z m0 78.769231h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846a196.923077 196.923077 0 0 0-196.923077-196.923077H196.923077a196.923077 196.923077 0 0 0-196.923077 196.923077V699.076923a196.923077 196.923077 0 0 0 196.923077 196.923077z"
horiz-adv-x="1024"/>
<glyph glyph-name="weigouxuan1" unicode="&#58954;" d="M256 768a128 128 0 0 1-128-128v-512a128 128 0 0 1 128-128h512a128 128 0 0 1 128 128V640a128 128 0 0 1-128 128H256z m0 51.2h512a179.2 179.2 0 0 0 179.2-179.2v-512a179.2 179.2 0 0 0-179.2-179.2H256a179.2 179.2 0 0 0-179.2 179.2V640a179.2 179.2 0 0 0 179.2 179.2z" horiz-adv-x="1024" /> <glyph glyph-name="weigouxuan1" unicode="&#58954;"
d="M256 768a128 128 0 0 1-128-128v-512a128 128 0 0 1 128-128h512a128 128 0 0 1 128 128V640a128 128 0 0 1-128 128H256z m0 51.2h512a179.2 179.2 0 0 0 179.2-179.2v-512a179.2 179.2 0 0 0-179.2-179.2H256a179.2 179.2 0 0 0-179.2 179.2V640a179.2 179.2 0 0 0 179.2 179.2z"
horiz-adv-x="1024"/>
<glyph glyph-name="yigouxuan1" unicode="&#58955;" d="M796.912941 598.437647L407.491765 203.294118l-156.611765 172.272941a30.177882 30.177882 0 0 1-44.574118-40.658824L361.411765 161.430588a60.235294 60.235294 0 0 1 85.232941-3.915294l2.409412 2.409412 390.927058 396.348235a30.117647 30.117647 0 1 1-43.068235 42.164706zM813.176471 896H210.823529a210.823529 210.823529 0 0 1-210.823529-210.823529v-602.352942a210.823529 210.823529 0 0 1 210.823529-210.823529h602.352942a210.823529 210.823529 0 0 1 210.823529 210.823529V685.176471a210.823529 210.823529 0 0 1-210.823529 210.823529z m150.588235-813.176471a150.588235 150.588235 0 0 0-150.588235-150.588235H210.823529a150.588235 150.588235 0 0 0-150.588235 150.588235V685.176471a150.588235 150.588235 0 0 0 150.588235 150.588235h602.352942a150.588235 150.588235 0 0 0 150.588235-150.588235z" horiz-adv-x="1024" /> <glyph glyph-name="yigouxuan1" unicode="&#58955;"
d="M796.912941 598.437647L407.491765 203.294118l-156.611765 172.272941a30.177882 30.177882 0 0 1-44.574118-40.658824L361.411765 161.430588a60.235294 60.235294 0 0 1 85.232941-3.915294l2.409412 2.409412 390.927058 396.348235a30.117647 30.117647 0 1 1-43.068235 42.164706zM813.176471 896H210.823529a210.823529 210.823529 0 0 1-210.823529-210.823529v-602.352942a210.823529 210.823529 0 0 1 210.823529-210.823529h602.352942a210.823529 210.823529 0 0 1 210.823529 210.823529V685.176471a210.823529 210.823529 0 0 1-210.823529 210.823529z m150.588235-813.176471a150.588235 150.588235 0 0 0-150.588235-150.588235H210.823529a150.588235 150.588235 0 0 0-150.588235 150.588235V685.176471a150.588235 150.588235 0 0 0 150.588235 150.588235h602.352942a150.588235 150.588235 0 0 0 150.588235-150.588235z"
horiz-adv-x="1024"/>
<glyph glyph-name="shixiangyoujiantou-" unicode="&#58918;" d="M701.44 384L322.56 99.413V668.587L701.44 384z" horiz-adv-x="1024" /> <glyph glyph-name="shixiangyoujiantou-" unicode="&#58918;" d="M701.44 384L322.56 99.413V668.587L701.44 384z"
horiz-adv-x="1024"/>
<glyph glyph-name="shixiangxiajiantou-" unicode="&#58917;" d="M512 194.56L227.413 573.44h569.174L512 194.56z" horiz-adv-x="1024" /> <glyph glyph-name="shixiangxiajiantou-" unicode="&#58917;"
d="M512 194.56L227.413 573.44h569.174L512 194.56z" horiz-adv-x="1024"/>
<glyph glyph-name="jiahao" unicode="&#59181;" d="M512 864C246.4 864 32 649.6 32 384s214.4-480 480-480 480 214.4 480 480S777.6 864 512 864z m256-512h-224v-224c0-19.2-12.8-32-32-32s-32 12.8-32 32v224H256c-19.2 0-32 12.8-32 32s12.8 32 32 32h224V640c0 19.2 12.8 32 32 32s32-12.8 32-32v-224h224c19.2 0 32-12.8 32-32s-12.8-32-32-32z" horiz-adv-x="1024" /> <glyph glyph-name="jiahao" unicode="&#59181;"
d="M512 864C246.4 864 32 649.6 32 384s214.4-480 480-480 480 214.4 480 480S777.6 864 512 864z m256-512h-224v-224c0-19.2-12.8-32-32-32s-32 12.8-32 32v224H256c-19.2 0-32 12.8-32 32s12.8 32 32 32h224V640c0 19.2 12.8 32 32 32s32-12.8 32-32v-224h224c19.2 0 32-12.8 32-32s-12.8-32-32-32z"
horiz-adv-x="1024"/>
<glyph glyph-name="up" unicode="&#59241;" d="M508.4 445.9l1.8 1.8-1.8-1.8zM508.2 447.9l2.2-2.2c-0.7 0.8-1.4 1.5-2.2 2.2zM511.1 485l1.8-1.8-1.8 1.8zM510.9 483l2.2 2.2c-0.8-0.7-1.5-1.4-2.2-2.2zM544 521.3v-336c0-17.6-14.4-32-32-32s-32 14.4-32 32v336c0 17.6 14.4 32 32 32s32-14.4 32-32zM511.9 614.7c-8.3 0-15.8-3.1-21.5-8.3l-2.2-2.2-21.5-21.5L291 407c-12.4-12.4-12.4-32.8 0-45.3 12.4-12.4 32.8-12.4 45.3 0L512 537.5l175.8-175.7c12.4-12.4 32.8-12.4 45.3 0 12.4 12.4 12.4 32.8-0.1 45.2L557.3 582.7l-21.8 21.8-1.8 1.8c-5.7 5.3-13.4 8.5-21.8 8.4z" horiz-adv-x="1024" /> <glyph glyph-name="up" unicode="&#59241;"
d="M508.4 445.9l1.8 1.8-1.8-1.8zM508.2 447.9l2.2-2.2c-0.7 0.8-1.4 1.5-2.2 2.2zM511.1 485l1.8-1.8-1.8 1.8zM510.9 483l2.2 2.2c-0.8-0.7-1.5-1.4-2.2-2.2zM544 521.3v-336c0-17.6-14.4-32-32-32s-32 14.4-32 32v336c0 17.6 14.4 32 32 32s32-14.4 32-32zM511.9 614.7c-8.3 0-15.8-3.1-21.5-8.3l-2.2-2.2-21.5-21.5L291 407c-12.4-12.4-12.4-32.8 0-45.3 12.4-12.4 32.8-12.4 45.3 0L512 537.5l175.8-175.7c12.4-12.4 32.8-12.4 45.3 0 12.4 12.4 12.4 32.8-0.1 45.2L557.3 582.7l-21.8 21.8-1.8 1.8c-5.7 5.3-13.4 8.5-21.8 8.4z"
horiz-adv-x="1024"/>
<glyph glyph-name="down" unicode="&#59243;" d="M515.6 322.1l-1.8-1.8 1.8 1.8zM515.8 320.1l-2.2 2.2c0.7-0.8 1.4-1.5 2.2-2.2zM512.9 283l-1.8 1.8 1.8-1.8zM513.1 285l-2.2-2.2c0.8 0.7 1.5 1.4 2.2 2.2zM480 246.70000000000005v336c0 17.6 14.4 32 32 32s32-14.4 32-32v-336c0-17.6-14.4-32-32-32s-32 14.4-32 32zM512.1 153.29999999999995c8.3 0 15.8 3.1 21.5 8.3l2.2 2.2 21.5 21.5L733 361c12.4 12.4 12.4 32.8 0 45.3-12.4 12.4-32.8 12.4-45.3 0L512 230.5 336.2 406.2c-12.4 12.4-32.8 12.4-45.3 0-12.4-12.4-12.4-32.8 0.1-45.2l175.7-175.7 21.8-21.8 1.8-1.8c5.7-5.3 13.4-8.5 21.8-8.4z" horiz-adv-x="1024" /> <glyph glyph-name="down" unicode="&#59243;"
d="M515.6 322.1l-1.8-1.8 1.8 1.8zM515.8 320.1l-2.2 2.2c0.7-0.8 1.4-1.5 2.2-2.2zM512.9 283l-1.8 1.8 1.8-1.8zM513.1 285l-2.2-2.2c0.8 0.7 1.5 1.4 2.2 2.2zM480 246.70000000000005v336c0 17.6 14.4 32 32 32s32-14.4 32-32v-336c0-17.6-14.4-32-32-32s-32 14.4-32 32zM512.1 153.29999999999995c8.3 0 15.8 3.1 21.5 8.3l2.2 2.2 21.5 21.5L733 361c12.4 12.4 12.4 32.8 0 45.3-12.4 12.4-32.8 12.4-45.3 0L512 230.5 336.2 406.2c-12.4 12.4-32.8 12.4-45.3 0-12.4-12.4-12.4-32.8 0.1-45.2l175.7-175.7 21.8-21.8 1.8-1.8c5.7-5.3 13.4-8.5 21.8-8.4z"
horiz-adv-x="1024"/>
<glyph glyph-name="delete" unicode="&#59113;" d="M512.019034 896C229.689856 896 0 666.310144 0 383.98096599999997c0-282.306337 229.689856-511.980966 512.019034-511.980966 282.321564 0 512.01142 229.67463 512.01142 511.980966C1024.030454 666.310144 794.340597 896 512.019034 896zM713.257467 174.96921199999997c-0.007613-22.109428-17.92965-40.107599-39.955331-40.107599L352.936215 134.86161200000004c-22.02568 0-39.940104 17.990558-39.940104 40.107599L312.996111 493.911419c0 7.704801 6.265861 13.978275 13.978275 13.978275 7.704801 0 13.970661-6.273474 13.970661-13.978275l0-318.942208c0-6.70744 5.382702-12.158663 11.991167-12.158663l320.365921 0c6.608465 0 11.991167 5.451223 11.991167 12.158663L685.293303 493.911419c0 7.704801 6.265861 13.978275 13.978275 13.978275s13.978275-6.273474 13.978275-13.978275L713.249853 174.96921199999997zM431.956104 216.02087700000004L431.956104 493.911419c0 7.704801 6.265861 13.978275 13.970661 13.978275 7.712414 0 13.978275-6.273474 13.978275-13.978275l0-277.882928c0-7.712414-6.265861-13.978275-13.978275-13.978275C438.229578 202.05021599999998 431.956104 208.31607699999995 431.956104 216.02087700000004zM566.340924 216.02087700000004L566.340924 493.911419c0 7.704801 6.265861 13.978275 13.978275 13.978275 7.704801 0 13.970661-6.273474 13.970661-13.978275l0-277.882928c0-7.712414-6.265861-13.978275-13.970661-13.978275C572.606785 202.05021599999998 566.340924 208.31607699999995 566.340924 216.02087700000004zM762.059614 549.002268L615.554197 549.002268c-3.730585 0-7.240381 1.454167-9.882244 4.09603l-52.08354 52.08354L471.987569 605.181838l-62.17896-52.844884c-2.497208-2.139377-5.717693-3.334687-9.044766-3.334687L261.978453 549.002268c-7.712414 0-13.978275 6.273474-13.978275 13.978275s6.265861 13.978275 13.978275 13.978275l133.653931 0 62.171347 52.844884c2.535275 2.14699 5.748147 3.327073 9.05238 3.327073l92.518517 0c3.730585 0 7.240381-1.454167 9.882244-4.09603l52.08354-52.08354 140.711589 0c7.712414 0 13.978275-6.265861 13.978275-13.970661C776.037889 555.275742 769.764415 549.002268 762.059614 549.002268z" horiz-adv-x="1025" /> <glyph glyph-name="delete" unicode="&#59113;"
d="M512.019034 896C229.689856 896 0 666.310144 0 383.98096599999997c0-282.306337 229.689856-511.980966 512.019034-511.980966 282.321564 0 512.01142 229.67463 512.01142 511.980966C1024.030454 666.310144 794.340597 896 512.019034 896zM713.257467 174.96921199999997c-0.007613-22.109428-17.92965-40.107599-39.955331-40.107599L352.936215 134.86161200000004c-22.02568 0-39.940104 17.990558-39.940104 40.107599L312.996111 493.911419c0 7.704801 6.265861 13.978275 13.978275 13.978275 7.704801 0 13.970661-6.273474 13.970661-13.978275l0-318.942208c0-6.70744 5.382702-12.158663 11.991167-12.158663l320.365921 0c6.608465 0 11.991167 5.451223 11.991167 12.158663L685.293303 493.911419c0 7.704801 6.265861 13.978275 13.978275 13.978275s13.978275-6.273474 13.978275-13.978275L713.249853 174.96921199999997zM431.956104 216.02087700000004L431.956104 493.911419c0 7.704801 6.265861 13.978275 13.970661 13.978275 7.712414 0 13.978275-6.273474 13.978275-13.978275l0-277.882928c0-7.712414-6.265861-13.978275-13.978275-13.978275C438.229578 202.05021599999998 431.956104 208.31607699999995 431.956104 216.02087700000004zM566.340924 216.02087700000004L566.340924 493.911419c0 7.704801 6.265861 13.978275 13.978275 13.978275 7.704801 0 13.970661-6.273474 13.970661-13.978275l0-277.882928c0-7.712414-6.265861-13.978275-13.970661-13.978275C572.606785 202.05021599999998 566.340924 208.31607699999995 566.340924 216.02087700000004zM762.059614 549.002268L615.554197 549.002268c-3.730585 0-7.240381 1.454167-9.882244 4.09603l-52.08354 52.08354L471.987569 605.181838l-62.17896-52.844884c-2.497208-2.139377-5.717693-3.334687-9.044766-3.334687L261.978453 549.002268c-7.712414 0-13.978275 6.273474-13.978275 13.978275s6.265861 13.978275 13.978275 13.978275l133.653931 0 62.171347 52.844884c2.535275 2.14699 5.748147 3.327073 9.05238 3.327073l92.518517 0c3.730585 0 7.240381-1.454167 9.882244-4.09603l52.08354-52.08354 140.711589 0c7.712414 0 13.978275-6.265861 13.978275-13.970661C776.037889 555.275742 769.764415 549.002268 762.059614 549.002268z"
horiz-adv-x="1025"/>
<glyph glyph-name="qq" unicode="&#58900;" d="M512-128C229.226667-128 0 101.22666700000002 0 384 0 666.773333 229.226667 896 512 896 794.773333 896 1024 666.773333 1024 384 1024 101.22666700000002 794.773333-128 512-128ZM693.333333 437.333333C689.024 457.365333 682.666667 469.333333 682.666667 469.333333 682.666667 469.333333 682.944 498.666667 650.666667 565.333333 618.389333 632 522.666667 640 522.666667 640L512 640C512 640 416.277333 632 384 565.333333 351.722667 498.666667 352 469.333333 352 469.333333 352 469.333333 345.642667 457.365333 341.333333 437.333333 337.024 417.301333 341.333333 405.333333 341.333333 405.333333 341.333333 405.333333 286.656 349.578667 288 309.33333300000004 289.344 269.08799999999997 299.221333 243.45600000000002 320 266.66666699999996 340.778667 289.877333 341.333333 288 341.333333 288 341.333333 288 340.970667 270.66666699999996 352 256 363.029333 241.33333300000004 373.333333 234.66666699999996 373.333333 234.66666699999996 373.333333 234.66666699999996 317.386667 206.965333 330.666667 170.66666699999996 343.946667 134.36800000000005 384.874667 127.71199999999999 416 128 447.125333 128.288 512 149.33333300000004 512 149.33333300000004L522.666667 149.33333300000004C522.666667 149.33333300000004 587.541333 128.288 618.666667 128 649.792 127.71199999999999 690.72 134.36800000000005 704 170.66666699999996 717.28 206.965333 661.333333 234.66666699999996 661.333333 234.66666699999996 661.333333 234.66666699999996 671.637333 241.33333300000004 682.666667 256 693.696 270.66666699999996 693.333333 288 693.333333 288 693.333333 288 693.888 289.877333 714.666667 266.66666699999996 735.445333 243.45600000000002 745.322667 269.08799999999997 746.666667 309.33333300000004 748.010667 349.578667 693.333333 405.333333 693.333333 405.333333 693.333333 405.333333 697.642667 417.301333 693.333333 437.333333Z" horiz-adv-x="1024" /> <glyph glyph-name="qq" unicode="&#58900;"
d="M512-128C229.226667-128 0 101.22666700000002 0 384 0 666.773333 229.226667 896 512 896 794.773333 896 1024 666.773333 1024 384 1024 101.22666700000002 794.773333-128 512-128ZM693.333333 437.333333C689.024 457.365333 682.666667 469.333333 682.666667 469.333333 682.666667 469.333333 682.944 498.666667 650.666667 565.333333 618.389333 632 522.666667 640 522.666667 640L512 640C512 640 416.277333 632 384 565.333333 351.722667 498.666667 352 469.333333 352 469.333333 352 469.333333 345.642667 457.365333 341.333333 437.333333 337.024 417.301333 341.333333 405.333333 341.333333 405.333333 341.333333 405.333333 286.656 349.578667 288 309.33333300000004 289.344 269.08799999999997 299.221333 243.45600000000002 320 266.66666699999996 340.778667 289.877333 341.333333 288 341.333333 288 341.333333 288 340.970667 270.66666699999996 352 256 363.029333 241.33333300000004 373.333333 234.66666699999996 373.333333 234.66666699999996 373.333333 234.66666699999996 317.386667 206.965333 330.666667 170.66666699999996 343.946667 134.36800000000005 384.874667 127.71199999999999 416 128 447.125333 128.288 512 149.33333300000004 512 149.33333300000004L522.666667 149.33333300000004C522.666667 149.33333300000004 587.541333 128.288 618.666667 128 649.792 127.71199999999999 690.72 134.36800000000005 704 170.66666699999996 717.28 206.965333 661.333333 234.66666699999996 661.333333 234.66666699999996 661.333333 234.66666699999996 671.637333 241.33333300000004 682.666667 256 693.696 270.66666699999996 693.333333 288 693.333333 288 693.333333 288 693.888 289.877333 714.666667 266.66666699999996 735.445333 243.45600000000002 745.322667 269.08799999999997 746.666667 309.33333300000004 748.010667 349.578667 693.333333 405.333333 693.333333 405.333333 693.333333 405.333333 697.642667 417.301333 693.333333 437.333333Z"
horiz-adv-x="1024"/>
<glyph glyph-name="weixin" unicode="&#59018;" d="M512-128C229.2-128 0 101.20000000000005 0 384S229.2 896 512 896s512-229.2 512-512-229.2-512-512-512z m105.6 582.1c-91.1 0-164.9-63.6-164.9-139.3 0-81.5 73.8-145.1 164.9-148.6 25.8 3.5 50.1 8.7 73.3 18.6l45.8-27.9-9.2 46.4c32.6 26.8 54.9 65.4 54.9 111.4 0.1 75.7-73.7 139.4-164.8 139.4z m-54.9-111.4c-17.2 0-27.5 10.4-27.5 27.9 0 8.2 10.3 18.6 27.5 18.6 8.1 0 18.3-10.4 18.3-18.6 0-17.5-10.2-27.9-18.3-27.9z m109.9 0c-8 0-18.3 10.4-18.3 27.9 0 8.2 10.3 18.6 18.3 18.6 17.2 0 27.5-10.4 27.5-18.6 0-17.5-10.2-27.9-27.5-27.9z m-55 130c2.5-3.1 5.9-3.4 9.2 0-13.7 77.2-94 139.3-192.4 139.3C328.6 612 242 537.1 242 444.9c0-53 28.3-99.9 73.3-130l-18.3-65 64.1 37.1c25.5-5.2 49.4-9.5 73.3-9.3 4-0.2 6.8 0 9.2 0-3 12-5 24.4-9.2 37.1 4.2 85.6 84 154.8 183.2 157.9z m-109.9 55.7c17.2 0 27.5-10.4 27.5-18.6 0-17.5-10.3-27.9-27.5-27.9-8 0-18.3 10.4-18.3 27.9 0 8.2 10.2 18.6 18.3 18.6z m-174.1-18.5c0 8.2 10.3 18.6 18.3 18.6 17.2 0 27.5-10.4 27.5-18.6 0-17.5-10.3-27.9-27.5-27.9-8 0-18.3 10.4-18.3 27.9z" horiz-adv-x="1024" />
<glyph glyph-name="weixin" unicode="&#59018;"
d="M512-128C229.2-128 0 101.20000000000005 0 384S229.2 896 512 896s512-229.2 512-512-229.2-512-512-512z m105.6 582.1c-91.1 0-164.9-63.6-164.9-139.3 0-81.5 73.8-145.1 164.9-148.6 25.8 3.5 50.1 8.7 73.3 18.6l45.8-27.9-9.2 46.4c32.6 26.8 54.9 65.4 54.9 111.4 0.1 75.7-73.7 139.4-164.8 139.4z m-54.9-111.4c-17.2 0-27.5 10.4-27.5 27.9 0 8.2 10.3 18.6 27.5 18.6 8.1 0 18.3-10.4 18.3-18.6 0-17.5-10.2-27.9-18.3-27.9z m109.9 0c-8 0-18.3 10.4-18.3 27.9 0 8.2 10.3 18.6 18.3 18.6 17.2 0 27.5-10.4 27.5-18.6 0-17.5-10.2-27.9-27.5-27.9z m-55 130c2.5-3.1 5.9-3.4 9.2 0-13.7 77.2-94 139.3-192.4 139.3C328.6 612 242 537.1 242 444.9c0-53 28.3-99.9 73.3-130l-18.3-65 64.1 37.1c25.5-5.2 49.4-9.5 73.3-9.3 4-0.2 6.8 0 9.2 0-3 12-5 24.4-9.2 37.1 4.2 85.6 84 154.8 183.2 157.9z m-109.9 55.7c17.2 0 27.5-10.4 27.5-18.6 0-17.5-10.3-27.9-27.5-27.9-8 0-18.3 10.4-18.3 27.9 0 8.2 10.2 18.6 18.3 18.6z m-174.1-18.5c0 8.2 10.3 18.6 18.3 18.6 17.2 0 27.5-10.4 27.5-18.6 0-17.5-10.3-27.9-27.5-27.9-8 0-18.3 10.4-18.3 27.9z"
horiz-adv-x="1024"/>
</font> </font>
</defs></svg> </defs>
</svg>

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

@ -1,5 +1,6 @@
@import "lib/var"; @import "lib/var";
@import "var"; @import "var";
html, html,
body, body,
#app, #app,

@ -10,15 +10,19 @@
.j-start { .j-start {
justify-content: flex-start; justify-content: flex-start;
} }
.j-end { .j-end {
justify-content: flex-end; justify-content: flex-end;
} }
.j-center { .j-center {
justify-content: center; justify-content: center;
} }
.j-between { .j-between {
justify-content: space-between; justify-content: space-between;
} }
.j-around { .j-around {
justify-content: space-around; justify-content: space-around;
} }

@ -3,10 +3,12 @@
content: ' '; content: ' ';
display: table; display: table;
} }
&:after { &:after {
clear: both; clear: both;
} }
} }
.fl { .fl {
float: left; float: left;
} }

@ -5,6 +5,7 @@
color: $color; color: $color;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
&:hover, &:active, &:focus { &:hover, &:active, &:focus {
color: darken($color, 10%); color: darken($color, 10%);
text-decoration: underline; text-decoration: underline;

@ -1,4 +1,3 @@
@import "var"; @import "var";
@each $type in static, relative, absolute, fixed, sticky { @each $type in static, relative, absolute, fixed, sticky {

@ -74,6 +74,7 @@ ol,ul{
list-style: none; list-style: none;
} }
} }
h1 { h1 {
font-size: 2em; font-size: 2em;
margin: 0.67em 0; margin: 0.67em 0;

@ -6,6 +6,7 @@ $inner-width: 1440px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
@mixin mul-ellipsis($num) { @mixin mul-ellipsis($num) {
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
@ -17,9 +18,11 @@ $inner-width: 1440px;
.ellipsis { .ellipsis {
@include ellipsis(); @include ellipsis();
} }
.mul-ellipsis2 { .mul-ellipsis2 {
@include mul-ellipsis(2); @include mul-ellipsis(2);
} }
.mul-ellipsis3 { .mul-ellipsis3 {
@include mul-ellipsis(3); @include mul-ellipsis(3);
} }
Loading…
Cancel
Save