From a825f18d156d4470602bdbc1c06cd339cc4697b8 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 6 Feb 2023 10:19:08 +0800 Subject: [PATCH] fix --- src/components/Sidebar.vue | 1 + src/setting.js | 2 +- src/store/index.js | 25 ++-- src/utils/api.js | 15 +- src/views/course/AddCurriculum.vue | 25 +++- src/views/match/add/index.vue | 67 ++++++--- src/views/match/add/step1.vue | 15 +- src/views/match/add/step2.vue | 118 +++++++++------ src/views/match/add/step3.vue | 89 ++++++----- src/views/match/list/index.vue | 34 +---- src/views/match/manage/matchArchList.vue | 29 ++-- src/views/match/manage/matchInfo.vue | 171 +++++++++++++++------- src/views/match/manage/matchRank.vue | 47 +++--- src/views/match/manage/matchReport.vue | 4 +- src/views/match/manage/matchSignup.vue | 39 +++-- src/views/match/preview/index.vue | 56 ++++++- src/views/order/AddOrder.vue | 1 - src/views/order/Order.vue | 5 +- src/views/serve/projectAdd.vue | 2 +- src/views/theoreticalCourse/add/index.vue | 14 +- 20 files changed, 493 insertions(+), 266 deletions(-) diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index d45d351..fdf7030 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -134,6 +134,7 @@ export default { methods:{ handleSelect(index){ this.onRoutes = index + this.$store.commit('setOrderParam', null) this.$store.commit('setInfoTab', '1') this.$store.commit('setColumnId', '') sessionStorage.setItem('sideBar',index) diff --git a/src/setting.js b/src/setting.js index 1ed2e9f..57df0a0 100644 --- a/src/setting.js +++ b/src/setting.js @@ -45,7 +45,7 @@ const Setting = { isDev, isPro, // 是否使用动态路由 - dynamicRoute: false, + dynamicRoute: true, /** * @description 默认密码 */ diff --git a/src/store/index.js b/src/store/index.js index 1fa371b..c168885 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -26,7 +26,8 @@ const store = new Vuex.Store({ platformSource: 0, columnId: '', tabId: '1', - dataPer: [] + dataPer: [], + orderParam: null }, actions: { setSystemId({ state,commit },systemId) { @@ -52,6 +53,15 @@ const store = new Vuex.Store({ SET_USERNAME (state, userName) { state.userName = userName }, + SET_C_PAGE: (state, page) => { + state.customerPage = page + }, + SET_M_PAGE: (state, page) => { + state.matchPage = page + }, + SET_M_SOURCE: (state, platformSource) => { + state.platformSource = platformSource + }, courseData (state, payload) { state.courseId = payload.course_id }, @@ -88,21 +98,16 @@ const store = new Vuex.Store({ setDataPer(state, dataPer) { state.dataPer = dataPer }, - SET_C_PAGE: (state, page) => { - state.customerPage = page - }, - SET_M_PAGE: (state, page) => { - state.matchPage = page - }, - SET_M_SOURCE: (state, platformSource) => { - state.platformSource = platformSource - }, setColumnId: (state, columnId) => { state.columnId = columnId }, setInfoTab: (state, tabId) => { state.tabId = tabId }, + setOrderParam: (state, orderParam) => { + state.orderParam = orderParam + }, + } }); diff --git a/src/utils/api.js b/src/utils/api.js index c696171..fc49dfd 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -2,7 +2,6 @@ import Setting from "@/setting"; const host = Setting.apiBaseURL const host1 = 'http://192.168.31.51:9000/' -const host2 = 'http://121.37.12.51/' const uploadURL = Setting.uploadURL export default { @@ -147,7 +146,6 @@ export default { deleteSubsection: `nakadai/nakadai/curriculum/subsection/deleteSubsection`, //根据id删除小节 editSubsection: `nakadai/nakadai/curriculum/subsection/editSubsection`, //修改小节 getSubsection: `nakadai/nakadai/curriculum/subsection/getSubsection`, //根据小节id获取预览文件地址 - // 理论课程 delTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/batchDeletion`, @@ -158,6 +156,7 @@ export default { disabledTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/disabledEvents`, checkRepeatTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/checkRepeat`, getRedisCache: `occupationlab/occupationlab/theoreticalCourse/getRedisCache`, + getSchoolsByProvince: `nakadai/nakadai/school/getSchoolsByProvince`, // 理论课程分类管理 checkRepeatClassification: `occupationlab/occupationlab/theoreticalCourseClassification/checkRepeat`, delClassification: `occupationlab/occupationlab/theoreticalCourseClassification/batchDeletion`, @@ -314,6 +313,10 @@ export default { editCompetitionContent: `competition/competition/content/editCompetitionContent`, getCompetitionContent: `competition/competition/content/getCompetitionContent`, // 赛事附件 + delComAnnex: `competition/competition/annex/delete`, + saveComAnnex: `competition/competition/annex/save`, + updateComAnnex: `competition/competition/annex/update`, + // 赛事公告附件 delAnnex: `competition/competition/announcementAnnex/delete`, saveAnnex: `competition/competition/announcementAnnex/save`, updateAnnex: `competition/competition/announcementAnnex/update`, @@ -349,6 +352,7 @@ export default { stageSelectParticipants: `competition/competition/teamParticipant/stageSelectParticipants`, updateUser: `users/users/userInfo/updateUser`, enquireAboutSchoolStudents: `users/users/userAccount/enquireAboutSchoolStudents`, + cancelParticipant: `competition/competition/teamParticipant/cancelParticipant`, // 赛事公告 addAnnouncement: `competition/competition/announcement/addAnnouncement`, amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`, @@ -356,6 +360,7 @@ export default { disableAnnouncement: `competition/competition/announcement/disableAnnouncement`, queryAnnouncementByCompetitionId: `competition/competition/announcement/queryAnnouncementByCompetitionId`, queryAnnouncementDetails: `competition/competition/announcement/queryAnnouncementDetails`, + saveAnnouncementAnnex: `competition/competition/announcementAnnex/save`, // 赛事成绩 batchDeleteContestGrade: `${host1}competition/competition/performance/batchDeleteContestGrade`, batchImportGrades: `${host1}competition/competition/performance/batchImportGrades`, @@ -377,7 +382,7 @@ export default { manuallyRankTheUploadList: `${host1}competition/competition/rank/manuallyRankTheUploadList`, queryPublicationSource: `${host1}competition/competition/rank/queryPublicationSource`, releaseVerification: `${host1}competition/competition/rank/releaseVerification`, - gradeImport: `${host2}template/赛事成绩导入模板.xlsx`, - rankImportTeam: `${host2}template/赛事排名导入模板(团队赛).xlsx`, - rankImportPerson: `${host2}template/赛事排名导入模板(个人赛).xlsx`, + gradeImport: `http://121.37.12.51/template/赛事成绩导入模板.xlsx`, + rankImportTeam: `http://121.37.12.51/template/赛事排名导入模板(团队赛).xlsx`, + rankImportPerson: `http://121.37.12.51/template/赛事排名导入模板(个人赛).xlsx`, }; \ No newline at end of file diff --git a/src/views/course/AddCurriculum.vue b/src/views/course/AddCurriculum.vue index a29a4dc..9aabc35 100644 --- a/src/views/course/AddCurriculum.vue +++ b/src/views/course/AddCurriculum.vue @@ -187,6 +187,7 @@ + {{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }} @@ -238,6 +239,7 @@ + {{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }} @@ -284,7 +286,7 @@ + @selection-change="handleSelectionMatch"> @@ -491,9 +493,10 @@ export default { assessmentData: [], assessmentTotal: 0, + multipleAssessment: [], matches: [], matcheTotal: 0, - multipleAssessment: [], + multipleMatch: [], submiting: false, // 新增编辑防抖标识 loadIns: null, updateTime: 0, @@ -873,6 +876,9 @@ export default { handleSelectionAssessment(val) { // 多选考核项目 this.multipleAssessment = val; }, + handleSelectionMatch(val) { // 多选竞赛项目 + this.multipleMatch = val; + }, handleBatchDelete(type) { // 批量移除 if (type == 1 && !this.multipleAssessment.length) { this.$message.warning("请勾选考核项目!"); @@ -880,14 +886,14 @@ export default { } else if (!type && !this.multiplePractice.length) { this.$message.warning("请勾选练习项目!"); return; - } else if (type == 2 && !this.multiplePractice.length) { + } else if (type == 2 && !this.multipleMatch.length) { this.$message.warning("请勾选竞赛项目!"); return; } this.$confirm("此操作将批量移除项目, 是否继续?", "提示", { type: "warning" }).then(() => { - if (type) { + if (type == 1) { let ids = this.multipleAssessment.map(i => i.projectId); let tempArr = []; for (let i = 0; i < this.assessmentData.length; i++) { @@ -896,7 +902,7 @@ export default { } } this.assessmentData = tempArr; - } else { + } else if (!type) { let ids = this.multiplePractice.map(i => i.projectId); let tempArr = []; for (let i = 0; i < this.practiceData.length; i++) { @@ -905,6 +911,15 @@ export default { } } this.practiceData = tempArr; + } else { + let ids = this.multipleMatch.map(i => i.projectId); + let tempArr = []; + for (let i = 0; i < this.matches.length; i++) { + if (!ids.includes(this.matches[i].projectId)) { + tempArr.push(this.matches[i]); + } + } + this.matches = tempArr; } this.$message.success("批量移除成功"); }).catch(() => { diff --git a/src/views/match/add/index.vue b/src/views/match/add/index.vue index e5561c7..ae20265 100644 --- a/src/views/match/add/index.vue +++ b/src/views/match/add/index.vue @@ -5,18 +5,18 @@ + + 大赛发布类型 + + + 仅发布信息 + 设置完整比赛 + + + 编辑 + - - 大赛发布类型 - - - 仅发布信息 - 设置完整比赛 - - - 编辑 - - + 1 大赛信息填写 @@ -48,12 +48,12 @@ 保存{{ releaseType ? '草稿' : '' }} - 上一步 - 发布 - 保存并下一步 + 上一步 + 发布 + 保存并下一步 预览 - 取消 + {{ editing ? '取消' : '返回' }} @@ -112,12 +112,11 @@ export default { prev() { // 更改了信息才需要提示 const { updateTime } = this.$refs['step' + this.step] - console.log("🚀 ~ file: index.vue:142 ~ back ~ updateTime", updateTime) if (updateTime) { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { type: 'warning' }).then(() => { - this.save(0) + this.save(0, 1) }).catch(() => { this.step-- }) @@ -137,21 +136,43 @@ export default { this.competitionId = competitionId } this.step++ + } else if (next === 1) { + this.step-- } }, // 点击步骤条跳转 toStep(i) { - if (this.id && !this.editing) this.step = i + if (this.publishStatus && this.id && !this.editing) this.step = i }, // 预览 preview() { util.local.set('match', this.$refs.step1.form) window.open(this.$router.resolve('/matchPreview').href) }, + // 取消 + cancel() { + // 当前是编辑赛事,并且表单处于编辑状态,则返回到查看状态;查看状态,则返回到列表 + if (this.editing && this.$route.query.name) { + // 更改了信息才需要提示 + const { updateTime } = this.$refs['step' + this.step] + if (this.step < 4 && updateTime) { + this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { + type: 'warning' + }).then(() => { + this.save(0, 3) + }).catch(() => { + this.editing = false + }) + } else { + this.editing = false + } + } else { + this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`) + } + }, back() { // 更改了信息才需要提示 const { updateTime } = this.$refs['step' + this.step] - console.log("🚀 ~ file: index.vue:142 ~ back ~ updateTime", updateTime) if (this.step < 4 && updateTime) { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { type: 'warning' @@ -172,6 +193,14 @@ export default { \ No newline at end of file diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index 15f9a60..7dcff75 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -1160,7 +1160,6 @@ export default { return e; });// 俩列表 this.coursePermissions = list.filter(i => i.authority === 1); - console.log("🚀 ~ file: AddOrder.vue ~ line 979 ~ setStartDate ~ this.coursePermissions ", this.coursePermissions ) this.dataPlatformPermissions = list.filter(i => i.authority === 0); this.valuePermissions = list.filter(i => i.authority === 2); }, diff --git a/src/views/order/Order.vue b/src/views/order/Order.vue index 3d0091d..aad343a 100644 --- a/src/views/order/Order.vue +++ b/src/views/order/Order.vue @@ -112,6 +112,7 @@ export default { data() { return { + orderParam: this.$store.state.orderParam, form: { provinces: "", city: "", @@ -159,6 +160,7 @@ export default { } }, created() { + if (this.orderParam) this.form = this.orderParam this.getData() this.getSchool() }, @@ -227,12 +229,13 @@ export default { }else{ orderStatus = 0 } + this.$store.commit('setOrderParam', this.form) this.$router.push({ path:'/AddOrder', query:{ val:val, orderId:row.orderId, - orderStatus:orderStatus + orderStatus } }) // this.$router.push("/addorder?" + val + "=" + row.orderId+"&orderStatus="+orderStatus); diff --git a/src/views/serve/projectAdd.vue b/src/views/serve/projectAdd.vue index 3f81437..7daca91 100644 --- a/src/views/serve/projectAdd.vue +++ b/src/views/serve/projectAdd.vue @@ -328,7 +328,7 @@ export default { }, methods: { permissionChange(){ - if (this.projectManage.permissions == 1){ + if (this.projectManage.permissions){ this.projectManage.hintOpen = 1 }else{ this.projectManage.hintOpen = 0 diff --git a/src/views/theoreticalCourse/add/index.vue b/src/views/theoreticalCourse/add/index.vue index f6be6f7..b813185 100644 --- a/src/views/theoreticalCourse/add/index.vue +++ b/src/views/theoreticalCourse/add/index.vue @@ -278,10 +278,21 @@ export default { const rangeName = data.courseRangeList if (rangeName) { const range = [] + const rangeChecked = [] rangeName.map(e => { - range.push(e.type ? (e.cityName || e.provinceName) : e.schoolName) + const name = e.type ? (e.cityName || e.provinceName) : e.schoolName + range.push(name) + rangeChecked.push({ + value: e.type ? (e.cityId || e.provinceId) : e.schoolId, + label: name, + cityId: e.cityId, + provinceId: e.provinceId, + schoolId: e.schoolId, + }) }) this.rangeName = range.join(',') + + this.rangeChecked = rangeChecked } this.uploadList.push({ @@ -303,6 +314,7 @@ export default { rangeChecked.find(n => n.value === e.value && n.label == e.label) || name.push(e.data) // 未勾选的,则push }) this.rangeChecked.push(...name) + console.log("🚀 ~ file: index.vue:306 ~ rangeChange ~ this.rangeChecked", this.rangeChecked) }, // 范围展开收缩回调 rangeViChange(e) {
大赛信息填写