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
7.4 KiB
2 lines
7.4 KiB
|
4 months ago
|
import{d as xe,y as Se,ax as S,r as c,gG as ve,es as ke,et as Q,z as Ce,a as _,f as B,e as l,b as s,q as N,n as Te,h as o,c as T,H as v,t as I,$ as Y,Y as K,gH as Ie,I as M,bg as Pe,F as Ee,g as Ve,gI as X,gJ as Le,gK as ze,gL as q,gM as Ae,gN as Z,gO as De,aF as Oe,ab as Ue,am as Be,al as Ne,ai as Ke,aQ as Me,bI as qe,aw as Re,aj as je,av as He,aT as Je,S as We,b5 as $e,ac as Ge,at as Qe,gP as Ye,_ as Xe}from"./index-e450010e.js";const Ze=["id"],et={class:"common-layout"},tt=["onClick"],ee="https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png",ot=xe({__name:"simulateTaskFlow",props:{simuIsTrue:{type:Boolean,default:!0},formVersion:{type:String,default:""}},emits:["update:simuIsTrue"],setup(te,{emit:oe}){const k=te,R=oe,P=Se({get:()=>(ie(),k.simuIsTrue),set:t=>{R("update:simuIsTrue",t)}}),h=S({type:1,formData:{list:[],form:{},config:{},powerstr:{}},dict:{},formId:k.versionid,id:0,loading:!0}),E=S([]),w=S([]),V=c(!1),F=c(!1),y=c(),L=c(0),z=c(1),A=c(""),p=S({id:"0",isRun:1,userKey:""}),ae=t=>(t.formId=k.versionid,t.id="",t),le=(t,e)=>{},se=()=>{R("update:simuIsTrue",!1)},ne=(t,e,u,b)=>{let d=!1;if(X.indexOf(u)===-1){let i=!0;w.forEach(n=>{n.factorid==t&&(i=!1,n.type=3,u=="checkbox"?(n.isCheckbox=!0,n.answers=e.map(String)):(n.isCheckbox=!1,n.oneanswer=e.toString()),X.indexOf(u)===-1&&(d=!0))}),i&&(u=="checkbox"?w.push({factorid:t,type:3,isCheckbox:!0,answers:e.map(String)}):w.push({factorid:t,type:3,isCheckbox:!1,oneanswer:e.toString()}),d=!0)}if(Le.indexOf(u)>-1||ze.indexOf(u)>-1||u=="input"){let i=!0;if(w.forEach(n=>{if(n.type==2&&(i=!1,n.customFields&&n.customFields.length>0)){let m=!0;if(n.customFields.forEach(f=>{f.wordfield==t&&(m=!1,d=!0,q.indexOf(b)===-1?f.leftval=e.toString():Array.isArray(e)&&e.length>=2&&(f.leftval=e[0].toString(),f.rightval=e[e.length-1].toString()))}),m){if(d=!0,q.indexOf(b)===-1){let f={wordfield:t,optType:"1",leftval:e.toString()};n.customFields.push(f)}else if(Array.isArray(e)&&e.length>=2){let f={wordfield:t,optType:"6",leftval:e[0].toString(),leftoptType:"3",rightoptType:"3",rightval:e[e.length-1].toString()};n.customFields.push(f)}}}}),i){if(d=!0,q.indexOf(b)===-1){let m={factorid:"customFields",type:2,isCheckbox:!1,customFields:[{wordfield:t,optType:"1",leftval:e.toString()}]};w.push(m)}else if(Array.isArray(e)&&e.length>=2){let m={factorid:"customFields",type:2,isCheckbox:!1,customFields:[{wordfield:t,optType:"6",leftval:e[0].toString(),leftoptType:"3",rightoptType:"3",rightval:e[e.length-1].toString()}]};w.push(m)}}}if(Ae.indexOf(u)>-1){d=!0;let i=!0;E.forEach(n=>{n.factorid==t&&(i=!1,n.userList=e)}),i&&E.push({factorid:t,userList:e})}console.log("改变表单值--flowFactor--->",d),d&&(F.value=!0,p.conditionList=w,p.nodelPeople=E,p.oldFlow=y,Z(p).then(i=>{y.value=i.data.flowList,L.value=i.data.nextStep,z.value=i.data.Step,A.value=i.data.nodeKey,F.value=!1}))},re=(t,e)=>{},j=c(!1),ie=()=>{V.value=!0,F.value=!0,ve({id:k.formVersion.toString()}).then(({data:t})=>{t.tableFormPage.flowIsOpen==1&&t.tableFormPage.flowkeystr!="0"?j.value=!0:j.value=!1,p.id=t.tableFormPage.flowkeystr,console.log("表单数据--->1",t.flowPage.flowList),y.value=t.flowPage.flowList,h.id=k.versionid,h.formData=ke(t.tableFormPage.mastesform),h.formData.config.hideField=[],h.dict=Q(t.tableFormPage.dict),h.formData.powerstr=Q(t.tableFormPage.powerstr)}).finally(()=>{V.value=!1,F.value=!1})},H=c([]),J=c(),C=c(!1),r=S({orgId:309,title:"",page:1,pageSize:8,total:50}),ue={children:"children",label:"name"},g=S({name:"",num:"",userKey:"",icon:""}),D=c(!1),O=()=>{D.value=!0;const t={pageInfo:{pageIndex:r.page,pageSize:r.pageSize},name:r.title,department:r.orgId};Ye(t).then(({data:e})=>{J.value=e.list,r.total=e.total}).finally(()=>{D.value=!1})},ce=()=>{r.page=1,O()},de=()=>{C.value=!0,pe(),O()},W=()=>{C.value=!1},fe=t=>{r.page=t,O()},pe=()=>{De({id:309}).then(({data:t})=>{H.value=t.list}).finally(()=>{})},ge=t=>{console.log("我选中的人----------》",t),p.isRun=2,p.userKey=t.userkey,g.name=t.name,g.num=t.number,g.userKey=t.userkey,g.icon=t.icon?t.icon:t.icon_photo!=null?t.icon_photo:ee,Z(p).then(e=>{y.
|