|
|
@ -95,6 +95,18 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<set v-if="setVisible" :form.sync="form[curStep]" :step1.sync="step1" @hideSet="hideSet" /> |
|
|
|
<set v-if="setVisible" :form.sync="form[curStep]" :step1.sync="step1" @hideSet="hideSet" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="提示" :visible.sync="tipsVisible" width="500px" :close-on-click-modal="false" |
|
|
|
|
|
|
|
custom-class="tips-dia"> |
|
|
|
|
|
|
|
<p style="margin-bottom: 15px;line-height: 1.6"> |
|
|
|
|
|
|
|
团队赛发布成功,若有修改报名时间、赛程与规则,修改不会影响已经分配的阶段参赛人员,但后面加入报名的将不再自动分配,如需将已分配的重新分配和新加入报名的进行分配,请前往报名人员列表设置全部重新分配</p> |
|
|
|
|
|
|
|
<el-checkbox v-model="closeStatus">不再提示</el-checkbox> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
|
|
<el-button size="small" type="primary" @click="closePopup">关闭</el-button> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -147,6 +159,9 @@ export default { |
|
|
|
setVisible: false, |
|
|
|
setVisible: false, |
|
|
|
curStep: 0, |
|
|
|
curStep: 0, |
|
|
|
curOriginForm: {}, |
|
|
|
curOriginForm: {}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
closeStatus: false, |
|
|
|
|
|
|
|
tipsVisible: false, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
components: { |
|
|
|
components: { |
|
|
@ -308,6 +323,12 @@ export default { |
|
|
|
publish () { |
|
|
|
publish () { |
|
|
|
this.competitionId && this.$post(`${this.api.publishCompetition}?competitionId=${this.competitionId}&publishStatus=1`).then(res => { }).catch(err => { }) |
|
|
|
this.competitionId && this.$post(`${this.api.publishCompetition}?competitionId=${this.competitionId}&publishStatus=1`).then(res => { }).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 关闭编辑的提示弹框 |
|
|
|
|
|
|
|
async closePopup () { |
|
|
|
|
|
|
|
if (this.closeStatus) await this.$post(`${this.api.closePopup}?competitionId=${this.competitionId}`) |
|
|
|
|
|
|
|
this.$emit('next', 0) |
|
|
|
|
|
|
|
}, |
|
|
|
// 自动分配人员 |
|
|
|
// 自动分配人员 |
|
|
|
async automaticAllocation (assignOrNot, next) { |
|
|
|
async automaticAllocation (assignOrNot, next) { |
|
|
|
await this.$post(this.api.updateEventAllocationRecord, { |
|
|
|
await this.$post(this.api.updateEventAllocationRecord, { |
|
|
@ -318,41 +339,40 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 自动分配人员弹框 |
|
|
|
// 自动分配人员弹框 |
|
|
|
async autoAllocationConfirm (next) { |
|
|
|
async autoAllocationConfirm (next) { |
|
|
|
|
|
|
|
// 查询是否有分配信息 |
|
|
|
const { data } = await this.$post(`${this.api.viewEventAllocationInformation}?competitionId=${this.competitionId}`) |
|
|
|
const { data } = await this.$post(`${this.api.viewEventAllocationInformation}?competitionId=${this.competitionId}`) |
|
|
|
if (!data || data.assignOrNot === undefined || !this.form[0].contentId) { |
|
|
|
if (!data || data.assignOrNot === undefined || !this.form[0].contentId) { |
|
|
|
// 首次发布 or 新增 才需要弹框 |
|
|
|
// 首次发布 or 新增 才需要弹框 |
|
|
|
this.$confirm('<p>团队赛发布成功,是否要自动分配阶段参赛人员?</p><p style="margin-top: 10px;color: #a9a9a9;">(点击“是”将会在报名结束后给报名的团队自动分配阶段参赛人员</p>', '提示', { |
|
|
|
const now = await Util.getNow() |
|
|
|
confirmButtonText: '是', |
|
|
|
// 报名结束时间还没到 |
|
|
|
cancelButtonText: '否', |
|
|
|
if (new Date(this.$parent.$refs.step1.form.signUpEndTime) > now) { |
|
|
|
type: 'success', |
|
|
|
this.$confirm('<p>团队赛发布成功,是否要自动分配阶段参赛人员?</p><p style="margin-top: 10px;color: #a9a9a9;">(点击“是”将会在报名结束后给报名的团队自动分配阶段参赛人员</p>', '提示', { |
|
|
|
closeOnClickModal: false, |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
this.automaticAllocation(1, next) |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
this.automaticAllocation(0, next) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// 查询是否需要弹框 |
|
|
|
|
|
|
|
const res = await this.$post(`${this.api.editWhetherPopUpsAppear}?competitionId=${this.competitionId}`) |
|
|
|
|
|
|
|
if (res.popupState) { |
|
|
|
|
|
|
|
this.$confirm('<p>团队赛发布成功,是否要重新自动分配阶段参赛人员?</p><p style="margin-top: 10px;color: #a9a9a9;">(点击“是”将会<span style="color: #f00;">立即</span>给报名的团队自动分配阶段参赛人员</p>', '提示', { |
|
|
|
|
|
|
|
confirmButtonText: '是', |
|
|
|
confirmButtonText: '是', |
|
|
|
cancelButtonText: '否', |
|
|
|
cancelButtonText: '否', |
|
|
|
type: 'success', |
|
|
|
type: 'success', |
|
|
|
closeOnClickModal: false, |
|
|
|
closeOnClickModal: false, |
|
|
|
showClose: false, |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
}).then(async () => { |
|
|
|
}).then(() => { |
|
|
|
await this.$post(`${this.api.automaticAllocation}?competitionId=${this.id}`) // 立马分配 |
|
|
|
this.automaticAllocation(1, next) |
|
|
|
this.$emit('next', next) |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
this.automaticAllocation(0, next) |
|
|
|
this.automaticAllocation(0, next) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 无需弹框 |
|
|
|
this.$confirm('团队赛发布成功,由于您设置的报名时间已结束,如需自动分配阶段参赛人员,请前往报名人员列表进行设置', '提示', { |
|
|
|
this.$emit('next', next) |
|
|
|
confirmButtonText: '关闭', |
|
|
|
|
|
|
|
type: 'success', |
|
|
|
|
|
|
|
closeOnClickModal: false, |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
showClose: false, |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
this.$emit('next', next) |
|
|
|
|
|
|
|
}).catch(() => { }) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else if (data.whetherToHidePopUps) { |
|
|
|
|
|
|
|
// 编辑的提示弹框如果没勾选不再提示,则弹框提示 |
|
|
|
|
|
|
|
this.tipsVisible = true |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$emit('next', next) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
@ -507,4 +527,10 @@ export default { |
|
|
|
cursor: pointer; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/deep/.tips-dia { |
|
|
|
|
|
|
|
.el-dialog__body { |
|
|
|
|
|
|
|
padding: 10px 20px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |