UI_2022-02-10
yujialong 3 years ago
parent bc11841b59
commit 6277ff7435
  1. 29
      src/App.vue
  2. 369
      src/api/index.js
  3. 146
      src/components/pdf/index.vue
  4. 302
      src/components/quill/index.vue
  5. 30
      src/components/quill/options.js
  6. 40
      src/i18n/index.js
  7. 47
      src/layouts/footer/index.vue
  8. 66
      src/layouts/header/index.vue
  9. 56
      src/layouts/home/index.vue
  10. 81
      src/layouts/navbar/index.vue
  11. 29
      src/libs/auth/generateBtnPermission.js
  12. 2
      src/libs/bus.js
  13. 6
      src/libs/random_str.js
  14. 22
      src/libs/resize/index.js
  15. 34
      src/libs/route/addRoutes.js
  16. 38
      src/libs/route/generateRoutes.js
  17. 8
      src/libs/route/resetRouter.js
  18. 12
      src/libs/util.cookies.js
  19. 14
      src/libs/util.db.js
  20. 323
      src/libs/util.js
  21. 1558
      src/libs/videoList.js
  22. 40
      src/main.js
  23. 4
      src/mixins/app.js
  24. 6
      src/mixins/setBackground/index.js
  25. 698
      src/pages/account/login/index.vue
  26. 236
      src/pages/account/register/index.vue
  27. 456
      src/pages/ass/list/index.vue
  28. 274
      src/pages/course/list/index.vue
  29. 73
      src/pages/exception/error/403/index.vue
  30. 89
      src/pages/exception/error/404/index.vue
  31. 35
      src/pages/exception/i18n/index.vue
  32. 305
      src/pages/exception/icon/index.vue
  33. 25
      src/pages/index/list/index.vue
  34. 32
      src/pages/information/list/index.vue
  35. 559
      src/pages/match/list/index.vue
  36. 733
      src/pages/preview/list/index.vue
  37. 67
      src/pages/record/list/ass.vue
  38. 240
      src/pages/record/list/index.vue
  39. 79
      src/pages/record/list/practice.vue
  40. 736
      src/pages/record/show/index.vue
  41. 952
      src/pages/setting/person/index.vue
  42. 419
      src/pages/station/list/index.vue
  43. 22
      src/plugins/auth/index.js
  44. 6
      src/plugins/filters/index.js
  45. 12
      src/plugins/index.js
  46. 147
      src/plugins/requests/index.js
  47. 16
      src/plugins/throttle/index.js
  48. 26
      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. 36
      src/router/permission.js
  56. 62
      src/router/routes.js
  57. 8
      src/setting.env.js
  58. 196
      src/setting.js
  59. 6
      src/store/getters.js
  60. 24
      src/store/index.js
  61. 16
      src/store/modules/layout.js
  62. 22
      src/store/modules/project.js
  63. 111
      src/store/modules/user.js
  64. 445
      src/styles/common.scss
  65. 460
      src/styles/font/icon/demo.css
  66. 798
      src/styles/font/icon/demo_index.html
  67. 59
      src/styles/font/icon/iconfont.css
  68. 103
      src/styles/font/icon/iconfont.svg
  69. 2
      src/styles/font/iconfont.css
  70. 13
      src/styles/layout/index.scss
  71. 4
      src/styles/lib/_flex.scss
  72. 2
      src/styles/lib/_float.scss
  73. 1
      src/styles/lib/_link.scss
  74. 1
      src/styles/lib/_position.scss
  75. 9
      src/styles/lib/_reset.scss
  76. 58
      src/styles/lib/_var.scss
  77. 31
      src/styles/var.scss

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

