dev_2022-06-14
yujialong 2 years ago
parent 3b64da0a79
commit 951a69cfad
  1. 2
      src/views/match/add/index.vue
  2. 2
      src/views/match/manage/matchDetail.vue
  3. 21
      src/views/match/manage/notice.vue
  4. 4
      src/views/match/manage/noticeDetail.vue

@ -429,7 +429,7 @@ export default {
let signUpStartTime = new Date(form.signUpStartTime).getTime();
let signUpEndTime = new Date(form.signUpEndTime).getTime();
let playStartTime = new Date(form.playStartTime).getTime();
if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间");
// if (signUpStartTime && now > signUpStartTime) return util.warningMsg("");
if (!form.playStartTime && status == 1) return util.warningMsg("请选择竞赛时间");
if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间");
if (!form.description && status == 1) return util.warningMsg("请填写竞赛详情");

@ -464,7 +464,7 @@ export default {
let signUpStartTime = new Date(form.signUpStartTime).getTime();
let signUpEndTime = new Date(form.signUpEndTime).getTime();
let playStartTime = new Date(form.playStartTime).getTime();
if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间");
// if (signUpStartTime && now > signUpStartTime) return util.warningMsg("");
if (!form.playStartTime && status == 1) return util.warningMsg("请选择竞赛时间");
if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间");
if (!form.description && status == 1) return util.warningMsg("请填写竞赛详情");

@ -103,11 +103,24 @@ export default {
});
},
switchOff(val, row, index) {
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`)
.then(res => {
if (val) {
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => {}).catch(err => {})
} else if (!row.status) {
this.$confirm('是否发布该公告?', '提示', {
type: 'success'
}).then(() => {
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => {
this.$post(this.api.amendmentAnnouncement, {
id: row.id,
status: 1
}).then(res => {
this.getData()
}).catch(err => {})
}).catch(err => {})
}).catch(() => {
row.isOpen = 1
})
.catch(err => {
});
}
},
add() {
this.$router.push(`/noticeDetail?contestId=${this.id}`)

@ -63,7 +63,8 @@ export default {
contestId: this.$route.query.contestId,
announcementText: '',
announcementTitle: '',
announcementAnnexList: []
announcementAnnexList: [],
isOpen: 1
},
updateTime: 0,
fileName: '',
@ -119,6 +120,7 @@ export default {
this.$router.back()
}).catch(err => {})
} else {
form.isOpen = status ? 0 : 1
this.$post(this.api.addAnnouncement, form).then(res => {
util.successMsg("创建成功")
this.$router.back()

Loading…
Cancel
Save