You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
8.9 KiB
2 lines
8.9 KiB
|
4 months ago
|
import{d as De,y as se,r as i,ax as he,w as Se,G as Ve,z as K,a as c,f as A,h as l,c as b,b as a,e as t,q as n,H as p,$ as P,I as L,F as ze,g as Pe,t as ae,n as ne,O as je,ae as re,a7 as U,aF as Te,ak as Ne,bA as Oe,bB as Be,ab as We,aw as Ke,av as Le,aG as Ue,fK as Me,p as Re,m as $e,_ as Ge}from"./index-e450010e.js";import{F as qe}from"./3-23bf8718.js";import{_ as Ae,a as He,b as Je,c as Qe}from"./conditionDrawer.vue_vue_type_style_index_0_lang-57154b88.js";import{_ as Xe}from"./copyerDrawer-4006f251.js";import{u as Ye,_ as Ze}from"./nodeWrap-ecd3ef30.js";import{k as eo,o as oo,g as lo,b as to,c as so,s as ao,e as no,a as ro,i as io}from"./index-fc6972c3.js";import"./employeesDialog.vue_vue_type_script_setup_true_lang-a1a5351e.js";import"./index-caeb545b.js";import"./index-a04a5857.js";/* empty css */import"./v4-4a60fe23.js";const M=C=>(Re("data-v-2e451306"),C=C(),$e(),C),uo={class:"design_flow_work"},fo={class:"table_box"},co={class:"table_td_title"},mo={class:"table_td_info"},vo={class:"tabs_box"},_o={class:"my-label"},po={class:"but_box"},wo={class:"dingflow-design",style:{top:"40px"}},go={class:"zoom"},yo=M(()=>n("div",{class:"end-node"},[n("div",{class:"end-node-circle"}),n("div",{class:"end-node-text"},"流程结束2")],-1)),ko={key:1,class:"flow_work_begin"},Fo=M(()=>n("br",null,null,-1)),bo=M(()=>n("br",null,null,-1)),Co=M(()=>n("br",null,null,-1)),xo=De({__name:"workFlow",props:{formKey:{type:String,default:""},formVersion:{type:String,default:""},state:{type:Object,default(){return{}}}},emits:["update:state","update:formKey","update:formVersion","judgeFlowIsEdit","runNextWindows","closeFormPage"],setup(C,{emit:ie}){const H=C,r=ie,h=se({get(){return H.state},set(e){r("update:state",e)}}),m=se({get(){return H.formKey},set(e){r("update:formKey",e)}});let{setTableId:J,setIsTried:T}=Ye();const x=i(!1),w=i(!1),O=i(!1),g=he([]),y=i("1"),S=i(),j=i(""),R=i(!0),B=i(!1);let E=i(100),u=i({}),k=i([]),v=i({}),W=i(0),Q=i({}),_=i([]),V=i(!1),X=!0;const ue=()=>{m.value==""?(x.value=!1,re.alert("您还未设置表单!请先设置完表单后,在创建流程!","温馨提示!",{confirmButtonText:"确定",callback:e=>{r("runNextWindows",1)}})):(Y(1),N(),x.value=!0,r("judgeFlowIsEdit",!0)),r("judgeFlowIsEdit",!0)},Y=e=>{oo({id:m.value.toString(),status:e})},Z=async()=>{let{data:e}=await io({name:h.value.formData.form.formName});v.value=e;let{nodeConfig:o,flowPermission:f,directorMaxLevel:F,workFlowDef:d,tableId:I}=e;v.value.workFlowDef.formKey=m.value,u.value=o,k.value=f,W=F,Q.value=d,J(I)},ee=e=>{if(e==1){if(E.value==50)return;E.value-=10}else{if(E.value==300)return;E.value+=10}},N=()=>{lo({id:m.value.toString()}).then(({data:e})=>{g.splice(0,g.length),e&&(e.length>0?(e.forEach(o=>{o.state==1&&(j.value=o.id,S.value=o,y.value=o.id),g.push({id:o.id,key:o.key,state:o.state,version:o.version})}),g.length>1?B.value=!0:B.value=!1,(S.value==""||S.value==null)&&(S.value=g[0],y.value=g[0].id),w.value=!0):w.value=!1)}).finally(()=>{w.value==!0?oe():G(1),$()})},$=()=>{S.value.id==j.value?O.value=!0:O.value=!1},oe=()=>{to({id:y.value.toString()}).then(e=>{e.code==0?(v.value=e.data,v.value.workFlowDef.formKey=m.value,u.value=e.data.nodeConfig,k.value=e.data.flowPermission,W=e.data.directorMaxLevel,Q.value=e.data.workFlowDef,J(e.data.tableId),x.value=!0):G(1)})},G=e=>{e==1?(Z(),T(!1),_.value=[]):re.confirm("确定要清空画布?").then(()=>{Z(),T(!1),_.value=[]}),S.value=""},z=({childNode:e})=>{if(e){let{type:f,error:F,nodeName:d,conditionNodes:I}=e;if(f==1||f==2||f==3)F&&_.value.push({name:d,type:["","审核人","抄送人","执行人"][f]}),z(e);else if(f==4)z(e);else if(f==5){z(e);for(var o=0;o<I.length;o++)I[o].error&&_.value.push({name:I[o].nodeName,type:"条件"}),z(I[o])}}else e=null},fe=e=>{y.value=e,oe(),$()},le=e=>{let o={id:y.value.toString(),status:e};e==1&&(j.value=y.value),so(o).then(f=>{U.success(f.msg),g.length>0&&g.forEach(F=>{F.id==y.value&&(S.value=F)})}).finally(()=>{$()})},de=async()=>{if(T(!0),_.value=[],z(u.value),_.value.length!=0){V.value=!0;return}v.value.flowPermission=k.value,ao(v.va
|