From af27dd64a00b6758ec1332282363e2d19d8e35d8 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Tue, 31 Jan 2023 15:51:42 +0800
Subject: [PATCH] fix
---
src/main.js | 3 +-
src/setting.js | 2 +-
src/utils/api.js | 17 +-
src/utils/core.js | 10 +
src/views/match/add/index.vue | 90 ++++--
src/views/match/add/step1.vue | 36 +--
src/views/match/add/step2.vue | 24 +-
src/views/match/add/step3.vue | 17 +-
src/views/match/manage/index.vue | 2 +-
src/views/match/manage/matchArch.vue | 33 ++-
src/views/match/manage/matchArchList.vue | 4 +-
src/views/match/manage/matchInfo.vue | 358 +++++++++++++++++++++--
src/views/match/manage/matchRank.vue | 159 ++++++----
src/views/match/manage/matchSignup.vue | 185 +++++++++---
src/views/match/preview/index.vue | 8 +-
src/views/order/AddOrder.vue | 254 +++++++++++++++-
16 files changed, 980 insertions(+), 222 deletions(-)
diff --git a/src/main.js b/src/main.js
index af2eeec..4d4e648 100644
--- a/src/main.js
+++ b/src/main.js
@@ -12,7 +12,7 @@ import {post,get,del,put} from './utils/http';
import api from './utils/api';
import store from './store'
import { systemStatus, systemTypeStatus, systemAttributionStatus, courseTypeStatus,
- hoursStatus, roleStatus, orderTypeFn, orderStatusFn, orderNatureFn, Percentage, removeByValue, isIE, encodeString, formatDate, downloadFile } from './utils/core';
+ hoursStatus, roleStatus, orderTypeFn, orderStatusFn, orderNatureFn, Percentage, removeByValue, isIE, encodeString, formatDate, downloadFile, dateCompatible } from './utils/core';
import preventReClick from './utils/preventReClick' //防多次点击,重复提交
import plugins from '@/directive';
@@ -38,6 +38,7 @@ Vue.prototype.isIE = isIE;
Vue.prototype.encodeString = encodeString;
Vue.prototype.formatDate = formatDate;
Vue.prototype.downloadFile = downloadFile;
+Vue.prototype.dateCompatible = dateCompatible;
Vue.config.productionTip = false;
Vue.use(ElementUI, { size: 'small' });
diff --git a/src/setting.js b/src/setting.js
index a0e935e..1ed2e9f 100644
--- a/src/setting.js
+++ b/src/setting.js
@@ -12,7 +12,7 @@ if (isDev) {
host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/'
host = 'http://192.168.31.51:9000/'// 榕
- // host = 'http://192.168.31.116: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 2e421dd..c696171 100644
--- a/src/utils/api.js
+++ b/src/utils/api.js
@@ -71,6 +71,7 @@ export default {
examinePassword: `users/users/userAccount/examinePassword`,
viewUserDetailsforNakadai: `users/users/userAccount/viewUserDetailsforNakadai`,
oneClickEnableVerification: `users/users/userAccount/oneClickEnableVerification`,
+ getValueModule: `nakadai/nakadai/valueModuleManagement/getValueModule`,
queryServiceConfig: `nakadai/nakadai/serviceConfiguration/getAllService`, //查询服务配置
// 项目管理
@@ -338,6 +339,16 @@ export default {
searchTeam: `competition/competition/team/searchTeam`,
joinCompetitionTeam: `competition/competition/team/joinCompetitionTeam`,
addCompetitionTeam: `competition/competition/team/addCompetitionTeam`,
+ studentAccountApplication: `users/users/register/studentAccountApplication`,
+ checkPhoneOrEmailExist: `users/users/userInfo/checkPhoneOrEmailExist`,
+ editCompetitionTeam: `competition/competition/team/editCompetitionTeam`,
+ addAnAdvisor: `competition/competition/teamInstructor/addAnAdvisor`,
+ deleteAnAdvisor: `competition/competition/teamInstructor/deleteAnAdvisor`,
+ captainOfTransfer: `competition/competition/team/captainOfTransfer`,
+ removeTheLine: `competition/competition/team/removeTheLine`,
+ stageSelectParticipants: `competition/competition/teamParticipant/stageSelectParticipants`,
+ updateUser: `users/users/userInfo/updateUser`,
+ enquireAboutSchoolStudents: `users/users/userAccount/enquireAboutSchoolStudents`,
// 赛事公告
addAnnouncement: `competition/competition/announcement/addAnnouncement`,
amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`,
@@ -350,11 +361,11 @@ export default {
batchImportGrades: `${host1}competition/competition/performance/batchImportGrades`,
exportExperimentalResultsInBatch: `${host1}competition/competition/performance/exportExperimentalResultsInBatch`,
performanceExportFailure: `${host1}competition/competition/performance/exportFailure`,
+ rankExportFailure: `${host1}competition/competition/rank/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`,
@@ -362,6 +373,10 @@ export default {
cancelRanking: `${host1}competition/competition/rank/cancelRanking`,
reportDetail: `${host1}occupationlab/occupationlab/achievement/reportDetail`,
deleteLastPublication: `${host1}competition/competition/rank/deleteLastPublication`,
+ whetherToPublish: `${host1}competition/competition/rank/whetherToPublish`,
+ 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`,
diff --git a/src/utils/core.js b/src/utils/core.js
index c370fb1..96b5d0d 100644
--- a/src/utils/core.js
+++ b/src/utils/core.js
@@ -29,6 +29,14 @@ function toDateTime (date, time) {
return str
}
+function formateTime(num) {
+ return num < 10 ? `0${num}` : num
+}
+
+// new Date('2020-11-12 00:00:00') 在IE下失效,因此把-替换成/
+function dateCompatible(date) {
+ return date.replace(/\-/g, '/')
+}
function Percentage(num, total) {
if (num == 0 || total == 0){
@@ -215,6 +223,8 @@ function downloadFile(fileName, url) {
export {
fMoney,
toDateTime,
+ formateTime,
+ dateCompatible,
Percentage,
fMoney2,
systemStatus,
diff --git a/src/views/match/add/index.vue b/src/views/match/add/index.vue
index ca78939..e5561c7 100644
--- a/src/views/match/add/index.vue
+++ b/src/views/match/add/index.vue
@@ -6,7 +6,7 @@
-
+
大赛发布类型
@@ -16,32 +16,32 @@
编辑
-
-
-
+
+
@@ -53,7 +53,7 @@
保存并下一步
预览
- 取消
+ 取消
@@ -80,7 +80,7 @@ export default {
updateTime: 0,
setupId: '',
releaseType: 0,
- editing: 0,
+ editing: this.$route.query.id ? 0 : 1,
showBtns: true,
loadIns: null
};
@@ -110,7 +110,20 @@ export default {
},
// 上一步
prev() {
- this.step--
+ // 更改了信息才需要提示
+ 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)
+ }).catch(() => {
+ this.step--
+ })
+ } else {
+ this.step--
+ }
},
// 发布后的逻辑
next(next, setupId, competitionId) {
@@ -118,34 +131,42 @@ export default {
this.$router.push(`/match?page=${this.$store.state.matchPage}`)
} else if (next === 2) {
if (setupId) this.setupId = setupId
- if (competitionId) this.competitionId = competitionId
+ if (competitionId) {
+ this.$router.push('/addMatch?id=' + competitionId)
+ this.id = competitionId
+ this.competitionId = competitionId
+ }
this.step++
}
},
+ // 点击步骤条跳转
+ toStep(i) {
+ if (this.id && !this.editing) this.step = i
+ },
// 预览
preview() {
- util.local.set('match', this.form)
+ util.local.set('match', this.$refs.step1.form)
window.open(this.$router.resolve('/matchPreview').href)
},
back() {
- // const updateTime = this.updateTime
- // const { id } = this.form
- // // 更改了信息才需要提示
- // if ((id && updateTime > 1) || (!id && updateTime)) {
- // this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
- // type: 'warning'
- // }).then(() => {
- // this.save(0)
- // }).catch(() => {
- // this.backPage()
- // })
- // } else {
+ // 更改了信息才需要提示
+ 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'
+ }).then(() => {
+ this.save(0)
+ }).catch(() => {
+ this.backPage()
+ })
+ } else {
this.backPage()
- // }
- },
- backPage(){
- this.$router.back()
+ }
},
+ backPage() {
+ this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`)
+ }
}
};
@@ -162,6 +183,11 @@ export default {
.steps {
display: flex;
justify-content: center;
+ &.pointer {
+ li {
+ cursor: pointer;
+ }
+ }
li {
position: relative;
margin-right: 100px;
@@ -191,11 +217,11 @@ export default {
.active {
.circle {
color: #fff;
- border-color: #e0a1ff;
- background: #d379ff;
+ border-color: #459ffb;
+ background: #007EFF;
}
.text {
- color: #d379ff;
+ color: #007EFF;
}
}
.done {
diff --git a/src/views/match/add/step1.vue b/src/views/match/add/step1.vue
index e8aeaca..4973d5c 100644
--- a/src/views/match/add/step1.vue
+++ b/src/views/match/add/step1.vue
@@ -61,7 +61,7 @@
-