From 019104f46007b1aa6463db3efa9d933788cffba6 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Tue, 8 Oct 2024 12:42:38 +0800 Subject: [PATCH 001/126] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E4=BF=AE=E6=94=B9=E3=80=91-=20=E6=96=B0=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E7=95=8C=E9=9D=A2=E9=83=A8=E5=88=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/processInstance/index.ts | 2 +- .../detail/ProcessInstanceTimeline.vue | 17 ++-- .../bpm/processInstance/detail/index_new.vue | 89 ++++++++++++------- 3 files changed, 70 insertions(+), 38 deletions(-) diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index 3d6330a8..86928816 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -47,7 +47,7 @@ export type ApprovalNodeInfo = { status: number startTime?: Date endTime?: Date - candidateUserList?: User[] + candidateUsers?: User[] tasks: ApprovalTaskInfo[] } diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue index afb778c4..d201db12 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue @@ -14,7 +14,7 @@
-
+
{{ task.assigneeUser.nickname }}
@@ -57,14 +57,20 @@ > {{ task.ownerUser.nickname }}
- - +
+
+ {{ task.reason }} +
+
@@ -91,7 +97,6 @@
{{ user.nickname }}
-
diff --git a/src/views/bpm/processInstance/detail/index_new.vue b/src/views/bpm/processInstance/detail/index_new.vue index b2035a19..54880487 100644 --- a/src/views/bpm/processInstance/detail/index_new.vue +++ b/src/views/bpm/processInstance/detail/index_new.vue @@ -12,25 +12,37 @@
{{ processInstance.name }}
- +
- + + + + {{ processInstance?.startUser?.nickname.substring(0, 1) }} + {{ processInstance?.startUser?.nickname }}
{{ formatDate(processInstance.startTime) }} 提交
- +
- +
- +
+ - +
+ + + +
+ - +
+ + + +
+ - 流转评论 + +
+ 流转评论 +
+
-
+
({}) // 流程实例 +let processDefinitionId = undefined // 流程定义 Id const operationButtonRef = ref() const timelineRef = ref() const bpmnXml = ref('') // BPMN XML @@ -151,10 +171,10 @@ const detailForm = ref({ }) // 流程实例的表单详情 /** 获得详情 */ -const getDetail = () => { +const getDetail = async () => { // 1. 获得流程实例相关 getProcessInstance() - // 2. 获得流程任务列表(审批记录) + // 2. 获得流程任务列表 getTaskList() } @@ -202,9 +222,9 @@ const getProcessInstance = async () => { // 注意:data.processDefinition.formCustomViewPath 是组件的全路径,例如说:/crm/contract/detail/index.vue BusinessFormComponent.value = registerComponent(data.processDefinition.formCustomViewPath) } - + processDefinitionId = processDefinition.id // 加载流程图 - bpmnXml.value = (await DefinitionApi.getProcessDefinition(processDefinition.id))?.bpmnXml + // bpmnXml.value = (await DefinitionApi.getProcessDefinition(processDefinition.id))?.bpmnXml } finally { processInstanceLoading.value = false } @@ -273,6 +293,13 @@ const refresh = () => { /** 当前的Tab */ const activeTab = ref('form') +/** Tab 切换 加载流程图,直接加载显示不出来,不知道啥原因,所以切换以后在加载 */ +const onTabChange = async (tabName: string) => { + if (tabName === 'diagram' && processDefinitionId && !bpmnXml.value) { + //加载流程图 + bpmnXml.value = (await DefinitionApi.getProcessDefinition(processDefinitionId))?.bpmnXml + } +} /** 初始化 */ const userOptions = ref([]) // 用户列表 onMounted(async () => { From a4a4dcdfc2aa275394df47a5082a48d1bb24fa9a Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Tue, 8 Oct 2024 21:49:04 +0800 Subject: [PATCH 002/126] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=91=E5=A4=9A=E4=BA=BA=E5=AE=A1=E6=89=B9=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E9=BB=98=E8=AE=A4=E4=B8=BA=E6=8C=89=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E4=BE=9D=E6=AC=A1=E5=AE=A1=E6=89=B9=EF=BC=8C=E9=9A=8F=E6=9C=BA?= =?UTF-8?q?=E6=8C=91=E9=80=89=E4=B8=80=E4=BA=BA=E5=8A=9F=E8=83=BD=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E8=A2=AB=E5=8E=BB=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/nodes-config/UserTaskNodeConfig.vue | 36 ++----------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue index 969cf48b..57b96654 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -139,7 +139,6 @@ clearable multiple style="width: 100%" - @change="changedCandidateUsers" > {{ item.label }} @@ -537,8 +532,7 @@ const { getShowText } = useNodeForm(NodeType.USER_TASK_NODE) const configForm = tempConfigForm as Ref -// 不允许多人审批 -const notAllowedMultiApprovers = ref(false) + // 改变审批人设置策略 const changeCandidateStrategy = () => { configForm.value.userIds = [] @@ -548,29 +542,8 @@ const changeCandidateStrategy = () => { configForm.value.userGroups = [] configForm.value.deptLevel = 1 configForm.value.approveMethod = ApproveMethodType.SEQUENTIAL_APPROVE - if ( - configForm.value.candidateStrategy === CandidateStrategy.START_USER || - configForm.value.candidateStrategy === CandidateStrategy.USER - ) { - notAllowedMultiApprovers.value = true - } else { - notAllowedMultiApprovers.value = false - } -} -// 改变审批候选人 -const changedCandidateUsers = () => { - if ( - configForm.value.userIds && - configForm.value.userIds?.length <= 1 && - configForm.value.candidateStrategy === CandidateStrategy.USER - ) { - configForm.value.approveMethod = ApproveMethodType.RANDOM_SELECT_ONE_APPROVE - configForm.value.rejectHandlerType = RejectHandlerType.FINISH_PROCESS - notAllowedMultiApprovers.value = true - } else { - notAllowedMultiApprovers.value = false - } } + // 审批方式改变 const approveMethodChanged = () => { configForm.value.rejectHandlerType = RejectHandlerType.FINISH_PROCESS @@ -666,11 +639,6 @@ const showUserTaskNodeConfig = (node: SimpleFlowNode) => { configForm.value.candidateStrategy = node.candidateStrategy! // 解析候选人参数 parseCandidateParam(node.candidateStrategy!, node?.candidateParam) - if (configForm.value.userIds && configForm.value.userIds.length > 1) { - notAllowedMultiApprovers.value = true - } else { - notAllowedMultiApprovers.value = false - } // 2.2 设置审批方式 configForm.value.approveMethod = node.approveMethod! if (node.approveMethod == ApproveMethodType.APPROVE_BY_RATIO) { From 4342c3ee056803195facf1542866dd9b52b02760 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Thu, 10 Oct 2024 23:09:05 +0800 Subject: [PATCH 003/126] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=91=20=E6=96=B0=E5=AE=A1=E6=89=B9=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E6=B0=94=E6=B3=A1=E5=8D=A1=E6=8C=89=E9=92=AE=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/api/bpm/task/index.ts | 5 + .../SimpleProcessDesignerV2/src/consts.ts | 7 +- .../detail/ProcessInstanceOperationButton.vue | 547 ++++++++++++++---- .../bpm/processInstance/detail/index_new.vue | 18 +- src/views/bpm/task/copy/index.vue | 1 + 5 files changed, 451 insertions(+), 127 deletions(-) diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index d32b2e14..cf75bfa5 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -106,6 +106,11 @@ export const signDeleteTask = async (data: any) => { return await request.delete({ url: '/bpm/task/delete-sign', data }) } +// 抄送 +export const copyTask = async (data: any) => { + return await request.put({ url: '/bpm/task/copy', data }) +} + // 获取减签任务列表 export const getChildrenTaskList = async (id: string) => { return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id }) diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index 0364c5e6..44fbf361 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -362,7 +362,11 @@ export enum OperationButtonType { /** * 回退 */ - RETURN = 6 + RETURN = 6, + /** + * 抄送 + */ + COPY = 7 } /** @@ -504,6 +508,7 @@ OPERATION_BUTTON_NAME.set(OperationButtonType.TRANSFER, '转办') OPERATION_BUTTON_NAME.set(OperationButtonType.DELEGATE, '委派') OPERATION_BUTTON_NAME.set(OperationButtonType.ADD_SIGN, '加签') OPERATION_BUTTON_NAME.set(OperationButtonType.RETURN, '回退') +OPERATION_BUTTON_NAME.set(OperationButtonType.COPY, '抄送') // 默认的按钮权限设置 export const DEFAULT_BUTTON_SETTING: ButtonSetting[] = [ diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue b/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue index 34ba2bbe..96d9739e 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue @@ -5,14 +5,14 @@ > @@ -22,16 +22,10 @@ label-position="top" class="mb-auto" ref="formRef" - :model="auditForm" - :rules="auditRule" + :model="genericForm" + :rules="genericRule" label-width="100px" > - - {{ processInstance?.startUser.nickname }} - - {{ processInstance?.startUser.deptName }} - - diff --git a/src/views/bpm/model/index.vue b/src/views/bpm/model/index.vue index 4534ec61..2f2929ad 100644 --- a/src/views/bpm/model/index.vue +++ b/src/views/bpm/model/index.vue @@ -1,211 +1,69 @@ diff --git a/src/views/bpm/model/index_new.vue b/src/views/bpm/model/index_new.vue deleted file mode 100644 index 4f2ba3c3..00000000 --- a/src/views/bpm/model/index_new.vue +++ /dev/null @@ -1,456 +0,0 @@ - - - - - diff --git a/src/views/bpm/model/index_old.vue b/src/views/bpm/model/index_old.vue new file mode 100644 index 00000000..4534ec61 --- /dev/null +++ b/src/views/bpm/model/index_old.vue @@ -0,0 +1,404 @@ + + + diff --git a/src/views/bpm/model/mock.js b/src/views/bpm/model/mock.js new file mode 100644 index 00000000..93c4b60b --- /dev/null +++ b/src/views/bpm/model/mock.js @@ -0,0 +1,202 @@ +export const mockData = [ + { + key: 'out_apply', + name: '外出申请', + description: null, + category: '1', + categoryName: '测试1', + formType: 20, + formId: null, + formCustomCreatePath: '/OA/goingOut/create', + formCustomViewPath: '/OA/goingOut/detail', + id: 'ff8f8bab-4d4e-11ef-8201-0242ac130002', + formName: null, + createTime: 1722218716216, + processDefinition: { + id: 'out_apply:4:7f56d464-4eec-11ef-8c3a-0242ac130002', + version: 4, + deploymentTime: 1722396312641, + suspensionState: 1 + } + }, + { + key: 'contract_change_history', + name: '合同变更申请', + description: null, + category: '2', + categoryName: '测试2', + formType: 20, + formId: null, + formCustomCreatePath: '/project/changeRecord/detail', + formCustomViewPath: '/project/changeRecord/detail', + id: '0c689067-3a92-11ef-b7f0-0242ac130002', + formName: null, + createTime: 1720158441959, + processDefinition: { + id: 'contract_change_history:1:f69fff4f-3a9a-11ef-b7f0-0242ac130002', + version: 1, + deploymentTime: 1720162270788, + suspensionState: 1 + } + }, + { + key: 'expenses_claim', + name: '费用报销申请', + description: null, + category: '1', + categoryName: '测试1', + formType: 20, + formId: null, + formCustomCreatePath: '/finance/reimbursement/detail', + formCustomViewPath: '/finance/reimbursement/detail', + id: '0310ad0c-351e-11ef-a653-0242ac130002', + formName: null, + createTime: 1719558848849, + processDefinition: { + id: 'expenses_claim:5:a043a1d8-4eec-11ef-8c3a-0242ac130002', + version: 5, + deploymentTime: 1722396367911, + suspensionState: 1 + } + }, + { + key: 'out_business_apply', + name: '申请单', + description: null, + category: '2', + categoryName: '测试2', + formType: 20, + formId: null, + formCustomCreatePath: '/finance/businessTripApply/detail', + formCustomViewPath: '/finance/businessTripApply/detail', + id: '279e27a4-3393-11ef-8401-0242ac130002', + formName: null, + createTime: 1719389258966, + processDefinition: { + id: 'out_business_apply:9:a7b2d4e2-430f-11ef-876f-0242ac130002', + version: 9, + deploymentTime: 1721091998780, + suspensionState: 1 + } + }, + { + key: 'pms_project_delay_application', + name: '项目延时申请', + description: null, + category: '2', + categoryName: '测试2', + formType: 20, + formId: null, + formCustomCreatePath: '/project/workHourDelay/create', + formCustomViewPath: '/project/workHourDelay/detail', + id: '46d87275-27c7-11ef-b258-0242ac130002', + formName: null, + createTime: 1718092231234, + processDefinition: { + id: 'b7ed308a-430f-11ef-876f-0242ac130002', + version: 5, + deploymentTime: 1721092026059, + suspensionState: 1 + } + }, + { + key: 'pms_project_result_approval', + name: '项目成果审核', + description: null, + category: '2', + categoryName: '测试2', + formType: 20, + formId: null, + formCustomCreatePath: '/project/projectTaskResult/detail', + formCustomViewPath: '/project/projectTaskResult/detail', + id: '4a15d4f8-23cc-11ef-8dd0-0242ac130002', + formName: null, + createTime: 1717654579502, + processDefinition: { + id: 'dd3cc360-4eec-11ef-8c3a-0242ac130002', + version: 6, + deploymentTime: 1722396470232, + suspensionState: 1 + } + }, + { + key: 'pms_contract', + name: '合同管理', + description: null, + category: '2', + categoryName: '测试2', + formType: 20, + formId: null, + formCustomCreatePath: '/sales/contract/create', + formCustomViewPath: '/sales/contract/detail', + id: '8317cb71-0d1a-11ef-8445-70b5e844a623', + formName: null, + createTime: 1715159299146, + processDefinition: { + id: 'pms_contract:5:c7d6012a-29f2-11ef-a08d-0242ac130002', + version: 5, + deploymentTime: 1718330818270, + suspensionState: 1 + } + }, + { + key: 'pms_consult_task_act', + name: '咨询任务书', + description: null, + category: '1', + categoryName: '测试1', + formType: 20, + formId: null, + formCustomCreatePath: '/consultTask/create', + formCustomViewPath: '/consultTask/detail', + id: '47fad8e4-0b91-11ef-b841-70b5e844a623', + formName: null, + createTime: 1714990407756, + processDefinition: { + id: 'pms_consult_task_act:1:67c2ae59-0b91-11ef-b841-70b5e844a623', + version: 1, + deploymentTime: 1714990460960, + suspensionState: 1 + } + }, + { + key: 'pms_project', + name: '立项管理', + description: null, + category: '1', + categoryName: '测试1', + formType: 20, + formId: null, + formCustomCreatePath: '/project/applyProject/create', + formCustomViewPath: '/project/applyProject/detail', + id: 'f0ba6bde-0b90-11ef-b841-70b5e844a623', + formName: null, + createTime: 1714990261372, + processDefinition: { + id: 'pms_project:6:b9e4e33b-2c6c-11ef-8386-0242ac130002', + version: 6, + deploymentTime: 1718603095738, + suspensionState: 1 + } + }, + { + key: 'invoice_apply_manage', + name: '开票申请', + description: 'asdas', + category: '1', + categoryName: '测试1', + formType: 20, + formId: null, + formCustomCreatePath: '/sales/invoice/create', + formCustomViewPath: '/sales/invoice/detail', + id: '7ec07575-0605-11ef-ab76-cc96e508c010', + formName: null, + createTime: 1714380614292, + processDefinition: { + id: 'invoice_apply_manage:8:665a8c40-44c9-11ef-9813-0242ac130002', + version: 8, + deploymentTime: 1721281726671, + suspensionState: 1 + } + } +] From ea02192b6473d550cafb3ccfd5b0b45368969030 Mon Sep 17 00:00:00 2001 From: GoldenZqqq <1361001127@qq.com> Date: Tue, 15 Oct 2024 08:39:11 +0800 Subject: [PATCH 007/126] chore --- src/views/bpm/model/index.vue | 399 ++++++++++++++++++++++++----- src/views/bpm/model/index_new.vue | 133 ++++++++++ src/views/bpm/model/index_old.vue | 404 ------------------------------ 3 files changed, 468 insertions(+), 468 deletions(-) create mode 100644 src/views/bpm/model/index_new.vue delete mode 100644 src/views/bpm/model/index_old.vue diff --git a/src/views/bpm/model/index.vue b/src/views/bpm/model/index.vue index 2f2929ad..4534ec61 100644 --- a/src/views/bpm/model/index.vue +++ b/src/views/bpm/model/index.vue @@ -1,69 +1,211 @@ diff --git a/src/views/bpm/model/index_new.vue b/src/views/bpm/model/index_new.vue new file mode 100644 index 00000000..2f2929ad --- /dev/null +++ b/src/views/bpm/model/index_new.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/views/bpm/model/index_old.vue b/src/views/bpm/model/index_old.vue deleted file mode 100644 index 4534ec61..00000000 --- a/src/views/bpm/model/index_old.vue +++ /dev/null @@ -1,404 +0,0 @@ - - - From a033706fb488540e4dc3042a94fdb6424d2f3077 Mon Sep 17 00:00:00 2001 From: GoldenZqqq <1361001127@qq.com> Date: Mon, 14 Oct 2024 15:17:05 +0800 Subject: [PATCH 008/126] =?UTF-8?q?feat:=20=E6=B5=81=E7=A8=8B=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=B8=8E=E6=96=87=E5=AD=97=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/model/CategoryDraggableModel.vue | 49 ++++++++++++------- src/views/bpm/model/index_new.vue | 8 +-- 2 files changed, 36 insertions(+), 21 deletions(-) diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index fa891e60..f118f9f7 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -9,7 +9,7 @@ >
-
+
@@ -96,20 +97,22 @@ @@ -384,6 +387,9 @@ onMounted(() => { diff --git a/src/views/bpm/model/index_new.vue b/src/views/bpm/model/index_new.vue index 2f2929ad..13cd765c 100644 --- a/src/views/bpm/model/index_new.vue +++ b/src/views/bpm/model/index_new.vue @@ -1,7 +1,7 @@ From 10e432243e937699efba719afac02f0b3a73719d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=AE=87=E5=BA=86?= Date: Tue, 15 Oct 2024 04:46:34 +0000 Subject: [PATCH 009/126] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BAID?= =?UTF-8?q?=E6=96=B9=E4=BE=BF=E6=9E=84=E9=80=A0=E9=93=BE=E6=8E=A5=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=80=80=E6=AC=BE=E7=8A=B6=E6=80=81=E5=88=97?= =?UTF-8?q?=E5=AE=BD=E6=98=BE=E7=A4=BA=E5=AE=8C=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨宇庆 --- src/views/mall/promotion/article/index.vue | 1 + src/views/pay/refund/index.vue | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/mall/promotion/article/index.vue b/src/views/mall/promotion/article/index.vue index 20ad4ce1..875168eb 100644 --- a/src/views/mall/promotion/article/index.vue +++ b/src/views/mall/promotion/article/index.vue @@ -80,6 +80,7 @@ + - + From 57820cb3e18de92358c3ea4b335c1a64dac9993e Mon Sep 17 00:00:00 2001 From: GoldenZqqq <1361001127@qq.com> Date: Tue, 15 Oct 2024 15:17:40 +0800 Subject: [PATCH 010/126] =?UTF-8?q?faet:=20=E5=88=86=E7=B1=BB=E4=B8=8B?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=95=B0=E6=8D=AE=E6=8B=96=E6=8B=BD=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=8A=9F=E8=83=BD=E5=AE=9E=E7=8E=B0=EF=BC=9B=E9=87=8D?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E5=88=86=E7=B1=BB=E5=BC=B9=E7=AA=97=E7=BB=98?= =?UTF-8?q?=E5=88=B6=EF=BC=9B=E5=88=A0=E9=99=A4=E5=88=86=E7=B1=BB=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E5=88=A4=E6=96=AD=E4=B8=8E=E6=8F=90=E7=A4=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/model/CategoryDraggableModel.vue | 118 +++++++++++++++--- src/views/bpm/model/index_new.vue | 17 ++- 2 files changed, 114 insertions(+), 21 deletions(-) diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index f118f9f7..2a5c5e14 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -9,16 +9,24 @@ >
-
+
- + From 2db1f726c3b9e38711ea48aa734b0e0fad2b62c0 Mon Sep 17 00:00:00 2001 From: GoldenZqqq <1361001127@qq.com> Date: Tue, 15 Oct 2024 16:29:45 +0800 Subject: [PATCH 011/126] =?UTF-8?q?feat:=20=E6=B5=81=E7=A8=8B=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=88=86=E7=B1=BB=E6=8E=92=E5=BA=8F=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/model/CategoryDraggableModel.vue | 10 ++++- src/views/bpm/model/index_new.vue | 42 +++++++++++++++++-- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index 2a5c5e14..51a53a07 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -36,6 +36,13 @@
@@ -267,7 +267,7 @@ const { t } = useI18n() // 国际化 const { push } = useRouter() // 路由 const userStore = useUserStoreWithOut() // 用户信息缓存 const isModelSorting = ref(false) // 是否正处于排序状态 -const tableData: any = ref([]) +const tableData: any = ref([]) // 模型列表 const originalData: any = ref([]) // 原始数据 const isExpand = ref(false) // 是否处于展开状态 @@ -403,22 +403,27 @@ const isManagerUser = (row: any) => { return row.managerUserIds && row.managerUserIds.includes(userId) } -/* 排序 */ -const handleSort = () => { +/** 处理模型的排序 **/ +const handleModelSort = () => { // 保存初始数据 originalData.value = cloneDeep(props.categoryInfo.modelList) isModelSorting.value = true initSort() } -const saveSort = () => { - // TODO 芋艿:这里需要一个保存分类下模型排序接口 +/** 处理模型的排序提交 */ +const handleModelSortSubmit = async () => { + // 保存排序 + const ids = tableData.value.map((item: any) => item.id) + await ModelApi.updateModelSortBatch(ids) // 刷新列表 - emit('success') isModelSorting.value = false + message.success('排序模型成功') + emit('success') } -const cancelSort = () => { +/** 处理模型的排序取消 */ +const handleModelSortCancel = () => { // 恢复初始数据 tableData.value = cloneDeep(originalData.value) isModelSorting.value = false diff --git a/src/views/bpm/model/index.vue b/src/views/bpm/model/index.vue index aad4d5c4..1ecdabee 100644 --- a/src/views/bpm/model/index.vue +++ b/src/views/bpm/model/index.vue @@ -188,7 +188,7 @@ const handleCategorySortCancel = () => { isCategorySorting.value = false } -/** 保存排序 */ +/** 分类排序的保存 */ const handleCategorySortSubmit = async () => { // 保存排序 const ids = categoryGroup.value.map((item: any) => item.id) From 71de0c3ecfd43e0a2c32ebc7a9d2ba4676753a55 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 2 Nov 2024 19:55:13 +0800 Subject: [PATCH 063/126] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91=E5=B7=A5=E4=BD=9C=E6=B5=81=EF=BC=9A1?= =?UTF-8?q?=EF=BC=89=E5=AE=8C=E5=96=84=E7=9B=B8=E5=85=B3=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=EF=BC=9B2=EF=BC=89=E8=A7=A3=E5=86=B3=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=AF=8F=E6=AC=A1=E6=93=8D=E4=BD=9C=E5=90=8E=EF=BC=8C=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E5=88=97=E8=A1=A8=E5=90=8E=EF=BC=8C=E9=87=8D=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=BB=9A=E5=8A=A8=E6=9D=A1?= =?UTF-8?q?=E7=9A=84=E4=BD=8D=E7=BD=AE=E4=B8=8D=E5=AF=B9=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 --- .../bpm/model/CategoryDraggableModel.vue | 40 +++++++++-------- src/views/bpm/model/index.vue | 45 +++++++------------ 2 files changed, 37 insertions(+), 48 deletions(-) diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index 7f67a516..35465935 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -1,5 +1,6 @@