diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue index ad0c7b19..8f0a2916 100644 --- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue @@ -51,7 +51,7 @@ import { SimpleFlowNode, NodeType, NODE_DEFAULT_TEXT } from './consts' import { useWatchNode } from './node' import { ZoomOut, ZoomIn, ScaleToOriginal } from '@element-plus/icons-vue' import { isString } from '@/utils/is' -import download from "@/utils/download"; +import download from '@/utils/download' defineOptions({ name: 'SimpleProcessModel' @@ -173,7 +173,6 @@ defineExpose({ }) /** 导出 JSON */ -// TODO @zws:增加一个 download 里面搞个 json 更好 const exportJson = () => { download.json(new Blob([JSON.stringify(processNodeTree.value)]), 'model.json') } diff --git a/src/layout/components/TagsView/src/TagsView.vue b/src/layout/components/TagsView/src/TagsView.vue index ce041b2b..af492ba2 100644 --- a/src/layout/components/TagsView/src/TagsView.vue +++ b/src/layout/components/TagsView/src/TagsView.vue @@ -15,7 +15,6 @@ import { useScrollTo } from '@/hooks/event/useScrollTo' import { useTagsView } from '@/hooks/web/useTagsView' import { cloneDeep } from 'lodash-es' - defineOptions({ name: 'TagsView' }) const { getPrefixCls } = useDesign() diff --git a/src/store/modules/tagsView.ts b/src/store/modules/tagsView.ts index f565ef95..2b2d817f 100644 --- a/src/store/modules/tagsView.ts +++ b/src/store/modules/tagsView.ts @@ -156,7 +156,7 @@ export const useTagsViewStore = defineStore('tagsView', { } } }, - // 设置当前选中的tag + // 设置当前选中的 tag setSelectedTag(tag: RouteLocationNormalizedLoaded) { this.selectedTag = tag }, diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index 1a2416b0..497bf3b5 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -262,7 +262,7 @@ import { checkPermi } from '@/utils/permission' import { useUserStoreWithOut } from '@/store/modules/user' import { useAppStore } from '@/store/modules/app' import { cloneDeep } from 'lodash-es' -import {useTagsView} from "@/hooks/web/useTagsView"; +import { useTagsView } from '@/hooks/web/useTagsView' defineOptions({ name: 'BpmModel' }) @@ -499,21 +499,21 @@ const handleDeleteCategory = async () => { } catch {} } -const tagsView = useTagsView(); /** 添加流程模型弹窗 */ +const tagsView = useTagsView() const modelFormRef = ref() -const openModelForm = (type: string, id?: number) => { +const openModelForm = async (type: string, id?: number) => { if (type === 'create') { - push({ name: 'BpmModelCreate' }) + await push({ name: 'BpmModelCreate' }) } else { - push({ + await push({ name: 'BpmModelUpdate', params: { id, type } - }).then((_) => { - if (type === 'copy') { - tagsView.setTitle('复制流程') - } }) + // 设置标题 + if (type === 'copy') { + tagsView.setTitle('复制流程') + } } } diff --git a/src/views/bpm/model/editor/index.vue b/src/views/bpm/model/editor/index.vue index 1076cf56..50386487 100644 --- a/src/views/bpm/model/editor/index.vue +++ b/src/views/bpm/model/editor/index.vue @@ -71,8 +71,7 @@ const controlForm = ref({ const model = ref() // 流程模型的信息 /** 初始化 modeler */ -// TODO @zws:需要初始化,不然首次创建后,无法发布!相当于说,key、name 要去赋值下 -const initModeler = async (item) => { +const initModeler = async (item: any) => { //先初始化模型数据 model.value = modelData.value modeler.value = item