mirror of
https://github.com/jumpserver/lina.git
synced 2025-04-27 11:10:51 +00:00
fix: update ConfirmRunAssetsDialog to conditionally show buttons based on running status
This commit is contained in:
parent
60163a6026
commit
67eb359f15
@ -16,6 +16,7 @@
|
||||
/>
|
||||
<ConfirmRunAssetsDialog
|
||||
:visible.sync="showConfirmRunAssetsDialog"
|
||||
:is-running="isRunning"
|
||||
:assets="classifiedAssets"
|
||||
@submit="onConfirmRunAsset"
|
||||
/>
|
||||
@ -339,6 +340,9 @@ export default {
|
||||
},
|
||||
ztree() {
|
||||
return this.$refs.TreeTable.$refs.TreeList.$refs.AutoDataZTree.$refs.AutoDataZTree.$refs.dataztree.$refs.ztree
|
||||
},
|
||||
isRunning() {
|
||||
return this.executionInfo.status.value === 'running'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -552,12 +556,12 @@ export default {
|
||||
})
|
||||
},
|
||||
setBtn() {
|
||||
if (this.executionInfo.status.value !== 'running') {
|
||||
if (!this.isRunning) {
|
||||
clearInterval(this.executionInfo.cancel)
|
||||
this.toolbar.left.run.icon = 'fa fa-play'
|
||||
}
|
||||
this.toolbar.left.run.isVisible = this.executionInfo.status.value === 'running'
|
||||
this.toolbar.left.stop.isVisible = this.executionInfo.status.value !== 'running'
|
||||
this.toolbar.left.run.isVisible = this.isRunning
|
||||
this.toolbar.left.stop.isVisible = !this.isRunning
|
||||
},
|
||||
onSubmitVariable(parameters) {
|
||||
this.parameters = parameters
|
||||
|
@ -2,7 +2,7 @@
|
||||
<Dialog
|
||||
:title="$t('ConfirmRunningAssets')"
|
||||
:visible.sync="iVisible"
|
||||
:show-buttons="true"
|
||||
:show-buttons="!isRunning"
|
||||
:show-confirm="true"
|
||||
:show-cancel="true"
|
||||
width="1200px"
|
||||
@ -70,6 +70,10 @@ export default {
|
||||
type: Object,
|
||||
default: () => {
|
||||
}
|
||||
},
|
||||
isRunning: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
Loading…
Reference in New Issue
Block a user