From 46da7e2876b0d623c961f7bb77be4e4febf12878 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 20 Jul 2024 19:35:23 +0800 Subject: [PATCH 01/30] =?UTF-8?q?=E3=80=90=E7=BC=BA=E9=99=B7=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91BPM=EF=BC=9A=E6=B5=81=E7=A8=8B=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E4=B8=AD=EF=BC=8C=E9=80=89=E6=8B=A9=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F=E6=97=B6=EF=BC=8C=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../penal/listeners/ProcessListenerDialog.vue | 16 +++++++++------- .../ProcessExpressionDialog.vue | 18 ++++++++++-------- .../penal/task/task-components/UserTask.vue | 4 +++- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue b/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue index 01f81242..21088abf 100644 --- a/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue +++ b/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue @@ -43,9 +43,6 @@ import { CommonStatusEnum } from '@/utils/constants' /** BPM 流程 表单 */ defineOptions({ name: 'ProcessListenerDialog' }) -const { t } = useI18n() // 国际化 -const message = useMessage() // 消息弹窗 - const dialogVisible = ref(false) // 弹窗的是否展示 const loading = ref(true) // 列表的加载中 const list = ref([]) // 列表的数据 @@ -53,17 +50,23 @@ const total = ref(0) // 列表的总页数 const queryParams = reactive({ pageNo: 1, pageSize: 10, - type: undefined, + type: '', status: CommonStatusEnum.ENABLE }) /** 打开弹窗 */ const open = async (type: string) => { + queryParams.pageNo = 1 + queryParams.type = type + getList() dialogVisible.value = true +} +defineExpose({ open }) // 提供 open 方法,用于打开弹窗 + +/** 查询列表 */ +const getList = async () => { loading.value = true try { - queryParams.pageNo = 1 - queryParams.type = type const data = await ProcessListenerApi.getProcessListenerPage(queryParams) list.value = data.list total.value = data.total @@ -71,7 +74,6 @@ const open = async (type: string) => { loading.value = false } } -defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue index b478bb2f..a038e69b 100644 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue @@ -28,9 +28,6 @@ import { ProcessExpressionApi, ProcessExpressionVO } from '@/api/bpm/processExpr /** BPM 流程 表单 */ defineOptions({ name: 'ProcessExpressionDialog' }) -const { t } = useI18n() // 国际化 -const message = useMessage() // 消息弹窗 - const dialogVisible = ref(false) // 弹窗的是否展示 const loading = ref(true) // 列表的加载中 const list = ref([]) // 列表的数据 @@ -38,17 +35,23 @@ const total = ref(0) // 列表的总页数 const queryParams = reactive({ pageNo: 1, pageSize: 10, - type: undefined, + type: '', status: CommonStatusEnum.ENABLE }) /** 打开弹窗 */ -const open = async (type: string) => { +const open = (type: string) => { + queryParams.pageNo = 1 + queryParams.type = type + getList() dialogVisible.value = true +} +defineExpose({ open }) // 提供 open 方法,用于打开弹窗 + +/** 查询列表 */ +const getList = async () => { loading.value = true try { - queryParams.pageNo = 1 - queryParams.type = type const data = await ProcessExpressionApi.getProcessExpressionPage(queryParams) list.value = data.list total.value = data.total @@ -56,7 +59,6 @@ const open = async (type: string) => { loading.value = false } } -defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue index 0dffeb0f..f404ef74 100644 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue @@ -135,6 +135,7 @@ import * as PostApi from '@/api/system/post' import * as UserApi from '@/api/system/user' import * as UserGroupApi from '@/api/bpm/userGroup' import ProcessExpressionDialog from './ProcessExpressionDialog.vue' +import { ProcessExpressionVO } from '@/api/bpm/processExpression' defineOptions({ name: 'UserTask' }) const props = defineProps({ @@ -197,8 +198,9 @@ const processExpressionDialogRef = ref() const openProcessExpressionDialog = async () => { processExpressionDialogRef.value.open() } -const selectProcessExpression = (expression) => { +const selectProcessExpression = (expression: ProcessExpressionVO) => { userTaskForm.value.candidateParam = [expression.expression] + updateElementTask() } watch( From 5d91131eb7eb236278778023c65f31b7c19df285 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 20 Jul 2024 20:05:42 +0800 Subject: [PATCH 02/30] =?UTF-8?q?=E3=80=90=E7=BC=BA=E9=99=B7=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91BPM=EF=BC=9A=E6=B5=81=E7=A8=8B=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E5=8F=91=E8=B5=B7=E6=97=B6=EF=BC=8C=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E8=A1=A8=E5=8D=95=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/definition/index.ts | 2 +- src/api/bpm/model/index.ts | 1 + src/api/bpm/processInstance/index.ts | 13 ++----------- src/views/bpm/processInstance/index.vue | 24 +++++++++++++++++++----- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts index cb6d4271..caedba14 100644 --- a/src/api/bpm/definition/index.ts +++ b/src/api/bpm/definition/index.ts @@ -1,6 +1,6 @@ import request from '@/config/axios' -export const getProcessDefinition = async (id: number, key: string) => { +export const getProcessDefinition = async (id?: string, key?: string) => { return await request.get({ url: '/bpm/process-definition/get', params: { id, key } diff --git a/src/api/bpm/model/index.ts b/src/api/bpm/model/index.ts index 2e1d4e64..2b484a61 100644 --- a/src/api/bpm/model/index.ts +++ b/src/api/bpm/model/index.ts @@ -5,6 +5,7 @@ export type ProcessDefinitionVO = { version: number deploymentTIme: string suspensionState: number + formType?: number } export type ModelVO = { diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index 81640625..9122b2b9 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import { ProcessDefinitionVO } from '@/api/bpm/model' export type Task = { id: string @@ -18,17 +19,7 @@ export type ProcessInstanceVO = { businessKey: string createTime: string endTime: string -} - -export type ProcessInstanceCopyVO = { - type: number - taskName: string - taskKey: string - processInstanceName: string - processInstanceKey: string - startUserId: string - options: string[] - reason: string + processDefinition?: ProcessDefinitionVO } export const getProcessInstanceMyPage = async (params: any) => { diff --git a/src/views/bpm/processInstance/index.vue b/src/views/bpm/processInstance/index.vue index 7ca07f90..f1d6ca73 100644 --- a/src/views/bpm/processInstance/index.vue +++ b/src/views/bpm/processInstance/index.vue @@ -76,7 +76,7 @@ type="primary" plain v-hasPermi="['bpm:process-instance:query']" - @click="handleCreate()" + @click="handleCreate(undefined)" > 发起流程 @@ -146,7 +146,7 @@ > 取消 - + 重新发起 @@ -167,6 +167,8 @@ import { dateFormatter, formatPast2 } from '@/utils/formatTime' import { ElMessageBox } from 'element-plus' import * as ProcessInstanceApi from '@/api/bpm/processInstance' import { CategoryApi } from '@/api/bpm/category' +import { ProcessInstanceVO } from '@/api/bpm/processInstance' +import * as DefinitionApi from '@/api/bpm/definition' defineOptions({ name: 'BpmProcessInstanceMy' }) @@ -214,10 +216,22 @@ const resetQuery = () => { } /** 发起流程操作 **/ -const handleCreate = (id) => { - router.push({ +const handleCreate = async (row?: ProcessInstanceVO) => { + // 如果是【业务表单】,不支持重新发起 + if (row?.id) { + const processDefinitionDetail = await DefinitionApi.getProcessDefinition( + row.processDefinitionId + ) + debugger + if (processDefinitionDetail.formType === 20) { + message.error('重新发起流程失败,原因:该流程使用业务表单,不支持重新发起') + return + } + } + // 跳转发起流程界面 + await router.push({ name: 'BpmProcessInstanceCreate', - query: { processInstanceId: id } + query: { processInstanceId: row?.id } }) } From 8ed2afb712c24fe0389eca456630bb85c0875114 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 21 Jul 2024 10:44:15 +0800 Subject: [PATCH 03/30] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E3=80=91=E5=85=A8=E5=B1=80=EF=BC=9A=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=96=87=E4=BB=B6=E7=9A=84=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/src/Editor.vue | 58 +++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 9 deletions(-) diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index eff82745..8dd06456 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -96,11 +96,6 @@ const editorConfig = computed((): IEditorConfig => { // 选择文件时的类型限制,默认为 ['image/*'] 。如不想限制,则设置为 [] allowedFileTypes: ['image/*'], - // 自定义上传参数,例如传递验证的 token 等。参数会被添加到 formData 中,一起上传到服务端。 - meta: { updateSupport: 0 }, - // 将 meta 拼接到 url 参数中,默认 false - metaWithUrl: true, - // 自定义增加 http header headers: { Accept: '*', @@ -108,9 +103,6 @@ const editorConfig = computed((): IEditorConfig => { 'tenant-id': getTenantId() }, - // 跨域是否传递 cookie ,默认为 false - withCredentials: true, - // 超时时间,默认为 10 秒 timeout: 5 * 1000, // 5 秒 @@ -119,7 +111,7 @@ const editorConfig = computed((): IEditorConfig => { // 上传之前触发 onBeforeUpload(file: File) { - console.log(file) + // console.log(file) return file }, // 上传进度的回调函数 @@ -142,6 +134,54 @@ const editorConfig = computed((): IEditorConfig => { customInsert(res: any, insertFn: InsertFnType) { insertFn(res.data, 'image', res.data) } + }, + ['uploadVideo']: { + server: import.meta.env.VITE_UPLOAD_URL, + // 单个文件的最大体积限制,默认为 10M + maxFileSize: 10 * 1024 * 1024, + // 最多可上传几个文件,默认为 100 + maxNumberOfFiles: 10, + // 选择文件时的类型限制,默认为 ['video/*'] 。如不想限制,则设置为 [] + allowedFileTypes: ['video/*'], + + // 自定义增加 http header + headers: { + Accept: '*', + Authorization: 'Bearer ' + getAccessToken(), + 'tenant-id': getTenantId() + }, + + // 超时时间,默认为 30 秒 + timeout: 15 * 1000, // 15 秒 + + // form-data fieldName,后端接口参数名称,默认值wangeditor-uploaded-image + fieldName: 'file', + + // 上传之前触发 + onBeforeUpload(file: File) { + // console.log(file) + return file + }, + // 上传进度的回调函数 + onProgress(progress: number) { + // progress 是 0-100 的数字 + console.log('progress', progress) + }, + onSuccess(file: File, res: any) { + console.log('onSuccess', file, res) + }, + onFailed(file: File, res: any) { + alert(res.message) + console.log('onFailed', file, res) + }, + onError(file: File, err: any, res: any) { + alert(err.message) + console.error('onError', file, err, res) + }, + // 自定义插入图片 + customInsert(res: any, insertFn: InsertFnType) { + insertFn(res.data, 'mp4', res.data) + } } }, uploadImgShowBase64: true From 0704672ad37ed51fa3b067cfdf3653010c0056f7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 21 Jul 2024 10:59:50 +0800 Subject: [PATCH 04/30] =?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=85=A8=E5=B1=80=EF=BC=9ADictTag=20?= =?UTF-8?q?=E7=9A=84=20`default`=20=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20`info`=20=E6=9B=BF=E4=BB=A3=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E6=B5=8F=E8=A7=88=E5=99=A8=20warning=20?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DictTag/src/DictTag.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index db37f714..1d075a1b 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -22,8 +22,8 @@ export default defineComponent({ const dictOptions = getDictOptions(dictType) dictOptions.forEach((dict: DictDataType) => { if (dict.value === value) { - if (dict.colorType + '' === 'primary' || dict.colorType + '' === 'default') { - dict.colorType = '' + if (dict.colorType + '' === 'default') { + dict.colorType = 'info' } dictData.value = dict } From 0763f3335173c88d9a22fc7dbb5c2c98708f867c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 21 Jul 2024 11:13:16 +0800 Subject: [PATCH 05/30] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E3=80=91PAY=EF=BC=9A=E7=A7=BB=E9=99=A4=E5=AF=B9=20mem?= =?UTF-8?q?ber=20=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pay/wallet/balance/index.vue | 35 +++++++++++++++----------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/views/pay/wallet/balance/index.vue b/src/views/pay/wallet/balance/index.vue index 296b567b..1a37eeca 100644 --- a/src/views/pay/wallet/balance/index.vue +++ b/src/views/pay/wallet/balance/index.vue @@ -8,15 +8,30 @@ :inline="true" label-width="68px" > - + + + + + + - - - - + +