diff --git a/src/views/workflow/extension/button/ButtonModal.vue b/src/views/workflow/extension/button/ButtonModal.vue new file mode 100644 index 0000000..ee7e4d9 --- /dev/null +++ b/src/views/workflow/extension/button/ButtonModal.vue @@ -0,0 +1,125 @@ + + + + + + + 注意:按钮编码不能重复,系统按钮以_flow_开头,自定义按钮不能以_flow_开头。 + 系统按钮和自定义按钮的区别是,系统按钮是绑定具体的action进行提交,如果你定义了系统按钮,必须在代码中实现对应的action方法。 + 自定义按钮无需在代码中添加action方法,触发自定义按钮时调用的是【同意】按钮对应的action,并把该按钮对应的code设置为true、其他自定义按钮对应的code设置为false作为流程变量进行提交。 + + + + + + + + diff --git a/src/views/workflow/extension/button/button.data.ts b/src/views/workflow/extension/button/button.data.ts new file mode 100644 index 0000000..af79c2a --- /dev/null +++ b/src/views/workflow/extension/button/button.data.ts @@ -0,0 +1,78 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; + +/** 表格列配置 */ +export const columns: BasicColumn[] = [ + { + title: '名称', + dataIndex: 'name', + }, + { + title: '编码', + dataIndex: 'code', + }, + { + title: '排序', + dataIndex: 'sort', + } +]; + +/** 搜索表单配置 */ +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '名称', + component: 'Input', + componentProps: { + placeholder: '请输入名称', + }, + colProps: { span: 8 }, + }, + { + field: 'code', + label: '编码', + component: 'Input', + componentProps: { + placeholder: '请输入编码', + }, + colProps: { span: 8 }, + }, +]; + +/** 表单配置 */ +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: 'name', + label: '名称', + component: 'Input', + required: true, + }, + { + field: 'code', + label: '编码', + component: 'Input', + required: true, + }, + { + field: 'tip', + label: ' ', + component: 'Input', + slot: 'tip', + }, + { + field: 'sort', + label: '排序', + component: 'InputNumber', + componentProps: { + style: { width:'100%' }, + min: 0 + }, + required: true, + }, +]; diff --git a/src/views/workflow/extension/button/index.vue b/src/views/workflow/extension/button/index.vue new file mode 100644 index 0000000..479b9de --- /dev/null +++ b/src/views/workflow/extension/button/index.vue @@ -0,0 +1,154 @@ + + + + + 新增 + 修改 + 删除 + + + + + + + + + + + + diff --git a/src/views/workflow/extension/category/CategoryModal.vue b/src/views/workflow/extension/category/CategoryModal.vue new file mode 100644 index 0000000..5b8f40f --- /dev/null +++ b/src/views/workflow/extension/category/CategoryModal.vue @@ -0,0 +1,90 @@ + + + + + + diff --git a/src/views/workflow/extension/category/category.data.ts b/src/views/workflow/extension/category/category.data.ts new file mode 100644 index 0000000..8982602 --- /dev/null +++ b/src/views/workflow/extension/category/category.data.ts @@ -0,0 +1,92 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; + +/** 表格列配置 */ +export const columns: BasicColumn[] = [ + { + title: '分类名称', + dataIndex: 'name', + align: 'left' + }, + { + title: '排序', + dataIndex: 'sort' + }, + { + title: '创建时间', + dataIndex: 'createTime' + }, + { + title: '备注信息', + dataIndex: 'remarks' + }, +]; + +/** 搜索表单配置 */ +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '分类名称', + component: 'Input', + componentProps: { + placeholder: '请输入分类名称' + }, + colProps: { span: 8 } + } +]; + +/** 表单配置 */ +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: 'parentId', + label: '上级流程分类', + component: 'TreeSelect', + defaultValue: '0', + componentProps: { + fieldNames: { + label: 'name', + key: 'id', + value: 'id', + }, + } + }, + { + field: 'name', + label: '分类名称', + component: 'Input', + required: true, + colProps: { + span: 12 + } + }, + { + field: 'sort', + label: '排序', + component: 'InputNumber', + componentProps: { + style: { width:'100%' }, + min: 0 + }, + required: true, + colProps: { + span: 12 + } + }, + { + field: 'remarks', + label: '备注信息', + component: 'InputTextArea', + componentProps: { + rows: 6 + }, + colProps: { + span: 24 + } + } +]; diff --git a/src/views/workflow/extension/category/index.vue b/src/views/workflow/extension/category/index.vue new file mode 100644 index 0000000..653b989 --- /dev/null +++ b/src/views/workflow/extension/category/index.vue @@ -0,0 +1,110 @@ + + + + + 新增 + 展开全部 + 折叠全部 + + + + + + + + + + + diff --git a/src/views/workflow/extension/condition/ConditionModal.vue b/src/views/workflow/extension/condition/ConditionModal.vue new file mode 100644 index 0000000..5b05aa4 --- /dev/null +++ b/src/views/workflow/extension/condition/ConditionModal.vue @@ -0,0 +1,79 @@ + + + + + + diff --git a/src/views/workflow/extension/condition/condition.data.ts b/src/views/workflow/extension/condition/condition.data.ts new file mode 100644 index 0000000..47bcdf3 --- /dev/null +++ b/src/views/workflow/extension/condition/condition.data.ts @@ -0,0 +1,64 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; + +/** 表格列配置 */ +export const columns: BasicColumn[] = [ + { + title: '名称', + dataIndex: 'name', + }, + { + title: '表达式', + dataIndex: 'expression', + }, + { + title: '备注信息', + dataIndex: 'remarks' + }, +]; + +/** 搜索表单配置 */ +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '名称', + component: 'Input', + componentProps: { + placeholder: '请输入名称', + }, + colProps: { span: 8 }, + } +]; + +/** 表单配置 */ +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: 'name', + label: '名称', + component: 'Input', + required: true, + }, + { + field: 'expression', + label: '表达式', + component: 'Input', + required: true, + }, + { + field: 'remarks', + label: '备注信息', + component: 'InputTextArea', + componentProps: { + rows: 6 + }, + colProps: { + span: 24 + } + } +]; diff --git a/src/views/workflow/extension/condition/index.vue b/src/views/workflow/extension/condition/index.vue new file mode 100644 index 0000000..76593c3 --- /dev/null +++ b/src/views/workflow/extension/condition/index.vue @@ -0,0 +1,150 @@ + + + + + 新增 + 修改 + 删除 + + + + + + + + + + + + diff --git a/src/views/workflow/extension/listener/ListenerModal.vue b/src/views/workflow/extension/listener/ListenerModal.vue new file mode 100644 index 0000000..73feb7f --- /dev/null +++ b/src/views/workflow/extension/listener/ListenerModal.vue @@ -0,0 +1,79 @@ + + + + + + diff --git a/src/views/workflow/extension/listener/index.vue b/src/views/workflow/extension/listener/index.vue new file mode 100644 index 0000000..6e4f1d6 --- /dev/null +++ b/src/views/workflow/extension/listener/index.vue @@ -0,0 +1,150 @@ + + + + + 新增 + 修改 + 删除 + + + + + + + + + + + + diff --git a/src/views/workflow/extension/listener/listener.data.ts b/src/views/workflow/extension/listener/listener.data.ts new file mode 100644 index 0000000..a7c46d4 --- /dev/null +++ b/src/views/workflow/extension/listener/listener.data.ts @@ -0,0 +1,140 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import {h} from 'vue'; +import {Tag} from 'ant-design-vue'; + +/** 表格列配置 */ +export const columns: BasicColumn[] = [ + { + title: '监听器名称', + dataIndex: 'name', + }, + { + title: '监听器类型', + dataIndex: 'listenerType', + customRender: ({ record }) => { + const type = record.listenerType; + return h(Tag, { color: 'processing' }, () => ~~type === 1 ? '执行监听器' : '任务监听器'); + } + }, + { + title: '事件', + dataIndex: 'event', + }, + { + title: '值类型', + dataIndex: 'valueType', + customRender: ({ record }) => { + return {'1':'类', '2':'表达式', '3':'委托表达式'}[record.valueType || '1']; + } + }, + { + title: '值', + dataIndex: 'value' + }, +]; + +/** 搜索表单配置 */ +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '监听器名称', + component: 'Input', + componentProps: { + placeholder: '请输入名称', + }, + colProps: { span: 8 }, + } +]; + +/** 表单配置 */ +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: 'name', + label: '监听器名称', + component: 'Input', + required: true, + }, + { + field: 'listenerType', + label: '监听器类型', + component: 'RadioButtonGroup', + defaultValue: '1', + componentProps: ({ formModel, formActionType }) => ({ + options: [ + { label: '执行监听器', value: '1' }, + { label: '任务监听器', value: '2' }, + ], + onChange: async (e: any) => { + let eventOptions = e == 1 + ? [ + {label: 'start', value: 'start'}, + {label: 'take', value: 'take'}, + {label: 'end', value: 'end'} + ] : [ + {label: 'start', value: 'start'}, + {label: 'assignment', value: 'assignment'}, + {label: 'complete', value: 'complete'}, + {label: 'delete', value: 'delete'} + ]; + if (e === undefined) { + eventOptions = []; + } + formModel.event = undefined; // reset city value + const { updateSchema } = formActionType; + await updateSchema({ + field: 'event', + componentProps: { + options: eventOptions, + }, + }); + } + }), + }, + { + field: 'event', + label: '事件', + component: 'Select', + required: true, + componentProps: { + options: [] + } + }, + + { + field: 'valueType', + label: '值类型', + component: 'RadioButtonGroup', + defaultValue: '1', + componentProps: ({ formModel, formActionType }) => ({ + options: [ + { label: '类', value: '1' }, + { label: '表达式', value: '2' }, + { label: '委托表达式', value: '3' }, + ], + onChange: async (e: any) => { + let valueLabel = {'1':'类', '2':'表达式', '3':'委托表达式'}[e || '1']; + const { updateSchema } = formActionType; + await updateSchema({ + field: 'value', + label: valueLabel + }); + } + }), + }, + { + field: 'value', + label: '类', + component: 'Input', + required: true, + componentProps: { + placeholder: '请填写值', + }, + } +]; diff --git a/src/views/workflow/extension/workflowCopy/index.vue b/src/views/workflow/extension/workflowCopy/index.vue new file mode 100644 index 0000000..2d45fa3 --- /dev/null +++ b/src/views/workflow/extension/workflowCopy/index.vue @@ -0,0 +1,148 @@ + + + + + 删除 + + + + + + + + + + + diff --git a/src/views/workflow/extension/workflowCopy/workflowCopy.data.ts b/src/views/workflow/extension/workflowCopy/workflowCopy.data.ts new file mode 100644 index 0000000..f03d82a --- /dev/null +++ b/src/views/workflow/extension/workflowCopy/workflowCopy.data.ts @@ -0,0 +1,20 @@ +import { BasicColumn } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '实例标题', + dataIndex: 'processInsName', + }, + { + title: '抄送日期', + dataIndex: 'createTime', + customRender: ({ record }) => { + return record.createTime || '--'; + } + }, + { + title: '抄送发起人', + dataIndex: 'createByName' + } +]; +
+ 注意:按钮编码不能重复,系统按钮以_flow_开头,自定义按钮不能以_flow_开头。 + 系统按钮和自定义按钮的区别是,系统按钮是绑定具体的action进行提交,如果你定义了系统按钮,必须在代码中实现对应的action方法。 + 自定义按钮无需在代码中添加action方法,触发自定义按钮时调用的是【同意】按钮对应的action,并把该按钮对应的code设置为true、其他自定义按钮对应的code设置为false作为流程变量进行提交。 +