Files
geg-gas-web/src/views/workflow/task/components/RestartProcess.vue
2024-02-05 09:15:37 +08:00

45 lines
822 B
Vue

<template>
<span @click.stop="restart"
><slot></slot>
<LaunchProcess
v-if="visible"
:schemaId="schemaId"
:taskId="taskId"
:processId="processId"
@close="close"
/>
</span>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import LaunchProcess from './LaunchProcess.vue';
const props = defineProps({
schemaId: {
type: String,
required: true,
},
taskId: {
type: String,
},
processId: {
type: String,
},
});
let emits = defineEmits(['close']);
let visible = ref(false);
function restart() {
if (props.taskId) {
visible.value = true;
} else {
// 只能选一个
visible.value = false;
}
}
function close() {
visible.value = false;
emits('close');
}
</script>