优化
This commit is contained in:
parent
0253412bce
commit
e0e608e329
@ -14,11 +14,13 @@ interface Props {
|
|||||||
modelValue?: Workflow.NodeDataType;
|
modelValue?: Workflow.NodeDataType;
|
||||||
spinning?: boolean;
|
spinning?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
hisDisabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
spinning: false,
|
spinning: false,
|
||||||
|
hisDisabled: false,
|
||||||
modelValue: () => ({})
|
modelValue: () => ({})
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -75,6 +77,8 @@ watch(
|
|||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
// window.$message?.error('获取工作流历史版本失败');
|
// window.$message?.error('获取工作流历史版本失败');
|
||||||
|
historyID.value = syncOptions.value.filter(item => item.key == '-1')[0].label
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -212,7 +216,7 @@ const onDragstop = () => {
|
|||||||
放大
|
放大
|
||||||
</NTooltip>
|
</NTooltip>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!slots.buttons" class="buttons">
|
<div v-if="hisDisabled" class="buttons">
|
||||||
<NDropdown trigger="hover" width="trigger" :options="syncOptions" @select="handleSyncSelect">
|
<NDropdown trigger="hover" width="trigger" :options="syncOptions" @select="handleSyncSelect">
|
||||||
<NTooltip placement="left">
|
<NTooltip placement="left">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
|
@ -9,6 +9,7 @@ const store = useWorkflowStore();
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const spinning = ref(false);
|
const spinning = ref(false);
|
||||||
|
const hisDisabled = ref(true);
|
||||||
|
|
||||||
const id: string = String(route.query.id);
|
const id: string = String(route.query.id);
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Workflow v-model="node" :spinning="spinning" disabled />
|
<Workflow v-model="node" :spinning="spinning" disabled :hisDisabled="hisDisabled"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@ -15,6 +15,7 @@ const spinning = ref(false);
|
|||||||
const id: string = String(route.query.id);
|
const id: string = String(route.query.id);
|
||||||
|
|
||||||
const node = ref<Workflow.NodeDataType>({});
|
const node = ref<Workflow.NodeDataType>({});
|
||||||
|
const hisDisabled = ref(true);
|
||||||
|
|
||||||
const getDetail = async () => {
|
const getDetail = async () => {
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
@ -46,7 +47,7 @@ const cancel = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Workflow v-model="node" :spinning="spinning" @save="update" @cancel="cancel" />
|
<Workflow v-model="node" :spinning="spinning" @save="update" @cancel="cancel" :hisDisabled="hisDisabled" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
Loading…
Reference in New Issue
Block a user