forked from JointCloud/JCC-RIP
fix
This commit is contained in:
parent
ff74cae8c3
commit
3ce4761d37
|
@ -286,32 +286,80 @@ export default {
|
|||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: '确认',
|
||||
center: true,
|
||||
cancelButtonText: '取消'
|
||||
}).then(() => {
|
||||
type === 1 ? startDeployInstance(data).then(e => {
|
||||
this.$message.success(this.$t('message.success'))
|
||||
this.freshAllList()
|
||||
})
|
||||
: startAllInstance(allId).then(e => {
|
||||
this.$message.success(this.$t('message.success'))
|
||||
this.freshAllList()
|
||||
})
|
||||
cancelButtonText: '取消',
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
instance.showCancelButton = false
|
||||
instance.confirmButtonLoading = true
|
||||
instance.confirmButtonText = '执行中...'
|
||||
type === 1 ? startDeployInstance(data).then(e => {
|
||||
this.$message.success(this.$t('message.success'))
|
||||
instance.confirmButtonLoading = false
|
||||
instance.confirmButtonText = '确认'
|
||||
instance.showCancelButton = true
|
||||
done()
|
||||
this.freshAllList()
|
||||
}).catch(e => {
|
||||
instance.confirmButtonLoading = false
|
||||
instance.confirmButtonText = '确认'
|
||||
instance.showCancelButton = true
|
||||
})
|
||||
: startAllInstance(allId).then(e => {
|
||||
this.$message.success(this.$t('message.success'))
|
||||
instance.confirmButtonLoading = false
|
||||
instance.confirmButtonText = '确认'
|
||||
instance.showCancelButton = true
|
||||
done()
|
||||
this.freshAllList()
|
||||
}).catch(e => {
|
||||
instance.confirmButtonLoading = false
|
||||
instance.confirmButtonText = '确认'
|
||||
instance.showCancelButton = true
|
||||
})
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$confirm('<p>确定要停止么?</p>', '温馨提示', {
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: '确认',
|
||||
center: true,
|
||||
cancelButtonText: '取消'
|
||||
}).then(() => {
|
||||
type === 2 ? stopDeployInstance(data).then(e => {
|
||||
this.$message.success(this.$t('message.success'))
|
||||
this.freshAllList()
|
||||
})
|
||||
: stopAllInstance(allId).then(e => {
|
||||
this.$message.success(this.$t('message.success'))
|
||||
this.freshAllList()
|
||||
})
|
||||
cancelButtonText: '取消',
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
instance.showCancelButton = false
|
||||
instance.confirmButtonLoading = true
|
||||
instance.confirmButtonText = '执行中...'
|
||||
type === 2 ? stopDeployInstance(data).then(e => {
|
||||
this.$message.success(this.$t('message.success'))
|
||||
instance.confirmButtonLoading = false
|
||||
instance.confirmButtonText = '确认'
|
||||
instance.showCancelButton = true
|
||||
done()
|
||||
this.freshAllList()
|
||||
}).catch(e => {
|
||||
instance.confirmButtonLoading = false
|
||||
instance.confirmButtonText = '确认'
|
||||
instance.showCancelButton = true
|
||||
})
|
||||
: stopAllInstance(allId).then(e => {
|
||||
this.$message.success(this.$t('message.success'))
|
||||
instance.confirmButtonLoading = false
|
||||
instance.confirmButtonText = '确认'
|
||||
instance.showCancelButton = true
|
||||
done()
|
||||
this.freshAllList()
|
||||
}).catch(e => {
|
||||
instance.confirmButtonLoading = false
|
||||
instance.confirmButtonText = '确认'
|
||||
instance.showCancelButton = true
|
||||
})
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue