fix: 修复调度页面编排状态检查逻辑
使用 isCompleted 字段替代 scheduleStatus 判断编排是否完成 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot]
parent
0c6437084b
commit
1643acf767
@@ -155,12 +155,13 @@ export default {
|
|||||||
async checkScheduleStatus() {
|
async checkScheduleStatus() {
|
||||||
try {
|
try {
|
||||||
const res = await getScheduleResult(this.competitionId)
|
const res = await getScheduleResult(this.competitionId)
|
||||||
const scheduleStatus = res.data?.data?.scheduleStatus || res.data?.scheduleStatus || 0
|
const scheduleData = res.data?.data
|
||||||
|
const isCompleted = scheduleData?.isCompleted || false
|
||||||
|
|
||||||
console.log('编排状态:', scheduleStatus)
|
console.log('编排完成状态:', isCompleted)
|
||||||
|
|
||||||
// 如果编排未完成(状态不是2),提示用户并返回
|
// 如果编排未完成,提示用户并返回
|
||||||
if (scheduleStatus !== 2) {
|
if (!isCompleted) {
|
||||||
this.$message.warning('请先完成编排并锁定后,才能进行调度操作')
|
this.$message.warning('请先完成编排并锁定后,才能进行调度操作')
|
||||||
// 延迟返回上一页
|
// 延迟返回上一页
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user