@ -1,158 +1,215 @@
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`, //用户登录修改登录次数和登陆时间 // 登录
uploadUserAvatars: `${loginhost}userInfo/uploadUserAvatars`, //上传头像 logins: `${host}users/users/user/login`, //登录
loginSchool: `${loginhost}userInfo/loginSchoolClient`, //登陆查询学校 verification: `${host}users/users/user/captcha`,// 验证码图片
loginRole: `${loginhost}userInfo/loginRole`, //登陆查询角色
save: `${host}tms/userInfo/add`, //注册 //实验台
experimentOverview: `${host}occupationlab/achievement/experimentOverview`, //实验概览
queryToken: `${loginhost}userInfo/queryToken`, queryAssessmentByStudent: `${host}occupationlab/achievement/queryAssessmentByStudent`, //学生端考核成绩
queryWorkNumberIsExist:`${loginhost}userInfo/queryWorkNumberIsExist`,//查询学号、工号是否存在 queryPracticeByStudent: `${host}occupationlab/achievement/queryPracticeByStudent`, //学生端练习成绩
queryAccountIsExist:`${loginhost}userInfo/queryAccountIsExist`,//查询员工,学生账号是否存在接口 exportAssessmentInfo: `${host}occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `${host}occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
addStuPro: `${host}stuProfessionalArchitecture/addStuProfessionalArchitecture`, //添加学生专业
queryStuPro: `${host}stuProfessionalArchitecture/queryStuProfessionalArchitecture`, //查询学生专业 // 能力测评
queryStuGrade: `${host}stuProfessionalArchitecture/queryStuGrade`, //查询学生年级 canExperiment: `${host}occupationlab/occupationlab/evaluationrecord/can_experiment`, // 查询是否能够开启实验
queryStuClass: `${host}stuProfessionalArchitecture/queryStuClass`, //查询学生班级 experimentDetail: `${host}occupationlab/occupationlab/evaluationrecord/detail`, // 成绩详情
deleteStuPro: `${host}stuProfessionalArchitecture/deleteStuProfessionalArchitecture`, //删除学生专业 experimentNext: `${host}occupationlab/occupationlab/evaluationrecord/next`, // 下一题
updateStuPro: `${host}stuProfessionalArchitecture/updateStuProfessionalArchitecture`, //编辑学生专业 experimentNotmade: `${host}occupationlab/occupationlab/evaluationrecord/not_made`, // 提交之前查询是否还有未做完的试题
openExercise: `${host}occupationlab/occupationlab/evaluationrecord/openExercise`, // 查询是否能开启虚拟仿真实验
findPasswordByEmail: `${host}tms/userInfo/findPasswordByEmail`, openTeaching: `${host}occupationlab/occupationlab/evaluationrecord/openTeaching`, // 查询是否能开启教学实验
findPasswordByPhone: `${host}tms/userInfo/findPasswordByPhone`, experimentPrevious: `${host}occupationlab/occupationlab/evaluationrecord/previous`, // 上一题
resetPassword: `${host}tms/userInfo/resetPassword`, experimentRemaining: `${host}occupationlab/occupationlab/evaluationrecord/remaining`, // 获取测评剩余时间
checkCode: `${host}tms/userInfo/checkCode`, experimentStart: `${host}occupationlab/occupationlab/evaluationrecord/start`, // 开始测评
experimentSubmit: `${host}occupationlab/occupationlab/evaluationrecord/submit`, // 提交测评
queryStudentData: `${host}student/queryStudent`, //查询学生
queryStudentDetails: `${host}student/queryStudentDetails`, //查询学生详情 // 考核列表
addStudent: `${host}student/addStudent`, //添加学生 pageStuAssessment: `${host}occupationlab/assessment/pageStuAssessment`, // 学生端——学生考核列表
deleteStudent: `${host}student/deleteStudent`, //删除学生 getPythonSysByStuAccountId: `${host}occupationlab/assessment/getPythonSysByStuAccountId`, // 学生端——课程名称
updateStudent: `${host}student/updateStudent`, //编辑学生 myClassByStudent: `${host}occupationlab/achievement/myClassByStudent`, // 学生端:我的班级
updateStuGrade: `${host}stuProfessionalArchitecture/updateStuGrade`, //编辑学生年级 getStudentInfoByAccountId: `${host}occupationlab/architecture/getStudentInfoByAccountId`, // 查看学生信息
addStuGrade: `${host}stuProfessionalArchitecture/addStuGrade`, //添加学生年级 enterExam: `${host}occupationlab/assessment/enterExam`, // 学生端——进入考试
deleteStuGrade: `${host}stuProfessionalArchitecture/deleteStuGrade`, //删除学生年级
updateStuClass: `${host}stuProfessionalArchitecture/updateStuClass`, //编辑学生班级 // 课程学习
addStuClass: `${host}stuProfessionalArchitecture/addStuClass`, //添加学生班级 queryGlClassification: `${host}occupationlab/management/edu/courseClassification/queryGlClassification`, // 查询课程分类
deleteStuClass: `${host}stuProfessionalArchitecture/deleteStuClass`, //删除学生班级 queryCourseByCondition: `${host}occupationlab/management/edu/course/queryCourseByCondition`, // 课程列表分页条件查询
getCourseById: `${host}occupationlab/management/edu/course/getCourse`, // 根据id查询课程
queryPersonalCenter:`${host}personalCenter/queryPersonalCenter`, queryChaptersAndSubsections: `${host}occupationlab/management/edu/courseChapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构
addStaffPro: `${host}staffProfessionalArchitecture/addStaffProfessionalArchitecture`, //添加员工专业 getSubsection: `${host}occupationlab/management/edu/courseSubsection/getSubsection`, // 根据小节id获取预览文件地址
queryStaffPro: `${host}staffProfessionalArchitecture/queryAllStaffProfessionalArchitecture`, //查询员工专业
deleteStaffPro: `${host}staffProfessionalArchitecture/deleteStaffProfessionalArchitecture`, //删除员工专业 getPlayAuth: `${host}nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证
deleteStaffGrade: `${host}staffGrade/deleteStaffGrade`, //删除员工部门
updateStaffPro: `${host}staffProfessionalArchitecture/updateStaffProfessionalArchitecture`, //编辑员工专业 // 资讯
queryStaffGrade: `${host}staffGrade/queryStaffGrade`, //查询员工部门 queryAllColumns: `${host}occupationlab/enterprise/information/column/queryAllColumns`, // 栏目树
queryStaffGradeDetails: `${host}staffGrade/queryStaffGradeDetails`, //查询员工部门详情 queryArticleByCondition: `${host}occupationlab/enterprise/information/article/queryArticleByCondition`, // 文章列表分页条件查询
addStaffGrade: `${host}staffGrade/addStaffGrade`, //新增员工部门 getArticle: `${host}occupationlab/enterprise/information/article/getArticle`, // 根据id查询文章
updateStaffGrade: `${host}staffGrade/updateStaffGrade`, //编辑员工部门
queryCourseDiscipline: `${loginhost}course/queryCourseDiscipline`, //查询课程学科 // 线上赛事
queryCourseProfessionalClass: `${loginhost}course/queryCourseProfessionalClass`, //查询专业类 onlineContestQuery: `${host}occupationlab/enterprise/match/onlineContest/onlineContestQuery`, // 线上赛事列表分页条件查询
queryCourseProfessional: `${loginhost}course/queryCourseProfessional`, //查询专业 addApplicant: `${host}occupationlab/enterprise/match/applicant/addApplicant`, // 添加报名人员
queryPhone: `${loginhost}userInfo/queryPhone`, //查询电话是否存在 getContestProgress: `${host}occupationlab/enterprise/match/contest-progress/getContestProgress`, // 根据赛事id查询竞赛进展
getContest: `${host}occupationlab/enterprise/match/contest/getContest`, // 根据id查询赛事
queryStaff: `${host}staff/queryStaff`, //查询员工
addStaff: `${host}staff/addStaff`, //添加员工
queryStaffDetails: `${host}staff/queryStaffDetails`, //员工详情
deleteStaff: `${host}staff/deleteStaff`, //删除员工
updateStaff: `${host}staff/updateStaff`, //更新员工
readStaff: `${host}staff/readStaff`, //上传员工模板
queryGetByClassName:`${host}makeuplist/queryGetByClassName`,
deleteExperimentalClass:`${host}experimentalClass/deleteExperimentalClass`,//删除实验班级
queryAssesmentcondition:`${host}assesment/queryAssesmentcondition`,//考核成绩表格
queryGetById:`${host}assesment/queryGetById`,//查询考核信息
updateAssesment:`${host}assesment/updateAssesment`,//修改考核
updateState:`${host}assesment/updateState`,//点击启动修改考核时间
updateAssesmentTime:`${host}assesment/updateAssesmentTime`,//点击提前结束获取当前时间
queryAssesmentScore:`${host}assesment/queryAssesmentScore`,//获取查询成绩页面
queryAssesmentAchievement:`${host}assesment/queryAssesmentAchievement`,//查询成绩明细板块
excelExport:`${host}makeuplist/excelExport`,//模板下载
importMakeuplist:`${host}makeuplist/importMakeuplist`, //模板上传 // logins: `${loginhost}userInfo/logins`, //登录
queryAllExperiment:`${host}experiment/queryAllExperiment`,//实验项目渲染, updateLogInNumber: `${loginhost}userInfo/updateLogInNumber`, //用户登录修改登录次数和登陆时间
queryAttendanceSignIn:`${host}attendance/queryAttendanceSignIn`,//获得用户ID 及考勤总数 uploadUserAvatars: `${loginhost}userInfo/uploadUserAvatars`, //上传头像
insertAttendance:`${host}Experimentallearning/insertAttendance`,//改变签到状态 loginSchool: `${loginhost}userInfo/loginSchoolClient`, //登陆查询学校
queryExperimentallearning:`${host}Experimentallearning/queryExperimentallearning`,//获取项目名和签到状态 loginRole: `${loginhost}userInfo/loginRole`, //登陆查询角色
queryCourseDetails:`${host}course/queryCourseDetails`,//获取课程简介和课程目标 save: `${host}tms/userInfo/add`, //注册
queryTeacherName:`${host}Experimentallearning/queryTeacherName`,//获取教师信息
queryStudentName:`${host}Experimentallearning/queryStudentName`,//获取学生信息 queryToken: `${loginhost}userInfo/queryToken`,
queryPracticeVo:`${host}experiment/queryPracticeVo`,//获取表格数据 queryWorkNumberIsExist: `${loginhost}userInfo/queryWorkNumberIsExist`,//查询学号、工号是否存在
queryStudentAssessment:`${host}assesmentRecord/queryStudentAssessment`, //查询姓名和个人平均分和最高分 queryAccountIsExist: `${loginhost}userInfo/queryAccountIsExist`,//查询员工,学生账号是否存在接口
queryAssesmentRecordMaxScore:`${host}assesmentRecord/queryAssesmentRecordMaxScore`, //查询学校平均分最高分
queryAssesmentRecordWhole:`${host}assesmentRecord/queryAssesmentRecordWhole`,//查询全国平均考核得分 addStuPro: `${host}stuProfessionalArchitecture/addStuProfessionalArchitecture`, //添加学生专业
queryAssesmentRecordMaxWhole:`${host}assesmentRecord/queryAssesmentRecordMaxWhole`, //查询全国平均分最高分 queryStuPro: `${host}stuProfessionalArchitecture/queryStuProfessionalArchitecture`, //查询学生专业
queryStudentByPage:`${host}experiment/queryStudentByPage`, //查询练习记录表格数据 // queryStuGrade: `${host}stuProfessionalArchitecture/queryStuGrade`, //查询学生年级
queryProject:`${host}ProjectAndCourse/queryProject`,//实验项目信息展示 // queryStuClass: `${host}stuProfessionalArchitecture/queryStuClass`, //查询学生班级
updateIsExperiment:`${host}ProjectAndCourse/updateIsExperiment`,//修改是否开启项目 deleteStuPro: `${host}stuProfessionalArchitecture/deleteStuProfessionalArchitecture`, //删除学生专业
updateIsAttendance:`${host}ProjectAndCourse/updateIsAttendance`,//修改是否考勤 updateStuPro: `${host}stuProfessionalArchitecture/updateStuProfessionalArchitecture`, //编辑学生专业
addAssesment:`${host}assesment/addAssesment`,//添加考核
queryStuProfessionalArchitecture:`${host}stuProfessionalArchitecture/queryStuProfessionalArchitecture`,//修改是否考勤 findPasswordByEmail: `${host}tms/userInfo/findPasswordByEmail`,
queryStuGrade:`${host}stuProfessionalArchitecture/queryStuGrade`,//修改是否考勤 findPasswordByPhone: `${host}tms/userInfo/findPasswordByPhone`,
queryStuClass:`${host}stuProfessionalArchitecture/queryStuClass`,//修改是否考勤 resetPassword: `${host}tms/userInfo/resetPassword`,
queryStudent:`${host}stuProfessionalArchitecture/queryStudent`,//修改是否考勤 checkCode: `${host}tms/userInfo/checkCode`,
queryAttendanceDetailed:`${host}attendance/queryAttendanceDetailed`,//获取考勤列表数据
queryStudentData: `${host}student/queryStudent`, //查询学生
queryExperimentClass:`${host}experimentalClass/queryExperimentalClass`,//查询实验班级 queryStudentDetails: `${host}student/queryStudentDetails`, //查询学生详情
queryExperimentalClassSP:`${host}experimentalClass/queryExperimentalClassSP`,//查询实验班级学生专业 addStudent: `${host}student/addStudent`, //添加学生
queryStudentClass:`${host}experimentalClass/queryStudentClass`,//查询学生行政班级 deleteStudent: `${host}student/deleteStudent`, //删除学生
queryClassDetails:`${host}experimentalClass/queryExperimentClassDetails`,//查询实验班级详情 updateStudent: `${host}student/updateStudent`, //编辑学生
updateClassName:`${host}experimentalClass/updateExperimentClassName`,//修改实验班级名称 updateStuGrade: `${host}stuProfessionalArchitecture/updateStuGrade`, //编辑学生年级
updateState:`${host}assesment/updateState`,//修改考核状态 addStuGrade: `${host}stuProfessionalArchitecture/addStuGrade`, //添加学生年级
experimentClassDeleteStudent:`${host}experimentalClass/experimentClassDeleteStudent`, //移除实验班学生 deleteStuGrade: `${host}stuProfessionalArchitecture/deleteStuGrade`, //删除学生年级
addExperimentalClass:`${host}experimentalClass/addExperimentalClass`,//添加实验班级 updateStuClass: `${host}stuProfessionalArchitecture/updateStuClass`, //编辑学生班级
platformQueryCourse:`${host}course/platformQueryCourse`, addStuClass: `${host}stuProfessionalArchitecture/addStuClass`, //添加学生班级
queryAssesment:`${host}Experimentallearning/queryAssesment`, deleteStuClass: `${host}stuProfessionalArchitecture/deleteStuClass`, //删除学生班级
getCourse:`${host}course/getCourse`,//获取课程简介,教学目标,课程名称
getProfessionals:`${host}experimentalClass/getProfessionals`,// 请求专业下拉框数据 queryPersonalCenter: `${host}personalCenter/queryPersonalCenter`,
getStudentClass:`${host}experimentalClass/getStudentClass`,//请求行政班级下拉框数据 addStaffPro: `${host}staffProfessionalArchitecture/addStaffProfessionalArchitecture`, //添加员工专业
getCourseSchedule:`${host}ProjectAndCourse/getCourseSchedule`,//课程进度 queryStaffPro: `${host}staffProfessionalArchitecture/queryAllStaffProfessionalArchitecture`, //查询员工专业
releaseAssesment:`${host}assesment/releaseAssesment`,//发布考核 deleteStaffPro: `${host}staffProfessionalArchitecture/deleteStaffProfessionalArchitecture`, //删除员工专业
experimentClassAddStudent:`${host}experimentalClass/experimentClassAddStudent`,//发布考核 deleteStaffGrade: `${host}staffGrade/deleteStaffGrade`, //删除员工部门
getExperimentalClass:`${host}assesment/getExperimentalClass`,//实验班级一级标题 updateStaffPro: `${host}staffProfessionalArchitecture/updateStaffProfessionalArchitecture`, //编辑员工专业
getCreationTime:`${host}assesment/getCreationTime`,//实验班级二级标题 queryStaffGrade: `${host}staffGrade/queryStaffGrade`, //查询员工部门
deleteAssesment:`${host}assesment/deleteAssesment`,//删除考核 queryStaffGradeDetails: `${host}staffGrade/queryStaffGradeDetails`, //查询员工部门详情
queryStudentCourse:`${host}Experimentallearning/queryStudentCourse`,//学生查询课程 addStaffGrade: `${host}staffGrade/addStaffGrade`, //新增员工部门
getByCourseId:`${host}assesment/getByCourseId`,//查询系统列表 updateStaffGrade: `${host}staffGrade/updateStaffGrade`, //编辑员工部门
getCoursevideo:`${host}tms/classTech/simulationPlayList`,//开始课程-课程视频 queryCourseDiscipline: `${loginhost}course/queryCourseDiscipline`, //查询课程学科
queryStaffPAN:`${host}staffProfessionalArchitecture/queryStaffPAN`,//查询员工专业是否存在 queryCourseProfessionalClass: `${loginhost}course/queryCourseProfessionalClass`, //查询专业类
queryStudentisAssess:`${host}assesment/queryStudentisAssess`,//查看正在参与考核的学生 queryCourseProfessional: `${loginhost}course/queryCourseProfessional`, //查询专业
queryPhone: `${loginhost}userInfo/queryPhone`, //查询电话是否存在
queryProvince: `${loginhost}province/queryProvince`, //查询省份
queryCity: `${loginhost}city/queryCity`, //查询城市 queryStaff: `${host}staff/queryStaff`, //查询员工
querySchoolData: `${loginhost}customer/querySchool`, //根据学校名称查询学校信息 addStaff: `${host}staff/addStaff`, //添加员工
queryStaffDetails: `${host}staff/queryStaffDetails`, //员工详情
examinePassword:`${host}tms/user/examinePassword`,//更换密码 deleteStaff: `${host}staff/deleteStaff`, //删除员工
userinfoUpdate:`${host}tms/user/update`,//个人中心信息修改 updateStaff: `${host}staff/updateStaff`, //更新员工
userinfo:`${host}tms/user/userinfo`,//个人中心信息展示 readStaff: `${host}staff/readStaff`, //上传员工模板
sendEmailCode:`${host}tms/user/sendEmailCode`,//发送邮箱验证码
bingEmail:`${host}tms/user/bingEmail`,//邮箱验证并更新 queryGetByClassName: `${host}makeuplist/queryGetByClassName`,
sendPhoneCode:`${host}tms/user/sendPhoneCode`,//发送手机验证码 deleteExperimentalClass: `${host}experimentalClass/deleteExperimentalClass`,//删除实验班级
bindPhone:`${host}tms/user/bindPhone`,//校验手机验证码 queryAssesmentcondition: `${host}assesment/queryAssesmentcondition`,//考核成绩表格
queryGetById: `${host}assesment/queryGetById`,//查询考核信息
canExperiment: `${host}tms/evaluationrecord/can_experiment`, //查询是否能够开启实验 updateAssesment: `${host}assesment/updateAssesment`,//修改考核
openExercise: `${host}tms/evaluationrecord/openExercise`, //查询是否能够开启虚拟仿真实验 // updateState: `${host}assesment/updateState`,//点击启动修改考核时间
openTeaching: `${host}tms/evaluationrecord/openTeaching`, //查询是否能够开启教学实验 updateAssesmentTime: `${host}assesment/updateAssesmentTime`,//点击提前结束获取当前时间
experimentDetail: `${host}tms/evaluationrecord/detail`, //成绩详情 queryAssesmentScore: `${host}assesment/queryAssesmentScore`,//获取查询成绩页面
experimentNext: `${host}tms/evaluationrecord/next`, //下一题 queryAssesmentAchievement: `${host}assesment/queryAssesmentAchievement`,//查询成绩明细板块
experimentNotmade: `${host}tms/evaluationrecord/not_made`, //提交之前查询是否还有未做完的试题 excelExport: `${host}makeuplist/excelExport`,//模板下载
experimentPrevious: `${host}tms/evaluationrecord/previous`, //上一题 importMakeuplist: `${host}makeuplist/importMakeuplist`, //模板上传
experimentRemaining: `${host}tms/evaluationrecord/remaining`, //获取测评剩余时间 queryAllExperiment: `${host}experiment/queryAllExperiment`,//实验项目渲染,
experimentStart: `${host}tms/evaluationrecord/start`, //开始测评 queryAttendanceSignIn: `${host}attendance/queryAttendanceSignIn`,//获得用户ID 及考勤总数
experimentSubmit: `${host}tms/evaluationrecord/submit`, //提交测评 insertAttendance: `${host}Experimentallearning/insertAttendance`,//改变签到状态
queryExperimentallearning: `${host}Experimentallearning/queryExperimentallearning`,//获取项目名和签到状态
fictitiousRecord: `${host}fictitious/projectrecord/user/record`, //用户端实验记录 queryCourseDetails: `${host}course/queryCourseDetails`,//获取课程简介和课程目标
exportProjectRecord: `${host}fictitious/projectrecord/user/exportProjectRecord`, //虚拟实验记录导出 queryTeacherName: `${host}Experimentallearning/queryTeacherName`,//获取教师信息
exportExperimentProjectRecord: `${host}fictitious/projectrecord/user/exportExperimentProjectRecord`, //个人实验记录导出 queryStudentName: `${host}Experimentallearning/queryStudentName`,//获取学生信息
fictitiousScore: `${host}fictitious/projectrecord/user/score`, //个人实验概览 queryPracticeVo: `${host}experiment/queryPracticeVo`,//获取表格数据
experimentRecord: `${host}fictitious/projectrecord/user/experimentRecord`, //用户端教学实验记录 queryStudentAssessment: `${host}assesmentRecord/queryStudentAssessment`, //查询姓名和个人平均分和最高分
queryAssesmentRecordMaxScore: `${host}assesmentRecord/queryAssesmentRecordMaxScore`, //查询学校平均分最高分
joinPractice: `${host}tms/classTech/joinPractice`, //通过邀请码进入实验 queryAssesmentRecordWhole: `${host}assesmentRecord/queryAssesmentRecordWhole`,//查询全国平均考核得分
queryArchievement: `${host}tms/classTech/queryExperimentalReport`, //查看教学实验报告 queryAssesmentRecordMaxWhole: `${host}assesmentRecord/queryAssesmentRecordMaxWhole`, //查询全国平均分最高分
queryVirtualReport: `${host}tms/classTech/queryVirtualReport`, //查看虚仿实验报告 queryStudentByPage: `${host}experiment/queryStudentByPage`, //查询练习记录表格数据
checkInvitationCode: `${host}tms/classTech/checkInvitationCode`, //校验是否需要邀请码 queryProject: `${host}ProjectAndCourse/queryProject`,//实验项目信息展示
userRecord: `${host}tms/classTech/userRecord`, //查询班级实验列表信息 updateIsExperiment: `${host}ProjectAndCourse/updateIsExperiment`,//修改是否开启项目
modifyReport: `${host}Achievement/modify`, updateIsAttendance: `${host}ProjectAndCourse/updateIsAttendance`,//修改是否考勤
} addAssesment: `${host}assesment/addAssesment`,//添加考核
queryStuProfessionalArchitecture: `${host}stuProfessionalArchitecture/queryStuProfessionalArchitecture`,//修改是否考勤
queryStuGrade: `${host}stuProfessionalArchitecture/queryStuGrade`,//修改是否考勤
queryStuClass: `${host}stuProfessionalArchitecture/queryStuClass`,//修改是否考勤
queryStudent: `${host}stuProfessionalArchitecture/queryStudent`,//修改是否考勤
queryAttendanceDetailed: `${host}attendance/queryAttendanceDetailed`,//获取考勤列表数据
queryExperimentClass: `${host}experimentalClass/queryExperimentalClass`,//查询实验班级
queryExperimentalClassSP: `${host}experimentalClass/queryExperimentalClassSP`,//查询实验班级学生专业
queryStudentClass: `${host}experimentalClass/queryStudentClass`,//查询学生行政班级
queryClassDetails: `${host}experimentalClass/queryExperimentClassDetails`,//查询实验班级详情
updateClassName: `${host}experimentalClass/updateExperimentClassName`,//修改实验班级名称
updateState: `${host}assesment/updateState`,//修改考核状态
experimentClassDeleteStudent: `${host}experimentalClass/experimentClassDeleteStudent`, //移除实验班学生
addExperimentalClass: `${host}experimentalClass/addExperimentalClass`,//添加实验班级
platformQueryCourse: `${host}course/platformQueryCourse`,
queryAssesment: `${host}Experimentallearning/queryAssesment`,
getCourse: `${host}course/getCourse`,//获取课程简介,教学目标,课程名称
getProfessionals: `${host}experimentalClass/getProfessionals`,// 请求专业下拉框数据
getStudentClass: `${host}experimentalClass/getStudentClass`,//请求行政班级下拉框数据
getCourseSchedule: `${host}ProjectAndCourse/getCourseSchedule`,//课程进度
releaseAssesment: `${host}assesment/releaseAssesment`,//发布考核
experimentClassAddStudent: `${host}experimentalClass/experimentClassAddStudent`,//发布考核
getExperimentalClass: `${host}assesment/getExperimentalClass`,//实验班级一级标题
getCreationTime: `${host}assesment/getCreationTime`,//实验班级二级标题
deleteAssesment: `${host}assesment/deleteAssesment`,//删除考核
queryStudentCourse: `${host}Experimentallearning/queryStudentCourse`,//学生查询课程
getByCourseId: `${host}assesment/getByCourseId`,//查询系统列表
getCoursevideo: `${host}tms/classTech/simulationPlayList`,//开始课程-课程视频
queryStaffPAN: `${host}staffProfessionalArchitecture/queryStaffPAN`,//查询员工专业是否存在
queryStudentisAssess: `${host}assesment/queryStudentisAssess`,//查看正在参与考核的学生
queryProvince: `${loginhost}province/queryProvince`, //查询省份
queryCity: `${loginhost}city/queryCity`, //查询城市
querySchoolData: `${loginhost}customer/querySchool`, //根据学校名称查询学校信息
examinePassword: `${host}tms/user/examinePassword`,//更换密码
userinfoUpdate: `${host}tms/user/update`,//个人中心信息修改
userinfo: `${host}tms/user/userinfo`,//个人中心信息展示
sendEmailCode: `${host}tms/user/sendEmailCode`,//发送邮箱验证码
bingEmail: `${host}tms/user/bingEmail`,//邮箱验证并更新
sendPhoneCode: `${host}tms/user/sendPhoneCode`,//发送手机验证码
bindPhone: `${host}tms/user/bindPhone`,//校验手机验证码
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,20 +9,23 @@
: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"
{{currentPage}} / {{pageCount}} :class="{grey: currentPage==1}"></span>
<span @click="changePdfPage(1)" class="turn el-icon-arrow-right" :class="{grey: currentPage==pageCount}"></span> {{ currentPage }} / {{ pageCount }}
<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"
:src="src" :src="src"
:page="currentPage" :page="currentPage"
@num-pages="pageCount=$event" @num-pages="pageCount=$event"
@page-loaded="currentPage=$event" @page-loaded="currentPage=$event"
@loaded="loadPdfHandler" @loaded="loadPdfHandler"
> >
</pdf> </pdf>
</div> </div>
@ -32,93 +35,100 @@
</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',() => { this.$once("hook:beforeDestroy", () => {
document.onkeydown = null document.onkeydown = null;
}) });
} }
} }
}; };
</script> </script>
<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{
display: none; .el-dialog__header {
} display: none;
.el-dialog__body{ }
padding: 0;
.el-dialog__body {
padding: 0;
}
.el-dialog__headerbtn {
top: 10px;
.el-dialog__close {
color: #fff;
font-size: 16px;
} }
.el-dialog__headerbtn{ }
top: 10px;
.el-dialog__close{ .pdf {
color: #fff; .arrow {
font-size: 16px; display: flex;
justify-content: center;
align-items: center;
width: 100%;
padding: 10px 0;
font-size: 16px;
color: #fff;
background-color: #333;
.turn {
margin: 0 10px;
font-size: 18px;
cursor: pointer;
} }
} }
.pdf{ .pdf-wrap {
.arrow{ height: calc(100vh - 45px);
display: flex; margin: 0 auto;
justify-content: center; overflow: auto;
align-items: center;
width: 100%;
padding: 10px 0;
font-size: 16px;
color: #fff;
background-color: #333;
.turn{
margin: 0 10px;
font-size: 18px;
cursor: pointer;
}
}
.pdf-wrap{
height: calc(100vh - 45px);
margin: 0 auto;
overflow: auto;
}
} }
} }
}
</style> </style>

@ -2,178 +2,180 @@
<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: {
type: Boolean,
default: false
},
toTop: {
type: Boolean,
default: true
},
border: {
type: Boolean,
default: false
},
height: {
type: Number
},
minHeight: {
type: Number
}
}, },
data () { readonly: {
return { type: Boolean,
Quill: null, default: false
currentValue: '', },
options: { toTop: {
theme: 'snow', type: Boolean,
bounds: document.body, default: true
debug: 'warn', },
modules: { border: {
toolbar: { type: Boolean,
container: toolbarOptions, default: false
handlers: { },
'image': function (value) { height: {
if (value) { type: Number
// iview },
document.querySelector('.editorUpload').click() minHeight: {
} else { type: Number
this.Quill.format('image', false); }
} },
data() {
return {
Quill: null,
currentValue: "",
options: {
theme: "snow",
bounds: document.body,
debug: "warn",
modules: {
toolbar: {
container: toolbarOptions,
handlers: {
"image": function(value) {
if (value) {
// iview
document.querySelector(".editorUpload").click();
} else {
this.Quill.format("image", false);
} }
} }
} }
},
placeholder: '',
readOnly: this.readonly
},
loading: false
}
},
computed: {
classes () {
return [
{
'quill-no-border': !this.border
} }
]; },
placeholder: "",
readOnly: this.readonly
}, },
styles () { loading: false
let style = {}; };
if (this.minHeight) { },
style.minHeight = `${this.minHeight}px`; computed: {
} classes() {
if (this.height) { return [
style.height = `${this.height}px`; {
"quill-no-border": !this.border
} }
return style; ];
}
}, },
watch: { styles() {
value: { let style = {};
handler (val) { if (this.minHeight) {
if (val !== this.currentValue) { style.minHeight = `${this.minHeight}px`;
this.currentValue = val; }
if (this.Quill) { if (this.height) {
this.Quill.pasteHTML(this.value); style.height = `${this.height}px`;
} }
return style;
}
},
watch: {
value: {
handler(val) {
if (val !== this.currentValue) {
this.currentValue = val;
if (this.Quill) {
this.Quill.pasteHTML(this.value);
} }
}, }
immediate: true },
immediate: true
}
},
mounted() {
this.init();
},
beforeDestroy() {
//
this.Quill = null;
},
methods: {
init() {
const editor = this.$refs.editor;
//
this.Quill = new Quill(editor, this.options);
//
this.Quill.pasteHTML(this.currentValue);
if (this.toTop) {
this.$nextTick(() => {
window.scrollTo(0, 0);
});
} }
//
this.Quill.on("text-change", (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML;
const text = this.Quill.getText();
const quill = this.Quill;
//
this.currentValue = html;
// v-model
this.$emit("input", html);
//
this.$emit("on-change", { html, text, quill });
});
// quill
this.Quill.on("text-change", (delta, oldDelta, source) => {
this.$emit("on-text-change", delta, oldDelta, source);
});
this.Quill.on("selection-change", (range, oldRange, source) => {
this.$emit("on-selection-change", range, oldRange, source);
});
this.Quill.on("editor-change", (eventName, ...args) => {
this.$emit("on-editor-change", eventName, ...args);
});
}, },
mounted () { beforeUpload(file) {
this.init(); this.loading = true;
}, },
beforeDestroy () { editorUploadSuccess(res) {
// //
this.Quill = null; let quill = this.Quill;
}, //
methods: { if (res.data.filesResult.fileUrl) {
init () { //
const editor = this.$refs.editor; let length = quill.getSelection().index;
// // res
this.Quill = new Quill(editor, this.options); quill.insertEmbed(length, "image", res.data.filesResult.fileUrl);
// //
this.Quill.pasteHTML(this.currentValue); quill.setSelection(length + 1);
if(this.toTop){ } else {
this.$nextTick(() => { this.$message.success("图片插入失败");
window.scrollTo(0,0) }
}) this.loading = false;
}
//
this.Quill.on('text-change', (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML;
const text = this.Quill.getText();
const quill = this.Quill;
//
this.currentValue = html;
// v-model
this.$emit('input', html);
//
this.$emit('on-change', { html, text, quill });
});
// quill
this.Quill.on('text-change', (delta, oldDelta, source) => {
this.$emit('on-text-change', delta, oldDelta, source);
});
this.Quill.on('selection-change', (range, oldRange, source) => {
this.$emit('on-selection-change', range, oldRange, source);
});
this.Quill.on('editor-change', (eventName, ...args) => {
this.$emit('on-editor-change', eventName, ...args);
});
},
beforeUpload(file){
this.loading = true
},
editorUploadSuccess (res) {
//
let quill = this.Quill
//
if (res.data.filesResult.fileUrl) {
//
let length = quill.getSelection().index;
// res
quill.insertEmbed(length, 'image', res.data.filesResult.fileUrl)
//
quill.setSelection(length + 1)
} else {
this.$message.success('图片插入失败')
}
this.loading = false
},
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.quill-no-border{ .quill-no-border {
.ql-toolbar.ql-snow{ .ql-toolbar.ql-snow {
border: none; border: none;
border-bottom: 1px solid #e8eaec; border-bottom: 1px solid #e8eaec;
} }
.ql-container.ql-snow{
border: none; .ql-container.ql-snow {
} border: none;
} }
}
</style> </style>

@ -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,36 +8,35 @@
<script> <script>
export default { export default {
data() { data() {
return { return {};
};
}, },
mounted(){ mounted() {
},
methods: {
}, },
methods: {}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.copyright{ .copyright {
padding: 20px 0; padding: 20px 0;
color: rgba(0, 0, 0, 0.45); color: rgba(0, 0, 0, 0.45);
font-size: 12px;
text-align: center;
background-color: #333;
p {
margin-bottom: 10px;
color: #fff;
font-size: 12px; font-size: 12px;
text-align: center; }
background-color: #333;
p{ a {
margin-bottom: 10px; color: #fff;
color: #fff; font-size: 12px;
font-size: 12px;
} &:hover {
a{ opacity: .8;
color:#fff;
font-size: 12px;
&:hover{
opacity: .8;
}
} }
} }
}
</style> </style>

@ -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">
@ -9,7 +10,7 @@
<div class="header-user-con"> <div class="header-user-con">
<div class="user" @click="toPersonal"> <div class="user" @click="toPersonal">
<el-avatar :size="40" :src="avatar"></el-avatar> <el-avatar :size="40" :src="avatar"></el-avatar>
<span class="user-avator">{{userName}}</span> <span class="user-avator">{{ userName }}</span>
</div> </div>
<el-divider class="ml20" direction="vertical"></el-divider> <el-divider class="ml20" direction="vertical"></el-divider>
<el-button type="text" class="ml20" @click="logout">退出</el-button> <el-button type="text" class="ml20" @click="logout">退出</el-button>
@ -18,38 +19,39 @@
</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">
.goBack{ .goBack {
cursor: pointer; cursor: pointer;
line-height: 60px; line-height: 60px;
height: 60px; height: 60px;
@ -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,46 +76,56 @@ 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;
.user{ .user {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
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;
} }
</style> </style>

@ -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,39 +33,38 @@ 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);
} }
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main{ .main {
min-height: 100%; min-height: 100%;
.view{
min-height: calc(100vh - 175px); .view {
padding: 24px; min-height: calc(100vh - 175px);
} padding: 24px;
} }
}
</style> </style>

@ -1,82 +1,87 @@
<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() {
}, },
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>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-tabs__header{ /deep/ .el-tabs__header {
z-index: 2; z-index: 2;
padding: 20px 60px 0; padding: 20px 60px 0;
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;
.el-tabs__nav-wrap::after {
background-color: #fff; background-color: #fff;
.el-tabs__nav-wrap::after{
background-color: #fff; .el-tabs__item {
.el-tabs__item{ padding: 0 30px;
padding: 0 30px; outline: none;
outline: none;
}
} }
} }
}
</style> </style>

@ -2,24 +2,25 @@
* @description 生成按钮级别权限组 * @description 生成按钮级别权限组
* */ * */
import store from '@/store'; import store from "@/store";
export default function(data){
let result = [] export default function(data) {
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,14 +21,14 @@ 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}`);
}; };
/** /**
* @description 拿到 cookie 全部的值 * @description 拿到 cookie 全部的值
*/ */
cookies.getAll = function () { cookies.getAll = function() {
return Cookies.get(); return Cookies.get();
}; };
@ -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,20 +55,20 @@ var _local = {
clear() { clear() {
localStorage.clear(); localStorage.clear();
} }
} };
/** /**
* sessionStorage * sessionStorage
*/ */
var _session = { var _session = {
get: function (key) { get: function(key) {
var data = sessionStorage[key]; var data = sessionStorage[key];
if (!data || data === "null") { if (!data || data === "null") {
return null; return null;
} }
return data; return data;
}, },
set: function (key, value) { set: function(key, value) {
sessionStorage[key] = value; sessionStorage[key] = value;
}, },
// 删除 // 删除
@ -79,5 +79,5 @@ var _session = {
clear() { clear() {
sessionStorage.clear(); sessionStorage.clear();
} }
} };
export { _local, _session } export { _local, _session };

@ -1,159 +1,178 @@
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,
session: _session, session: _session,
// 传入身份证获取生日 // 传入身份证获取生日
getBirth(idCard) { getBirth(idCard) {
var birthday = ""; var birthday = "";
if(idCard != null && idCard != ""){ if (idCard != null && idCard != "") {
if(idCard.length == 15){ if (idCard.length == 15) {
birthday = "19"+idCard.slice(6,12); birthday = "19" + idCard.slice(6, 12);
} else if(idCard.length == 18){ } else if (idCard.length == 18) {
birthday = idCard.slice(6,14); birthday = idCard.slice(6, 14);
} }
birthday = birthday.replace(/(.{4})(.{2})/,"$1-$2-"); birthday = birthday.replace(/(.{4})(.{2})/, "$1-$2-");
//通过正则表达式来指定输出格式为:1990-01-01 //通过正则表达式来指定输出格式为:1990-01-01
}
return birthday;
},
// new Date('2020-11-12 00:00:00') 在IE下失效,因此把-替换成/
dateCompatible(date) {
return date.replace(/\-/g, '/')
},
// 日期时间前面补零
formateTime(num) {
return num < 10 ? `0${num}` : num
},
//返回格式化时间,传参例如:"yyyy-MM-dd hh:mm:ss"
formatDate(fmt,date) {
var date = date ? date : new Date()
var o = {
"M+" : date.getMonth()+1, //月份
"d+" : date.getDate(), //日
"h+" : date.getHours(), //小时
"m+" : date.getMinutes(), //分
"s+" : date.getSeconds(), //秒
"q+" : Math.floor((date.getMonth()+3)/3), //季度
"S" : date.getMilliseconds() //毫秒
};
if(/(y+)/.test(fmt)) {
fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length));
}
for(var k in o) {
if(new RegExp("("+ k +")").test(fmt)){
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
} }
} return birthday;
return fmt; },
}, // new Date('2020-11-12 00:00:00') 在IE下失效,因此把-替换成/
// 移除数组中指定值 dateCompatible(date) {
removeByValue(arr, val) { return date.replace(/\-/g, "/");
for(var i=0; i<arr.length; i++) { },
if(arr[i] == val) { // 日期时间前面补零
arr.splice(i, 1); formateTime(num) {
break; return num < 10 ? `0${num}` : num;
},
//返回格式化时间,传参例如:"yyyy-MM-dd hh:mm:ss"
formatDate(fmt, date) {
var date = date ? date : new Date();
var o = {
"M+": date.getMonth() + 1, //月份
"d+": date.getDate(), //日
"h+": date.getHours(), //小时
"m+": date.getMinutes(), //分
"s+": date.getSeconds(), //秒
"q+": Math.floor((date.getMonth() + 3) / 3), //季度
"S": date.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
} }
} for (var k in o) {
}, if (new RegExp("(" + k + ")").test(fmt)) {
// 传入文件后缀判断是否是视频 fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
isVideo(ext) { }
if('mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv'.includes(ext)) return true }
return false return fmt;
}, },
// 传入文件后缀判断是否是音频 // 移除数组中指定值
isAudio(ext) { removeByValue(arr, val) {
if('mp3,aac,ape,flac,wav,wma,amr,mid'.includes(ext)) return true for (var i = 0; i < arr.length; i++) {
return false if (arr[i] == val) {
}, arr.splice(i, 1);
// 传入文件后缀判断是否是图片 break;
isImg(ext) { }
if('jpg,jpeg,png,gif,svg,psd'.includes(ext)) return true }
return false },
}, // 传入文件后缀判断是否是视频
// 传入文件后缀判断是否是pdf以外的文档 isVideo(ext) {
isDoc(ext) { if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return true;
if(!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && ext != 'pdf') return true return false;
return false },
}, // 传入文件后缀判断是否是音频
// 循环去除html标签 isAudio(ext) {
removeHtmlTag(list,attr) { if ("mp3,aac,ape,flac,wav,wma,amr,mid".includes(ext)) return true;
list.map(n => { return false;
n[attr] = n[attr].replace(/<\/?.+?>/gi,'') },
}) // 传入文件后缀判断是否是图片
return list isImg(ext) {
}, if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return true;
// 传入文件名获取文件后缀 return false;
getFileExt(fileName) { },
return fileName.substring(fileName.lastIndexOf('.') + 1) // 传入文件后缀判断是否是pdf以外的文档
}, isDoc(ext) {
// 传入文件名和路径,下载图片视频,支持跨域,a标签加download不支持跨域 if (!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && ext != "pdf") return true;
downloadFile(fileName,url) { return false;
var x = new XMLHttpRequest() },
x.open("GET", url, true) // 循环去除html标签
x.responseType = 'blob' removeHtmlTag(list, attr) {
x.onload=function(e) { list.map(n => {
var url = window.URL.createObjectURL(x.response) n[attr] = n[attr].replace(/<\/?.+?>/gi, "");
var a = document.createElement('a') });
a.href = url return list;
a.download = fileName },
a.click() // 传入文件名获取文件后缀
} getFileExt(fileName) {
x.send() return fileName.substring(fileName.lastIndexOf(".") + 1);
}, },
// 传入文件名和数据,下载文件 // 传入文件名和路径,下载图片视频,支持跨域,a标签加download不支持跨域
downloadFileDirect(fileName,data) { downloadFile(fileName, url) {
if ('download' in document.createElement('a')) { // 非IE下载 var x = new XMLHttpRequest();
const elink = document.createElement('a') x.open("GET", url, true);
elink.download = fileName x.responseType = "blob";
elink.style.display = 'none' x.onload = function(e) {
elink.href = URL.createObjectURL(data) var url = window.URL.createObjectURL(x.response);
document.body.appendChild(elink) var a = document.createElement("a");
elink.click() a.href = url;
URL.revokeObjectURL(elink.href) // 释放URL 对象 a.download = fileName;
document.body.removeChild(elink) a.click();
} else { // IE10+下载 };
navigator.msSaveBlob(data, fileName) x.send();
} },
}, // 传入文件名和数据,下载文件
// 成功提示 downloadFileDirect(fileName, data) {
successMsg(message,duration = 3000) { if ("download" in document.createElement("a")) { // 非IE下载
return Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) const elink = document.createElement("a");
}, elink.download = fileName;
// 警告提示 elink.style.display = "none";
warningMsg(message,duration = 3000) { elink.href = URL.createObjectURL(data);
return Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) document.body.appendChild(elink);
}, elink.click();
// 错误提示 URL.revokeObjectURL(elink.href); // 释放URL 对象
errorMsg(message,duration = 3000) { document.body.removeChild(elink);
return Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) } else { // IE10+下载
}, navigator.msSaveBlob(data, fileName);
// 登录互踢 }
getToken(){ },
if(process.env.NODE_ENV == 'production'){ // 成功提示
if(store.state.user.dataTime && !logout){ successMsg(message, duration = 3000) {
axios.get(`${api.queryToken}?token=${_local.get(Setting.tokenKey)}`).then(res => { Message.closeAll();
if(store.state.user.dataTime && (res.data.message != store.state.user.dataTime)){ return Message.success({
logout || Message.error('您已在另一台设备登录,本次登录已下线!') message,
logout = true showClose: true,
setTimeout(() => { offset: (document.documentElement.clientHeight - 40) / 2,
_local.remove(Setting.storeKey) duration
_local.remove(Setting.tokenKey) });
location.reload() },
},1500) // 警告提示
} warningMsg(message, duration = 3000) {
}).catch(err => {}) Message.closeAll();
return Message.warning({
message,
showClose: true,
offset: (document.documentElement.clientHeight - 40) / 2,
duration
});
},
// 错误提示
errorMsg(message, duration = 3000) {
Message.closeAll();
return Message.error({
message,
showClose: true,
offset: (document.documentElement.clientHeight - 40) / 2,
duration
});
},
// 登录互踢
getToken() {
if (process.env.NODE_ENV == "production") {
if (store.state.user.dataTime && !logout) {
axios.get(`${api.queryToken}?token=${_local.get(Setting.tokenKey)}`).then(res => {
if (store.state.user.dataTime && (res.data.message != store.state.user.dataTime)) {
logout || Message.error("您已在另一台设备登录,本次登录已下线!");
logout = true;
setTimeout(() => {
_local.remove(Setting.storeKey);
_local.remove(Setting.tokenKey);
location.reload();
}, 1500);
}
}).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");

@ -4,8 +4,8 @@
export default { export default {
methods: { methods: {
// 当 $route 更新时触发 // 当 $route 更新时触发
appRouteChange (to, from) { appRouteChange(to, from) {
} }
} }
} };

@ -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,103 +150,111 @@
</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: {
register, register,
vFooter vFooter
}, },
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;
} }
}); });
}, },
@ -241,46 +263,47 @@ export default {
let data = { let data = {
userId: this.userId, userId: this.userId,
schoolId: this.schoolId schoolId: this.schoolId
}; };
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,276 +327,327 @@ 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>
<style scoped lang="scss"> <style scoped lang="scss">
.wrap { .wrap {
position: relative; position: relative;
width: 100%;
height: 100%;
overflow: hidden;
.header {
width: 100%; width: 100%;
height: 100%; height: 60px;
overflow: hidden; background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 18px;
box-shadow: 1px 1px 3px 2px #ececec;
.header { .logo {
width: 100%; width: 150px;
height: 60px; margin-left: 20px;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 18px;
box-shadow: 1px 1px 3px 2px #ececec;
.logo {
width: 150px;
margin-left: 20px;
}
} }
.bg{ }
display: flex;
justify-content: space-between; .bg {
align-items: center; display: flex;
height: calc(100% - 116px); justify-content: space-between;
.left{ align-items: center;
position: relative; height: calc(100% - 116px);
width: 40%;
height: 100%; .left {
background: url(../../../assets/img/bg_2.png) 0 0/100% 100% no-repeat; position: relative;
.text{ width: 40%;
position: absolute; height: 100%;
top: 35%; background: url(../../../assets/img/bg_2.png) 0 0/100% 100% no-repeat;
left: 15%;
color: #fff; .text {
font-size: 46px; position: absolute;
font-weight: bold; top: 35%;
p:first-child{ left: 15%;
margin-bottom: 20px; color: #fff;
} font-size: 46px;
font-weight: bold;
p:first-child {
margin-bottom: 20px;
} }
} }
.right{
width: 50%;
height: 100%;
background: url(../../../assets/img/bg_1.png) center center/80% auto no-repeat;
}
} }
/deep/.right-form{ .right {
width: 50%;
height: 100%;
background: url(../../../assets/img/bg_1.png) center center/80% auto no-repeat;
}
}
/deep/ .right-form {
position: absolute;
top: 47%;
right: 12%;
transform: translateY(-50%);
width: 30%;
.logo {
width: 100%;
margin-bottom: 40px;
}
.form {
padding: 50px 20px 20px;
background-color: #fff;
border-radius: 16px;
box-sizing: border-box;
box-shadow: 0 1px 20px rgba(146, 120, 255, 0.3);
}
.back {
position: absolute; position: absolute;
top: 47%; top: 20px;
right: 12%; left: 20px;
transform: translateY(-50%); font-size: 24px;
width: 30%; color: #9278ff;
cursor: pointer;
.logo{
width: 100%; &:hover {
margin-bottom: 40px; opacity: .8;
} }
.form{ }
padding: 50px 20px 20px;
background-color: #fff; .el-tabs__nav-scroll {
border-radius: 16px; display: flex;
box-sizing: border-box; justify-content: center;
box-shadow: 0 1px 20px rgba(146,120,255,0.3); }
h2 {
padding-bottom: 10px;
font-size: 20px;
font-weight: 400;
color: #8F73FF;
text-align: center;
border-bottom: 1px solid #f3f3f3;
}
.el-form {
width: 70%;
margin: 30px auto 0;
.label {
line-height: 1.8;
color: #929292;
} }
.back{
position: absolute;
top: 20px;
left: 20px;
font-size: 24px;
color: #9278ff;
cursor: pointer;
&:hover{ /deep/ .el-input__inner {
opacity: .8; height: 46px;
} padding: 0 23px;
line-height: 46px;
border: 1px solid #E5E5E5;
border-radius: 8px !important;
} }
.el-tabs__nav-scroll{
display: flex; /deep/ .el-form-item__error {
justify-content: center; top: 105%;
left: auto;
right: 0;
color: #FFA94E;
} }
h2{ .verification {
padding-bottom: 10px; position: absolute;
font-size: 20px; right: 0px;
font-weight: 400; width: 100px;
color: #8F73FF; height: 40px;
text-align: center; border: 1px solid #DCDFE6;
border-bottom: 1px solid #f3f3f3; cursor: pointer;
} }
.el-form{
width: 70%; .submit {
margin: 30px auto 0; width: 100%;
.label{ height: 48px;
line-height: 1.8; margin-top: 40px;
color: #929292; line-height: 48px;
} padding: 0;
/deep/.el-input__inner{ font-size: 18px;
height: 46px; background-color: #9278ff;
padding: 0 23px; border-radius: 6px;
line-height: 46px; border: 0;
border: 1px solid #E5E5E5;
border-radius: 8px !important;
}
/deep/.el-form-item__error{
top: 105%;
left: auto;
right: 0;
color: #FFA94E;
}
.submit{
width: 100%;
height: 48px;
margin-top: 40px;
line-height: 48px;
padding: 0;
font-size: 18px;
background-color: #9278ff;
border-radius: 6px;
border: 0;
}
} }
} }
} }
.switch{ }
span{
cursor: pointer; .switch {
color: #9076FF; span {
} cursor: pointer;
} color: #9076FF;
.links{
width: 70%;
margin: 20px auto 0;
text-align: right;
}
.ques{
color: #9278ff;
font-size: 14px;
}
.forget{
color: #ffa94e;
font-size: 14px;
} }
}
.links {
width: 70%;
margin: 20px auto 0;
text-align: right;
}
.ques {
color: #9278ff;
font-size: 14px;
}
.forget {
color: #ffa94e;
font-size: 14px;
}
</style> </style>

@ -2,7 +2,7 @@
<div> <div>
<!-- <h2><div class="back" @click="toLogin"><i class="el-icon-arrow-left">返回</i></div> 学生注册</h2> --> <!-- <h2><div class="back" @click="toLogin"><i class="el-icon-arrow-left">返回</i></div> 学生注册</h2> -->
<h2>账号注册</h2> <h2>账号注册</h2>
<el-form class="register" :model="regForm" :rules="regRules" ref="reg" label-width="0px"> <el-form class="register" :model="regForm" :rules="regRules" ref="reg" label-width="0px">
<div class="line"> <div class="line">
<el-form-item prop="userName"> <el-form-item prop="userName">
@ -25,28 +25,29 @@
<p class="prop">省份</p> <p class="prop">省份</p>
<el-select v-model="regForm.provinceId" placeholder="省份" @change="getCity"> <el-select v-model="regForm.provinceId" placeholder="省份" @change="getCity">
<el-option <el-option
v-for="item in provinceList" v-for="item in provinceList"
:key="item.value" :key="item.value"
:label="item.provinceName" :label="item.provinceName"
:value="item.provinceId" :value="item.provinceId"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="cityId" style="margin-right: 5%"> <el-form-item prop="cityId" style="margin-right: 5%">
<p class="prop">城市</p> <p class="prop">城市</p>
<el-select v-model="regForm.cityId" placeholder="城市" @change="getSchoolData"> <el-select v-model="regForm.cityId" placeholder="城市" @change="getSchoolData">
<el-option <el-option
v-for="item in cityList" v-for="item in cityList"
:key="item.value" :key="item.value"
:label="item.cityName" :label="item.cityName"
:value="item.cityId" :value="item.cityId"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<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,10 +69,11 @@
<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>
<el-button class="submit" type="primary" @click="registerForm">注册</el-button> <el-button class="submit" type="primary" @click="registerForm">注册</el-button>
</el-form> </el-form>
</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,118 +122,132 @@ 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;
} }
}); });
}, },
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() {
let res = await this.$get(this.api.queryWorkNumberIsExist, { let res = await this.$get(this.api.queryWorkNumberIsExist, {
workNumber: this.regForm.workNumber, workNumber: this.regForm.workNumber,
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>
<style scoped lang="scss"> <style scoped lang="scss">
.wrap { .wrap {
.form{ .form {
.register{ .register {
width: 90% !important; width: 90% !important;
.line{
display: flex; .line {
justify-content: space-between; display: flex;
align-items: flex-end; justify-content: space-between;
} align-items: flex-end;
.el-form-item{ }
&:first-child{
margin-right: 5%; .el-form-item {
} &:first-child {
} margin-right: 5%;
.label{
margin-bottom: 0;
}
.prop{
color: #929292;
}
.code-btn{
min-width: 120px;
height: 46px;
padding: 0 10px;
line-height: 46px;
color: #fff;
font-size: 14px;
border-radius: 23px;
border: 0;
background-color: #105cb2;
}
.submit{
margin-bottom: 20px;
} }
} }
.label {
margin-bottom: 0;
}
.prop {
color: #929292;
}
.code-btn {
min-width: 120px;
height: 46px;
padding: 0 10px;
line-height: 46px;
color: #fff;
font-size: 14px;
border-radius: 23px;
border: 0;
background-color: #105cb2;
}
.submit {
margin-bottom: 20px;
}
} }
} }
}
</style> </style>

@ -7,67 +7,111 @@
<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>
<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> </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">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="ellipsis">{{status[scope.row.status]}}</span> <span class="ellipsis">{{ status[scope.row.status] }}</span>
</template> </template>
</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,294 +121,274 @@
</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.timerList.forEach((n,k) => { this.getClassData();
clearInterval(n) this.$once("hook:beforeDestroy", function() {
}) this.timerList.forEach((n, k) => {
this.timerList = [] clearInterval(n);
}) });
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() { goSubSystem() {
this.$router.back() let host = this.host;
}, util.cookies.set("assessmentId", this.curRow.id);
goSubSystem(){ util.cookies.set("studentId", this.studentId);
let host = this.host util.cookies.set("userId", this.userId);
util.cookies.set("assessmentId",this.curRow.id) util.cookies.set("projectId", this.curRow.projectId);
util.cookies.set("studentId",this.studentId) util.cookies.set("startTime", this.curRow.startTime);
util.cookies.set("userId",this.userId) util.cookies.set("stopTime", this.curRow.stopTime);
util.cookies.set("projectId",this.curRow.projectId) let systemId = this.curRow.systemId;
util.cookies.set("startTime",this.curRow.startTime) let href = "";
util.cookies.set("stopTime",this.curRow.stopTime) switch (systemId) {
let systemId = this.curRow.systemId
let href = ''
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>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-tabs__nav-wrap::after{ /deep/ .el-tabs__nav-wrap::after {
display: none; display: none;
} }
.no-mb /deep/.el-form-item{
margin-bottom: 0; .no-mb /deep/ .el-form-item {
} margin-bottom: 0;
.el-radio.is-bordered+.el-radio.is-bordered{ }
margin-left: 0;
} .el-radio.is-bordered + .el-radio.is-bordered {
margin-left: 0;
}
</style> </style>

@ -1,32 +1,278 @@
<template> <template>
<div> <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>
<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();
mounted() { 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();
});
},
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>

@ -14,46 +14,51 @@
<script> <script>
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>
<style scoped> <style scoped>
.error-page{ .error-page {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #f3f3f3; background: #f3f3f3;
box-sizing: border-box; box-sizing: border-box;
} }
.error-code{
line-height: 1; .error-code {
font-size: 250px; line-height: 1;
font-weight: bolder; font-size: 250px;
color: #f02d2d; font-weight: bolder;
} color: #f02d2d;
.error-code span{ }
color: #00a854;
} .error-code span {
.error-desc{ color: #00a854;
font-size: 30px; }
color: #777;
} .error-desc {
.error-handle{ font-size: 30px;
margin-top: 30px; color: #777;
padding-bottom: 200px; }
}
.error-btn{ .error-handle {
margin-left: 100px; margin-top: 30px;
} padding-bottom: 200px;
}
.error-btn {
margin-left: 100px;
}
</style> </style>

@ -1,59 +1,64 @@
<template> <template>
<div class="error-page"> <div class="error-page">
<div class="error-code">4<span>0</span>4</div> <div class="error-code">4<span>0</span>4</div>
<div class="error-desc">啊哦~ 你所访问的页面不存在</div> <div class="error-desc">啊哦~ 你所访问的页面不存在</div>
<div class="error-handle"> <div class="error-handle">
<router-link to="/"> <router-link to="/">
<el-button type="primary" size="large" @click="toIndex">返回首页</el-button> <el-button type="primary" size="large" @click="toIndex">返回首页</el-button>
</router-link> </router-link>
<el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button> <el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
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>
<style scoped> <style scoped>
.error-page{ .error-page {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #f3f3f3; background: #f3f3f3;
box-sizing: border-box; box-sizing: border-box;
} }
.error-code{
line-height: 1; .error-code {
font-size: 250px; line-height: 1;
font-weight: bolder; font-size: 250px;
color: #2d8cf0; font-weight: bolder;
} color: #2d8cf0;
.error-code span{ }
color: #00a854;
} .error-code span {
.error-desc{ color: #00a854;
font-size: 30px; }
color: #777;
} .error-desc {
.error-handle{ font-size: 30px;
margin-top: 30px; color: #777;
padding-bottom: 200px; }
}
.error-btn{ .error-handle {
margin-left: 100px; margin-top: 30px;
} padding-bottom: 200px;
}
.error-btn {
margin-left: 100px;
}
</style> </style>

@ -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>
@ -26,21 +28,22 @@
<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;
} }
</style> </style>

@ -8,7 +8,7 @@
<div class="container"> <div class="container">
<h2>使用方法</h2> <h2>使用方法</h2>
<p style="line-height: 50px;"> <p style="line-height: 50px;">
直接通过设置类名为 el-icon-lx-iconName 来使用即可例如{{iconList.length}}个图标 直接通过设置类名为 el-icon-lx-iconName 来使用即可例如{{ iconList.length }}个图标
</p> </p>
<p class="example-p"> <p class="example-p">
<i class="el-icon-lx-redpacket_fill" style="font-size: 30px;color: #ff5900"></i> <i class="el-icon-lx-redpacket_fill" style="font-size: 30px;color: #ff5900"></i>
@ -31,7 +31,7 @@
<li class="icon-li" v-for="(item,index) in list" :key="index"> <li class="icon-li" v-for="(item,index) in list" :key="index">
<div class="icon-li-content"> <div class="icon-li-content">
<i :class="`el-icon-lx-${item}`"></i> <i :class="`el-icon-lx-${item}`"></i>
<span>{{item}}</span> <span>{{ item }}</span>
</div> </div>
</li> </li>
</ul> </ul>
@ -41,172 +41,177 @@
</template> </template>
<script> <script>
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>
.example-p{ .example-p {
height: 45px; height: 45px;
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%;
flex-direction: column; flex-direction: column;
@ -214,11 +219,13 @@ 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;
} }

@ -1,31 +1,30 @@
<template> <template>
<div class="wrap"> <div class="wrap">
</div> </div>
</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>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap{ .wrap {
} }
</style> </style>

@ -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> <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>
<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>

File diff suppressed because it is too large Load Diff

@ -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,67 +34,61 @@
</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}`);
} }
} }
}; };
</script> </script>
<style lang="scss" scopted> <style lang="scss" scopted>
</style> </style>

@ -7,22 +7,22 @@
<div class="nums"> <div class="nums">
<div class="item"> <div class="item">
<p class="name">姓名</p> <p class="name">姓名</p>
<p class="val">{{overview.userName}}</p> <p class="val">{{ overview.userName }}</p>
</div> </div>
<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">
<p class="name">实验平均分</p> <p class="name">实验平均分</p>
<p class="val">{{overview.avgScore ? overview.avgScore.toFixed(2) : overview.avgScore}}</p> <p class="val">{{ overview.avgScore ? overview.avgScore.toFixed(2) : overview.avgScore }}</p>
</div> </div>
</div> </div>
</div> </div>
@ -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,137 +60,152 @@
</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}` //
}else{ location.href = `${this.api.exportPracticeInfo}?ids=`;
location.href = `${this.api.exportExperimentProjectRecord}?userId=${this.userId}` } else {
//
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>
<style lang="scss" scoped> <style lang="scss" scoped>
.tabs{ .tabs {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 20px 0 0; padding: 20px 0 0;
margin-bottom: 10px; margin-bottom: 10px;
background-color: #fff;
.item {
padding: 12px 20px;
margin-right: 10px;
color: #606266;
line-height: 1;
border-radius: 4px;
background-color: #fff; background-color: #fff;
.item{ border: 1px solid #dcdfe6;
padding: 12px 20px; cursor: pointer;
margin-right: 10px;
color:#606266; &.active {
line-height: 1; color: #fff;
border-radius: 4px; background-color: #9278ff;
background-color: #fff; border-color: #9278ff;
border: 1px solid #dcdfe6;
cursor: pointer;
&.active{
color: #fff;
background-color: #9278ff;
border-color: #9278ff;
}
} }
} }
.overview { }
padding: 20px;
margin-top: 20px; .overview {
background: rgba(255, 255, 255, 1); padding: 20px;
box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1); margin-top: 20px;
border-radius: 10px; background: rgba(255, 255, 255, 1);
h6{ box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1);
margin-bottom: 10px; border-radius: 10px;
font-size: 16px;
font-weight: 400; h6 {
margin-bottom: 10px;
font-size: 16px;
font-weight: 400;
}
.nums {
display: flex;
justify-content: space-between;
.item:nth-child(1) {
background-image: url('../../../assets/img/student1.png');
box-shadow: 0px 25px 20px -22px #ec92e0;
} }
.nums {
display: flex; .item:nth-child(2) {
justify-content: space-between; background-image: url('../../../assets/img/student2.png');
.item:nth-child(1) { box-shadow: 0px 25px 20px -22px #60b8f6;
background-image: url('../../../assets/img/student1.png'); }
box-shadow: 0px 25px 20px -22px #ec92e0;
} .item:nth-child(3) {
.item:nth-child(2) { background-image: url('../../../assets/img/student3.png');
background-image: url('../../../assets/img/student2.png'); box-shadow: 0px 25px 20px -22px #fe787a;
box-shadow: 0px 25px 20px -22px #60b8f6; }
}
.item:nth-child(3) { .item:nth-child(4) {
background-image: url('../../../assets/img/student3.png'); background-image: url('../../../assets/img/student4.png');
box-shadow: 0px 25px 20px -22px #fe787a; box-shadow: 0px 25px 20px -22px #fbbb6e;
} }
.item:nth-child(4) {
background-image: url('../../../assets/img/student4.png'); .item {
box-shadow: 0px 25px 20px -22px #fbbb6e; width: 24%;
padding: 20px 30px;
box-shadow: 0px 3px 18px 0px rgba(84, 84, 84, 0.09);
border-radius: 8px;
background-size: 100% 100%;
background-repeat: no-repeat;
.name {
font-size: 18px;
color: #ffffff;
} }
.item { .val {
width: 24%; margin-top: 10px;
padding: 20px 30px; color: #ffffff;
box-shadow: 0px 3px 18px 0px rgba(84, 84, 84, 0.09); font-size: 30px;
border-radius: 8px;
background-size: 100% 100%;
background-repeat: no-repeat;
.name {
font-size: 18px;
color: #ffffff;
}
.val{
margin-top: 10px;
color: #ffffff;
font-size: 30px;
}
} }
} }
} }
}
</style> </style>

@ -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,54 +38,45 @@ 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`)
} }
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

