(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-90d93102"],{"4dcb":function(e,t,n){},b5c4:function(e,t,n){"use strict";var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"wfd-unit-select"},[t("PersonSelect",{ref:"unitSelectRef",attrs:{orgType:"empty",roleType:"empty",checkedData:e.cacheUnit,disabledData:e.cacheUnit}})],1)},i=[],c=(n("28eb"),n("7a19")),s=n("9d03"),r={name:"UnitSelect",props:{cacheUnit:{type:Object,default:()=>({person:[],role:[],org:[]})},tempKey:{type:String},type:{type:String}},methods:{async sureSelect(){const e=this.$refs.unitSelectRef;if(e){this.$emit("changeLoading",!0);try{let t=e.confirm(),n=[],a=[],i=[],r=[];const{person:p=[],role:o=[],org:l=[]}=this.cacheUnit;if(n=p.map(e=>e.internal_name+e.object_id).concat(o.map(e=>e.internal_name+e.object_id)).concat(l.map(e=>e.internal_name+e.object_id)),a=t.person.concat(t.role).concat(t.org),i=a.filter(e=>(e.participant_id=e.participant_id?e.participant_id:Object(s["d"])(),!n.includes(e.internal_name+e.object_id))),r=i.map(e=>{let t={participant_id:e.participant_id,type:e.internal_name};return["person","role","department"].includes(e.internal_name)?(t.type="entity",t.entity={internal_name:e.internal_name,object_id:e.object_id}):"label"==e.internal_name&&(t.label={name:e.name,constraint:e.constraint,max_size:e.max_size?Number(e.max_size):null,min_size:e.min_size?Number(e.min_size):null,description:e.description}),t}),"initor"===this.type){let e=await Object(c["d"])({id:this.tempKey}),t=e?e.reduce((e,t)=>{if(!t.label&&t.entity){const n=`${t.entity.internal_name}-${t.entity.object_id}`;e[n]=t}return e},{}):{};r=r.filter(e=>{const n=`${e.entity.internal_name}-${e.entity.object_id}`;return!t[n]}),i.forEach(e=>{const n=`${e.internal_name}-${e.object_id}`;t[n]&&(e.participant_id=t[n].participant_id)})}await Object(c["a"])(this.tempKey,r),this.$emit("sureSelect",i)}catch(t){console.info("创建参与者的请求参数 e",t)}this.$emit("changeLoading",!1)}},close(){this.$emit("closeSelect")}}},p=r,o=(n("e901"),n("2be6")),l=Object(o["a"])(p,a,i,!1,null,null,null);t["a"]=l.exports},c976:function(e,t,n){"use strict";var a=n("9ce4"),i=n("52a9");const c={data(){return{spaceState:{}}},computed:{...Object(a["d"])({currTempKey(){return this.spaceState.currTempKey},currProcKey(){return this.spaceState.currProcKey},templateMap(){return this.spaceState.templateMap},graph(){return this.spaceState.graph}})},methods:{...Object(a["c"])({SET_CURR_TEMP_KEY(e,t){const n=this.namespace?this.namespace:"wf-designer/graph";e(n+"/SET_CURR_TEMP_KEY",t)},SET_TEMPLATE_MAP(e,t){const n=this.namespace?this.namespace:"wf-designer/graph";e(n+"/SET_TEMPLATE_MAP",t)},SET_CURR_PROC_KEY(e,t){const n=this.namespace?this.namespace:"wf-designer/graph";e(n+"/SET_CURR_PROC_KEY",t)},SET_GRAPH(e,t){const n=this.namespace?this.namespace:"wf-designer/graph";e(n+"/SET_GRAPH",t)}})},watch:{namespace:{handler:function(){this.namespace?this.spaceState=i["a"].state[this.namespace]:this.spaceState=i["a"].state["wf-designer/graph"]},immediate:!0}}};t["a"]=c},e901:function(e,t,n){"use strict";n("4dcb")}}]);