dev_2022-05-11
yujialong 3 years ago
parent 245397841c
commit 9eed74a3b5
  1. 15
      src/App.vue
  2. 147
      src/api/index.js
  3. 41
      src/components/pdf/index.vue
  4. 90
      src/components/quill/index.vue
  5. 30
      src/components/quill/options.js
  6. 40
      src/i18n/index.js
  7. 11
      src/layouts/footer/index.vue
  8. 33
      src/layouts/header/index.vue
  9. 36
      src/layouts/home/index.vue
  10. 100
      src/layouts/navbar/index.vue
  11. 19
      src/libs/auth/generateBtnPermission.js
  12. 2
      src/libs/bus.js
  13. 4
      src/libs/random_str.js
  14. 14
      src/libs/resize/index.js
  15. 26
      src/libs/route/addRoutes.js
  16. 28
      src/libs/route/generateRoutes.js
  17. 6
      src/libs/route/resetRouter.js
  18. 10
      src/libs/util.cookies.js
  19. 10
      src/libs/util.db.js
  20. 174
      src/libs/util.js
  21. 40
      src/main.js
  22. 2
      src/mixins/app.js
  23. 6
      src/mixins/setBackground/index.js
  24. 61
      src/pages/account/login/index.vue
  25. 167
      src/pages/achievement/ass/index.vue
  26. 101
      src/pages/achievement/edit/index.vue
  27. 273
      src/pages/achievement/list/index.vue
  28. 193
      src/pages/achievement/show/index.vue
  29. 277
      src/pages/achievement/teach/index.vue
  30. 230
      src/pages/achievement/vir/index.vue
  31. 646
      src/pages/assessment/add/index.vue
  32. 276
      src/pages/assessment/list/index.vue
  33. 105
      src/pages/course/courseManagement/add.vue
  34. 388
      src/pages/course/courseManagement/contentSettings.vue
  35. 82
      src/pages/course/courseManagement/index.vue
  36. 174
      src/pages/course/courseManagement/preview.vue
  37. 28
      src/pages/course/index.vue
  38. 80
      src/pages/course/sortManagement/index.vue
  39. 418
      src/pages/evaluation/list/index.vue
  40. 9
      src/pages/exception/error/403/index.vue
  41. 9
      src/pages/exception/error/404/index.vue
  42. 25
      src/pages/exception/i18n/index.vue
  43. 265
      src/pages/exception/icon/index.vue
  44. 127
      src/pages/information/columnManage/index.vue
  45. 131
      src/pages/information/contentManage/addArticle.vue
  46. 111
      src/pages/information/contentManage/contentList.vue
  47. 16
      src/pages/information/contentManage/index.vue
  48. 18
      src/pages/information/index.vue
  49. 220
      src/pages/match/add.vue
  50. 151
      src/pages/match/index.vue
  51. 21
      src/pages/match/manage/index.vue
  52. 201
      src/pages/match/manage/matchDetail.vue
  53. 78
      src/pages/match/manage/matchProgress.vue
  54. 84
      src/pages/match/manage/matchSignup.vue
  55. 7
      src/pages/project/add/index.vue
  56. 101
      src/pages/project/list/index.vue
  57. 575
      src/pages/setting/person/index.vue
  58. 1148
      src/pages/student/list/index.vue
  59. 35
      src/pages/system/list/index.vue
  60. 190
      src/pages/system/list/role.vue
  61. 638
      src/pages/system/list/staff.vue
  62. 233
      src/pages/system/list/staffSide.vue
  63. 51
      src/pages/system/list/stafftree.vue
  64. 16
      src/plugins/auth/index.js
  65. 6
      src/plugins/filters/index.js
  66. 10
      src/plugins/index.js
  67. 118
      src/plugins/requests/index.js
  68. 12
      src/plugins/throttle/index.js
  69. 8
      src/router/index.js
  70. 32
      src/router/modules/achievement.js
  71. 20
      src/router/modules/assessment.js
  72. 28
      src/router/modules/course.js
  73. 16
      src/router/modules/evaluation.js
  74. 20
      src/router/modules/information.js
  75. 24
      src/router/modules/match.js
  76. 20
      src/router/modules/project.js
  77. 16
      src/router/modules/setting.js
  78. 16
      src/router/modules/student.js
  79. 16
      src/router/modules/system.js
  80. 26
      src/router/permission.js
  81. 60
      src/router/routes.js
  82. 8
      src/setting.env.js
  83. 80
      src/setting.js
  84. 6
      src/store/getters.js
  85. 22
      src/store/index.js
  86. 12
      src/store/modules/auth.js
  87. 14
      src/store/modules/info.js
  88. 14
      src/store/modules/layout.js
  89. 10
      src/store/modules/match.js
  90. 14
      src/store/modules/project.js
  91. 77
      src/store/modules/user.js
  92. 44
      src/styles/common.scss
  93. 22
      src/styles/font/icon/demo_index.html
  94. 9
      src/styles/font/icon/iconfont.css
  95. 45
      src/styles/font/icon/iconfont.svg
  96. 1
      src/styles/layout/index.scss
  97. 4
      src/styles/lib/_flex.scss
  98. 2
      src/styles/lib/_float.scss
  99. 1
      src/styles/lib/_link.scss
  100. 1
      src/styles/lib/_position.scss
  101. Some files were not shown because too many files have changed in this diff Show More

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

@ -1,12 +1,12 @@
import Setting from '@/setting';
import Setting from "@/setting";
// let host = Setting.apiBaseURL
let host = 'http://192.168.31.151:9000/'; // 榕
let host = "http://192.168.31.151:9000/"; // 榕
// let host = 'http://192.168.31.125:9000/'; // 坤
let xsHost = 'http://39.108.250.202:9000/'; // 线上
let xsHost = "http://39.108.250.202:9000/"; // 线上
let uploadURL = Setting.upload.apiURL;
let host1 = 'http://39.108.250.202:8080/'; // 川大
let host1 = "http://39.108.250.202:8080/"; // 川大
export default {
// fileupload: `${uploadURL}oss/manage/fileupload`,
@ -17,16 +17,27 @@ export default {
// bindPhoneOrEmail:`${host}users/users/userAccount/bindPhoneOrEmail`,// 绑定手机
// sendPhoneOrEmailCode:`${host} users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码
// 考核管理
pageByCondition: `${host}occupationlab/assessment/pageByCondition`, // 考核管理列表
saveAssessment: `${host}occupationlab/assessment/saveAssessment`, // 创建考核
modifyAssessment: `${host}occupationlab/assessment/modifyAssessment`, // 编辑考核
getDetailById: `${host}occupationlab/assessment/getDetailById`, // 根据考核Id查询考核详情
deleteAssessment: `${host}occupationlab/assessment/deleteAssessment`, // 单个、批量删除
collectPaper: `${host}occupationlab/assessment/collectPaper`, // 收卷(提前结束)
// 学生组织架构
treeList: `${host}occupationlab/architecture/treeList`, // 学生组织架构树形列表
//学生管理
resetPassword: `${host}users/users/userAccount/resetPwd`, // 密码重置
updateAccountEnable: `${host}occupationlab/architecture/updateAccountEnable`, // 密码重置
checkEmailOrPhone: `${host}occupationlab/architecture/checkEmailOrPhone`, // 新增学生前:校验手机号或者邮箱
checkWorkNumOrAccount: `${host}occupationlab/architecture/checkWorkNumOrAccount`, // 新增/编辑学生前:校验学号或者学生账号
delStudent: `${host}occupationlab/architecture/delStudent`, // 单个、批量删除学生
addStudent: `${host}occupationlab/architecture/addStudent`, // 新增学生
modifyStudent: `${host}occupationlab/architecture/modifyStudent`, // 编辑学生
getStudentInfoByAccountId: `${host}occupationlab/architecture/getStudentInfoByAccountId`, // 查看学生信息
getDetailByAccount: `${host}occupationlab/architecture/getDetailByAccount`, // 新增用户前调用:按帐户获取详细信息
importStudent: `${host}occupationlab/architecture/importStudent`, // 批量导入学生
exportFailure: `${host}occupationlab/architecture/exportFailure`, // 批量导入学生失败数据导出
removeStudent: `${host}occupationlab/architecture/removeStudent`, // 移除学生
organizationalStudentList: `${host}occupationlab/architecture/organizationalStudentList`, // 根据组织架构筛选学生列表
studentList: `${host}occupationlab/architecture/studentList`, // 学生列表
stuOrganizationTree: `${host}occupationlab/architecture/stuOrganizationTree`, // 学生组织架构树
treeList: `${host}occupationlab/architecture/treeList`, // 学生组织架构树形列表
saveOrg: `${host}occupationlab/architecture/save`, // 新增组织架构
updateOrg: `${host}occupationlab/architecture/update`, // 编辑组织架构
deleteOrg: `${host}occupationlab/architecture/delete`, // 删除组织架构
// 测评管理
questionsList: `${host}occupationlab/questions/list`, // 题库列表查询
@ -41,6 +52,25 @@ export default {
questionsInfo: `${host}occupationlab/questions/info`, // 测评规则信息的展示
questionsUpdateRules: `${host}occupationlab/questions/updateEvaluationRules`, // 修改测评规则信息
// 考核管理
pageByCondition: `${host}occupationlab/assessment/pageByCondition`, // 考核管理列表
saveAssessment: `${host}occupationlab/assessment/saveAssessment`, // 创建考核
modifyAssessment: `${host}occupationlab/assessment/modifyAssessment`, // 编辑考核
getDetailById: `${host}occupationlab/assessment/getDetailById`, // 根据考核Id查询考核详情
deleteAssessment: `${host}occupationlab/assessment/deleteAssessment`, // 单个、批量删除
collectPaper: `${host}occupationlab/assessment/collectPaper`, // 收卷(提前结束)
schoolCourse: `${host}nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程
projectListByCourseId: `${host}nakadai/nakadai/curriculum/projectListByCourseId`, // 获取学校购买订单后的课程
// 成绩管理
deleteExperimentalReport: `${host}occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告
exportAssessmentInfo: `${host}occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `${host}occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
getAchievementInfo: `${host}occupationlab/achievement/getAchievementInfo`, // 管理端成绩管理
getAssessmentDetail: `${host}occupationlab/achievement/getAssessmentDetail`, // 管理端考核成绩详情
getPracticeDetail: `${host}occupationlab/achievement/getPracticeDetail`, // 管理端练习成绩详情
myClass: `${host}occupationlab/achievement/myClass`, // 教师端:我的班级
deleteReportById: `${host}occupationlab/achievement/deleteReportById`, // 批量删除成绩管理中的项目/批量删除成绩管理中的考核
// 项目管理
avgValues: `${host}occupationlab/projectManage/avgValues`, // 平均分分配值
@ -78,7 +108,6 @@ export default {
disableApplicant: `${host}occupationlab/enterprise/match/applicant/disableApplicant`,
batchExport: `${host}occupationlab/enterprise/match/applicant/batchExport`,
// 栏目管理
addColumn: `${host}occupationlab/enterprise/information/column/addColumn`,
deleteColumn: `${host}occupationlab/enterprise/information/column/deleteColumn`,
@ -95,7 +124,6 @@ export default {
queryArticleByCondition: `${host}occupationlab/enterprise/information/article/queryArticleByCondition`,
articleSort: `${host}occupationlab/enterprise/information/article/articleSort`,
// 课程管理
queryCourseByCondition: `${host}occupationlab/management/edu/course/queryCourseByCondition`, // 课程列表分页条件查询
addCourse: `${host}occupationlab/management/edu/course/addCourse`, // 添加课程
@ -122,16 +150,10 @@ export default {
editSubsection: `${host}occupationlab/management/edu/courseSubsection/editSubsection`, // 修改小节
getSubsection: `${host}occupationlab/management/edu/courseSubsection/getSubsection`, // 根据小节id获取预览文件地址
// 阿里云文件/视频管理
fileDeletion: `${host}nakadai/nakadai/oss/fileDeletion`, // 删除OSS文件
fileupload: `${host}nakadai/nakadai/oss/fileUpload`, // 文件上传
getPlayAuth: `${host}occupationlab/oss/manage/getPlayAuth`,
removeMoreVideo: `${host}occupationlab/oss/manage/removeMoreVideo`,
removeVideo: `${host}occupationlab/oss/manage/removeVideo`,
getPlayAuth: `${host}nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证
@ -143,6 +165,9 @@ export default {
// getPlayAuth: `${host}occupationlab/oss/manage/getPlayAuth`,
removeMoreVideo: `${host}occupationlab/oss/manage/removeMoreVideo`,
removeVideo: `${host}occupationlab/oss/manage/removeVideo`,
updateLogInNumber: `${host}liuwanr/userInfo/updateLogInNumber`, //用户登录修改登录次数和登陆时间
@ -181,65 +206,6 @@ export default {
bindPhone: `${host}evaluation/tms/user/bindPhone`,//校验手机验证码
examinePassword: `${host}evaluation/tms/user/examinePassword`,//更换密码
// 测评管理
list: `${host}evaluation/tms/questions/list`, //分页加条件查询试题信息
info: `${host}evaluation/tms/evaluationrules/info`, //测评规则信息的展示
update: `${host}evaluation/tms/evaluationrules/update`, //修改测评规则信息
delete: `${host}evaluation/tms/questions/delete`, //批量删除试题信息
// questionsTemplate: `${host}template/试题导入模板.xlsx`, //excel模板文件下载
import: `${host}evaluation/tms/questions/import`, //通过excel批量导入
infoId: `${host}evaluation/tms/questions/info/`, //根据试题id查询试题详情信息
isenable: `${host}evaluation/tms/questions/isenable`, //是否禁用试题
save: `${host}evaluation/tms/questions/save`, //新增一道试题
// questionsUpdate: `${host}evaluation/tms/questions/update`, //根据试题id修改试题信息
upload: `${host}evaluation/tms/questions/upload`, //excel模板文件上传
export_failure: `${host}evaluation/tms/questions/export_failure`, //导出导入失败的数据和失败原因
expDelete: `${host}evaluation/tms/exp/delete`, //删除实验教学
expList: `${host}evaluation/tms/exp/list`, //实验教学列表
expSave: `${host}evaluation/tms/exp/save`, //添加实验教学
expUpdate: `${host}evaluation/tms/exp/update`, //修改实验教学
expInfo: `${host}evaluation/tms/exp/getById/`, //实验教学详情
expCheck: `${host}evaluation/tms/exp/check`, //实验名称判重
getInvitationCode: `${host}evaluation/tms/exp/getInvitationCode`, //查询邀请码是否存在
expInfo1: `${host}evaluation/tms/exp/upload`, //实验教学提前结束
// queryAllManagements: `${host}project/ProjectManagement/queryAllManagements`, //项目管理列表信息
queryManagements: `${host}project/ProjectManagement/queryManagements`, //项目管理列表信息
addRole: `${host}project/ProjectManagement/addRole`, //新增案例对象
// avgValues: `${host}project/ProjectManagement/avgValues`, //平均分配分值
getByRoleId: `${host}project/ProjectManagement/getByRoleId`, //根据角色id查询信息
getByjudgmentPointsId: `${host}project/ProjectManagement/getByjudgmentPointsId`, //实验任务表格信息的展示
queryAllJudgmentPoints: `${host}project/ProjectManagement/queryAllJudgmentPoints`, //添加判分点面板的数据展示+条件筛选
getProjectId: `${host}project/ProjectManagement/getProjectId`, //根据项目管理id查询对应信息
updateProjectManagement: `${host}project/ProjectManagement/updateProjectManagement`, //编辑项目管理
addProjectManagement: `${host}project/ProjectManagement/addProjectManagement`, //添加项目管理
removeProjectManagement: `${host}project/ProjectManagement/removeProjectManagement`, //删除
getJudgmentPoints: `${host}project/ProjectManagement/getJudgmentPoints`, //复制项目获取数据
getZZJudgmentPoints: `${host}project/ProjectManagement/getZZJudgmentPoints`, //复制项目获取数据
updateRole: `${host}project/ProjectManagement/updateRole`, //修改实验数据—角色信息
isNameExistis: `${host}project/ProjectManagement/isNameExistis`, //项目名称是否存在
QueryPfdInformation: `${host}judgment/pointOfJudgement/queryPfdInformation`, //判分点详细信息
addProjectManagementTrad: `${host}project/ProjectManagement/newAddProjectManagement`,
getTrdingJudgmentPoints: `${host}project/ProjectManagement/getTrdingJudgmentPoints`,
updateProjectManagementTrad: `${host}project/ProjectManagement/newUpdateProjectManagement`,
enableProject: `${host}project/ProjectManagement/enable`,
QueryPointOfJudgement: `${host}judgment/pointOfJudgement/queryPointOfJudgement`, //判分点列表查询
queryUserIds: `${host}liuwanr/userInfo/queryUserIds`,
// 学生管理
addStudent: `${host}evaluation/tms/student/zzAddStudent`,
daleteStudent: `${host}evaluation/tms/student/daleteStudent`,
disableAccount: `${host}evaluation/tms/student/disableAccount`,
queryStudent: `${host}evaluation/tms/student/queryStudent`,
reSetPassword: `${host}evaluation/tms/student/reSetPassword`,
updateStudent: `${host}evaluation/tms/student/updateStudent`,
downloadStudent: `${host}evaluation/tms/student/download`,
uploadFile: `${host}evaluation/tms/student/uploadFile`,
export_failureStudent: `${host}evaluation/tms/student/export_failure`,
queryAccountStudent: `${host}evaluation/tms/student/queryAccount`,
studentTemplate: `${host}template/student.xlsx`,
// 员工管理
addStaff: `${host}evaluation/tms/system/addStaff`,
daleteBatchStaff: `${host}evaluation/tms/system/daleteBatchStaff`,
@ -250,7 +216,7 @@ export default {
export_failureStaff: `${host}evaluation/tms/system/export_failure`,
uploadFileStaff: `${host}evaluation/tms/system/uploadFile`,
queryAccountStaff: `${host}evaluation/tms/system/queryAccount`,
resetPwd: `${host}evaluation/tms/system/resetPwd`,
// resetPwd: `${host}evaluation/tms/system/resetPwd`,
dalStaffByStaffGradeId: `${host}evaluation/tms/system/dalStaffByStaffGradeId`,
dalStaffByProfessionalId: `${host}evaluation/tms/system/dalStaffByProfessionalId`,
staffTemplate: `${host}template/staff.xlsx`,
@ -263,21 +229,6 @@ export default {
queryPermissionArrById: `${host}evaluation/sys-permission/queryPermissionArrById`,
roleTree: `${host}evaluation/sys-permission/tree`,
// 成绩管理
getImitationAchievement: `${host}evaluation/Achievement/getImitationAchievement`,
getTeachAchievement: `${host}evaluation/Achievement/getTeachAchievement`,
addReport: `${host}evaluation/Achievement/addReport`,
deleteReport: `${host}evaluation/Achievement/deleteReport`,
deleteReportById: `${host}evaluation/Achievement/deleteReportById`,
exportAchievement: `${host}evaluation/Achievement/exportAchievement`,
// queryAchievement:`${host}evaluation/Achievement/queryAchievement`,
queryAchievement: `${host}evaluation/Achievement/list`,
queryAchievementNew: `${host}evaluation/Achievement/newList`,
queryEvaluationReport: `${host}evaluation/Achievement/queryEvaluationReport`,
queryReport: `${host}evaluation/Achievement/queryReport`,
queryArchievement: `${host}evaluation/tms/classTech/queryExperimentalReport`, //查看教学实验报告
queryVirtualReport: `${host}evaluation/tms/classTech/queryVirtualReport`, //查看虚仿实验报告
// 教师评语
addComment: `${host}evaluation/comment/addComment`,
queryComment: `${host}evaluation/comment/queryComment`,
@ -298,6 +249,6 @@ export default {
// 川大
firstLevel: `${host1}sichuan/point/firstLevel`,
secondaryLevel: `${host1}sichuan/point/secondaryLevel`,
thirdLevel: `${host1}sichuan/point/thirdLevel`,
thirdLevel: `${host1}sichuan/point/thirdLevel`
};

@ -32,50 +32,51 @@
</template>
<script>
import pdf from "vue-pdf";
export default {
props: ['visible','src'],
props: ["visible", "src"],
data() {
return {
pdfVisible: false,
pdfSrc: '',
pdfSrc: "",
currentPage: 0,
pageCount: 0,
fileType: 'pdf',
fileType: "pdf"
};
},
components: { pdf },
mounted() {
this.addEvent()
this.addEvent();
},
methods: {
closePdf() {
this.$emit('update:visible',false)
this.$emit('update:src','')
this.currentPage = 1
this.$emit("update:visible", false);
this.$emit("update:src", "");
this.currentPage = 1;
},
changePdfPage(val) {
if (val === 0 && this.currentPage > 1) {
this.currentPage--
this.currentPage--;
}
if (val === 1 && this.currentPage < this.pageCount) {
this.currentPage++
this.currentPage++;
}
},
loadPdfHandler(e) {
this.currentPage = 1
this.currentPage = 1;
},
addEvent() {
document.onkeydown = e => {
let key = window.event.keyCode
let key = window.event.keyCode;
if (key == 37) {
this.changePdfPage(0)
this.changePdfPage(0);
} else if (key == 39) {
this.changePdfPage(1)
}
this.changePdfPage(1);
}
this.$once('hook:beforeDestroy',() => {
document.onkeydown = null
})
};
this.$once("hook:beforeDestroy", () => {
document.onkeydown = null;
});
}
}
};
@ -83,14 +84,18 @@ export default {
<style lang="scss" scoped>
/deep/ .pdf-dia {
border-radius: 0 !important;
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding: 0;
}
.el-dialog__headerbtn {
top: 10px;
.el-dialog__close {
color: #fff;
font-size: 16px;
@ -107,12 +112,14 @@ export default {
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;

@ -15,20 +15,20 @@
</template>
<script>
import util from '@/libs/util'
import Setting from '@/setting'
import Quill from 'quill';
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css';
import toolbarOptions from './options'
import util from "@/libs/util";
import Setting from "@/setting";
import Quill from "quill";
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
import toolbarOptions from "./options";
export default {
name: 'quill',
name: "quill",
props: {
value: {
type: String,
default: ''
default: ""
},
readonly: {
type: Boolean,
@ -53,7 +53,7 @@ import Setting from '@/setting'
* 使用props传入elseRead = 'true'手动隐藏工具栏
*/
elseRead: {
type:String,default:'false'
type: String, default: "false"
}
},
data() {
@ -62,37 +62,37 @@ import Setting from '@/setting'
token: util.local.get(Setting.tokenKey)
},
Quill: null,
currentValue: '',
currentValue: "",
options: {
theme: 'snow',
theme: "snow",
bounds: document.body,
debug: 'warn',
debug: "warn",
modules: {
toolbar: {
container: toolbarOptions,
handlers: {
'image': function (value) {
"image": function(value) {
if (value) {
// iview
document.querySelector('.editorUpload').click()
document.querySelector(".editorUpload").click();
} else {
this.Quill.format('image', false);
this.Quill.format("image", false);
}
}
}
}
},
placeholder: '',
placeholder: "",
readOnly: this.readonly
},
loading: false
}
};
},
computed: {
classes() {
return [
{
'quill-no-border': !this.border
"quill-no-border": !this.border
}
];
},
@ -105,7 +105,7 @@ import Setting from '@/setting'
style.height = `${this.height}px`;
}
return style;
},
}
},
watch: {
@ -126,12 +126,12 @@ import Setting from '@/setting'
mounted() {
this.init();
//
if(this.elseRead==='true'){
let children = this.$refs.quill.children[0].style
children.padding = '0'
children.overflow = 'hidden'
children.height = '0'
children.borderTop = '0'
if (this.elseRead === "true") {
let children = this.$refs.quill.children[0].style;
children.padding = "0";
children.overflow = "hidden";
children.height = "0";
children.borderTop = "0";
}
},
beforeDestroy() {
@ -147,53 +147,53 @@ import Setting from '@/setting'
this.Quill.pasteHTML(this.currentValue);
if (this.toTop) {
this.$nextTick(() => {
window.scrollTo(0,0)
})
window.scrollTo(0, 0);
});
}
//
this.Quill.on('text-change', (delta, oldDelta, source) => {
this.Quill.on("text-change", (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML;
const text = this.Quill.getText();
const quill = this.Quill;
//
this.currentValue = html;
// v-model
this.$emit('input', html);
this.$emit("input", html);
//
this.$emit('on-change', { html, text, quill });
this.$emit("on-change", { html, text, quill });
});
// quill
this.Quill.on('text-change', (delta, oldDelta, source) => {
this.$emit('on-text-change', delta, oldDelta, source);
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("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);
this.Quill.on("editor-change", (eventName, ...args) => {
this.$emit("on-editor-change", eventName, ...args);
});
},
beforeUpload(file) {
this.loading = true
this.loading = true;
},
editorUploadSuccess(res) {
//
let quill = this.Quill
let quill = this.Quill;
//
if (res.filesResult.fileUrl) {
//
let length = quill.getSelection().index;
// res
quill.insertEmbed(length, 'image', res.filesResult.fileUrl)
quill.insertEmbed(length, "image", res.filesResult.fileUrl);
//
quill.setSelection(length + 1)
quill.setSelection(length + 1);
} else {
util.successMsg('图片插入失败')
util.successMsg("图片插入失败");
}
this.loading = false
},
this.loading = false;
}
}
};
</script>
<style lang="scss" scoped>
.quill-no-border {
@ -201,10 +201,12 @@ import Setting from '@/setting'
border: none;
border-bottom: 1px solid #e8eaec;
}
.ql-container.ql-snow {
border: none;
}
}
.else {
.ql-toolbar.ql-snow {
height: 0;

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

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

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

@ -13,34 +13,35 @@
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
import util from '@/libs/util'
import Setting from '@/setting'
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
data() {
return {
isHh: Setting.isHh,
isHh: Setting.isHh
};
},
computed: {
...mapState('user', [
'avatar','userName'
...mapState("user", [
"avatar", "userName"
]),
...mapState('auth', [
'routes'
...mapState("auth", [
"routes"
])
},
mounted() {
},
methods: {
...mapActions('user', [
'logout'
...mapActions("user", [
"logout"
]),
toPersonal() {
this.$router.push('/setting/person')
},
},
this.$router.push("/setting/person");
}
}
};
</script>
<style lang="scss" scoped>
@ -53,26 +54,32 @@ export default {
font-size: 16px;
color: #333;
background-color: #fff;
.logo {
height: 50px;
margin-left: 20px;
&.hh {
width: 220px;
}
}
.action {
display: flex;
padding-right: 50px;
align-items: center;
.user {
display: inline-flex;
align-items: center;
cursor: pointer;
}
.el-button--text {
margin-left: 20px;
color: #333;
}
.el-divider {
width: 2px;
height: 15px;

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

@ -29,99 +29,100 @@
</template>
<script>
import { mapState,mapActions } from 'vuex'
import Setting from '@/setting'
import util from '@/libs/util'
import { mapState, mapActions } from "vuex";
import Setting from "@/setting";
import util from "@/libs/util";
export default {
data() {
return {
active: this.$route.path,
defaultMenus: [
{
icon: 'el-icon-user',
index: '/student/list',
title: '学生管理'
icon: "el-icon-user",
index: "/student/list",
title: "学生管理"
},
{
icon: 'el-icon-receiving',
index: '/evaluation/list',
title: '测评管理'
icon: "el-icon-receiving",
index: "/evaluation/list",
title: "测评管理"
},
{
icon: 'el-icon-takeaway-box',
index: '/assessment/list',
title: '考核管理'
icon: "el-icon-takeaway-box",
index: "/assessment/list",
title: "考核管理"
},
{
icon: 'el-icon-collection',
index: '/achievement/list',
title: '成绩管理'
icon: "el-icon-collection",
index: "/achievement/list",
title: "成绩管理"
},
{
icon: 'el-icon-news',
index: '/course/list',
title: '理论课程管理'
icon: "el-icon-news",
index: "/course/list",
title: "理论课程管理"
},
{
icon: 'el-icon-document',
index: '/information/list',
title: '资讯管理'
icon: "el-icon-document",
index: "/information/list",
title: "资讯管理"
},
{
icon: 'el-icon-school',
index: '/match/list',
title: '赛事管理'
icon: "el-icon-school",
index: "/match/list",
title: "赛事管理"
},
{
icon: 'el-icon-postcard',
index: '/project/list',
title: '实验项目管理'
icon: "el-icon-postcard",
index: "/project/list",
title: "实验项目管理"
},
{
icon: 'el-icon-setting',
index: '/system/list',
title: '系统设置'
icon: "el-icon-setting",
index: "/system/list",
title: "系统设置"
}
],
menus: [],
actives: {
dashboard: ['add'],
achievement: ['experiment','experimentVir','experimentTeach','addexperiment','addexperimentoptions','showExperiment','showExperimentoption','showExperimentoptions'],
project: ['addproject','program','programOption','programOptions'],
backstage: ['report']
dashboard: ["add"],
achievement: ["experiment", "experimentVir", "experimentTeach", "addexperiment", "addexperimentoptions", "showExperiment", "showExperimentoption", "showExperimentoptions"],
project: ["addproject", "program", "programOption", "programOptions"],
backstage: ["report"]
}
};
},
computed: {
...mapState('auth', [
'routes'
...mapState("auth", [
"routes"
])
},
watch: {
'$route'(to,from) {
let actives = this.actives
"$route"(to, from) {
let actives = this.actives;
for (let i in this.actives) {
if(actives[i].includes(this.$route.name)) this.active = `/${i}/list`
if (actives[i].includes(this.$route.name)) this.active = `/${i}/list`;
}
this.active = this.$route.path
this.active = this.$route.path;
}
},
created() {
this.initMenu()
this.initMenu();
},
methods: {
initMenu() {
if (Setting.dynamicRoute) {
let routes = this.routes
let menus = []
let routes = this.routes;
let menus = [];
this.defaultMenus.map(e => {
routes.find(n => n.path == e.index) && menus.push(e)
})
this.menus = menus
routes.find(n => n.path == e.index) && menus.push(e);
});
this.menus = menus;
} else {
this.menus = this.defaultMenus
this.menus = this.defaultMenus;
}
}
},
}
};
</script>
@ -130,12 +131,15 @@ export default {
.sidebar::-webkit-scrollbar {
width: 0;
}
.sidebar-el-menu:not(.el-menu--collapse) {
width: 100%;
}
.el-menu.el-menu--horizontal {
border-bottom: none;
}
.sidebar > ul {
height: 100%;
}

@ -2,20 +2,21 @@
* @description 生成按钮级别权限组
* */
import store from '@/store';
import store from "@/store";
export default function(data) {
let result = []
let result = [];
data.map(e => {
e.children.map(n => {
if (n.children.length) {
result.push(`${e.name}:${n.name}`)
result.push(`${e.name}:${n.name}`);
n.children.map(j => {
e.menuUrl ? result.push(`${e.menuUrl}:${n.name}:${j.name}`) : result.push(`${n.menuUrl}:${j.name}`)
})
e.menuUrl ? result.push(`${e.menuUrl}:${n.name}:${j.name}`) : result.push(`${n.menuUrl}:${j.name}`);
});
} else {
result.push(`${e.menuUrl}:${n.name}`)
result.push(`${e.menuUrl}:${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
const bus = new Vue();

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

@ -1,16 +1,18 @@
// rem等比适配配置文件
// 基准大小
const baseSize = 16
const baseSize = 16;
// 设置 rem 函数
function setRem() {
// 当前页面宽度相对于 1920宽的缩放比例,可根据自己需要修改。
const scale = document.documentElement.clientWidth / 1920
const scale = document.documentElement.clientWidth / 1920;
// 设置页面根节点字体大小(“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
window.onresize = function() {
setRem()
}
setRem();
};

@ -1,31 +1,31 @@
import store from '@/store';
import router from '@/router';
import generateBtnPermission from '../auth/generateBtnPermission';
import store from "@/store";
import router from "@/router";
import generateBtnPermission from "../auth/generateBtnPermission";
const newRoutes = []
const newRoutes = [];
function createMeta(item) {
let meta = { title: item.name }
return meta
let meta = { title: item.name };
return meta;
}
function createRoute(data) {
data.map(e => {
if (e.menuUrl) {
let meta = createMeta(e)
let meta = createMeta(e);
newRoutes.push({
name: e.menuUrl,
path: e.menuUrl,
meta
})
});
}
// 递归生成路由集合
e.children && e.children.length && createRoute(e.children)
})
e.children && e.children.length && createRoute(e.children);
});
}
export default function(data, path) {
generateBtnPermission(data)
createRoute(data)
store.dispatch('auth/addRoutes',newRoutes)
generateBtnPermission(data);
createRoute(data);
store.dispatch("auth/addRoutes", newRoutes);
}

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

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

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

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

@ -1,18 +1,18 @@
import cookies from './util.cookies'
import {_local,_session} from './util.db'
import { Message } from 'element-ui'
import store from '@/store'
import axios from 'axios'
import api from '@/api'
import Setting from '@/setting'
import cookies from "./util.cookies";
import { _local, _session } from "./util.db";
import { Message } from "element-ui";
import store from "@/store";
import axios from "axios";
import api from "@/api";
import Setting from "@/setting";
let logout = false
let logout = false;
const roleList = {
'1': '超级管理员',
'13': '管理员',
'14': '老师',
'4': '学生'
}
"1": "超级管理员",
"13": "管理员",
"14": "老师",
"4": "学生"
};
const util = {
cookies,
local: _local,
@ -33,15 +33,15 @@ const util = {
},
// new Date('2020-11-12 00:00:00') 在IE下失效,因此把-替换成/
dateCompatible(date) {
return date.replace(/\-/g, '/')
return date.replace(/\-/g, "/");
},
// 日期时间前面补零
formateTime(num) {
return num < 10 ? `0${num}` : num
return num < 10 ? `0${num}` : num;
},
//返回格式化时间,传参例如:"yyyy-MM-dd hh:mm:ss"
formatDate(fmt, date) {
var date = date ? date : new Date()
var date = date ? date : new Date();
var o = {
"M+": date.getMonth() + 1, //月份
"d+": date.getDate(), //日
@ -72,116 +72,154 @@ const util = {
},
// 传入文件后缀判断是否是视频
isVideo(ext) {
if('mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv'.includes(ext)) return true
return false
if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return true;
return false;
},
// 传入文件后缀判断是否是音频
isAudio(ext) {
if('mp3,aac,ape,flac,wav,wma,amr,mid'.includes(ext)) return true
return false
if ("mp3,aac,ape,flac,wav,wma,amr,mid".includes(ext)) return true;
return false;
},
// 传入文件后缀判断是否是图片
isImg(ext) {
if('jpg,jpeg,png,gif,svg,psd'.includes(ext)) return true
return false
if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return true;
return false;
},
// 传入文件后缀判断是否是pdf以外的文档
isDoc(ext) {
if(!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && ext != 'pdf') return true
return false
if (!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && ext != "pdf") return true;
return false;
},
// 循环去除html标签
removeHtmlTag(list, attr) {
list.map(n => {
n[attr] = n[attr].replace(/<\/?.+?>/gi,'')
})
return list
n[attr] = n[attr].replace(/<\/?.+?>/gi, "");
});
return list;
},
// 传入文件名获取文件后缀
getFileExt(fileName) {
return fileName.substring(fileName.lastIndexOf('.') + 1)
return fileName.substring(fileName.lastIndexOf(".") + 1);
},
// 传入文件名和路径,下载图片视频,支持跨域,a标签加download不支持跨域
downloadFile(fileName, url) {
var x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = 'blob'
var x = new XMLHttpRequest();
x.open("GET", url, true);
x.responseType = "blob";
x.onload = function(e) {
var url = window.URL.createObjectURL(x.response)
var a = document.createElement('a')
a.href = url
a.download = fileName
a.click()
}
x.send()
var url = window.URL.createObjectURL(x.response);
var a = document.createElement("a");
a.href = url;
a.download = fileName;
a.click();
};
x.send();
},
// 传入文件名和数据,下载文件
downloadFileDirect(fileName, data) {
if ('download' in document.createElement('a')) { // 非IE下载
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(data)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink)
if ("download" in document.createElement("a")) { // 非IE下载
const elink = document.createElement("a");
elink.download = fileName;
elink.style.display = "none";
elink.href = URL.createObjectURL(data);
document.body.appendChild(elink);
elink.click();
URL.revokeObjectURL(elink.href); // 释放URL 对象
document.body.removeChild(elink);
} else { // IE10+下载
navigator.msSaveBlob(data, fileName)
navigator.msSaveBlob(data, fileName);
}
},
// 传入字符串,返回去除[]后的字符串,因为通过get请求带入方括号的话会有问题
encodeStr(str) {
if(str.includes('[') || str.includes(']')){
let newStr = ''
if (str.includes("[") || str.includes("]")) {
let newStr = "";
for (let i of str) {
if(i == '[' || i == ']'){
newStr += encodeURI(i)
if (i == "[" || i == "]") {
newStr += encodeURI(i);
} else {
newStr += i
newStr += i;
}
}
return newStr
return newStr;
}
return str
return str;
},
// 成功提示
successMsg(message, duration = 3000) {
Message.closeAll();
return Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration})
return Message.success({ message, showClose: true, offset: (document.documentElement.clientHeight - 40) / 2, duration });
},
// 警告提示
warningMsg(message, duration = 3000) {
Message.closeAll();
return Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration})
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})
return Message.error({ message, showClose: true, offset: (document.documentElement.clientHeight - 40) / 2, duration });
},
// 传入roleId,返回角色名称
getRoleName(roleId) {
return roleList[roleId] || '未知状态'
return roleList[roleId] || "未知状态";
},
// 登录互踢
getToken() {
if(process.env.NODE_ENV != 'production'){
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
logout || Message.error("您已在另一台设备登录,本次登录已下线!");
logout = true;
setTimeout(() => {
_local.remove(Setting.storeKey)
_local.remove(Setting.tokenKey)
location.reload()
},1500)
_local.remove(Setting.storeKey);
_local.remove(Setting.tokenKey);
location.reload();
}, 1500);
}
}).catch(err => {})
}).catch(err => {
});
}
}
},
debounce(fn, delay) { // 防抖
let timeout = null;
return function() {
const context = this;
const args = arguments;
clearTimeout(timeout);
timeout = setTimeout(() => {
fn.apply(context, args);
}, delay);
};
},
deepCopy(obj) { // 深拷贝
if (obj == null) {
return null;
}
if (typeof obj !== "object") return obj;
let result;
if (Array.isArray(obj)) {
result = [];
obj.forEach(item => {
result.push(
typeof item === "object" && !(item instanceof Date)
? util.deepCopy(item)
: item
);
});
} else {
result = {};
Object.keys(obj).forEach(key => {
result[key] =
typeof obj[key] === "object" && !(obj[key] instanceof Date)
? util.deepCopy(obj[key])
: obj[key];
});
}
return result;
}
};
export default util
export default util;