@ -12,9 +12,11 @@
<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">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span style="font-size: 18px">基本信息</span> <span style="font-size: 18px">基本信息</span>
@ -31,7 +33,7 @@
<template v-if="editing"> <template v-if="editing">
<el-input v-model="form.experimentalClassName"></el-input> <el-input v-model="form.experimentalClassName"></el-input>
</template> </template>
<template v-else>{{form.experimentalClassName}}</template> <template v-else>{{ form.experimentalClassName }}</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="instructor" label="指导老师" align="center"> <el-table-column prop="instructor" label="指导老师" align="center">
@ -39,7 +41,7 @@
<template v-if="editing"> <template v-if="editing">
<el-input v-model="form.instructor"></el-input> <el-input v-model="form.instructor"></el-input>
</template> </template>
<template v-else>{{form.instructor}}</template> <template v-else>{{ form.instructor }}</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="period" label="实验学时" align="center"> <el-table-column prop="period" label="实验学时" align="center">
@ -47,7 +49,7 @@
<template v-if="editing"> <template v-if="editing">
<el-input v-model="form.period"></el-input> <el-input v-model="form.period"></el-input>
</template> </template>
<template v-else>{{form.period}}</template> <template v-else>{{ form.period }}</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="submitTime" label="实验时间" align="center"></el-table-column> <el-table-column prop="submitTime" label="实验时间" align="center"></el-table-column>
@ -78,7 +80,7 @@
<el-table :data="expData" class="table" stripe header-align="center"> <el-table :data="expData" 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 + 1}} {{ scope.$index + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="judgmentPointsName" label="任务名称" align="center"> <el-table-column prop="judgmentPointsName" label="任务名称" align="center">
@ -108,382 +110,418 @@
</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 {
data (){ export default {
return { data() {
title: '实验报告', return {
form: { title: "实验报告",
analysis: '', form: {
conclusion: '', analysis: "",
content: ``, conclusion: "",
data: '', content: ``,
purpose: ``, data: "",
experimentId: '', purpose: ``,
experimentalClassName: '', experimentId: "",
improvement: '', experimentalClassName: "",
laboratory: '', improvement: "",
period: '', laboratory: "",
principle: ``, period: "",
proName: '', principle: ``,
score: 0, proName: "",
step: ``, score: 0,
submitTime: '', step: ``,
summarize: '', submitTime: "",
instructor: '', summarize: "",
userId: this.userId, instructor: "",
userName: '', userId: this.userId,
workNumber: '', userName: "",
}, workNumber: ""
type: this.$route.query.type, // type == 1 ? '' : '' },
id: this.$route.query.id, type: this.$route.query.type, // type == 1 ? '' : ''
recordId: this.$route.query.recordId, id: this.$route.query.id,
reportId: this.$route.query.reportId, recordId: this.$route.query.recordId,
infoData: [], reportId: this.$route.query.reportId,
expData: [], infoData: [],
accountData: [], expData: [],
showData: '1', accountData: [],
autograph: '1', showData: "1",
pages: 1, autograph: "1",
ipVisible: false, pages: 1,
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'}], ipVisible: false,
conclusionOptions: [ fileList: [{
{ name: "food.jpeg",
value: 1, url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"
label: '结论符合预期' }, {
name: "food2.jpeg",
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"
}],
conclusionOptions: [
{
value: 1,
label: "结论符合预期"
}
],
editing: false,
loadIns: null,
loading: false
};
},
computed: {
...mapState("user", [
"userId", "studentId"
])
},
mounted() {
this.getData();
},
methods: {
getData() {
if (this.type) {
let data = {
recordId: this.id
};
this.$get(this.api.queryVirtualReport, data).then(res => {
this.form = res.data.report;
let expData = res.data.data;
let form = this.form;
let score = form.score;
if (expData) {
if (score) {
expData.map(n => {
if (n.isError) { // isError1
score -= n.codeScore;
n.codeScore = 0;
}
});
form.score = score;
}
expData[0].answer = expData[0].answer.replace("<pre class=\"ql-syntax\" spellcheck=\"false\">", "");
expData[0].answer = expData[0].answer.replace("</pre>", "");
this.expData = expData;
}
this.infoData.push({
workNumber: form.workNumber,
experimentalClassName: form.experimentalClassName,
instructor: form.instructor,
period: form.period,
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
userName: form.userName
});
}).catch(res => {
});
} else {
let data = {
studentId: this.studentId,
projectId: this.id,
recordId: this.recordId,
reportId: this.reportId
};
this.$get(this.api.queryArchievement, data).then(res => {
this.form = res.data.report ? res.data.report : {};
let expData = res.data.data;
let form = this.form;
let score = form.score;
if (expData) {
if (score) {
expData.map(n => {
if (n.isError) {
score -= n.codeScore;
n.codeScore = 0;
}
});
form.score = score;
}
this.expData = expData;
} }
], this.infoData.push({
editing: false, workNumber: form.workNumber,
loadIns: null, experimentalClassName: form.experimentalClassName,
loading: false instructor: form.instructor,
period: form.period,
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
userName: form.userName
});
}).catch(res => {
});
} }
}, },
computed: { handleRemove(file, fileList) {
...mapState('user', [ console.log(file, fileList);
'userId','studentId'
]),
}, },
mounted(){ handlePreview(file) {
this.getData() console.log(file);
}, },
methods: { saveAdd() {
getData(){ let data = {
if(this.type){ systemId: this.configId,
let data = { systemName: this.form.systemName,
recordId: this.id, systemType: this.form.systemType,
} systemAttribution: this.form.systemAttribution
this.$get(this.api.queryVirtualReport,data).then(res => { };
this.form = res.data.report if (this.configId) {
let expData = res.data.data this.$post(this.api.updateServiceConfig, data).then((res) => {
let form = this.form util.successMsg("编辑成功");
let score = form.score this.goBack();
}).catch((res) => {
if(expData){ });
if(score){ } else {
expData.map(n => { this.$post(this.api.updateServiceConfig, data).then((res) => {
if(n.isError){ // isError1 util.successMsg("添加成功");
score -= n.codeScore this.goBack();
n.codeScore = 0 }).catch((res) => {
} });
}) }
form.score = score },
} handleRemove(file, fileList) {
expData[0].answer = expData[0].answer.replace('<pre class="ql-syntax" spellcheck="false">','') console.log(file, fileList);
expData[0].answer = expData[0].answer.replace('</pre>','') },
handlePictureCardPreview(file) {
this.expData = expData this.dialogImageUrl = file.url;
} this.dialogVisible = true;
this.infoData.push({ },
workNumber: form.workNumber, SpanMethod({ row, column, rowIndex, columnIndex }) {
experimentalClassName: form.experimentalClassName, if (rowIndex % 2 === 0) {
instructor: form.instructor, if (columnIndex === 6) {
period: form.period, if (!row.Intranet) {
laboratory: form.laboratory, return [1, 2];
submitTime: form.submitTime,
score: form.score,
userName: form.userName
})
}).catch(res => {});
}else{
let data = {
studentId: this.studentId,
projectId: this.id,
recordId: this.recordId,
reportId: this.reportId
} }
this.$get(this.api.queryArchievement,data).then(res => {
this.form = res.data.report ? res.data.report : {}
let expData = res.data.data
let form = this.form
let score = form.score
if(expData){
if(score){
expData.map(n => {
if(n.isError){
score -= n.codeScore
n.codeScore = 0
}
})
form.score = score
}
this.expData = expData
}
this.infoData.push({
workNumber: form.workNumber,
experimentalClassName: form.experimentalClassName,
instructor: form.instructor,
period: form.period,
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
userName: form.userName
})
}).catch(res => {});
}
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
saveAdd(){
let data = {
systemId: this.configId,
systemName: this.form.systemName,
systemType: this.form.systemType,
systemAttribution: this.form.systemAttribution,
}
if(this.configId){
this.$post(this.api.updateServiceConfig,data).then((res) => {
util.successMsg('编辑成功');
this.goBack()
}).catch((res) => {
})
}else{
this.$post(this.api.updateServiceConfig,data).then((res) => {
util.successMsg('添加成功');
this.goBack()
}).catch((res) => {
})
}
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
SpanMethod({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {
if (columnIndex === 6) {
if(!row.Intranet){
return [1, 2];
}
}
// else if (columnIndex === 1) {
// return [0, 0];
// }
} }
}, // else if (columnIndex === 1) {
goBack(){ // return [0, 0];
this.$router.go(-1) // }
}, }
exportPage(){ },
document.querySelector('body').setAttribute('style', 'overflow: visible') goBack() {
this.loading = true this.$router.go(-1);
this.loadIns = Loading.service({ },
background: 'rgba(255,255,255,.6)' exportPage() {
}) document.querySelector("body").setAttribute("style", "overflow: visible");
document.querySelector('#pdfDom').scrollTop = 0 this.loading = true;
var title = this.title; this.loadIns = Loading.service({
let dom = document.querySelector('#pdfDom') background: "rgba(255,255,255,.6)"
setTimeout(() => { });
html2Canvas(dom, { document.querySelector("#pdfDom").scrollTop = 0;
height: dom.scrollHeight, var title = this.title;
allowTaint: true, let dom = document.querySelector("#pdfDom");
}).then((canvas) => { setTimeout(() => {
let contentWidth = canvas.width html2Canvas(dom, {
let contentHeight = canvas.height height: dom.scrollHeight,
let pageHeight = contentWidth / 592.28 * 841.89 allowTaint: true
let leftHeight = contentHeight }).then((canvas) => {
let position = 0 let contentWidth = canvas.width;
let imgWidth = 595.28 let contentHeight = canvas.height;
let imgHeight = 592.28 / contentWidth * contentHeight let pageHeight = contentWidth / 592.28 * 841.89;
let pageData = canvas.toDataURL('image/jpeg', 1.0) let leftHeight = contentHeight;
let PDF = new JsPDF('', 'pt', 'a4') let position = 0;
let imgWidth = 595.28;
let imgHeight = 592.28 / contentWidth * contentHeight;
let pageData = canvas.toDataURL("image/jpeg", 1.0);
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) {
let data = { let data = {
period: this.form.period, period: this.form.period,
proName: this.form.proName, proName: this.form.proName,
purpose: this.form.purpose, purpose: this.form.purpose,
summarize: this.form.summarize, summarize: this.form.summarize,
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{ });
this.editing = true } else {
} this.editing = true;
} }
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box{ .box {
background-color: #fff; background-color: #fff;
} }
.exp-header{
padding: 20px 100px; .exp-header {
box-shadow:0px 0px 25px 2px rgba(48,115,248,0.14); padding: 20px 100px;
z-index: 999; box-shadow: 0px 0px 25px 2px rgba(48, 115, 248, 0.14);
margin-top: 2px; z-index: 999;
} margin-top: 2px;
/deep/.el-textarea.is-disabled .el-textarea__inner{ }
color: #777;
background-color: #e5dfff; /deep/ .el-textarea.is-disabled .el-textarea__inner {
color: #777;
background-color: #e5dfff;
}
#pdfDom {
height: calc(100vh - 170px);
overflow: auto;
padding: 30px 100px;
box-sizing: border-box;
&.loading {
height: auto;
overflow: visible;
} }
#pdfDom{
height: calc(100vh - 170px); /deep/ .info-table {
overflow: auto; margin-bottom: 40px;
padding: 30px 100px; border: 0;
box-sizing: border-box;
&.loading{ th {
height: auto; background-color: #fff !important;
overflow: visible;
.cell {
color: #444;
}
} }
/deep/.info-table{
margin-bottom: 40px; tr {
border: 0; border: 0;
th{ }
background-color: #fff !important;
.cell{ tr:hover, tr:hover > td {
color: #444; background-color: #e5dfff !important;
} }
}
tr{ td {
border: 0; border: {
} left: 4px solid #fff;
tr:hover,tr:hover>td{ right: 4px solid #fff;
background-color: #e5dfff !important;
} }
td{
border: { &:first-child {
left: 4px solid #fff; border-left: 0;
right: 4px solid #fff;
}
&:first-child{
border-left: 0;
}
&:last-child{
border-right: 0;
}
background-color: #e5dfff;
border-bottom: 0;
} }
}
/deep/.table th{ &:last-child {
background-color: #e1eaff !important; border-right: 0;
.cell{
color: #555555;
} }
background-color: #e5dfff;
border-bottom: 0;
} }
} }
.pre-wrap{
min-height: 117px; /deep/ .table th {
padding: 5px 15px; background-color: #e1eaff !important;
color: #777;
background-color: #e5dfff; .cell {
} color: #555555;
/deep/.cell{
font-size: 12px;
}
// /deep/.el-row{
// // padding-top: 20px;
// margin: 0 !important;
// }
.form-item{
display: flex;
align-items: center;
}
.form-item .el-input{
width: auto;
}
.form-item span{
margin-right: 10px;
}
.meta-title-wrap{
display: flex;
justify-content: space-between;
align-items: center;
span{
font-size: 13px;
color: #444;
}
}
.flex-between{
span{
font-size: 13px;
color: #444;
} }
} }
.meta-title{ }
display: flex;
align-items: center; .pre-wrap {
padding: 10px 20px; min-height: 117px;
margin-bottom: 10px; padding: 5px 15px;
font-size: 16px; color: #777;
color: #fff; background-color: #e5dfff;
background-color: #9278ff; }
img{
width: 20px; /deep/ .cell {
margin-right: 10px; font-size: 12px;
} }
// /deep/.el-row{
// // padding-top: 20px;
// margin: 0 !important;
// }
.form-item {
display: flex;
align-items: center;
}
.form-item .el-input {
width: auto;
}
.form-item span {
margin-right: 10px;
}
.meta-title-wrap {
display: flex;
justify-content: space-between;
align-items: center;
span {
font-size: 13px;
color: #444;
} }
.step-title{ }
margin-bottom: 10px;
font-size: 16px; .flex-between {
color: #9278ff; span {
font-size: 13px;
color: #444;
} }
.bd-title{ }
padding-top: 20px;
border-top: 1px dashed #ccc; .meta-title {
display: flex;
align-items: center;
padding: 10px 20px;
margin-bottom: 10px;
font-size: 16px;
color: #fff;
background-color: #9278ff;
img {
width: 20px;
margin-right: 10px;
} }
}
.step-title {
margin-bottom: 10px;
font-size: 16px;
color: #9278ff;
}
.bd-title {
padding-top: 20px;
border-top: 1px dashed #ccc;
}
</style> </style>

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,259 +17,234 @@
</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: "担保实训教学系统"
}, }
// { // {
// imgSrc: require('@/assets/img/station5.png'), // imgSrc: require('@/assets/img/station5.png'),
// name: '' // name: ''
// }, // },
// { // {
// imgSrc: require('@/assets/img/station7.png'), // imgSrc: require('@/assets/img/station7.png'),
// name: '' // name: ''
// }, // },
] ]
: :
[{ [{
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
}
}, },
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box{ .box {
padding: 20px; padding: 20px;
background-color: #fff; background-color: #fff;
}
/deep/ .el-card {
margin-bottom: 0;
}
.search {
position: relative;
width: 30%;
margin: 100px auto 150px;
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;
} }
/deep/.el-card{
margin-bottom: 0; button {
position: absolute;
top: 0;
right: 0;
padding: 0 20px;
line-height: 46px;
color: #fff;
background-color: #9076FF;
border: 0;
outline: none !important;
} }
.search{ }
position: relative;
width: 30%; .wrap {
margin: 100px auto 150px; display: flex;
border-radius: 30px; flex-wrap: wrap;
border: 1px solid #9076FF; width: 70%;
border-right: 0; margin: 0 auto;
overflow: hidden; min-height: calc(100vh - 520px);
input{ box-sizing: border-box;
width: 100%;
height: 44px; .item {
line-height: 44px; width: 16%;
padding: 0 20px; margin: 20px;
text-align: center;
cursor: pointer;
&:hover {
opacity: .9;
}
img {
width: 100px;
height: 100px;
margin: 0 auto 6px;
}
.text {
font-size: 14px; font-size: 14px;
text-align: center;
color: #333; 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;
} }
} }
.wrap{
display: flex;
flex-wrap: wrap;
width: 70%;
margin: 0 auto;
min-height: calc(100vh - 520px);
box-sizing: border-box;
.item{ &.isHh {
.item {
width: 16%; width: 16%;
margin: 20px;
text-align: center;
cursor: pointer;
&:hover{
opacity: .9;
}
img{
width: 100px;
height: 100px;
margin: 0 auto 6px;
}
.text{
font-size: 14px;
text-align: center;
color: #333;
}
}
&.isHh{
.item{
width: 16%;
}
} }
&.isOccu{ }
.item{
width: 21%; &.isOccu {
} .item {
width: 21%;
} }
} }
}
</style> </style>

@ -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,94 +48,95 @@ 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);
} }
} }
); );
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) {
return new Promise((resolve, reject) =>{ return new Promise((resolve, reject) => {
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 };

@ -4,15 +4,15 @@
* 用例<Tag v-throttle>text</Tag> * 用例<Tag v-throttle>text</Tag>
* */ * */
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,99 +26,99 @@ 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,
// 子系统列表.改的时候留意要改的是哪个环境,别影响到了其他环境 // 子系统列表.改的时候留意要改的是哪个环境,别影响到了其他环境
// 以后如果卖给了其他学校,要给该学校单独开放子系统的话,就在下面这个数组里加判断就行,然后把需要开放的子系统放出来。不要复制这个职站项目另起一个项目,这样学校一多就很难维护了 // 以后如果卖给了其他学校,要给该学校单独开放子系统的话,就在下面这个数组里加判断就行,然后把需要开放的子系统放出来。不要复制这个职站项目另起一个项目,这样学校一多就很难维护了
systemList: isHh systemList: isHh
// 河海版 // 河海版
? [{
id: 1,
label: 'Python程序设计教学系统'
},{
id: 4,
label: '经济金融建模实验教学系统'
},{
id: 6,
label: '金融随机过程实验教学系统'
},{
id: 7,
label: '量化投资策略建模实验教学系统'
},{
id: 8,
label: '大数据分析实验教学系统'
}]
// 职站测试服
: (isBeta
? [{ ? [{
id: 1, id: 1,
label: 'Python程序设计教学系统' label: "Python程序设计教学系统"
} }, {
// 下面这两个是川大和科大子系统,目前没有在职站开启,只有在科大川大才会开放对应的子系统 id: 4,
// ,{ label: "经济金融建模实验教学系统"
// id: 2, }, {
// label: '跨国仿真系统' id: 6,
// },{ label: "金融随机过程实验教学系统"
// id: 3, }, {
// label: '期权期货系统' id: 7,
// } label: "量化投资策略建模实验教学系统"
,{ }, {
id: 4, id: 8,
label: '经济金融建模实验教学系统' label: "大数据分析实验教学系统"
},{ }]
id: 5,
label: 'Python可视化实验教学系统' // 职站测试服
},{ : (isBeta
id: 6, ? [{
label: '金融随机过程实验教学系统' id: 1,
},{ label: "Python程序设计教学系统"
id: 7, }
label: '量化投资策略建模实验教学系统' // 下面这两个是川大和科大子系统,目前没有在职站开启,只有在科大川大才会开放对应的子系统
},{ // ,{
id: 8, // id: 2,
label: '大数据分析实验教学系统' // label: '跨国仿真系统'
},{ // },{
id: 9, // id: 3,
label: 'Python数据清洗教学实验系统' // label: '期权期货系统'
},{ // }
id: 10, , {
label: 'Python数据采集(爬虫)教学实验系统' id: 4,
}] label: "经济金融建模实验教学系统"
}, {
id: 5,
label: "Python可视化实验教学系统"
}, {
id: 6,
label: "金融随机过程实验教学系统"
}, {
id: 7,
label: "量化投资策略建模实验教学系统"
}, {
id: 8,
label: "大数据分析实验教学系统"
}, {
id: 9,
label: "Python数据清洗教学实验系统"
}, {
id: 10,
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;

@ -2,10 +2,10 @@
* 布局管理 * 布局管理
* */ * */
// 是否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: {}
};
}
}

@ -1,26 +1,26 @@
/** /**
* 项目系统相关 * 项目系统相关
* */ * */
export default { export default {
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) {
commit('SET_RECORD',type)
}, },
setRecord({ state, commit }, 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, if (res.status == 200) {
source, let { data } = res;
}).then(res => { // 生成路由权限
if(res.status == 200){ // 每个系统都是用这套角色权限代码的,后端也是基本一样,除了个别字段可能会不一样
let data = res.message.retvalue // 总体来说就两个步骤: 1是生成能够访问的路由的数组集合,2是生成能看到的按钮的数组集合
res.message.listValue && Setting.dynamicRoute && addRoutes(res.message.listValue) //res.message.listValue && Setting.dynamicRoute && addRoutes(res.message.listValue)
util.local.set(Setting.tokenKey,data.token,Setting.tokenExpires) util.local.set(Setting.tokenKey, data.token, Setting.tokenExpires);
util.successMsg('登录成功') util.successMsg("登录成功");
commit('SET_INFO',data) console.log(data, "登录保存的数据");
resolve() commit("SET_INFO", data);
}else{ resolve();
util.errorMsg(res.errmessage) } else {
reject(res) util.errorMsg(res.errmessage || res.message);
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) {
commit('SET_AVATAR',avatar)
}, },
setInfo({ state,commit },info) { setAvatar({ state, commit }, avatar) {
commit('SET_INFO',info) commit("SET_AVATAR", avatar);
}, },
setUserName({ state,commit },userName) { setInfo({ state, commit }, info) {
commit('SET_USERNAME',userName) commit("SET_INFO", info);
}, },
setUserName({ state, commit }, userName) {
commit("SET_USERNAME", userName);
}
} }
} };

@ -1,248 +1,301 @@
@import "./default/index.scss"; @import "./default/index.scss";
@font-face{ @font-face {
font-family: youshe; font-family: youshe;
src: url('font/YouSheBiaoTiHei.ttf'); src: url('font/YouSheBiaoTiHei.ttf');
} }
[v-cloak] { [v-cloak] {
display: none; display: none;
} }
.flex-between{ .flex-between {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;
height: 8px; height: 8px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
width: 5px; width: 5px;
border-radius: 6px; border-radius: 6px;
background: rgba(142,123,253,.75); background: rgba(142, 123, 253, .75);
} }
.p-title{ .p-title {
padding-left: 5px; padding-left: 5px;
margin-bottom: 24px; margin-bottom: 24px;
line-height: 1; line-height: 1;
font-size: 14px; font-size: 14px;
color: #585858; color: #585858;
border-left: 3px solid $--color-primary; border-left: 3px solid $--color-primary;
} }
.el-input{ .el-input {
.el-input__inner{ .el-input__inner {
border-color: rgba(0, 0, 0, 0.15); border-color: rgba(0, 0, 0, 0.15);
} }
} }
.filter{ .filter {
display: inline-flex;
align-items: center;
flex: 1;
li {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
flex: 1; margin-right: 30px;
li{
display: inline-flex; label {
align-items: center; margin-right: 10px;
margin-right: 30px; font-size: 14px;
label{ line-height: 14px;
margin-right: 10px; color: rgba(0, 0, 0, .65);
font-size: 14px; white-space: nowrap;
line-height: 14px; }
color: rgba(0,0,0,.65);
white-space: nowrap; .el-radio {
} margin-right: 10px !important;
.el-radio{
margin-right: 10px!important; .el-radio__input {
.el-radio__input{ display: none !important;
display: none!important; }
}
}
} }
}
} }
.page{
position: relative; .page {
padding: 24px; position: relative;
background-color: #fff; padding: 24px;
border-radius: 8px; background-color: #fff;
.tool{ border-radius: 8px;
.tool {
display: flex;
justify-content: space-between;
margin-bottom: 24px;
.single-choice {
dl {
display: flex; display: flex;
justify-content: space-between; line-height: 30px;
margin-bottom: 24px;
dt {
.single-choice{ color: rgba(0, 0, 0, .65);
dl { font-size: 14px;
display: flex; white-space: nowrap;
line-height: 30px; }
dt {
color: rgba(0,0,0,.65); dd {
font-size: 14px; display: inline-flex;
white-space: nowrap; align-items: center;
} flex-wrap: wrap;
dd {
display: inline-flex; span {
align-items: center; padding: 0 10px;
flex-wrap: wrap; margin: 0 10px;
span { color: #333;
padding: 0 10px; font-size: 14px;
margin: 0 10px; line-height: 1.8;
color: #333; white-space: nowrap;
font-size: 14px;
line-height: 1.8; cursor: pointer;
white-space: nowrap;
&:hover {
cursor: pointer; color: $--color-primary;
&:hover { }
color: $--color-primary;
} &.active {
&.active { border-radius: 4px;
border-radius: 4px; color: #fff;
color: #fff; background-color: $--color-primary;
background-color: $--color-primary;
}
}
}
} }
}
} }
}
} }
}
} }
.pagination { .pagination {
margin: 20px 0; margin: 20px 0;
text-align: center; text-align: center;
button,.number{
color: rgba(0,0,0,.65) !important; button, .number {
background-color: transparent !important; color: rgba(0, 0, 0, .65) !important;
border: 1px solid rgba(0, 0, 0, 0.15) !important; background-color: transparent !important;
border-radius: 4px !important; border: 1px solid rgba(0, 0, 0, 0.15) !important;
} border-radius: 4px !important;
button i{ }
color: #333;
} button i {
.active{ color: #333;
color: #fff !important; }
background-color: $--color-primary !important;
} .active {
color: #fff !important;
background-color: $--color-primary !important;
}
} }
.el-table{ .el-table {
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{
background: $--color-primary !important; th {
.cell{ background: $--color-primary !important;
color: #fff;
font-size: 14px; .cell {
font-weight: normal; color: #fff;
.el-checkbox{ font-size: 14px;
&:before{ font-weight: normal;
opacity: 1;
} .el-checkbox {
} &:before {
opacity: 1;
} }
}
} }
}
} }
.el-message{ .el-message {
padding: 11px 20px; padding: 11px 20px;
.el-message__icon{
font-size: 16px; .el-message__icon {
} font-size: 16px;
.el-message__content{ }
font-size: 14px;
color: rgba(0, 0, 0, 0.65); .el-message__content {
} font-size: 14px;
.el-icon-close{ color: rgba(0, 0, 0, 0.65);
font-size: 14px; }
color: #92998d;
} .el-icon-close {
.el-message--success{ font-size: 14px;
border: 1px solid #B7EB8F; color: #92998d;
background: #F6FFED; }
.el-message__icon{
color: #00c700; .el-message--success {
} border: 1px solid #B7EB8F;
background: #F6FFED;
.el-message__icon {
color: #00c700;
} }
.el-message--warning{ }
border: 1px solid #FFE58F;
background: #FFFBE6; .el-message--warning {
.el-message__icon{ border: 1px solid #FFE58F;
color: #ffa900; background: #FFFBE6;
}
.el-message__icon {
color: #ffa900;
} }
}
} }
.el-message-box{ .el-message-box {
padding-bottom: 24px; padding-bottom: 24px;
.el-message-box__header{
padding: 32px 32px 12px 50px; .el-message-box__header {
span{ padding: 32px 32px 12px 50px;
font-size: 16px;
color: rgba(0, 0, 0, 0.85); span {
font-weight: 500; font-size: 16px;
} color: rgba(0, 0, 0, 0.85);
} font-weight: 500;
.el-message-box__status{
top: -30px;
}
.el-message-box__status + .el-message-box__message{
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
} }
.el-message-box__btns{ }
padding-right: 32px;
&.el-icon-warning{ .el-message-box__status {
color: #ffa900; top: -30px;
} }
.el-message-box__status + .el-message-box__message {
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-message-box__btns {
padding-right: 32px;
&.el-icon-warning {
color: #ffa900;
} }
&:not(.normal){ }
.el-button--primary{
color: #606266; &:not(.normal) {
background: #fff; .el-button--primary {
border-color: #DCDFE6; color: #606266;
&:hover{ background: #fff;
color: $--color-primary; border-color: #DCDFE6;
border-color: #efbdbb;
background-color: #fae9e8; &:hover {
} color: $--color-primary;
} border-color: #efbdbb;
background-color: #fae9e8;
}
} }
}
} }
.el-dialog__wrapper{ .el-dialog__wrapper {
.el-dialog{ .el-dialog {
border-radius: 4px;
.el-dialog__header {
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
.el-dialog__title {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
}
}
.el-dialog__footer {
padding: 10px 16px;
border-top: 1px solid rgba(0, 0, 0, 0.06);
.el-button {
font-size: 14px;
border-radius: 4px; border-radius: 4px;
.el-dialog__header{ border-color: rgba(0, 0, 0, 0.15);
border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.el-dialog__title{
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
}
}
.el-dialog__footer{
padding: 10px 16px;
border-top: 1px solid rgba(0, 0, 0, 0.06);
.el-button{
font-size: 14px;
border-radius: 4px;
border-color: rgba(0, 0, 0, 0.15);
}
}
} }
}
} }
.el-tooltip__popper{ .el-tooltip__popper {
width: 300px; width: 300px;
} }
@media(max-width: 1600px){ @media(max-width: 1600px) {
.el-table{ .el-table {
.el-switch__label--right.is-active{ .el-switch__label--right.is-active {
left: 8px; left: 8px;
}
} }
}
}
.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);
}
} }

