初始版本提交
This commit is contained in:
44
src/views/workflow/task/components/RestartProcess.vue
Normal file
44
src/views/workflow/task/components/RestartProcess.vue
Normal file
@ -0,0 +1,44 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user