From d7e6523dadb931cda5f3919a6dbcbae993f088e2 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sat, 4 Jan 2025 15:24:38 +0800 Subject: [PATCH 001/273] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91=E5=BB=B6=E8=BF=9F=E5=99=A8=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E7=9A=84=E9=AB=98=E4=BA=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/ProcessInstanceSimpleViewer.vue | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue b/src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue index 0808bec9..0017d3fe 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue @@ -82,7 +82,6 @@ const setSimpleModelNodeTaskStatus = ( } return } - // 审批节点 if ( simpleModel.type === NodeType.START_USER_NODE || @@ -98,26 +97,33 @@ const setSimpleModelNodeTaskStatus = ( } // TODO 是不是还缺一个 cancel 的状态 } - // 抄送节点 if (simpleModel.type === NodeType.COPY_TASK_NODE) { - // 抄送节点 只有通过和未执行状态 + // 抄送节点,只有通过和未执行状态 if (finishedActivityIds.includes(simpleModel.id)) { simpleModel.activityStatus = TaskStatusEnum.APPROVE } else { simpleModel.activityStatus = TaskStatusEnum.NOT_START } } - // 条件节点 对应 SequenceFlow + // 延迟器节点 + if (simpleModel.type === NodeType.DELAY_TIMER_NODE) { + // 延迟器节点,只有通过和未执行状态 + if (finishedActivityIds.includes(simpleModel.id)) { + simpleModel.activityStatus = TaskStatusEnum.APPROVE + } else { + simpleModel.activityStatus = TaskStatusEnum.NOT_START + } + } + // 条件节点对应 SequenceFlow if (simpleModel.type === NodeType.CONDITION_NODE) { - // 条件节点。只有通过和未执行状态 + // 条件节点,只有通过和未执行状态 if (finishedSequenceFlowActivityIds.includes(simpleModel.id)) { simpleModel.activityStatus = TaskStatusEnum.APPROVE } else { simpleModel.activityStatus = TaskStatusEnum.NOT_START } } - // 网关节点 if ( simpleModel.type === NodeType.CONDITION_BRANCH_NODE || @@ -155,13 +161,13 @@ const setSimpleModelNodeTaskStatus = ( diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/RouteNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/RouteNode.vue new file mode 100644 index 00000000..76f7dbe9 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/RouteNode.vue @@ -0,0 +1,98 @@ + + + + From 0a15eca573ea5254a915b41d38384cc0cccf716d Mon Sep 17 00:00:00 2001 From: LesanOuO <1960681385@qq.com> Date: Mon, 6 Jan 2025 12:49:55 +0800 Subject: [PATCH 004/273] =?UTF-8?q?feat:=20=E5=AE=A1=E6=89=B9=E4=BA=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=80=E8=A1=8C=E4=B8=89=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/nodes-config/UserTaskNodeConfig.vue | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue index fb5e780e..d4b1101f 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -3,7 +3,7 @@ :append-to-body="true" v-model="settingVisible" :show-close="false" - :size="550" + :size="580" :before-close="saveConfig" class="justify-start" > @@ -46,14 +46,13 @@ v-model="configForm.candidateStrategy" @change="changeCandidateStrategy" > - - {{ dict.label }} - + + + + {{ dict.label }} + + + @@ -163,7 +162,7 @@ :key="idx" :label="item.title" :value="item.field" - :disabled ="!item.required" + :disabled="!item.required" /> From 739a1c29a2eeeb27de96718d534fb63ccc0b846a Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Mon, 6 Jan 2025 17:25:59 +0800 Subject: [PATCH 005/273] =?UTF-8?q?feat:=20Simple=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8-=E7=9B=91=E5=90=AC=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/NodeHandler.vue | 5 +- .../SimpleProcessDesignerV2/src/consts.ts | 27 +++ .../src/nodes-config/UserTaskNodeConfig.vue | 155 +++++++++++++++++- 3 files changed, 184 insertions(+), 3 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue index 4dfd51ad..13ce4387 100644 --- a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue +++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue @@ -120,7 +120,10 @@ const addNode = (type: number) => { type: AssignEmptyHandlerType.APPROVE }, assignStartUserHandlerType: AssignStartUserHandlerType.START_USER_AUDIT, - childNode: props.childNode + childNode: props.childNode, + createTaskListener: { + enable: false + } } emits('update:childNode', data) } diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index 10d8a21b..9a20d0f8 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -93,6 +93,8 @@ export interface SimpleFlowNode { assignEmptyHandler?: AssignEmptyHandler // 审批节点的审批人与发起人相同时,对应的处理类型 assignStartUserHandlerType?: number + // 创建任务监听器 + createTaskListener: ListenerHandler // 条件类型 conditionType?: ConditionType // 条件表达式 @@ -222,6 +224,31 @@ export type AssignEmptyHandler = { userIds?: number[] } +/** + * 监听器的结构定义 + */ +export type ListenerHandler = { + enable: boolean + path: string + header: ListenerMap[] + body: ListenerMap[] +} +export type ListenerMap = { + key: string + type: number + value: string +} +export const LISTENER_MAP_TYPES = [ + { + value: 1, + label: '固定值' + }, + { + value: 2, + label: '表单' + } +] + // 审批拒绝类型枚举 export enum RejectHandlerType { /** diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue index d4b1101f..82aecbe5 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -434,6 +434,133 @@ + +
+ + + 创建任务 + + + + +
+ + + + + + + +
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ + 添加一行 + +
+ +
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ + 添加一行 + +
+
+ + + 指派任务执行人员 + + + + + + + 完成任务 + + + + +
+
+
- + - + @@ -81,7 +81,7 @@ const { settingVisible, closeDrawer, openDrawer } = useDrawer() const currentNode = useWatchNode(props) // 节点名称 const { nodeName, showInput, clickIcon, blurEvent } = useNodeName(NodeType.ROUTE_BRANCH_NODE) -const routeGroups = ref([]) +const routerGroups = ref([]) const nodeOptions = ref() // 保存配置 @@ -90,26 +90,26 @@ const saveConfig = async () => { if (!showText) return false currentNode.value.name = nodeName.value! currentNode.value.showText = showText - currentNode.value.routeGroups = routeGroups.value + currentNode.value.routerGroups = routerGroups.value settingVisible.value = false return true } // 显示路由分支节点配置, 由父组件传过来 const showRouteNodeConfig = (node: SimpleFlowNode) => { getRoutableNode() - routeGroups.value = [] + routerGroups.value = [] nodeName.value = node.name - if (node.routeGroups) { - routeGroups.value = node.routeGroups + if (node.routerGroups) { + routerGroups.value = node.routerGroups } } const getShowText = () => { - if (!routeGroups.value || !Array.isArray(routeGroups.value) || routeGroups.value.length <= 0) { + if (!routerGroups.value || !Array.isArray(routerGroups.value) || routerGroups.value.length <= 0) { message.warning('请配置路由!') return '' } - for (const route of routeGroups.value) { + for (const route of routerGroups.value) { if (!route.nodeId || !route.conditionType) { message.warning('请完善路由配置项!') return '' @@ -129,11 +129,11 @@ const getShowText = () => { } } } - return `${routeGroups.value.length}条路由分支` + return `${routerGroups.value.length}条路由分支` } const addRouteGroup = () => { - routeGroups.value.push({ + routerGroups.value.push({ nodeId: '', conditionType: ConditionType.RULE, conditionExpression: '', @@ -158,7 +158,7 @@ const addRouteGroup = () => { } const deleteRouteGroup = (index) => { - routeGroups.value.splice(index, 1) + routerGroups.value.splice(index, 1) } const getRoutableNode = () => { diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue index 962ce9cc..66887a7e 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -482,12 +482,12 @@
@@ -505,7 +505,7 @@ icon="ep:delete" :size="18" @click=" - deleteTaskListenerMap( + deleteTaskListenerParam( configForm[`task${listener.type}ListenerHeader`], index ) @@ -516,7 +516,7 @@ 添加一行 @@ -542,12 +542,12 @@
@@ -565,7 +565,7 @@ icon="ep:delete" :size="18" @click=" - deleteTaskListenerMap( + deleteTaskListenerParam( configForm[`task${listener.type}ListenerBody`], index ) @@ -576,7 +576,7 @@ 添加一行 @@ -623,7 +623,7 @@ import { FieldPermissionType, ProcessVariableEnum, LISTENER_MAP_TYPES, - ListenerMapTypeEnum + ListenerParamTypeEnum } from '../consts' import { @@ -1032,14 +1032,14 @@ function useTimeoutHandler() { } } -const addTaskListenerMap = (arr) => { +const addTaskListenerParam = (arr) => { arr.push({ key: '', type: 1, value: '' }) } -const deleteTaskListenerMap = (arr, index) => { +const deleteTaskListenerParam = (arr, index) => { arr.splice(index, 1) } From 5fa2a78e849558e30c4fdd9b45dbf65b659eb146 Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Wed, 8 Jan 2025 15:03:06 +0800 Subject: [PATCH 021/273] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E5=99=A8=E8=AF=B7=E6=B1=82=E5=9C=B0=E5=9D=80=E9=9D=9E?= =?UTF-8?q?=E7=A9=BA=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/nodes-config/UserTaskNodeConfig.vue | 290 +++++++++--------- 1 file changed, 148 insertions(+), 142 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue index 66887a7e..3e497b4a 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -436,155 +436,161 @@
-
- -
- - {{ listener.name }} - + +
+ + {{ listener.name }} + + + + +
- -
- - - - - - - -
-
- -
-
- - - -
-
- - - - -
-
- -
+ + + + +
+
+
- - 添加一行 - - - -
-
- -
-
- - - -
-
- + + - - - -
-
- -
+
- - 添加一行 - -
-
+
+ + + + +
+
+ +
+
+ + 添加一行 + +
+ +
+
+ +
+
+ + + +
+
+ + + + +
+
+ +
+
+ + 添加一行 + +
- -
+
+
- + @@ -84,8 +87,17 @@ const { nodeName, showInput, clickIcon, blurEvent } = useNodeName(NodeType.ROUTE const routerGroups = ref([]) const nodeOptions = ref() +const conditionRef = ref([]) // 保存配置 const saveConfig = async () => { + // 校验表单 + let valid = true + for (const item of conditionRef.value) { + if (!(await item.validate())) { + valid = false + } + } + if (!valid) return false const showText = getShowText() if (!showText) return false currentNode.value.name = nodeName.value! diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue index e8fe1d76..85f6e4a0 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue @@ -59,15 +59,24 @@
- - - + + + + +
@@ -80,7 +89,16 @@
- + + +
@@ -122,8 +140,8 @@ import { ConditionType, ProcessVariableEnum } from '../../consts' -import {BpmModelFormType} from '@/utils/constants' -import {useFormFields} from '../../node' +import { BpmModelFormType } from '@/utils/constants' +import { useFormFields } from '../../node' const props = defineProps({ modelValue: { @@ -202,10 +220,10 @@ const addConditionGroup = (conditions) => { const validate = async () => { if (!formRef) return false - return await formRef.value.validate(); + return await formRef.value.validate() } -defineExpose({validate}) +defineExpose({ validate }) diff --git a/src/views/bpm/simple/SimpleModelDesign.vue b/src/views/bpm/simple/SimpleModelDesign.vue index eed00997..e07a04c9 100644 --- a/src/views/bpm/simple/SimpleModelDesign.vue +++ b/src/views/bpm/simple/SimpleModelDesign.vue @@ -23,7 +23,7 @@ const props = defineProps<{ modelId?: string modelKey?: string modelName?: string - value?: string + value?: any startUserIds?: number[] }>() @@ -34,7 +34,6 @@ const currentValue = ref('') // 初始化或更新当前值 const initOrUpdateValue = async () => { - console.log('initOrUpdateValue', props.value) if (props.value) { currentValue.value = props.value // 如果设计器已经初始化,立即加载数据 From 3d8f1290c3c023f34567978d8eebb9985881dc98 Mon Sep 17 00:00:00 2001 From: zws <447643445@qq.com> Date: Tue, 14 Jan 2025 08:46:08 +0800 Subject: [PATCH 035/273] =?UTF-8?q?perf:=20bpm=20=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E8=A1=A8=E5=8D=95=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96.=20=E5=8E=BB=E6=8E=89=E5=A4=A7=E9=87=8Fwatch=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81.=20=E7=94=A8=E4=BE=9D=E8=B5=96=E6=B3=A8?= =?UTF-8?q?=E5=85=A5=E6=9B=BF=E6=8D=A2props=20=E4=BC=A0=E9=80=92=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=95=B0=E6=8D=AE.=20=E5=A2=9E=E5=8A=A0=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/SimpleProcessDesigner.vue | 118 +---------- .../src/SimpleProcessModel.vue | 63 +++++- .../package/designer/ProcessDesigner.vue | 23 +-- src/views/bpm/model/editor/index.vue | 190 +----------------- src/views/bpm/model/form/BasicInfo.vue | 51 ++--- src/views/bpm/model/form/FormDesign.vue | 11 +- src/views/bpm/model/form/ProcessDesign.vue | 166 +-------------- src/views/bpm/model/form/index.vue | 150 ++++---------- src/views/bpm/simple/SimpleModelDesign.vue | 113 +---------- 9 files changed, 156 insertions(+), 729 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue index 22e6073f..ad42696b 100644 --- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue @@ -40,7 +40,7 @@ defineOptions({ name: 'SimpleProcessDesigner' }) -const emits = defineEmits(['success', 'init-finished']) // 保存成功事件 +const emits = defineEmits(['success']) // 保存成功事件 const props = defineProps({ modelId: { @@ -59,13 +59,12 @@ const props = defineProps({ startUserIds : { type: Array, required: false - }, - value: { - type: [String, Object], - required: false } }) +const processData = inject('processData') as Ref + + const loading = ref(false) const formFields = ref([]) const formType = ref(20) @@ -76,9 +75,6 @@ const deptOptions = ref([]) // 部门列表 const deptTreeOptions = ref() const userGroupOptions = ref([]) // 用户组列表 -// 添加当前值的引用 -const currentValue = ref() - provide('formFields', formFields) provide('formType', formType) provide('roleList', roleOptions) @@ -88,7 +84,8 @@ provide('deptList', deptOptions) provide('userGroupList', userGroupOptions) provide('deptTree', deptTreeOptions) provide('startUserIds', props.startUserIds) - +provide('tasks', []) +provide('processInstance', {}) const message = useMessage() // 国际化 const processNodeTree = ref() const errorDialogVisible = ref(false) @@ -112,70 +109,14 @@ const updateModel = () => { } } -// 加载流程数据 -const loadProcessData = async (data: any) => { - try { - if (data) { - const parsedData = typeof data === 'string' ? JSON.parse(data) : data - processNodeTree.value = parsedData - currentValue.value = parsedData - // 确保数据加载后刷新视图 - await nextTick() - if (simpleProcessModelRef.value?.refresh) { - await simpleProcessModelRef.value.refresh() - } - } - } catch (error) { - console.error('加载流程数据失败:', error) - } -} - -// 监听属性变化 -watch( - () => props.value, - async (newValue, oldValue) => { - if (newValue && newValue !== oldValue) { - await loadProcessData(newValue) - } - }, - { immediate: true, deep: true } -) - -// 监听流程节点树变化,自动保存 -watch( - () => processNodeTree.value, - async (newValue, oldValue) => { - if (newValue && oldValue && JSON.stringify(newValue) !== JSON.stringify(oldValue)) { - await saveSimpleFlowModel(newValue) - } - }, - { deep: true } -) const saveSimpleFlowModel = async (simpleModelNode: SimpleFlowNode) => { if (!simpleModelNode) { return } - // 校验节点 - errorNodes = [] - validateNode(simpleModelNode, errorNodes) - if (errorNodes.length > 0) { - errorDialogVisible.value = true - return - } - try { - if (props.modelId) { - // 编辑模式 - const data = { - id: props.modelId, - simpleModel: simpleModelNode - } - await updateBpmSimpleModel(data) - } - // 无论是编辑还是新建模式,都更新当前值并触发事件 - currentValue.value = simpleModelNode + processData.value = simpleModelNode emits('success', simpleModelNode) } catch (error) { console.error('保存失败:', error) @@ -246,61 +187,20 @@ onMounted(async () => { deptTreeOptions.value = handleTree(deptOptions.value as DeptApi.DeptVO[], 'id') // 获取用户组列表 userGroupOptions.value = await UserGroupApi.getUserGroupSimpleList() - // 加载流程数据 - if (props.modelId) { - // 获取 SIMPLE 设计器模型 - const result = await getBpmSimpleModel(props.modelId) - if (result) { - await loadProcessData(result) - } else { - updateModel() - } - } else if (props.value) { - await loadProcessData(props.value) + if (processData.value) { + processNodeTree.value = processData?.value } else { updateModel() } } finally { loading.value = false - emits('init-finished') } }) const simpleProcessModelRef = ref() -/** 获取当前流程数据 */ -const getCurrentFlowData = async () => { - try { - if (simpleProcessModelRef.value) { - const data = await simpleProcessModelRef.value.getCurrentFlowData() - if (data) { - currentValue.value = data - return data - } - } - return currentValue.value - } catch (error) { - console.error('获取流程数据失败:', error) - return currentValue.value - } -} - -// 刷新方法 -const refresh = async () => { - try { - if (currentValue.value) { - await loadProcessData(currentValue.value) - } - } catch (error) { - console.error('刷新失败:', error) - } -} defineExpose({ - getCurrentFlowData, - updateModel, - loadProcessData, - refresh }) diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue index ccd1f10d..b9a26475 100644 --- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue @@ -3,11 +3,31 @@
+ 导出 + 导入 + + {{ scaleValue }}% + + + + + + + + +
@@ -33,7 +53,8 @@ import ProcessNodeTree from './ProcessNodeTree.vue' import { SimpleFlowNode, NodeType, NODE_DEFAULT_TEXT } from './consts' import { useWatchNode } from './node' -import { ZoomOut, ZoomIn, ScaleToOriginal } from '@element-plus/icons-vue' +import { ZoomOut, ZoomIn, ScaleToOriginal, Select } from '@element-plus/icons-vue' +import { isString } from '@/utils/is' defineOptions({ name: 'SimpleProcessModel' @@ -85,6 +106,16 @@ const processReZoom = () => { const errorDialogVisible = ref(false) let errorNodes: SimpleFlowNode[] = [] +const saveSimpleFlowModel = async () => { + errorNodes = [] + validateNode(processNodeTree.value, errorNodes) + if (errorNodes.length > 0) { + errorDialogVisible.value = true + return + } + emits('save', processNodeTree.value) +} + // 校验节点设置。 暂时以 showText 为空 未节点错误配置 const validateNode = (node: SimpleFlowNode | undefined, errorNodes: SimpleFlowNode[]) => { if (node) { @@ -143,6 +174,36 @@ const getCurrentFlowData = async () => { defineExpose({ getCurrentFlowData }) + +const exportJson = () => { + const blob = new Blob([JSON.stringify(processNodeTree.value)]); + const tempLink = document.createElement('a'); // 创建a标签 + const href = window.URL.createObjectURL(blob); // 创建下载的链接 + //filename + const fileName = `model.json`; + tempLink.href = href; + tempLink.target = '_blank'; + tempLink.download = fileName; + document.body.appendChild(tempLink); + tempLink.click(); // 点击下载 + document.body.removeChild(tempLink); // 下载完成移除元素 + window.URL.revokeObjectURL(href); // 释放掉blob对象 +} +const importJson = () => { + refFile.value.click() +} +const refFile = ref() +// 加载本地文件 +const importLocalFile = () => { + const file = refFile.value.files[0] + const reader = new FileReader() + reader.readAsText(file) + reader.onload = function () { + if (isString(this.result)) { + processNodeTree.value = JSON.parse(this.result) + } + } +} diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue index 9d2fa5ba..5b3d14f4 100644 --- a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue +++ b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue @@ -308,28 +308,6 @@ const props = defineProps({ } }) -// 监听value变化,重新加载流程图 -watch( - () => props.value, - (newValue) => { - if (newValue && bpmnModeler) { - createNewDiagram(newValue) - } - }, - { immediate: true } -) - -// 监听processId和processName变化 -watch( - [() => props.processId, () => props.processName], - ([newId, newName]) => { - if (newId && newName && !props.value) { - createNewDiagram(null) - } - }, - { immediate: true } -) - provide('configGlobal', props) let bpmnModeler: any = null const defaultZoom = ref(1) @@ -480,6 +458,7 @@ const initModelListeners = () => { emit('commandStack-changed', event) emit('input', xml) emit('change', xml) + emit('save', xml) } catch (e: any) { console.error(`[Process Designer Warn]: ${e.message || e}`) } diff --git a/src/views/bpm/model/editor/index.vue b/src/views/bpm/model/editor/index.vue index 37eff739..512eb152 100644 --- a/src/views/bpm/model/editor/index.vue +++ b/src/views/bpm/model/editor/index.vue @@ -3,6 +3,7 @@ () @@ -51,10 +52,11 @@ const formType = ref(20) provide('formFields', formFields) provide('formType', formType) -const xmlString = ref('') // BPMN XML +//注入 流程数据 +const xmlString = inject('processData') as Ref + const modeler = shallowRef() // BPMN Modeler const processDesigner = ref() -const isModelerReady = ref(false) const controlForm = ref({ simulation: true, labelEditing: false, @@ -65,154 +67,27 @@ const controlForm = ref({ }) const model = ref() // 流程模型的信息 -// 初始化 bpmnInstances -const initBpmnInstances = () => { - if (!modeler.value) return false - try { - const instances = { - modeler: modeler.value, - modeling: modeler.value.get('modeling'), - moddle: modeler.value.get('moddle'), - eventBus: modeler.value.get('eventBus'), - bpmnFactory: modeler.value.get('bpmnFactory'), - elementFactory: modeler.value.get('elementFactory'), - elementRegistry: modeler.value.get('elementRegistry'), - replace: modeler.value.get('replace'), - selection: modeler.value.get('selection') - } - - // 检查所有实例是否都存在 - return Object.values(instances).every((instance) => instance) - } catch (error) { - console.error('初始化 bpmnInstances 失败:', error) - return false - } -} /** 初始化 modeler */ const initModeler = async (item) => { - try { - modeler.value = item - // 等待 modeler 初始化完成 - await nextTick() - - // 确保 modeler 的所有实例都已经准备好 - if (initBpmnInstances()) { - isModelerReady.value = true - emit('init-finished') - - // 初始化完成后,设置初始值 - if (props.modelId) { - // 编辑模式 - const data = await ModelApi.getModel(props.modelId) - model.value = { - ...data, - bpmnXml: undefined // 清空 bpmnXml 属性 - } - xmlString.value = data.bpmnXml || getDefaultBpmnXml(data.key, data.name) - } else if (props.modelKey && props.modelName) { - // 新建模式 - xmlString.value = props.value || getDefaultBpmnXml(props.modelKey, props.modelName) - model.value = { - key: props.modelKey, - name: props.modelName - } as ModelApi.ModelVO - } - - // 导入XML并刷新视图 - await nextTick() - try { - await modeler.value.importXML(xmlString.value) - if (processDesigner.value?.refresh) { - processDesigner.value.refresh() - } - } catch (error) { - console.error('导入XML失败:', error) - } - } else { - console.error('modeler 实例未完全初始化') - } - } catch (error) { - console.error('初始化 modeler 失败:', error) - } + modeler.value = item } -/** 获取默认的BPMN XML */ -const getDefaultBpmnXml = (key: string, name: string) => { - return ` - - - - - -` -} /** 添加/修改模型 */ const save = async (bpmnXml: string) => { try { xmlString.value = bpmnXml - if (props.modelId) { - // 编辑模式 - const data = { - ...model.value, - bpmnXml: bpmnXml - } as unknown as ModelApi.ModelVO - await ModelApi.updateModelBpmn(data) - emit('success') - } else { - // 新建模式,直接返回XML - emit('success', bpmnXml) - } + emit('success', bpmnXml) } catch (error) { console.error('保存失败:', error) message.error('保存失败') } } -// 监听 key、name 和 value 的变化 -watch( - [() => props.modelKey, () => props.modelName, () => props.value], - async ([newKey, newName, newValue]) => { - if (!props.modelId && isModelerReady.value) { - let shouldRefresh = false - - if (newKey && newName) { - const newXml = newValue || getDefaultBpmnXml(newKey, newName) - if (newXml !== xmlString.value) { - xmlString.value = newXml - shouldRefresh = true - } - model.value = { - ...model.value, - key: newKey, - name: newName - } as ModelApi.ModelVO - } else if (newValue && newValue !== xmlString.value) { - xmlString.value = newValue - shouldRefresh = true - } - - if (shouldRefresh) { - // 确保更新后重新渲染 - await nextTick() - if (processDesigner.value?.refresh) { - try { - await modeler.value?.importXML(xmlString.value) - processDesigner.value.refresh() - } catch (error) { - console.error('导入XML失败:', error) - } - } - } - } - }, - { deep: true } -) // 在组件卸载时清理 onBeforeUnmount(() => { - isModelerReady.value = false modeler.value = null // 清理全局实例 const w = window as any @@ -221,54 +96,7 @@ onBeforeUnmount(() => { } }) -/** 获取 XML 字符串 */ -const saveXML = async () => { - if (!modeler.value) { - return { xml: xmlString.value } - } - try { - const result = await modeler.value.saveXML({ format: true }) - xmlString.value = result.xml - return result - } catch (error) { - console.error('获取XML失败:', error) - return { xml: xmlString.value } - } -} -/** 获取SVG字符串 */ -const saveSVG = async () => { - if (!modeler.value) { - return { svg: undefined } - } - try { - return await modeler.value.saveSVG() - } catch (error) { - console.error('获取SVG失败:', error) - return { svg: undefined } - } -} - -/** 刷新视图 */ -const refresh = async () => { - if (processDesigner.value?.refresh && modeler.value) { - try { - await modeler.value.importXML(xmlString.value) - processDesigner.value.refresh() - } catch (error) { - console.error('刷新视图失败:', error) - } - } -} - -// 暴露必要的属性和方法给父组件 -defineExpose({ - modeler, - isModelerReady, - saveXML, - saveSVG, - refresh -}) From 42c1618202242bb193da1768fd0a9548ecee86c7 Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Tue, 14 Jan 2025 09:12:53 +0800 Subject: [PATCH 036/273] =?UTF-8?q?fix:=20=E5=88=9B=E5=BB=BAUserTask?= =?UTF-8?q?=E6=97=A0signEnable=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/nodes-config/UserTaskNodeConfig.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue index 131f7b9e..00ed6cfe 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -990,7 +990,7 @@ const showUserTaskNodeConfig = (node: SimpleFlowNode) => { configForm.value.taskCompleteListenerHeader = node.taskCompleteListener?.header ?? [] configForm.value.taskCompleteListenerBody = node.taskCompleteListener?.body ?? [] // 6. 签名 - configForm.value.signEnable = node.signEnable ?? false + configForm.value.signEnable = node?.signEnable ?? false } defineExpose({ openDrawer, showUserTaskNodeConfig }) // 暴露方法给父组件 From 4fe158b2ec5d03bf5ca206c9e04e85bc1aa38bc7 Mon Sep 17 00:00:00 2001 From: zws <447643445@qq.com> Date: Tue, 14 Jan 2025 12:00:08 +0800 Subject: [PATCH 037/273] =?UTF-8?q?perf:=20bpm=20=E4=BF=AE=E5=A4=8Dbpmn?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/model/editor/index.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/bpm/model/editor/index.vue b/src/views/bpm/model/editor/index.vue index 512eb152..101ea1b8 100644 --- a/src/views/bpm/model/editor/index.vue +++ b/src/views/bpm/model/editor/index.vue @@ -3,7 +3,6 @@ Date: Tue, 14 Jan 2025 17:17:30 +0800 Subject: [PATCH 038/273] =?UTF-8?q?fix:=E8=A1=A8=E5=8D=95=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E9=A1=B5=E9=9D=A2=EF=BC=8Cjson=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=92=8C=E7=94=9F=E6=88=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/infra/build/index.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/views/infra/build/index.vue b/src/views/infra/build/index.vue index ed1091e7..2eb63b6a 100644 --- a/src/views/infra/build/index.vue +++ b/src/views/infra/build/index.vue @@ -135,7 +135,8 @@ const makeTemplate = () => { /** 复制 **/ const copy = async (text: string) => { - const { copy, copied, isSupported } = useClipboard({ source: text }) + const textToCopy = JSON.stringify(text, null, 2) + const { copy, copied, isSupported } = useClipboard({ source: textToCopy }) if (!isSupported) { message.error(t('common.copyError')) } else { @@ -149,18 +150,19 @@ const copy = async (text: string) => { /** * 代码高亮 */ -const highlightedCode = (code) => { +const highlightedCode = (code: string) => { // 处理语言和代码 let language = 'json' if (formType.value === 2) { language = 'xml' } + // debugger if (!isString(code)) { - code = JSON.stringify(code) + code = JSON.stringify(code, null, 2) } // 高亮 - const result = hljs.highlight(language, code, true) - return result.value || ' ' + const result = hljs.highlight(code, { language: language, ignoreIllegals: true }) + return result.value } /** 初始化 **/ From 0fa31be851d0fcd30f34d577480ae219761dcaa3 Mon Sep 17 00:00:00 2001 From: lizhixian <18210040298@163.com> Date: Tue, 14 Jan 2025 17:20:51 +0800 Subject: [PATCH 039/273] =?UTF-8?q?fix:=E8=A1=A8=E5=8D=95=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E9=A1=B5=E9=9D=A2=EF=BC=8Cjson=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=92=8C=E7=94=9F=E6=88=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/infra/build/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/infra/build/index.vue b/src/views/infra/build/index.vue index 2eb63b6a..260b8b7a 100644 --- a/src/views/infra/build/index.vue +++ b/src/views/infra/build/index.vue @@ -162,7 +162,7 @@ const highlightedCode = (code: string) => { } // 高亮 const result = hljs.highlight(code, { language: language, ignoreIllegals: true }) - return result.value + return result.value || ' ' } /** 初始化 **/ From 86bb36fc2f13423d2a24be363e387b7ce72412c0 Mon Sep 17 00:00:00 2001 From: jinmh716 Date: Wed, 15 Jan 2025 10:22:06 +0800 Subject: [PATCH 040/273] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=E4=BF=AE=E6=94=B9=E6=9D=83?= =?UTF-8?q?=E9=99=90=EF=BC=8C=E5=88=99=E7=A6=81=E7=94=A8=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 4f04dff5..dd8395f2 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -124,6 +124,7 @@ :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" + :disabled="!checkPermi(['system:user:update'])" /> From e76eda8af3c1e533b0689d3859f23ac5b9d15def Mon Sep 17 00:00:00 2001 From: zws <447643445@qq.com> Date: Wed, 15 Jan 2025 14:54:23 +0800 Subject: [PATCH 041/273] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=9C=A8keepAlive=E4=B8=8B=E5=88=B7=E6=96=B0=E4=B8=8D?= =?UTF-8?q?=E8=A7=A6=E5=8F=91onActivated=E9=92=A9=E5=AD=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/TagsView/src/TagsView.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/components/TagsView/src/TagsView.vue b/src/layout/components/TagsView/src/TagsView.vue index dcbb90fd..3bfb69df 100644 --- a/src/layout/components/TagsView/src/TagsView.vue +++ b/src/layout/components/TagsView/src/TagsView.vue @@ -243,7 +243,7 @@ const move = (to: number) => { start() } -onMounted(() => { +onBeforeMount(() => { initTags() addTags() }) From 8df285aefb5abfbc1573988dc03da5718008738f Mon Sep 17 00:00:00 2001 From: zws <447643445@qq.com> Date: Wed, 15 Jan 2025 14:57:23 +0800 Subject: [PATCH 042/273] =?UTF-8?q?fix:=20bpm=20=E7=94=A8onActivated?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2onMounted=20=E8=A7=A3=E5=86=B3=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=A8=A1=E5=9E=8B=E8=BF=94=E5=9B=9E=E5=90=8E=E4=B8=8D?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E6=96=B0=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/model/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/bpm/model/index.vue b/src/views/bpm/model/index.vue index c7d94170..8132bf73 100644 --- a/src/views/bpm/model/index.vue +++ b/src/views/bpm/model/index.vue @@ -207,6 +207,8 @@ const getList = async () => { /** 初始化 **/ onMounted(() => { +}) +onActivated(()=>{ getList() }) From b1174313185998677be5a7142a0f716563e0b478 Mon Sep 17 00:00:00 2001 From: zws <447643445@qq.com> Date: Wed, 15 Jan 2025 15:04:23 +0800 Subject: [PATCH 043/273] =?UTF-8?q?feat:=20bpm=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=A8=A1=E5=9E=8B=E5=A4=8D=E5=88=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 2 +- src/views/bpm/model/CategoryDraggableModel.vue | 11 ++++++++++- src/views/bpm/model/form/index.vue | 5 ++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 806f954d..34466079 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -344,7 +344,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ } }, { - path: 'manager/model/update/:id', + path: 'manager/model/:type/:id', component: () => import('@/views/bpm/model/form/index.vue'), name: 'BpmModelUpdate', meta: { diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index f3b5a422..8fe6e14d 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -163,6 +163,15 @@ > 修改 + + 复制 + { } else { push({ name: 'BpmModelUpdate', - params: { id } + params: { id, type } }) } } diff --git a/src/views/bpm/model/form/index.vue b/src/views/bpm/model/form/index.vue index 3a45e716..6c5cb21a 100644 --- a/src/views/bpm/model/form/index.vue +++ b/src/views/bpm/model/form/index.vue @@ -162,7 +162,10 @@ const initData = async () => { if (modelId) { // 修改场景 formData.value = await ModelApi.getModel(modelId) - + // 复制场景 + if (route.params.type === 'copy') { + delete formData.value.id + } } else { // 新增场景 formData.value.managerUserIds.push(userStore.getUser.id) From 6fba4b722805f742e0e6804827b6f34d8444bdac Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 15 Jan 2025 20:25:07 +0800 Subject: [PATCH 044/273] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91BPM=EF=BC=9A=E6=B5=81=E7=A8=8B=E7=BC=96?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/SimpleProcessDesigner.vue | 7 +-- .../src/SimpleProcessModel.vue | 53 +++++++++---------- src/router/modules/remaining.ts | 1 + src/views/bpm/model/editor/index.vue | 8 +-- src/views/bpm/model/form/ProcessDesign.vue | 10 ---- src/views/bpm/model/form/index.vue | 40 +++++++------- src/views/bpm/model/index.vue | 4 +- src/views/bpm/simple/SimpleModelDesign.vue | 14 +---- 8 files changed, 51 insertions(+), 86 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue index 1125d8e7..70eade33 100644 --- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue @@ -63,8 +63,6 @@ const props = defineProps({ }) const processData = inject('processData') as Ref - - const loading = ref(false) const formFields = ref([]) const formType = ref(20) @@ -110,7 +108,6 @@ const updateModel = () => { } } - const saveSimpleFlowModel = async (simpleModelNode: SimpleFlowNode) => { if (!simpleModelNode) { return @@ -201,7 +198,5 @@ onMounted(async () => { const simpleProcessModelRef = ref() - -defineExpose({ -}) +defineExpose({}) diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue index b9a26475..23f2d791 100644 --- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue @@ -3,10 +3,15 @@
- 导出 - 导入 + + 导出 + + + 导入 + {{ scaleValue }}% - - - - - - - - -
@@ -53,7 +49,7 @@ import ProcessNodeTree from './ProcessNodeTree.vue' import { SimpleFlowNode, NodeType, NODE_DEFAULT_TEXT } from './consts' import { useWatchNode } from './node' -import { ZoomOut, ZoomIn, ScaleToOriginal, Select } from '@element-plus/icons-vue' +import { ZoomOut, ZoomIn, ScaleToOriginal } from '@element-plus/icons-vue' import { isString } from '@/utils/is' defineOptions({ @@ -73,7 +69,7 @@ const props = defineProps({ }) const emits = defineEmits<{ - 'save': [node: SimpleFlowNode | undefined] + save: [node: SimpleFlowNode | undefined] }>() const processNodeTree = useWatchNode(props) @@ -175,25 +171,28 @@ defineExpose({ getCurrentFlowData }) +/** 导出 JSON */ +// TODO @zws:增加一个 download 里面搞个 json 更好 const exportJson = () => { - const blob = new Blob([JSON.stringify(processNodeTree.value)]); - const tempLink = document.createElement('a'); // 创建a标签 - const href = window.URL.createObjectURL(blob); // 创建下载的链接 - //filename - const fileName = `model.json`; - tempLink.href = href; - tempLink.target = '_blank'; - tempLink.download = fileName; - document.body.appendChild(tempLink); - tempLink.click(); // 点击下载 - document.body.removeChild(tempLink); // 下载完成移除元素 - window.URL.revokeObjectURL(href); // 释放掉blob对象 + const blob = new Blob([JSON.stringify(processNodeTree.value)]) + const tempLink = document.createElement('a') // 创建a标签 + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + // filename + const fileName = `model.json` + tempLink.href = href + tempLink.target = '_blank' + tempLink.download = fileName + document.body.appendChild(tempLink) + tempLink.click() // 点击下载 + document.body.removeChild(tempLink) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放掉 blob 对象 } + +/** 导入 JSON */ +const refFile = ref() const importJson = () => { refFile.value.click() } -const refFile = ref() -// 加载本地文件 const importLocalFile = () => { const file = refFile.value.files[0] const reader = new FileReader() diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 34466079..4b177ae8 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -344,6 +344,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ } }, { + // TODO @zws:1)建议,在加一个路由。然后标题是“复制流程”,这样体验会好点;2)复制出来的数据,在名字前面,加“副本 ”,和钉钉保持一致! path: 'manager/model/:type/:id', component: () => import('@/views/bpm/model/form/index.vue'), name: 'BpmModelUpdate', diff --git a/src/views/bpm/model/editor/index.vue b/src/views/bpm/model/editor/index.vue index 101ea1b8..b91c250e 100644 --- a/src/views/bpm/model/editor/index.vue +++ b/src/views/bpm/model/editor/index.vue @@ -51,7 +51,7 @@ const formType = ref(20) provide('formFields', formFields) provide('formType', formType) -//注入 流程数据 +// 注入流程数据 const xmlString = inject('processData') as Ref const modeler = shallowRef() // BPMN Modeler @@ -66,13 +66,12 @@ const controlForm = ref({ }) const model = ref() // 流程模型的信息 - /** 初始化 modeler */ +// TODO @zws:需要初始化,不然首次创建后,无法发布!相当于说,key、name 要去赋值下 const initModeler = async (item) => { modeler.value = item } - /** 添加/修改模型 */ const save = async (bpmnXml: string) => { try { @@ -84,7 +83,6 @@ const save = async (bpmnXml: string) => { } } - // 在组件卸载时清理 onBeforeUnmount(() => { modeler.value = null @@ -94,8 +92,6 @@ onBeforeUnmount(() => { w.bpmnInstances = null } }) - - From 026b2f2ba5bb4957359aa96ffd3ee3fac4ac458b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=8B=E9=81=93=E6=BA=90=E7=A0=81?= Date: Wed, 15 Jan 2025 20:45:49 +0800 Subject: [PATCH 045/273] Revert "fix:Vite CJS Node API deprecated waring" --- .eslintrc.cjs => .eslintrc.js | 0 .vscode/settings.json | 2 +- package.json | 1 - postcss.config.js | 2 +- prettier.config.cjs => prettier.config.js | 0 5 files changed, 2 insertions(+), 3 deletions(-) rename .eslintrc.cjs => .eslintrc.js (100%) rename prettier.config.cjs => prettier.config.js (100%) diff --git a/.eslintrc.cjs b/.eslintrc.js similarity index 100% rename from .eslintrc.cjs rename to .eslintrc.js diff --git a/.vscode/settings.json b/.vscode/settings.json index a14646c9..f145f386 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -138,7 +138,7 @@ "*.ts": "$(capture).test.ts, $(capture).test.tsx", "*.tsx": "$(capture).test.ts, $(capture).test.tsx", "*.env": "$(capture).env.*", - "package.json": "pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.eslintrc-auto-import.json,.gitignore,prettier.config.cjs,stylelint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.cjs,.eslintignore" + "package.json": "pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.eslintrc-auto-import.json,.gitignore,prettier.config.js,stylelint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.js,.eslintignore" }, "terminal.integrated.scrollback": 10000, "nuxt.isNuxtApp": false diff --git a/package.json b/package.json index 95b5345b..ff94abd7 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "description": "基于vue3、vite4、element-plus、typesScript", "author": "xingyu", "private": false, - "type": "module", "scripts": { "i": "pnpm install", "dev": "vite --mode env.local", diff --git a/postcss.config.js b/postcss.config.js index e712f561..961986e2 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,4 +1,4 @@ -export default { +module.exports = { plugins: { autoprefixer: {} } diff --git a/prettier.config.cjs b/prettier.config.js similarity index 100% rename from prettier.config.cjs rename to prettier.config.js From e4fab335fd8df26e5c82685eab46e4b9b498b504 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 15 Jan 2025 21:10:03 +0800 Subject: [PATCH 046/273] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91ERP=EF=BC=9A=E9=87=87=E8=B4=AD=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E4=BA=A7=E5=93=81=E5=8D=95=E4=BB=B7=E7=BC=BA?= =?UTF-8?q?=E5=B0=91=E4=B8=BA=E7=A9=BA=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchase/order/components/PurchaseOrderItemForm.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/erp/purchase/order/components/PurchaseOrderItemForm.vue b/src/views/erp/purchase/order/components/PurchaseOrderItemForm.vue index 265193e9..70a24331 100644 --- a/src/views/erp/purchase/order/components/PurchaseOrderItemForm.vue +++ b/src/views/erp/purchase/order/components/PurchaseOrderItemForm.vue @@ -66,7 +66,11 @@ ([]) const nodeOptions = ref() - const conditionRef = ref([]) -// 保存配置 + +/** 保存配置 */ const saveConfig = async () => { // 校验表单 let valid = true diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue index 00ed6cfe..64acc2c3 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -440,6 +440,7 @@
+
diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue b/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue index 7f0696cf..a4ecee65 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue @@ -44,14 +44,26 @@ :rows="4" /> - + 点击签名 - + - + {{ getButtonDisplayName(OperationButtonType.APPROVE) }} 取消 @@ -92,7 +104,11 @@ /> - + {{ getButtonDisplayName(OperationButtonType.REJECT) }} 取消 @@ -478,7 +494,8 @@
- + + - + From 37964e740f8691a58f9a43f976fb9c047e034e28 Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Thu, 16 Jan 2025 13:55:15 +0800 Subject: [PATCH 055/273] =?UTF-8?q?feat:=20=E5=AE=A1=E6=89=B9=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=E4=BB=A3=E7=A0=81=E8=AF=84=E5=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/processInstance/index.ts | 2 +- src/utils/download.ts | 27 ++++++++++++++ .../detail/ProcessInstanceOperationButton.vue | 16 ++++----- .../detail/ProcessInstanceTimeline.vue | 6 ++-- .../bpm/processInstance/detail/SignDialog.vue | 35 ++----------------- 5 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index a0f263de..9a99a91e 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -36,7 +36,7 @@ export type ApprovalTaskInfo = { assigneeUser: User status: number reason: string - sign: string // TODO @lesan:字段改成 signPicUrl 签名照片。只有 sign 感觉是签名文本哈。 + signPicUrl: string } // 审批节点信息 diff --git a/src/utils/download.ts b/src/utils/download.ts index 5bbfb9fe..bd58845f 100644 --- a/src/utils/download.ts +++ b/src/utils/download.ts @@ -65,6 +65,33 @@ const download = { a.download = 'image.png' a.click() } + }, + base64ToFile: (base64, fileName) => { + // 将base64按照 , 进行分割 将前缀 与后续内容分隔开 + const data = base64.split(',') + // 利用正则表达式 从前缀中获取图片的类型信息(image/png、image/jpeg、image/webp等) + const type = data[0].match(/:(.*?);/)[1] + // 从图片的类型信息中 获取具体的文件格式后缀(png、jpeg、webp) + const suffix = type.split('/')[1] + // 使用atob()对base64数据进行解码 结果是一个文件数据流 以字符串的格式输出 + const bstr = window.atob(data[1]) + // 获取解码结果字符串的长度 + let n = bstr.length + // 根据解码结果字符串的长度创建一个等长的整形数字数组 + // 但在创建时 所有元素初始值都为 0 + const u8arr = new Uint8Array(n) + // 将整形数组的每个元素填充为解码结果字符串对应位置字符的UTF-16 编码单元 + while (n--) { + // charCodeAt():获取给定索引处字符对应的 UTF-16 代码单元 + u8arr[n] = bstr.charCodeAt(n) + } + // 利用构造函数创建File文件对象 + // new File(bits, name, options) + const file = new File([u8arr], `${fileName}.${suffix}`, { + type: type + }) + // 将File文件对象返回给方法的调用者 + return file } } diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue b/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue index a4ecee65..402644e9 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue @@ -47,15 +47,15 @@ 点击签名 @@ -553,11 +553,11 @@ const signRef = ref() const approveSignFormRef = ref() const approveReasonForm = reactive({ reason: '', - sign: '' + signPicUrl: '' }) const approveReasonRule = reactive>({ reason: [{ required: true, message: '审批意见不能为空', trigger: 'blur' }], - sign: [{ required: true, message: '签名不能为空', trigger: 'change' }] + signPicUrl: [{ required: true, message: '签名不能为空', trigger: 'change' }] }) // 拒绝表单 const rejectFormRef = ref() @@ -705,7 +705,7 @@ const handleAudit = async (pass: boolean, formRef: FormInstance | undefined) => } // 签名 if (runningTask.value.signEnable) { - data.sign = approveReasonForm.sign + data.signPicUrl = approveReasonForm.signPicUrl } // 多表单处理,并且有额外的 approveForm 表单,需要校验 + 拼接到 data 表单里提交 // TODO 芋艿 任务有多表单这里要如何处理,会和可编辑的字段冲突 @@ -1002,7 +1002,7 @@ const getUpdatedProcessInstanceVariables = () => { /** 处理签名完成 */ const handleSignFinish = (url: string) => { - approveReasonForm.sign = url + approveReasonForm.signPicUrl = url approveSignFormRef.value.validate('change') } diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue index 1fd31dcf..fcd5ec89 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue @@ -124,14 +124,14 @@ 审批意见:{{ task.reason }}
签名:
diff --git a/src/views/bpm/processInstance/detail/SignDialog.vue b/src/views/bpm/processInstance/detail/SignDialog.vue index 211cfcda..744a3556 100644 --- a/src/views/bpm/processInstance/detail/SignDialog.vue +++ b/src/views/bpm/processInstance/detail/SignDialog.vue @@ -2,9 +2,8 @@
- import Vue3Signature from 'vue3-signature' import * as FileApi from '@/api/infra/file' +import download from '@/utils/download' const message = useMessage() // 消息弹窗 const signDialogVisible = ref(false) @@ -40,40 +40,11 @@ const emits = defineEmits(['success']) const submit = async () => { message.success('签名上传中请稍等。。。') const res = await FileApi.updateFile({ - file: base64ToFile(signature.value.save('image/png'), '签名') + file: download.base64ToFile(signature.value.save('image/png'), '签名') }) emits('success', res.data) signDialogVisible.value = false } - -// TODO @lesan:这个要不抽到 download.js 里,让这个组件更简洁干净? -const base64ToFile = (base64, fileName) => { - // 将base64按照 , 进行分割 将前缀 与后续内容分隔开 - let data = base64.split(',') - // 利用正则表达式 从前缀中获取图片的类型信息(image/png、image/jpeg、image/webp等) - let type = data[0].match(/:(.*?);/)[1] - // 从图片的类型信息中 获取具体的文件格式后缀(png、jpeg、webp) - let suffix = type.split('/')[1] - // 使用atob()对base64数据进行解码 结果是一个文件数据流 以字符串的格式输出 - const bstr = window.atob(data[1]) - // 获取解码结果字符串的长度 - let n = bstr.length - // 根据解码结果字符串的长度创建一个等长的整形数字数组 - // 但在创建时 所有元素初始值都为 0 - const u8arr = new Uint8Array(n) - // 将整形数组的每个元素填充为解码结果字符串对应位置字符的UTF-16 编码单元 - while (n--) { - // charCodeAt():获取给定索引处字符对应的 UTF-16 代码单元 - u8arr[n] = bstr.charCodeAt(n) - } - // 利用构造函数创建File文件对象 - // new File(bits, name, options) - const file = new File([u8arr], `${fileName}.${suffix}`, { - type: type - }) - // 将File文件对象返回给方法的调用者 - return file -} From 69ccd83af31c33a92def15100706fe336419d6c0 Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Thu, 16 Jan 2025 14:40:14 +0800 Subject: [PATCH 056/273] =?UTF-8?q?feat:=20bpmn=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0UserTask=E7=AD=BE=E5=90=8D=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/descriptor/flowableDescriptor.json | 14 ++++++++++++++ .../package/penal/PropertiesPanel.vue | 2 +- .../components/UserTaskCustomConfig.vue | 17 ++++++++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json index 7fe1fa79..e50d3ce3 100644 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json @@ -1438,6 +1438,20 @@ "isBody": true } ] + }, + { + "name": "SignEnable", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Boolean", + "isBody": true + } + ] } ], "emumerations": [] diff --git a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue index e53ad994..ff08dd33 100644 --- a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue +++ b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue @@ -1,5 +1,5 @@ diff --git a/src/components/DiyEditor/components/mobile/MenuList/property.vue b/src/components/DiyEditor/components/mobile/MenuList/property.vue index a5fb4603..b665b320 100644 --- a/src/components/DiyEditor/components/mobile/MenuList/property.vue +++ b/src/components/DiyEditor/components/mobile/MenuList/property.vue @@ -28,7 +28,7 @@ diff --git a/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue b/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue index fbae83c2..3dd3f7c3 100644 --- a/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue +++ b/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue @@ -58,7 +58,7 @@ diff --git a/src/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue b/src/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue index f6176d23..2494e069 100644 --- a/src/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue +++ b/src/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue @@ -64,7 +64,7 @@ diff --git a/src/components/DiyEditor/components/mobile/PageConfig/property.vue b/src/components/DiyEditor/components/mobile/PageConfig/property.vue index 278bc940..d8f51d26 100644 --- a/src/components/DiyEditor/components/mobile/PageConfig/property.vue +++ b/src/components/DiyEditor/components/mobile/PageConfig/property.vue @@ -20,7 +20,7 @@ diff --git a/src/components/DiyEditor/components/mobile/Popover/property.vue b/src/components/DiyEditor/components/mobile/Popover/property.vue index 2dd43519..21be46ef 100644 --- a/src/components/DiyEditor/components/mobile/Popover/property.vue +++ b/src/components/DiyEditor/components/mobile/Popover/property.vue @@ -25,14 +25,14 @@ diff --git a/src/components/DiyEditor/components/mobile/ProductCard/property.vue b/src/components/DiyEditor/components/mobile/ProductCard/property.vue index 110c8be9..91846e66 100644 --- a/src/components/DiyEditor/components/mobile/ProductCard/property.vue +++ b/src/components/DiyEditor/components/mobile/ProductCard/property.vue @@ -135,7 +135,7 @@ diff --git a/src/components/DiyEditor/components/mobile/ProductList/property.vue b/src/components/DiyEditor/components/mobile/ProductList/property.vue index 894687c2..d7a5a7cd 100644 --- a/src/components/DiyEditor/components/mobile/ProductList/property.vue +++ b/src/components/DiyEditor/components/mobile/ProductList/property.vue @@ -85,7 +85,7 @@ diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue b/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue index c3bcb21b..10c5840e 100644 --- a/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue +++ b/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue @@ -25,7 +25,7 @@ diff --git a/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue b/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue index 61287590..594c10bc 100644 --- a/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue +++ b/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue @@ -140,7 +140,7 @@ diff --git a/src/components/DiyEditor/components/mobile/TabBar/property.vue b/src/components/DiyEditor/components/mobile/TabBar/property.vue index d1da142b..e4350121 100644 --- a/src/components/DiyEditor/components/mobile/TabBar/property.vue +++ b/src/components/DiyEditor/components/mobile/TabBar/property.vue @@ -80,13 +80,13 @@ diff --git a/src/components/DiyEditor/components/mobile/UserCoupon/property.vue b/src/components/DiyEditor/components/mobile/UserCoupon/property.vue index f902e04e..221cc90a 100644 --- a/src/components/DiyEditor/components/mobile/UserCoupon/property.vue +++ b/src/components/DiyEditor/components/mobile/UserCoupon/property.vue @@ -4,14 +4,14 @@ diff --git a/src/components/DiyEditor/components/mobile/UserOrder/property.vue b/src/components/DiyEditor/components/mobile/UserOrder/property.vue index 42df7410..d315db6a 100644 --- a/src/components/DiyEditor/components/mobile/UserOrder/property.vue +++ b/src/components/DiyEditor/components/mobile/UserOrder/property.vue @@ -4,14 +4,14 @@ diff --git a/src/components/DiyEditor/components/mobile/UserWallet/property.vue b/src/components/DiyEditor/components/mobile/UserWallet/property.vue index 549367e3..e0ac83e4 100644 --- a/src/components/DiyEditor/components/mobile/UserWallet/property.vue +++ b/src/components/DiyEditor/components/mobile/UserWallet/property.vue @@ -4,14 +4,14 @@ diff --git a/src/components/DiyEditor/components/mobile/VideoPlayer/property.vue b/src/components/DiyEditor/components/mobile/VideoPlayer/property.vue index 7598543b..1c3deec6 100644 --- a/src/components/DiyEditor/components/mobile/VideoPlayer/property.vue +++ b/src/components/DiyEditor/components/mobile/VideoPlayer/property.vue @@ -42,14 +42,14 @@ diff --git a/src/components/DiyEditor/util.ts b/src/components/DiyEditor/util.ts index fac26e75..b6febb97 100644 --- a/src/components/DiyEditor/util.ts +++ b/src/components/DiyEditor/util.ts @@ -1,4 +1,3 @@ -import { ref, Ref } from 'vue' import { PageConfigProperty } from '@/components/DiyEditor/components/mobile/PageConfig/config' import { NavigationBarProperty } from '@/components/DiyEditor/components/mobile/NavigationBar/config' import { TabBarProperty } from '@/components/DiyEditor/components/mobile/TabBar/config' @@ -78,34 +77,6 @@ export interface PageConfig { // 页面组件,只保留组件ID,组件属性 export interface PageComponent extends Pick, 'id' | 'property'> {} -// 属性表单监听 -export function usePropertyForm(modelValue: T, emit: Function): { formData: Ref } { - const formData = ref() - // 监听属性数据变动 - watch( - () => modelValue, - () => { - formData.value = modelValue - }, - { - deep: true, - immediate: true - } - ) - // 监听表单数据变动 - watch( - () => formData.value, - () => { - emit('update:modelValue', formData.value) - }, - { - deep: true - } - ) - - return { formData } as { formData: Ref } -} - // 页面组件库 export const PAGE_LIBS = [ { diff --git a/src/components/Draggable/index.vue b/src/components/Draggable/index.vue index 3d7906b9..bd153a4f 100644 --- a/src/components/Draggable/index.vue +++ b/src/components/Draggable/index.vue @@ -13,9 +13,16 @@ class="mb-4px flex flex-col gap-4px border border-gray-2 border-rounded rounded border-solid p-8px" > -
+
- + // 拖拽组件 import VueDraggable from 'vuedraggable' -import { usePropertyForm } from '@/components/DiyEditor/util' +import { useVModel } from '@vueuse/core' import { any, array } from 'vue-types' import { propTypes } from '@/utils/propTypes' import { cloneDeep } from 'lodash-es' @@ -66,7 +73,7 @@ const props = defineProps({ }) // 定义事件 const emit = defineEmits(['update:modelValue']) -const { formData } = usePropertyForm(props.modelValue, emit) +const formData = useVModel(props, 'modelValue', emit) // 处理添加 const handleAdd = () => formData.value.push(cloneDeep(props.emptyItem || {})) From 625426566c58372c911dc9da26929a34fd3c45b1 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 18 Jan 2025 17:47:10 +0800 Subject: [PATCH 065/273] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91MALL:=20=E4=BF=AE=E5=A4=8D=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E8=A3=85=E4=BF=AE=E6=97=B6=E7=BB=84=E4=BB=B6=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E5=BC=8F=E4=B8=A2=E5=A4=B1=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/NavigationBar/index.vue | 6 +-- src/components/DiyEditor/index.vue | 44 +++++++++++++------ src/components/InputWithColor/index.vue | 32 ++------------ .../mall/promotion/diy/template/decorate.vue | 24 ++++++---- 4 files changed, 54 insertions(+), 52 deletions(-) diff --git a/src/components/DiyEditor/components/mobile/NavigationBar/index.vue b/src/components/DiyEditor/components/mobile/NavigationBar/index.vue index c684aee7..c5a92b31 100644 --- a/src/components/DiyEditor/components/mobile/NavigationBar/index.vue +++ b/src/components/DiyEditor/components/mobile/NavigationBar/index.vue @@ -4,7 +4,7 @@
{{ cell.text }} - +
{ } as StyleValue } // 获得搜索框属性 -const getSearchProp = (cell: NavigationBarCellProperty) => { +const getSearchProp = computed(() => (cell: NavigationBarCellProperty) => { return { height: 30, showScan: false, placeholder: cell.placeholder, borderRadius: cell.borderRadius } as SearchProperty -} +}) diff --git a/src/views/bpm/model/index.vue b/src/views/bpm/model/index.vue index 2af15014..08c9650b 100644 --- a/src/views/bpm/model/index.vue +++ b/src/views/bpm/model/index.vue @@ -85,8 +85,6 @@
- - @@ -99,7 +97,6 @@ import draggable from 'vuedraggable' import { CategoryApi } from '@/api/bpm/category' import * as ModelApi from '@/api/bpm/model' -import ModelForm from './ModelForm.vue' import CategoryForm from '../category/CategoryForm.vue' import { cloneDeep } from 'lodash-es' import CategoryDraggableModel from './CategoryDraggableModel.vue' @@ -123,7 +120,6 @@ const handleQuery = () => { } /** 添加/修改操作 */ -const formRef = ref() const openForm = (type: string, id?: number) => { if (type === 'create') { push({ name: 'BpmModelCreate' }) From 7349a0d080fbbacbeedcfd50e4616e33fd303736 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 Jan 2025 18:51:13 +0800 Subject: [PATCH 067/273] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91Bpm=EF=BC=9A=E7=BC=96=E8=BE=91=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=97=B6=EF=BC=8C=E2=80=9C=E6=B5=81=E7=A8=8B=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E2=80=9D=E9=BB=98=E8=AE=A4=E5=B0=B1=E6=98=AF?= =?UTF-8?q?=E2=80=9C=E6=8C=87=E5=AE=9A=E4=BA=BA=E5=91=98=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/model/form/BasicInfo.vue | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/src/views/bpm/model/form/BasicInfo.vue b/src/views/bpm/model/form/BasicInfo.vue index b11331d9..591ccab1 100644 --- a/src/views/bpm/model/form/BasicInfo.vue +++ b/src/views/bpm/model/form/BasicInfo.vue @@ -77,7 +77,6 @@ > -
- 选择人员 + 选择人员
- - - - - - -
+ +
{ } } -/** 处理管理员类型变化 */ -const handleManagerUserTypeChange = (value: number) => { - if (value !== 1) { - modelData.value = { - ...modelData.value, - managerUserIds: [] - } - } -} - /** 移除发起人 */ const handleRemoveStartUser = (user: UserVO) => { modelData.value = { From fea238ef154738ab2e08d6f5c043c85e17b4355d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 Jan 2025 19:01:12 +0800 Subject: [PATCH 068/273] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91Bpm=EF=BC=9A=E7=BC=96=E8=BE=91=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=97=B6=EF=BC=8C=E2=80=9C=E8=B0=81=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=8F=91=E8=B5=B7=E2=80=9D=E9=BB=98=E8=AE=A4=E5=B0=B1=E6=98=AF?= =?UTF-8?q?=E2=80=9C=E5=85=A8=E4=BD=93=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/model/form/BasicInfo.vue | 5 +++-- src/views/bpm/model/form/index.vue | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/views/bpm/model/form/BasicInfo.vue b/src/views/bpm/model/form/BasicInfo.vue index 591ccab1..cca91334 100644 --- a/src/views/bpm/model/form/BasicInfo.vue +++ b/src/views/bpm/model/form/BasicInfo.vue @@ -62,7 +62,7 @@ {{ dict.label }} @@ -132,10 +132,11 @@ From 9694ad0fa32d98622f162c6571f26f76fbf04582 Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Sun, 19 Jan 2025 16:43:30 +0800 Subject: [PATCH 073/273] =?UTF-8?q?feat:=20=E6=8F=90=E4=BA=A4=E4=BA=BA?= =?UTF-8?q?=E6=9D=83=E9=99=90-=E5=85=81=E8=AE=B8=E6=92=A4=E9=94=80?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E4=B8=AD=E7=9A=84=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/model/form/ExtraSettings.vue | 19 +++++++++++++++++++ src/views/bpm/model/form/index.vue | 12 ++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/views/bpm/model/form/ExtraSettings.vue diff --git a/src/views/bpm/model/form/ExtraSettings.vue b/src/views/bpm/model/form/ExtraSettings.vue new file mode 100644 index 00000000..75da9576 --- /dev/null +++ b/src/views/bpm/model/form/ExtraSettings.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/views/bpm/model/form/index.vue b/src/views/bpm/model/form/index.vue index 5c8d06d1..d9d399e5 100644 --- a/src/views/bpm/model/form/index.vue +++ b/src/views/bpm/model/form/index.vue @@ -68,6 +68,11 @@ + + +
+ +
@@ -86,6 +91,7 @@ import BasicInfo from './BasicInfo.vue' import FormDesign from './FormDesign.vue' import ProcessDesign from './ProcessDesign.vue' import { useTagsViewStore } from '@/store/modules/tagsView' +import ExtraSettings from './ExtraSettings.vue' const router = useRouter() const { delView } = useTagsViewStore() // 视图操作 @@ -118,7 +124,8 @@ const currentStep = ref(-1) // 步骤控制。-1 用于,一开始全部不展 const steps = [ { title: '基本信息', validator: validateBasic }, { title: '表单设计', validator: validateForm }, - { title: '流程设计', validator: validateProcess } + { title: '流程设计', validator: validateProcess }, + { title: '更多设置', validator: null } ] // 表单数据 @@ -137,7 +144,8 @@ const formData: any = ref({ visible: true, startUserType: undefined, startUserIds: [], - managerUserIds: [] + managerUserIds: [], + allowCancelRunningProcess: true }) //流程数据 From 70e6b5464269ae3e7d782a6cb6902a3efb0fca2f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 19 Jan 2025 18:28:45 +0800 Subject: [PATCH 074/273] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91Bpm=EF=BC=9A=E6=8F=90=E4=BA=A4=E4=BA=BA?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=9A=84=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/model/form/ExtraSettings.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/views/bpm/model/form/ExtraSettings.vue b/src/views/bpm/model/form/ExtraSettings.vue index 75da9576..af32516f 100644 --- a/src/views/bpm/model/form/ExtraSettings.vue +++ b/src/views/bpm/model/form/ExtraSettings.vue @@ -6,9 +6,7 @@
- - 第一个审批节点通过后,提交人仍可撤销申请(配置前已发起的申请不生效) - + 第一个审批节点通过后,提交人仍可撤销申请
From 42de3d91275cc1b3db029d3443bb888d0d034499 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sun, 19 Jan 2025 18:40:18 +0800 Subject: [PATCH 075/273] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91=E6=9D=A1=E4=BB=B6=E8=8A=82=E7=82=B9=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/NodeHandler.vue | 20 +++++--- .../SimpleProcessDesignerV2/src/consts.ts | 24 ++++++--- .../SimpleProcessDesignerV2/src/node.ts | 2 - .../src/nodes-config/ConditionNodeConfig.vue | 50 +++++++++++-------- .../src/nodes/InclusiveNode.vue | 2 +- 5 files changed, 59 insertions(+), 39 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue index 25e54f6b..c94998d5 100644 --- a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue +++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue @@ -163,8 +163,10 @@ const addNode = (type: number) => { showText: '', type: NodeType.CONDITION_NODE, childNode: undefined, - conditionType: 1, - defaultFlow: false + conditionSetting: { + defaultFlow: false + }, + }, { id: 'Flow_' + generateUUID(), @@ -172,8 +174,9 @@ const addNode = (type: number) => { showText: '未满足其它条件时,将进入此分支', type: NodeType.CONDITION_NODE, childNode: undefined, - conditionType: undefined, - defaultFlow: true + conditionSetting: { + defaultFlow: true + } } ] } @@ -217,7 +220,10 @@ const addNode = (type: number) => { showText: '', type: NodeType.CONDITION_NODE, childNode: undefined, - defaultFlow: false + conditionSetting: { + defaultFlow: false + } + }, { id: 'Flow_' + generateUUID(), @@ -225,7 +231,9 @@ const addNode = (type: number) => { showText: '未满足其它条件时,将进入此分支', type: NodeType.CONDITION_NODE, childNode: undefined, - defaultFlow: true + conditionSetting: { + defaultFlow: true + } } ] } diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index 55808c96..ffc37b80 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -103,14 +103,8 @@ export interface SimpleFlowNode { taskAssignListener?: ListenerHandler // 创建任务监听器 taskCompleteListener?: ListenerHandler - // 条件类型 - conditionType?: ConditionType - // 条件表达式 - conditionExpression?: string - // 条件组 - conditionGroups?: ConditionGroup - // 是否默认的条件 - defaultFlow?: boolean + // 条件设置 + conditionSetting?: ConditionSetting // 活动的状态,用于前端节点状态展示 activityStatus?: TaskStatusEnum // 延迟设置 @@ -365,6 +359,20 @@ export enum TimeUnitType { DAY = 3 } +/** + * 条件节点设置结构定义,用于条件节点 + */ +export type ConditionSetting = { + // 条件类型 + conditionType?: ConditionType, + // 条件表达式 + conditionExpression?: string, + // 条件组 + conditionGroups?: ConditionGroup, + // 是否默认的条件 + defaultFlow?: boolean +} + // 条件配置类型 ( 用于条件节点配置 ) export enum ConditionType { /** diff --git a/src/components/SimpleProcessDesignerV2/src/node.ts b/src/components/SimpleProcessDesignerV2/src/node.ts index 79bb5d38..ea983ce9 100644 --- a/src/components/SimpleProcessDesignerV2/src/node.ts +++ b/src/components/SimpleProcessDesignerV2/src/node.ts @@ -113,7 +113,6 @@ export function useFormFields() { } export type UserTaskFormType = { - //candidateParamArray: any[] candidateStrategy: CandidateStrategy approveMethod: ApproveMethodType roleIds?: number[] // 角色 @@ -152,7 +151,6 @@ export type UserTaskFormType = { } export type CopyTaskFormType = { - // candidateParamArray: any[] candidateStrategy: CandidateStrategy roleIds?: number[] // 角色 deptIds?: number[] // 部门 diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue index ae931724..7c45e1bf 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue @@ -26,13 +26,16 @@
-
未满足其它条件时,将进入此分支(该分支不可编辑和删除)
+
+ 未满足其它条件时,将进入此分支(该分支不可编辑和删除) +
- + - + - +
条件组关系
@@ -194,9 +200,9 @@ const props = defineProps({ }) const settingVisible = ref(false) const open = () => { - if (currentNode.value.conditionType === ConditionType.RULE) { - if (currentNode.value.conditionGroups) { - conditionGroups.value = currentNode.value.conditionGroups + if (currentNode.value.conditionSetting?.conditionType === ConditionType.RULE) { + if (currentNode.value.conditionSetting?.conditionGroups) { + conditionGroups.value = currentNode.value.conditionSetting.conditionGroups } } settingVisible.value = true @@ -219,7 +225,7 @@ const blurEvent = () => { showInput.value = false currentNode.value.name = currentNode.value.name || - getDefaultConditionNodeName(props.nodeIndex, currentNode.value?.defaultFlow) + getDefaultConditionNodeName(props.nodeIndex, currentNode.value?.conditionSetting?.defaultFlow) } const currentNode = ref(props.conditionNode) @@ -248,7 +254,7 @@ const formRef = ref() // 表单 Ref // 保存配置 const saveConfig = async () => { - if (!currentNode.value.defaultFlow) { + if (!currentNode.value.conditionSetting?.defaultFlow) { // 校验表单 if (!formRef) return false const valid = await formRef.value.validate() @@ -258,12 +264,12 @@ const saveConfig = async () => { return false } currentNode.value.showText = showText - if (currentNode.value.conditionType === ConditionType.EXPRESSION) { - currentNode.value.conditionGroups = undefined + if (currentNode.value.conditionSetting?.conditionType === ConditionType.EXPRESSION) { + currentNode.value.conditionSetting.conditionGroups = undefined } - if (currentNode.value.conditionType === ConditionType.RULE) { - currentNode.value.conditionExpression = undefined - currentNode.value.conditionGroups = conditionGroups.value + if (currentNode.value.conditionSetting?.conditionType === ConditionType.RULE) { + currentNode.value.conditionSetting.conditionExpression = undefined + currentNode.value.conditionSetting.conditionGroups = conditionGroups.value } } settingVisible.value = false @@ -271,12 +277,12 @@ const saveConfig = async () => { } const getShowText = (): string => { let showText = '' - if (currentNode.value.conditionType === ConditionType.EXPRESSION) { - if (currentNode.value.conditionExpression) { - showText = `表达式:${currentNode.value.conditionExpression}` + if (currentNode.value.conditionSetting?.conditionType === ConditionType.EXPRESSION) { + if (currentNode.value.conditionSetting.conditionExpression) { + showText = `表达式:${currentNode.value.conditionSetting.conditionExpression}` } } - if (currentNode.value.conditionType === ConditionType.RULE) { + if (currentNode.value.conditionSetting?.conditionType === ConditionType.RULE) { // 条件组是否为与关系 const groupAnd = conditionGroups.value.and let warningMesg: undefined | string = undefined diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue index f1445d83..fb512913 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue @@ -34,7 +34,7 @@ ]" >
-
+
Date: Sun, 19 Jan 2025 22:42:05 +0800 Subject: [PATCH 076/273] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E6=9D=A1=E4=BB=B6=E8=8A=82=E7=82=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/NodeHandler.vue | 35 +++---------------- .../SimpleProcessDesignerV2/src/consts.ts | 18 ++++++++++ .../src/nodes-config/ConditionNodeConfig.vue | 3 +- .../src/nodes-config/components/Condition.vue | 35 +++++++++++++------ .../src/nodes/ExclusiveNode.vue | 11 +++--- .../src/nodes/InclusiveNode.vue | 11 +++--- 6 files changed, 61 insertions(+), 52 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue index e575c36c..c3f68830 100644 --- a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue +++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue @@ -71,7 +71,8 @@ import { NODE_DEFAULT_NAME, NodeType, RejectHandlerType, - SimpleFlowNode + SimpleFlowNode, + DEFAULT_CONDITION_GROUP_VALUE } from './consts' import {generateUUID} from '@/utils' @@ -167,21 +168,7 @@ const addNode = (type: number) => { conditionSetting: { defaultFlow: false, conditionType: ConditionType.RULE, - conditionGroups: { - and: true, - conditions: [ - { - and: true, - rules: [ - { - opCode: '==', - leftSide: '', - rightSide: '' - } - ] - } - ] - } + conditionGroups: DEFAULT_CONDITION_GROUP_VALUE } }, { @@ -239,21 +226,7 @@ const addNode = (type: number) => { conditionSetting: { defaultFlow: false, conditionType: ConditionType.RULE, - conditionGroups: { - and: true, - conditions: [ - { - and: true, - rules: [ - { - opCode: '==', - leftSide: '', - rightSide: '' - } - ] - } - ] - } + conditionGroups: DEFAULT_CONDITION_GROUP_VALUE } }, { diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index 089a6392..1c910c38 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -463,6 +463,24 @@ export type ConditionGroup = { // 条件数组 conditions: Condition[] } +/** + * 条件组默认值 + */ +export const DEFAULT_CONDITION_GROUP_VALUE = { + and: true, + conditions: [ + { + and: true, + rules: [ + { + opCode: '==', + leftSide: '', + rightSide: '' + } + ] + } + ] +} /** * 条件结构定义 diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue index f22168bd..93e3795a 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue @@ -46,7 +46,6 @@ import { SimpleFlowNode, ConditionType, - ConditionSetting, COMPARISON_OPERATORS, ProcessVariableEnum } from '../consts' @@ -69,7 +68,7 @@ const props = defineProps({ }) const settingVisible = ref(false) const currentNode = ref(props.conditionNode) -const condition = ref() +const condition = ref() const open = () => { condition.value = currentNode.value.conditionSetting settingVisible.value = true diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue index 28a7783b..e86ac2da 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue @@ -1,7 +1,7 @@ - diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index 2ba4fb3f..a74bd464 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -28,6 +28,11 @@ export enum NodeType { */ DELAY_TIMER_NODE = 14, + /** + * 触发器节点 + */ + TRIGGER_NODE = 15, + /** * 条件节点 */ @@ -498,6 +503,7 @@ NODE_DEFAULT_TEXT.set(NodeType.CONDITION_NODE, '请设置条件') NODE_DEFAULT_TEXT.set(NodeType.START_USER_NODE, '请设置发起人') NODE_DEFAULT_TEXT.set(NodeType.DELAY_TIMER_NODE, '请设置延迟器') NODE_DEFAULT_TEXT.set(NodeType.ROUTER_BRANCH_NODE, '请设置路由节点') +NODE_DEFAULT_TEXT.set(NodeType.TRIGGER_NODE, '请设置触发器') export const NODE_DEFAULT_NAME = new Map() NODE_DEFAULT_NAME.set(NodeType.USER_TASK_NODE, '审批人') @@ -506,6 +512,7 @@ NODE_DEFAULT_NAME.set(NodeType.CONDITION_NODE, '条件') NODE_DEFAULT_NAME.set(NodeType.START_USER_NODE, '发起人') NODE_DEFAULT_NAME.set(NodeType.DELAY_TIMER_NODE, '延迟器') NODE_DEFAULT_NAME.set(NodeType.ROUTER_BRANCH_NODE, '路由分支') +NODE_DEFAULT_NAME.set(NodeType.TRIGGER_NODE, '触发器') // 候选人策略。暂时不从字典中取。 后续可能调整。控制显示顺序 export const CANDIDATE_STRATEGY: DictDataVO[] = [ diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue index 94f9c413..7fbad1cd 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue @@ -10,7 +10,7 @@ >
-
+
- -
- +
+
2!?$Rx3%eLLWLS1GB1hg$s1vDU}tx#Km{-j+K znh-YnV#Ov@H-^OYg&2%cLI~LS#{<6lzzYd4{zQVAK45$>Q4&M9o|(n0peEjX&zW=2 zch0%roVoLPWIn#wTn_hr1%L|xFnn}kWZLtba28c22tROEF6F@b@rlx@4l=0T&!jp|P8}VQ7L+B*AEbR`V&v2`#^5U9 zR3BoKBNL<1h7Sr?0OTMYI5s^sTRQl((*e+MngSNyxt`eW0VI=T`S#M;A*JvecnGI) z_p{%>uRqty4&dIVy$hJ-rD5fH;6w0K;`j+dViqRme{$}T9d?TfqAPY z);q3*YC`A3idqw50xS2*mZAhAWsfB+urxc%e&M3rH20HZ*m2uBWbGPvm)iv!VJ{59 z%K$C$))e*_m`k?Oj0-%?U|0>yn6!YrHPb3N)G$FUaSG~58mKWrW+}{5W{Sy-&@#c; z98Y1kCqNki4P|U;Zso?@qMLKIwL5z^9Ul5_=UqM zIWf~EuHF$9Mu|i*eK}SC?cz9f@`bEX%_(P0|_nqjHtGjUK zi#}c~H@bUX-!XCIP>#l-BNIE`$h#v76N~5fo;fjIC>9IjC(i6WU-T}ELT1ymbJ@h? zVo~%ku^}KN26lG)eBC<-5}rn$t6p;}J{Jynz12?zzv4Dl!TMBdUviV20bYne3v`14 zyWj*}fUJRO4TEwS>D_zcG6prwr1RON^DpFafO{0+gJCN?;In((ld&ILFcS*eAA?uW z`X>AnnDDWAJ!j-}Tg}Q5nN~>GS1(zP@+0oBroHvISlV`In&^?VRCF`j+|<5qbFnGZ zs&%fb?RpLNjsCE(p4%r!q7hkd*RucOTkX{InwB?mnwHzIx9hZ6w)(!SEC#~fNW>fP zx3tdAZb(F%f+0yol^n@rk%j07hP7|Gi(HJX2sA?qo`h%M0A0c<`dcqjD}#JIxdpTN zbT~wpr?n-82C7aCvDTqDuTpQ*24+)8eSU0H{%`1iAt4zBJ`uP6f~O;by%T5((0Wl+e2QqR{i5PmTrN`L&bl{O zH?k~k6Jf4>P zWxsS&^82Oguad%LS*Xd@xGY&*15IMBG;!&un@`!MO?IH}Jy7?)R5wRm58p{tq!$)9 zv=N=>Z&lGw;50@45HRd-ainOk>!~d^iN;8-R~X zWw$zW{O|~AI^uDHv&*7PWIe-qe0^N!>%SZVudD&C% m)K8wtMxN2+C3Rw8|H?VByB$$th$)t==|;Gd`STK)q4CUFA* diff --git a/src/components/SimpleProcessDesignerV2/theme/iconfont.woff b/src/components/SimpleProcessDesignerV2/theme/iconfont.woff index 94befbd1898e85a0687043275b23b0667e74fd29..f4b4f3de95d8fb8c727b52d9a06b18e22a566d85 100644 GIT binary patch delta 2392 zcmV-e38(hN5UdsycTYw}00961000Xt01E&B000pPkrX|D7D~HgZDDW#00D>q005u> z00K4(Q3t$dYL!nw|Wnp9h00{5^001ul001^Bk1@e$Xk}pl z00|%f000~S001Nh-UEziZFG1500}$*000jF001m30001NZ)0Hq00~S0000;O000;b zj1Qb`VR&#j000SO0000U0000W0U!XfZeeX@000Su0003%0007K5TiV>aBp*T000Wa z0001J0001tSwsZ{lL!H50X&m&0Th1`4NZ8Q<&n(|!Y~X*U-}cE;=rZ!(h*p&5(8uu zP8_;QcW@3JqS$e7lnHS3BKec;ME-ylsFjD(KzI|dc&QqSUegu5;i>tZn<`O|N=BI^ z$t+9m^N`nVgJ1eV1fBJL>^ChZeXXO?nhR&57RSRG{}tDAr#zGtpq<2bP$+hgaocAU1!#z`ME$rjqQ30t7umd!4-ECg1eth55UD^#+GW!V)Kutk6h z{3xpxh-&x8vMNX*At8S7Q~`g1v;uzc2MNUk=T4luXyG3-H|L)FoqObSzkAM^5Emi; zx<&s$=g0^-O4i83grtpZ0qPB~GFf~LuLoaAQ569)%ur)*SykAJrnG^Z>X`;;oLArq zP(#lGCvdw~(2W9A>rr%wY9K&b&(d>#-cNl)dH2NF>e{c@R>vmX!$W@_S2XS`Rlq&d zy0EdcaiKNihDwR=+~q}AoTJA+`RrO~fQpeY51t5@nrbghB_ZPR20ZYR9pOcv>z{mz z|A!lVf;|Tx{9fC`$NlwB9D4NhNeiEoryo7^RLvg~IllS)(XET;r<%>F^B1>{KHm(! z!h0)Y^P5$3<64ssaQuJ1sMlPa9Sw&^XBW*t+(YeKelhHW#bD6>t~Vn38y!Nt$lLen z25pcaiIFrJB@Hr1E)oLO29!0B1i+Km4FMz#D&<-=f6>QBm0&Cu zj7HMgOP2=CzJw%)R8SGfWSX2z0?6O5=na}eEk<-wAd}=lvV!^d7+? z{GQ5tdK>&_7mmDZed$=SR4N`@S`UUo!IdKmmy^1lyu5#KFuho0)G@AchNLl0dW9KvXhzs|yf zRxc8KE-y?p2|g6>`s4Hm^ck#`INmd1iQeEekTK`!ZYAte56+brz|;}#-%Ei8SJAOR z*qS3tSDSyS4}JB8)%mUV*qM6$%;QYJ!=jXL=k4Ptq<+b4Eswyr8;>+3IJ5e~SDr{U zuP(K>=Ha*9?I?B*O2YPVJD+b4ZwnIYh2@snc%+F7!g}I!^lx<2i8n{aS;Y56Nm)kEHOEY?m{tEb-21YEbzsLhytDi(tq zv8D=Nler7_b}$vNKN}3fV}Voqj2nO40d$!*AsXzn(ZNwBIJQrCtJHY@Z?n}RG0h9ua3FsK{A-(BcddU#vpFK&kE`OLADfuO5%Sx zL3&Y;ZcD;>W;^ewFZNb9`*Qc&a(y=)rCVcH=+Ed=*iT2v3FkI4Ea^jgvX6g(%Vq>l#t%QMQ;*3ml-}Ig7G+ta8%#32ztaDf zzns)_i|e)4;|BmtV41MM+J6=0!Av|3rDMg+Axn!XgG0OM6*(!(nzF5k zuj2OUN%Nh>>iYZu(Af{PN~bfWIYeI-mHFpHSrI2Lw#C{+HY(%)m)-Gil(tEhIy}x6sSUJ&T*QnQDJcgPy`B zMjU+_LP1&Ud|s1-p`jArTsa`-b1pB)Lq-4eLo>oi4kRCip^~4OhC4aEsN;aM-8rkW zNr!XrrkL=D!~TT$L;u{$1hrP?g*RPy0uQc?bM@tU;YY4F0<(zMmfP#-Q!qeRyYo?$ zMnNb42L1WDoB#j-c${NkWMF?_0OGCJ=5)pL+k9oN1q004&o z00Hz+!SeHGYaBp*T000N< z000100001SzsN@PlL!H50X>s(0Th2v4NrKS?U6wWgFp;LUmUAYTy!IDJVMXps+aHv z(v_!779PSTlR_!<2u*l1Wz0dUdM6bBiim&~ffV4-LoZb2P^xg?fP^?80RkZ*Rlr{m56rl3 z8j02J_kPVMz4zw5MHr!fU&nu6;Wtqj>1YHYurg4R44^~?Y{@_ja7*B204(Q0A#Ia; zV?g{(yCh{z*J#=jn%*eKU;6msLUpZnV6jkGJR<;}Qb@X%W=A=Y7_loe1Mo%ZWQoAy z!o`oy#>*SiwY4hz(mKvzXM)J}{#rU+>#xg%>zSE~T{>Cj2J-QI&*Oi8@M<&P6e^00 z_hgBA`d$fmN<9B|aI66Mi3X}$fV{(XD+!Lrb(i~ygr?SNwYB#IOy%c2Z~i#}u*nv+ za+J+Sqi`i!*5DH=onrNHJjC7!hvE59JPfD9(uEe2153839KZ)3Mx$(r6WJ4*Adii5 zvY<41VODRqk;Lm*_aT40&g-}zp>~NDv`)}qxE(riqAikux8N!}^6L+Cjrfo7CA$Jk zH&)pn>^rs%emKt3=U#qI`i;GP7M9osyb9V5x_lX?KS%r#J^CHrz!hZh4rP#wP@Bp7 zl8f-pWKC*Xei|VvzqouZl8x|2B??f2ZZIGK$v{DTS^(RP>t=t^vWg}=&ED5-TbIW5 zo>8mV_|t}~``pf%eYk_wp6Qr`%?D;vNBaz`Xi4LoGHUCM>v~U*4o|X8?)>Z~{2cKq zl@3Q?@s*ke+k#Aa`(y;61iO1moZZDrT zbGzibVQLDkb=rT<;ty73N@a`4>@QnP)v5rSHDqFmz$*$Niq*>x?}5fjjnWKBQ~d#dAlurkgxTzfhPWb{r`v!xfkB!L#DIoV@=o<=(P=6z34x0Rh<1Lxg zgfL+RZYf>CNF>;$d=or8dl2VltMV=1cIctmqEt_qsmkB_ZiXhgKR;7j=A4WLrq+@V zbF?xh`VR)=51RmZoMT{QU|;~^+tHK1#`D{JW#DFE0D(tuS^E(5|9Tb%=58RDgMkSo z3II{$3r&+B2^UEK07ni2ad@0#VPIfj!Gi$;U;rTi00000003A3ya4I}J^``ITc_Ih(YU&pf{Yd?>yXR6osgbX*cP(@001~;*XIBL diff --git a/src/components/SimpleProcessDesignerV2/theme/iconfont.woff2 b/src/components/SimpleProcessDesignerV2/theme/iconfont.woff2 index e8f95c8c307663dec7a55cd4775adfc07a72de70..d66f968531f29868912969439cc3634ae976b9c1 100644 GIT binary patch delta 2325 zcmV+w3F`LH444uacTYw#00961000RX01E&B000pP000Qfkr*9+gf3X9s}{8;uSl5oUx`LiUe@>`dc^A}U){L!tWd`QZXfzKSLqXNFSp@U%vI ze`a?5#E~Xujp(IcBx-~Np?e~E^HS7HxGCDSJ&x#MNdrXmh{-ghVnBqLVKFCZOo`sL ze%Cq>YdvBWcci9&A@3UBZ!NDx!bjCD%CjYpJ~#Uphh8R2u0oss-&(7>uOCh9Od6q4 zDyjV0J!E#z=6pHKJV6u-8A37fW+C!OR84_W0-*!yrfKnbstnPACbr3?h+2S|{kr1_ z^!5;-oQh7A0>*M-Qw?xL74{CAvawvDECiN@MOhGp)=+bQmn|S}0W;DK%6$ObEM7nU zgV3-9k}896N9W7LCE)TjFnt4Kvlx&+0Q__fFnvOWj2$;-i-*gu2LP_{j)Lo_DpOqo zz#^9Man--TG-cX(S~b0H`snmC6Whc!eKR`?nhX02i_t%LKvroKy(Dy6HBkd_qoA(m z^!x&ehRiR23QMmp%KnigTknIlQRAII+416hR|}3@(f0!p5GvmT0JzP9poM| z8lD<-k9GQ>B$_@ubt#R|YH@CMFUii-^sCiHba^X&>>hdN2zK~3ardZ#80y3NhY@lT zpQsuQB`10e8#mXPPwC}OE*VWg?)jVxcoYx<{sPAq`kIDf?QU;4?R%elGbJ`gOh6Dm zNsfbmQuPq0NINh%$}ZIOm+k)x5o0n;qak~Hajlk6t6K!wl3fNMHk7O|$l^m@{0#0>`3jVBrm*0c#5@F0lCBXrV2 zy-tTB0U6WpBb=`3Ooim{M5+6tes}nGz~d zX15g;z(pzs@$f2ShF^Px(7_{d9#F9h2$Q@7!3YJre7{Da9K7Wv)9kb>kxO66WND;K zq_TdxlOYI%Pgv8y137+89jwQ~q7h>tAHRgqp?1XF2=GK+URoHprB7W(_g~F1~P2`2X z-uZR$)~ow`Ra$>cOs!g!vmi4&EHCVTbwF^z`=M5e18_~|f?&Mu|4=PRrgnud7bz>2 zR15w!7z}>7)Gm-5s{NmIJ#IBKe+8Eko6@$1PojC%w9NwFuWc+hQ{=W#f}8ko94nr6 z*i{S?Y_rOT(+3m3xB9BvX2D+xq&xY0LNwI<;`FkH)Bl3CcicWF3z9zzviEL(NN02z zosC@#_V)qbN%-UAa^42KS@+oOOOhbz%Rm6IWJulyCI_?RmyO%0 z!bab12^G&iPpx6CahK3|3k7U2+d=nm@}NJ=Cg#wc^Nu?3ujm%#UA5N=yB?>bj;NDZ zQ0`#0X~t$|lkFyxjcJo4prdGiJJW63ZL+nBh0~l()*~!|<>Mu_>ZS>CEu5@9+Rn&L zW+j$bC*4X`v^m}<$uF}YJtQSKI3*$=z>}b(Z-Rie3&)VgG@88wxn-AuJtmZt`MUI6UINc82FIg}JLie~vdf@gb6WZe* zC881s)FIM=mz+D_p-@za+T-?P=(VG-f1DF65&i4+@Wi{)GFqINv+LGHsT@m-+yWMT zfmMu1rgBtfpo0uP!|nnv!{yMc3Z8cXCNhXF;&NeWWBOxcqEpU)Z7$4QFPApwsj&%} z5IFV%t6@gDMKQAkS21Jjd>}FNl*`pXm#=p_esouag!$$t#OCu-MU+}`L>&+@(H!<8 z>*%jt0(B4eF>xEDPnHD&IH)F_8Ymnbif?u<^qr7ucVZSFox7WcH>RH1^f0uaEz7oPZ<hlMERnz45#LY!{zfFN^iaX+ELwS!VKXwRE{EA=@hqI8O%i5j?BJe6;+}9Hbwlcm zpY`_i`Z=~%($>#4(xkB#=P7C(E}*taD}#Nw26a-}+fKalU``!?MX>^GvJ%oTZCsj6 zdX6)wTeyIKGD<6pOt=Ph;lK3WZ#=EzIbXc|4KS&^kF8cT*na9mV8M+Q~En(KW v!K((A_xq$Qn#~DvH+W;`G%UC@A@0{b`^Mr9+XR2Z@y$%W;5M?bwXlZ+2aj$h delta 1608 zcmV-O2DkZ`63`47cTYw#00961000J101E&B000a)000I7kr*9+gLDdtNQn;tHUcCA zAPW)z1Rw>3X9sZ`s0tAkq^XkqOt5X?WLN6Z4Bg-(X-z&nZrc0#fl`814Jsy79V!!L zO{c;%>>Orlm8m0V+MYY$4#4JynKlbx)2V0<%e3@8_KI(PWExqa0Ju0*%{&iC_FF85 zA=ztCG}Z-_0*$$Uu(g8s3baMND#J;-n*dYIUGD<|K#F7(f+?%0(?Kz5^sFiH2Maw- zfHa>>8qbf0WT*k#f+LW~#q7Q;$SQ~c<}KzCfR*9J#pJDX3#hi4+?2rDvJ?+0958PQec1?2pljDygBGK z=rj0@(^+bTgsjzsfAIhYEC^g6h6ofOVrYp>u!g7$Fu=HCgwjB$z(Q(-3Ix(OK?4_H z&`Sj|q&`qV1nD=B;#omU_E7=w21q}^G(*eM9Sa3}cf?F=l*`q2JC#Z<4&g-Xa3YJ0 zOmo#l-fXvjJBn;J2v+M5v%7;}vsoMtlihAKA0Z@ENo6%2Ksc0VaVAb~8M6u_6Cvu@ z2&;uPV#!5h{$yFDJO@_d=0G7!znF&gmR3~|7c2oJHPdAgns>YPeYq7&1}$>>a|Ac z;jDU;hLARg7fjLr9qVI62Ako8~}n=^;s+QDr_Nbc07Y)TWwLoPEe~ zds&#Vwm$Mo1X$Uc@o zT|nA@Ok2EaB`2g=de(7j;8s3{9FIDypsOR#CU3nWtPVQ>i`{I4_8dMFhmo*`6+uT_>QJyy9~_otqJ6lcm? z-_KxMQdEOeWVYPkVrnp81L8=+29lIoJ10VsQ>`y5_*kV6lpE} zo*GG?(mq;D`j_@oy0Ji?)1?4F-(_b0_}0V2p=*B|sm%Y)-2ZXTr{9TIh}*e@#rCow z0RzySpPFuE|SGMKm>0Lf*30N z2U4^V`SCbJ62;iFfE69xKQx*ctd(mx>o@v`W2p-ML-GheHDz6le<47BHnBr~_N}TV zE78-fe=#^0DM_4Qv>a5^sj6(96E<1-ZiE@r>npE6NkjY&cQ7f G0002A{{j*K diff --git a/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss b/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss index 8cf2681d..f3d8b443 100644 --- a/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss +++ b/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss @@ -113,18 +113,21 @@ // 节点连线气泡卡片样式 .handler-item-wrapper { + width: 320px; display: flex; + flex-wrap: wrap; cursor: pointer; .handler-item { display: flex; flex-direction: column; align-items: center; + margin-top: 12px; } .handler-item-icon { - width: 60px; - height: 60px; + width: 50px; + height: 50px; background: #fff; border: 1px solid #e2e2e2; border-radius: 50%; @@ -138,13 +141,14 @@ .icon-size { font-size: 25px; - line-height: 60px; + line-height: 50px; } } .approve { color: #ff943e; } + .copy { color: #3296fa; } @@ -161,6 +165,18 @@ color: #345da2; } + .delay { + color: #e47470; + } + + .trigger { + color: #3373d2; + } + + .router { + color: #ca3a31 + } + .handler-item-text { margin-top: 4px; width: 80px; @@ -266,6 +282,18 @@ &.start-user { color: #676565; } + + &.delay-node { + color: #e47470; + } + + &.trigger-node { + color: #3373d2; + } + + &.router-node { + color: #ca3a31 + } } .node-title { @@ -711,45 +739,56 @@ // iconfont 样式 @font-face { - font-family: 'iconfont'; /* Project id 4495938 */ - src: - url('iconfont.woff2?t=1724339470412') format('woff2'), - url('iconfont.woff?t=1724339470412') format('woff'), - url('iconfont.ttf?t=1724339470412') format('truetype'); + font-family: "iconfont"; /* Project id 4495938 */ + src: url('iconfont.woff2?t=1737639517142') format('woff2'), + url('iconfont.woff?t=1737639517142') format('woff'), + url('iconfont.ttf?t=1737639517142') format('truetype'); } .iconfont { - font-family: 'iconfont' !important; + font-family: "iconfont" !important; font-size: 16px; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +.icon-trigger:before { + content: "\e6d3"; +} + +.icon-router:before { + content: "\e6b2"; +} + +.icon-delay:before { + content: "\e600"; +} + .icon-start-user:before { - content: '\e679'; + content: "\e679"; } .icon-inclusive:before { - content: '\e602'; + content: "\e602"; } .icon-copy:before { - content: '\e7eb'; + content: "\e7eb"; } .icon-handle:before { - content: '\e61c'; + content: "\e61c"; } .icon-exclusive:before { - content: '\e717'; + content: "\e717"; } .icon-approve:before { - content: '\e715'; + content: "\e715"; } .icon-parallel:before { - content: '\e688'; + content: "\e688"; } From 7f50584a0283563473d56146f71cb2e16bbcd579 Mon Sep 17 00:00:00 2001 From: GoldenZqqq <1361001127@qq.com> Date: Fri, 24 Jan 2025 10:30:57 +0800 Subject: [PATCH 096/273] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=A8=A1=E5=9E=8B=E5=88=86=E7=B1=BB=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E5=92=8C=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/model/CategoryDraggableModel.vue | 147 ++++++++++++------ 1 file changed, 101 insertions(+), 46 deletions(-) diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index ade1267b..5c8610ab 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -1,5 +1,5 @@ - @@ -104,7 +86,7 @@ class="!w-390px" /> - + - - - 确认 - 取消 - 清空 + +
+ 清空 + 取消 + 确认 +
@@ -146,11 +129,37 @@ min-width="100" fixed="left" /> - - - + - - From 20564ed8032ce8b1a7f3963ef11e2d820f3c14b0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Mar 2025 20:39:50 +0800 Subject: [PATCH 225/273] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91BPM=EF=BC=9A=E5=BE=85=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E3=80=81=E5=B7=B2=E5=AE=A1=E6=89=B9=E7=9A=84=E6=89=80=E5=B1=9E?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=9A=84=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/definition/index.ts | 6 + .../bpm/processInstance/create/index_old.vue | 267 ------------------ src/views/bpm/processInstance/index.vue | 21 +- src/views/bpm/task/done/index.vue | 49 ++-- src/views/bpm/task/todo/index.vue | 70 +++-- 5 files changed, 97 insertions(+), 316 deletions(-) delete mode 100644 src/views/bpm/processInstance/create/index_old.vue diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts index caedba14..c917787f 100644 --- a/src/api/bpm/definition/index.ts +++ b/src/api/bpm/definition/index.ts @@ -20,3 +20,9 @@ export const getProcessDefinitionList = async (params) => { params }) } + +export const getSimpleProcessDefinitionList = async () => { + return await request.get({ + url: '/bpm/process-definition/simple-list' + }) +} diff --git a/src/views/bpm/processInstance/create/index_old.vue b/src/views/bpm/processInstance/create/index_old.vue deleted file mode 100644 index 83e1ff46..00000000 --- a/src/views/bpm/processInstance/create/index_old.vue +++ /dev/null @@ -1,267 +0,0 @@ - - diff --git a/src/views/bpm/processInstance/index.vue b/src/views/bpm/processInstance/index.vue index d5831aed..d6fc83d3 100644 --- a/src/views/bpm/processInstance/index.vue +++ b/src/views/bpm/processInstance/index.vue @@ -40,7 +40,6 @@ />
- - + @change="handleQuery" + > + + - +