From 4c960b558c1b0b86ef7899a314b22d6a66b56c09 Mon Sep 17 00:00:00 2001 From: dyd <15993027711@163.com> Date: Thu, 26 Jun 2025 09:41:22 +0800 Subject: [PATCH] =?UTF-8?q?#ICBR4R=20=E7=AE=A1=E7=90=86=E5=91=98=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=8F=98=E9=87=8F=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/editProVar/procVarManage/index.ts | 116 ++++++ .../procVarManage/model/procVarManageModel.ts | 79 ++++ .../procVarManage/components/Form.vue | 235 ++++++++++++ .../procVarManage/components/VarModal.vue | 101 ++++++ .../procVarManage/components/config.ts | 225 ++++++++++++ .../components/procVarManageModal.vue | 109 ++++++ .../components/workflowPermission.ts | 47 +++ src/views/editProVar/procVarManage/index.vue | 339 ++++++++++++++++++ .../task/components/flow/FlowPanel.vue | 10 +- 9 files changed, 1258 insertions(+), 3 deletions(-) create mode 100644 src/api/editProVar/procVarManage/index.ts create mode 100644 src/api/editProVar/procVarManage/model/procVarManageModel.ts create mode 100644 src/views/editProVar/procVarManage/components/Form.vue create mode 100644 src/views/editProVar/procVarManage/components/VarModal.vue create mode 100644 src/views/editProVar/procVarManage/components/config.ts create mode 100644 src/views/editProVar/procVarManage/components/procVarManageModal.vue create mode 100644 src/views/editProVar/procVarManage/components/workflowPermission.ts create mode 100644 src/views/editProVar/procVarManage/index.vue diff --git a/src/api/editProVar/procVarManage/index.ts b/src/api/editProVar/procVarManage/index.ts new file mode 100644 index 0000000..3996d33 --- /dev/null +++ b/src/api/editProVar/procVarManage/index.ts @@ -0,0 +1,116 @@ +import {ActRuVariablePageModel, ActRuVariablePageParams, ActRuVariablePageResult} from './model/ProcVarManageModel'; +import {defHttp} from '/@/utils/http/axios'; +import {ErrorMessageMode} from '/#/axios'; + +enum Api { + Page = '/editProVar/procVarManage/page', + List = '/editProVar/procVarManage/list', + Info = '/editProVar/procVarManage/info', + ActRuVariable = '/editProVar/procVarManage', + GetSerializedVal = '/editProVar/procVarManage/getSerializedVal', + UpdateFormVariable = '/editProVar/procVarManage/updateFormVariable', +} + +/** + * @description: 查询ActRuVariable分页列表 + */ +export async function getActRuVariablePage(params: ActRuVariablePageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Page, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取ActRuVariable信息 + */ +export async function getActRuVariable(params: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增ActRuVariable + */ +export async function addActRuVariable(actRuVariable: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.ActRuVariable, + params: actRuVariable, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新ActRuVariable + */ +export async function updateActRuVariable(actRuVariable: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.ActRuVariable, + params: actRuVariable, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除ActRuVariable(批量删除) + */ +export async function deleteActRuVariable(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.ActRuVariable, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * 获取表单变量 + */ +export async function getSerializedVal(params, mode: ErrorMessageMode = 'modal') { + return defHttp.get({ + url: Api.GetSerializedVal, + params + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * 修改表单变量 + */ +export async function updateFormVariable(params, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.UpdateFormVariable, + params: params, + }, + { + errorMessageMode: mode, + }, + ); +} diff --git a/src/api/editProVar/procVarManage/model/procVarManageModel.ts b/src/api/editProVar/procVarManage/model/procVarManageModel.ts new file mode 100644 index 0000000..026f8f0 --- /dev/null +++ b/src/api/editProVar/procVarManage/model/procVarManageModel.ts @@ -0,0 +1,79 @@ +import {BasicPageParams, BasicFetchResult} from '/@/api/model/baseModel'; + +/** + * @description: ActRuVariable分页参数 模型 + */ +export interface ActRuVariablePageParams extends BasicPageParams { + name: string; + + type: string; + + value: string; + + varScope: string; +} + +/** + * @description: ActRuVariable分页返回值模型 + */ +export interface ActRuVariablePageModel { + id: string; + + name: string; + + type: string; + + value: string; + + varScope: string; +} + +/** + * @description: ActRuVariable表类型 + */ +export interface ActRuVariableModel { + id: string; + + rev: number; + + type: string; + + value: string; + + executionId: string; + + procInstId: string; + + procDefId: string; + + caseExecutionId: string; + + caseInstId: string; + + taskId: string; + + batchId: string; + + bytearrayId: string; + + doubleVal: number; + + longVal: number; + + text: string; + + text2: string; + + varScope: string; + + sequenceCounter: number; + + isConcurrentLocal: string; + + tenantId: string; +} + +/** + * @description: ActRuVariable分页返回值结构 + */ +export type ActRuVariablePageResult = BasicFetchResult; diff --git a/src/views/editProVar/procVarManage/components/Form.vue b/src/views/editProVar/procVarManage/components/Form.vue new file mode 100644 index 0000000..14efd5f --- /dev/null +++ b/src/views/editProVar/procVarManage/components/Form.vue @@ -0,0 +1,235 @@ + + diff --git a/src/views/editProVar/procVarManage/components/VarModal.vue b/src/views/editProVar/procVarManage/components/VarModal.vue new file mode 100644 index 0000000..4cd9494 --- /dev/null +++ b/src/views/editProVar/procVarManage/components/VarModal.vue @@ -0,0 +1,101 @@ + + + + + diff --git a/src/views/editProVar/procVarManage/components/config.ts b/src/views/editProVar/procVarManage/components/config.ts new file mode 100644 index 0000000..cbd0c04 --- /dev/null +++ b/src/views/editProVar/procVarManage/components/config.ts @@ -0,0 +1,225 @@ +import {FormProps, FormSchema} from '/@/components/Form'; +import {BasicColumn} from '/@/components/Table'; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '名称', + component: 'Input', + }, + { + field: 'type', + label: '类型', + component: 'Input', + }, + { + field: 'value', + label: '值', + component: 'Input', + }, +]; + +export const columns: BasicColumn[] = [ + { + dataIndex: 'name', + title: '名称', + componentType: 'input', + align: 'left', + sorter: false, + }, + { + dataIndex: 'type', + title: '类型', + componentType: 'input', + align: 'left', + sorter: false, + }, + { + dataIndex: 'value', + title: '值', + componentType: 'input', + align: 'left', + sorter: false + }, +]; + +//表单事件 +export const formEventConfigs = { + 0: [ + { + type: 'circle', + color: '#2774ff', + text: '开始节点', + icon: '#icon-kaishi', + bgcColor: '#D8E5FF', + isUserDefined: false, + }, + { + color: '#F6AB01', + icon: '#icon-chushihua', + text: '初始化表单', + bgcColor: '#f9f5ea', + isUserDefined: false, + nodeInfo: {processEvent: []}, + }, + ], + 1: [ + { + color: '#B36EDB', + icon: '#icon-shujufenxi', + text: '获取表单数据', + detail: '(新增无此操作)', + bgcColor: '#F8F2FC', + isUserDefined: false, + nodeInfo: {processEvent: []}, + }, + ], + 2: [ + { + color: '#F8625C', + icon: '#icon-jiazai', + text: '加载表单', + bgcColor: '#FFF1F1', + isUserDefined: false, + nodeInfo: {processEvent: []}, + }, + ], + 3: [ + { + color: '#6C6AE0', + icon: '#icon-jsontijiao', + text: '提交表单', + bgcColor: '#F5F4FF', + isUserDefined: false, + nodeInfo: {processEvent: []}, + }, + ], + 4: [ + { + type: 'circle', + color: '#F8625C', + text: '结束节点', + icon: '#icon-jieshuzhiliao', + bgcColor: '#FFD6D6', + isLast: true, + isUserDefined: false, + }, + ], +}; + +export const formProps: FormProps = { + labelCol: {span: 3, offset: 0}, + labelAlign: 'right', + layout: 'horizontal', + size: 'default', + schemas: [ + { + key: 'f3a754603cf54ea98d8a05eee8fbb1ea', + field: 'name', + label: '名称', + type: 'input', + component: 'Input', + colProps: {span: 24}, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: true, + respNewRow: false, + placeholder: '请输入名称', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: true, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: {width: '100%'}, + }, + }, + { + key: 'fb6f3446078f47468407d8514614f5f0', + field: 'type', + label: '类型', + type: 'input', + component: 'Input', + colProps: {span: 24}, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: true, + respNewRow: false, + placeholder: '请输入类型', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: {width: '100%'}, + }, + }, + { + key: 'd1d2c89ec84b4f039be9debce7bdaa88', + field: 'value', + label: '值', + type: 'input', + component: 'Input', + colProps: {span: 24}, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: true, + respNewRow: false, + placeholder: '请输入值', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: {width: '100%'}, + }, + }, + ], + showActionButtonGroup: false, + buttonLocation: 'center', + actionColOptions: {span: 24}, + showResetButton: false, + showSubmitButton: false, + hiddenComponent: [], +}; diff --git a/src/views/editProVar/procVarManage/components/procVarManageModal.vue b/src/views/editProVar/procVarManage/components/procVarManageModal.vue new file mode 100644 index 0000000..8e7eb47 --- /dev/null +++ b/src/views/editProVar/procVarManage/components/procVarManageModal.vue @@ -0,0 +1,109 @@ + + + diff --git a/src/views/editProVar/procVarManage/components/workflowPermission.ts b/src/views/editProVar/procVarManage/components/workflowPermission.ts new file mode 100644 index 0000000..dc72571 --- /dev/null +++ b/src/views/editProVar/procVarManage/components/workflowPermission.ts @@ -0,0 +1,47 @@ +export const permissionList = [ + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '名称', + fieldId: 'name', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'f3a754603cf54ea98d8a05eee8fbb1ea', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '类型', + fieldId: 'type', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'fb6f3446078f47468407d8514614f5f0', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '值', + fieldId: 'value', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'd1d2c89ec84b4f039be9debce7bdaa88', + children: [], + }, +]; diff --git a/src/views/editProVar/procVarManage/index.vue b/src/views/editProVar/procVarManage/index.vue new file mode 100644 index 0000000..affc5da --- /dev/null +++ b/src/views/editProVar/procVarManage/index.vue @@ -0,0 +1,339 @@ + + + + + diff --git a/src/views/workflow/task/components/flow/FlowPanel.vue b/src/views/workflow/task/components/flow/FlowPanel.vue index 051ccdb..59f0ee0 100644 --- a/src/views/workflow/task/components/flow/FlowPanel.vue +++ b/src/views/workflow/task/components/flow/FlowPanel.vue @@ -18,9 +18,12 @@ - + + + +