From 1c7bcad4d5914a769595b94411ffc0efd3d2c16a Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Fri, 25 Aug 2023 19:58:36 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/demo/leave/index.vue | 8 +- src/views/workflow/model/index.vue | 72 +++++------ .../workflow/processDefinition/index.vue | 117 +++++++++--------- src/views/workflow/processInstance/index.vue | 93 ++++++-------- src/views/workflow/task/allTaskWaiting.vue | 34 ++--- src/views/workflow/task/index.vue | 48 +++---- src/views/workflow/task/myDocument.vue | 57 ++++----- 7 files changed, 196 insertions(+), 233 deletions(-) diff --git a/src/views/demo/leave/index.vue b/src/views/demo/leave/index.vue index 67aef7f..45abafb 100644 --- a/src/views/demo/leave/index.vue +++ b/src/views/demo/leave/index.vue @@ -101,8 +101,6 @@ import { listLeave, getLeave, delLeave, addLeave, updateLeave } from '@/api/demo/leave'; import { cancelProcessApply } from '@/api/workflow/processInstance'; import { LeaveVO, LeaveQuery, LeaveForm } from '@/api/demo/leave/types'; -import { ComponentInternalInstance } from 'vue'; -import { ElForm } from 'element-plus'; import { startWorkFlow } from '@/api/workflow/task'; import SubmitVerify from '@/components/Process/submitVerify.vue'; import ApprovalRecord from '@/components/Process/approvalRecord.vue'; @@ -266,13 +264,13 @@ const handleExport = () => { //提交申请 const handleStartWorkFlow = async (data: any) => { - submitFormData.value.processKey = 'test'; + submitFormData.value.processKey = 'test2'; submitFormData.value.businessKey = data.id; submitFormData.value.variables = { leaveDays: data.leaveDays, userList: [1] }; - startWorkFlow(submitFormData.value).then((response) => { + startWorkFlow(submitFormData.value).then((response:any) => { if (submitVerifyRef.value) { submitVerifyRef.value.openDialog(true, response.data.taskId); } @@ -285,7 +283,7 @@ const handleApprovalRecord = (id: string) => { } }; //提交回调 -const submitCallback = async (data: any) => { +const submitCallback = async () => { dialog.visible = false; handleQuery(); }; diff --git a/src/views/workflow/model/index.vue b/src/views/workflow/model/index.vue index 888416e..2fe3102 100644 --- a/src/views/workflow/model/index.vue +++ b/src/views/workflow/model/index.vue @@ -5,22 +5,14 @@ - + - +
@@ -66,30 +58,29 @@ - + @@ -106,14 +97,9 @@ - + @@ -197,23 +183,23 @@ onMounted(() => { /** 节点单击事件 */ const handleNodeClick = (data: ModelForm) => { - queryParams.value.categoryCode = data.categoryCode; - if(data.categoryCode === 'ALL'){ - queryParams.value.categoryCode ='' - } - handleQuery() + queryParams.value.categoryCode = data.categoryCode; + if (data.categoryCode === 'ALL') { + queryParams.value.categoryCode = '' + } + handleQuery() } /** 通过条件过滤节点 */ const filterNode = (value: string, data: any) => { - if (!value) return true - return data.categoryName.indexOf(value) !== -1 + if (!value) return true + return data.categoryName.indexOf(value) !== -1 } /** 根据名称筛选部门树 */ watchEffect( - () => {categoryTreeRef.value.filter(categoryName.value);}, - { - flush: 'post' // watchEffect会在DOM挂载或者更新之前就会触发,此属性控制在DOM元素更新后运行 - } + () => { categoryTreeRef.value.filter(categoryName.value); }, + { + flush: 'post' // watchEffect会在DOM挂载或者更新之前就会触发,此属性控制在DOM元素更新后运行 + } ); /** 搜索按钮操作 */ diff --git a/src/views/workflow/processDefinition/index.vue b/src/views/workflow/processDefinition/index.vue index 0f008f1..f82df00 100644 --- a/src/views/workflow/processDefinition/index.vue +++ b/src/views/workflow/processDefinition/index.vue @@ -5,22 +5,14 @@ - + - +
@@ -38,7 +30,8 @@
- +
部署流程文件 @@ -61,41 +54,50 @@ - + - + - + - + - + - +
点击上传,选择BPMN流程文件
仅支持 .zip、.bpmn20.xml、bpmn 格式文件
@@ -127,7 +125,8 @@
- + @@ -141,33 +140,37 @@ {{ scope.row.resourceName }} - + - + @@ -303,12 +306,12 @@ const getList = () => { }); }; //获取历史流程定义 -const getProcessDefinitionHitoryList = (id:string,key:string) => { +const getProcessDefinitionHitoryList = (id: string, key: string) => { processDefinitionDialog.visible = true loading.value = true; getProcessDefinitionListByKey(key).then((resp) => { - if(resp.data && resp.data.length > 0){ - processDefinitionHistoryList.value = resp.data.filter((item:any)=>item.id !== id); + if (resp.data && resp.data.length > 0) { + processDefinitionHistoryList.value = resp.data.filter((item: any) => item.id !== id); } loading.value = false; }); @@ -316,15 +319,15 @@ const getProcessDefinitionHitoryList = (id:string,key:string) => { //预览图片 const clickPreviewImg = (id: string) => { - loading.value = true; - processDefinitionImage(id).then((resp) => { - if (previewRef.value) { - url.value = []; - url.value.push('data:image/png;base64,' + resp.data); - loading.value = false; - previewRef.value.openDialog(url, 'png'); - } - }) + loading.value = true; + processDefinitionImage(id).then((resp) => { + if (previewRef.value) { + url.value = []; + url.value.push('data:image/png;base64,' + resp.data); + loading.value = false; + previewRef.value.openDialog(url, 'png'); + } + }) }; //预览xml @@ -332,10 +335,10 @@ const clickPreviewXML = (id: string) => { loading.value = true; processDefinitionXml(id).then((response) => { if (previewRef.value) { - url.value = []; - url.value = response.data.xml; - loading.value = false; - previewRef.value.openDialog(url, 'xml'); + url.value = []; + url.value = response.data.xml; + loading.value = false; + previewRef.value.openDialog(url, 'xml'); } }); }; diff --git a/src/views/workflow/processInstance/index.vue b/src/views/workflow/processInstance/index.vue index fde3d57..981eae5 100644 --- a/src/views/workflow/processInstance/index.vue +++ b/src/views/workflow/processInstance/index.vue @@ -5,22 +5,14 @@ - + - +
@@ -32,7 +24,8 @@
- +
@@ -77,30 +70,27 @@ - + - + - + @@ -138,14 +124,15 @@ - + @@ -230,23 +217,23 @@ onMounted(() => { /** 节点单击事件 */ const handleNodeClick = (data: CategoryVO) => { - queryParams.value.categoryCode = data.categoryCode; - if(data.categoryCode === 'ALL'){ - queryParams.value.categoryCode ='' - } - handleQuery() + queryParams.value.categoryCode = data.categoryCode; + if (data.categoryCode === 'ALL') { + queryParams.value.categoryCode = '' + } + handleQuery() } /** 通过条件过滤节点 */ const filterNode = (value: string, data: any) => { - if (!value) return true - return data.categoryName.indexOf(value) !== -1 + if (!value) return true + return data.categoryName.indexOf(value) !== -1 } /** 根据名称筛选部门树 */ watchEffect( - () => {categoryTreeRef.value.filter(categoryName.value);}, - { - flush: 'post' // watchEffect会在DOM挂载或者更新之前就会触发,此属性控制在DOM元素更新后运行 - } + () => { categoryTreeRef.value.filter(categoryName.value); }, + { + flush: 'post' // watchEffect会在DOM挂载或者更新之前就会触发,此属性控制在DOM元素更新后运行 + } ); /** 查询流程分类下拉树结构 */ @@ -345,22 +332,22 @@ const cancelPopover = async (index: any) => { (proxy?.$refs[`popoverRef${index}`] as any).hide(); //关闭弹窗 }; //获取流程定义 -const getProcessDefinitionHitoryList = (id:string,key:string) => { +const getProcessDefinitionHitoryList = (id: string, key: string) => { processDefinitionDialog.visible = true processDefinitionId.value = id loading.value = true; getProcessDefinitionListByKey(key).then((resp) => { - if(resp.data && resp.data.length > 0){ - processDefinitionHistoryList.value = resp.data.filter((item:any)=>item.id !== id); + if (resp.data && resp.data.length > 0) { + processDefinitionHistoryList.value = resp.data.filter((item: any) => item.id !== id); } loading.value = false; }); }; //切换流程版本 -const handleChange = async (id:string) => { +const handleChange = async (id: string) => { await proxy?.$modal.confirm('是否确认切换?'); loading.value = true; - migrationProcessDefinition(processDefinitionId.value,id).then((resp) => { + migrationProcessDefinition(processDefinitionId.value, id).then((resp) => { proxy?.$modal.msgSuccess('操作成功'); getProcessInstanceRunningList(); processDefinitionDialog.visible = false diff --git a/src/views/workflow/task/allTaskWaiting.vue b/src/views/workflow/task/allTaskWaiting.vue index 99434b9..0bada42 100644 --- a/src/views/workflow/task/allTaskWaiting.vue +++ b/src/views/workflow/task/allTaskWaiting.vue @@ -1,6 +1,7 @@