|
@@ -3,16 +3,6 @@
|
|
|
<TeleportContainer />
|
|
<TeleportContainer />
|
|
|
<div class="relative z-1 size-full">
|
|
<div class="relative z-1 size-full">
|
|
|
<workflowChart :ID="ID" :data="state.workflowData" ref="ref_workflow" />
|
|
<workflowChart :ID="ID" :data="state.workflowData" ref="ref_workflow" />
|
|
|
- <div class="absolute top-4 left-4 flex items-center gap-4">
|
|
|
|
|
- <CzrButton type="primary" title="保存" @click="onSave" />
|
|
|
|
|
- <div
|
|
|
|
|
- class="flex items-center text-[var(--czr-error-color)]"
|
|
|
|
|
- v-if="state.isEdit"
|
|
|
|
|
- >
|
|
|
|
|
- <SvgIcon name="czr_tip" color="var(--czr-error-color)" class="mr-1" />
|
|
|
|
|
- 有未保存的修改
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
class="absolute top-0 top-4 right-4 z-2 flex gap-2.5"
|
|
class="absolute top-0 top-4 right-4 z-2 flex gap-2.5"
|
|
@@ -44,20 +34,19 @@ const DialogStore = useDialogStore()
|
|
|
const AppStore = useAppStore()
|
|
const AppStore = useAppStore()
|
|
|
const TeleportContainer = getTeleport()
|
|
const TeleportContainer = getTeleport()
|
|
|
const ProcessStore = useProcessStore()
|
|
const ProcessStore = useProcessStore()
|
|
|
-const emit = defineEmits(['autoSave'])
|
|
|
|
|
|
|
+const emit = defineEmits(['autoSave', 'save'])
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
ID: {},
|
|
ID: {},
|
|
|
})
|
|
})
|
|
|
const { proxy }: any = getCurrentInstance()
|
|
const { proxy }: any = getCurrentInstance()
|
|
|
const state: any = reactive({
|
|
const state: any = reactive({
|
|
|
workflowData: null,
|
|
workflowData: null,
|
|
|
- isEdit: false,
|
|
|
|
|
})
|
|
})
|
|
|
const ref_workflow = ref()
|
|
const ref_workflow = ref()
|
|
|
watch(
|
|
watch(
|
|
|
() => ProcessStore.autoSaveFlag,
|
|
() => ProcessStore.autoSaveFlag,
|
|
|
() => {
|
|
() => {
|
|
|
- state.isEdit = true
|
|
|
|
|
|
|
+ emit('autoSave')
|
|
|
},
|
|
},
|
|
|
)
|
|
)
|
|
|
const onSave = () => {
|
|
const onSave = () => {
|
|
@@ -107,7 +96,7 @@ const onSave = () => {
|
|
|
background: 'rgba(0, 0,0, 0.3)',
|
|
background: 'rgba(0, 0,0, 0.3)',
|
|
|
})
|
|
})
|
|
|
console.log(res)
|
|
console.log(res)
|
|
|
- state.isEdit = false
|
|
|
|
|
|
|
+ emit('save')
|
|
|
loading.close()
|
|
loading.close()
|
|
|
}
|
|
}
|
|
|
const initData = () => {
|
|
const initData = () => {
|
|
@@ -253,6 +242,9 @@ onMounted(() => {
|
|
|
initDictionary()
|
|
initDictionary()
|
|
|
})
|
|
})
|
|
|
const initDictionary = () => {}
|
|
const initDictionary = () => {}
|
|
|
|
|
+defineExpose({
|
|
|
|
|
+ save: onSave,
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style>
|
|
<style lang="scss" scoped></style>
|