@ -1,26 +1,26 @@
import Vue from 'vue';
import App from '@/App.vue';
import router from '@/router';
import ElementUI from 'element-ui';
import '@/styles/index.scss'
import VueI18n from 'vue-i18n';
import mixinApp from '@/mixins/app';
import { messages } from '@/i18n';
import 'babel-polyfill';
import '@/libs/resize';
import { post, get, del, put } from '@/plugins/requests/index.js';
import api from '@/api';
import store from '@/store'
import Setting from '@/setting';
import permission from '@/router/permission';
import Vue from "vue";
import App from "@/App.vue";
import router from "@/router";
import ElementUI from "element-ui";
import "@/styles/index.scss";
import VueI18n from "vue-i18n";
import mixinApp from "@/mixins/app";
import { messages } from "@/i18n";
import "babel-polyfill";
import "@/libs/resize";
import { post, get, del, put } from "@/plugins/requests/index.js";
import api from "@/api";
import store from "@/store";
import Setting from "@/setting";
import permission from "@/router/permission";
// 插件
import plugins from '@/plugins';
import filters from '@/plugins/filters'
import plugins from "@/plugins";
import filters from "@/plugins/filters";
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.$get = get;
@ -30,7 +30,7 @@ Vue.prototype.$put = put;
Vue.config.productionTip = false;
Vue.use(VueI18n);
Vue.use(ElementUI, { size: 'small' });
Vue.use(ElementUI, { size: "small" });
const i18n = new VueI18n({
locale: Setting.i18n.default,
messages
@ -42,4 +42,4 @@ new Vue({
i18n,
store,
render: h => h(App)
}).$mount('#app');
}).$mount("#app");

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

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