@ -1,171 +1,171 @@
/* Logo 字体 */ /* Logo 字体 */
@font-face { @font-face {
font-family: "iconfont logo"; font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
} }
.logo { .logo {
font-family: "iconfont logo"; font-family: "iconfont logo";
font-size: 160px; font-size: 160px;
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
/* tabs */ /* tabs */
.nav-tabs { .nav-tabs {
position: relative; position: relative;
} }
.nav-tabs .nav-more { .nav-tabs .nav-more {
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 0; bottom: 0;
height: 42px; height: 42px;
line-height: 42px; line-height: 42px;
color: #666; color: #666;
} }
#tabs { #tabs {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
#tabs li { #tabs li {
cursor: pointer; cursor: pointer;
width: 100px; width: 100px;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
border-bottom: 2px solid transparent; border-bottom: 2px solid transparent;
position: relative; position: relative;
z-index: 1; z-index: 1;
margin-bottom: -1px; margin-bottom: -1px;
color: #666; color: #666;
} }
#tabs .active { #tabs .active {
border-bottom-color: #f00; border-bottom-color: #f00;
color: #222; color: #222;
} }
.tab-container .content { .tab-container .content {
display: none; display: none;
} }
/* 页面布局 */ /* 页面布局 */
.main { .main {
padding: 30px 100px; padding: 30px 100px;
width: 960px; width: 960px;
margin: 0 auto; margin: 0 auto;
} }
.main .logo { .main .logo {
color: #333; color: #333;
text-align: left; text-align: left;
margin-bottom: 30px; margin-bottom: 30px;
line-height: 1; line-height: 1;
height: 110px; height: 110px;
margin-top: -50px; margin-top: -50px;
overflow: hidden; overflow: hidden;
*zoom: 1; *zoom: 1;
} }
.main .logo a { .main .logo a {
font-size: 160px; font-size: 160px;
color: #333; color: #333;
} }
.helps { .helps {
margin-top: 40px; margin-top: 40px;
} }
.helps pre { .helps pre {
padding: 20px; padding: 20px;
margin: 10px 0; margin: 10px 0;
border: solid 1px #e7e1cd; border: solid 1px #e7e1cd;
background-color: #fffdef; background-color: #fffdef;
overflow: auto; overflow: auto;
} }
.icon_lists { .icon_lists {
width: 100% !important; width: 100% !important;
overflow: hidden; overflow: hidden;
*zoom: 1; *zoom: 1;
} }
.icon_lists li { .icon_lists li {
width: 100px; width: 100px;
margin-bottom: 10px; margin-bottom: 10px;
margin-right: 20px; margin-right: 20px;
text-align: center; text-align: center;
list-style: none !important; list-style: none !important;
cursor: default; cursor: default;
} }
.icon_lists li .code-name { .icon_lists li .code-name {
line-height: 1.2; line-height: 1.2;
} }
.icon_lists .icon { .icon_lists .icon {
display: block; display: block;
height: 100px; height: 100px;
line-height: 100px; line-height: 100px;
font-size: 42px; font-size: 42px;
margin: 10px auto; margin: 10px auto;
color: #333; color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear; -webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear; -moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear; transition: font-size 0.25s linear, width 0.25s linear;
} }
.icon_lists .icon:hover { .icon_lists .icon:hover {
font-size: 100px; font-size: 100px;
} }
.icon_lists .svg-icon { .icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */ /* 通过设置 font-size 来改变图标大小 */
width: 1em; width: 1em;
/* 图标和文字相邻时,垂直对齐 */ /* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em; vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */ /* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor; fill: currentColor;
/* path stroke 溢出 viewBox 部分在 IE 下会显示 /* path stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */ normalize.css 中也包含这行 */
overflow: hidden; overflow: hidden;
} }
.icon_lists li .name, .icon_lists li .name,
.icon_lists li .code-name { .icon_lists li .code-name {
color: #666; color: #666;
} }
/* markdown 样式 */ /* markdown 样式 */
.markdown { .markdown {
color: #666; color: #666;
font-size: 14px; font-size: 14px;
line-height: 1.8; line-height: 1.8;
} }
.highlight { .highlight {
line-height: 1.5; line-height: 1.5;
} }
.markdown img { .markdown img {
vertical-align: middle; vertical-align: middle;
max-width: 100%; max-width: 100%;
} }
.markdown h1 { .markdown h1 {
color: #404040; color: #404040;
font-weight: 500; font-weight: 500;
line-height: 40px; line-height: 40px;
margin-bottom: 24px; margin-bottom: 24px;
} }
.markdown h2, .markdown h2,
@ -173,139 +173,139 @@
.markdown h4, .markdown h4,
.markdown h5, .markdown h5,
.markdown h6 { .markdown h6 {
color: #404040; color: #404040;
margin: 1.6em 0 0.6em 0; margin: 1.6em 0 0.6em 0;
font-weight: 500; font-weight: 500;
clear: both; clear: both;
} }
.markdown h1 { .markdown h1 {
font-size: 28px; font-size: 28px;
} }
.markdown h2 { .markdown h2 {
font-size: 22px; font-size: 22px;
} }
.markdown h3 { .markdown h3 {
font-size: 16px; font-size: 16px;
} }
.markdown h4 { .markdown h4 {
font-size: 14px; font-size: 14px;
} }
.markdown h5 { .markdown h5 {
font-size: 12px; font-size: 12px;
} }
.markdown h6 { .markdown h6 {
font-size: 12px; font-size: 12px;
} }
.markdown hr { .markdown hr {
height: 1px; height: 1px;
border: 0; border: 0;
background: #e9e9e9; background: #e9e9e9;
margin: 16px 0; margin: 16px 0;
clear: both; clear: both;
} }
.markdown p { .markdown p {
margin: 1em 0; margin: 1em 0;
} }
.markdown>p, .markdown > p,
.markdown>blockquote, .markdown > blockquote,
.markdown>.highlight, .markdown > .highlight,
.markdown>ol, .markdown > ol,
.markdown>ul { .markdown > ul {
width: 80%; width: 80%;
} }
.markdown ul>li { .markdown ul > li {
list-style: circle; list-style: circle;
} }
.markdown>ul li, .markdown > ul li,
.markdown blockquote ul>li { .markdown blockquote ul > li {
margin-left: 20px; margin-left: 20px;
padding-left: 4px; padding-left: 4px;
} }
.markdown>ul li p, .markdown > ul li p,
.markdown>ol li p { .markdown > ol li p {
margin: 0.6em 0; margin: 0.6em 0;
} }
.markdown ol>li { .markdown ol > li {
list-style: decimal; list-style: decimal;
} }
.markdown>ol li, .markdown > ol li,
.markdown blockquote ol>li { .markdown blockquote ol > li {
margin-left: 20px; margin-left: 20px;
padding-left: 4px; padding-left: 4px;
} }
.markdown code { .markdown code {
margin: 0 3px; margin: 0 3px;
padding: 0 5px; padding: 0 5px;
background: #eee; background: #eee;
border-radius: 3px; border-radius: 3px;
} }
.markdown strong, .markdown strong,
.markdown b { .markdown b {
font-weight: 600; font-weight: 600;
} }
.markdown>table { .markdown > table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0px; border-spacing: 0px;
empty-cells: show; empty-cells: show;
border: 1px solid #e9e9e9; border: 1px solid #e9e9e9;
width: 95%; width: 95%;
margin-bottom: 24px; margin-bottom: 24px;
} }
.markdown>table th { .markdown > table th {
white-space: nowrap; white-space: nowrap;
color: #333; color: #333;
font-weight: 600; font-weight: 600;
} }
.markdown>table th, .markdown > table th,
.markdown>table td { .markdown > table td {
border: 1px solid #e9e9e9; border: 1px solid #e9e9e9;
padding: 8px 16px; padding: 8px 16px;
text-align: left; text-align: left;
} }
.markdown>table th { .markdown > table th {
background: #F7F7F7; background: #F7F7F7;
} }
.markdown blockquote { .markdown blockquote {
font-size: 90%; font-size: 90%;
color: #999; color: #999;
border-left: 4px solid #e9e9e9; border-left: 4px solid #e9e9e9;
padding-left: 0.8em; padding-left: 0.8em;
margin: 1em 0; margin: 1em 0;
} }
.markdown blockquote p { .markdown blockquote p {
margin: 0; margin: 0;
} }
.markdown .anchor { .markdown .anchor {
opacity: 0; opacity: 0;
transition: opacity 0.3s ease; transition: opacity 0.3s ease;
margin-left: 8px; margin-left: 8px;
} }
.markdown .waiting { .markdown .waiting {
color: #ccc; color: #ccc;
} }
.markdown h1:hover .anchor, .markdown h1:hover .anchor,
@ -314,27 +314,27 @@
.markdown h4:hover .anchor, .markdown h4:hover .anchor,
.markdown h5:hover .anchor, .markdown h5:hover .anchor,
.markdown h6:hover .anchor { .markdown h6:hover .anchor {
opacity: 1; opacity: 1;
display: inline-block; display: inline-block;
} }
.markdown>br, .markdown > br,
.markdown>p>br { .markdown > p > br {
clear: both; clear: both;
} }
.hljs { .hljs {
display: block; display: block;
background: white; background: white;
padding: 0.5em; padding: 0.5em;
color: #333333; color: #333333;
overflow-x: auto; overflow-x: auto;
} }
.hljs-comment, .hljs-comment,
.hljs-meta { .hljs-meta {
color: #969896; color: #969896;
} }
.hljs-string, .hljs-string,
@ -343,29 +343,29 @@
.hljs-strong, .hljs-strong,
.hljs-emphasis, .hljs-emphasis,
.hljs-quote { .hljs-quote {
color: #df5000; color: #df5000;
} }
.hljs-keyword, .hljs-keyword,
.hljs-selector-tag, .hljs-selector-tag,
.hljs-type { .hljs-type {
color: #a71d5d; color: #a71d5d;
} }
.hljs-literal, .hljs-literal,
.hljs-symbol, .hljs-symbol,
.hljs-bullet, .hljs-bullet,
.hljs-attribute { .hljs-attribute {
color: #0086b3; color: #0086b3;
} }
.hljs-section, .hljs-section,
.hljs-name { .hljs-name {
color: #63a35c; color: #63a35c;
} }
.hljs-tag { .hljs-tag {
color: #333333; color: #333333;
} }
.hljs-title, .hljs-title,
@ -374,21 +374,21 @@
.hljs-selector-class, .hljs-selector-class,
.hljs-selector-attr, .hljs-selector-attr,
.hljs-selector-pseudo { .hljs-selector-pseudo {
color: #795da3; color: #795da3;
} }
.hljs-addition { .hljs-addition {
color: #55a532; color: #55a532;
background-color: #eaffea; background-color: #eaffea;
} }
.hljs-deletion { .hljs-deletion {
color: #bd2c00; color: #bd2c00;
background-color: #ffecec; background-color: #ffecec;
} }
.hljs-link { .hljs-link {
text-decoration: underline; text-decoration: underline;
} }
/* 代码高亮 */ /* 代码高亮 */
@ -401,83 +401,83 @@ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javasc
*/ */
code[class*="language-"], code[class*="language-"],
pre[class*="language-"] { pre[class*="language-"] {
color: black; color: black;
background: none; background: none;
text-shadow: 0 1px white; text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left; text-align: left;
white-space: pre; white-space: pre;
word-spacing: normal; word-spacing: normal;
word-break: normal; word-break: normal;
word-wrap: normal; word-wrap: normal;
line-height: 1.5; line-height: 1.5;
-moz-tab-size: 4; -moz-tab-size: 4;
-o-tab-size: 4; -o-tab-size: 4;
tab-size: 4; tab-size: 4;
-webkit-hyphens: none; -webkit-hyphens: none;
-moz-hyphens: none; -moz-hyphens: none;
-ms-hyphens: none; -ms-hyphens: none;
hyphens: none; hyphens: none;
} }
pre[class*="language-"]::-moz-selection, pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection { code[class*="language-"] ::-moz-selection {
text-shadow: none; text-shadow: none;
background: #b3d4fc; background: #b3d4fc;
} }
pre[class*="language-"]::selection, pre[class*="language-"]::selection,
pre[class*="language-"] ::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"]::selection,
code[class*="language-"] ::selection { code[class*="language-"] ::selection {
text-shadow: none; text-shadow: none;
background: #b3d4fc; background: #b3d4fc;
} }
@media print { @media print {
code[class*="language-"], code[class*="language-"],
pre[class*="language-"] { pre[class*="language-"] {
text-shadow: none; text-shadow: none;
} }
} }
/* Code blocks */ /* Code blocks */
pre[class*="language-"] { pre[class*="language-"] {
padding: 1em; padding: 1em;
margin: .5em 0; margin: .5em 0;
overflow: auto; overflow: auto;
} }
:not(pre)>code[class*="language-"], :not(pre) > code[class*="language-"],
pre[class*="language-"] { pre[class*="language-"] {
background: #f5f2f0; background: #f5f2f0;
} }
/* Inline code */ /* Inline code */
:not(pre)>code[class*="language-"] { :not(pre) > code[class*="language-"] {
padding: .1em; padding: .1em;
border-radius: .3em; border-radius: .3em;
white-space: normal; white-space: normal;
} }
.token.comment, .token.comment,
.token.prolog, .token.prolog,
.token.doctype, .token.doctype,
.token.cdata { .token.cdata {
color: slategray; color: slategray;
} }
.token.punctuation { .token.punctuation {
color: #999; color: #999;
} }
.namespace { .namespace {
opacity: .7; opacity: .7;
} }
.token.property, .token.property,
@ -487,7 +487,7 @@ pre[class*="language-"] {
.token.constant, .token.constant,
.token.symbol, .token.symbol,
.token.deleted { .token.deleted {
color: #905; color: #905;
} }
.token.selector, .token.selector,
@ -496,7 +496,7 @@ pre[class*="language-"] {
.token.char, .token.char,
.token.builtin, .token.builtin,
.token.inserted { .token.inserted {
color: #690; color: #690;
} }
.token.operator, .token.operator,
@ -504,36 +504,36 @@ pre[class*="language-"] {
.token.url, .token.url,
.language-css .token.string, .language-css .token.string,
.style .token.string { .style .token.string {
color: #9a6e3a; color: #9a6e3a;
background: hsla(0, 0%, 100%, .5); background: hsla(0, 0%, 100%, .5);
} }
.token.atrule, .token.atrule,
.token.attr-value, .token.attr-value,
.token.keyword { .token.keyword {
color: #07a; color: #07a;
} }
.token.function, .token.function,
.token.class-name { .token.class-name {
color: #DD4A68; color: #DD4A68;
} }
.token.regex, .token.regex,
.token.important, .token.important,
.token.variable { .token.variable {
color: #e90; color: #e90;
} }
.token.important, .token.important,
.token.bold { .token.bold {
font-weight: bold; font-weight: bold;
} }
.token.italic { .token.italic {
font-style: italic; font-style: italic;
} }
.token.entity { .token.entity {
cursor: help; cursor: help;
} }

@ -1,125 +1,127 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<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"
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css"> type="image/x-icon" />
<link rel="stylesheet" href="demo.css"> <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
<link rel="stylesheet" href="iconfont.css"> <link rel="stylesheet" href="demo.css">
<script src="iconfont.js"></script> <link rel="stylesheet" href="iconfont.css">
<!-- jQuery --> <script src="iconfont.js"></script>
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script> <!-- jQuery -->
<!-- 代码高亮 --> <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script> <!-- 代码高亮 -->
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
</head> </head>
<body> <body>
<div class="main"> <div class="main">
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">&#xe86b;</a></h1> <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">&#xe86b;</a></h1>
<div class="nav-tabs"> <div class="nav-tabs">
<ul id="tabs" class="dib-box"> <ul id="tabs" class="dib-box">
<li class="dib active"><span>Unicode</span></li> <li class="dib active"><span>Unicode</span></li>
<li class="dib"><span>Font class</span></li> <li class="dib"><span>Font class</span></li>
<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">
<div class="content unicode" style="display: block;"> <div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe63d;</span> <span class="icon iconfont">&#xe63d;</span>
<div class="name">已勾选32</div> <div class="name">已勾选32</div>
<div class="code-name">&amp;#xe63d;</div> <div class="code-name">&amp;#xe63d;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe63e;</span> <span class="icon iconfont">&#xe63e;</span>
<div class="name">未勾选32</div> <div class="name">未勾选32</div>
<div class="code-name">&amp;#xe63e;</div> <div class="code-name">&amp;#xe63e;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe64a;</span> <span class="icon iconfont">&#xe64a;</span>
<div class="name">未勾选40</div> <div class="name">未勾选40</div>
<div class="code-name">&amp;#xe64a;</div> <div class="code-name">&amp;#xe64a;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe64b;</span> <span class="icon iconfont">&#xe64b;</span>
<div class="name">已勾选40</div> <div class="name">已勾选40</div>
<div class="code-name">&amp;#xe64b;</div> <div class="code-name">&amp;#xe64b;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe626;</span> <span class="icon iconfont">&#xe626;</span>
<div class="name">实 向右箭头-01</div> <div class="name">实 向右箭头-01</div>
<div class="code-name">&amp;#xe626;</div> <div class="code-name">&amp;#xe626;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe625;</span> <span class="icon iconfont">&#xe625;</span>
<div class="name">实 向下箭头-01</div> <div class="name">实 向下箭头-01</div>
<div class="code-name">&amp;#xe625;</div> <div class="code-name">&amp;#xe625;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe72d;</span> <span class="icon iconfont">&#xe72d;</span>
<div class="name">加号-填充</div> <div class="name">加号-填充</div>
<div class="code-name">&amp;#xe72d;</div> <div class="code-name">&amp;#xe72d;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe769;</span> <span class="icon iconfont">&#xe769;</span>
<div class="name">42指向上、上箭头</div> <div class="name">42指向上、上箭头</div>
<div class="code-name">&amp;#xe769;</div> <div class="code-name">&amp;#xe769;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe76b;</span> <span class="icon iconfont">&#xe76b;</span>
<div class="name">44指向下、下箭头</div> <div class="name">44指向下、下箭头</div>
<div class="code-name">&amp;#xe76b;</div> <div class="code-name">&amp;#xe76b;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe6e9;</span> <span class="icon iconfont">&#xe6e9;</span>
<div class="name">群蜂删除-充</div> <div class="name">群蜂删除-充</div>
<div class="code-name">&amp;#xe6e9;</div> <div class="code-name">&amp;#xe6e9;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe614;</span> <span class="icon iconfont">&#xe614;</span>
<div class="name">qq</div> <div class="name">qq</div>
<div class="code-name">&amp;#xe614;</div> <div class="code-name">&amp;#xe614;</div>
</li> </li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe68a;</span> <span class="icon iconfont">&#xe68a;</span>
<div class="name">微信-36</div> <div class="name">微信-36</div>
<div class="code-name">&amp;#xe68a;</div> <div class="code-name">&amp;#xe68a;</div>
</li> </li>
</ul> </ul>
<div class="article markdown"> <div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2> <h2 id="unicode-">Unicode 引用</h2>
<hr> <hr>
<p>Unicode 是字体在网页端最原始的应用方式,特点是:</p> <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
<ul> <ul>
<li>兼容性最好,支持 IE6+,及所有现代浏览器。</li> <li>兼容性最好,支持 IE6+,及所有现代浏览器。</li>
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li> <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
<li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li> <li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li>
</ul> </ul>
<blockquote> <blockquote>
<p>注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式</p> <p>注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式</p>
</blockquote> </blockquote>
<p>Unicode 使用步骤如下:</p> <p>Unicode 使用步骤如下:</p>
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3> <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
<pre><code class="language-css" <pre><code class="language-css"
>@font-face { >@font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('iconfont.eot'); src: url('iconfont.eot');
src: url('iconfont.eot?#iefix') format('embedded-opentype'), src: url('iconfont.eot?#iefix') format('embedded-opentype'),
@ -129,9 +131,9 @@
url('iconfont.svg#iconfont') format('svg'); url('iconfont.svg#iconfont') format('svg');
} }
</code></pre> </code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
<pre><code class="language-css" <pre><code class="language-css"
>.iconfont { >.iconfont {
font-family: "iconfont" !important; font-family: "iconfont" !important;
font-size: 16px; font-size: 16px;
font-style: normal; font-style: normal;
@ -139,271 +141,271 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
</code></pre> </code></pre>
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3> <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
<pre> <pre>
<code class="language-html" <code class="language-html"
>&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt; >&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
</code></pre> </code></pre>
<blockquote> <blockquote>
<p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p> <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
</blockquote> </blockquote>
</div>
</div>
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-yigouxuan"></span>
<div class="name">
已勾选32
</div>
<div class="code-name">.icon-yigouxuan
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-weigouxuan"></span>
<div class="name">
未勾选32
</div>
<div class="code-name">.icon-weigouxuan
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-weigouxuan1"></span>
<div class="name">
未勾选40
</div>
<div class="code-name">.icon-weigouxuan1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-yigouxuan1"></span>
<div class="name">
已勾选40
</div>
<div class="code-name">.icon-yigouxuan1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shixiangyoujiantou-"></span>
<div class="name">
实 向右箭头-01
</div>
<div class="code-name">.icon-shixiangyoujiantou-
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shixiangxiajiantou-"></span>
<div class="name">
实 向下箭头-01
</div>
<div class="code-name">.icon-shixiangxiajiantou-
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiahao"></span>
<div class="name">
加号-填充
</div>
<div class="code-name">.icon-jiahao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-up"></span>
<div class="name">
42指向上、上箭头
</div>
<div class="code-name">.icon-up
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-down"></span>
<div class="name">
44指向下、下箭头
</div>
<div class="code-name">.icon-down
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-delete"></span>
<div class="name">
群蜂删除-充
</div>
<div class="code-name">.icon-delete
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-qq"></span>
<div class="name">
qq
</div>
<div class="code-name">.icon-qq
</div> </div>
</li> </div>
<div class="content font-class">
<li class="dib"> <ul class="icon_lists dib-box">
<span class="icon iconfont icon-weixin"></span>
<div class="name"> <li class="dib">
微信-36 <span class="icon iconfont icon-yigouxuan"></span>
</div> <div class="name">
<div class="code-name">.icon-weixin 已勾选32
</div> </div>
</li> <div class="code-name">.icon-yigouxuan
</div>
</ul> </li>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2> <li class="dib">
<hr> <span class="icon iconfont icon-weigouxuan"></span>
<div class="name">
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p> 未勾选32
<p>与 Unicode 使用方式相比,具有如下特点:</p> </div>
<ul> <div class="code-name">.icon-weigouxuan
<li>兼容性良好,支持 IE8+,及所有现代浏览器。</li> </div>
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li> </li>
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
<li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li> <li class="dib">
</ul> <span class="icon iconfont icon-weigouxuan1"></span>
<p>使用步骤如下:</p> <div class="name">
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3> 未勾选40
<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt; </div>
<div class="code-name">.icon-weigouxuan1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-yigouxuan1"></span>
<div class="name">
已勾选40
</div>
<div class="code-name">.icon-yigouxuan1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shixiangyoujiantou-"></span>
<div class="name">
实 向右箭头-01
</div>
<div class="code-name">.icon-shixiangyoujiantou-
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shixiangxiajiantou-"></span>
<div class="name">
实 向下箭头-01
</div>
<div class="code-name">.icon-shixiangxiajiantou-
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiahao"></span>
<div class="name">
加号-填充
</div>
<div class="code-name">.icon-jiahao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-up"></span>
<div class="name">
42指向上、上箭头
</div>
<div class="code-name">.icon-up
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-down"></span>
<div class="name">
44指向下、下箭头
</div>
<div class="code-name">.icon-down
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-delete"></span>
<div class="name">
群蜂删除-充
</div>
<div class="code-name">.icon-delete
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-qq"></span>
<div class="name">
qq
</div>
<div class="code-name">.icon-qq
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-weixin"></span>
<div class="name">
微信-36
</div>
<div class="code-name">.icon-weixin
</div>
</li>
</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
<hr>
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
<p>与 Unicode 使用方式相比,具有如下特点:</p>
<ul>
<li>兼容性良好,支持 IE8+,及所有现代浏览器。</li>
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
<li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li>
</ul>
<p>使用步骤如下:</p>
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
</code></pre> </code></pre>
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3> <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
<pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt; <pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
</code></pre> </code></pre>
<blockquote> <blockquote>
<p>" <p>"
iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p> iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
</blockquote> </blockquote>
</div> </div>
</div> </div>
<div class="content symbol"> <div class="content symbol">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-yigouxuan"></use> <use xlink:href="#icon-yigouxuan"></use>
</svg> </svg>
<div class="name">已勾选32</div> <div class="name">已勾选32</div>
<div class="code-name">#icon-yigouxuan</div> <div class="code-name">#icon-yigouxuan</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-weigouxuan"></use> <use xlink:href="#icon-weigouxuan"></use>
</svg> </svg>
<div class="name">未勾选32</div> <div class="name">未勾选32</div>
<div class="code-name">#icon-weigouxuan</div> <div class="code-name">#icon-weigouxuan</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-weigouxuan1"></use> <use xlink:href="#icon-weigouxuan1"></use>
</svg> </svg>
<div class="name">未勾选40</div> <div class="name">未勾选40</div>
<div class="code-name">#icon-weigouxuan1</div> <div class="code-name">#icon-weigouxuan1</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-yigouxuan1"></use> <use xlink:href="#icon-yigouxuan1"></use>
</svg> </svg>
<div class="name">已勾选40</div> <div class="name">已勾选40</div>
<div class="code-name">#icon-yigouxuan1</div> <div class="code-name">#icon-yigouxuan1</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shixiangyoujiantou-"></use> <use xlink:href="#icon-shixiangyoujiantou-"></use>
</svg> </svg>
<div class="name">实 向右箭头-01</div> <div class="name">实 向右箭头-01</div>
<div class="code-name">#icon-shixiangyoujiantou-</div> <div class="code-name">#icon-shixiangyoujiantou-</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shixiangxiajiantou-"></use> <use xlink:href="#icon-shixiangxiajiantou-"></use>
</svg> </svg>
<div class="name">实 向下箭头-01</div> <div class="name">实 向下箭头-01</div>
<div class="code-name">#icon-shixiangxiajiantou-</div> <div class="code-name">#icon-shixiangxiajiantou-</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiahao"></use> <use xlink:href="#icon-jiahao"></use>
</svg> </svg>
<div class="name">加号-填充</div> <div class="name">加号-填充</div>
<div class="code-name">#icon-jiahao</div> <div class="code-name">#icon-jiahao</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-up"></use> <use xlink:href="#icon-up"></use>
</svg> </svg>
<div class="name">42指向上、上箭头</div> <div class="name">42指向上、上箭头</div>
<div class="code-name">#icon-up</div> <div class="code-name">#icon-up</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-down"></use> <use xlink:href="#icon-down"></use>
</svg> </svg>
<div class="name">44指向下、下箭头</div> <div class="name">44指向下、下箭头</div>
<div class="code-name">#icon-down</div> <div class="code-name">#icon-down</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-delete"></use> <use xlink:href="#icon-delete"></use>
</svg> </svg>
<div class="name">群蜂删除-充</div> <div class="name">群蜂删除-充</div>
<div class="code-name">#icon-delete</div> <div class="code-name">#icon-delete</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-qq"></use> <use xlink:href="#icon-qq"></use>
</svg> </svg>
<div class="name">qq</div> <div class="name">qq</div>
<div class="code-name">#icon-qq</div> <div class="code-name">#icon-qq</div>
</li> </li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-weixin"></use> <use xlink:href="#icon-weixin"></use>
</svg> </svg>
<div class="name">微信-36</div> <div class="name">微信-36</div>
<div class="code-name">#icon-weixin</div> <div class="code-name">#icon-weixin</div>
</li> </li>
</ul> </ul>
<div class="article markdown"> <div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2> <h2 id="symbol-">Symbol 引用</h2>
<hr> <hr>
<p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a> <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p> 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
<ul> <ul>
<li>支持多色图标了,不再受单色限制。</li> <li>支持多色图标了,不再受单色限制。</li>
<li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li> <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
<li>兼容性较差,支持 IE9+,及现代浏览器。</li> <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
<li>浏览器渲染 SVG 的性能一般,还不如 png。</li> <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
</ul> </ul>
<p>使用步骤如下:</p> <p>使用步骤如下:</p>
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3> <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt; <pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
</code></pre> </code></pre>
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3> <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
<pre><code class="language-html">&lt;style&gt; <pre><code class="language-html">&lt;style&gt;
.icon { .icon {
width: 1em; width: 1em;
height: 1em; height: 1em;
@ -413,34 +415,34 @@
} }
&lt;/style&gt; &lt;/style&gt;
</code></pre> </code></pre>
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3> <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt; <pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
&lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt; &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
&lt;/svg&gt; &lt;/svg&gt;
</code></pre> </code></pre>
</div> </div>
</div> </div>
</div> </div>
</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,71 +1,70 @@
@font-face {font-family: "iconfont"; @font-face {
src: url('iconfont.eot?t=1589437921018'); /* IE9 */ font-family: "iconfont";
src: url('iconfont.eot?t=1589437921018#iefix') format('embedded-opentype'), /* IE6-IE8 */ src: url('iconfont.eot?t=1589437921018'); /* IE9 */
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'), 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('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 {
font-family: "iconfont" !important; font-family: "iconfont" !important;
font-size: 16px; font-size: 16px;
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-yigouxuan:before { .icon-yigouxuan:before {
content: "\e63d"; content: "\e63d";
} }
.icon-weigouxuan:before { .icon-weigouxuan:before {
content: "\e63e"; content: "\e63e";
} }
.icon-weigouxuan1:before { .icon-weigouxuan1:before {
content: "\e64a"; content: "\e64a";
} }
.icon-yigouxuan1:before { .icon-yigouxuan1:before {
content: "\e64b"; content: "\e64b";
} }
.icon-shixiangyoujiantou-:before { .icon-shixiangyoujiantou-:before {
content: "\e626"; content: "\e626";
} }
.icon-shixiangxiajiantou-:before { .icon-shixiangxiajiantou-:before {
content: "\e625"; content: "\e625";
} }
.icon-jiahao:before { .icon-jiahao:before {
content: "\e72d"; content: "\e72d";
} }
.icon-up:before { .icon-up:before {
content: "\e769"; content: "\e769";
} }
.icon-down:before { .icon-down:before {
content: "\e76b"; content: "\e76b";
} }
.icon-delete:before { .icon-delete:before {
content: "\e6e9"; content: "\e6e9";
} }
.icon-qq:before { .icon-qq:before {
content: "\e614"; content: "\e614";
font-size: 60px; font-size: 60px;
color: #22aaf8; color: #22aaf8;
margin-left: 32px; margin-left: 32px;
} }
.icon-weixin:before { .icon-weixin:before {
content: "\e68a"; content: "\e68a";
font-size: 60px; font-size: 60px;
color: #10b747; color: #10b747;
margin-right: 32px; margin-right: 32px;
} }

@ -4,59 +4,80 @@
2013-9-30: Created. 2013-9-30: Created.
--> -->
<svg> <svg>
<metadata> <metadata>
Created by iconfont Created by iconfont
</metadata> </metadata>
<defs> <defs>
<font id="iconfont" horiz-adv-x="1024" > <font id="iconfont" horiz-adv-x="1024">
<font-face <font-face
font-family="iconfont" font-family="iconfont"
font-weight="500" font-weight="500"
font-stretch="normal" font-stretch="normal"
units-per-em="1024" units-per-em="1024"
ascent="896" ascent="896"
descent="-128" descent="-128"
/> />
<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;"
<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" /> 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="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="weigouxuan" unicode="&#58942;"
<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" /> 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="shixiangyoujiantou-" unicode="&#58918;" d="M701.44 384L322.56 99.413V668.587L701.44 384z" horiz-adv-x="1024" />
<glyph glyph-name="weigouxuan1" unicode="&#58954;"
<glyph glyph-name="shixiangxiajiantou-" unicode="&#58917;" d="M512 194.56L227.413 573.44h569.174L512 194.56z" horiz-adv-x="1024" /> 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="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="yigouxuan1" unicode="&#58955;"
<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" /> 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="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="shixiangyoujiantou-" unicode="&#58918;" d="M701.44 384L322.56 99.413V668.587L701.44 384z"
<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" /> 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="shixiangxiajiantou-" unicode="&#58917;"
<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" /> 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"/>
</font>
</defs></svg> <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="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="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>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

@ -1,3 +1,3 @@
[class*=" icon-"], [class^=icon-] { [class*=" icon-"], [class^=icon-] {
font-family: iconfont!important; font-family: iconfont !important;
} }

@ -1,16 +1,17 @@
@import "lib/var"; @import "lib/var";
@import "var"; @import "var";
html, html,
body, body,
#app, #app,
.wrapper { .wrapper {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
body { body {
min-width: 1280px; min-width: 1280px;
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif; font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
font-size: 14px; font-size: 14px;
background: rgba(0, 0, 0, 0.02); background: rgba(0, 0, 0, 0.02);
} }

@ -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 {

@ -69,11 +69,12 @@ input::-ms-reveal {
display: none; display: none;
} }
ol,ul{ ol, ul {
li{ li {
list-style: none; list-style: none;
} }
} }
h1 { h1 {
font-size: 2em; font-size: 2em;
margin: 0.67em 0; margin: 0.67em 0;
@ -102,7 +103,7 @@ li:focus {
outline-width: 0; outline-width: 0;
} }
i{ i {
font-style: normal; font-style: normal;
} }
@ -228,7 +229,7 @@ select {
text-transform: none; text-transform: none;
} }
button:focus{ button:focus {
outline: none; outline: none;
} }

@ -11,7 +11,7 @@ $color-title: #17233d !default;
$color-content: #515a6e !default; $color-content: #515a6e !default;
$color-disabled: #c5c8ce !default; $color-disabled: #c5c8ce !default;
$bg-grey:#f0f0f0 !default; $bg-grey: #f0f0f0 !default;
$bg-white: #ffffff !default; $bg-white: #ffffff !default;
$bg-black: #393D49 !default; $bg-black: #393D49 !default;
@ -19,38 +19,38 @@ $color-border: #dcdfe6 !default;
// 主题背景色 // 主题背景色
$bg-colors: ( $bg-colors: (
'white': $bg-white, 'white': $bg-white,
'black': $bg-black, 'black': $bg-black,
'grey': $bg-grey, 'grey': $bg-grey,
'green': $color-green, 'green': $color-green,
'blue': $color-blue, 'blue': $color-blue,
'yellow': $color-yellow, 'yellow': $color-yellow,
'red': $color-red, 'red': $color-red,
) !default; ) !default;
// 文本颜色 // 文本颜色
$text-colors: ( $text-colors: (
'white': $color-white, 'white': $color-white,
'black': $color-black, 'black': $color-black,
'grey': $color-grey, 'grey': $color-grey,
'green': $color-green, 'green': $color-green,
'blue': $color-blue, 'blue': $color-blue,
'yellow': $color-yellow, 'yellow': $color-yellow,
'red': $color-red, 'red': $color-red,
'title': $color-title, 'title': $color-title,
'content': $color-content, 'content': $color-content,
'disabled': $color-disabled 'disabled': $color-disabled
) !default; ) !default;
// 边框颜色 // 边框颜色
$border-colors: ( $border-colors: (
'white': $color-white, 'white': $color-white,
'black': $color-black, 'black': $color-black,
'grey': $color-border, 'grey': $color-border,
'green': $color-green, 'green': $color-green,
'blue': $color-blue, 'blue': $color-blue,
'yellow': $color-yellow, 'yellow': $color-yellow,
'red': $color-red 'red': $color-red
) !default; ) !default;
// border // border
@ -59,13 +59,13 @@ $border-radius-through: 20 !default;
// margin padding left right top bottom // margin padding left right top bottom
$box-sizes: ( $box-sizes: (
-20, -15, -12, -10, -8, -6, -5, -4, -3, -2, -1, -20, -15, -12, -10, -8, -6, -5, -4, -3, -2, -1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 25, 30, 35, 40, 50, 60, 80, 100) !default; 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 25, 30, 35, 40, 50, 60, 80, 100) !default;
// width height // width height
$sizes: ( $sizes: (
40, 50, 60, 70, 80, 90, 100, 40, 50, 60, 70, 80, 90, 100,
120, 150, 200, 250, 300, 400, 500, 600, 800, 1000, 1200) !default; 120, 150, 200, 250, 300, 400, 500, 600, 800, 1000, 1200) !default;
// font-size // font-size
$font-size-em-through: 10 !default; $font-size-em-through: 10 !default;

@ -2,24 +2,27 @@ $main-color: #9076FF;
$inner-width: 1440px; $inner-width: 1440px;
@mixin ellipsis { @mixin ellipsis {
overflow: hidden; overflow: hidden;
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;
-webkit-line-clamp: $num; -webkit-line-clamp: $num;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
.ellipsis{ .ellipsis {
@include ellipsis(); @include ellipsis();
} }
.mul-ellipsis2{
@include mul-ellipsis(2); .mul-ellipsis2 {
@include mul-ellipsis(2);
} }
.mul-ellipsis3{
@include mul-ellipsis(3); .mul-ellipsis3 {
@include mul-ellipsis(3);
} }
Loading…
Cancel
Save