From 465cd846772b99fc588ee786622efd39921c339f Mon Sep 17 00:00:00 2001 From: Zhufu <1176354795@qq.com> Date: Tue, 11 Jun 2024 14:17:34 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E3=80=90=E8=A1=A8=E5=8D=95=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E3=80=91=E8=A1=A8=E5=8D=95=E5=8F=91=E5=B8=83=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/demo/onlineform/formModule/modalDesign.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/demo/onlineform/formModule/modalDesign.vue b/src/views/demo/onlineform/formModule/modalDesign.vue index a40f485c..84222cde 100644 --- a/src/views/demo/onlineform/formModule/modalDesign.vue +++ b/src/views/demo/onlineform/formModule/modalDesign.vue @@ -225,6 +225,8 @@ arr.push(chil); }); }); + }else if(val.component){ + arr.push(val); } }); }); @@ -239,6 +241,8 @@ arr.push(chil); }); }); + }else if(item.component){ + arr.push(item) } }); formScheme.value.formInfo.schemas = arr; From 048fa956ecfa88428f5b1e4113390b52288c7d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=A6=8D?= <1455167345@qq.com> Date: Tue, 11 Jun 2024 14:21:21 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E5=8D=A1=E7=89=87=E7=BB=84=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormViewer/cardGourp.vue | 63 +++++++++++++++++-------- src/components/FormViewer/index.vue | 6 +++ 2 files changed, 49 insertions(+), 20 deletions(-) diff --git a/src/components/FormViewer/cardGourp.vue b/src/components/FormViewer/cardGourp.vue index bc6986a5..e81d0ef3 100644 --- a/src/components/FormViewer/cardGourp.vue +++ b/src/components/FormViewer/cardGourp.vue @@ -1,9 +1,14 @@ @@ -170,7 +195,8 @@ const formBoxRef = ref(); const emit = defineEmits(['closeModel']); const keyValue = ref(''); - + const rejectLabelCol = { span: 5 }; + const rejectWrapperCol = { span: 17 }; const flowWfDataStore = flowStore(); const prefixCls = 'preview-box'; const flowContent = ref(''); @@ -184,6 +210,8 @@ const processVisble = ref(false); const AsyncComponent = ref(); const pcForm = ref(); + const NextId = ref(''); + const rejectRelations = ref([]); const props = defineProps({ processId: String, taskId: String, @@ -250,6 +278,7 @@ const auditName = ref('audit'); const auditTitleVal = ref('审批栏'); const auditNameVal = ref('审批意见'); + const rejectOpen = ref(false); function changeActive(activeKey) { if (activeKey == 'flow') { processVisble.value = true; @@ -265,6 +294,7 @@ } async function getTaskInfo() { + rejectRelations.value = []; let query: any = { id: props.taskId, }; @@ -276,6 +306,14 @@ let content = JSON.parse(data.scheme.content); let wfData = content.wfData; console.log(wfData); + const finishedTaskSet = Array.from(new Set(data.flowViewer.finishedTaskSet)); + finishedTaskSet.forEach((item) => { + wfData.forEach((element) => { + if (item == element.id && element.id != data.task.unitId) { + rejectRelations.value.push(element); + } + }); + }); const auditNode = wfData.find((t) => t.id == data.task.unitId); console.log(auditNode); if (auditNode.auditTitle) { @@ -482,6 +520,7 @@ const currentNode: currentNodeObject = wfData.find((t) => t.id == designerData.task.unitId) || {}; designerData.currentNode = currentNode; + console.log('currentNode', currentNode); // 设置审核按钮 const btns: taskBtnsType[] = []; if (currentNode.type == 'bpmn:StartEvent') { @@ -561,7 +600,7 @@ const funName = btn.code; const res = await pcForm.value[funName](); console.log(res); - handleCreateFlow(processId); + handleSubmit(btn); } else { handleSubmit(btn); } @@ -594,8 +633,11 @@ des: formData.value.des, }); } else { + console.log(designerData.currentNode.rejectType); + console.log(btn.code); if (designerData.currentNode.rejectType == '2' && btn.code == 'disagree') { designerData.selectRejectNodeVisible = true; + rejectOpen.value = true; return; } @@ -608,7 +650,7 @@ // return; // } } - res = await auditFun(); + // res = await auditFun(); } break; } @@ -683,6 +725,21 @@ return createMessage.error('失败'); } } + // 驳回到指定节点 + async function rejectHandleOk() { + const data = await audit(props.taskId, { + code: designerData.currentBtn.code, + name: designerData.currentBtn.name, + des: formData.value.des, + NextId: NextId.value, + }); + if (data) { + closePage(); + return createMessage.success('成功'); + } else { + return createMessage.error('失败'); + } + } onBeforeMount(() => { getTaskInfo(); }); @@ -766,4 +823,7 @@ margin-right: 8px; } } + .l-from-body { + padding: 10px 30px; + } From c4b90b815631c25b80d671b7f131b27fb6a29673 Mon Sep 17 00:00:00 2001 From: Zhufu <1176354795@qq.com> Date: Tue, 11 Jun 2024 15:06:50 +0800 Subject: [PATCH 05/11] log del --- src/components/FormViewer/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FormViewer/index.vue b/src/components/FormViewer/index.vue index 989ac664..851f8a18 100644 --- a/src/components/FormViewer/index.vue +++ b/src/components/FormViewer/index.vue @@ -372,7 +372,7 @@ } const groupRef = ref(); async function getForm() { - console.log(groupRef.value.verify()); + // console.log(groupRef.value.verify()); try { let values = await validate(); for (const key in values) { From f1dffc33517465ef5d54e8b5fe2dd07c3b39bb92 Mon Sep 17 00:00:00 2001 From: Zhufu <1176354795@qq.com> Date: Tue, 11 Jun 2024 15:30:37 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E3=80=90=E8=A1=A8=E5=8D=95=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E3=80=91=E5=8D=A1=E7=89=87=E7=BB=84=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=EF=BC=8C=E8=A1=A8=E5=8D=95=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormViewer/cardGourp.vue | 8 ++++++++ src/views/demo/onlineform/formCall/CallModal.vue | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/components/FormViewer/cardGourp.vue b/src/components/FormViewer/cardGourp.vue index e81d0ef3..57c71588 100644 --- a/src/components/FormViewer/cardGourp.vue +++ b/src/components/FormViewer/cardGourp.vue @@ -26,6 +26,7 @@ :parentValue="props.parentValue" :formData="props.formData" v-if="childItem" + :callModal="props.callModal" /> @@ -52,6 +53,10 @@ type: Object, default: () => ({}), }, + callModal: { + type: Boolean, + default: () => (false), + }, }); const noTitleKey = ref(0); const formColumns = []; @@ -63,6 +68,9 @@ const nowTime = ref(dayjs().format('YYYY-MM-DD HH:mm:ss')); const userName = localStorage.getItem('fireUserLoginName'); const cardRef = ref(); + if(props.callModal){ + tableData.ifShow = true + } const [registerForm, { getFieldsValue, setFieldsValue, updateSchema, resetFields, validate }] = useForm({ labelWidth: 100, diff --git a/src/views/demo/onlineform/formCall/CallModal.vue b/src/views/demo/onlineform/formCall/CallModal.vue index 1497e85c..944d3291 100644 --- a/src/views/demo/onlineform/formCall/CallModal.vue +++ b/src/views/demo/onlineform/formCall/CallModal.vue @@ -25,6 +25,7 @@ :data="cardGroupData[index]" :formData="cardGourpFormData" :parentValue="cardGroupData[index].field" + :callModal="true" /> @@ -63,6 +64,7 @@ :data="cardGroupData[0]" :formData="cardGourpFormData" :parentValue="cardGroupData[0].field" + :callModal="true" />