diff --git a/package-lock.json b/package-lock.json index ba66ec7..cd9f292 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4080,6 +4080,22 @@ "safer-buffer": "^2.1.0" } }, + "echarts": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.1.tgz", + "integrity": "sha512-9ltS3M2JB0w2EhcYjCdmtrJ+6haZcW6acBolMGIuf01Hql1yrIV01L1aRj7jsaaIULJslEP9Z3vKlEmnJaWJVQ==", + "requires": { + "tslib": "2.3.0", + "zrender": "5.4.1" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -13498,6 +13514,21 @@ "camelcase": "^5.0.0", "decamelize": "^1.2.0" } + }, + "zrender": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.1.tgz", + "integrity": "sha512-M4Z05BHWtajY2241EmMPHglDQAJ1UyHQcYsxDNzD9XLSkPDqMq4bB28v9Pb4mvHnVQ0GxyTklZ/69xCFP6RXBA==", + "requires": { + "tslib": "2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } } } } diff --git a/package.json b/package.json index f82f47c..4684046 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "babel-polyfill": "^6.26.0", "blueimp-md5": "^2.19.0", "clipboard": "^2.0.11", + "echarts": "^5.4.1", "element-theme": "^2.0.1", "element-ui": "^2.13.0", "file-saver": "^2.0.5", diff --git a/src/assets/css/main.css b/src/assets/css/main.css index bc79aa0..6b7c765 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -468,4 +468,7 @@ li { } .el-tooltip__popper { max-width: 500px !important; +} +.no-atTheMoment > .el-picker-panel__footer > .el-button--text:first-child{ + display: none; } \ No newline at end of file diff --git a/src/assets/img/avg.png b/src/assets/img/avg.png new file mode 100644 index 0000000..cda731a Binary files /dev/null and b/src/assets/img/avg.png differ diff --git a/src/assets/img/point.png b/src/assets/img/point.png new file mode 100644 index 0000000..6f6692f Binary files /dev/null and b/src/assets/img/point.png differ diff --git a/src/assets/img/report2.png b/src/assets/img/report2.png new file mode 100644 index 0000000..9ecb819 Binary files /dev/null and b/src/assets/img/report2.png differ diff --git a/src/assets/img/report3.png b/src/assets/img/report3.png new file mode 100644 index 0000000..6513f79 Binary files /dev/null and b/src/assets/img/report3.png differ diff --git a/src/assets/img/report4.png b/src/assets/img/report4.png new file mode 100644 index 0000000..3637e00 Binary files /dev/null and b/src/assets/img/report4.png differ diff --git a/src/assets/img/report5.png b/src/assets/img/report5.png new file mode 100644 index 0000000..fd0ecc8 Binary files /dev/null and b/src/assets/img/report5.png differ diff --git a/src/assets/img/total.png b/src/assets/img/total.png new file mode 100644 index 0000000..5c4f163 Binary files /dev/null and b/src/assets/img/total.png differ diff --git a/src/const/match.js b/src/const/match.js new file mode 100644 index 0000000..c6c17e1 --- /dev/null +++ b/src/const/match.js @@ -0,0 +1,48 @@ +/** + * 大赛配置 + * */ + + export default { + rules: [ + { + id: 0, + name: '积分赛' + }, + { + id: 1, + name: '淘汰赛' + }, + { + id: 2, + name: '单项赛' + } + ], + methods: [ + { + id: 0, + name: '实操' + }, + { + id: 1, + name: '理论' + }, + { + id: 2, + name: '线下' + } + ], + teamCalculationMethods: [ + { + id: 0, + name: '最高分' + }, + { + id: 1, + name: '平均分' + }, + { + id: 2, + name: '总分' + } + ], +} \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 653bf6d..8949259 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -137,6 +137,26 @@ let router = new Router({ component: () => import( '../views/match/manage/noticeDetail'), // meta: { title: '数据管理' } }, + { + path: '/matchArchList', + component: () => import( '../views/match/manage/matchArchList'), + // meta: { title: '数据管理' } + }, + { + path: '/matchRank', + component: () => import( '../views/match/manage/matchRank'), + // meta: { title: '数据管理' } + }, + { + path: '/matchReport', + component: () => import( '../views/match/manage/matchReport'), + // meta: { title: '数据管理' } + }, + { + path: '/matchInfo', + component: () => import( '../views/match/manage/matchInfo'), + // meta: { title: '数据管理' } + }, { path: `/theoreticalCourse`, component: () => import("../views//theoreticalCourse/list"), diff --git a/src/setting.js b/src/setting.js index 9a83c3b..1ed2e9f 100644 --- a/src/setting.js +++ b/src/setting.js @@ -11,7 +11,7 @@ if (isDev) { jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统 host = 'http://121.37.12.51/' // host = 'https://huorantech.cn/' - // host = 'http://192.168.31.51:9000/'// 榕 + host = 'http://192.168.31.51:9000/'// 榕 host = 'http://192.168.31.116:9000/'// 赓 } else if (isPro) { jumpPath = 'https://www.huorantech.cn/judgmentPoint/' diff --git a/src/utils/api.js b/src/utils/api.js index 14b8dec..f6eb6e4 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -1,7 +1,8 @@ import Setting from "@/setting"; const host = Setting.apiBaseURL -const host1 = 'http://192.168.31.137:9000/' +const host1 = 'http://192.168.31.51:9000/' +const host2 = 'http://121.37.12.51/' const uploadURL = Setting.uploadURL export default { @@ -302,8 +303,9 @@ export default { disabledEventsCompetition: `competition/competition/management/disabledEvents`, editCompetition: `competition/competition/management/editCompetition`, getCompetition: `competition/competition/management/getCompetition`, - disabledEventsCompetition: `competition/competition/management/disabledEvents`, getProjectAssessmentByCompetition: `occupationlab/occupationlab/projectManage/getProjectAssessmentByCompetition`, + publishCompetition: `competition/competition/management/publishCompetition`, + detailsOfCompetitionStage: `${host1}competition/competition/management/detailsOfCompetitionStage`, // 赛事内容 addCompetitionContent: `competition/competition/content/addCompetitionContent`, @@ -332,6 +334,9 @@ export default { excelExport: `competition/competition/registration/excelExport`, exportDataInBatches: `competition/competition/registration/exportDataInBatches`, queryRegistrationByCondition: `competition/competition/registration/queryRegistrationByCondition`, + searchTeam: `competition/competition/team/searchTeam`, + joinCompetitionTeam: `competition/competition/team/joinCompetitionTeam`, + addCompetitionTeam: `competition/competition/team/addCompetitionTeam`, // 赛事公告 addAnnouncement: `competition/competition/announcement/addAnnouncement`, amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`, @@ -339,4 +344,24 @@ export default { disableAnnouncement: `competition/competition/announcement/disableAnnouncement`, queryAnnouncementByCompetitionId: `competition/competition/announcement/queryAnnouncementByCompetitionId`, queryAnnouncementDetails: `competition/competition/announcement/queryAnnouncementDetails`, + // 赛事成绩 + batchDeleteContestGrade: `${host1}competition/competition/performance/batchDeleteContestGrade`, + batchImportGrades: `${host1}competition/competition/performance/batchImportGrades`, + exportExperimentalResultsInBatch: `${host1}competition/competition/performance/exportExperimentalResultsInBatch`, + performanceExportFailure: `${host1}competition/competition/performance/exportFailure`, + stageGradeManagementList: `${host1}competition/competition/performance/stageGradeManagementList`, + stageRaceRanking: `${host1}competition/competition/rank/stageRaceRanking`, + overallStandingsInThePointsRace: `${host1}competition/competition/rank/overallStandingsInThePointsRace`, + batchImportRanking: `${host1}competition/competition/rank/batchImportRanking`, + rankExportFailure: `${host1}competition/competition/rank/exportFailure`, + publishRanking: `${host1}competition/competition/rank/publishRanking`, + stageTeamScoreDetails: `${host1}competition/competition/rank/stageTeamScoreDetails`, + multipleStageTeamScoreDetails: `${host1}competition/competition/rank/multipleStageTeamScoreDetails`, + detailsOfTotalTeamScores: `${host1}competition/competition/rank/detailsOfTotalTeamScores`, + cancelRanking: `${host1}competition/competition/rank/cancelRanking`, + reportDetail: `${host1}occupationlab/occupationlab/achievement/reportDetail`, + deleteLastPublication: `${host1}competition/competition/rank/deleteLastPublication`, + gradeImport: `${host2}template/赛事成绩导入模板.xlsx`, + rankImportTeam: `${host2}template/赛事排名导入模板(团队赛).xlsx`, + rankImportPerson: `${host2}template/赛事排名导入模板(个人赛).xlsx`, }; \ No newline at end of file diff --git a/src/views/course/AddCurriculum.vue b/src/views/course/AddCurriculum.vue index 83af732..a29a4dc 100644 --- a/src/views/course/AddCurriculum.vue +++ b/src/views/course/AddCurriculum.vue @@ -544,7 +544,6 @@ export default { }, mounted() { - console.log(33, this.$store.state.btns.includes('/curriculum:支持多系统组课')) this.getSubject() this.getConfig() this.getSystem() @@ -1025,7 +1024,7 @@ export default { const id = this.form.cid const updateTime = this.updateTime // 更改了信息才需要提示 - if ((id && updateTime > 1) || (!id && updateTime)) { + if ((id && updateTime > 2) || (!id && updateTime)) { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { type: 'warning' }).then(() => { diff --git a/src/views/match/add/index.vue b/src/views/match/add/index.vue index 21fdbc3..a1b1be0 100644 --- a/src/views/match/add/index.vue +++ b/src/views/match/add/index.vue @@ -29,14 +29,15 @@
- + -
- +
+ 预览 @@ -59,12 +60,14 @@ export default { data() { return { id: this.$route.query.id, + competitionId: '', step: 1, submiting: false, updateTime: 0, setupId: '', releaseType: 0, - editing: 0 + editing: 0, + showBtns: true }; }, components: { @@ -82,12 +85,17 @@ export default { save(status, next = 0) { this.$refs['step' + this.step].save(status, next, this.releaseType) }, + // 上一步 + prev() { + this.step-- + }, // 发布后的逻辑 - next(next, id) { + next(next, setupId, competitionId) { if (!next) { this.$router.push(`/match?page=${this.$store.state.matchPage}`) } else if (next === 2) { - if (id) this.setupId = id + if (setupId) this.setupId = setupId + if (competitionId) this.competitionId = competitionId this.step++ } }, diff --git a/src/views/match/add/set.vue b/src/views/match/add/set.vue index ed2984f..7c48d65 100644 --- a/src/views/match/add/set.vue +++ b/src/views/match/add/set.vue @@ -26,7 +26,8 @@ start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd HH:mm:ss" - value-format="yyyy-MM-dd HH:mm:ss"> + value-format="yyyy-MM-dd HH:mm:ss" + @change="timeChange">
@@ -98,7 +99,7 @@ diff --git a/src/views/match/manage/matchArch.vue b/src/views/match/manage/matchArch.vue index 0994a59..cd5cba5 100644 --- a/src/views/match/manage/matchArch.vue +++ b/src/views/match/manage/matchArch.vue @@ -1,19 +1,19 @@ @@ -68,7 +112,8 @@ export default { data() { return { token: sessionStorage.getItem('token'), - id: this.$route.query.id, + id: +this.$route.query.id, + status: '', statusList: [ { id: '', @@ -88,7 +133,44 @@ export default { multipleSelection: [], page: 1, pageSize: 10, - totals: 0 + total: 0, + clients: [], + addVisible: false, + form: { + competitionId: this.$route.query.id, + userName: '', + workNumber: '', + schoolId: '', + teamId: '', + whetherSignUp: 0 + }, + rules: { + schoolId: [ + { required: true, message: "请选择所属院校", trigger: "change" } + ], + userName: [ + { required: true, message: "请输入姓名", trigger: "blur" } + ], + workNumber: [ + { required: true, message: "请输入学号", trigger: "blur" } + ], + teamId: [ + { required: true, message: "请选择所属团队", trigger: "change" } + ] + }, + submiting: false, + + + teamVisible: false, + teams: [], + teamNameRepeat: false, + teamForm: { + competitionId: this.$route.query.id, + registrationInvitationCode: '', + teamName: '', + invitationCode: '', + whetherSignUp: 0 + }, }; }, watch: { @@ -100,7 +182,9 @@ export default { } }, mounted() { - this.initData(); + this.initData() + this.getClient() + this.getTeam() }, methods: { getData() { @@ -111,7 +195,7 @@ export default { keyWord: this.keyword, }).then(({ data }) => { this.listData = data.records; - this.totals = data.total; + this.total = data.total; this.$refs.table.clearSelection(); }).catch(res => { }); @@ -128,35 +212,90 @@ export default { this.getData(); }, switchOff(val, row, index) { - this.$put(`${this.api.disableApplicant}/${row.id}/${val}`) + this.$put(`${this.api.disableRegistration}?competitionRegistrationId=${row.id}&isDisable=${val}`) .then(res => { }) .catch(err => { }); }, - disalbeAllData() { - if (this.multipleSelection.length != "") { - let newArr = this.multipleSelection; - let delList = newArr.map(item => { - return item.id; - }); - - this.$confirm("确定要禁用吗?", "提示", { - type: "warning" - }) - .then(() => { - this.$put(`${this.api.disableContests}?ids=${delList.join(",")}`).then(res => { - this.multipleSelection = []; - util.successMsg("禁用成功"); - this.getData(); - }).catch(res => { - }); - }) - .catch(() => { - }); - } else { - util.errorMsg("请先选择数据 !"); + // 新增 + add() { + this.addVisible = true + }, + // 新增人员 + submit() { + this.$refs.form.validate((valid) => { + if (valid) { + if (this.submiting) return false + this.submiting = true + this.$post(this.api.joinCompetitionTeam, this.form).then(res => { + this.addVisible = false + this.getData() + this.submiting = false + util.successMsg('报名成功!') + }).catch(res => {}) } + }) + }, + // 关闭新增员工对话框 + closeAdd() { + this.form = { + competitionId: this.id, + userName: '', + workNumber: '', + schoolId: '', + teamId: '', + whetherSignUp: 0 + } + }, + // 创建团队 + createTeam() { + this.teamForm = { + competitionId: this.id, + registrationInvitationCode: '', + teamName: '', + invitationCode: '', + whetherSignUp: 0 + } + this.teamVisible = true + }, + // 获取客户 + getClient() { + const sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理') + this.$post(this.api.queryCustomer,{ + page: 1, + size: 1000, + supplierId: (sid && !sid.all) ? sid.supplierId : '' + }).then(res => { + this.clients = res.message.list + }).catch(res => {}) + }, + // 获取团队列表 + getTeam() { + this.$get(this.api.searchTeam, { + teamName: '', + competitionId: this.id + }).then(({ teamList }) => { + this.teams = teamList + }).catch(res => {}) + }, + // 团队提交 + teamSubmit() { + const form = this.teamForm + if (!form.teamName) return util.errorMsg('请输入团队名称') + if (form.invitationCode.length !== 6) return util.errorMsg('请输入6位数团队邀请码') + this.$post(this.api.addCompetitionTeam, form).then(res => { + this.teamVisible = false + this.form.teamId + }).catch(res => {}) + }, + // 编辑 + edit(row) { + + }, + // 参赛信息 + info(row) { + this.$router.push(`/matchInfo?id=${this.id}`) }, exportAll() { const data = this.multipleSelection @@ -171,13 +310,29 @@ export default { util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) }).catch(res => {}) } else { - location.href = `${this.api.excelExport}?competitionId=${this.id}` + axios.get(`${this.api.excelExport}?competitionId=${this.id}`, { + headers: { + token: this.token + }, + responseType: 'blob' + }).then((res) => { + util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) + }).catch(res => {}) } } } }; - \ No newline at end of file diff --git a/src/views/match/manage/notice.vue b/src/views/match/manage/notice.vue index 68d1568..ba4ac06 100644 --- a/src/views/match/manage/notice.vue +++ b/src/views/match/manage/notice.vue @@ -76,7 +76,7 @@ export default { }, methods: { getData() { - this.$post(`${this.api.queryAnnouncementByCompetitionId}?pageNum=${this.pageNo}&pageSize=${this.pageSize}&CompetitionId=${this.id}`).then(({ data }) => { + this.$post(`${this.api.queryAnnouncementByCompetitionId}?pageNum=${this.pageNo}&pageSize=${this.pageSize}&competitionId=${this.id}`).then(({ data }) => { this.listData = data.records this.totals = data.total this.$refs.table.clearSelection() diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index 2a8abc9..62a67f3 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -1540,7 +1540,8 @@ export default { customerId: this.form.customerId, id: row.dataOrCourseId, startTime: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(), - endTime: row.endTime + endTime: row.endTime, + authority: row.authority }).then(res => { orderRepeat.includes(cId) && orderRepeat.splice(orderRepeat.findIndex(e => e === cId), 1) if (res.endTime) { diff --git a/src/views/system/staff.vue b/src/views/system/staff.vue index 43ba39b..55ab3d8 100644 --- a/src/views/system/staff.vue +++ b/src/views/system/staff.vue @@ -235,6 +235,7 @@ export default { } } const phonePass = (rule, value, callback) => { + console.log("🚀 ~ file: staff.vue:238 ~ phonePass ~ value", value) if (value) { const pattern = /^1[3456789]\d{9}$/ if(pattern.test(value)){ @@ -311,7 +312,7 @@ export default { { required: true, message: "请选择授权角色", trigger: "change" } ], phone: [ - { validator: phonePass, trigger: 'blur' } + { required: true, validator: phonePass, trigger: 'blur' } ], email: [ { validator: emailPass, trigger: 'blur' }