@ -28,7 +28,7 @@
@keyup.enter.native="submitForm('param')"
>
</el-input>
<img style="cursor: pointer;" @click="blur" :src="verificationIMG" class="verification" alt="">
<img @click="blur" :src="verificationIMG" class="verification" alt="">
</el-form-item>
<el-button class="btn" type="primary" @click="submitForm('param')">马上登录</el-button>
</el-form>
@ -54,7 +54,7 @@
@keyup.enter.native="submitForm('param')"
>
</el-input>
<img style="cursor: pointer;" @click="blur" :src="verificationIMG" class="verification" alt="">
<img @click="blur" :src="verificationIMG" class="verification" alt="">
</el-form-item>
<el-button class="btn" type="primary" @click="submitForm('param')">马上登录</el-button>
</el-form>
@ -68,54 +68,56 @@
</template>
<script>
import { mapActions } from 'vuex'
import vFooter from '@/layouts/footer'
import util from '@/libs/util'
import Setting from '@/setting'
import { mapActions } from "vuex";
import vFooter from "@/layouts/footer";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
data: function() {
return {
isHh: Setting.isHh,
tabName: "1",
param: {
account: 'admin',
password: '111aaa',
code: '', //
random: '', //
account: "admin",
password: "111aaa",
code: "", //
random: "", //
distinguish: null, // ,1,2
platform: 3, // 123
platform: 3 // 123
},
rules: {
account: [{ required: true, message: '请输入账号', trigger: 'blur' }],
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
code: [{ required: true, message: '请输入验证码', trigger: 'blur' }],
account: [{ required: true, message: "请输入账号", trigger: "blur" }],
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
code: [{ required: true, message: "请输入验证码", trigger: "blur" }]
},
verificationIMG: ""
};
},
components: {
vFooter,
vFooter
},
methods: {
...mapActions('user', [
'login'
...mapActions("user", [
"login"
]),
submitForm(form) {
this.$refs[form].validate(valid => {
if (valid) {
this.param.distinguish = this.tabName === '1' ? 1 : 2;
this.param.distinguish = this.tabName === "1" ? 1 : 2;
this.login(this.param).then(() => {
let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : '/index'
this.$router.replace(redirect)
}).catch(res => {})
let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : "/index";
this.$router.replace(redirect);
}).catch(res => {
});
} else {
return util.errorMsg('请检查表单数据')
return util.errorMsg("请检查表单数据");
}
});
},
blur() {
this.param.random = Math.floor(Math.random() * 999999999);
this.verificationIMG = this.api.verification+'?random='+`${this.param.random}`;
this.verificationIMG = this.api.verification + "?random=" + `${this.param.random}`;
}
},
created() {
@ -131,6 +133,7 @@ export default {
height: 100%;
background-image: url(../../../assets/img/login-bg.png);
background-size: 100%;
.header {
width: 100%;
height: 60px;
@ -142,14 +145,17 @@ export default {
justify-content: space-between;
align-items: center;
font-size: 18px;
.logo {
width: 150px;
margin-left: 20px;
&.hh {
width: 220px;
}
}
}
/deep/ .main {
position: absolute;
left: 50%;
@ -161,29 +167,36 @@ export default {
background-image: url(../../../assets/img/login-input.png);
box-shadow: 0px 0px 79px 0px rgba(11, 15, 65, 0.36);
overflow: hidden;
.box {
width: 548px;
position: absolute;
left: 50%;
top: 50px;
transform: translate(-50%, 0);
.el-tabs__nav-scroll {
display: flex;
justify-content: center;
}
.el-tabs__nav-wrap::after {
background-color: #fff;
opacity: 0;
.el-tabs__active-bar {
background-color: #000;
border-radius: 2px;
}
.el-tabs__item {
padding: 0 90px;
color: #999;
&:hover {
color: #000;
}
&.is-active {
color: #333;
font-weight: bold;
@ -204,6 +217,7 @@ export default {
right: 1px;
width: 160px;
height: 78px;
cursor: pointer;
}
.btn {
@ -217,6 +231,7 @@ export default {
}
}
}
.footer {
position: absolute;
bottom: 0;

@ -76,9 +76,10 @@
</template>
<script>
import Setting from '@/setting'
import util from '@/libs/util'
import echarts from 'echarts'
import Setting from "@/setting";
import util from "@/libs/util";
import echarts from "echarts";
export default {
data() {
return {
@ -88,17 +89,17 @@ export default {
projectName: this.$route.query.name,
experimentalName: this.$route.query.experimentalName,
className: this.$route.query.class,
keyword: '',
keyword: "",
listData: [],
multipleSelection: [],
page: 1,
pageSize: 10,
total: 0,
avg: 0,
avg: 0
};
},
mounted() {
this.getData()
this.getData();
},
methods: {
getData() {
@ -108,88 +109,93 @@ export default {
size: this.pageSize,
searchContant: this.keyword,
projectId: this.id
}
};
this.$get(this.api.queryEvaluationReport, data).then(res => {
let list = res.data.list
let score = 0
let list = res.data.list;
let score = 0;
list.map(n => {
n.class = this.className
score += n.score
})
this.listData = list
this.total = res.data.totalCount
this.avg = score ? (score / res.data.totalCount).toFixed(2) : 0
this.getChart()
}).catch(res => {});
n.class = this.className;
score += n.score;
});
this.listData = list;
this.total = res.data.totalCount;
this.avg = score ? (score / res.data.totalCount).toFixed(2) : 0;
this.getChart();
}).catch(res => {
});
},
edit(row) {
if (this.systemId == 2 || this.systemId == 3) {
this.$router.push(`addexperiment?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`)
this.$router.push(`addexperiment?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else {
this.$router.push(`addexperiment?id=${row.reportId}`)
this.$router.push(`addexperiment?id=${row.reportId}`);
}
},
show(row) {
if (this.systemId == 2) {
this.$router.push(`showexperimentOption?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`)
this.$router.push(`showexperimentOption?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else if (this.systemId == 3) {
this.$router.push(`showexperimentOptions?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`)
this.$router.push(`showexperimentOptions?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else {
if (this.className) {
this.$router.push(`show?id=${row.recordId}&projectId=${this.id}&reportId=${row.reportId}&studentId=${row.studentId}`)
this.$router.push(`show?id=${row.recordId}&projectId=${this.id}&reportId=${row.reportId}&studentId=${row.studentId}`);
} else {
this.$router.push(`show?id=${row.recordId}&type=1`)
this.$router.push(`show?id=${row.recordId}&type=1`);
}
}
},
exportData() {
if(!this.listData.length) return false
let selected = this.multipleSelection
let exportList = []
if (!this.listData.length) return false;
let selected = this.multipleSelection;
let exportList = [];
if (selected.length) {
exportList = selected.map(item => {
return item.recordId
})
return item.recordId;
});
} else {
exportList = this.listData.map(item => {
return item.recordId
})
return item.recordId;
});
}
window.open(`${this.api.exportAchievement}?ids=${exportList.join(',')}&projectId=${this.projectId}&source=2`)
window.open(`${this.api.exportAchievement}?ids=${exportList.join(",")}&projectId=${this.projectId}&source=2`);
},
handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
this.$post(`${this.api.deleteReport}?reportId=${row.reportId}&recordId=${row.recordId}`).then(res => {
util.successMsg('删除成功');
this.getData()
}).catch(res => {});
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
},
delAllData() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection;
let delList = newArr.map(item => {
return `reportId=${item.reportId}`
})
return `reportId=${item.reportId}`;
});
let delList1 = newArr.map(item => {
return `recordId=${item.recordId}`
})
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
return `recordId=${item.recordId}`;
});
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
this.$post(`${this.api.deleteReport}?${delList.join('&')}&${delList1.join('&')}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
this.$post(`${this.api.deleteReport}?${delList.join("&")}&${delList1.join("&")}`).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
} else {
util.errorMsg('请先选择数据 !')
util.errorMsg("请先选择数据 !");
}
},
handleSelectionChange(val) {
@ -200,57 +206,57 @@ export default {
this.getData();
},
getChart() {
let data = [0,0,0,0,0,0,0,0,0,0]
let list = this.listData
let data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
let list = this.listData;
list.map(n => {
n.score
n.score;
if (n.score >= 0 && n.score <= 10) {
data[0]++
data[0]++;
} else if (n.score > 10 && n.score <= 20) {
data[1]++
data[1]++;
} else if (n.score > 20 && n.score <= 30) {
data[2]++
data[2]++;
} else if (n.score > 30 && n.score <= 40) {
data[3]++
data[3]++;
} else if (n.score > 40 && n.score <= 50) {
data[4]++
data[4]++;
} else if (n.score > 50 && n.score <= 60) {
data[5]++
data[5]++;
} else if (n.score > 60 && n.score <= 70) {
data[6]++
data[6]++;
} else if (n.score > 70 && n.score <= 80) {
data[7]++
data[7]++;
} else if (n.score > 80 && n.score <= 90) {
data[8]++
data[8]++;
} else if (n.score > 90 && n.score <= 100) {
data[9]++
data[9]++;
}
})
let myChart = echarts.init(document.getElementById('chart'))
});
let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({
title: { text: '实验分数分布图' },
title: { text: "实验分数分布图" },
tooltip: {},
xAxis: {
name: '分数',
type: 'category',
name: "分数",
type: "category",
boundaryGap: false,
data: ['0-10', '11-20', '21-30', '31-40', '41-50', '51-60', '61-70', '71-80','81-90','91-100']
data: ["0-10", "11-20", "21-30", "31-40", "41-50", "51-60", "61-70", "71-80", "81-90", "91-100"]
},
yAxis: {
name: '人数',
type: 'value'
name: "人数",
type: "value"
},
series: [{
data,
type: 'line',
type: "line",
areaStyle: {},
color: ['#8191fd']
color: ["#8191fd"]
}]
})
});
},
goBack() {
this.$router.back()
},
this.$router.back();
}
}
};
</script>
@ -259,15 +265,19 @@ export default {
/deep/ .el-tabs__nav-wrap::after {
display: none;
}
.stat {
display: flex;
.nums {
display: flex;
align-items: center;
margin-right: 20px;
.item:nth-child(1) {
background-image: url('../../../assets/img/total.png');
}
.item:nth-child(2) {
background-image: url('../../../assets/img/avg.png');
}
@ -280,10 +290,12 @@ export default {
border-radius: 8px;
background-size: 100% 100%;
background-repeat: no-repeat;
p {
font-size: 18px;
color: #ffffff;
}
.val {
margin-top: 10px;
color: #ffffff;
@ -291,6 +303,7 @@ export default {
}
}
}
.chart {
flex: 1;
height: 300px;

@ -121,7 +121,8 @@
<div class="flex-between" style="margin-top: 10px">
<span>教师评分</span>
<div>
<el-input style="display: inline-block;width: auto;" placeholder="请输入"></el-input> (10)
<el-input style="display: inline-block;width: auto;" placeholder="请输入"></el-input>
(10)
</div>
</div>
</el-card>
@ -135,7 +136,8 @@
<div class="flex-between" style="margin-top: 10px">
<span>教师评分</span>
<div>
<el-input style="display: inline-block;width: auto;" placeholder="请输入"></el-input> (10)
<el-input style="display: inline-block;width: auto;" placeholder="请输入"></el-input>
(10)
</div>
</div>
</el-card>
@ -199,41 +201,41 @@
id: this.$route.query.id,
infoData: [],
accountData: [],
analysisContent: '',
showData: '1',
autograph: '1',
analysisContent: "",
showData: "1",
autograph: "1",
form: {
projectName: '',
period: '',
userName: '',
content: '',
conclusion: '',
score: '',
projectName: "",
period: "",
userName: "",
content: "",
conclusion: "",
score: ""
},
pages: 1,
ipVisible: false,
configId: this.$store.state.configId,
keyword: '',
fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}],
keyword: "",
fileList: [{ name: "food.jpeg", url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100" }],
isEdit: false,
signList: [],
signId: ''
}
signId: ""
};
},
mounted() {
this.getData()
this.getSgin()
this.getData();
this.getSgin();
},
methods: {
getData() {
let data = {
// reportId: this.id
reportId: 97
}
};
this.$get(this.api.queryReport, data).then(res => {
this.form = res.data.report
this.form.score = res.data.record.score
let form = this.form
this.form = res.data.report;
this.form.score = res.data.record.score;
let form = this.form;
this.infoData.push({
projectName: form.projectName,
period: form.period,
@ -242,16 +244,18 @@
conclusion: form.conclusion,
score: form.score,
analysis: form.analysis
})
}).catch(res => {});
});
}).catch(res => {
});
},
getSgin() {
let data = {
userId: this.userId
}
};
this.$get(this.api.querySignature, data).then(res => {
this.signList = res.data
}).catch(res => {});
this.signList = res.data;
}).catch(res => {
});
},
handleRemove(file, fileList) {
console.log(file, fileList);
@ -261,20 +265,20 @@
systemId: this.configId,
systemName: this.form.systemName,
systemType: this.form.systemType,
systemAttribution: this.form.systemAttribution,
}
systemAttribution: this.form.systemAttribution
};
if (this.configId) {
this.$post(this.api.updateServiceConfig, data).then((res) => {
util.successMsg('编辑成功');
this.$router.back()
util.successMsg("编辑成功");
this.$router.back();
}).catch((res) => {
})
});
} else {
this.$post(this.api.updateServiceConfig, data).then((res) => {
util.successMsg('添加成功');
this.$router.back()
util.successMsg("添加成功");
this.$router.back();
}).catch((res) => {
})
});
}
},
SpanMethod({ row, column, rowIndex, columnIndex }) {
@ -290,7 +294,7 @@
}
},
editMsg() {
this.isEdit = true
this.isEdit = true;
},
handleExceed(files, fileList) {
util.warningMsg(
@ -299,23 +303,24 @@
},
uploadSuccess(res, file) {
if (res.status == 200) {
util.successMsg('上传成功')
this.getSgin()
util.successMsg("上传成功");
this.getSgin();
} else {
$message.error(res.errmessage)
$message.error(res.errmessage);
}
},
goback() {
this.$confirm('确定返回?未更新的信息将不会保存。', '提示', {
type: 'warning'
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", {
type: "warning"
})
.then(() => {
this.$router.back()
this.$router.back();
})
.catch(() => {});
}
.catch(() => {
});
}
}
};
</script>
<style lang="scss" scoped>
@ -323,44 +328,54 @@
margin-bottom: 10px;
font-size: 20px;
}
.step-title {
margin-bottom: 10px;
font-size: 16px;
color: #9278ff;
}
.border_lf {
border-left: 1px dashed #eee;
padding: 0 60px;
}
.border_lf label {
width: 120px;
}
.pad_none {
padding: 0 0 0 60px;
}
.edit-msg {
font-size: 16px;
cursor: pointer;
}
.sign-select {
/deep/ .el-input {
width: 150px;
margin-bottom: 10px;
}
}
.meta-title-wrap {
display: flex;
justify-content: space-between;
}
.meta-title {
margin-bottom: 10px;
font-size: 14px;
}
.step-title {
margin-bottom: 10px;
font-size: 16px;
color: #9278ff;
}
.bd-title {
padding-top: 20px;
border-top: 1px dashed #ccc;

@ -16,6 +16,21 @@
<el-radio v-for="(item,index) in projectType" :key="index" :label="item.id" border>{{ item.name }}</el-radio>
</el-radio-group>
</li>
<li v-show="projectPermissions === 1">
<label>班级</label>
<el-select size="small" v-model="classId" placeholder="请选择" @change="initData">
<el-option
v-for="item in classList"
:key="item.id"
:label="item.className"
:value="item.id"
></el-option>
</el-select>
</li>
</ul>
</div>
<div class="tool mul">
<ul class="filter">
<li>
<label>系统</label>
<el-select size="small" v-model="systemId" placeholder="请选择" @change="initData">
@ -28,9 +43,10 @@
</el-select>
</li>
<li>
<el-input size="small" placeholder="请输入实验项目名称/班级名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<el-input size="small" placeholder="请输入实验项目名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</li>
</ul>
<div>
<el-button type="primary" size="small" @click="delAllData">批量删除</el-button>
</div>
@ -44,23 +60,23 @@
</template>
</el-table-column>
<template v-if="projectPermissions == 1">
<el-table-column prop="experimentalClassName" label="班级" align="center"></el-table-column>
<el-table-column prop="className" label="班级" align="center"></el-table-column>
<el-table-column prop="experimentalName" label="实验名称" align="center"></el-table-column>
</template>
<el-table-column prop="projectName" label="项目名称" align="center">
</el-table-column>
<el-table-column prop="projectPermissions" label="分类" align="center">
<template slot-scope="scope">
{{scope.row.projectPermissions == 2 ? '竞赛' : projectType.find(n => n.id === scope.row.projectPermissions).name}}
{{ scope.row.permissions == 2 ? "竞赛" : projectType.find(n => n.id === scope.row.permissions).name }}
</template>
</el-table-column>
<el-table-column prop="number" label="成绩报告数量" align="center"></el-table-column>
<el-table-column prop="creationTime" label="创建时间" align="center">
<el-table-column prop="experimentalNumber" label="成绩报告数量" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center">
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="entry(scope.row)" v-auth>成绩管理</el-button>
<el-button type="text" @click="handleDelete(scope.row)" :disabled="!scope.row.isdel">删除</el-button>
<el-button type="text" @click="handleDelete(scope.row)" :disabled="!scope.row.isDel">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -71,201 +87,204 @@
</template>
<script>
import { mapState, mapActions } from 'vuex'
import { Loading } from 'element-ui'
import util from '@/libs/util'
import Setting from '@/setting'
import { mapState, mapActions } from "vuex";
import { Loading } from "element-ui";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
name: 'achievement',
name: "achievement",
data() {
return {
systemId: '',
classId: "",
classList: [],
systemId: "",
systemList: Setting.systemList,
projectPermissions: this.$route.query.per ? Number(this.$route.query.per) : 0,
keyword: '',
startingtime: '',
endTime: '',
month: '',
keyword: "",
searchTimer: null,
startingtime: "",
endTime: "",
month: "",
listData: [],
multipleSelection: [],
dateList: [
{
id: '',
name: '不限'
id: "",
name: "不限"
},
{
id: 1,
name: '近一个月'
name: "近一个月"
},
{
id: 6,
name: '近六个月'
name: "近六个月"
}
],
projectType: [
{
id: 0,
name: '练习'
name: "练习"
},
{
id: 1,
name: '考核'
name: "考核"
}
],
date: '',
date: "",
page: 1,
pageSize: 10,
total: 0,
loadIns: null,
listDataAll: []
};
},
computed: {
...mapState('user', [
'userId'
]),
...mapState('project', [
'lastSystemId'
]),
...mapState("project", [
"lastSystemId"
])
},
watch: {
month: function(val) {
if (val) {
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))]
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))];
} else {
this.date = []
this.date = [];
}
},
date: function(val) {
if (val) {
this.startingtime = val[0]
this.endTime = val[1]
this.startingtime = val[0];
this.endTime = val[1];
} else {
this.startingtime = ''
this.endTime = ''
this.startingtime = "";
this.endTime = "";
}
this.initData()
this.initData();
},
keyword: function(val) {
clearTimeout(this.searchTimer)
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData()
},500)
this.initData();
}, 500);
}
},
mounted() {
// systemIdsystemIdsystemId
this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId
this.getData()
this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId;
this.getData();
this.getClassData();
},
methods: {
...mapActions('project', [
'setSystemId'
...mapActions("project", [
"setSystemId"
]),
getClassData() { //
this.$post(this.api.myClass).then(res => {
this.classList = res.list;
}).catch(res => { });
},
getData() {
this.loadIns = Loading.service({
background: 'rgba(255,255,255,.6)'
})
background: "rgba(255,255,255,.6)"
});
let data = {
searchContant: util.encodeStr(this.keyword),
classId: this.classId,
permissions: this.projectPermissions,
systemId: this.systemId,
keyWord: this.keyword,
startTime: this.startingtime,
endTime: this.endTime,
month: this.month,
page: this.page,
size: this.pageSize,
userId: this.userId
}
let url = this.api.queryAchievement
if(this.projectPermissions){
data.systemId = this.systemId
url = this.api.queryAchievementNew
}else{
data.systemId = this.systemId
data.projectPermissions = this.projectPermissions
}
this.$get(url,data).then(res => {
this.listData = res.data.list
this.total = res.data.total
pageNum: this.page,
pageSize: this.pageSize
};
this.$post(this.api.getAchievementInfo, data).then(res => {
this.listData = res.page.records;
this.total = res.page.total;
this.$nextTick(() => {
this.loadIns.close()
})
this.loadIns.close();
});
}).catch(res => {
this.loadIns.close()
})
},
handlePage(){
let list = this.listDataAll
let result = []
list.map(n => {
if(!n.projectHiddenEntity) result.push(n)
})
this.listData = result.slice((this.page - 1) * this.pageSize,this.page * this.pageSize)
this.total = result.length
this.loadIns.close();
});
},
initData() {
this.$refs.table.clearSelection()
this.page = 1
this.getData()
this.$refs.table.clearSelection();
this.page = 1;
this.getData();
},
disabledSelection(row,index){
if(row.isdel == 0) return false
return true
disabledSelection(row, index) { //
if (row.isDel === 0) return false;
return true;
},
entry(row){
this.setSystemId(this.systemId)
if(this.projectPermissions){
this.$router.push(`teach?id=${row.id}&name=${row.experimentalName}&class=${row.experimentalClassName}&projectId=${row.projectId}&systemId=${this.systemId}`)
entry(row) { //
this.setSystemId(this.systemId);
if (this.projectPermissions === 1) {
let list = row.classList.map(i => {
return {id: i.id.toString(), name: i.className}
})
this.$router.push(`teach?assessmentId=${row.assessmentId}&projectName=${row.projectName}&permissions=${row.permissions}&systemId=${this.systemId}&classList=${JSON.stringify(list)}`);
} else {
this.$router.push(`vir?id=${row.projectId}&name=${row.projectName}&class=${row.experimentalClassName}&systemId=${this.systemId}`)
this.$router.push(`vir?projectId=${row.projectId}&projectName=${row.projectName}&permissions=${row.permissions}&systemId=${this.systemId}`);
}
},
handleDelete(row) {
this.$confirm('该项目下的所有成绩报告将会删除,是否继续?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(`${this.api.deleteReportById}?projectIds=${row.projectId}&projectPermissions=${row.projectPermissions}&ids=${row.id ? row.id : ''}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
})
.catch(() => {})
handleDelete(row) { //
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {
type: "warning"
}).then(() => {
let url = "";
if (this.projectPermissions === 0) {
url = `${this.api.deleteExperimentalReport}?projectIds=${row.projectId}&projectPermissions=${this.projectPermissions}`
} else {
url = `${this.api.deleteExperimentalReport}?ids=${row.assessmentId}&projectIds=${row.projectId}&projectPermissions=${this.projectPermissions}`
}
this.$post(url).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => {
});
},
delAllData() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
let delList = newArr.map(item => {
return `projectIds=${item.projectId}`
})
let delList1 = newArr[0].id ? newArr.map(item => {
return `ids=${item.id}`
}) : []
this.$confirm('该项目下的所有成绩报告将会删除,是否继续?', '提示', {
type: 'warning'
})
.then(() => {
let data = `${delList.join('&')}&projectPermissions=${this.projectPermissions}&${delList1.length ? delList1.join('&') : ''}`
this.$post(`${this.api.deleteReportById}?${data}`).then(res => {
delAllData() { //
if (this.multipleSelection.length) {
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {
type: "warning"
}).then(() => {
let url = "";
let ids = [];
let projectIds = this.multipleSelection.map(item => {
return item.projectId;
});
if (this.projectPermissions === 0) {
url = `${this.api.deleteExperimentalReport}?projectIds=${projectIds.toString()}&projectPermissions=${this.projectPermissions}`
} else {
ids = this.multipleSelection.map(item => {
return item.assessmentId;
});
url = `${this.api.deleteExperimentalReport}?ids=${ids.toString()}&projectIds=${projectIds.toString()}&projectPermissions=${this.projectPermissions}`
}
this.$post(url).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection()
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
})
.catch(() => {})
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => {});
}).catch(() => {});
} else {
util.errorMsg('请先选择数据 !')
util.errorMsg("请先选择数据 !");
}
},
handleSelectionChange(val) {
this.multipleSelection = val
},
handleCurrentChange(val) {
this.page = val
this.getData()
handleSelectionChange(val) { //
this.multipleSelection = val;
},
handleCurrentChange(val) { //
this.page = val;
this.getData();
}
}
};
</script>

@ -89,34 +89,35 @@
</template>
<script>
import { mapState, mapActions } from 'vuex'
import util from '@/libs/util'
import Setting from '@/setting'
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
data() {
return {
title: '实验报告',
title: "实验报告",
form: {
analysis: '',
conclusion: '',
analysis: "",
conclusion: "",
content: ``,
data: '',
data: "",
purpose: ``,
experimentId: '',
experimentalClassName: '',
improvement: '',
laboratory: '',
period: '',
principle: '',
proName: '',
experimentId: "",
experimentalClassName: "",
improvement: "",
laboratory: "",
period: "",
principle: "",
proName: "",
score: 0,
step: ``,
submitTime: '',
summarize: '',
instructor: '',
submitTime: "",
summarize: "",
instructor: "",
userId: this.userId,
userName: '',
workNumber: '',
userName: "",
workNumber: ""
},
type: this.$route.query.type,
id: this.$route.query.id,
@ -127,51 +128,54 @@ import Setting from '@/setting'
infoData: [],
expData: [],
accountData: [],
showData: '1',
autograph: '1',
showData: "1",
autograph: "1",
pages: 1,
ipVisible: false,
fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}],
fileList: [{ name: "food.jpeg", url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100" }, {
name: "food2.jpeg",
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"
}],
conclusionOptions: [
{
value: 1,
label: '结论符合预期'
}
],
label: "结论符合预期"
}
]
};
},
computed: {
...mapState('user', [
'userId'
]),
...mapState("user", [
"userId"
])
},
mounted() {
this.getData()
this.getData();
},
methods: {
getData() {
if (this.type) {
let data = {
recordId: this.id,
}
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
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) {
score -= n.codeScore
n.codeScore = 0
score -= n.codeScore;
n.codeScore = 0;
}
})
form.score = score
});
form.score = score;
}
this.expData = expData
this.expData = expData;
}
this.infoData.push({
@ -183,33 +187,34 @@ import Setting from '@/setting'
submitTime: form.submitTime,
score: form.score,
userName: form.userName
})
}).catch(res => {});
});
}).catch(res => {
});
} else {
let data = {
studentId: this.studentId,
projectId: this.projectId,
recordId: this.id,
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
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
score -= n.codeScore;
n.codeScore = 0;
}
})
form.score = score
});
form.score = score;
}
this.expData = expData
this.expData = expData;
}
this.infoData.push({
workNumber: form.workNumber,
@ -220,8 +225,9 @@ import Setting from '@/setting'
submitTime: form.submitTime,
score: form.score,
userName: form.userName
})
}).catch(res => {});
});
}).catch(res => {
});
}
},
handleRemove(file, fileList) {
@ -235,20 +241,20 @@ import Setting from '@/setting'
systemId: this.configId,
systemName: this.form.systemName,
systemType: this.form.systemType,
systemAttribution: this.form.systemAttribution,
}
systemAttribution: this.form.systemAttribution
};
if (this.configId) {
this.$post(this.api.updateServiceConfig, data).then((res) => {
util.successMsg('编辑成功');
this.goBack()
util.successMsg("编辑成功");
this.goBack();
}).catch((res) => {
})
});
} else {
this.$post(this.api.updateServiceConfig, data).then((res) => {
util.successMsg('添加成功');
this.goBack()
util.successMsg("添加成功");
this.goBack();
}).catch((res) => {
})
});
}
},
handlePictureCardPreview(file) {
@ -268,40 +274,40 @@ import Setting from '@/setting'
}
},
goBack() {
this.$router.go(-1)
this.$router.go(-1);
},
exportPage() {
var title = this.title;
html2Canvas(document.querySelector('#pdfDom'), {
html2Canvas(document.querySelector("#pdfDom"), {
allowTaint: true
}).then(function(canvas) {
let contentWidth = canvas.width
let contentHeight = canvas.height
let pageHeight = contentWidth / 592.28 * 841.89
let leftHeight = contentHeight
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')
let contentWidth = canvas.width;
let contentHeight = canvas.height;
let pageHeight = contentWidth / 592.28 * 841.89;
let leftHeight = contentHeight;
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) {
PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
PDF.addImage(pageData, "JPEG", 0, 0, imgWidth, imgHeight);
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
position -= 841.89
PDF.addImage(pageData, "JPEG", 0, position, imgWidth, imgHeight);
leftHeight -= pageHeight;
position -= 841.89;
if (leftHeight > 0) {
PDF.addPage()
PDF.addPage();
}
}
}
PDF.save(title + '.pdf')
}
)
PDF.save(title + ".pdf");
}
);
}
}
};
</script>
<style lang="scss" scoped>
@ -309,50 +315,64 @@ import Setting from '@/setting'
padding: 0 50px;
background-color: #fff;
}
/deep/ .el-textarea.is-disabled .el-textarea__inner {
color: #777;
background-color: #e5dfff;
}
.pre-wrap {
min-height: 117px;
padding: 5px 15px;
color: #777;
background-color: #e5dfff;
}
#pdfDom {
padding: 50px;
/deep/ .info-table {
margin-bottom: 40px;
border: 0;
th {
background-color: #fff !important;
.cell {
color: #444;
}
}
tr {
border: 0;
}
tr:hover, tr:hover > td {
background-color: #e5dfff !important;
}
td {
border: {
left: 4px solid #fff;
right: 4px solid #fff;
}
&:first-child {
border-left: 0;
}
&:last-child {
border-right: 0;
}
background-color: #e5dfff;
border-bottom: 0;
}
}
/deep/ .table th {
background-color: #e1eaff !important;
.cell {
color: #555555;
}
@ -362,35 +382,43 @@ import Setting from '@/setting'
/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;
@ -399,16 +427,19 @@ import Setting from '@/setting'
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;

@ -1,29 +1,25 @@
<template>
<div>
<el-card shadow="hover" class="m-b-20">
<div class="flex-between m-b-10">
<el-card shadow="hover" class="m-b-20 head-card">
<div class="flex-between m-b-20">
<el-page-header @back="goBack" :content="experimentalName"></el-page-header>
</div>
<el-form label-width="100px">
<div class="flex-between">
<div></div>
<div>
<el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div>
</el-form>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="item in classList" :label="item.name" :name="item.id"></el-tab-pane>
</el-tabs>
<div class="stat">
<div class="nums">
<div class="item">
<p class="name">实验总人数</p>
<p class="val">{{total}}</p>
<p class="val">{{ peopleNum }}</p>
</div>
<div class="item">
<p class="name">实验平均分</p>
<p class="val">{{avg}}</p>
<p class="val">{{ avgScore }}</p>
</div>
</div>
<div class="chart" id="chart"></div>
@ -33,7 +29,13 @@
<el-card shadow="hover" class="m-b-20">
<div class="flex-between m-b-20">
<div>
<el-input
size="small"
placeholder="请输入学校/学生姓名"
prefix-icon="el-icon-search"
v-model="keyword" clearable
style="width: 300px"
></el-input>
</div>
<div>
<el-button type="primary" size="small" @click="delAllData">批量删除</el-button>
@ -54,8 +56,6 @@
{{ experimentalName }}
</template>
</el-table-column>
<el-table-column v-if="className" prop="class" label="班级" align="center">
</el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="score" label="分数" align="center"></el-table-column>
@ -78,201 +78,193 @@
</template>
<script>
import Setting from '@/setting'
import util from '@/libs/util'
import echarts from 'echarts'
import Setting from "@/setting";
import util from "@/libs/util";
import echarts from "echarts";
export default {
data() {
return {
activeName: "", //
classId: "", // id
classList: [], //
systemId: this.$route.query.systemId,
id: this.$route.query.id,
experimentalName: this.$route.query.name,
className: this.$route.query.class,
projectId: this.$route.query.projectId,
keyword: '',
listDataAll: [],
permissions: this.$route.query.permissions,
experimentalName: this.$route.query.projectName,
assessmentId: this.$route.query.assessmentId,
keyword: "",
searchTimer: null,
listData: [],
multipleSelection: [],
page: 1,
pageSize: 10,
total: 0,
avg: 0,
peopleNum: 0, //
avgScore: 0, //
};
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
},
created() {
this.classList = JSON.parse(this.$route.query.classList);
this.classId = this.classList[0].id;
this.activeName = this.classList[0].id;
// console.log(this.classList);
},
mounted() {
this.getData()
this.getData();
},
methods: {
getData() {
let data = {
id: this.id
}
this.$get(this.api.getTeachAchievement,data).then(res => {
let list = res.data
let score = 0
list.map(n => {
n.class = this.className
score += n.score
})
this.listDataAll = list
this.handlePage()
this.total = list.length
this.avg = score ? (score / list.length).toFixed(2) : 0
this.getChart()
}).catch(res => {});
handleClick(tab, event) { //
if (this.classId === tab.name) return;
this.classId = tab.name;
this.getData();
},
handlePage(){
let list = this.listDataAll
this.listData = list.slice((this.page - 1) * this.pageSize,this.page * this.pageSize)
this.total = list.length
getData() { //
this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&assessmentId=${this.assessmentId}&classId=${this.classId}&keyword=${this.keyword}`).then(res => {
this.listData = res.page.records;
this.total = res.page.total;
this.avgScore = res.avgScore;
this.peopleNum = res.peopleNum;
this.getChart(res.getFractionalSegmentNum);
}).catch(err => {
});
},
edit(row) {
if (this.systemId == 2 || this.systemId == 3) {
this.$router.push(`addexperiment?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`)
this.$router.push(`addexperiment?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else {
this.$router.push(`addexperiment?id=${row.reportId}`)
this.$router.push(`addexperiment?id=${row.reportId}`);
}
},
show(row){
show(row) { //
if (this.systemId == 2) {
this.$router.push(`showexperimentOption?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`)
this.$router.push(`showexperimentOption?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else if (this.systemId == 3) {
this.$router.push(`showexperimentOptions?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`)
this.$router.push(`showexperimentOptions?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else {
if(this.className){
this.$router.push(`show?id=${row.recordId}&projectId=${row.projectId}&reportId=${row.reportId}&studentId=${row.studentId}`)
if (this.permissions) {
this.$router.push(`show?id=${row.recordId}&projectId=${row.projectId}&reportId=${row.reportId}&studentId=${row.studentId}`);
} else {
this.$router.push(`show?id=${row.recordId}&type=1`)
this.$router.push(`show?id=${row.recordId}&type=1`);
}
}
},
exportData(){
if(!this.listData.length) return false
let selected = this.multipleSelection
let exportList = []
if(selected.length){
exportList = selected.map(item => {
return item.recordId
})
exportData() { // ()
if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(item => {
return item.projectId;
});
location.href = `${this.api.exportAssessmentInfo}?ids=${ids.toString()}`;
} else {
exportList = this.listData.map(item => {
return item.recordId
})
location.href = `${this.api.exportAssessmentInfo}?ids=`;
}
console.log(exportList.join(','),this.id,this.projectId)
window.open(`${this.api.exportAchievement}?ids=${exportList.join(',')}&projectId=${this.projectId}&source=2`)
},
handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(`${this.api.deleteReport}?reportId=${row.reportId}&recordId=${row.recordId}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => {});
})
.catch(() => {});
handleDelete(row) { //
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(this.api.deleteExperimentalReport, [row.projectId]).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => {
});
},
delAllData() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
let delList = newArr.map(item => {
return `reportId=${item.reportId}`
})
let delList1 = newArr.map(item => {
return `recordId=${item.recordId}`
})
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(`${this.api.deleteReport}?${delList.join('&')}&${delList1.join('&')}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
})
.catch(() => {});
delAllData() { //
if (this.multipleSelection.length) {
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {
type: "warning"
}).then(() => {
let ids = this.multipleSelection.map(item => {
return item.projectId;
});
this.$post(this.api.deleteExperimentalReport, ids).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => {});
} else {
util.errorMsg('请先选择数据 !')
util.errorMsg("请先选择数据 !");
}
},
handleSelectionChange(val) {
handleSelectionChange(val) { //
this.multipleSelection = val;
},
handleCurrentChange(val) {
handleCurrentChange(val) { //
this.page = val;
this.handlePage();
},
getChart(){
let data = [0,0,0,0,0,0,0,0,0,0]
let list = this.listData
list.map(n => {
n.score
if(n.score >= 0 && n.score <= 10){
data[0]++
}else if(n.score > 10 && n.score <= 20){
data[1]++
}else if(n.score > 20 && n.score <= 30){
data[2]++
}else if(n.score > 30 && n.score <= 40){
data[3]++
}else if(n.score > 40 && n.score <= 50){
data[4]++
}else if(n.score > 50 && n.score <= 60){
data[5]++
}else if(n.score > 60 && n.score <= 70){
data[6]++
}else if(n.score > 70 && n.score <= 80){
data[7]++
}else if(n.score > 80 && n.score <= 90){
data[8]++
}else if(n.score > 90 && n.score <= 100){
data[9]++
}
})
let myChart = echarts.init(document.getElementById('chart'))
getChart(num) { // 线
let data = [num.num1, num.num2, num.num3, num.num4, num.num5, num.num6, num.num7, num.num8, num.num9, num.num10];
let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({
title: { text: '实验分数分布图' },
title: { text: "实验分数分布图" },
tooltip: {},
xAxis: {
name: '分数',
type: 'category',
name: "分数",
type: "category",
boundaryGap: false,
data: ['0-10', '11-20', '21-30', '31-40', '41-50', '51-60', '61-70', '71-80','81-90','91-100']
data: ["0-10", "11-20", "21-30", "31-40", "41-50", "51-60", "61-70", "71-80", "81-90", "91-100"]
},
yAxis: {
name: '人数',
type: 'value'
name: "人数",
type: "value"
},
series: [{
data,
type: 'line',
type: "line",
areaStyle: {},
color: ['#8191fd']
color: ["#8191fd"]
}]
})
});
},
goBack() {
this.$router.push('list?per=1')
},
this.$router.push("/achievement/list?per=1");
}
}
};
</script>
<style lang="scss" scoped>
/deep/.el-tabs__nav-wrap::after{
/deep/ .head-card {
.el-card__body{
padding-bottom: 0px;
.el-tabs__header{
margin-bottom: 1px;
.el-tabs__nav-wrap::after {
display: none;
}
.el-tabs__item{
font-size: 18px;
}
}
}
}
.stat {
display: flex;
.nums {
display: flex;
align-items: center;
margin-right: 20px;
.item:nth-child(1) {
background-image: url('../../../assets/img/total.png');
}
.item:nth-child(2) {
background-image: url('../../../assets/img/avg.png');
}
@ -285,10 +277,12 @@ export default {
border-radius: 8px;
background-size: 100% 100%;
background-repeat: no-repeat;
p {
font-size: 18px;
color: #ffffff;
}
.val {
margin-top: 10px;
color: #ffffff;
@ -296,6 +290,7 @@ export default {
}
}
}
.chart {
flex: 1;
height: 300px;

@ -4,14 +4,6 @@
<div class="flex-between m-b-10">
<el-page-header @back="goBack" :content="experimentName"></el-page-header>
</div>
<el-form label-width="100px">
<div class="flex-between">
<div></div>
<div>
<el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div>
</el-form>
</el-card>
<el-card shadow="hover" class="m-b-20">
@ -19,11 +11,11 @@
<div class="nums">
<div class="item">
<p class="name">实验总人数</p>
<p class="val">{{total}}</p>
<p class="val">{{ peopleNum }}</p>
</div>
<div class="item">
<p class="name">实验平均分</p>
<p class="val">{{avg}}</p>
<p class="val">{{ avgScore }}</p>
</div>
</div>
<div class="chart" id="chart"></div>
@ -33,14 +25,14 @@
<el-card shadow="hover" class="m-b-20">
<div class="flex-between m-b-20">
<div>
<el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
<div>
<el-button type="primary" size="small" @click="delAllData">批量删除</el-button>
<el-button type="primary" size="small" @click="exportData">导出</el-button>
</div>
</div>
<el-table :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="reportId">
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="reportId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">
@ -49,8 +41,6 @@
</el-table-column>
<el-table-column prop="schoolName" label="学校" align="center">
</el-table-column>
<el-table-column v-if="className" prop="class" label="班级" align="center">
</el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="score" label="分数" align="center"></el-table-column>
@ -73,121 +63,115 @@
</template>
<script>
import Setting from '@/setting'
import util from '@/libs/util'
import echarts from 'echarts'
import Setting from "@/setting";
import util from "@/libs/util";
import echarts from "echarts";
export default {
data() {
return {
systemId: this.$route.query.systemId,
projectId: this.$route.query.id,
experimentName: this.$route.query.name,
className: this.$route.query.class,
keyword: '',
listDataAll: [],
permissions: this.$route.query.permissions,
experimentName: this.$route.query.projectName,
projectId: this.$route.query.projectId,
keyword: "",
searchTimer: null,
listData: [],
multipleSelection: [],
page: 1,
pageSize: 10,
total: 0,
avg: 0,
peopleNum: 0, //
avgScore: 0, //
};
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
},
mounted() {
this.getData()
this.getData();
},
methods: {
getData() {
let data = {
projectId: this.projectId
}
this.$get(this.api.getImitationAchievement,data).then(res => {
let list = res.data
let score = 0
list.map(n => {
n.class = this.className
score += n.score
})
this.listDataAll = list
this.handlePage()
this.total = list.length
this.avg = score ? (score / list.length).toFixed(2) : 0
this.getChart()
}).catch(res => {});
initData() {
this.$refs.table.clearSelection();
this.page = 1;
this.getData();
},
handlePage(){
let list = this.listDataAll
this.listData = list.slice((this.page - 1) * this.pageSize,this.page * this.pageSize)
this.total = list.length
getData() {
this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&projectId=${this.projectId}&keyword=${this.keyword}`).then(res => {
this.listData = res.page.records;
this.total = res.page.total;
this.avgScore = res.avgScore;
this.peopleNum = res.peopleNum;
this.getChart(res.getFractionalSegmentNum);
}).catch(res => {
});
},
edit(row) {
if (this.systemId == 2 || this.systemId == 3) {
this.$router.push(`addexperiment?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`)
this.$router.push(`addexperiment?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else {
this.$router.push(`addexperiment?id=${row.reportId}`)
this.$router.push(`addexperiment?id=${row.reportId}`);
}
},
show(row) {
if (this.systemId == 2) {
this.$router.push(`showexperimentOption?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`)
this.$router.push(`showexperimentOption?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else if (this.systemId == 3) {
this.$router.push(`showexperimentOptions?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`)
this.$router.push(`showexperimentOptions?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else {
if(this.class){
this.$router.push(`show?id=${row.recordId}&projectId=${this.projectId}&reportId=${row.reportId}`)
if (this.permissions) {
this.$router.push(`show?id=${row.recordId}&projectId=${this.projectId}&reportId=${row.reportId}`);
} else {
this.$router.push(`show?id=${row.recordId}&type=1`)
this.$router.push(`show?id=${row.recordId}&type=1`);
}
}
},
exportData() {
if(!this.listData.length) return false
let selected = this.multipleSelection
let exportList = []
if(selected.length){
exportList = selected.map(item => {
return item.recordId
})
if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(item => {
return item.projectId;
});
location.href = `${this.api.exportPracticeInfo}?ids=${ids.toString()}`;
} else {
exportList = this.listData.map(item => {
return item.recordId
})
location.href = `${this.api.exportPracticeInfo}?ids=`;
}
window.open(`${this.api.exportAchievement}?ids=${exportList.join(',')}&projectId=${this.projectId}&source=1`)
},
handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(`${this.api.deleteReport}?reportId=${row.reportId}&recordId=${row.recordId}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
})
.catch(() => {});
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(this.api.deleteExperimentalReport, [row.projectId]).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => {
});
},
delAllData() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
let delList = newArr.map(item => {
return `reportId=${item.reportId}`
})
let delList1 = newArr.map(item => {
return `recordId=${item.recordId}`
})
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(`${this.api.deleteReport}?${delList.join('&')}&${delList1.join('&')}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
})
.catch(() => {});
if (this.multipleSelection.length) {
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {
type: "warning"
}).then(() => {
let ids = this.multipleSelection.map(item => {
return item.projectId;
});
this.$post(this.api.deleteExperimentalReport, ids).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => {});
} else {
util.errorMsg('请先选择数据 !');
util.errorMsg("请先选择数据 !");
}
},
handleSelectionChange(val) {
@ -197,75 +181,50 @@ export default {
this.page = val;
this.handlePage();
},
getChart(){
let data = [0,0,0,0,0,0,0,0,0,0]
let list = this.listData
list.map(n => {
n.score
if(n.score >= 0 && n.score <= 10){
data[0]++
}else if(n.score > 10 && n.score <= 20){
data[1]++
}else if(n.score > 20 && n.score <= 30){
data[2]++
}else if(n.score > 30 && n.score <= 40){
data[3]++
}else if(n.score > 40 && n.score <= 50){
data[4]++
}else if(n.score > 50 && n.score <= 60){
data[5]++
}else if(n.score > 60 && n.score <= 70){
data[6]++
}else if(n.score > 70 && n.score <= 80){
data[7]++
}else if(n.score > 80 && n.score <= 90){
data[8]++
}else if(n.score > 90 && n.score <= 100){
data[9]++
}
})
let myChart = echarts.init(document.getElementById('chart'))
getChart(num) {
let data = [num.num1, num.num2, num.num3, num.num4, num.num5, num.num6, num.num7, num.num8, num.num9, num.num10];
let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({
title: { text: '实验分数分布图' },
title: { text: "实验分数分布图" },
tooltip: {},
xAxis: {
name: '分数',
type: 'category',
name: "分数",
type: "category",
boundaryGap: false,
data: ['0-10', '11-20', '21-30', '31-40', '41-50', '51-60', '61-70', '71-80','81-90','91-100']
data: ["0-10", "11-20", "21-30", "31-40", "41-50", "51-60", "61-70", "71-80", "81-90", "91-100"]
},
yAxis: {
name: '人数',
type: 'value'
name: "人数",
type: "value"
},
series: [{
data,
type: 'line',
type: "line",
areaStyle: {},
color: ['#8191fd']
color: ["#8191fd"]
}]
})
});
},
goBack() {
this.$router.back()
},
this.$router.back();
}
}
};
</script>
<style lang="scss" scoped>
/deep/.el-tabs__nav-wrap::after{
display: none;
}
.stat {
display: flex;
.nums {
display: flex;
align-items: center;
margin-right: 20px;
.item:nth-child(1) {
background-image: url('../../../assets/img/total.png');
}
.item:nth-child(2) {
background-image: url('../../../assets/img/avg.png');
}
@ -278,10 +237,12 @@ export default {
border-radius: 8px;
background-size: 100% 100%;
background-repeat: no-repeat;
p {
font-size: 18px;
color: #ffffff;
}
.val {
margin-top: 10px;
color: #ffffff;
@ -289,6 +250,7 @@ export default {
}
}
}
.chart {
flex: 1;
height: 300px;

@ -3,9 +3,9 @@
<el-form :disabled="isDetail">
<el-card shadow="hover" class="m-b-20">
<div class="flex-between">
<el-page-header @back="goBack" :content="isDetail ? '查看' : (id ? '更新' : '创建') + '教学实验'"></el-page-header>
<el-page-header @back="goBack" :content="isDetail ? '查看' : (form.id ? '更新' : '创建') + '教学实验'"></el-page-header>
<div>
<el-button type="primary" size="small" @click="upload" v-show="!isDetail">{{id ? '更新' : '创建'}}</el-button>
<el-button type="primary" size="small" @click="upload" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button>
</div>
</div>
</el-card>
@ -15,7 +15,7 @@
<p class="m-b-20">考核名称</p>
<el-input
placeholder="请输入考核名称"
v-model="experimentalName"
v-model.trim="form.experimentalName"
clearable
maxlength="15"
class="inline-input"
@ -24,11 +24,10 @@
</el-card>
<el-card shadow="hover" class="m-b-20">
<div>
<p class="m-b-20">发布方式</p>
<el-radio-group v-model="type" :disabled="id ? true : false">
<el-radio-group v-model="form.type" :disabled="form.id ? true : false">
<el-radio :label="1">手动发布</el-radio>
<el-radio :label="2">定时发布</el-radio>
</el-radio-group>
@ -39,15 +38,18 @@
<div>
<p class="m-b-20">实验时间</p>
<!-- 手动发布显示 -->
<div class="date-inputs" v-if="type==1">
<div class="date-inputs" v-if="form.type==1">
实验时长
<el-input size="small" v-model="duration.day" placeholder></el-input>
<el-input size="small" v-model="duration.hour" placeholder></el-input>
<el-input size="small" v-model="duration.minute" placeholder></el-input>
<el-input size="small" v-model.trim="duration.day" placeholder></el-input>
<el-input size="small" v-model.trim="duration.hour" placeholder></el-input>
小时
<el-input size="small" v-model.trim="duration.minute" placeholder></el-input>
</div>
<!-- 定时发布显示 -->
<div v-if="type==2" class="addAssess">
<div v-if="form.type==2" class="addAssess">
<span class="mgr10">开始时间:</span>
<el-date-picker
size="small"
@ -66,12 +68,12 @@
<div>
<p class="m-b-20">课程</p>
<div class="inline-input">
<el-select v-model="systemId" placeholder="请选择" @change="initData">
<el-select v-model="form.curriculumId" placeholder="请选择" @change="initData">
<el-option
v-for="item in systemList"
:key="item.value"
:label="item.label"
:value="item.id"
v-for="item in curriculumList"
:key="item.cid"
:label="item.curriculumName"
:value="item.cid"
></el-option>
</el-select>
</div>
@ -84,7 +86,7 @@
<span>实训项目</span>
<div style="display: inline-flex;">
<div>
<el-input size="small" placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<el-input size="small" placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</div>
<el-button style="margin-left: 5px" type="primary" size="small" round @click="toProject">自定义实验项目</el-button>
</div>
@ -94,7 +96,7 @@
<!-- 单选实训项目ID -->
<el-table-column width="60" label="选择" align="center">
<template slot-scope="scope">
<el-radio v-model="projectId" :label="scope.row.projectId">&nbsp;</el-radio>
<el-radio v-model="form.projectId" :label="scope.row.projectId">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
@ -129,22 +131,22 @@
<el-card shadow="hover" class="mgr20 m-b-20">
<div>
<p class="m-b-20">考核发布</p>
<el-radio-group v-model="isSpecify">
<el-radio-group v-model="form.isSpecify">
<el-radio :label="1">指定范围</el-radio>
<el-radio :label="0">无指定范围</el-radio>
</el-radio-group>
</div>
<div v-show="isSpecify === 1" style='padding-top: 24px;'>
<div v-show="form.isSpecify === 1" style="padding-top: 24px;">
<p class="m-b-20">班级名称</p>
<el-input
placeholder="请输入班级名称"
v-model="filterClassName"
class="inline-input"
v-model.trim="filterClassName"
class="inline-input m-b-20"
clearable
></el-input>
<div v-show='tagList.length' style="padding: 24px 0">
<div v-show="tagList.length" class="m-b-20">
<el-tag
v-for="(tag, index) in tagList"
:key="index"
@ -152,37 +154,40 @@
@close="handleCloseTag(tag)"
style="margin-right: 10px"
>
{{tag.className}}
{{ tag.organizationName }}
</el-tag>
</div>
<div class="tree-con">
<el-tree
ref="tree"
node-key="id"
node-key="nodeKey"
show-checkbox
highlight-current
default-expand-all
:data="classTreeList"
:default-checked-keys="defaultCheckedList"
lazy
:load="loadTree"
:default-checked-keys="defaultCheckedKeys"
:props="{children: 'children', label: 'organizationName'}"
:filter-node-method="filterNode"
:props="defaultProps"
@check="handleCheck"
>
</el-tree>
</div>
</div>
</el-card>
<!-- 邀请码 -->
<el-card v-if='isSpecify === 0' shadow="hover" class="m-b-20">
<el-card v-if="form.isSpecify === 0" shadow="hover" class="m-b-20">
<div style="margin-bottom: 10px">
<p class="m-b-20">设置邀请码</p>
<el-radio-group v-model="isEnableCode">
<el-radio-group v-model="form.isEnableCode">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</div>
<div v-if="isEnableCode === 0">
<el-input style="display: inline-block;width: auto;margin-right: 10px" type="number" v-model="invitationCode" maxlength="6" placeholder="请设置6个数字"></el-input>
<div v-if="form.isEnableCode === 0">
<el-input style="display: inline-block;width: auto;margin-right: 10px" type="number" v-model.trim="form.invitationCode" maxlength="6" placeholder="请设置6个数字"></el-input>
<el-button type="text" @click="createInv">随机</el-button>
</div>
</el-card>
@ -190,478 +195,362 @@
</div>
</template>
<script>
import Setting from '@/setting'
import util from '@/libs/util'
import { mapState, mapActions } from 'vuex'
import Setting from "@/setting";
import util from "@/libs/util";
import { mapState, mapActions } from "vuex";
export default {
data() {
return {
founderKeys: {
0: '系统',
1: '老师'
0: "系统",
1: "老师"
},
permissionsKeys: {
0: '练习',
1: '考核',
2: '竞赛'
0: "练习",
1: "考核",
2: "竞赛"
},
id: '',
isDetail: Boolean(this.$route.query.show),
form: {
id: this.$route.query.id ? this.$route.query.id : "",
experimentalName: "",
type: 1, // (1 2)
experimentDuration: "0d0h0m",
curriculumId: "",
projectId: "",
isSpecify: 1, // (1 2)
isEnableCode: 0, //
invitationCode: "",
status: 0, // (0 1 2)
classId: "",
stuInfo: []
},
date: "", //
duration: {
day: "",
hour: "",
minute: ""
}, //
startTime: "0000-00-00 00:00:00", //
stopTime: "0000-00-00 00:00:00", //
expNameRepeat: false, //
curriculumList: [], //
filterClassName: "", //
tagList: [], //
classTreeList: [], //
defaultCheckedList: [], //
defaultCheckedKeys: [], //
allCheckedNodes: [], //
allCheckedKeys: [], // key
defaultProps: {
children: 'children',
label: 'organizationName'
}, //
schoolId: Setting.schoolId, // id Setting.schoolId
systemId: Setting.systemId,
systemList: Setting.systemList,
roleStatus: util.getRoleName,
isDetail: Boolean(this.$route.query.show),
duration: {
day: '',
hour: '',
minute: ''
},
keyword: '',
keyword: "", //
searchTimer: null,
date: '',
experimentDuration: '0d0h0m',
experimentalNumber: 0,
projectId: '',
projectName: '',
status: 0, // (0 1 2)
surplusTime: '',
experimentalName: '',//
isEnableCode: 0, //
startTime: '0000-00-00 00:00:00', //
stopTime: '0000-00-00 00:00:00', //
invitationCode: '',
currPage: 1,
surplusTime: "",
projectDataAll: [],
projectData: [],
invRepeat: false,
pickerOptions: {
disabledDate: time => {
return time.getTime() < new Date().getTime() - 86400000
return time.getTime() < new Date().getTime() - 86400000;
}
},
projectPermissionsList: ['练习','考核','竞赛'],
projectQueryData: {
userId: this.userId,
systemId: this.systemId
},
page: 1,
pageSize: 5,
total: 0,
multipleSelection: [],
isToProject: false,
expNameRepeat: false
isToProject: false
};
},
computed: {
...mapState('user', [
'userId'
]),
...mapState('project', [
'assFields'
]),
...mapState("project", [
"assFields"
])
},
mounted() {
// console.log(22,this.assFields)
this.date = [util.formatDate("yyyy-MM-dd hh:mm:ss",new Date(new Date().getTime() + 300000)),util.formatDate("yyyy-MM-dd hh:mm:ss",new Date(new Date().getTime() + 300000))]
this.id = this.$route.query.id
this.id && this.getData()
this.getProjectData()
this.recoveryData()
this.getClassTreeData()
this.date = [util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000)), util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000))];
this.form.id && this.getData();
this.getschoolCourse();
this.recoveryData();
},
beforeDestroy() {
if(!this.isToProject) this.setAss({})
if (!this.isToProject) this.setAss({});
},
watch: {
date: function(val) {
if(val[0] != '0000-00-00 00:00:00'){
this.startTime = util.formatDate("yyyy-MM-dd hh:mm:ss",new Date(val[0]))
this.stopTime = util.formatDate("yyyy-MM-dd hh:mm:ss",new Date(val[1]))
if (val[0] != "0000-00-00 00:00:00") {
this.startTime = util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[0]));
this.stopTime = util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[1]));
}
},
duration: {
handler(n, o) {
this.experimentDuration = `${n.day ? n.day : 0}d${n.hour ? n.hour : 0}h${n.minute ? n.minute : 0}m`
this.form.experimentDuration = `${n.day ? n.day : 0}d${n.hour ? n.hour : 0}h${n.minute ? n.minute : 0}m`;
},
deep: true
},
keyword: function(val) {
clearTimeout(this.searchTimer)
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData()
},500)
this.initData();
}, 500);
},
filterClassName(val) {
this.$refs.tree.filter(val);
}
},
methods: {
...mapActions('project', [
'setAss'
...mapActions("project", [
"setAss"
]),
handleCloseTag(tag) { //
let tagIndex = this.tagList.findIndex( i => i.classId === tag.classId);
this.tagList.splice(tagIndex, 1);
//
let classIndex = this.allCheckedNodes.findIndex( i => i.id === tag.id);
// keys
let studentsKeys = [];
if(this.allCheckedNodes[classIndex].children && this.allCheckedNodes[classIndex].children.length) {
studentsKeys = this.allCheckedNodes[classIndex].children.map( i => i.id);
}
let filterKeys = [...studentsKeys, this.allCheckedNodes[classIndex].id];
let setKeys = []; //
this.allCheckedKeys.forEach(i => {
if(!filterKeys.includes(i)){
setKeys.push(i)
}
}); //
this.allCheckedKeys = setKeys; // key
console.log("所有节点keys===",JSON.stringify(this.allCheckedKeys));
console.log("当前班级和学生keys===",JSON.stringify(filterKeys));
console.log("设置选中的节点===",JSON.stringify(setKeys));
this.allCheckedNodes = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
let tempArr = [];
let tagIndex = this.tagList.findIndex(i => i.id === tag.id);
this.tagList.splice(tagIndex, 1);
//
let setKeys = [];
this.allCheckedNodes.forEach(i => {
if(!filterKeys.includes(i.id)){
tempArr.push(i)
}
if (i.level === 4 && i.parentId !== tag.id) setKeys.push(i.nodeKey);
});
this.allCheckedNodes = tempArr; //
this.$refs.tree.setCheckedKeys(setKeys);
this.allCheckedNodes = this.allCheckedNodes.filter(i => (i.level === 3 && i.id !== tag.id) || (i.level === 4 && i.parentId !== tag.id));
},
handleCheck(data, checked) { //
console.log(checked);
// console.log(JSON.stringify(checked.checkedNodes));
//
let checkedClass = checked.checkedNodes.filter(i => i.level === 3);
let halfCheckedClass = checked.halfCheckedNodes.filter(i => i.level === 3);
this.tagList = [...checkedClass, ...halfCheckedClass].map(i => {
return {classId: i.id, className: i.organizationName}
return { id: i.id, organizationName: i.organizationName };
});
//
this.allCheckedNodes = [...checked.checkedNodes, ...checked.halfCheckedNodes];
// key
let tempArr = checked.checkedNodes.filter( i => i.level === 3 || i.level === 4);
this.allCheckedKeys = tempArr.map(i => i.id);
},
filterNode(value, data) { //
if (!value) return true;
return data.organizationName.indexOf(value) !== -1;
},
toTreeId(data) { // idid+id,便key
if (!data) return data;
let result;
if (Array.isArray(data)) {
result = [];
data.forEach(item => {
if (item.level < 4 && item.children && item.children.length) {
item.children = this.toTreeId(item.children);
} else if (item.level === 4) {
item.id = `${item.parentId}-${item.id}`;
loadTree(node, resolve) { //
let level = 1;
let parentId = "";
if (node.level === 0) {
this.treeNode = node;
this.treeResolve = resolve;
this.getTreeData(resolve, level, parentId);
} else if (node.level > 3) {
return resolve([]);
} else {
if (node.data && node.data.level && node.data.id) {
this.getTreeData(resolve, node.data.level + 1, node.data.id);
}
result.push(item);
});
}
return result;
},
getClassTreeData () { //
this.$post(`${this.api.treeList}?schoolId=${this.schoolId}`).then(res => {
let {status, list} = res;
if (status === 200 && list) {
this.classTreeList = this.toTreeId(res.list);
async getTreeData(resolve, level, parentId) { //
let { status, treeList } = await this.$post(`${this.api.stuOrganizationTree}?level=${level}&parentId=${parentId}`);
if (status === 200 && treeList.length) {
let result = [];
treeList.forEach(i => {
if (i.level === 4) {
i.nodeKey = `${i.parentId}-${i.id}`;
i.isLeaf = "leaf";
} else {
util.errorMsg(res.message);
i.nodeKey = `${i.id}-${new Date().getTime()}`;
}
result.push(i);
});
this.$nextTick(() => {
//
if (this.form.stuInfo && this.form.stuInfo.length) {
let keys = this.form.stuInfo.map(i => {
return `${i.classId}-${i.stuAccountId}`;
});
this.defaultCheckedKeys = keys;
}
//
let nodes = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
this.allCheckedNodes = nodes;
this.tagList = nodes.filter(i => i.level === 3);
});
return resolve(result);
} else {
return resolve([]);
}
},
getschoolCourse() {
this.$get(this.api.schoolCourse).then(res => {
this.curriculumList = res.data;
}).catch(err => {
console.log(err);
});
},
getProjectData() {
let data = {
schoolId: this.schoolId, // id
platformId: 1, // :1 :3
permissions: 1, // (0: 1: 2:)
projectName: this.keyword, //
systemId: this.systemId, // id
founder: 0, // (0: 1:)
state: 1, // (0:稿 1:)
pageNum: this.page,
pageSize: 10000,
}
this.$post(this.api.queryProjectManage, data).then(res => {
this.$get(`${this.api.projectListByCourseId}?cid=${this.form.curriculumId}&permissions=1&projectName=${this.keyword}`).then(res => {
let { status, data } = res;
if (status === 200 && data) {
let list = data.records;
let result = []
let result = [];
list.map(n => {
n.enable || result.push(n)
})
this.projectDataAll = result
this.total = result.length
this.handlePage()
n.enable || result.push(n);
});
this.projectDataAll = result;
this.total = result.length;
this.handlePage();
}
}).catch(err => {
console.log(err);
});
},
handlePage() {
let list = this.projectDataAll
let result = list.slice((this.page - 1) * this.pageSize,this.page * this.pageSize)
this.projectData = result
let list = this.projectDataAll;
let result = list.slice((this.page - 1) * this.pageSize, this.page * this.pageSize);
this.projectData = result;
},
initData() {
this.page = 1
this.getProjectData()
},
recoveryData(){
if(JSON.stringify(this.assFields) != '{}'){
let info = this.assFields
this.experimentDuration = info.experimentDuration
this.experimentalName = info.experimentalName
this.invitationCode = info.invitationCode
this.isEnableCode = info.isEnableCode
this.projectId = info.projectId
this.startTime = info.startTime
this.stopTime = info.stopTime
this.surplusTime = info.surplusTime
this.type = info.type
this.expNameRepeat = info.expNameRepeat
this.formatDuration()
}
this.page = 1;
this.getProjectData();
},
upload() { //
if(!this.experimentalName) return util.warningMsg('请填写考核名称')
if(this.expNameRepeat) return util.warningMsg('考核名称重复,请重新输入')
if(this.type !== 1){
if(new Date().getTime() > new Date(this.startTime).getTime()) return util.warningMsg('开始时间不能早于当前时间')
let timestamp = new Date(new Date(this.stopTime).getTime() - new Date(this.startTime).getTime())
let minute = 1000 * 60
let hour = minute * 60
let day = hour * 24
this.experimentDuration = `${Math.floor(timestamp / day)}d${Math.floor(timestamp % day / hour)}h${Math.floor(timestamp % day % hour / minute)}m`
}
if(this.type == 1 && this.experimentDuration == '0d0h0m') return util.warningMsg('请填写实验时长')
if(this.type == 2 && this.startTime == '0000-00-00 00:00:00') return util.warningMsg('请填写实验时间')
if(!this.projectId) return util.warningMsg('请选择实训项目')
this.projectName = this.projectData.find(n => n.projectId == this.projectId).projectName
if(this.isSpecify === 0 && this.isEnableCode == 0){
if(!this.invitationCode) return util.warningMsg('请设置邀请码')
if(!this.invitationCode || String(this.invitationCode).length < 6 || isNaN(this.invitationCode)) return util.warningMsg('请输入6位纯数字邀请码')
// if(this.invRepeat) return util.warningMsg('')
}
let classId = "";
if (!this.form.experimentalName) return util.warningMsg("请填写考核名称");
if (this.expNameRepeat) return util.warningMsg("考核名称重复,请重新输入");
if (this.form.type !== 1) {
if (new Date().getTime() > new Date(this.startTime).getTime()) return util.warningMsg("开始时间不能早于当前时间");
let timestamp = new Date(new Date(this.stopTime).getTime() - new Date(this.startTime).getTime());
let minute = 1000 * 60;
let hour = minute * 60;
let day = hour * 24;
this.form.experimentDuration = `${Math.floor(timestamp / day)}d${Math.floor(timestamp % day / hour)}h${Math.floor(timestamp % day % hour / minute)}m`;
}
if (this.form.type == 1 && this.form.experimentDuration == "0d0h0m") return util.warningMsg("请填写实验时长");
if (this.form.type == 2 && this.startTime == "0000-00-00 00:00:00") return util.warningMsg("请填写实验时间");
if (!this.form.projectId) return util.warningMsg("请选择实训项目");
if (this.form.isSpecify === 0 && this.form.isEnableCode == 0) {
if (!this.form.invitationCode) return util.warningMsg("请设置邀请码");
if (!this.form.invitationCode || String(this.form.invitationCode).length < 6 || isNaN(this.form.invitationCode)) return util.warningMsg("请输入6位纯数字邀请码");
}
if (this.form.type == 2) {
this.form.startTime = this.startTime;
this.form.stopTime = this.stopTime;
}
let classId = [];
let stuInfo = [];
if (this.isSpecify === 1) {
if (!this.tagList.length) {
util.warningMsg('请选择学生')
this.allCheckedNodes.forEach(i => {
if (i.level === 3) {
classId.push(i.id);
} else if (i.level === 4) {
stuInfo.push({ classId: i.parentId, stuAccountId: i.id });
}
});
if (this.isSpecify === 1 && !stuInfo.length) {
util.warningMsg("请选择学生");
return;
} else {
let ids = this.tagList.map(i => i.classId);
classId = ids.toString();
let nodes = this.allCheckedNodes.filter( i => i.level === 4);
nodes.forEach(i => {
let arr = i.id.split("-")
stuInfo.push({classId: arr[0], stuAccountId: arr[1]})
});
}
}
let data = {
id: this.id,
experimentDuration: this.experimentDuration,
createTime: this.id ? this.createTime : util.formatDate("yyyy-MM-dd hh:mm:ss"),
experimentalName: this.experimentalName,
experimentalNumber: this.experimentalNumber,
invitationCode: this.invitationCode,
isEnableCode: this.isEnableCode,
projectId: this.projectId,
projectName: this.projectName,
status: this.status,
surplusTime: this.surplusTime,
type: this.type,
userId: this.userId,
systemId: this.systemId,
isSpecify: this.isSpecify,
classId,
stuInfo,
}
if(this.type == 2){
data.startTime = this.startTime
data.stopTime = this.stopTime
this.form.classId = classId.toString();
this.form.stuInfo = stuInfo;
}
if(this.id){
this.$post(this.api.modifyAssessment, data).then(res => {
util.successMsg('修改成功');
this.$router.back()
})
.catch(err => {
if (this.form.id) {
this.$post(this.api.modifyAssessment, this.form).then(res => {
util.successMsg("修改成功");
this.$router.back();
}).catch(err => {
console.log(err);
});
} else {
this.$post(this.api.saveAssessment, data).then(res => {
this.$post(this.api.saveAssessment, this.form).then(res => {
if (res.status === 200) {
util.successMsg('创建成功');
this.$router.back()
} else {
util.successMsg("创建成功");
this.$router.back();
}
})
.catch(err => {
}).catch(err => {
console.log(err);
});
}
},
getData() {
this.$get(`${this.api.getDetailById}?id=${this.id}`)
.then(res => {
getData() { //
this.$get(`${this.api.getDetailById}?id=${this.form.id}`).then(res => {
if (res.status == 200) {
let info = res.data;
this.createTime = info.createTime
this.experimentDuration = info.experimentDuration
this.experimentalName = info.experimentalName
this.experimentalNumber = info.experimentalNumber
this.invitationCode = info.invitationCode
this.isEnableCode = info.isEnableCode
this.projectId = info.projectId
this.projectName = info.projectName
this.startTime = info.startTime
this.status = info.status
this.stopTime = info.stopTime
this.surplusTime = info.surplusTime
this.type = info.type
//
this.form = res.data;
this.formatDuration();
//
if (info.stuInfo && info.stuInfo.length) {
let keys = info.stuInfo.map(i => {
return `${i.classId}-${i.stuAccountId}`;
});
this.$nextTick(function () {
this.$refs.tree.setCheckedKeys(keys);
});
}
//
this.allCheckedNodes = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
// key
let tempArr = this.$refs.tree.getCheckedNodes().filter( i => i.level === 3 || i.level === 4);
this.allCheckedKeys = tempArr.map(i => i.id);
this.tagList = this.allCheckedNodes.map(i => {
let obj = {};
if (i.level === 3) {
obj = { classId: i.id, className: i.organizationName }
}
return obj;
})
}else{
util.errorMsg(res.message);
}
})
.catch(err => {
}).catch(err => {
console.log(err);
});
},
formatDuration(){
let duration = this.experimentDuration.replace(/\D+/g,',').split(',')
formatDuration() { //
let duration = this.form.experimentDuration.replace(/\D+/g, ",").split(",");
this.duration = {
day: duration[0],
hour: duration[1],
minute: duration[2]
};
this.date = [this.startTime, this.stopTime];
},
recoveryData() { //
if (JSON.stringify(this.assFields) != "{}") {
let info = this.assFields;
this.form = info.form;
this.duration = info.duration; //
this.startTime = info.startTime; //
this.stopTime = info.startTime; //
this.expNameRepeat = info.expNameRepeat; //
this.allCheckedNodes = info.allCheckedNodes; //
this.formatDuration();
}
this.date = [this.startTime,this.stopTime]
},
handleCacheData(){
let data = {
id: this.id,
experimentDuration: this.experimentDuration,
experimentalName: this.experimentalName,
invitationCode: this.invitationCode,
isEnableCode: this.isEnableCode,
projectId: this.projectId,
startTime: this.startTime,
stopTime: this.stopTime,
surplusTime: this.surplusTime,
type: this.type,
expNameRepeat: this.expNameRepeat
handleCacheData() { // ,,
this.allCheckedNodes.forEach(i => {
if (i.level === 4) {
this.form.stuInfo.push({ classId: i.parentId, stuAccountId: i.id });
}
this.setAss(data)
this.isToProject = true
});
let data = {
form: this.form,
date: this.date, //
duration: this.duration, //
startTime: this.startTime, //
stopTime: this.startTime, //
expNameRepeat: this.expNameRepeat, //
allCheckedNodes: this.allCheckedNodes //
};
this.setAss(data);
this.isToProject = true;
},
toProject() {
this.handleCacheData()
this.$router.push('/project/list/?show=1')
this.handleCacheData();
this.$router.push("/project/list/?show=1");
},
showProject(row) {
this.handleCacheData()
this.$router.push(`/project/add?projectId=${row.projectId}&show=1`)
},
goBack() {
if(this.isDetail){
this.$router.back()
}else{
this.$confirm('确定返回?未更新的信息将不会保存。', '提示', {
type: 'warning'
})
.then(() => {
this.$router.back()
})
.catch(() => {});
}
},
varifyInv() {
this.$get(this.api.getInvitationCode, { invitationCode: this.invitationCode })
.then(res => {
if(res.InvitationCode) {
util.warningMsg('邀请码重复,请重新输入')
this.invRepeat = true
}else{
this.invRepeat = false
}
})
.catch(err => {});
this.handleCacheData();
this.$router.push(`/project/add?projectId=${row.projectId}&show=1`);
},
createInv() {
let result = ''
let result = "";
for (let i = 0; i < 6; i++) {
result += Math.floor(Math.random()*10)
result += Math.floor(Math.random() * 10);
}
this.invitationCode = result
// this.varifyInv()
this.form.invitationCode = result;
},
handleCurrentChange(val) {
this.page = val
this.handlePage()
}
this.page = val;
this.handlePage();
},
goBack() {
if (this.isDetail) {
this.$router.back();
} else {
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", { type: "warning" }).then(() => {
this.$router.back();
});
}
}
}
};
</script>
@ -669,9 +558,26 @@ export default {
.inline-input {
width: 300px;
}
.date-inputs {
.el-input {
width: 100px;
}
}
.tree-con {
height: 400px;
max-height: 400px;
width: 300px;
border: 1px solid #DCDFE6;
border-radius: 4px;
padding: 10px 10px 10px 0px;
overflow: auto;
/deep/ .el-icon-caret-right:before {
color: #9278FF;
font-weight: bold;
}
}
</style>

@ -35,7 +35,7 @@
</el-select>
</li>
<li>
<el-input size="small" placeholder="请输入实验班级/项目名称" prefix-icon="el-icon-search" v-model="keyWord" clearable></el-input>
<el-input size="small" placeholder="请输入实验班级/项目名称" prefix-icon="el-icon-search" v-model.trim="keyWord" clearable></el-input>
</li>
</ul>
<div>
@ -45,7 +45,7 @@
</div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" :selectable="row => row.status!=1" width="50" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="selection" :selectable="row => row.status !== 1" width="50" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (pageNum - 1) * pageSize + 1 }}
@ -57,16 +57,16 @@
</el-table-column>
<el-table-column prop="projectName" label="项目名称" width="250" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="experimentalNumber" label="实验人数" align="center">
<el-table-column prop="experimenterNum" label="实验人数" align="center">
</el-table-column>
<el-table-column prop="experimentDuration" label="实验时长" align="center">
</el-table-column>
<el-table-column label="邀请码" align="center">
<template slot-scope="scope">
<span>{{scope.row.isEnableCode == 0 ? scope.row.invitationCode : ''}}</span>
<span>{{ scope.row.isEnableCode == 0 ? scope.row.invitationCode : "" }}</span>
</template>
</el-table-column>
<el-table-column prop="adminName" label="发布类型" align="center">
<el-table-column prop="type" label="发布类型" align="center">
<template slot-scope="scope">
<span>{{ types[scope.row.type] }}</span>
</template>
@ -75,18 +75,17 @@
</el-table-column>
<el-table-column prop="startTime" width="150" label="起始时间" align="center">
<template slot-scope="scope">
<span>{{transferTime(scope.row.startTime,scope.row.type)}}</span>
<span>{{ transferTime(scope.row.startTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="endTime" width="150" label="结束时间" align="center">
<el-table-column prop="stopTime" width="150" label="结束时间" align="center">
<template slot-scope="scope">
<span>{{transferTime(scope.row.stopTime,scope.row.type)}}</span>
<span>{{ transferTime(scope.row.stopTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="surplusTime" label="倒计时" align="center">
<el-table-column label="倒计时" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status == 1" v-countdown="scope.row.surplusTime">{{scope.row.surplusTime}}</span>
<span v-else>00:00:00</span>
<span>{{ timeChange(scope.row.countDown) }}</span>
</template>
</el-table-column>
<el-table-column label="实验状态" align="center">
@ -117,162 +116,180 @@
</template>
<script>
import Setting from '@/setting'
import util from '@/libs/util'
import Setting from "@/setting";
import util from "@/libs/util";
export default {
data() {
return {
typeList: [
{
value: '',
name: '不限'
value: "",
name: "不限"
},
{
value: 1,
name: '手动发布'
name: "手动发布"
},
{
value: 2,
name: '定时发布'
name: "定时发布"
}
],
types: ['','手动发布','定时发布'],
types: ["", "手动发布", "定时发布"],
statusList: [
{
value: '',
name: '不限'
value: "",
name: "不限"
},
{
value: 0,
name: '待开始'
name: "待开始"
},
{
value: 1,
name: '进行中'
name: "进行中"
},
{
value: 2,
name: '已完成'
name: "已完成"
}
],
status: ['待开始','进行中','已完成'],
status: ["待开始", "进行中", "已完成"],
dateList: [
{
id: '',
name: '不限'
id: "",
name: "不限"
},
{
id: 1,
name: '近一个月'
name: "近一个月"
},
{
id: 3,
name: '近三个月'
name: "近三个月"
},
{
id: 6,
name: '近六个月'
name: "近六个月"
}
],
date: [],
systemList: Setting.systemList,
systemId: '',
keyWord: '', //
systemId: "",
keyWord: "", //
searchTimer: null,
form: {
type: '',
status: '',
startTime: '',
endTime: '',
month: ''
type: "",
status: "",
startTime: "",
endTime: "",
month: ""
},
pageNum: 1, //
pageSize: 10, // 10
total: 0, //
listData: [], //
multipleSelection: [], //
ruleIds: [],
timer: null
ticker: null
};
},
directives: {
countdown: {
bind: function(el,binding,vnode) {
let that = vnode.context
let time = binding.value
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 = `${util.formateTime(hours)}:${util.formateTime(minutes)}:${util.formateTime(seconds)}`
}else{
clearInterval(timer)
}
el.innerHTML = time
},1000)
that.timerList.push(timer)
}
}
},
computed: {
role() {
return this.name === 'admin' ? '超级管理员' : '普通用户';
}
},
watch: {
'form.month': function(val){
"form.month": function(val) {
if (val) {
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))]
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))];
} else {
this.date = []
this.date = [];
}
},
date: function(val) {
if (val) {
this.form.startTime = val[0]
this.form.endTime = val[1]
this.form.startTime = val[0];
this.form.endTime = val[1];
} else {
this.form.startTime = ''
this.form.endTime = ''
this.form.startTime = "";
this.form.endTime = "";
}
this.initData()
this.initData();
},
keyWord: function(val) {
clearTimeout(this.searchTimer)
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData()
},500)
this.initData();
}, 500);
}
},
mounted() {
this.getData()
// this.timer = setInterval(this.getData,1000)
// this.$once('hook:beforeDestroy',() => {
// clearInterval(this.timer)
// })
this.getData();
this.beginTimer();
},
created() {
if (this.ticker) {
clearInterval(this.ticker);
}
},
methods: {
beginTimer() {
this.ticker = setInterval(() => {
for (let i = 0; i < this.listData.length; i++) {
const item = this.listData[i];
if (item.countDown > 0) {
item.countDown = item.countDown - 1;
}
this.$set(this.listData, i, item);
}
}, 1000);
},
timeChange(countDown) {
let that = this;
if (countDown < 0) {
clearInterval(setInterval(this.timeChange(countDown), 1000));
}
let hh = that.fillNumber(countDown / (60 * 60));
let mm = that.fillNumber(countDown % (60 * 60) / 60);
let ss = that.fillNumber(countDown % (60 * 60) % 60);
return `${hh}:${mm}:${ss}`;
},
fillNumber(num) {
let number = Math.floor(num);
return number > 9 ? number : `0${number}`;
},
getData() {
let data = {
type: this.form.type,
startTime: this.form.startTime,
endTime: this.form.endTime,
month: this.form.month,
status: this.form.status,
...this.form,
keyWord: this.keyWord,
pageNum: this.pageNum,
pageSize: this.pageSize,
systemId: this.systemId
}
};
this.$post(this.api.pageByCondition, data).then(res => {
if (res.status === 200) {
this.listData = res.list;
this.total = res.total;
this.listData.forEach(i => {
if (i.status === 2) { //
i.countDown = 0;
} else {
if (i.type === 2) { //
if (i.status === 0) {
//
i.countDown = (new Date(i.startTime).getTime() - new Date().getTime()) / 1000; //
} else if (i.status === 1) {
//
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000;
}
} else if (i.type === 1) { //
if (i.status === 0) {
//
i.countDown = 0;
} else if (i.status === 1) {
//
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000;
}
}
}
});
} else {
util.errorMsg(res.message);
}
@ -281,102 +298,107 @@ export default {
});
},
initData() {
this.$refs.table.clearSelection()
this.pageNum = 1
this.getData()
this.$refs.table.clearSelection();
this.pageNum = 1;
this.getData();
},
add() {
this.$router.push('add')
this.$router.push("add");
},
edit(row) {
this.$router.push(`add?id=${row.id}`)
this.$router.push(`add?id=${row.id}`);
},
show(row) {
this.$router.push(`/achievement/ass?systemId=${this.systemId}&id=${row.id}&projectId=${row.projectId}&name=${row.projectName}&experimentalName=${row.experimentalName}&class=${row.experimentalClassName}`)
this.$router.push(`/achievement/ass?systemId=${this.systemId}&id=${row.id}&projectId=${row.projectId}&name=${row.projectName}&experimentalName=${row.experimentalName}&class=${row.experimentalClassName}`);
},
start(row) {
let data = {
id: row.id,
startTime: util.formatDate("yyyy-MM-dd hh:mm:ss", new Date()),
status: 1
}
};
this.$post(this.api.modifyAssessment, data).then(res => {
if (res.status === 200) {
util.successMsg('启动成功!')
this.getData()
util.successMsg("启动成功!");
this.getData();
}
}).catch(err => {
console.log(err);
});
},
finish(row) {
this.$confirm('确定要提前结束吗?', '提示', {
type: 'warning'
this.$confirm("确定要提前结束吗?", "提示", {
type: "warning"
})
.then(() => {
let data = {
id: row.id,
endTime: util.formatDate("yyyy-MM-dd hh:mm:ss", new Date()),
status: 2
}
};
this.$post(`${this.api.collectPaper}?id=${row.id}`).then(res => {
if (res.status === 200) {
util.successMsg('提前结束成功!')
this.getData()
util.successMsg("提前结束成功!");
this.getData();
}
}).catch(err => {
console.log(err);
});
})
})
.catch(() => {})
.catch(() => {
});
},
delData(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
this.$post(this.api.deleteAssessment, [row.id]).then(res => {
util.successMsg('删除成功');
this.getData()
}).catch(res => {});
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
},
delAllData() {
if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(item => {
return item.projectId
})
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
return item.projectId;
});
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
this.$post(this.api.deleteAssessment, ids).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection()
util.successMsg('删除成功');
this.getData()
}).catch(res => {});
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
} else {
util.errorMsg('请先选择数据 !');
util.errorMsg("请先选择数据 !");
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
onSearch() {
this.pageNum = 1
this.getData()
this.pageNum = 1;
this.getData();
},
handleCurrentChange(val) {
this.pageNum = val;
this.getData();
},
transferTime(date,type){
if(date == '0000-00-00 00:00:00') return '---'
return date
transferTime(date) {
if (date == "0000-00-00 00:00:00") return "---";
return date;
}
}
};

@ -50,7 +50,7 @@
<quill :border="true" :readonly="isDetail" v-model="description" :height="400" />
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" v-throttle @click="save" v-show="!isDetail">{{ id ? '更新' : '创建' }}</el-button>
<el-button type="primary" size="small" v-throttle @click="save" v-show="!isDetail">{{ id ? "更新" : "创建" }}</el-button>
</el-form-item>
</el-form>
</el-card>
@ -58,35 +58,34 @@
</template>
<script>
import util from '@/libs/util'
import Setting from '@/setting'
import util from "@/libs/util";
import Setting from "@/setting";
import quill from '@/components/quill'
import quill from "@/components/quill";
export default {
name: 'courseAddEdit',
name: "courseAddEdit",
data() {
return {
headers: {
token: util.local.get(Setting.tokenKey)
},
schoolId: Setting.schoolId,
id: '',
id: this.$route.query.id,
isDetail: Boolean(this.$route.query.show),
username: this.$store.state.name,
classificationId: '',
coverUrl: '',
name: '',
classificationId: "",
coverUrl: "",
name: "",
classificationList: [],
uploadList: [],
description: '',
description: "",
submiting: false
};
},
mounted() {
this.id = this.$route.query.id
this.getClassification()
this.id && this.getData()
this.getClassification();
this.id && this.getData();
},
components: {
quill
@ -97,11 +96,11 @@ export default {
this.$router.back();
},
save() {
if (this.submiting) return false
if (!this.name) return util.warningMsg('请填写课程名称');
if (!this.classificationId) return util.warningMsg('请选择课程分类');
if (!this.coverUrl) return util.warningMsg('请上传课程封面');
this.submiting = true
if (this.submiting) return false;
if (!this.name) return util.warningMsg("请填写课程名称");
if (!this.classificationId) return util.warningMsg("请选择课程分类");
if (!this.coverUrl) return util.warningMsg("请上传课程封面");
this.submiting = true;
let data = {
id: this.id,
@ -114,53 +113,53 @@ export default {
founderId: this.userId,
founderName: this.username,
distinguish: 1
}
};
if (this.id) {
this.$put(this.api.editCourse, data).then(res => {
this.submiting = false
util.successMsg('修改成功');
this.$router.back()
this.submiting = false;
util.successMsg("修改成功");
this.$router.back();
})
.catch(err => {
this.submiting = false
this.submiting = false;
});
} else {
this.$post(this.api.addCourse, data).then(res => {
this.submiting = false
this.$confirm('课程创建成功,是否马上进行课程内容设置?', '提示', {
type: 'success',
confirmButtonText: '马上设置',
cancelButtonText: '稍后操作'
this.submiting = false;
this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", {
type: "success",
confirmButtonText: "马上设置",
cancelButtonText: "稍后操作"
})
.then(() => {
this.$router.push(`courseConfig?id=${res.data.courseId}`)
this.$router.push(`courseConfig?id=${res.data.courseId}`);
}).catch(() => {
this.$router.back()
this.$router.back();
});
})
.catch(err => {
this.submiting = false
this.submiting = false;
});
}
},
getClassification() {
this.$get(this.api.queryGlClassification).then(res => {
this.classificationList = res.classificationList
this.classificationList = res.classificationList;
}).catch(res => {
});
},
getData() {
this.$get(`${this.api.getCourse}/${this.id}`)
.then(res => {
let data = res.course
this.name = data.name
this.classificationId = data.classificationId
this.description = data.description
this.coverUrl = data.coverUrl
let data = res.course;
this.name = data.name;
this.classificationId = data.classificationId;
this.description = data.description;
this.coverUrl = data.coverUrl;
this.uploadList.push({
name: 'cover.jpg',
name: "cover.jpg",
url: this.coverUrl
})
});
})
.catch(err => {
@ -168,10 +167,10 @@ export default {
},
//
handleExceed(files, fileList) {
util.warningMsg('当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!');
util.warningMsg("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!");
},
uploadSuccess(res, file, fileList) {
this.coverUrl = res.filesResult.fileUrl
this.coverUrl = res.filesResult.fileUrl;
// this.uploadList.push({ name: file.name, url: response.message.fileUrl });
},
uploadError(err, file, fileList) {
@ -185,28 +184,28 @@ export default {
return this.$confirm(`确定移除 ${file.name}`);
},
handleRemove(file, fileList) {
let fileName = this.coverUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/', '')
let fileName = this.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
this.coverUrl = ''
this.coverUrl = "";
}).catch(res => {
})
});
},
uploadSure() {
this.importVisible = false
this.pageNo = 1
this.staffGradeId = ''
this.keyword = ''
this.getTeacher()
this.importVisible = false;
this.pageNo = 1;
this.staffGradeId = "";
this.keyword = "";
this.getTeacher();
},
goback() {
if (this.isDetail) {
this.$router.back()
this.$router.back();
} else {
this.$confirm('确定返回?未更新的信息将不会保存。', '提示', {
type: 'warning'
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", {
type: "warning"
})
.then(() => {
this.$router.back()
this.$router.back();
})
.catch(() => {
});

@ -181,41 +181,41 @@
</template>
<script>
import util from '@/libs/util'
import Setting from '@/setting'
import { Loading } from 'element-ui';
import pdf from '@/components/pdf'
import util from "@/libs/util";
import Setting from "@/setting";
import { Loading } from "element-ui";
import pdf from "@/components/pdf";
export default {
name: 'contentSettings',
name: "contentSettings",
data() {
return {
headers: {
token: util.local.get(Setting.tokenKey)
},
id: '',
id: "",
userId: this.$store.state.userLoginId,
chapters: [],
sorting: false,
uploading: false,
uploadList: [],
chapterVisible: false,
chapterId: '',
chapterName: '',
chapterId: "",
chapterName: "",
sectionVisible: false,
sectionName: '',
sectionId: '',
sectionName: "",
sectionId: "",
switchVisible: false,
sectionNameVisible: false,
fileId: '',
fileName: '',
fileUrl: '',
originalFileName: '',
fileType: '',
playAuth: '',
fileId: "",
fileName: "",
fileUrl: "",
originalFileName: "",
fileType: "",
playAuth: "",
player: null,
previewImg: '',
iframeSrc: '',
previewImg: "",
iframeSrc: "",
curFile: {},
isAddSection: false,
isWord: false,
@ -226,15 +226,15 @@ export default {
showMask2: false,
loadIns: null,
pdfVisible: false,
pdfSrc: '',
pdfSrc: "",
previewing: false
}
};
},
components: { pdf },
mounted() {
this.insertScript()
this.id = this.$route.query.id
this.id && this.getData()
this.insertScript();
this.id = this.$route.query.id;
this.id && this.getData();
//
if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL);
@ -248,7 +248,7 @@ export default {
getData() {
this.$get(`${this.api.queryChaptersAndSubsections}/${this.id}`)
.then(res => {
this.chapters = res.chapterList
this.chapters = res.chapterList;
})
.catch(err => {
@ -256,53 +256,53 @@ export default {
},
goBack() {
if (this.previewing) {
this.closeIframe()
this.closeIframe();
} else {
history.back()
history.back();
}
},
iframeOnload() {
document.querySelector('#fileIframe').onload = e => {
document.querySelector("#fileIframe").onload = e => {
if (this.isPPT) {
this.showMask = true
this.showMask = true;
} else {
this.showMask = false
this.showMask = false;
}
if (this.isWord) {
this.showMask1 = true
this.showMask1 = true;
} else {
this.showMask1 = false
this.showMask1 = false;
}
if (this.isExcel) {
this.showMask2 = true
this.showMask2 = true;
} else {
this.showMask2 = false
}
this.loadIns.close()
this.showMask2 = false;
}
this.loadIns.close();
};
},
insertScript() {
const linkTag = document.createElement('link');
linkTag.rel = 'stylesheet';
linkTag.href = 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css';
const linkTag = document.createElement("link");
linkTag.rel = "stylesheet";
linkTag.href = "https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css";
document.body.appendChild(linkTag);
const scriptTag = document.createElement('script');
scriptTag.type = 'text/javascript';
scriptTag.src = 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js';
const scriptTag = document.createElement("script");
scriptTag.type = "text/javascript";
scriptTag.src = "https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js";
document.body.appendChild(scriptTag);
},
//
beforeUpload(file) {
let type = this.transferType(file.name.substring(file.name.lastIndexOf('.') + 1))
if (type != '视频' && type != '图片' && type != 'pdf' && (file.size / 1024 / 1024) > 10) {
util.errorMsg('请上传10M以内的文件')
return false
let type = this.transferType(file.name.substring(file.name.lastIndexOf(".") + 1));
if (type != "视频" && type != "图片" && type != "pdf" && (file.size / 1024 / 1024) > 10) {
util.errorMsg("请上传10M以内的文件");
return false;
}
this.uploading = true
this.originalFileName = file.name
if (this.isAddSection) this.sectionName = file.name.substring(0, file.name.lastIndexOf("."))
this.fileType = file.name.substring(file.name.lastIndexOf('.') + 1)
this.uploading = true;
this.originalFileName = file.name;
if (this.isAddSection) this.sectionName = file.name.substring(0, file.name.lastIndexOf("."));
this.fileType = file.name.substring(file.name.lastIndexOf(".") + 1);
},
handleExceed(files, fileList) {
util.warningMsg(
@ -310,11 +310,11 @@ export default {
);
},
uploadSuccess(res, file, fileList) {
this.uploading = false
this.fileId = res.filesResult.fileId
this.fileType = res.filesResult.fileType
this.fileUrl = res.filesResult.fileUrl
this.fileName = res.filesResult.ossFileName
this.uploading = false;
this.fileId = res.filesResult.fileId;
this.fileType = res.filesResult.fileType;
this.fileUrl = res.filesResult.fileUrl;
this.fileName = res.filesResult.ossFileName;
},
uploadError(err, file, fileList) {
this.$message({
@ -329,63 +329,63 @@ export default {
}
},
handleRemove(file, fileList) {
this.uploadList = fileList
this.uploadList = fileList;
},
uploadSure() {
this.importVisible = false
this.pageNo = 1
this.staffGradeId = ''
this.keyword = ''
this.getTeacher()
this.importVisible = false;
this.pageNo = 1;
this.staffGradeId = "";
this.keyword = "";
this.getTeacher();
},
goback() {
this.$router.push('course')
this.$router.push("course");
},
transferType(ext) {
if ('jpg,jpeg,png,gif,svg,psd'.includes(ext)) return '图片'
if ('mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv'.includes(ext)) return '视频'
return ext
if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return "图片";
if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return "视频";
return ext;
},
addChapter() {
this.chapterName = ''
this.chapterId = ''
this.chapterVisible = true
this.chapterName = "";
this.chapterId = "";
this.chapterVisible = true;
},
sort() {
this.sorting = true
this.sorting = true;
},
cancelSort() {
this.sorting = false
this.sorting = false;
},
saveSort() {
this.chapters.forEach((n, k) => {
n.sort = k + 1
n.sort = k + 1;
n.subsectionList.forEach((j, i) => {
j.sort = i + 1
})
})
j.sort = i + 1;
});
});
let data = {
chapterVOList: this.chapters
}
};
this.$post(this.api.reorder, data).then(res => {
this.sorting = false
this.getData()
this.sorting = false;
this.getData();
}).catch(res => {
});
},
editChapter(item) {
this.chapterId = item.id
this.chapterName = item.name
this.chapterVisible = true
this.chapterId = item.id;
this.chapterName = item.name;
this.chapterVisible = true;
},
delChapter(id) {
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning'
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteChapter}/${id}`).then(res => {
util.successMsg('删除成功');
this.getData()
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
@ -393,46 +393,46 @@ export default {
});
},
closeSection() {
this.isAddSection = false
this.isAddSection = false;
},
addSection(id) {
this.chapterId = id
this.sectionName = ''
this.fileUrl = ''
this.uploadList = []
this.sectionId = ''
this.isAddSection = true
this.sectionVisible = true
this.chapterId = id;
this.sectionName = "";
this.fileUrl = "";
this.uploadList = [];
this.sectionId = "";
this.isAddSection = true;
this.sectionVisible = true;
},
chapterSubmit() {
if (!this.chapterName) return util.warningMsg('请填写章节名称')
if (!this.chapterName) return util.warningMsg("请填写章节名称");
let data = {
courseId: this.id,
name: this.chapterName
}
};
if (this.chapterId) {
data.id = this.chapterId
data.id = this.chapterId;
this.$put(this.api.editChapter, data).then(res => {
util.successMsg('修改成功');
this.chapterVisible = false
this.getData()
util.successMsg("修改成功");
this.chapterVisible = false;
this.getData();
})
.catch(err => {
});
} else {
this.$post(this.api.addChapter, data).then(res => {
util.successMsg('添加成功');
this.chapterVisible = false
this.getData()
util.successMsg("添加成功");
this.chapterVisible = false;
this.getData();
})
.catch(err => {
});
}
},
sectionSubmit() {
if (!this.sectionName) return util.warningMsg('请填写小节名称')
if (this.uploading) return util.warningMsg('资源正在上传中,请稍候')
if (!this.fileUrl && !this.fileId) return util.warningMsg('请上传资源')
if (!this.sectionName) return util.warningMsg("请填写小节名称");
if (this.uploading) return util.warningMsg("资源正在上传中,请稍候");
if (!this.fileUrl && !this.fileId) return util.warningMsg("请上传资源");
let data = {
id: this.sectionId,
courseId: this.id,
@ -443,95 +443,95 @@ export default {
fileName: this.fileName,
fileType: this.fileType,
originalFileName: this.originalFileName
}
};
this.$post(this.api.addSubsection, data).then(res => {
util.successMsg('添加成功');
this.sectionVisible = false
this.getData()
util.successMsg("添加成功");
this.sectionVisible = false;
this.getData();
})
.catch(err => {
});
},
closeSwitch() {
this.fileId = ''
this.fileName = ''
this.fileType = ''
this.fileUrl = ''
this.sectionId = ''
this.fileId = "";
this.fileName = "";
this.fileType = "";
this.fileUrl = "";
this.sectionId = "";
},
preview(row) {
if (this.transferType(row.fileType) == '视频') {
if (this.transferType(row.fileType) == "视频") {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.data.playAuth
this.playAuth = res.data.playAuth;
if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth)
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else {
this.player = new Aliplayer({
id: 'player',
width: '100%',
id: "player",
width: "100%",
autoplay: false,
vid: row.fileId,
playauth: this.playAuth,
encryptType: 1 //
})
});
}
}).catch(res => {
})
} else if (this.transferType(row.fileType) == '图片') {
this.previewImg = row.fileUrl
} else if (row.fileType == 'pdf') {
this.pdfSrc = row.fileUrl
this.pdfVisible = true
});
} else if (this.transferType(row.fileType) == "图片") {
this.previewImg = row.fileUrl;
} else if (row.fileType == "pdf") {
this.pdfSrc = row.fileUrl;
this.pdfVisible = true;
} else {
this.$get(`${this.api.getSubsection}/${row.id}`).then(res => {
this.previewing = true
this.loadIns = Loading.service()
this.$route.fullPath.includes('#file') || history.pushState({ file: true }, '文件预览', '#' + this.$route.fullPath + '#file')
if (row.fileType == 'pptx') {
this.isPPT = true
this.isWord = false
this.isExcel = false
} else if (row.fileType == 'doc' || row.fileType == 'docx') {
this.isPPT = false
this.isWord = true
this.isExcel = false
} else if (row.fileType == 'xls' || row.fileType == 'xlsx') {
this.isExcel = true
this.isPPT = false
this.isWord = false
this.previewing = true;
this.loadIns = Loading.service();
this.$route.fullPath.includes("#file") || history.pushState({ file: true }, "文件预览", "#" + this.$route.fullPath + "#file");
if (row.fileType == "pptx") {
this.isPPT = true;
this.isWord = false;
this.isExcel = false;
} else if (row.fileType == "doc" || row.fileType == "docx") {
this.isPPT = false;
this.isWord = true;
this.isExcel = false;
} else if (row.fileType == "xls" || row.fileType == "xlsx") {
this.isExcel = true;
this.isPPT = false;
this.isWord = false;
} else {
this.isPPT = false
this.isWord = false
this.isExcel = false
this.isPPT = false;
this.isWord = false;
this.isExcel = false;
}
this.iframeSrc = res.data.previewUrl
this.iframeSrc = res.data.previewUrl;
this.$nextTick(() => {
this.iframeOnload()
})
this.iframeOnload();
});
})
.catch(err => {
});
}
},
editSectionName(row, chapterId) {
this.chapterId = chapterId
this.sectionId = row.id
this.sectionName = row.name
this.sectionNameVisible = true
this.chapterId = chapterId;
this.sectionId = row.id;
this.sectionName = row.name;
this.sectionNameVisible = true;
},
switchFile(row, chapterId, sectionId) {
this.uploadList = []
this.uploadList = [];
this.curFile = {
fileId: row.fileId,
fileName: row.fileName,
fileType: row.fileType,
fileUrl: row.fileUrl
}
this.chapterId = chapterId
this.sectionId = row.id
this.sectionName = row.sectionName
};
this.chapterId = chapterId;
this.sectionId = row.id;
this.sectionName = row.sectionName;
this.switchVisible = true
this.switchVisible = true;
},
switchSubmitFile() {
let data = {
@ -544,41 +544,41 @@ export default {
fileType: this.fileType,
fileUrl: this.fileUrl,
originalFileName: this.originalFileName
}
};
this.$put(this.api.editSubsection, data).then(res => {
util.successMsg('更换成功');
this.switchVisible = false
this.getData()
util.successMsg("更换成功");
this.switchVisible = false;
this.getData();
})
.catch(err => {
});
},
switchSubmit() {
if (this.uploading) return util.warningMsg('资源正在上传中,请稍候')
if (!this.fileUrl && !this.fileId) return util.warningMsg('请上传资源')
if (this.transferType(this.curFile.fileType) == '视频') {
if (this.uploading) return util.warningMsg("资源正在上传中,请稍候");
if (!this.fileUrl && !this.fileId) return util.warningMsg("请上传资源");
if (this.transferType(this.curFile.fileType) == "视频") {
let data = {
videoIdList: [this.sectionId]
}
};
this.$del(`${this.api.removeVideo}/${this.curFile.fileId}`).then(res => {
this.switchSubmitFile()
this.switchSubmitFile();
}).catch(res => {
});
} else {
this.$del(`${this.api.fileDeletion}?keys=${this.curFile.fileName}`).then(res => {
this.switchSubmitFile()
this.switchSubmitFile();
}).catch(res => {
});
}
},
delSection(row) {
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning'
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteSubsection}/${row.id}`).then(res => {
util.successMsg('删除成功');
this.getData()
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
@ -587,58 +587,58 @@ export default {
},
sortChapter(row, type, disabled, index) {
if (!disabled) {
if (type == 'up') {
let tempItem = this.chapters.splice(index - 1, 1)[0]
this.chapters.splice(index, 0, tempItem)
if (type == "up") {
let tempItem = this.chapters.splice(index - 1, 1)[0];
this.chapters.splice(index, 0, tempItem);
} else {
let tempItem = this.chapters.splice(index + 1, 1)[0]
this.chapters.splice(index, 0, tempItem)
let tempItem = this.chapters.splice(index + 1, 1)[0];
this.chapters.splice(index, 0, tempItem);
}
}
},
sortSection(chapterIndex, type, disabled, index) {
if (!disabled) {
let list = this.chapters[chapterIndex].subsectionList
if (type == 'up') {
let tempItem = list.splice(index - 1, 1)[0]
list.splice(index, 0, tempItem)
let list = this.chapters[chapterIndex].subsectionList;
if (type == "up") {
let tempItem = list.splice(index - 1, 1)[0];
list.splice(index, 0, tempItem);
} else {
let tempItem = list.splice(index + 1, 1)[0]
list.splice(index, 0, tempItem)
let tempItem = list.splice(index + 1, 1)[0];
list.splice(index, 0, tempItem);
}
this.chapters[chapterIndex].subsectionList = list
this.chapters[chapterIndex].subsectionList = list;
}
},
sectionNameSubmit() {
if (!this.sectionName) return util.warningMsg('请填写小节名称')
if (!this.sectionName) return util.warningMsg("请填写小节名称");
let data = {
id: this.sectionId,
courseId: this.id,
chapterId: this.chapterId,
name: this.sectionName
}
};
this.$put(this.api.editSubsection, data).then(res => {
util.successMsg('修改成功');
this.sectionNameVisible = false
this.getData()
util.successMsg("修改成功");
this.sectionNameVisible = false;
this.getData();
})
.catch(err => {
});
},
closePlayer() {
this.playAuth = ''
this.player.pause()
this.playAuth = "";
this.player.pause();
},
closeIframe() {
this.iframeSrc = ''
this.showMask = false
this.showMask1 = false
this.showMask2 = false
this.previewing = false
}
this.iframeSrc = "";
this.showMask = false;
this.showMask1 = false;
this.showMask2 = false;
this.previewing = false;
}
}
};
</script>
<style scoped lang="scss">

@ -74,15 +74,15 @@
</template>
<script>
import util from '@/libs/util'
import util from "@/libs/util";
export default {
name: 'courseManagement',
name: "courseManagement",
data() {
return {
schoolId: this.$store.state.schoolId,
keyword: '',
classificationId: '',
keyword: "",
classificationId: "",
courseData: [],
multipleSelection: [],
classificationList: [],
@ -93,66 +93,66 @@ export default {
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
this.initData();
}, 500);
}
},
mounted() {
this.getClassification()
this.getData()
this.getClassification();
this.getData();
},
methods: {
getData() {
let data = {
classificationId: this.classificationId,
name: this.keyword
}
};
this.$get(`${this.api.queryCourseByCondition}/${this.current}/${this.pageSize}`, data).then(res => {
this.courseData = res.courseList
this.totals = res.total
this.courseData = res.courseList;
this.totals = res.total;
if (!this.courseData.length && this.totals) {
this.current--
this.getData()
this.current--;
this.getData();
}
}).catch(res => {
});
},
initData() {
this.current = 1
this.getData()
this.current = 1;
this.getData();
},
getClassification() {
this.$get(this.api.queryGlClassification).then(res => {
this.classificationList = res.classificationList
this.classificationList = res.classificationList;
}).catch(res => {
});
},
changeType(type) {
this.classificationId = type
this.initData()
this.classificationId = type;
this.initData();
},
preview(row) {
this.$router.push(`/course/preview?id=${row.id}`)
this.$router.push(`/course/preview?id=${row.id}`);
},
config(row) {
this.$router.push(`/course/contentSettings?id=${row.id}`)
this.$router.push(`/course/contentSettings?id=${row.id}`);
},
addCourse() {
this.$router.push('/course/add')
this.$router.push("/course/add");
},
editCourse(row) {
this.$router.push(`/course/add?id=${row.id}`)
this.$router.push(`/course/add?id=${row.id}`);
},
handleDelete(row) {
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning'
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteCourse}/${row.id}`).then(res => {
util.successMsg('删除成功');
this.initData()
util.successMsg("删除成功");
this.initData();
}).catch(res => {
});
})
@ -166,29 +166,29 @@ export default {
this.multipleSelection = val;
},
delAllData() {
if (this.multipleSelection.length != '') {
let newArr = this.multipleSelection
if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection;
let delList = newArr.map(item => {
return item.id
})
this.$confirm(`此批量删除操作不可逆,是否确认删除${newArr[0].name}${newArr.length}个选中项?`, '提示', {
type: 'warning'
return item.id;
});
this.$confirm(`此批量删除操作不可逆,是否确认删除${newArr[0].name}${newArr.length}个选中项?`, "提示", {
type: "warning"
})
.then(() => {
let data = {
courseIds: delList.join()
}
};
this.$del(this.api.deleteCourses, data).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection()
util.successMsg('删除成功');
this.initData()
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.initData();
}).catch(res => {
});
}).catch(() => {
});
} else {
util.errorMsg('请先选择数据 !');
util.errorMsg("请先选择数据 !");
}
},
handleCurrentChange(val) {
@ -198,14 +198,14 @@ export default {
switchOff(val, row, index) {
this.$put(`${this.api.enableCourse}?courseId=${row.id}&isEnable=${val}`)
.then(res => {
this.getData()
val == 1 ? util.warningMsg('该教学资源已隐藏,对学生端用户不可见') : util.successMsg('该教学资源已公开,对学生端用户可见')
this.getData();
val == 1 ? util.warningMsg("该教学资源已隐藏,对学生端用户不可见") : util.successMsg("该教学资源已公开,对学生端用户可见");
})
.catch(err => {
});
}
}
}
};
</script>
<style lang="scss" scoped>

@ -72,28 +72,28 @@
</template>
<script>
import util from '@/libs/util'
import { mapState } from 'vuex';
import util from "@/libs/util";
import { mapState } from "vuex";
import pdf from "vue-pdf";
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css';
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
export default {
name: 'coursePreview',
name: "coursePreview",
data() {
return {
id: this.$route.query.id,
video: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4',
videoSrc: '',
video: "http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4",
videoSrc: "",
videoList: [],
courseName: '',
description: '',
coverUrl: '',
playAuth: '',
courseName: "",
description: "",
coverUrl: "",
playAuth: "",
player: null,
previewImg: '',
iframeSrc: '',
previewImg: "",
iframeSrc: "",
isWord: false,
isPPT: false,
isExcel: false,
@ -101,149 +101,149 @@ export default {
showMask1: false,
showMask2: false,
closePosi: {
top: '80px'
top: "80px"
},
pdfVisible: false,
pdfSrc: '',
pdfSrc: "",
currentPage: 0, // pdf
pageCount: 0, // pdf
fileType: 'pdf', //
fileType: "pdf", //
desShrink: false
}
};
},
components: { pdf },
mounted() {
this.insertScript()
this.getData()
this.getChapter()
this.insertScript();
this.getData();
this.getChapter();
},
methods: {
goBack() {
this.$router.back();
},
async getData() {
let res = await this.$get(`${this.api.getCourse}/${this.id}`)
this.courseName = res.course.name
this.description = res.course.description
this.coverUrl = res.course.coverUrl
let res = await this.$get(`${this.api.getCourse}/${this.id}`);
this.courseName = res.course.name;
this.description = res.course.description;
this.coverUrl = res.course.coverUrl;
},
async getChapter() {
let res = await this.$get(`${this.api.queryChaptersAndSubsections}/${this.id}`)
this.videoList = res.chapterList
let res = await this.$get(`${this.api.queryChaptersAndSubsections}/${this.id}`);
this.videoList = res.chapterList;
},
insertScript() {
const linkTag = document.createElement('link');
linkTag.rel = 'stylesheet';
linkTag.href = 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css';
const linkTag = document.createElement("link");
linkTag.rel = "stylesheet";
linkTag.href = "https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css";
document.body.appendChild(linkTag);
const scriptTag = document.createElement('script');
scriptTag.type = 'text/javascript';
scriptTag.src = 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js';
const scriptTag = document.createElement("script");
scriptTag.type = "text/javascript";
scriptTag.src = "https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js";
document.body.appendChild(scriptTag);
},
transferType(ext) {
if ('jpg,jpeg,png,gif,svg,psd'.includes(ext)) return '图片'
if ('mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv'.includes(ext)) return '视频'
return ext
if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return "图片";
if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return "视频";
return ext;
},
preview(row) {
this.player = null
this.playauth = ''
this.coverUrl = ''
this.pdfSrc = ''
this.iframeSrc = ''
if (this.transferType(row.fileType) == '视频') {
this.player = null;
this.playauth = "";
this.coverUrl = "";
this.pdfSrc = "";
this.iframeSrc = "";
if (this.transferType(row.fileType) == "视频") {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.playAuth
this.playAuth = res.playAuth;
this.$nextTick(() => {
if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth)
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else {
this.player = new Aliplayer({
id: 'player',
width: '100%',
id: "player",
width: "100%",
autoplay: false,
vid: row.fileId,
playauth: this.playAuth,
encryptType: 1 //
})
});
}
})
});
}).catch(res => {
})
} else if (this.transferType(row.fileType) == '图片') {
this.coverUrl = row.fileUrl
} else if (row.fileType == 'pdf') {
this.pdfSrc = row.fileUrl
this.pdfVisible = true
});
} else if (this.transferType(row.fileType) == "图片") {
this.coverUrl = row.fileUrl;
} else if (row.fileType == "pdf") {
this.pdfSrc = row.fileUrl;
this.pdfVisible = true;
} else {
this.$get(`${this.api.getSubsection}/${row.id}`).then(res => {
if (row.fileType == 'pptx') {
this.isPPT = true
this.isWord = false
this.isExcel = false
} else if (row.fileType == 'doc' || row.fileType == 'docx') {
this.isPPT = false
this.isWord = true
this.isExcel = false
} else if (row.fileType == 'xls' || row.fileType == 'xlsx') {
this.isExcel = true
this.isPPT = false
this.isWord = false
if (row.fileType == "pptx") {
this.isPPT = true;
this.isWord = false;
this.isExcel = false;
} else if (row.fileType == "doc" || row.fileType == "docx") {
this.isPPT = false;
this.isWord = true;
this.isExcel = false;
} else if (row.fileType == "xls" || row.fileType == "xlsx") {
this.isExcel = true;
this.isPPT = false;
this.isWord = false;
} else {
this.isPPT = false
this.isWord = false
this.isExcel = false
this.isPPT = false;
this.isWord = false;
this.isExcel = false;
}
if (this.isPPT) {
this.showMask = true
this.showMask = true;
} else {
this.showMask = false
this.showMask = false;
}
if (this.isWord) {
this.showMask1 = true
this.showMask1 = true;
} else {
this.showMask1 = false
this.showMask1 = false;
}
if (this.isExcel) {
this.showMask2 = true
this.showMask2 = true;
} else {
this.showMask2 = false
this.showMask2 = false;
}
this.iframeSrc = res.previewUrl
this.iframeSrc = res.previewUrl;
})
.catch(err => {
});
}
},
closePlayer() {
this.playAuth = ''
this.player.pause()
this.playAuth = "";
this.player.pause();
},
closeIframe() {
this.iframeSrc = ''
this.showMask = false
this.showMask1 = false
this.iframeSrc = "";
this.showMask = false;
this.showMask1 = false;
},
closePdf() {
this.pdfSrc = ''
this.currentPage = 1
this.pdfSrc = "";
this.currentPage = 1;
},
changePdfPage(val) {
if (val === 0 && this.currentPage > 1) {
this.currentPage--
this.currentPage--;
}
if (val === 1 && this.currentPage < this.pageCount) {
this.currentPage++
this.currentPage++;
}
},
loadPdfHandler(e) {
this.currentPage = 1
}
this.currentPage = 1;
}
}
};
</script>
<style lang="scss" scoped>

@ -14,30 +14,30 @@
</template>
<script>
import Setting from '@/setting';
import { mapState } from 'vuex'
import Setting from "@/setting";
import { mapState } from "vuex";
import CourseManagement from "./courseManagement";
import SortManagement from "./sortManagement";
export default {
name: 'course',
name: "course",
components: {
CourseManagement,
SortManagement
},
data() {
return {
active: 'first', //
active: "first", //
tabs: {
first: '课程管理',
second: '分类管理'
first: "课程管理",
second: "分类管理"
},
showTabs: true
}
};
},
computed: {
...mapState('auth', [
'routes'
...mapState("auth", [
"routes"
])
},
methods: {
@ -46,19 +46,19 @@ export default {
},
initTabs() {
let btnPermissions = this.routes;
let showStaff = btnPermissions.includes('课程资源管理:课程管理');
let showRole = btnPermissions.includes('课程资源管理:分类管理');
let showStaff = btnPermissions.includes("课程资源管理:课程管理");
let showRole = btnPermissions.includes("课程资源管理:分类管理");
if (!showStaff || !showRole) {
this.showTabs = false;
}
!showStaff && showRole && (this.active = 'second')
!showStaff && showRole && (this.active = "second");
}
},
mounted() {
Setting.dynamicRoute && this.initTabs()
}
Setting.dynamicRoute && this.initTabs();
}
};
</script>
<style lang="scss" scoped>

@ -41,10 +41,10 @@
</template>
<script>
import util from '@/libs/util'
import util from "@/libs/util";
export default {
name: 'sortManagement',
name: "sortManagement",
data() {
return {
classificationList: [],
@ -54,33 +54,33 @@ export default {
isAddclass: true,
classVisible: false,
curRow: {},
className: ''
}
className: ""
};
},
mounted() {
this.getData()
this.getData();
},
methods: {
getData() {
this.$get(this.api.queryGlClassification).then(res => {
this.classificationList = res.classificationList
this.classificationList = res.classificationList;
}).catch(res => {
});
},
addCourse() {
this.$router.push('/addcourse')
this.$router.push("/addcourse");
},
editCourse(row) {
this.$router.push(`/addcourse?id=${row.id}`)
this.$router.push(`/addcourse?id=${row.id}`);
},
handleDelete(row) {
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning'
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteClassification}/${row.id}`).then(res => {
util.successMsg('删除成功');
this.getData()
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
@ -94,31 +94,31 @@ export default {
this.multipleSelection = val;
},
closeColumn() {
this.className = ''
this.curRow = {}
this.className = "";
this.curRow = {};
},
delAllData() {
if (this.multipleSelection.length != '') {
let newArr = this.multipleSelection
if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection;
let delList = newArr.map(item => {
return item.id
})
return item.id;
});
//
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning'
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
let data = delList.join()
let data = delList.join();
this.$del(this.api.deleteClassification, data).then(res => {
this.multipleSelection = [];
util.successMsg('删除成功');
this.getData()
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => {
});
} else {
util.errorMsg('请先选择数据 !');
util.errorMsg("请先选择数据 !");
}
},
handleCurrentChange(val) {
@ -126,39 +126,39 @@ export default {
this.getData();
},
addClass() {
this.isAddClass = true
this.classVisible = true
this.isAddClass = true;
this.classVisible = true;
},
editClass(row) {
this.curRow = row
this.className = row.name
this.isAddClass = false
this.classVisible = true
this.curRow = row;
this.className = row.name;
this.isAddClass = false;
this.classVisible = true;
},
classSubmit() {
if (!this.className) return util.warningMsg('请填写分类名称')
if (!this.className) return util.warningMsg("请填写分类名称");
let data = {
name: this.className
}
};
if (this.curRow.id) {
data.id = this.curRow.id
data.id = this.curRow.id;
this.$put(this.api.editClassification, data).then(res => {
util.successMsg('修改成功');
this.classVisible = false
this.getData()
util.successMsg("修改成功");
this.classVisible = false;
this.getData();
}).catch(res => {
});
} else {
this.$post(`${this.api.addClassification}/${this.className}?distinguish=1`).then(res => {
util.successMsg('添加成功');
this.classVisible = false
this.getData()
util.successMsg("添加成功");
this.classVisible = false;
this.getData();
}).catch(res => {
});
}
}
}
}
};
</script>
<style lang="scss" scoped>

@ -1,309 +1,309 @@
<template>
<div class='page'>
<h6 class='p-title'>筛选</h6>
<div class='tool'>
<ul class='filter'>
<div class="page">
<h6 class="p-title">筛选</h6>
<div class="tool">
<ul class="filter">
<li>
<label>题目类型</label>
<el-radio-group v-model='subject' @change='initData'>
<el-radio-group v-model="subject" @change="initData">
<el-radio
v-for='(item,index) in subjectList'
:key='index'
:label='item.id'
v-for="(item,index) in subjectList"
:key="index"
:label="item.id"
>{{ item.name }}
</el-radio>
</el-radio-group>
</li>
<li>
<el-input size='small' placeholder='请输入题干' prefix-icon='el-icon-search' v-model='keyword'
<el-input size="small" placeholder="请输入题干" prefix-icon="el-icon-search" v-model="keyword"
clearable></el-input>
</li>
</ul>
<div>
<el-button type='primary' size='small' @click='getInfo' v-auth>测评设置</el-button>
<el-button type='primary' size='small' @click='addTopics' v-auth>新增题目</el-button>
<el-button type='primary' size='small' @click='showBatchUpload' v-auth>批量上传</el-button>
<el-button type='primary' size='small' @click='delAllData' v-auth>批量删除</el-button>
<el-button type="primary" size="small" @click="getInfo" v-auth>测评设置</el-button>
<el-button type="primary" size="small" @click="addTopics" v-auth>新增题目</el-button>
<el-button type="primary" size="small" @click="showBatchUpload" v-auth>批量上传</el-button>
<el-button type="primary" size="small" @click="delAllData" v-auth>批量删除</el-button>
</div>
</div>
<el-table :data='listData' ref='table' row-key='id' class='table' stripe header-align='center'
@selection-change='handleSelectionChange'>
<el-table-column type='selection' width='55' align='center' :reserve-selection='true'></el-table-column>
<el-table-column type='index' width='100' label='序号' align='center'>
<el-table :data="listData" ref="table" row-key="id" class="table" stripe header-align="center"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<template
slot-scope='scope'
slot-scope="scope"
>{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop='questionStem' label='题干' align='center'></el-table-column>
<el-table-column prop='questionType' label='题型' align='center'>
<el-table-column prop="questionStem" label="题干" align="center"></el-table-column>
<el-table-column prop="questionType" label="题型" align="center">
<template slot-scope="scope">
<span>{{ questionType[scope.row.questionType] }}</span>
</template>
</el-table-column>
<el-table-column prop='updateTime' label='时间' align='center'></el-table-column>
<el-table-column label='操作' align='center'>
<template slot-scope='scope'>
<template v-if='scope.row.isEnable'>
<el-button type='text' @click='showQues(scope.row)' v-auth>查看</el-button>
<el-table-column prop="updateTime" label="时间" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<template v-if="scope.row.isEnable">
<el-button type="text" @click="showQues(scope.row)" v-auth>查看</el-button>
</template>
<template v-else>
<el-button type='text' @click='editQues(scope.row)' v-auth>修改</el-button>
<el-button type="text" @click="editQues(scope.row)" v-auth>修改</el-button>
</template>
<el-switch
v-model='scope.row.isEnable'
v-model="scope.row.isEnable"
:active-text="scope.row.isEnable ? '关闭' : '启用'"
:active-value='1'
:inactive-value='0'
style='margin: 0 10px 0 5px'
@change='switchQues($event,scope.row,scope.$index)'
:active-value="1"
:inactive-value="0"
style="margin: 0 10px 0 5px"
@change="switchQues($event,scope.row,scope.$index)"
v-auth="'evaluation:禁用'"
></el-switch>
<el-button type='text' @click='delData(scope.row)' v-auth>删除</el-button>
<el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
</template>
</el-table-column>
</el-table>
<div class='pagination'>
<el-pagination background @current-change='handleCurrentChange' :current-page='page' :page-size='pageSize'
layout='total,prev, pager, next' :total='total'></el-pagination>
<div class="pagination">
<el-pagination background @current-change="handleCurrentChange" :current-page="page" :page-size="pageSize"
layout="total,prev, pager, next" :total="total"></el-pagination>
</div>
<el-dialog title='测评设置' :visible.sync='SetEvaluation' width='30%' :close-on-click-modal='false'>
<div style='margin-bottom: 15px;'>
<span class='radio'>题目选择</span>
<el-radio v-model='info.evaluationType' label='1'>随机</el-radio>
<el-radio v-model='info.evaluationType' label='0'>自定义</el-radio>
<el-dialog title="测评设置" :visible.sync="SetEvaluation" width="30%" :close-on-click-modal="false">
<div style="margin-bottom: 15px;">
<span class="radio">题目选择</span>
<el-radio v-model="info.evaluationType" label="1">随机</el-radio>
<el-radio v-model="info.evaluationType" label="0">自定义</el-radio>
</div>
<!-- 随机 -->
<el-card shadow='hover' class='card_m' v-show='info.evaluationType==1'>
<div class='input flex_around'>
<el-card shadow="hover" class="card_m" v-show="info.evaluationType==1">
<div class="input flex_around">
<span>测评题目总数</span>
<el-input placeholder='请输入题目数量' type='number' v-model='info.questionNum'></el-input>
<el-input placeholder="请输入题目数量" type="number" v-model="info.questionNum"></el-input>
<span>(总数{{ info.totalQuestionNum }})</span>
</div>
</el-card>
<!-- 自定义 -->
<el-card shadow='hover' class='card_m' v-show='info.evaluationType==0'>
<div class='input'>
<div class='check-wrap' :class='{checked: info.isSingleEnable}'>
<el-checkbox v-model='info.isSingleEnable'>单选题</el-checkbox>
<el-input placeholder='请输入题目数量' type='number' v-model='info.singleNum'
:disabled='!info.isSingleEnable'></el-input>
<el-card shadow="hover" class="card_m" v-show="info.evaluationType==0">
<div class="input">
<div class="check-wrap" :class="{checked: info.isSingleEnable}">
<el-checkbox v-model="info.isSingleEnable">单选题</el-checkbox>
<el-input placeholder="请输入题目数量" type="number" v-model="info.singleNum"
:disabled="!info.isSingleEnable"></el-input>
<span>(总数{{ info.totalSingleNum }})</span>
</div>
<div class='check-wrap' :class='{checked: info.isMultipleEnable}'>
<el-checkbox v-model='info.isMultipleEnable'>多选题</el-checkbox>
<el-input placeholder='请输入题目数量' type='number' v-model='info.multipleNum'
:disabled='!info.isMultipleEnable'></el-input>
<div class="check-wrap" :class="{checked: info.isMultipleEnable}">
<el-checkbox v-model="info.isMultipleEnable">多选题</el-checkbox>
<el-input placeholder="请输入题目数量" type="number" v-model="info.multipleNum"
:disabled="!info.isMultipleEnable"></el-input>
<span>(总数{{ info.totalMultipleNum }})</span>
</div>
<div class='check-wrap' :class='{checked: info.isJudgmentEnable}'>
<el-checkbox v-model='info.isJudgmentEnable'>判断题</el-checkbox>
<el-input placeholder='请输入题目数量' type='number' v-model='info.judgmentNum'
:disabled='!info.isJudgmentEnable'></el-input>
<div class="check-wrap" :class="{checked: info.isJudgmentEnable}">
<el-checkbox v-model="info.isJudgmentEnable">判断题</el-checkbox>
<el-input placeholder="请输入题目数量" type="number" v-model="info.judgmentNum"
:disabled="!info.isJudgmentEnable"></el-input>
<span>(总数{{ info.totalJudgmentNum }})</span>
</div>
</div>
</el-card>
<div class='jobNumber'>
<div class='input'>
<span style='margin:0px 15px 0px 35px'>测评时长</span>
<el-input placeholder='请输入时间' type='number' v-model='info.duration'></el-input>
<span style='margin-left:15px'>分钟</span>
<div class="jobNumber">
<div class="input">
<span style="margin:0px 15px 0px 35px">测评时长</span>
<el-input placeholder="请输入时间" type="number" v-model="info.duration"></el-input>
<span style="margin-left:15px">分钟</span>
</div>
</div>
<span slot='footer' class='dialog-footer'>
<el-button size='small' @click='SetEvaluation = false'> </el-button>
<el-button size='small' type='primary' @click='submitSetEva'> </el-button>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="SetEvaluation = false"> </el-button>
<el-button size="small" type="primary" @click="submitSetEva"> </el-button>
</span>
</el-dialog>
<el-dialog :title='topicsTitle' :visible.sync='NewTopics' width='30%' @close='closeTopics'
:close-on-click-modal='false'>
<el-dialog :title="topicsTitle" :visible.sync="NewTopics" width="30%" @close="closeTopics"
:close-on-click-modal="false">
<el-form
:model='topicForm'
:rules='rules'
:disabled='isShowTopics'
ref='topicForm'
label-width='70px'
class='demo-topicForm'
:model="topicForm"
:rules="rules"
:disabled="isShowTopics"
ref="topicForm"
label-width="70px"
class="demo-topicForm"
>
<el-form-item label='题型' prop='questionType'>
<el-radio-group v-model='topicForm.questionType' @change='questionTypeChange'>
<el-radio label='单选题'></el-radio>
<el-radio label='多选题'></el-radio>
<el-radio label='判断题'></el-radio>
<el-form-item label="题型" prop="questionType">
<el-radio-group v-model="topicForm.questionType" @change="questionTypeChange">
<el-radio label="单选题"></el-radio>
<el-radio label="多选题"></el-radio>
<el-radio label="判断题"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label='题干' prop='questionStem'>
<el-input type='textarea' v-model='topicForm.questionStem'></el-input>
<el-form-item label="题干" prop="questionStem">
<el-input type="textarea" v-model="topicForm.questionStem"></el-input>
</el-form-item>
<el-form-item label='选项' prop='optionA'>
<div class='input flex_around bt'>
<el-form-item label="选项" prop="optionA">
<div class="input flex_around bt">
<span>A</span>
<el-input placeholder='请输入题目' v-model='topicForm.optionA'></el-input>
<el-checkbox v-model='topicForm.aisTrue'>设为正确答案</el-checkbox>
<el-input placeholder="请输入题目" v-model="topicForm.optionA"></el-input>
<el-checkbox v-model="topicForm.aisTrue">设为正确答案</el-checkbox>
</div>
<div class='input flex_around bt'>
<div class="input flex_around bt">
<span>B</span>
<el-input placeholder='请输入题目' v-model='topicForm.optionB'></el-input>
<el-checkbox v-model='topicForm.bisTrue'>设为正确答案</el-checkbox>
<el-input placeholder="请输入题目" v-model="topicForm.optionB"></el-input>
<el-checkbox v-model="topicForm.bisTrue">设为正确答案</el-checkbox>
</div>
<template v-if="topicForm.questionType != '判断题'">
<div class='input flex_around bt'>
<div class="input flex_around bt">
<span>C</span>
<el-input placeholder='请输入题目' v-model='topicForm.optionC'></el-input>
<el-checkbox v-model='topicForm.cisTrue'>设为正确答案</el-checkbox>
<el-input placeholder="请输入题目" v-model="topicForm.optionC"></el-input>
<el-checkbox v-model="topicForm.cisTrue">设为正确答案</el-checkbox>
</div>
<div class='input flex_around bt'>
<div class="input flex_around bt">
<span>D</span>
<el-input placeholder='请输入题目' v-model='topicForm.optionD'></el-input>
<el-checkbox v-model='topicForm.disTrue'>设为正确答案</el-checkbox>
<el-input placeholder="请输入题目" v-model="topicForm.optionD"></el-input>
<el-checkbox v-model="topicForm.disTrue">设为正确答案</el-checkbox>
</div>
<div class='input flex_around bt'>
<div class="input flex_around bt">
<span>E</span>
<el-input placeholder='请输入题目' v-model='topicForm.optionE'></el-input>
<el-checkbox v-model='topicForm.eisTrue'>设为正确答案</el-checkbox>
<el-input placeholder="请输入题目" v-model="topicForm.optionE"></el-input>
<el-checkbox v-model="topicForm.eisTrue">设为正确答案</el-checkbox>
</div>
<div class='input flex_around'>
<div class="input flex_around">
<span>F</span>
<el-input placeholder='请输入题目' v-model='topicForm.optionF'></el-input>
<el-checkbox v-model='topicForm.fisTrue'>设为正确答案</el-checkbox>
<el-input placeholder="请输入题目" v-model="topicForm.optionF"></el-input>
<el-checkbox v-model="topicForm.fisTrue">设为正确答案</el-checkbox>
</div>
</template>
</el-form-item>
<el-form-item label='答案解析' prop='answerAnalysis'>
<el-input type='textarea' v-model='topicForm.answerAnalysis'></el-input>
<el-form-item label="答案解析" prop="answerAnalysis">
<el-input type="textarea" v-model="topicForm.answerAnalysis"></el-input>
</el-form-item>
</el-form>
<div slot='footer' class='dialog-footer' v-show='!isShowTopics'>
<el-button size='small' @click='NewTopics = false'> </el-button>
<el-button size='small' type='primary' @click='saveTopics'> </el-button>
<div slot="footer" class="dialog-footer" v-show="!isShowTopics">
<el-button size="small" @click="NewTopics = false"> </el-button>
<el-button size="small" type="primary" @click="saveTopics"> </el-button>
</div>
</el-dialog>
<el-dialog title='批量上传' :visible.sync='BatchUpload' width='30%' @close='closeUpload'
:close-on-click-modal='false'>
<el-card shadow='hover' class='card_m' v-show='this.label=1'>
<div class='Upload'>
<div class='bt' @click='downloadTem'>
<el-link :underline='false'>
<el-dialog title="批量上传" :visible.sync="BatchUpload" width="30%" @close="closeUpload"
:close-on-click-modal="false">
<el-card shadow="hover" class="card_m" v-show="this.label=1">
<div class="Upload">
<div class="bt" @click="downloadTem">
<el-link :underline="false">
1.请下载模板
<i class='el-icon-download'></i>
<i class="el-icon-download"></i>
</el-link>
</div>
<div>
<el-upload
accept='.xls,.xlsx'
:on-remove='handleDataRemove'
:on-error='uploadError'
:on-success='uploadSuccess'
:before-remove='beforeRemove'
:limit='1'
:on-exceed='handleExceed'
:action='questionsImport'
:file-list='uploadDataList'
name='file'
accept=".xls,.xlsx"
:on-remove="handleDataRemove"
:on-error="uploadError"
:on-success="uploadSuccess"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="questionsImport"
:file-list="uploadDataList"
name="file"
>
<el-link :underline='false'>
<el-link :underline="false">
2.请点击批量导入
<i class='el-icon-upload'></i>
<i class="el-icon-upload"></i>
</el-link>
</el-upload>
<el-link v-if='uploadFaild' type='primary' @click='showFaild'>部分数据导入失败查看失败原因</el-link>
<el-link v-if="uploadFaild" type="primary" @click="showFaild">部分数据导入失败查看失败原因</el-link>
</div>
</div>
</el-card>
<span slot='footer' class='dialog-footer'>
<el-button size='small' @click='BatchUpload = false'> </el-button>
<el-button size='small' type='primary' @click='uploadSure'> </el-button>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="BatchUpload = false"> </el-button>
<el-button size="small" type="primary" @click="uploadSure"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex';
import util from '@/libs/util';
import Setting from '@/setting';
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
data() {
return {
questionsImport: this.api.questionsImport,
topicForm: {
answer: '',
questionType: '单选题',
questionStem: '',
optionA: '',
optionB: '',
optionC: '',
optionD: '',
optionE: '',
optionF: '',
answer: "",
questionType: "单选题",
questionStem: "",
optionA: "",
optionB: "",
optionC: "",
optionD: "",
optionE: "",
optionF: "",
aisTrue: false,
bisTrue: false,
cisTrue: false,
disTrue: false,
eisTrue: false,
fisTrue: false,
answerAnalysis: ''
answerAnalysis: ""
},
rules: {
questionType: [{ required: true, message: '请选择题型', trigger: 'change' }],
questionStem: [{ required: true, message: '请填写题干', trigger: 'blur' }]
questionType: [{ required: true, message: "请选择题型", trigger: "change" }],
questionStem: [{ required: true, message: "请填写题干", trigger: "blur" }]
// optionA: [{ required: true, message: '', trigger: 'change' }],
// optionB: [{ required: true, message: '', trigger: 'change' }]
},
value: true,
subject: '', //
keyword: '',
subject: "", //
keyword: "",
listData: [],
subjectList: [
{
id: '',
name: '不限'
id: "",
name: "不限"
},
{
id: 1,
name: '单选题'
name: "单选题"
},
{
id: 2,
name: '多选题'
name: "多选题"
},
{
id: 3,
name: '判断题'
name: "判断题"
}
],
page: 1,
pageSize: 10,
total: 0,
SetEvaluation: false,
radio: '1', //
topicsNumber: '', //
topicsTime: '', //
radio: "1", //
topicsNumber: "", //
topicsTime: "", //
random: true,
custom: false,
info: {},
NewTopics: false, //
Customs: ['1', '2', '3'],
Customs: ["1", "2", "3"],
BatchUpload: false, //
questionType: ['', '单选题', '多选题', '判断题'],
questionType: ["", "单选题", "多选题", "判断题"],
multipleSelection: [],
isShowTopics: false,
topicsTitle: '',
topicsTitle: "",
uploadList: [],
uploadDataList: [],
searchTimer: null,
uploadFaild: false,
exportCode: ''
exportCode: ""
};
},
mounted() {
@ -344,22 +344,22 @@ export default {
},
resetForm() {
this.topicForm = {
answer: '',
questionType: '',
questionStem: '',
optionA: '',
optionB: '',
optionC: '',
optionD: '',
optionE: '',
optionF: '',
answer: "",
questionType: "",
questionStem: "",
optionA: "",
optionB: "",
optionC: "",
optionD: "",
optionE: "",
optionF: "",
aisTrue: false,
bisTrue: false,
cisTrue: false,
disTrue: false,
eisTrue: false,
fisTrue: false,
answerAnalysis: ''
answerAnalysis: ""
};
this.$nextTick(() => {
this.$refs.topicForm.clearValidate();
@ -370,8 +370,8 @@ export default {
this.getData();
},
addTopics() {
this.topicForm.id = '';
this.topicsTitle = '新增题目';
this.topicForm.id = "";
this.topicsTitle = "新增题目";
this.NewTopics = true;
},
getDetail(id) {
@ -389,11 +389,11 @@ export default {
});
},
editQues(row) {
this.topicsTitle = '编辑题目';
this.topicsTitle = "编辑题目";
this.getDetail(row.id);
},
showQues(row) {
this.topicsTitle = '查看题目';
this.topicsTitle = "查看题目";
this.isShowTopics = true;
this.getDetail(row.id);
},
@ -413,12 +413,12 @@ export default {
});
},
delData(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
this.$post(`${this.api.questionsDelete}?ids=${row.id}`).then(res => {
util.successMsg('删除成功');
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
@ -431,27 +431,23 @@ export default {
},
delAllData() {
if (this.multipleSelection.length) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
let ids = this.multipleSelection.map(item => {
return item.id
return item.id;
});
let strIds = ids.toString();
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(`${this.api.questionsDelete}?ids=${strIds}`).then(res => {
this.$post(`${this.api.questionsDelete}?ids=${ids.toString()}`).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg('删除成功');
util.successMsg("删除成功");
this.getData();
}).catch(err => {
console.log(err);
});
})
.catch(() => {
});
}).catch(() => { });
} else {
util.errorMsg('请先选择题目 !');
util.errorMsg("请先选择题目 !");
}
},
downloadTem() {
@ -470,34 +466,34 @@ export default {
},
questionTypeChange() {
for (let i in this.topicForm) {
if (i.includes('isTrue')) this.topicForm[i] = false;
if (i.includes("isTrue")) this.topicForm[i] = false;
}
},
submitSetEva() {
let info = this.info;
if (info.evaluationType == 0) {
let allEmpty = true;
if (!info.isSingleEnable && !info.isMultipleEnable && !info.isJudgmentEnable) return util.warningMsg('请至少选择一种题型');
if (!info.isSingleEnable && !info.isMultipleEnable && !info.isJudgmentEnable) return util.warningMsg("请至少选择一种题型");
if (info.isSingleEnable == 1 && info.singleNum != 0) allEmpty = false;
if (info.isMultipleEnable == 1 && info.multipleNum != 0) allEmpty = false;
if (info.isJudgmentEnable == 1 && info.judgmentNum != 0) allEmpty = false;
if (allEmpty) return util.warningMsg('请至少选中一种类型,并数量大于0');
if (info.isSingleEnable == 1 && info.singleNum > info.totalSingleNum) return util.warningMsg('单选题大于总数,请重新输入');
if (info.isMultipleEnable == 1 && info.multipleNum > info.totalMultipleNum) return util.warningMsg('多选题大于总数,请重新输入');
if (info.isJudgmentEnable == 1 && info.judgmentNum > info.totalJudgmentNum) return util.warningMsg('判断题大于总数,请重新输入');
if (allEmpty) return util.warningMsg("请至少选中一种类型,并数量大于0");
if (info.isSingleEnable == 1 && info.singleNum > info.totalSingleNum) return util.warningMsg("单选题大于总数,请重新输入");
if (info.isMultipleEnable == 1 && info.multipleNum > info.totalMultipleNum) return util.warningMsg("多选题大于总数,请重新输入");
if (info.isJudgmentEnable == 1 && info.judgmentNum > info.totalJudgmentNum) return util.warningMsg("判断题大于总数,请重新输入");
} else {
if (info.questionNum === '') return util.warningMsg('请输入测评题目总数');
if (info.questionNum == 0) return util.warningMsg('测评题目总数不得为0');
if (info.questionNum === "") return util.warningMsg("请输入测评题目总数");
if (info.questionNum == 0) return util.warningMsg("测评题目总数不得为0");
}
if (info.duration === '') return util.warningMsg('请输入测评时长');
if (info.duration == 0) return util.warningMsg('测评时长不得为0');
if (info.duration === "") return util.warningMsg("请输入测评时长");
if (info.duration == 0) return util.warningMsg("测评时长不得为0");
this.info.isSingleEnable = Number(this.info.isSingleEnable);
this.info.isMultipleEnable = Number(this.info.isMultipleEnable);
this.info.isJudgmentEnable = Number(this.info.isJudgmentEnable);
this.$post(this.api.questionsUpdateRules, this.info).then(res => {
if (res.status === 200) {
util.successMsg('提交成功!');
util.successMsg("提交成功!");
this.SetEvaluation = false;
} else {
util.errorMsg(res.message);
@ -511,29 +507,29 @@ export default {
if (valid) {
let topicForm = this.topicForm;
let optionCount = 0;
let answer = '';
let answer = "";
let isInvalidAnswer = false;
for (let n in topicForm) {
if (n.includes('option')) {
topicForm[n] != '' && ++optionCount;
if (n.includes("option")) {
topicForm[n] != "" && ++optionCount;
}
if (n.includes('isTrue') && topicForm[n]) {
let curOpt = n.replace('isTrue', '');
if (n.includes("isTrue") && topicForm[n]) {
let curOpt = n.replace("isTrue", "");
answer += curOpt;
if (!topicForm[`option${curOpt.toUpperCase()}`].length) isInvalidAnswer = true;
}
}
if (optionCount < 2) return util.warningMsg('请至少添加两个选项!');
if (!answer) return util.warningMsg('请设置正确答案!');
if (topicForm.questionType != '多选题' && answer.length > 1) return util.warningMsg('单选题、判断题只能设置一个正确答案!');
if (isInvalidAnswer) return util.warningMsg('正确答案选项为空,请重新设置!');
if (optionCount < 2) return util.warningMsg("请至少添加两个选项!");
if (!answer) return util.warningMsg("请设置正确答案!");
if (topicForm.questionType != "多选题" && answer.length > 1) return util.warningMsg("单选题、判断题只能设置一个正确答案!");
if (isInvalidAnswer) return util.warningMsg("正确答案选项为空,请重新设置!");
this.topicForm.questionType = this.questionType.indexOf(this.topicForm.questionType);
this.topicForm.answer = answer.toUpperCase();
if (this.topicForm.id) {
this.$post(this.api.questionsUpdate, this.topicForm).then(res => {
if (res.status === 200) {
util.successMsg('提交成功!');
util.successMsg("提交成功!");
this.NewTopics = false;
this.getData();
} else {
@ -545,7 +541,7 @@ export default {
} else {
this.$post(this.api.questionsSave, this.topicForm).then(res => {
if (res.status === 200) {
util.successMsg('提交成功!');
util.successMsg("提交成功!");
this.NewTopics = false;
this.getData();
} else {
@ -585,8 +581,8 @@ export default {
},
uploadError(err, file, fileList) {
this.$message({
message: '上传出错,请重试!',
type: 'error',
message: "上传出错,请重试!",
type: "error",
center: true
});
},
@ -603,7 +599,7 @@ export default {
uploadSure() {
this.BatchUpload = false;
this.page = 1;
this.keyword = '';
this.keyword = "";
this.getData();
},
closeUpload() {
@ -615,7 +611,7 @@ export default {
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
::v-deep .el-checkbox-group {
font-size: 2px;
}

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

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

@ -2,22 +2,22 @@
<section class="main">
<div class="crumbs">
<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>
</div>
<div class="container">
<span>{{$t('i18n.tips')}}</span>
<el-button type="primary" @click="$i18n.locale = $i18n.locale === 'zh'?'en':'zh';">{{$t('i18n.btn')}}</el-button>
<span>{{ $t("i18n.tips") }}</span>
<el-button type="primary" @click="$i18n.locale = $i18n.locale === 'zh'?'en':'zh';">{{ $t("i18n.btn") }}</el-button>
<div class="list">
<h2>{{$t('i18n.title1')}}</h2>
<p>{{$t('i18n.p1')}}</p>
<p>{{$t('i18n.p2')}}</p>
<p>{{$t('i18n.p3')}}</p>
<h2>{{ $t("i18n.title1") }}</h2>
<p>{{ $t("i18n.p1") }}</p>
<p>{{ $t("i18n.p2") }}</p>
<p>{{ $t("i18n.p3") }}</p>
</div>
<h2>{{$t('i18n.title2')}}</h2>
<h2>{{ $t("i18n.title2") }}</h2>
<div>
<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>
</div>
</div>
@ -27,19 +27,20 @@
<script>
export default {
data() {
return {
}
}
return {};
}
};
</script>
<style scoped>
.list {
padding: 30px 0;
}
.list p {
margin-bottom: 20px;
}
a {
color: #cb221c;
}

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

@ -1,43 +1,43 @@
<template>
<div>
<div class='page'>
<div class="page">
<!--
<div class='tabs'>
<a class='item' v-for='(item,index) in tabs' :key='index' :class='{active: index == activeName}' @click='tabChange(index)'>{{ item }}</a>
</div>
-->
<div class='btn-wrap'>
<template v-if='sorting'>
<el-button class='action-btn' type='primary' size='small' round @click='cancelSort'>取消</el-button>
<el-button class='action-btn' type='primary' size='small' round @click='sortSubmit'>保存</el-button>
<div class="btn-wrap">
<template v-if="sorting">
<el-button class="action-btn" type="primary" size="small" round @click="cancelSort">取消</el-button>
<el-button class="action-btn" type="primary" size="small" round @click="sortSubmit">保存</el-button>
</template>
<template v-if='!sorting'>
<el-button class='action-btn' type='primary' size='small' round @click='openSort' v-auth>更改排序
<template v-if="!sorting">
<el-button class="action-btn" type="primary" size="small" round @click="openSort" v-auth>更改排序
</el-button>
<el-button class='action-btn' type='primary' size='small' round @click='addColumn' v-auth>添加栏目
<el-button class="action-btn" type="primary" size="small" round @click="addColumn" v-auth>添加栏目
</el-button>
</template>
</div>
<div class='page-content' style='padding-top: 24px; margin-top: 24px'>
<div class='el-table'>
<div class='list'>
<div class='thead'>
<div class="page-content" style="padding-top: 24px; margin-top: 24px">
<div class="el-table">
<div class="list">
<div class="thead">
<span>栏目名称</span>
<span><em :class='{hide: sorting}' style='font-style: normal'>操作</em></span>
<span><em :class="{hide: sorting}" style="font-style: normal">操作</em></span>
</div>
</div>
<el-tree :data='listData' node-key='id' default-expand-all @node-drop='handleDrop'
:draggable='sorting' :allow-drop='allowDrop' :allow-drag='allowDrag'>
<span class='custom-tree-node' slot-scope='{ node, data }'>
<span class='name'>{{ node.label }}</span>
<span class='action' v-show='!sorting'>
<el-button type='text' @click.stop='editType(data)' v-auth>编辑</el-button>
<el-divider direction='vertical' v-auth="'information:编辑'"></el-divider>
<template v-if='node.level == 1' v-auth="'information:新增'">
<el-button type='text' @click.stop='addType(data)'>新增</el-button>
<el-divider direction='vertical'></el-divider>
<el-tree :data="listData" node-key="id" default-expand-all @node-drop="handleDrop"
:draggable="sorting" :allow-drop="allowDrop" :allow-drag="allowDrag">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="name">{{ node.label }}</span>
<span class="action" v-show="!sorting">
<el-button type="text" @click.stop="editType(data)" v-auth>编辑</el-button>
<el-divider direction="vertical" v-auth="'information:编辑'"></el-divider>
<template v-if="node.level == 1" v-auth="'information:新增'">
<el-button type="text" @click.stop="addType(data)">新增</el-button>
<el-divider direction="vertical"></el-divider>
</template>
<el-button type='text' @click.stop='delData(data)' v-auth>删除</el-button>
<el-button type="text" @click.stop="delData(data)" v-auth>删除</el-button>
</span>
</span>
</el-tree>
@ -45,43 +45,44 @@
</div>
</div>
<el-dialog :title="isAddColumn ? '添加栏目' : '编辑栏目'" :visible.sync='columnVisible' width='400px'
:close-on-click-modal='false' @close='closeColumn'>
<el-dialog :title="isAddColumn ? '添加栏目' : '编辑栏目'" :visible.sync="columnVisible" width="400px"
:close-on-click-modal="false" @close="closeColumn">
<el-form>
<el-form-item>
<el-input placeholder='栏目名称' v-model='columnName'></el-input>
<el-input placeholder="栏目名称" v-model="columnName"></el-input>
</el-form-item>
</el-form>
<span slot='footer' class='dialog-footer'>
<el-button size='small' @click='columnVisible = false'> </el-button>
<el-button size='small' type='primary' @click='columnSubmit'> </el-button>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="columnVisible = false"> </el-button>
<el-button size="small" type="primary" @click="columnSubmit"> </el-button>
</span>
</el-dialog>
<el-dialog :title="isAddType ? '添加分类' : '编辑分类'" :visible.sync='typeVisible' width='400px'
:close-on-click-modal='false' @close='closeType'>
<el-dialog :title="isAddType ? '添加分类' : '编辑分类'" :visible.sync="typeVisible" width="400px"
:close-on-click-modal="false" @close="closeType">
<el-form>
<el-form-item>
<el-input placeholder='分类名称' v-model='typeName'></el-input>
<el-input placeholder="分类名称" v-model="typeName"></el-input>
</el-form-item>
</el-form>
<span slot='footer' class='dialog-footer'>
<el-button size='small' @click='typeVisible = false'> </el-button>
<el-button size='small' type='primary' @click='typeSubmit'> </el-button>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="typeVisible = false"> </el-button>
<el-button size="small" type="primary" @click="typeSubmit"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import util from '@/libs/util'
import util from "@/libs/util";
export default {
name: 'columnManage',
name: "columnManage",
data() {
return {
activeName: 'first',
activeName: "first",
tabs: {
first: '栏目管理'
first: "栏目管理"
},
name: this.$store.state.name,
originalList: [],
@ -91,18 +92,18 @@ export default {
pageSize: 10,
totals: 0,
columnVisible: false,
columnName: '',
columnName: "",
typeVisible: false,
typeName: '',
typeName: "",
curRow: {},
sortObj: null,
sorting: false,
curParentId: '',
curParentId: "",
isAddColumn: false,
isAddType: false,
defaultProps: {
children: 'children',
label: 'label'
children: "children",
label: "label"
}
};
},
@ -111,8 +112,8 @@ export default {
},
beforeRouteLeave(to, from, next) {
if (JSON.stringify(this.originalList) !== JSON.stringify(this.listData)) {
this.$confirm('确定返回?排序尚未保存。', '提示', {
type: 'warning'
this.$confirm("确定返回?排序尚未保存。", "提示", {
type: "warning"
})
.then(() => {
next();
@ -164,12 +165,12 @@ export default {
});
},
delData(row) {
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning'
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteColumn}/${row.id}`).then(res => {
util.successMsg('删除成功');
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
@ -202,14 +203,14 @@ export default {
});
let data = { columnTree: list };
this.$post(this.api.columnReorder, data).then(res => {
util.successMsg('保存成功');
util.successMsg("保存成功");
this.sorting = false;
this.getData();
}).catch(res => {
});
},
columnSubmit() {
if (!this.columnName) return util.warningMsg('请填写栏目名称');
if (!this.columnName) return util.warningMsg("请填写栏目名称");
let data = {
level: 1,
parentId: 1,
@ -218,14 +219,14 @@ export default {
if (this.curRow.id) {
data.id = this.curRow.id;
this.$put(this.api.editColumn, data).then(res => {
util.warningMsg('修改成功');
util.warningMsg("修改成功");
this.columnVisible = false;
this.getData();
}).catch(res => {
});
} else {
this.$post(this.api.addColumn, data).then(res => {
util.successMsg('添加成功');
util.successMsg("添加成功");
this.columnVisible = false;
this.getData();
}).catch(res => {
@ -250,7 +251,7 @@ export default {
}
},
typeSubmit(row) {
if (!this.typeName) return util.warningMsg('请填写分类名称');
if (!this.typeName) return util.warningMsg("请填写分类名称");
let data = {
level: 2,
name: this.typeName
@ -259,7 +260,7 @@ export default {
data.id = this.curRow.id;
data.parentId = this.curRow.parentId;
this.$put(this.api.editColumn, data).then(res => {
util.successMsg('修改成功');
util.successMsg("修改成功");
this.typeVisible = false;
this.getData();
}).catch(res => {
@ -267,7 +268,7 @@ export default {
} else {
data.parentId = this.curRow.id;
this.$post(this.api.addColumn, data).then(res => {
util.successMsg('新增成功');
util.successMsg("新增成功");
this.typeVisible = false;
this.getData();
}).catch(res => {
@ -294,11 +295,11 @@ export default {
this.getData();
},
closeColumn() {
this.columnName = '';
this.columnName = "";
this.curRow = {};
},
closeType() {
this.typeName = '';
this.typeName = "";
this.curRow = {};
},
handleDrop(draggingNode, dropNode, dropType, ev) {
@ -306,21 +307,21 @@ export default {
},
allowDrop(draggingNode, dropNode, type) {
if (dropNode.level == 2 && draggingNode.childNodes.length == 0) {
return type !== 'inner';
} else if ((draggingNode.childNodes.length > 0 && dropNode.level == 2) || (draggingNode.childNodes.length > 0 && type == 'inner')) {
return type !== "inner";
} else if ((draggingNode.childNodes.length > 0 && dropNode.level == 2) || (draggingNode.childNodes.length > 0 && type == "inner")) {
return false;
} else {
return true;
}
},
allowDrag(draggingNode) {
return draggingNode.data.label.indexOf('三级 3-2-2') === -1;
return draggingNode.data.label.indexOf("三级 3-2-2") === -1;
}
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.btn-wrap {
position: absolute;
top: 15px;

@ -53,11 +53,12 @@
</template>
<script>
import quill from '@/components/quill'
import util from '@/libs/util'
import Setting from '@/setting'
import quill from "@/components/quill";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
name: 'addArticle',
name: "addArticle",
data() {
return {
headers: {
@ -65,14 +66,14 @@ export default {
},
columnId: this.$route.query.columnId,
sort: this.$route.query.sort,
id: '',
coverUrl: '',
id: "",
coverUrl: "",
uploadList: [],
uploadDataList: [],
author: '',
date: '',
title: '',
content: '',
author: "",
date: "",
title: "",
content: "",
submiting: false,
uploading: false
};
@ -81,8 +82,8 @@ export default {
quill
},
mounted() {
this.id = this.$route.query.id
this.id && this.getData()
this.id = this.$route.query.id;
this.id && this.getData();
},
methods: {
//
@ -92,26 +93,26 @@ export default {
getData() {
this.$get(`${this.api.getArticle}/${this.id}`)
.then(res => {
let data = res.article
this.coverUrl = data.coverUrl
this.author = data.author
this.date = data.date
this.title = data.title
this.content = data.content
let data = res.article;
this.coverUrl = data.coverUrl;
this.author = data.author;
this.date = data.date;
this.title = data.title;
this.content = data.content;
})
.catch(err => {
});
},
saveData() {
if(this.submiting) return false
if(!this.coverUrl) return util.warningMsg('请上传封面图')
if(!this.author) return util.warningMsg('请填写作者')
if(!this.date) return util.warningMsg('请选择日期')
if(!this.title) return util.warningMsg('请填写文章标题')
if(!this.content) return util.warningMsg('请填写文章内容')
if(this.uploading) return util.warningMsg('图片正在上传中,请稍等')
this.submiting = true
if (this.submiting) return false;
if (!this.coverUrl) return util.warningMsg("请上传封面图");
if (!this.author) return util.warningMsg("请填写作者");
if (!this.date) return util.warningMsg("请选择日期");
if (!this.title) return util.warningMsg("请填写文章标题");
if (!this.content) return util.warningMsg("请填写文章内容");
if (this.uploading) return util.warningMsg("图片正在上传中,请稍等");
this.submiting = true;
let data = {
id: this.id,
@ -122,25 +123,25 @@ export default {
title: this.title,
content: this.content,
sort: this.sort
}
};
if (this.id) {
this.$put(this.api.editArticle, data).then(res => {
this.submiting = false
util.successMsg('修改成功');
this.back()
this.submiting = false;
util.successMsg("修改成功");
this.back();
})
.catch(err => {
this.submiting = false
})
this.submiting = false;
});
} else {
this.$post(this.api.addArticle, data).then(res => {
this.submiting = false
util.successMsg('创建成功');
this.back()
this.submiting = false;
util.successMsg("创建成功");
this.back();
})
.catch(err => {
this.submiting = false
})
this.submiting = false;
});
}
},
handleCurrentChange(val) {
@ -151,10 +152,12 @@ export default {
},
uploadSuccess(res, file, fileList) {
if (this.coverUrl) {
let fileName = this.coverUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/','')
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {}).catch(res => {});
let fileName = this.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
}).catch(res => {
});
}
this.coverUrl = res.filesResult.fileUrl
this.coverUrl = res.filesResult.fileUrl;
},
uploadError(err, file, fileList) {
this.$message({
@ -167,43 +170,45 @@ export default {
return this.$confirm(`确定移除 ${file.name}`);
},
handleRemove(file, fileList) {
let fileName = this.coverUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/','')
let fileName = this.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
this.coverUrl = ''
}).catch(res => {});
this.coverUrl = "";
}).catch(res => {
});
},
uploadSure() {
this.BatchUpload = false
this.pageNo = 1
this.keyword = ''
this.getData()
this.BatchUpload = false;
this.pageNo = 1;
this.keyword = "";
this.getData();
},
back() {
// this.$router.push(`/content?id=${this.columnId}`)
this.$router.back()
this.$router.back();
},
goback() {
this.$confirm('确定返回?未更新的信息将不会保存。', '提示', {
type: 'warning'
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", {
type: "warning"
})
.then(() => {
this.back()
this.back();
})
.catch(() => {});
.catch(() => {
});
},
addSponsor() {
this.sponsorList.push('')
this.sponsorList.push("");
},
delSponsor(index) {
this.sponsorList.splice(index,1)
this.sponsorList.splice(index, 1);
},
addOrganizer() {
this.organzinerList.push('')
this.organzinerList.push("");
},
delOrganizer(index) {
this.organzinerList.splice(index,1)
},
},
this.organzinerList.splice(index, 1);
}
}
};
</script>
@ -217,9 +222,11 @@ $avatar-width: 104px;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
&:hover {
border-color: #409EFF;
}
.uploader-default {
display: flex;
flex-direction: column;
@ -228,11 +235,13 @@ $avatar-width: 104px;
height: $avatar-width;
text-align: center;
background: rgba(0, 0, 0, 0.04);
i {
font-size: 20px;
font-weight: bold;
color: #8c939d;
}
p {
margin-top: 10px;
font-size: 14px;
@ -240,26 +249,32 @@ $avatar-width: 104px;
line-height: 1;
}
}
.avatar {
width: $avatar-width;
height: $avatar-width;
display: block;
}
}
.el-upload__tip {
margin-top: 0;
p {
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
line-height: 1;
&:first-child {
margin-bottom: 5px;
}
}
}
}
/deep/ .d-inline-block {
width: 216px;
.el-select, .el-input {
width: 100%;
}

@ -8,7 +8,7 @@
<el-button class="action-btn" type="primary" size="small" @click="delAllData" v-auth="'content:批量删除'">批量删除</el-button>
<el-button class="action-btn" type="primary" size="small" @click="addArticle" v-auth="'content:新增文章'">新增文章</el-button>
</div>
<div class="page-content" style='padding-top: 24px'>
<div class="page-content" style="padding-top: 24px">
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
@ -16,7 +16,7 @@
{{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="title" label="标题">
<el-table-column prop="title" label="标题" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="name" label="排序值" width="80" align="center">
<template slot-scope="scope">
@ -48,7 +48,7 @@
@change="switchOff($event,scope.row,scope.$index)"
v-auth="'content:禁用'"
></el-switch>
<span>{{scope.row.status ? '禁用' : '启用'}}</span>
<span>{{ scope.row.status ? "禁用" : "启用" }}</span>
</template>
</el-table-column>
</el-table>
@ -61,19 +61,20 @@
</template>
<script>
import util from '@/libs/util'
import util from "@/libs/util";
export default {
data() {
return {
activeName: 'first',
activeName: "first",
tabs: {
first: '栏目内容管理'
first: "栏目内容管理"
},
listData: [],
multipleSelection: [],
pageNo: 1,
pageSize: 10,
totals: 0,
totals: 0
};
},
props: {
@ -81,98 +82,105 @@ export default {
},
watch: {
columnId() {
this.getData()
this.getData();
}
},
mounted() {
this.getData()
this.getData();
},
methods: {
getData(id) {
let data = {
columnId: this.columnId
}
};
this.$get(`${this.api.queryArticleByCondition}/${this.pageNo}/${this.pageSize}`, data).then(res => {
this.listData = res.articleList
this.totals = res.total
this.listData = res.articleList;
this.totals = res.total;
if (!this.listData.length && this.totals) {
this.pageNo--
this.getData()
this.pageNo--;
this.getData();
}
}).catch(res => {});
}).catch(res => {
});
},
handleSelectionChange(val) {
this.multipleSelection = val
this.multipleSelection = val;
},
handleCurrentChange(val) {
this.pageNo = val
this.getData()
this.pageNo = val;
this.getData();
},
addArticle() {
this.$router.push(`/information/addarticle?columnId=${this.columnId}&sort=${this.listData.length+1}`)
this.$router.push(`/information/addarticle?columnId=${this.columnId}&sort=${this.listData.length + 1}`);
},
editArticle(scope) {
this.$router.push(`/information/addarticle?columnId=${this.columnId}&id=${scope.row.id}&sort=${scope.$index+1}`)
this.$router.push(`/information/addarticle?columnId=${this.columnId}&id=${scope.row.id}&sort=${scope.$index + 1}`);
},
delData(row) {
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning'
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteArticles}?articleIds=${row.id}`).then(res => {
util.successMsg('删除成功');
this.getData()
}).catch(res => {});
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
},
transferDate(date) {
return date.replace(' 00:00:00','')
return date.replace(" 00:00:00", "");
},
delAllData() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection;
let delList = newArr.map(item => {
return item.id
})
return item.id;
});
let title = newArr[0].title
let title = newArr[0].title;
if (title.length > 14) {
title = title.substr(0,14) + '……'
title = title.substr(0, 14) + "……";
}
this.$confirm(`此批量删除操作不可逆,是否确认删除${title}${newArr.length}个选中项?`, '提示', {
type: 'warning'
this.$confirm(`此批量删除操作不可逆,是否确认删除${title}${newArr.length}个选中项?`, "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteArticles}?articleIds=${delList.join(',')}`).then(res => {
this.$refs.table.clearSelection()
util.successMsg('删除成功');
this.getData()
}).catch(res => {})
this.$del(`${this.api.deleteArticles}?articleIds=${delList.join(",")}`).then(res => {
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
} else {
util.errorMsg('请先选择数据 !')
util.errorMsg("请先选择数据 !");
}
},
switchOff(val, row, index) {
this.$put(`${this.api.enableArticle}/${row.id}/${val}`)
.then(res => {
val == 1 ? util.errorMsg('该文章已隐藏,对学生端用户不可见') : util.successMsg('该文章已发布,对学生端用户可见')
val == 1 ? util.errorMsg("该文章已隐藏,对学生端用户不可见") : util.successMsg("该文章已发布,对学生端用户可见");
})
.catch(err => {})
.catch(err => {
});
},
sortSubmit() {
if (this.listData.length) {
if(this.listData.find(n => n.sort < 1)) return util.errorMsg('排序值最小为1')
let data = {articleList: this.listData}
if (this.listData.find(n => n.sort < 1)) return util.errorMsg("排序值最小为1");
let data = { articleList: this.listData };
this.$post(this.api.articleSort, data).then(res => {
util.successMsg('保存成功')
this.getContent(this.columnId)
util.successMsg("保存成功");
this.getContent(this.columnId);
})
.catch(err => {})
.catch(err => {
});
} else {
util.errorMsg('数据为空')
util.errorMsg("数据为空");
}
}
}
@ -183,14 +191,17 @@ export default {
.btn-wrap {
text-align: right;
}
.sort-input {
/deep/ .el-input__inner {
padding: 0 0 0 10px;
}
}
.sort-input + span {
display: none;
}
.off + span {
display: none;
}

@ -35,10 +35,11 @@
</template>
<script>
import ContentList from './contentList'
import { mapActions } from 'vuex'
import ContentList from "./contentList";
import { mapActions } from "vuex";
export default {
name: 'contentManage',
name: "contentManage",
components: {
ContentList
},
@ -47,14 +48,14 @@ export default {
menuList: [],
activeName: this.$store.state.info.columnId,
columnId: ""
}
};
},
mounted() {
this.getMenuData();
},
methods: {
...mapActions('info', [
'setColumnId'
...mapActions("info", [
"setColumnId"
]),
getMenuData() {
this.$get(this.api.queryAllColumns, { page: 1, size: 10000 }).then(res => {
@ -88,11 +89,14 @@ export default {
border-right: solid 1px #e6e6e6;
background-color: #F2F6FC;
overflow: hidden;
.el-menu {
background-color: transparent;
.el-submenu {
background-color: transparent;
}
.el-menu-item.is-active {
color: #ffffff;
background-color: #9278FF;

@ -15,9 +15,9 @@
</template>
<script>
import ColumnManage from './columnManage'
import ContentManage from './contentManage'
import { mapActions } from 'vuex'
import ColumnManage from "./columnManage";
import ContentManage from "./contentManage";
import { mapActions } from "vuex";
export default {
components: {
@ -26,21 +26,21 @@ export default {
},
data() {
return {
tabsName: this.$store.state.info.tabsName,
}
tabsName: this.$store.state.info.tabsName
};
},
methods: {
...mapActions('info', [
'setTabsName'
...mapActions("info", [
"setTabsName"
]),
handleClick(tab, event) {
this.setTabsName(tab.name)
this.setTabsName(tab.name);
}
},
mounted() {
}
}
};
</script>
<style lang="scss" scoped>

@ -6,103 +6,103 @@
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-form label-width='170px' label-suffix=':' size='small'>
<el-form-item label='竞赛封面(选填)'>
<el-form label-width="170px" label-suffix=":" size="small">
<el-form-item label="竞赛封面(选填)">
<el-upload
class='avatar-uploader'
accept='.jpg,.png,.jpeg,.gif'
:on-remove='handleRemove'
:on-error='uploadError'
:on-success='uploadSuccess'
:before-remove='beforeRemove'
:limit='1'
:on-exceed='handleExceed'
:action='this.api.fileupload'
class="avatar-uploader"
accept=".jpg,.png,.jpeg,.gif"
:on-remove="handleRemove"
:on-error="uploadError"
:on-success="uploadSuccess"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.fileupload"
:headers="headers"
name='file'
name="file"
>
<img v-if='coverUrl' :src='coverUrl' class='avatar'>
<div class='uploader-default' v-else>
<i class='el-icon-plus'></i>
<img v-if="coverUrl" :src="coverUrl" class="avatar">
<div class="uploader-default" v-else>
<i class="el-icon-plus"></i>
<p>上传封面</p>
</div>
<div slot='tip' class='el-upload__tip'>
<div slot="tip" class="el-upload__tip">
<p>展示宽度为220高度140JPG/PNG/GIF3MB以内</p>
</div>
</el-upload>
</el-form-item>
<el-form-item label='竞赛封面长图(选填)'>
<el-form-item label="竞赛封面长图(选填)">
<el-upload
class='avatar-uploader avatar-uploader-lg'
accept='.jpg,.png,.jpeg,.gif'
:on-remove='handleLgRemove'
:on-error='uploadError'
:on-success='uploadLgSuccess'
:before-remove='beforeRemove'
:limit='1' :on-exceed='handleExceed'
:action='this.api.fileupload'
class="avatar-uploader avatar-uploader-lg"
accept=".jpg,.png,.jpeg,.gif"
:on-remove="handleLgRemove"
:on-error="uploadError"
:on-success="uploadLgSuccess"
:before-remove="beforeRemove"
:limit="1" :on-exceed="handleExceed"
:action="this.api.fileupload"
:headers="headers"
name='file'
name="file"
>
<img v-if='carouselUrl' :src='carouselUrl' class='avatar-lg'>
<div class='uploader-default' v-else>
<i class='el-icon-plus'></i>
<img v-if="carouselUrl" :src="carouselUrl" class="avatar-lg">
<div class="uploader-default" v-else>
<i class="el-icon-plus"></i>
<p>上传封面</p>
</div>
<div slot='tip' class='el-upload__tip'>
<div slot="tip" class="el-upload__tip">
<p>展示宽度为1920高度300JPG/PNG/GIF3MB以内</p>
</div>
</el-upload>
</el-form-item>
<el-form-item label='竞赛名称'>
<div class='d-inline-block'>
<el-input placeholder='请输入竞赛名称' v-model='name' clearable></el-input>
<el-form-item label="竞赛名称">
<div class="d-inline-block">
<el-input placeholder="请输入竞赛名称" v-model="name" clearable></el-input>
</div>
</el-form-item>
<el-form-item label='主办方'>
<div class='inline-input'>
<div class='input-wrap' v-for='(item,index) in sponsorList' :key='index'>
<el-input placeholder='主办方名称' v-model='sponsorList[index]'></el-input>
<i v-if='sponsorList.length > 1' class='remove' @click='delSponsor(index)'></i>
<button v-if='index == 0' class='add-btn' @click='addSponsor'>
<i class='el-icon-plus'></i>
<el-form-item label="主办方">
<div class="inline-input">
<div class="input-wrap" v-for="(item,index) in sponsorList" :key="index">
<el-input placeholder="主办方名称" v-model="sponsorList[index]"></el-input>
<i v-if="sponsorList.length > 1" class="remove" @click="delSponsor(index)"></i>
<button v-if="index == 0" class="add-btn" @click="addSponsor">
<i class="el-icon-plus"></i>
<span>添加</span>
</button>
</div>
</div>
</el-form-item>
<el-form-item label='承办方(选填)'>
<div class='inline-input'>
<div class='input-wrap' v-for='(item,index) in undertakerList' :key='index'>
<el-input placeholder='承办方名称' v-model='undertakerList[index]'></el-input>
<i v-if='undertakerList.length > 1' class='remove' @click='delOrganizer(index)'></i>
<button v-if='index == 0' class='add-btn' @click='addOrganizer'>
<i class='el-icon-plus'></i>
<el-form-item label="承办方(选填)">
<div class="inline-input">
<div class="input-wrap" v-for="(item,index) in undertakerList" :key="index">
<el-input placeholder="承办方名称" v-model="undertakerList[index]"></el-input>
<i v-if="undertakerList.length > 1" class="remove" @click="delOrganizer(index)"></i>
<button v-if="index == 0" class="add-btn" @click="addOrganizer">
<i class="el-icon-plus"></i>
<span>添加</span>
</button>
</div>
</div>
<button v-if='!undertakerList.length' class='add-btn' @click='addOrganizer'>
<i class='el-icon-plus'></i>
<button v-if="!undertakerList.length" class="add-btn" @click="addOrganizer">
<i class="el-icon-plus"></i>
<span>添加</span>
</button>
</el-form-item>
<el-form-item label='报名时间'>
<el-date-picker v-model='signupTime' value-format='yyyy-MM-dd HH:mm:ss' type='datetimerange'
range-separator='-' start-placeholder='开始日期' end-placeholder='结束日期'
:picker-options='pickerOptions'></el-date-picker>
<el-form-item label="报名时间">
<el-date-picker v-model="signupTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
:picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item label='竞赛时间'>
<el-date-picker v-model='playTime' value-format='yyyy-MM-dd HH:mm:ss' type='datetimerange'
range-separator='-' start-placeholder='开始日期' end-placeholder='结束日期'
:picker-options='pickerOptions'></el-date-picker>
<el-form-item label="竞赛时间">
<el-date-picker v-model="playTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
:picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item label='竞赛详情'>
<quill :border='true' v-model='description' :height='400' />
<el-form-item label="竞赛详情">
<quill :border="true" v-model="description" :height="400" />
</el-form-item>
<el-form-item>
<el-button size='small' v-throttle @click='save(1)'>保存</el-button>
<el-button type='primary' size='small' v-throttle @click='save(0)'>发布</el-button>
<el-button size="small" v-throttle @click="save(1)">保存</el-button>
<el-button type="primary" size="small" v-throttle @click="save(0)">发布</el-button>
</el-form-item>
</el-form>
</el-card>
@ -110,40 +110,40 @@
</template>
<script>
import util from '@/libs/util'
import Setting from '@/setting'
import quill from '@/components/quill';
import util from "@/libs/util";
import Setting from "@/setting";
import quill from "@/components/quill";
export default {
name: 'add',
name: "add",
data() {
return {
headers: {
token: util.local.get(Setting.tokenKey)
},
schoolId: Setting.schoolId,
id: '',
coverUrl: '',
carouselUrl: '',
id: "",
coverUrl: "",
carouselUrl: "",
publishStatus: 0,
userId: this.$store.state.userLoginId,
username: this.$store.state.name,
uploadList: [],
uploadDataList: [],
coverVisible: false,
coverImageUrl: '',
name: '',
sponsor: '',
sponsorList: [''],
undertaker: '',
undertakerList: [''],
signUpStartTime: '',
signUpEndTime: '',
signupTime: '',
playTime: '',
playStartTime: '',
playEndTime: '',
description: '',
coverImageUrl: "",
name: "",
sponsor: "",
sponsorList: [""],
undertaker: "",
undertakerList: [""],
signUpStartTime: "",
signUpEndTime: "",
signupTime: "",
playTime: "",
playStartTime: "",
playEndTime: "",
description: "",
pickerOptions: {
disabledDate: time => {
return time.getTime() < new Date().getTime() - 86400000;
@ -161,8 +161,8 @@ export default {
this.signUpStartTime = val[0];
this.signUpEndTime = val[1];
} else {
this.signUpStartTime = '';
this.signUpEndTime = '';
this.signUpStartTime = "";
this.signUpEndTime = "";
}
},
playTime: function(val) {
@ -170,8 +170,8 @@ export default {
this.playStartTime = val[0];
this.playEndTime = val[1];
} else {
this.playStartTime = '';
this.playEndTime = '';
this.playStartTime = "";
this.playEndTime = "";
}
}
},
@ -189,19 +189,19 @@ export default {
if (this.submiting) return false;
this.sponsor = this.sponsorList.filter(d => d).join();
this.undertaker = this.undertakerList.filter(d => d).join();
if (!this.name) return util.warningMsg('请填写竞赛名称');
if (!this.name) return util.warningMsg("请填写竞赛名称");
if (status == 0) {
if (!this.sponsor) return util.warningMsg('请填写主办方');
if (!this.signUpStartTime) return util.warningMsg('请选择报名时间');
if (!this.sponsor) return util.warningMsg("请填写主办方");
if (!this.signUpStartTime) return util.warningMsg("请选择报名时间");
}
let now = new Date().getTime();
let signUpStartTime = new Date(this.signUpStartTime).getTime();
let signUpEndTime = new Date(this.signUpEndTime).getTime();
let playStartTime = new Date(this.playStartTime).getTime();
if (signUpStartTime && now > signUpStartTime) return util.warningMsg('报名时间不能早于当前时间');
if (!this.playStartTime && status == 0) return util.warningMsg('请选择竞赛时间');
if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg('竞赛时间不能早于报名结束时间');
if (!this.description && status == 0) return util.warningMsg('请填写竞赛详情');
if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间");
if (!this.playStartTime && status == 0) return util.warningMsg("请选择竞赛时间");
if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间");
if (!this.description && status == 0) return util.warningMsg("请填写竞赛详情");
let data = {
id: this.id,
@ -224,7 +224,7 @@ export default {
if (this.id) {
this.$put(this.api.editContest, data).then(res => {
this.submiting = false;
util.successMsg('修改成功');
util.successMsg("修改成功");
this.$router.back();
})
.catch(err => {
@ -233,7 +233,7 @@ export default {
} else {
this.$post(this.api.addContest, data).then(res => {
this.submiting = false;
util.successMsg('创建成功');
util.successMsg("创建成功");
this.$router.back();
})
.catch(err => {
@ -244,7 +244,7 @@ export default {
getData() {
this.$get(this.api.getContest + this.id)
.then(res => {
if (res.errmessage == 'success') {
if (res.errmessage == "success") {
let info = res.ExperimentalTeaching;
this.coverUrl = info.coverUrl;
this.description = info.description;
@ -253,7 +253,7 @@ export default {
this.signupTime = [info.signUpStartTime, info.signUpEndTime];
this.playTime = [info.playStartTime, info.playEndTime];
} else {
util.errorMsg('查询失败');
util.errorMsg("查询失败");
}
})
.catch(err => {
@ -265,7 +265,7 @@ export default {
},
uploadSuccess(res, file, fileList) {
if (this.coverUrl) {
let fileName = this.coverUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/', '');
let fileName = this.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
}).catch(res => {
});
@ -274,7 +274,7 @@ export default {
},
uploadLgSuccess(res, file, fileList) {
if (this.carouselUrl) {
let fileName = this.carouselUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/', '');
let fileName = this.carouselUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
}).catch(res => {
});
@ -283,8 +283,8 @@ export default {
},
uploadError(err, file, fileList) {
this.$message({
message: '上传出错,请重试!',
type: 'error',
message: "上传出错,请重试!",
type: "error",
center: true
});
},
@ -292,28 +292,28 @@ export default {
return this.$confirm(`确定移除 ${file.name}`);
},
handleRemove(file, fileList) {
let fileName = this.coverUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/', '');
let fileName = this.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
this.coverUrl = '';
this.coverUrl = "";
}).catch(res => {
});
},
handleLgRemove(file, fileList) {
let fileName = this.carouselUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/', '');
let fileName = this.carouselUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
this.carouselUrl = '';
this.carouselUrl = "";
}).catch(res => {
});
},
uploadSure() {
this.BatchUpload = false;
this.pageNo = 1;
this.keyword = '';
this.keyword = "";
this.getData();
},
goback() {
this.$confirm('确定返回?未更新的信息将不会保存。', '提示', {
type: 'warning'
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", {
type: "warning"
})
.then(() => {
this.$router.back();
@ -322,13 +322,13 @@ export default {
});
},
addSponsor() {
this.sponsorList.push('');
this.sponsorList.push("");
},
delSponsor(index) {
this.sponsorList.splice(index, 1);
},
addOrganizer() {
this.undertakerList.push('');
this.undertakerList.push("");
},
delOrganizer(index) {
this.undertakerList.splice(index, 1);
@ -337,7 +337,7 @@ export default {
};
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
$upload-width: 220px;
$upload-height: 140px;
$upload-lg-height: 150px;

@ -85,155 +85,161 @@
</template>
<script>
import util from '@/libs/util'
import util from "@/libs/util";
export default {
name: 'match',
name: "match",
data() {
return {
keyword: '',
keyword: "",
statusList: [
{
value: '',
name: '不限'
value: "",
name: "不限"
},
{
value: 1,
name: '待发布'
name: "待发布"
},
{
value: 0,
name: '已发布'
name: "已发布"
}
],
matchData: [],
form: {
month: '',
publishStatus: '',
startTime: '',
endTime: ''
month: "",
publishStatus: "",
startTime: "",
endTime: ""
},
multipleSelection: [],
dateList: [
{
id: '',
name: '不限'
id: "",
name: "不限"
},
{
id: 1,
name: '近一个月'
name: "近一个月"
},
{
id: 3,
name: '近三个月'
name: "近三个月"
},
{
id: 6,
name: '近六个月'
name: "近六个月"
}
],
date: [],
pageNo: 1,
pageSize: 10,
totals: 0,
transferPublishStatus: ['已发布','未发布']
transferPublishStatus: ["已发布", "未发布"]
};
},
watch: {
'form.month': function(val){
"form.month": function(val) {
if (val) {
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))]
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))];
} else {
this.date = []
this.date = [];
}
},
date: function(val) {
if (val) {
this.form.startTime = val[0]
this.form.endTime = val[1]
this.form.startTime = val[0];
this.form.endTime = val[1];
} else {
this.form.startTime = ''
this.form.endTime = ''
this.form.startTime = "";
this.form.endTime = "";
}
this.initData()
this.initData();
},
keyword: function(val) {
clearTimeout(this.searchTimer)
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData()
},500)
this.initData();
}, 500);
}
},
mounted() {
this.getData()
this.getData();
},
methods: {
getData() {
let data = {}
if(this.form.month) data.month = this.form.month
if(this.keyword) data.name = this.keyword
if(this.form.publishStatus !== '') data.publishStatus = this.form.publishStatus
if(this.form.startTime) data.startTime = this.form.startTime
if(this.form.endTime) data.endTime = this.form.endTime
let data = {};
if (this.form.month) data.month = this.form.month;
if (this.keyword) data.name = this.keyword;
if (this.form.publishStatus !== "") data.publishStatus = this.form.publishStatus;
if (this.form.startTime) data.startTime = this.form.startTime;
if (this.form.endTime) data.endTime = this.form.endTime;
this.$get(`${this.api.queryContestByCondition}/${this.pageNo}/${this.pageSize}`, data).then(res => {
this.matchData = res.contestList
this.totals = res.total
this.$refs.table.clearSelection()
this.matchData = res.contestList;
this.totals = res.total;
this.$refs.table.clearSelection();
if (!this.matchData.length && this.totals) {
this.pageNo--
this.getData()
this.pageNo--;
this.getData();
}
}).catch(res => {});
}).catch(res => {
});
},
initData() {
this.pageNo = 1
this.getData()
this.pageNo = 1;
this.getData();
},
add() {
this.$router.push('add')
this.$router.push("add");
},
manage(row) {
this.$router.push(`manage?id=${row.id}`)
this.$router.push(`manage?id=${row.id}`);
},
changeType() {
this.$refs.table.clearSelection()
this.$refs.table.clearSelection();
this.initData();
},
delData(row) {
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning'
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteContest}/${row.id}`).then(res => {
util.successMsg('删除成功');
this.getData()
}).catch(res => {});
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
},
delAllData() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection;
let delList = newArr.map(item => {
return item.id
})
return item.id;
});
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning'
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
let data = delList
let data = delList;
this.$post(this.api.deleteContest, data).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection()
util.successMsg('删除成功');
this.getData()
}).catch(res => {});
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
} else {
util.errorMsg('请先选择数据 !');
util.errorMsg("请先选择数据 !");
}
},
handleSelectionChange(val) {
@ -244,16 +250,17 @@ export default {
this.getData();
},
transferTime(date, type) {
if(date == '0000-00-00 00:00:00') return '---'
return date
if (date == "0000-00-00 00:00:00") return "---";
return date;
},
switchOff(val, row, index) {
this.$put(`${this.api.publishContest}/${row.id}/${val}`)
.then(res => {
val == 1 ? util.warningMsg('该赛事信息已隐藏对学生端用户不可见') : util.successMsg('该赛事信息已对学生端用户公开')
val == 1 ? util.warningMsg("该赛事信息已隐藏对学生端用户不可见") : util.successMsg("该赛事信息已对学生端用户公开");
})
.catch(err => {});
},
.catch(err => {
});
}
}
};
</script>
@ -266,10 +273,12 @@ export default {
}
}
}
@media(max-width: 1640px) {
.page .page-content .tool .filter {
flex-wrap: wrap;
margin-bottom: -15px;
li {
min-width: 34%;
margin-bottom: 15px;

@ -22,19 +22,20 @@
</template>
<script>
import MatchDetail from './matchDetail'
import MatchProgress from './matchProgress'
import MatchSignup from './matchSignup'
import MatchDetail from "./matchDetail";
import MatchProgress from "./matchProgress";
import MatchSignup from "./matchSignup";
export default {
name: 'matchManage',
name: "matchManage",
data() {
return {
active: 'first',
active: "first",
tabs: {
first: '大赛详情',
second: '竞赛进展',
third: '报名人员'
},
first: "大赛详情",
second: "竞赛进展",
third: "报名人员"
}
};
},
components: {
@ -50,7 +51,7 @@ export default {
this.$router.back();
},
tabChange(index) {
this.active = index
this.active = index;
}
}
};

@ -1,6 +1,6 @@
<template>
<!-- 大赛详情 -->
<div style='padding: 24px'>
<div style="padding: 24px">
<div class="page-content">
<el-form label-width="170px" label-suffix=":" size="small">
<el-form-item label="竞赛封面(选填)">
@ -101,30 +101,31 @@
</template>
<script>
import quill from '@/components/quill'
import util from '@/libs/util'
import quill from "@/components/quill";
import util from "@/libs/util";
export default {
name: 'matchDetail',
name: "matchDetail",
data() {
return {
id: this.$route.query.id,
coverUrl: '',
carouselUrl: '',
coverUrl: "",
carouselUrl: "",
publishStatus: 0,
uploadList: [],
uploadDataList: [],
name: '',
sponsor: '',
sponsorList: [''],
undertaker: '',
name: "",
sponsor: "",
sponsorList: [""],
undertaker: "",
undertakerList: [],
signUpStartTime: '',
signUpEndTime: '',
signupTime: '',
playTime: '',
playStartTime: '',
playEndTime: '',
description: ''
signUpStartTime: "",
signUpEndTime: "",
signupTime: "",
playTime: "",
playStartTime: "",
playEndTime: "",
description: ""
};
},
components: {
@ -133,45 +134,45 @@ export default {
watch: {
signupTime: function(val) {
if (val) {
this.signUpStartTime = val[0]
this.signUpEndTime = val[1]
this.signUpStartTime = val[0];
this.signUpEndTime = val[1];
} else {
this.signUpStartTime = ''
this.signUpEndTime = ''
this.signUpStartTime = "";
this.signUpEndTime = "";
}
},
playTime: function(val) {
if (val) {
this.playStartTime = val[0]
this.playEndTime = val[1]
this.playStartTime = val[0];
this.playEndTime = val[1];
} else {
this.playStartTime = ''
this.playEndTime = ''
this.playStartTime = "";
this.playEndTime = "";
}
}
},
mounted() {
this.getData()
this.commitId()
this.getData();
this.commitId();
},
methods: {
save(status) {
this.sponsor = this.sponsorList.filter(d=>d).join()
this.undertaker = this.undertakerList.filter(d=>d).join()
this.sponsor = this.sponsorList.filter(d => d).join();
this.undertaker = this.undertakerList.filter(d => d).join();
if(!this.name) return util.warningMsg('请填写竞赛名称')
if (!this.name) return util.warningMsg("请填写竞赛名称");
if (status == 0) {
if(!this.sponsor) return util.warningMsg('请填写主办方')
if(!this.signUpStartTime) return util.warningMsg('请选择报名时间')
if (!this.sponsor) return util.warningMsg("请填写主办方");
if (!this.signUpStartTime) return util.warningMsg("请选择报名时间");
}
let now = new Date().getTime()
let signUpStartTime = new Date(this.signUpStartTime).getTime()
let signUpEndTime = new Date(this.signUpEndTime).getTime()
let playStartTime = new Date(this.playStartTime).getTime()
let now = new Date().getTime();
let signUpStartTime = new Date(this.signUpStartTime).getTime();
let signUpEndTime = new Date(this.signUpEndTime).getTime();
let playStartTime = new Date(this.playStartTime).getTime();
// if(signUpStartTime && now > signUpStartTime) return this.$$message.warning('')
if(!this.playStartTime && status == 0) return util.warningMsg('请选择竞赛时间')
if(playStartTime && playStartTime < signUpEndTime) return util.warningMsg('竞赛时间不能早于报名结束时间')
if(!this.description && status == 0) return util.warningMsg('请填写竞赛详情')
if (!this.playStartTime && status == 0) return util.warningMsg("请选择竞赛时间");
if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间");
if (!this.description && status == 0) return util.warningMsg("请填写竞赛详情");
let data = {
id: this.id,
@ -187,67 +188,71 @@ export default {
signUpStartTime: this.signUpStartTime,
sponsor: this.sponsor,
undertaker: this.undertaker
}
};
if (this.id) {
this.$put(this.api.editContest, data).then(res => {
util.successMsg('修改成功');
this.$router.back()
util.successMsg("修改成功");
this.$router.back();
})
.catch(err => {
});
} else {
this.$post(this.api.addContest, data).then(res => {
util.successMsg('创建成功');
this.$router.back()
util.successMsg("创建成功");
this.$router.back();
})
.catch(err => {
});
}
},
getData() {
this.$get(this.api.getContest + '/' + this.id)
this.$get(this.api.getContest + "/" + this.id)
.then(res => {
let data = res.contest
this.coverUrl = data.coverUrl
this.carouselUrl = data.carouselUrl
this.description = data.description
this.name = data.name
this.playEndTime = data.playEndTime
this.playStartTime = data.playStartTime
this.publishStatus = data.publishStatus
this.signUpEndTime = data.signUpEndTime
this.signUpStartTime = data.signUpStartTime
this.sponsor = data.sponsor
this.undertaker = data.undertaker
let data = res.contest;
this.coverUrl = data.coverUrl;
this.carouselUrl = data.carouselUrl;
this.description = data.description;
this.name = data.name;
this.playEndTime = data.playEndTime;
this.playStartTime = data.playStartTime;
this.publishStatus = data.publishStatus;
this.signUpEndTime = data.signUpEndTime;
this.signUpStartTime = data.signUpStartTime;
this.sponsor = data.sponsor;
this.undertaker = data.undertaker;
this.signupTime = [data.signUpStartTime,data.signUpEndTime]
this.playTime = [data.playStartTime,data.playEndTime]
this.sponsorList = data.sponsor.split(',')
this.undertakerList = data.undertaker.split(',')
this.signupTime = [data.signUpStartTime, data.signUpEndTime];
this.playTime = [data.playStartTime, data.playEndTime];
this.sponsorList = data.sponsor.split(",");
this.undertakerList = data.undertaker.split(",");
})
.catch(err => {
});
},
commitId() {
this.$store.commit("setMatchData", { matchId : this.id})
this.$store.commit("setMatchId", { matchId: this.id });
},
handleExceed(files, fileList) {
util.warningMsg(`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`);
},
uploadSuccess(res, file, fileList) {
if (this.coverUrl) {
let fileName = this.coverUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/','')
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {}).catch(res => {});
let fileName = this.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
}).catch(res => {
});
}
this.coverUrl = res.filesResult.fileUrl
this.coverUrl = res.filesResult.fileUrl;
},
uploadLgSuccess(res, file, fileList) {
if (this.carouselUrl) {
let fileName = this.carouselUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/','')
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {}).catch(res => {});
let fileName = this.carouselUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
}).catch(res => {
});
}
this.carouselUrl = res.filesResult.fileUrl
this.carouselUrl = res.filesResult.fileUrl;
},
uploadError(err, file, fileList) {
this.$message({
@ -260,46 +265,49 @@ export default {
return this.$confirm(`确定移除 ${file.name}`);
},
handleRemove(file, fileList) {
let fileName = this.coverUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/','')
let fileName = this.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
this.coverUrl = ''
}).catch(res => {});
this.coverUrl = "";
}).catch(res => {
});
},
handleLgRemove(file, fileList) {
let fileName = this.carouselUrl.replace('https://liuwanr.oss-cn-shenzhen.aliyuncs.com/','')
let fileName = this.carouselUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
this.carouselUrl = ''
}).catch(res => {});
this.carouselUrl = "";
}).catch(res => {
});
},
uploadSure() {
this.BatchUpload = false
this.pageNo = 1
this.keyword = ''
this.getData()
this.BatchUpload = false;
this.pageNo = 1;
this.keyword = "";
this.getData();
},
goback() {
this.$confirm('确定返回?未更新的信息将不会保存。', '提示', {
type: 'warning'
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", {
type: "warning"
})
.then(() => {
this.$router.push('/match')
this.$router.push("/match");
})
.catch(() => {});
.catch(() => {
});
},
addSponsor() {
this.sponsorList.push('')
this.sponsorList.push("");
},
delSponsor(index) {
this.sponsorList.splice(index,1)
this.sponsorList.splice(index, 1);
},
addOrganizer() {
this.undertakerList.push('')
this.undertakerList.push("");
},
delOrganizer(index) {
this.undertakerList.splice(index,1)
},
this.undertakerList.splice(index, 1);
}
},
}
};
</script>
@ -316,9 +324,11 @@ $upload-lg-height: 150px;
border-radius: 6px;
cursor: pointer;
overflow: hidden;
&:hover {
border-color: #cb221c;
}
.uploader-default {
display: flex;
height: $upload-height;
@ -326,11 +336,13 @@ $upload-lg-height: 150px;
justify-content: center;
text-align: center;
background: rgba(0, 0, 0, 0.04);
i {
font-size: 20px;
font-weight: bold;
color: #8c939d;
}
p {
margin-top: 10px;
font-size: 14px;
@ -339,32 +351,39 @@ $upload-lg-height: 150px;
}
}
}
&.avatar-uploader-lg {
.el-upload {
width: 100%;
max-width: 960px;
height: $upload-lg-height;
.uploader-default {
height: $upload-lg-height;
}
}
}
.avatar {
display: block;
width: $upload-width;
height: $upload-height;
}
.avatar-lg {
display: block;
width: 100%;
height: $upload-lg-height;
}
.el-upload__tip {
margin-top: 0;
p {
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
line-height: 1;
&:first-child {
margin-bottom: 5px;
}
@ -374,10 +393,12 @@ $upload-lg-height: 150px;
/deep/ .d-inline-block {
width: 216px;
.el-select, .el-input {
width: 100%;
}
}
.inline-input {
.input-wrap {
display: flex;
@ -389,6 +410,7 @@ $upload-lg-height: 150px;
width: 216px;
margin-right: 8px;
}
.remove {
width: 16px;
height: 16px;
@ -396,10 +418,12 @@ $upload-lg-height: 150px;
cursor: pointer;
}
}
.add-btn {
margin-left: 32px;
}
}
.add-btn {
display: flex;
justify-content: center;
@ -412,6 +436,7 @@ $upload-lg-height: 150px;
border: 1px dashed rgba(0, 0, 0, 0.15);
border-radius: 4px;
cursor: pointer;
i {
margin-right: 8px;
font-size: 14px;

@ -1,6 +1,6 @@
<template>
<!-- 竞赛进展 -->
<div class="page-content" style='padding: 24px'>
<div class="page-content" style="padding: 24px">
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
@ -38,24 +38,25 @@
</template>
<script>
import util from '@/libs/util'
import util from "@/libs/util";
export default {
name: 'matchProgress',
name: "matchProgress",
data() {
return {
id: this.$route.query.id,
statusList: [
{
value: 0,
name: '未完成'
name: "未完成"
},
{
value: 1,
name: '进行中'
name: "进行中"
},
{
value: 2,
name: '已完成'
name: "已完成"
}
],
listData: [],
@ -66,79 +67,84 @@ export default {
};
},
mounted() {
this.getData()
this.getData();
},
methods: {
getData() {
this.$get(`${this.api.getContestProgress}/${this.id}`).then(res => {
this.listData = res.contestProgressList
}).catch(res => {});
this.listData = res.contestProgressList;
}).catch(res => {
});
},
saveData(row) {
let data = row
let data = row;
if (data.title.length) {
if (row.id) {
this.$put(this.api.editContestProgress, data).then(res => {
util.successMsg('修改成功')
this.getData()
}).catch(res => {});
util.successMsg("修改成功");
this.getData();
}).catch(res => {
});
} else {
this.$post(this.api.addContestProgress, data).then(res => {
util.successMsg('创建成功')
this.getData()
}).catch(res => {});
util.successMsg("创建成功");
this.getData();
}).catch(res => {
});
}
} else {
util.warningMsg('请填写标题')
util.warningMsg("请填写标题");
}
},
entry() {
this.$router.push('/permission')
this.$router.push("/permission");
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
onSearch() {
this.pageNo = 1
this.getData()
this.pageNo = 1;
this.getData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getData();
},
handleDelete(row) {
this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
type: 'warning'
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteContestProgress}/${row.id}`).then(res => {
util.successMsg('删除成功');
this.getData()
}).catch(res => {});
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
},
addData() {
if (this.listData.length) {
if (this.listData[this.listData.length - 1].id) {
this.listData.push({
contestId: this.id,
id: '',
title: '',
description: '',
id: "",
title: "",
description: "",
status: 0
})
});
} else {
util.warningMsg('请先保存新数据')
util.warningMsg("请先保存新数据");
}
} else {
this.listData.push({
contestId: this.id,
id: '',
title: '',
description: '',
id: "",
title: "",
description: "",
status: 0
})
});
}
}
}
@ -150,10 +156,12 @@ export default {
height: calc(100vh - 100px);
overflow: auto;
}
.plus {
padding: 15px 0 0;
text-align: center;
cursor: pointer;
i {
font-size: 24px;
color: #cb221c;

@ -1,6 +1,6 @@
<template>
<!-- 报名人员 -->
<div class="page-content" style='padding: 24px'>
<div class="page-content" style="padding: 24px">
<div class="tool">
<ul class="filter">
<li>
@ -50,15 +50,16 @@
</template>
<script>
import util from '@/libs/util'
import Setting from '@/setting'
import util from "@/libs/util";
import Setting from "@/setting";
export default {
name: 'matchSignup',
name: "matchSignup",
data() {
return {
token: util.local.get(Setting.tokenKey),
id: this.$route.query.id,
keyword: '',
keyword: "",
listData: [],
multipleSelection: [],
pageNo: 1,
@ -68,33 +69,34 @@ export default {
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getData()
},500)
this.getData();
}, 500);
}
},
mounted() {
this.getData()
this.getData();
},
methods: {
getData() {
let data = {
contestId: this.id
}
if(this.keyword) data.name = this.keyword
};
if (this.keyword) data.name = this.keyword;
this.$get(`${this.api.queryApplicantByCondition}/${this.pageNo}/${this.pageSize}`, data).then(res => {
this.listData = res.data.applicantList
this.totals = res.data.total
this.$refs.table.clearSelection()
}).catch(res => {});
this.listData = res.data.applicantList;
this.totals = res.data.total;
this.$refs.table.clearSelection();
}).catch(res => {
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
onSearch() {
this.pageNo = 1
this.getData()
this.pageNo = 1;
this.getData();
},
handleCurrentChange(val) {
this.pageNo = val;
@ -102,46 +104,50 @@ export default {
},
switchOff(val, row, index) {
this.$put(`${this.api.disableApplicant}/${row.id}/${val}`)
.then(res => {})
.catch(err => {});
.then(res => {
})
.catch(err => {
});
},
disalbeAllData() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection;
let delList = newArr.map(item => {
return item.id
})
return item.id;
});
this.$confirm('确定要禁用吗?', '提示', {
type: 'warning'
this.$confirm("确定要禁用吗?", "提示", {
type: "warning"
})
.then(() => {
console.log(11,delList.join())
this.$put(`${this.api.disableContests}?ids=${delList.join(',')}`).then(res => {
console.log(11, delList.join());
this.$put(`${this.api.disableContests}?ids=${delList.join(",")}`).then(res => {
this.multipleSelection = [];
util.successMsg('禁用成功');
this.getData()
}).catch(res => {});
util.successMsg("禁用成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
} else {
util.errorMsg('请先选择数据 !');
util.errorMsg("请先选择数据 !");
}
},
exportAll() {
location.href = `${this.api.excelExport}/${this.id}/token=${this.token}`
location.href = `${this.api.excelExport}/${this.id}/token=${this.token}`;
},
exportBatch() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection;
let data = newArr.map(item => {
return item.id
})
return item.id;
});
// return console.log(11,data)
location.href = `${this.api.batchExport}?ids=${data.join(',')}/token=${this.token}`
location.href = `${this.api.batchExport}?ids=${data.join(",")}/token=${this.token}`;
} else {
util.errorMsg('请先选择数据 !');
util.errorMsg("请先选择数据 !");
}
}

@ -221,7 +221,6 @@ export default {
founder: 0, // (0 1)
projectName: "", //
permissions: 0, // (0 1 2)
schoolId: Setting.schoolId,
systemId: this.$store.state.project.lastSystemId, // id
hintOpen: 0, // (0 1 0)
experimentHint: "", //
@ -291,7 +290,7 @@ export default {
this.getInfoData();
}
//
if (JSON.stringify(this.projectFields) != '{}') {
if (JSON.stringify(this.projectFields) != "{}") {
let { projectManage, projectJudgmentData } = this.projectFields;
this.projectManage = projectManage;
this.projectJudgmentData = projectJudgmentData;
@ -319,7 +318,7 @@ export default {
}
},
getInfoData() { //
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}&schoolId=${this.projectManage.schoolId}`).then(res => {
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
if (res.status === 200) {
let { projectManage, projectJudgmentVos } = res;
this.projectManage = projectManage;
@ -627,7 +626,7 @@ export default {
// python
href = `${host}jdTrials/#/program?isEdit=true&systemId=${systemId}&bcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`;
}
} else if (type === 'home') {
} else if (type === "home") {
if (systemId == 2 || systemId == 3) {
href = `${host}jdTrials/#/list`;
} else {

@ -10,17 +10,24 @@
<ul class="filter">
<li>
<label>创建人</label>
<el-select size="small" v-model="queryData.founder" clearable placeholder="请选择创建人"
@change="initData">
<el-option v-for="(item,index) in founderList" :key="index" :label="item.label"
:value="item.value"></el-option>
<el-select size="small" v-model="queryData.founder" clearable placeholder="请选择创建人" @change="initData">
<el-option
v-for="(item,index) in founderList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</li>
<li>
<label>状态</label>
<el-select size="small" v-model="queryData.state" clearable placeholder="请选择状态" @change="initData">
<el-option v-for="(item,index) in stateList" :key="index" :label="item.label"
:value="item.value"></el-option>
<el-option
v-for="(item,index) in stateList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</li>
<li>
@ -46,8 +53,7 @@
</el-select>
</li>
<li>
<el-input size="small" placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="keyword"
clearable></el-input>
<el-input size="small" placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</li>
</ul>
<div>
@ -123,97 +129,96 @@
</template>
<script>
import Setting from '@/setting';
import { mapState, mapActions } from 'vuex';
import Setting from "@/setting";
import { mapState, mapActions } from "vuex";
export default {
data() {
return {
showBack: Boolean(this.$route.query.show),
roleIdEd: this.roleId ? 13 : this.roleId,// roleId13roleId14113,1413>
systemId: '',
systemId: "",
systemList: Setting.systemList,
queryData: {
schoolId: Setting.schoolId, // id
platformId: 1, // :1 :3
founder: 0, // (0: 1:)
state: "", // (0:稿 1:)
permissions: "", // (0: 1: 2:)
permissions: "" // (0: 1: 2:)
},
keyword: '',
status: '',
keyword: "",
status: "",
listData: [],
total: 0,
permissionsList: [
{
value: '',
label: '不限'
value: "",
label: "不限"
},
{
value: 0,
label: '练习'
label: "练习"
},
{
value: 1,
label: '考核'
label: "考核"
},
{
value: 2,
label: '竞赛'
label: "竞赛"
}
],
permissionsKeys: {
0: '练习',
1: '考核',
2: '竞赛'
0: "练习",
1: "考核",
2: "竞赛"
},
founderList: [
{
value: 0,
label: '系统'
label: "系统"
},
{
value: 1,
label: '老师'
label: "老师"
}
],
founderKeys: {
0: '系统',
1: '老师'
0: "系统",
1: "老师"
},
stateList: [
{
value: '',
label: '不限'
value: "",
label: "不限"
},
{
value: 0,
label: '草稿箱'
label: "草稿箱"
},
{
value: 1,
label: '已发布'
label: "已发布"
}
],
stateKeys: {
0: '草稿箱',
1: '已发布'
0: "草稿箱",
1: "已发布"
},
page: 1,
pageSize: 10,
multipleSelection: [],
copyVisible: false,
projectName: '',
projectName: "",
currentRow: {}, //
listDataAll: []
};
},
computed: {
...mapState('user', [
'userId', 'roleId'
...mapState("user", [
"userId", "roleId"
]),
...mapState('project', [
'lastSystemId', 'assFields'
...mapState("project", [
"lastSystemId", "assFields"
])
},
watch: {
@ -227,12 +232,12 @@ export default {
mounted() {
// systemIdsystemIdsystemId
this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId;
console.log(this.systemId, '外面的sysid');
console.log(this.systemId, "外面的sysid");
this.getData();
},
methods: {
...mapActions('project', [
'setSystemId'
...mapActions("project", [
"setSystemId"
]),
getData() {
this.setSystemId(this.systemId);
@ -263,7 +268,7 @@ export default {
},
add() { //
this.setSystemId(this.systemId);
this.$router.push('/project/add');
this.$router.push("/project/add");
},
edit(row) { //
this.setSystemId(row.systemId);
@ -275,7 +280,7 @@ export default {
delAllData() { //
if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(item => {
return item.projectId
return item.projectId;
});
let strIds = ids.toString();
this.handleDelete(strIds);
@ -284,8 +289,8 @@ export default {
}
},
handleDelete(ids) { //
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.deleteProjectManage}?projectIds=${ids}&platformId=${this.queryData.platformId}`).then(res => {
if (res.status === 200) {
@ -298,13 +303,13 @@ export default {
console.log(err);
});
}).catch(() => {
this.$message.info('已取消删除');
this.$message.info("已取消删除");
});
},
switchOff(row) { //
this.$get(`${this.api.updateIsOpen}?isOpen=${row.isOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => {
if (res.status === 200) {
util.successMsg('更新启用状态成功');
util.successMsg("更新启用状态成功");
this.getData();
} else {
util.errorMsg(res.message);
@ -336,7 +341,7 @@ export default {
this.currentRow = {
projectManage: res.projectManage,
projectJudgmentList: res.projectJudgmentVos
}
};
}
}).catch(err => {
console.log(err);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -10,23 +10,24 @@
</template>
<script>
import Setting from '@/setting'
import { mapState } from 'vuex'
import staff from './staff'
import role from './role'
import Setting from "@/setting";
import { mapState } from "vuex";
import staff from "./staff";
import role from "./role";
export default {
data() {
return {
active: 'staff',
active: "staff",
tabs: {
staff: '员工管理',
role: '角色权限'
},
staff: "员工管理",
role: "角色权限"
}
};
},
computed: {
...mapState('auth', [
'routes'
...mapState("auth", [
"routes"
])
},
components: {
@ -35,22 +36,22 @@ export default {
},
created() {
console.log("routes===", this.routes);
Setting.dynamicRoute && this.initTabs()
Setting.dynamicRoute && this.initTabs();
},
methods: {
tabChange(index) {
this.active = index
this.active = index;
},
initTabs() {
let btnPermissions = this.routes
let tab1 = btnPermissions.includes('系统设置:员工管理')
let tab2 = btnPermissions.includes('系统设置:角色权限')
let btnPermissions = this.routes;
let tab1 = btnPermissions.includes("系统设置:员工管理");
let tab2 = btnPermissions.includes("系统设置:角色权限");
if (!tab1) {
delete this.tabs.staff
delete this.tabs.staff;
}
if (!tab2) {
delete this.tabs.role
delete this.tabs.role;
}
}
}

@ -66,24 +66,25 @@
</template>
<script>
import Setting from '@/setting'
import util from '@/libs/util'
import { mapState, mapActions } from 'vuex'
import Setting from "@/setting";
import util from "@/libs/util";
import { mapState, mapActions } from "vuex";
export default {
data() {
return {
keyword: '',
keyword: "",
searchTimer: null,
isDetail: false,
form: {
roleId: '',
name: '',
description: '',
roleId: "",
name: "",
description: ""
},
listData: [],
defaultProps: {
children: 'children',
label: 'name'
children: "children",
label: "name"
},
page: 1,
pageSize: 10,
@ -97,14 +98,14 @@ export default {
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getData()
},500)
this.getData();
}, 500);
}
},
mounted() {
this.getData()
this.getData();
},
methods: {
getData() {
@ -112,30 +113,33 @@ export default {
name: util.encodeStr(this.keyword),
page: this.page,
size: this.pageSize
}
};
this.$get(this.api.rolePermissionList, data).then(res => {
this.listData = res.data.list
this.total = res.data.totalCount
}).catch(res => {});
this.listData = res.data.list;
this.total = res.data.totalCount;
}).catch(res => {
});
},
currentChange(val) {
this.page = val;
this.getData();
},
handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
let data = {
roleIds: [row.roleId]
}
};
this.$post(`${this.api.delRolePermission}`, data).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {})
.catch(() => {
});
},
getRowKeys(row) {
return row.roleId;
@ -145,130 +149,136 @@ export default {
},
delAllSelection() {
if (this.multipleSelection.length) {
let newArr = this.multipleSelection
let newArr = this.multipleSelection;
let delList = newArr.map(item => {
return item.roleId
})
return item.roleId;
});
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
let data = {
roleIds: delList
}
};
this.$post(`${this.api.delRolePermission}`, data).then(res => {
this.$refs.table.clearSelection()
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {})
.catch(() => {
});
} else {
util.errorMsg('请先选择数据!')
util.errorMsg("请先选择数据!");
}
},
closeRole() {
this.isDetail = false
this.isDetail = false;
this.form = {
roleId: '',
name: '',
description: ''
}
this.checkedIds = []
this.permissions = []
roleId: "",
name: "",
description: ""
};
this.checkedIds = [];
this.permissions = [];
},
//
getPer(row) {
if (!this.permissions.length) {
this.$get(this.api.roleTree).then(res => {
let data = res.data
let data = res.data;
//
let yw = data.findIndex(n => n.name == '业务后台')
yw != -1 && data.splice(yw,1)
let yw = data.findIndex(n => n.name == "业务后台");
yw != -1 && data.splice(yw, 1);
try {
let system = data.findIndex(n => n.name == '系统设置')
let system = data.findIndex(n => n.name == "系统设置");
if (system != -1) {
data[system].children[1].children.splice(4,1)
data[system].children[1].children.splice(1,1)
data[system].children[1].children.splice(0,1)
data[system].children[1].children.splice(4, 1);
data[system].children[1].children.splice(1, 1);
data[system].children[1].children.splice(0, 1);
}
} catch (error) {}
this.permissions = data
} catch (error) {
}
this.permissions = data;
if (row) {
this.getDetail(row)
this.getDetail(row);
}
}).catch(res => {})
}).catch(res => {
});
}
},
addRole() {
this.isAdd = true
this.getPer()
this.checkedIds = []
this.permissions.length && this.$refs.per.setCheckedNodes([])
this.roleVisible = true
this.isAdd = true;
this.getPer();
this.checkedIds = [];
this.permissions.length && this.$refs.per.setCheckedNodes([]);
this.roleVisible = true;
},
//
handleRolePer(data, permissions) {
let result = data
let result = data;
if (permissions.length) {
permissions.map(e => {
if (result.includes(e.id) && e.children) {
// ,idid,,,
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id),1)
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1);
}
e.children && e.children.length && this.handleRolePer(data,e.children)
})
e.children && e.children.length && this.handleRolePer(data, e.children);
});
}
return result
return result;
},
async getDetail(row) {
let res = await this.$get(`${this.api.queryPermissionArrById}?roleId=${row.roleId}`)
let res = await this.$get(`${this.api.queryPermissionArrById}?roleId=${row.roleId}`);
if (res.success) {
this.form = res.data
this.form.roleId = row.roleId
this.checkedIds = this.handleRolePer(res.data.permissionIds,this.permissions)
this.$refs.per.setCheckedNodes(this.checkedIds)
this.form = res.data;
this.form.roleId = row.roleId;
this.checkedIds = this.handleRolePer(res.data.permissionIds, this.permissions);
this.$refs.per.setCheckedNodes(this.checkedIds);
}
},
showRole(row) {
this.isDetail = true
this.isAdd = false
this.getPer(row)
this.roleVisible = true
this.isDetail = true;
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
editRole(row) {
this.isAdd = false
this.getPer(row)
this.roleVisible = true
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
async saveData() {
if(!this.form.name) return util.warningMsg('请填写角色名称')
if(!this.form.description) return util.warningMsg('请填写角色描述')
if(!this.$refs.per.getCheckedKeys().length) return util.warningMsg('请选择角色权限')
if (!this.form.name) return util.warningMsg("请填写角色名称");
if (!this.form.description) return util.warningMsg("请填写角色描述");
if (!this.$refs.per.getCheckedKeys().length) return util.warningMsg("请选择角色权限");
// ,(),
let permissionIds = [...this.$refs.per.getHalfCheckedKeys(),...this.$refs.per.getCheckedKeys()]
let permissionIds = [...this.$refs.per.getHalfCheckedKeys(), ...this.$refs.per.getCheckedKeys()];
let data = {
roleId: this.form.roleId,
name: this.form.name,
description: this.form.description,
permissionIds
}
};
if (this.form.roleId) {
this.$post(this.api.updateRolePermission, data).then(res => {
util.successMsg('修改成功')
this.getData()
this.roleVisible = false
}).catch(res => {})
util.successMsg("修改成功");
this.getData();
this.roleVisible = false;
}).catch(res => {
});
} else {
this.$post(this.api.saveRolePermission, data).then(res => {
util.successMsg('新增成功')
this.getData()
this.roleVisible = false
}).catch(res => {})
util.successMsg("新增成功");
this.getData();
this.roleVisible = false;
}).catch(res => {
});
}
}
},
}
};
</script>

File diff suppressed because it is too large Load Diff

@ -34,10 +34,11 @@
</div>
</template>
<script>
import Setting from '@/setting'
import util from '@/libs/util'
import { mapState, mapActions } from 'vuex'
import lctree from './stafftree'
import Setting from "@/setting";
import util from "@/libs/util";
import { mapState, mapActions } from "vuex";
import lctree from "./stafftree";
export default {
props: ["Data"],
data() {
@ -49,21 +50,21 @@ export default {
isAddDepartment: false,
schoolId: Setting.schoolId,
Form: {
MajorId: '',
majorName: '',
departmentId: '',
departmentName: ''
MajorId: "",
majorName: "",
departmentId: "",
departmentName: ""
},
rules: {
majorName: [
{ required: true, message: '请输入专业名称', trigger: 'blur' }
{ required: true, message: "请输入专业名称", trigger: "blur" }
],
departmentName: [
{ required: true, message: '请输入部门名称', trigger: 'blur' }
{ required: true, message: "请输入部门名称", trigger: "blur" }
]
},
staffstateProfessId: '',
staffstateId: '',
staffstateProfessId: "",
staffstateId: "",
majorNoAdd: true
};
},
@ -71,89 +72,92 @@ export default {
lctree
},
mounted() {
this.getStaff()
this.getStaff();
},
methods: {
getStaff() {
let data = {
schoolId: this.schoolId
}
};
this.$get(this.api.queryStaffPro, data).then(res => {
if (res.message) {
res.message.map(e => {
(e.ifVisible = false), (e.ischeck = false), (e.label = e.staffProfessionalArchitectureName);
let data = {
staffProfessionalArchitectureId: e.staffProfessionalArchitectureId
}
};
this.$get(this.api.queryStaffGrade, data).then(res => {
res.message.map(e => {
(e.ischeck = false), (e.label = e.staffGradeName);
})
e.children = res.message
}).catch(res => {});
})
});
e.children = res.message;
}).catch(res => {
});
});
}
setTimeout(() => {
this.majorList = res.message
this.majorList = res.message;
}, 500);
}).catch(res => {});
}).catch(res => {
});
},
//
fircheckitem(item) {
this.$emit("fircheck",item,this.majorList)
this.$emit("fircheck", item, this.majorList);
},
//
twocheckitem(item) {
this.$emit("twocheck",item,this.majorList)
this.$emit("twocheck", item, this.majorList);
},
closeAdd() {
this.$refs.Form.resetFields()
this.$refs.Form.resetFields();
},
//
addMajor() {
this.Form.MajorId = ''
this.Form.majorName = ''
this.isaddMajor = true
this.Form.MajorId = "";
this.Form.majorName = "";
this.isaddMajor = true;
},
editMajor(item) {
this.Form.MajorId = item.staffProfessionalArchitectureId,
this.Form.majorName = item.staffProfessionalArchitectureName
this.isaddMajor = true
this.Form.majorName = item.staffProfessionalArchitectureName;
this.isaddMajor = true;
},
async majorChange() {
let res = await this.$get(this.api.queryStaffPAN, { name: this.Form.majorName, schoolId: this.schoolId });
if (res.message.length != 0) {
util.warningMsg('该一级部门已存在');
this.majorNoAdd = false
util.warningMsg("该一级部门已存在");
this.majorNoAdd = false;
} else {
this.majorNoAdd = true
this.majorNoAdd = true;
}
},
sure(Form) {
this.$refs[Form].validate((valid) => {
if (valid) {
if(!this.majorNoAdd) return util.warningMsg('该一级部门已存在');
if (!this.majorNoAdd) return util.warningMsg("该一级部门已存在");
let data = {
staffProfessionalArchitectureName: this.Form.majorName,
staffProfessionalArchitectureId: this.Form.MajorId,
schoolId: this.schoolId,
}
schoolId: this.schoolId
};
if (this.Form.MajorId) {
this.$post(this.api.updateStaffPro, data).then(res => {
util.successMsg('编辑成功');
this.isaddMajor = false
util.successMsg("编辑成功");
this.isaddMajor = false;
this.majorList.map(e => {
if (e.staffProfessionalArchitectureId == this.Form.MajorId) {
e.staffProfessionalArchitectureName = this.Form.majorName
e.label = this.Form.majorName
e.staffProfessionalArchitectureName = this.Form.majorName;
e.label = this.Form.majorName;
}
})
this.$emit('getData')
}).catch(res => {});
});
this.$emit("getData");
}).catch(res => {
});
} else {
this.$post(this.api.addStaffPro, data).then(res => {
util.successMsg('添加成功');
this.isaddMajor = false
util.successMsg("添加成功");
this.isaddMajor = false;
let newData = {
staffProfessionalArchitectureId: res.message,
staffProfessionalArchitectureName: this.Form.majorName,
@ -161,30 +165,31 @@ export default {
ifVisible: false,
ischeck: false,
children: []
}
this.majorList.push(newData)
}).catch(res => {});
};
this.majorList.push(newData);
}).catch(res => {
});
}
} else {
return false;
}
})
});
},
//
addDepartment(item) {
this.Form.departmentId = ''
this.Form.departmentName = ''
this.isAddDepartment = true
this.Form.MajorId = item.staffProfessionalArchitectureId
this.Form.departmentId = "";
this.Form.departmentName = "";
this.isAddDepartment = true;
this.Form.MajorId = item.staffProfessionalArchitectureId;
},
editDepartment(item) {
this.Form.departmentId = item.staffGradeId,
this.Form.departmentName = item.staffGradeName
this.isAddDepartment = true
this.Form.departmentName = item.staffGradeName;
this.isAddDepartment = true;
for (let j = 0; j < this.majorList.length; j++) {
for (let k = 0; k < this.majorList[j].children.length; k++) {
if (this.majorList[j].children[k].staffGradeName == item.staffGradeName) {
this.Form.MajorId = this.majorList[j].staffProfessionalArchitectureId
this.Form.MajorId = this.majorList[j].staffProfessionalArchitectureId;
}
}
}
@ -196,87 +201,97 @@ export default {
staffGradeName: this.Form.departmentName,
staffProfessionalArchitectureId: this.Form.MajorId,
staffGradeId: this.Form.departmentId
}
};
if (this.Form.departmentId) {
this.$post(this.api.updateStaffGrade, data).then(res => {
util.successMsg('编辑成功');
this.isAddDepartment = false
util.successMsg("编辑成功");
this.isAddDepartment = false;
this.majorList.map(e => {
e.children.map(r => {
if (r.staffGradeId == this.Form.departmentId) {
r.staffGradeName = this.Form.departmentName
r.label = this.Form.departmentName
r.staffGradeName = this.Form.departmentName;
r.label = this.Form.departmentName;
}
})
})
}).catch(res => {});
});
});
}).catch(res => {
});
} else {
this.$post(this.api.addStaffGrade, data).then(res => {
util.successMsg('添加成功');
this.isAddDepartment = false
util.successMsg("添加成功");
this.isAddDepartment = false;
let newData = {
staffGradeId: res.message,
staffGradeName: this.Form.departmentName,
label: this.Form.departmentName,
ifVisible: false,
ischeck: false
}
};
this.majorList.map(e => {
if (e.staffProfessionalArchitectureId == this.Form.MajorId) {
e.ifVisible = true
e.children.push(newData)
e.ifVisible = true;
e.children.push(newData);
}
})
}).catch(res => {});
});
}).catch(res => {
});
}
} else {
return false;
}
})
});
},
delMajor(item, index) {
this.$confirm('确定要删除该专业吗?该操作将会删除该组织下的用户账号。', '提示', {
type: 'warning'
this.$confirm("确定要删除该专业吗?该操作将会删除该组织下的用户账号。", "提示", {
type: "warning"
})
.then(() => {
let data = {
staffProfessionalArchitectureId: item.staffProfessionalArchitectureId
}
};
this.$post(this.api.deleteStaffPro, data).then(res => {
util.successMsg('删除成功');
this.majorList.splice(index, 1)
this.$emit('getData')
this.$get(`${this.api.dalStaffByProfessionalId}?staffProfessionalArchitectureId=${item.staffProfessionalArchitectureId}`).then(res => {}).catch(res => {})
}).catch(res => {});
util.successMsg("删除成功");
this.majorList.splice(index, 1);
this.$emit("getData");
this.$get(`${this.api.dalStaffByProfessionalId}?staffProfessionalArchitectureId=${item.staffProfessionalArchitectureId}`).then(res => {
}).catch(res => {
});
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
},
delDepartment(item, indx) {
this.$confirm('确定要删除该部门吗?该操作将会删除该组织下的用户账号。', '提示', {
type: 'warning'
this.$confirm("确定要删除该部门吗?该操作将会删除该组织下的用户账号。", "提示", {
type: "warning"
})
.then(() => {
let data = {
staffGradeId: item.staffGradeId
}
};
this.$post(this.api.deleteStaffGrade, data).then(res => {
util.successMsg('删除成功');
util.successMsg("删除成功");
this.majorList.map(e => {
e.children.map(r => {
if (r.staffGradeId == item.staffGradeId) {
e.children.splice(indx,1)
e.children.splice(indx, 1);
if (e.children.length == 0) {
e.ifVisible = false
}
}
})
})
this.$emit("delDep",item,this.majorList)
this.$emit('getData')
this.$get(`${this.api.dalStaffByStaffGradeId}?staffGradeId=${item.staffGradeId}`).then(res => {}).catch(res => {})
}).catch(res => {});
e.ifVisible = false;
}
}
});
});
this.$emit("delDep", item, this.majorList);
this.$emit("getData");
this.$get(`${this.api.dalStaffByStaffGradeId}?staffGradeId=${item.staffGradeId}`).then(res => {
}).catch(res => {
});
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
}
}
};
@ -288,23 +303,28 @@ export default {
background-color: #fff;
box-shadow: -2px 0px 57px 0px rgba(192, 189, 216, 0.39);
}
.side_icon {
text-align: right;
}
.side_icon i {
cursor: pointer;
font-size: 20px;
color: #9278FF;
}
.side_tree {
width: 100%;
font-size: 14px;
color: #333;
}
.side_tree i {
color: #9278FF;
margin-left: 10px;
}
.fir_back {
width: 100%;
padding: 15px 0;
@ -313,19 +333,24 @@ export default {
border-radius: 10px;
text-align: left;
}
.fir_back:first-child {
margin-top: 20px;
}
.fir_back:hover {
box-shadow: 1px 14px 29px 0px rgba(138, 97, 250, 0.19);
cursor: pointer;
}
.fir_back span {
margin-left: 10px;
}
.two_active {
color: #9278FF;
}
/* .two_active:hover{
color: #9278FF;
cursor:pointer;
@ -334,30 +359,44 @@ export default {
cursor: pointer;
color: #9278FF;
}
.mar_top {
margin-top: 20px;
}
.back_active {
box-shadow: 1px 14px 29px 0px rgba(138, 97, 250, 0.19);
}
.bor_lef {
padding: 20px 0 0 0;
margin-left: 40px;
}
.three_lef {
margin-left: 60px;
padding: 20px 0;
}
.three_text {
font-size: 14px;
margin-top: 10px;
}
.teacher_tab {
margin-left: 20px;
}
.icon_select:before {
transform: rotate(180deg);
}
.list-enter-active, .list-leave-active { transition: all 1s; }
.list-enter, .list-leave-to { opacity: 0; transform: translateY(-30px); }
.list-enter-active, .list-leave-active {
transition: all 1s;
}
.list-enter, .list-leave-to {
opacity: 0;
transform: translateY(-30px);
}
</style>

@ -14,7 +14,11 @@
<i v-else class="empty"></i>
<i :class="item.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fircheckitem(item)"></i>
<span>{{ item.label }}</span>
<svg t="1604370117041" class="icon edit ft" @click.stop="editMajor(item)" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9029" width="16" height="16"><path d="M511.979 30.125c-266.13 0-481.871 215.741-481.871 481.871s215.741 481.871 481.871 481.871S993.85 778.126 993.85 511.996 778.109 30.125 511.979 30.125zM459.644 693.015c-15.876 18.135-22.818 22.486-44.972 30.657-34.111 12.787-96.687 36.27-137.374 51.515-7.706 3.056-36.735 1.495-24.578-27.036 13.784-39.757 34.045-98.414 45.636-131.894 8.436-23.615 11.758-29.76 28.73-45.603l175.271-175.271 124.055 124.088C626.413 519.471 508.469 642.264 459.644 693.015zM653.084 492.867 528.996 368.779l26.605-26.605 124.088 124.121L653.084 492.867zM759.469 386.482l-53.176 53.209L582.205 315.569l53.209-53.176c19.596-19.596 51.316-19.596 70.912 0l53.209 53.176C779.065 335.166 779.065 366.919 759.469 386.482z" p-id="9030" fill="#9076ff"></path></svg>
<svg t="1604370117041" class="icon edit ft" @click.stop="editMajor(item)" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9029" width="16" height="16">
<path
d="M511.979 30.125c-266.13 0-481.871 215.741-481.871 481.871s215.741 481.871 481.871 481.871S993.85 778.126 993.85 511.996 778.109 30.125 511.979 30.125zM459.644 693.015c-15.876 18.135-22.818 22.486-44.972 30.657-34.111 12.787-96.687 36.27-137.374 51.515-7.706 3.056-36.735 1.495-24.578-27.036 13.784-39.757 34.045-98.414 45.636-131.894 8.436-23.615 11.758-29.76 28.73-45.603l175.271-175.271 124.055 124.088C626.413 519.471 508.469 642.264 459.644 693.015zM653.084 492.867 528.996 368.779l26.605-26.605 124.088 124.121L653.084 492.867zM759.469 386.482l-53.176 53.209L582.205 315.569l53.209-53.176c19.596-19.596 51.316-19.596 70.912 0l53.209 53.176C779.065 335.166 779.065 366.919 759.469 386.482z"
p-id="9030" fill="#9076ff"></path>
</svg>
<i class="el-icon-circle-plus ft fz" @click.stop="addDepartment(item)"></i>
<i class="icon-delete ft" @click.stop="delMajor(item,index)"></i>
</div>
@ -24,7 +28,11 @@
<div class="item2" @click.stop="open(item1,2)">
<i :class="item1.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="twocheckitem(item1)"></i>
<span>{{ item1.label }}</span>
<svg t="1604370117041" class="icon edit ft" @click.stop="editDepartment(item1)" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9029" width="16" height="16"><path d="M511.979 30.125c-266.13 0-481.871 215.741-481.871 481.871s215.741 481.871 481.871 481.871S993.85 778.126 993.85 511.996 778.109 30.125 511.979 30.125zM459.644 693.015c-15.876 18.135-22.818 22.486-44.972 30.657-34.111 12.787-96.687 36.27-137.374 51.515-7.706 3.056-36.735 1.495-24.578-27.036 13.784-39.757 34.045-98.414 45.636-131.894 8.436-23.615 11.758-29.76 28.73-45.603l175.271-175.271 124.055 124.088C626.413 519.471 508.469 642.264 459.644 693.015zM653.084 492.867 528.996 368.779l26.605-26.605 124.088 124.121L653.084 492.867zM759.469 386.482l-53.176 53.209L582.205 315.569l53.209-53.176c19.596-19.596 51.316-19.596 70.912 0l53.209 53.176C779.065 335.166 779.065 366.919 759.469 386.482z" p-id="9030" fill="#9076ff"></path></svg>
<svg t="1604370117041" class="icon edit ft" @click.stop="editDepartment(item1)" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9029" width="16" height="16">
<path
d="M511.979 30.125c-266.13 0-481.871 215.741-481.871 481.871s215.741 481.871 481.871 481.871S993.85 778.126 993.85 511.996 778.109 30.125 511.979 30.125zM459.644 693.015c-15.876 18.135-22.818 22.486-44.972 30.657-34.111 12.787-96.687 36.27-137.374 51.515-7.706 3.056-36.735 1.495-24.578-27.036 13.784-39.757 34.045-98.414 45.636-131.894 8.436-23.615 11.758-29.76 28.73-45.603l175.271-175.271 124.055 124.088C626.413 519.471 508.469 642.264 459.644 693.015zM653.084 492.867 528.996 368.779l26.605-26.605 124.088 124.121L653.084 492.867zM759.469 386.482l-53.176 53.209L582.205 315.569l53.209-53.176c19.596-19.596 51.316-19.596 70.912 0l53.209 53.176C779.065 335.166 779.065 366.919 759.469 386.482z"
p-id="9030" fill="#9076ff"></path>
</svg>
<i class="icon-delete ft" @click.stop="delDepartment(item1,index1)"></i>
</div>
</div>
@ -50,7 +58,7 @@ export default {
},
watch: {
chooseList(n, o) {
this.$emit('chooseNode', n);
this.$emit("chooseNode", n);
}
},
@ -63,7 +71,7 @@ export default {
//
open(item, type) {
item.ifVisible = !item.ifVisible;
type == 1 ? this.$emit('fircheckitem',item) : this.$emit('twocheckitem',item)
type == 1 ? this.$emit("fircheckitem", item) : this.$emit("twocheckitem", item);
},
//removeByvaluemain.js
@ -76,40 +84,40 @@ export default {
}
},
fircheckitem(item) {
this.$emit('fircheckitem',item);
this.$emit("fircheckitem", item);
},
twocheckitem(item) {
this.$emit('twocheckitem',item);
this.$emit("twocheckitem", item);
},
//
addMajor() {
this.$emit('addMajor');
this.$emit("addMajor");
},
editMajor(item) {
this.$emit('editMajor',item);
this.$emit("editMajor", item);
},
delMajor(item, index) {
this.$emit('delMajor',item,index);
this.$emit("delMajor", item, index);
},
//
addDepartment(item) {
this.$emit('addDepartment',item);
this.$emit("addDepartment", item);
},
editDepartment(item) {
this.$emit('editDepartment',item);
this.$emit("editDepartment", item);
},
delDepart(item, index) {
this.$emit('delDepart',item,index);
this.$emit("delDepart", item, index);
},
//
addClass(item) {
this.$emit('addClass',item);
this.$emit("addClass", item);
},
editDepartment(item) {
this.$emit('editDepartment',item);
this.$emit("editDepartment", item);
},
delDepartment(item, index) {
this.$emit('delDepartment',item,index);
this.$emit("delDepartment", item, index);
},
//
isHasObj(arr, val) {
@ -161,22 +169,27 @@ $outColor: rgba(255, 255, 255, 0.8); //外部节点的边框颜色
text-align: left;
margin-top: 20px;
}
.item:first {
margin-top: 0;
}
.item .empty {
width: 20px;
}
.edit {
width: 18px !important;
height: 18px !important;
margin-left: 10px;
}
.item2 {
@include public;
margin-top: 20px;
margin-left: 60px
}
.item2:hover {
color: #9278FF;
}
@ -195,6 +208,7 @@ li {
transform-origin: center;
transform: rotateZ(0deg);
}
.arrowTransformReturn {
transition: 0.4s;
transform-origin: center;
@ -222,29 +236,36 @@ li {
padding: 40px 20px;
background-color: #fff;
box-shadow: -2px 0px 57px 0px rgba(192, 189, 216, 0.39);
i {
color: #9278FF;
}
}
.side_icon {
text-align: right;
}
.side_icon i {
cursor: pointer;
font-size: 20px;
}
.side_tree {
width: 100%;
font-size: 14px;
color: #333;
i {
margin-left: 10px;
}
span {
margin-left: 5px;
font-size: 14px;
}
}
.fz {
font-size: 20px;
}

@ -3,25 +3,25 @@
* 当传入的权限当前用户没有时会移除该组件
* 用例<Tag v-auth>text</Tag> <Tag v-auth="'user:'">text</Tag>
* */
import store from '@/store'
import store from "@/store";
export default {
inserted(el, binding, vnode) {
let btnText = ''
let btnText = "";
// 如果有传值,就取传的值,否则,就取页面路由和按钮名字拼接起来
if (binding.value) {
btnText = binding.value
btnText = binding.value;
} 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) {
const isPermission = btnPermissions.includes(btnText)
const isPermission = btnPermissions.includes(btnText);
// 如果按钮集合里没有该权限,就把该按钮给去除
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>
* */
const defaultShow = (val) => {
return val == null ? '--' : val
}
return val == null ? "--" : val;
};
module.exports = {
defaultShow
}
};

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

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

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

@ -1,7 +1,7 @@
import Vue from 'vue';
import Router from 'vue-router';
import routes from './routes';
import Setting from '@/setting';
import Vue from "vue";
import Router from "vue-router";
import routes from "./routes";
import Setting from "@/setting";
Vue.use(Router);

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home'
import BasicLayout from "@/layouts/home";
const meta = {}
const meta = {};
const pre = 'achievement-'
const pre = "achievement-";
export default {
path: '/achievement',
name: 'achievement',
path: "/achievement",
name: "achievement",
redirect: {
name: `${pre}list`
},
@ -16,28 +16,28 @@ export default {
{
name: `${pre}list`,
path: `list`,
component: () => import('@/pages/achievement/list'),
meta: { title: '成绩管理' }
component: () => import("@/pages/achievement/list"),
meta: { title: "成绩管理" }
}, {
name: `${pre}vir`,
path: `vir`,
component: () => import('@/pages/achievement/vir'),
meta: { title: '成绩管理' }
component: () => import("@/pages/achievement/vir"),
meta: { title: "成绩管理" }
}, {
name: `${pre}teach`,
path: `teach`,
component: () => import('@/pages/achievement/teach'),
meta: { title: '成绩管理' }
component: () => import("@/pages/achievement/teach"),
meta: { title: "成绩管理" }
}, {
name: `${pre}ass`,
path: `ass`,
component: () => import('@/pages/achievement/ass'),
meta: { title: '成绩管理' }
component: () => import("@/pages/achievement/ass"),
meta: { title: "成绩管理" }
}, {
name: `${pre}show`,
path: `show`,
component: () => import('@/pages/achievement/show'),
meta: { title: '实验报告' }
},
component: () => import("@/pages/achievement/show"),
meta: { title: "实验报告" }
}
]
};

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home'
import BasicLayout from "@/layouts/home";
const meta = {}
const meta = {};
const pre = 'assessment-'
const pre = "assessment-";
export default {
path: '/assessment',
name: 'assessment',
path: "/assessment",
name: "assessment",
redirect: {
name: `${pre}list`
},
@ -16,14 +16,14 @@ export default {
{
name: `${pre}list`,
path: `list`,
component: () => import('@/pages/assessment/list'),
meta: { title: '考核管理' }
component: () => import("@/pages/assessment/list"),
meta: { title: "考核管理" }
},
{
name: `${pre}add`,
path: `add`,
component: () => import('@/pages/assessment/add/index.vue'),
meta: { title: '添加考核' }
},
component: () => import("@/pages/assessment/add/index.vue"),
meta: { title: "添加考核" }
}
]
};

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home'
import BasicLayout from "@/layouts/home";
const meta = {}
const meta = {};
const pre = 'course-'
const pre = "course-";
export default {
path: '/course',
name: 'course',
path: "/course",
name: "course",
redirect: {
name: `${pre}list`
},
@ -16,26 +16,26 @@ export default {
{
name: `${pre}list`,
path: `list`,
component: () => import('@/pages/course'),
meta: { title: '理论课程管理' }
component: () => import("@/pages/course"),
meta: { title: "理论课程管理" }
},
{
name: `${pre}add`,
path: `add`,
component: () => import('@/pages/course/courseManagement/add'),
meta: { title: '新增课程' }
component: () => import("@/pages/course/courseManagement/add"),
meta: { title: "新增课程" }
},
{
name: `${pre}preview`,
path: `preview`,
component: () => import('@/pages/course/courseManagement/preview'),
meta: { title: '课程预览' }
component: () => import("@/pages/course/courseManagement/preview"),
meta: { title: "课程预览" }
},
{
name: `${pre}contentSettings`,
path: `contentSettings`,
component: () => import('@/pages/course/courseManagement/contentSettings'),
meta: { title: '内容设置' }
},
component: () => import("@/pages/course/courseManagement/contentSettings"),
meta: { title: "内容设置" }
}
]
};

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

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home'
import BasicLayout from "@/layouts/home";
const meta = {}
const meta = {};
const pre = 'information-'
const pre = "information-";
export default {
path: '/information',
name: 'information',
path: "/information",
name: "information",
redirect: {
name: `${pre}list`
},
@ -16,14 +16,14 @@ export default {
{
name: `${pre}list`,
path: `list`,
component: () => import('@/pages/information'),
meta: { title: '资讯管理' }
component: () => import("@/pages/information"),
meta: { title: "资讯管理" }
},
{
name: `${pre}addArticle`,
path: `addArticle`,
component: () => import('@/pages/information/contentManage/addArticle'),
meta: { title: '新增文章' }
},
component: () => import("@/pages/information/contentManage/addArticle"),
meta: { title: "新增文章" }
}
]
};

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home'
import BasicLayout from "@/layouts/home";
const meta = {}
const meta = {};
const pre = 'match-'
const pre = "match-";
export default {
path: '/match',
name: 'match',
path: "/match",
name: "match",
redirect: {
name: `${pre}list`
},
@ -16,20 +16,20 @@ export default {
{
name: `${pre}list`,
path: `list`,
component: () => import('@/pages/match'),
meta: { title: '赛事管理' }
component: () => import("@/pages/match"),
meta: { title: "赛事管理" }
},
{
name: `${pre}add`,
path: `add`,
component: () => import('@/pages/match/add'),
meta: { title: '创建赛事' }
component: () => import("@/pages/match/add"),
meta: { title: "创建赛事" }
},
{
name: `${pre}manage`,
path: `manage`,
component: () => import('@/pages/match/manage'),
meta: { title: '管理赛事' }
},
component: () => import("@/pages/match/manage"),
meta: { title: "管理赛事" }
}
]
};

@ -1,12 +1,12 @@
import BasicLayout from '@/layouts/home'
import BasicLayout from "@/layouts/home";
const meta = {}
const meta = {};
const pre = 'project-'
const pre = "project-";
export default {
path: '/project',
name: 'project',
path: "/project",
name: "project",
redirect: {
name: `${pre}list`
},
@ -16,14 +16,14 @@ export default {
{
name: `${pre}list`,
path: `list`,
component: () => import('@/pages/project/list'),
meta: { title: '实验项目管理' }
component: () => import("@/pages/project/list"),
meta: { title: "实验项目管理" }
},
{
name: `${pre}add`,
path: `add`,
component: () => import('@/pages/project/add'),
meta: { title: '新增项目' }
},
component: () => import("@/pages/project/add"),
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 {
path: '/setting',
name: 'setting',
path: "/setting",
name: "setting",
redirect: {
name: `${pre}person`
},
@ -16,8 +16,8 @@ export default {
{
name: `${pre}person`,
path: `person`,
component: () => import('@/pages/setting/person'),
meta: { title: '个人中心' }
},
component: () => import("@/pages/setting/person"),
meta: { title: "个人中心" }
}
]
};

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

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

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

@ -1,29 +1,29 @@
import assessment from './modules/assessment'
import achievement from './modules/achievement'
import evaluation from './modules/evaluation'
import project from './modules/project'
import student from './modules/student'
import system from './modules/system'
import setting from './modules/setting'
import course from './modules/course'
import match from './modules/match'
import information from './modules/information'
import assessment from "./modules/assessment";
import achievement from "./modules/achievement";
import evaluation from "./modules/evaluation";
import project from "./modules/project";
import student from "./modules/student";
import system from "./modules/system";
import setting from "./modules/setting";
import course from "./modules/course";
import match from "./modules/match";
import information from "./modules/information";
import BasicLayout from '@/layouts/home'
import BasicLayout from "@/layouts/home";
const frameIn = [
{
path: '/',
redirect: '/login',
path: "/",
redirect: "/login"
},
{
path: '/index',
redirect: '/student',
path: "/index",
redirect: "/student"
},
{
path: '/',
path: "/",
component: () => BasicLayout,
meta: { title: '首页' },
meta: { title: "首页" },
children: []
},
assessment,
@ -36,7 +36,7 @@ const frameIn = [
course,
match,
information
]
];
/**
* 在主框架之外显示
@ -45,12 +45,12 @@ const frameIn = [
const frameOut = [
// 登录
{
path: '/login',
name: 'login',
path: "/login",
name: "login",
meta: {
title: '登录'
title: "登录"
},
component: () => import('@/pages/account/login')
component: () => import("@/pages/account/login")
}
];
@ -60,20 +60,20 @@ const frameOut = [
const errorPage = [
{
path: '/403',
name: '403',
path: "/403",
name: "403",
meta: {
title: '403'
title: "403"
},
component: () => import('@/pages/exception/error/403')
component: () => import("@/pages/exception/error/403")
},
{
path: '*',
name: '404',
path: "*",
name: "404",
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
isMock: true,
// 部署应用包时的基本 URL
publicPath: env === 'development' ? './' : '',
publicPath: env === "development" ? "./" : "",
// 生产环境构建文件的目录名
outputDir: 'dist',
outputDir: "dist",
// 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。
assetsDir: 'static',
assetsDir: "static",
// 开发环境每次保存时 lint 代码,会将 lint 错误输出为编译警告
// true || false || error
lintOnSave: true,
lintOnSave: true
};
module.exports = Setting;

@ -2,11 +2,11 @@
* 业务配置
* */
const url = location.host;
const isDev = process.env.NODE_ENV === 'development'; // 开发环境
const isHh = url.includes('10.196.131.73'); //是否是河海版本
const isCH = url.includes('120.78.127.12'); //是否是巢湖版本
const isBeta = isDev || url.includes('120.78.198.231'); //是否是职站测试(本地亦调用测试服接口)
const isPro = location.host.includes('occupationlab.com'); //是否是职站生产
const isDev = process.env.NODE_ENV === "development"; // 开发环境
const isHh = url.includes("10.196.131.73"); //是否是河海版本
const isCH = url.includes("120.78.127.12"); //是否是巢湖版本
const isBeta = isDev || url.includes("120.78.198.231"); //是否是职站测试(本地亦调用测试服接口)
const isPro = location.host.includes("occupationlab.com"); //是否是职站生产
let host = "";
let title = "";
@ -19,11 +19,11 @@ if (isHh) {
title = "教师管理端";
schoolId = 729;
systemList = [
{ id: 1, label: 'Python程序设计教学系统', },
{ id: 4, label: '经济金融建模实验教学系统' },
{ id: 6, label: '金融随机过程实验教学系统' },
{ id: 7, label: '量化投资策略建模实验教学系统' },
{ id: 8, label: '大数据分析实验教学系统' }
{ id: 1, label: "Python程序设计教学系统" },
{ id: 4, label: "经济金融建模实验教学系统" },
{ id: 6, label: "金融随机过程实验教学系统" },
{ id: 7, label: "量化投资策略建模实验教学系统" },
{ id: 8, label: "大数据分析实验教学系统" }
];
} else if (isCH) {
// 巢湖
@ -31,7 +31,7 @@ if (isHh) {
title = "教师管理端";
schoolId = 1006;
systemList = [
{ id: 8, label: '大数据分析实验教学系统' }
{ id: 8, label: "大数据分析实验教学系统" }
];
} else if (isBeta) {
// 职站测试
@ -39,17 +39,17 @@ if (isHh) {
title = "职站服务端管理系统";
schoolId = 2105;
systemList = [
{ id: 1, label: 'Python程序设计教学系统' },
{ id: 1, label: "Python程序设计教学系统" },
// { id: 2, label: '跨国仿真系统' },
// { id: 3, label: '期权期货系统' },
{ 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: 11, label: '银行综合系统' },
{ 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: 11, label: "银行综合系统" }
];
} else if (isPro) {
// 职站生产
@ -57,14 +57,14 @@ if (isHh) {
title = "职站服务端管理系统";
schoolId = 2105;
systemList = [
{ id: 1, 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, 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数据采集(爬虫)教学实验系统" }
];
} else {
console.log("其它版本");
@ -75,7 +75,7 @@ const Setting = {
* 基础配置
* */
titleSuffix: title, // 网页标题的后缀
routerMode: 'hash', // 路由模式,可选值为 history 或 hash
routerMode: "hash", // 路由模式,可选值为 history 或 hash
showProgressBar: true, // 页面切换时,是否显示模拟的进度条
apiBaseURL: host, // 接口请求地址
isHh, // 是否是河海版本
@ -88,38 +88,36 @@ const Setting = {
// 以后如果卖给了其他学校,要给该学校单独开放子系统的话,就在下面这个数组里加判断就行,然后把需要开放的子系统放出来。不要复制这个职站项目另起一个项目,这样学校一多就很难维护了
systemList,
autoLogoutTime: 3600000, // 长时间未操作,自动退出登录时间
projectData: 'sta_data', // 新增项目跳转判分点数据存储cookie的key
projectData: "sta_data", // 新增项目跳转判分点数据存储cookie的key
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒
errorModalType: 'Message', // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
cookiesExpires: 1, // Cookies 默认保存时间,单位:天
tokenExpires: 1296000000, // token在localStorage的时间(毫秒)
/**
* localStorage里保存的token的key
*/
tokenKey: 'oc_server_token',
tokenKey: "oc_server_token",
/**
* localStorage里保存的vuex的key
*/
storeKey: 'oc_server_store',
storeKey: "oc_server_store",
/**
* 默认密码
*/
initialPassword: '111aaa',
initialPassword: "111aaa",
/**
* 多语言配置
* */
i18n: {
// 默认语言
default: 'zh',
default: "zh",
// 是否根据用户电脑配置自动设置语言(仅第一次有效)
auto: false
},
/**
* 布局配置
* */
layout: {
},
layout: {},
/**
* 功能配置
* */
@ -129,9 +127,9 @@ const Setting = {
dynamicRoute: false,
// 文件上传
upload: {
apiURL: 'http://8.134.8.197:8001/',
maxSize: 30,
},
apiURL: "http://8.134.8.197:8001/",
maxSize: 30
}
};
export default Setting;

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

@ -1,25 +1,25 @@
import Vue from 'vue';
import Vuex from 'vuex';
import getters from './getters'
import Vue from "vue";
import Vuex from "vuex";
import getters from "./getters";
Vue.use(Vuex);
// 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'`
// it will auto require all vuex module from modules file
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
// set './app.js' => 'app'
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
modules[moduleName] = value.default
return modules
}, {})
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, "$1");
const value = modulesFiles(modulePath);
modules[moduleName] = value.default;
return modules;
}, {});
const store = new Vuex.Store({
modules,
getters
})
});
export default store
export default store;

@ -9,18 +9,18 @@ export default {
},
mutations: {
SET_BTN_AUTH: (state, btns) => {
state.btns = btns
state.btns = btns;
},
SET_ROUTE: (state, routes) => {
state.routes = routes
},
state.routes = routes;
}
},
actions: {
addBtnAuth({ state, commit }, btns) {
commit('SET_BTN_AUTH',btns)
commit("SET_BTN_AUTH", btns);
},
addRoutes({ state, commit }, routes) {
commit('SET_ROUTE',routes)
}
commit("SET_ROUTE", routes);
}
}
};

@ -4,23 +4,23 @@
export default {
namespaced: true,
state: {
tabsName: '2',
tabsName: "2",
columnId: ""
},
mutations: {
SET_TABS_NAME: (state, name) => {
state.tabsName = name
state.tabsName = name;
},
SET_COLUMN_ID: (state, id) => {
state.columnId = id
},
state.columnId = id;
}
},
actions: {
setTabsName({ state, commit }, name) {
commit('SET_TABS_NAME',name)
commit("SET_TABS_NAME", name);
},
setColumnId({ state, commit }, id) {
commit('SET_COLUMN_ID',id)
},
commit("SET_COLUMN_ID", id);
}
}
};

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

@ -4,16 +4,16 @@
export default {
namespaced: true,
state: {
matchId: '',
matchId: "",
},
mutations: {
SET_MATCH_ID: (state, id) => {
state.matchId = id
},
state.matchId = id;
}
},
actions: {
setMatchId({ state, commit }, id) {
commit('SET_MATCH_ID',id)
},
commit("SET_MATCH_ID", id);
}
}
};

@ -10,24 +10,24 @@ export default {
},
mutations: {
SET_SYSTEM_ID: (state, systemId) => {
state.lastSystemId = systemId
state.lastSystemId = systemId;
},
SET_PROJECT: (state, projectFields) => {
state.projectFields = projectFields
state.projectFields = projectFields;
},
SET_ASS: (state, assFields) => {
state.assFields = assFields
state.assFields = assFields;
}
},
actions: {
setSystemId({ state, commit }, systemId) {
commit('SET_SYSTEM_ID', systemId)
commit("SET_SYSTEM_ID", systemId);
},
setProject({ state, commit }, projectFields) {
commit('SET_PROJECT', projectFields)
commit("SET_PROJECT", projectFields);
},
setAss({ state, commit }, assFields) {
commit('SET_ASS', assFields)
}
commit("SET_ASS", assFields);
}
}
};

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

@ -13,6 +13,7 @@
width: 8px;
height: 8px;
}
::-webkit-scrollbar-thumb {
width: 5px;
border-radius: 6px;
@ -46,11 +47,13 @@
color: #585858;
border-left: 3px solid $--color-primary;
}
.page {
position: relative;
padding: 24px;
background-color: #fff;
border-radius: 8px;
.tool {
display: flex;
justify-content: space-between;
@ -61,10 +64,12 @@
flex-wrap: wrap;
align-items: center;
flex: 1;
li {
display: inline-flex;
align-items: center;
margin-right: 30px;
label {
margin-right: 6px;
font-size: 14px;
@ -74,13 +79,17 @@
}
}
}
.el-button--primary {
@extend .action-btn;
}
&.mul {
margin-bottom: 0;
.filter {
width: 1200px;
li {
margin-bottom: 24px;
}
@ -92,15 +101,18 @@
.pagination {
margin: 20px 0;
text-align: center;
button, .number {
color: rgba(0, 0, 0, .65) !important;
background-color: transparent !important;
border: 1px solid rgba(0, 0, 0, 0.15) !important;
border-radius: 4px !important;
}
button i {
color: #333;
}
.active {
color: #fff !important;
background-color: $--color-primary !important;
@ -111,11 +123,14 @@
border-radius: 8px;
border: 1px solid rgba(0, 0, 0, 0.06);
border-bottom: 0;
.cell {
font-size: 14px;
}
th {
background: $--color-primary !important;
.cell {
color: #fff;
font-size: 14px;
@ -129,6 +144,7 @@
align-items: center;
padding: 0 24px;
border-bottom: 1px solid rgba(0, 0, 0, .06);
.item {
position: relative;
padding: 20px 0;
@ -136,6 +152,7 @@
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
cursor: pointer;
&:after {
content: '';
position: absolute;
@ -146,10 +163,12 @@
border-bottom: 3px solid transparent;
border-radius: 2px;
}
&.active {
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
}
&.active:after {
border-bottom-color: $--color-primary;
}
@ -158,27 +177,34 @@
.el-message {
padding: 11px 20px;
.el-message__icon {
font-size: 16px;
}
.el-message__content {
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-icon-close {
font-size: 14px;
color: #92998d;
}
.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__icon {
color: #ffa900;
}
@ -187,32 +213,40 @@
.el-message-box {
padding-bottom: 24px;
.el-message-box__header {
padding: 32px 32px 12px 50px;
span {
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 {
color: #ffa900;
}
}
&:not(.normal) {
.el-button--primary {
color: #606266;
background: #fff;
border-color: #DCDFE6;
&:hover {
color: $--color-primary;
border-color: #efbdbb;
@ -225,16 +259,20 @@
.el-dialog__wrapper {
.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;
@ -250,26 +288,31 @@
justify-content: center;
align-items: center;
padding: 34px 0;
.el-button {
span {
display: flex;
align-items: center;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
img {
margin-right: 8px;
}
}
}
& > .el-button {
margin-right: 32px;
}
.el-upload-list {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
.link {
position: absolute;
bottom: -20px;
@ -277,6 +320,7 @@
width: 100%;
text-align: center;
}
&.lg {
padding-bottom: 50px;
}

@ -425,22 +425,22 @@
</div>
<script>
$(document).ready(function() {
$('.tab-container .content:first').show()
$(".tab-container .content:first").show();
$('#tabs li').click(function (e) {
var tabContent = $('.tab-container .content')
var index = $(this).index()
$("#tabs li").click(function(e) {
var tabContent = $(".tab-container .content");
var index = $(this).index();
if ($(this).hasClass('active')) {
return
if ($(this).hasClass("active")) {
return;
} else {
$('#tabs li').removeClass('active')
$(this).addClass('active')
$("#tabs li").removeClass("active");
$(this).addClass("active");
tabContent.hide().eq(index).fadeIn()
tabContent.hide().eq(index).fadeIn();
}
})
})
});
});
</script>
</body>
</html>

@ -1,10 +1,9 @@
@font-face {font-family: "iconfont";
@font-face {
font-family: "iconfont";
src: url('iconfont.eot?t=1589437921018'); /* IE9 */
src: url('iconfont.eot?t=1589437921018#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'),
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.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.ttf?t=1589437921018') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ url('iconfont.svg?t=1589437921018#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {

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

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

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

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

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

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

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

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save