25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
5.4KB

  1. var L=Object.defineProperty,B=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var J=(l,d,a)=>d in l?L(l,d,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[d]=a,R=(l,d)=>{for(var a in d||(d={}))F.call(d,a)&&J(l,a,d[a]);if(E)for(var a of E(d))z.call(d,a)&&J(l,a,d[a]);return l},T=(l,d)=>B(l,M(d));var D=(l,d,a)=>new Promise((v,_)=>{var w=h=>{try{b(a.next(h))}catch(g){_(g)}},u=h=>{try{b(a.throw(h))}catch(g){_(g)}},b=h=>h.done?v(h.value):Promise.resolve(h.value).then(w,u);b((a=a.apply(l,d)).next())});import U from"./childFlow.33775aa3.js";import{p as G}from"./playCircle.1a554fd4.js";import H from"./approvalDialog.25d6342f.js";import{g as K,h as Q}from"./flowConfiguration.65ccb757.js";import{_ as W,d as X,A as Y,z as Z,b as ee,r as N,o as te,ap as S,c as y,e as se,f as ne,h as p,i as f,g as c,t as oe,u as P,j as m,F as ae,N as re,q as le,s as de,x as ie}from"./index.3fb2f955.js";import{p as ce}from"./flowPathConfiguration.5f31c0fc.js";import"./index.08840ed2.js";import"./unitManage.fc54fd4b.js";const pe=l=>(le("data-v-76f7f8eb"),l=l(),de(),l),fe={class:"flex justify-between items-center"},ue={class:"overflow-x-auto flex"},he={class:"node flex flex-1 flex-col items-center justify-center"},_e={class:"start_box node_box text-white flex items-center justify-center"},me=["src"],ve={class:"flex flex-col"},be=pe(()=>c("div",{class:"end_box node_box text-white flex items-center justify-center"}," \u6D41\u7A0B\u7ED3\u675F ",-1)),ge=X({name:"configEdit"}),ye=Object.assign(ge,{setup(l){const{proxy:d}=ie(),a=Y(),v=Z(),_=({key:t,type:e,item:s})=>{let n={};n={name:e==="APPROVAL"?"\u5BA1\u6279":e==="CONSTRCTION"?"\u5EFA\u8BBE\u7533\u62A5\u5BA1\u6279":e==="CC"?"\u6284\u9001":e==="SEAL"?"\u76D6\u7AE0":"",type:e,props:void 0,id:""},t===-1?x.value.splice(0,0,n):s.splice(t+1,0,n)},w=(t,e,s,n)=>D(this,null,function*(){e.splice(t,1)}),u=ee({visible:!1,data:{name:void 0}}),b=({key:t,item:e})=>{u.visible=!0,u.data=e[t],u.orgCode=v.query.orgCode||""},h=t=>{u.visible=!1},g=t=>{re(()=>{Object.entries(t).forEach(e=>{u.data[e[0]]=e[1]})})},I=N(),k=N(),x=N([]),A=N({}),V=()=>D(this,null,function*(){const t=yield ce({processDefId:v.query.processDefId});I.value=t.data.processDefId,k.value=t.data.processDefName,A.value=t.data;const e={children:JSON.parse(t.data.process)};x.value=O([],e,!0)}),O=(t,e,s)=>{if(e.branchs){const n=[];e.branchs.forEach(o=>{let i={};if(i={name:o.name,type:o.type,props:o.props,id:s?o.id:void 0},o.children&&JSON.stringify(o.children)!=="{}"){const r=[];o.children.branchs||r.push({name:o.children.name,type:o.children.type,props:o.children.props,id:s?o.children.id:void 0}),O(r,o.children,s),i.children=r}else i.children=[];n.push(i)}),t.push({type:"CONDITIONS",props:{},branchs:n})}return e.children&&JSON.stringify(e.children)!=="{}"&&(e.children.branchs||t.push({name:e.children.name,type:e.children.type,props:e.children.props,id:s?e.children.id:void 0}),O(t,e.children,s)),t},j=()=>{const t=[],e="0123456789abcdef";for(let n=0;n<36;n++)t[n]=e.substr(Math.floor(Math.random()*16),1);return t[14]="4",t[19]=e.substr(t[19]&3|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")},$=(t,e)=>(t=t.reverse(),t.reduce((s,n,o)=>{const i=n.id||j();return e&&o===t.length-1&&(n.parent=e.id),n.branchs?(n.branchs.forEach(r=>{r.parentId=i||null,r.id=r.id||j(),r.children&&r.children.length?r.children=$(r.children,r):r.children&&!r.children.length&&delete r.children}),o?(s.parentId=i||null,{type:"route",id:i,children:s}):(n.id=i,n)):o?(s.parentId=i||null,n.id=i,n.children=s,n):(n.id=i,n)},null)),q=()=>D(this,null,function*(){let t={};const e=JSON.parse(JSON.stringify(x.value));t=t.children=JSON.parse(JSON.stringify($(e)));const s=T(R({},A.value),{process:t});delete s.created,delete s.sort,delete s.updated,delete s.version,yield K(s),yield Q(s),d.$message.success("\u53D1\u5E03\u6210\u529F")});return te(()=>{V(),I.value=v.query.processDefId}),S("showApprovalDialog",b),S("addNode",_),S("removeNode",w),(t,e)=>{const s=y("el-button"),n=y("Plus"),o=y("el-icon"),i=y("el-popover"),r=y("el-card");return se(),ne(ae,null,[p(r,{shadow:"never"},{header:f(()=>[c("div",fe,[c("span",null,oe(k.value),1),c("div",null,[p(s,{onClick:e[0]||(e[0]=C=>P(a).go(-1))},{default:f(()=>[m("\u8FD4\u56DE")]),_:1}),p(s,{type:"primary",onClick:q},{default:f(()=>[m("\u53D1\u5E03")]),_:1})])])]),default:f(()=>[c("div",ue,[c("div",he,[c("div",_e,[m(" \u5F00\u59CB "),c("img",{src:P(G)},null,8,me)]),p(i,{placement:"right",width:100,trigger:"hover"},{reference:f(()=>[p(o,{class:"add_icon mt-20 mb-20 cursor-pointer"},{default:f(()=>[p(n)]),_:1})]),default:f(()=>[c("div",ve,[c("p",null,[p(s,{class:"mb-8 w-full",onClick:e[1]||(e[1]=C=>_({key:-1,type:"APPROVAL"}))},{default:f(()=>[m(" \u5BA1\u6279\u4EBA ")]),_:1})]),c("p",null,[p(s,{class:"ml-1 mb-8 w-full",onClick:e[2]||(e[2]=C=>_({key:-1,type:"SEAL"}))},{default:f(()=>[m(" \u76D6\u7AE0\u4EBA ")]),_:1})]),c("p",null,[p(s,{class:"ml-1 mb-8 w-full",onClick:e[3]||(e[3]=C=>_({key:-1,type:"CC"}))},{default:f(()=>[m(" \u6284\u9001\u4EBA ")]),_:1})]),c("p",null,[p(s,{class:"mb-8 w-full",onClick:e[4]||(e[4]=C=>_({key:-1,type:"CONSTRCTION"}))},{default:f(()=>[m(" \u5EFA\u8BBE\u5BA1\u6279\u4EBA ")]),_:1})])])]),_:1}),p(U,{"node-data":x.value},null,8,["node-data"]),be])])]),_:1}),p(H,{visible:u.visible,data:u.data,"org-code":u.orgCode,onClose:h,"onUpdate:data":g},null,8,["visible","data","org-code"])],64)}}}),Ae=W(ye,[["__scopeId","data-v-76f7f8eb"]]);export{Ae as default};