(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e957c9dc"],{"03b8":function(t,e,i){"use strict";i("414f")},"414f":function(t,e,i){},"798c":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"participant-table"},[e("section",[e("div",{staticClass:"panel-header"},[e("span",[t._v(" "+t._s(t.$t("wfDesigner.itemConfig.participant.table.doneTable"))+" ")]),e("a-space",{directives:[{name:"show",rawName:"v-show",value:!t.disabled&&!t.isTodoShow,expression:"!disabled && !isTodoShow"}],attrs:{size:t.GLOBAL.spaceDefault}},[e("span",{staticClass:"plm-icon-btn",on:{click:function(e){return t.toggleTodo(!0)}}},[t._v(" "+t._s(t.$t("wfDesigner.itemConfig.participant.table.detail"))+" ")])])],1),e("ParticipantDone",{ref:"partiDoneRef",attrs:{disabled:t.disabled},on:{delParti:t.delParti}})],1),e("section",{directives:[{name:"show",rawName:"v-show",value:t.isTodoShow,expression:"isTodoShow"}]},[e("div",{staticClass:"panel-header"},[e("span",[t._v(" "+t._s(t.$t("wfDesigner.itemConfig.participant.table.todoTable"))+" ")]),e("a-space",{attrs:{size:t.GLOBAL.spaceDefault}},[e("span",{staticClass:"plm-icon-btn",on:{click:function(e){return t.toggleTodo(!1)}}},[t._v(" "+t._s(t.$t("wfDesigner.itemConfig.participant.table.fold"))+" ")])])],1),e("ParticipantTodo",{ref:"partiTodoRef",attrs:{todoMember:t.todoMember,todoInitor:t.todoInitor,todoNodes:t.todoNodes,todoLabel:t.todoLabel,namespace:t.namespace},on:{updateTodoMember:t.updateTodoMember,addParti:t.addParti}})],1)])},o=[],n=(i("0894"),i("7a19")),s=i("6dea"),r=i("4815"),d=i("811b"),p=i("6eae"),c=i("c976"),l={name:"ParticipantTable",mixins:[c["a"]],props:{disabled:{type:Boolean,default:!1},itemBaseInfo:{type:Object},namespace:String},components:{ParticipantTodo:d["default"],ParticipantDone:p["default"]},computed:{partiClassName(){return this.disabled?"plm-table-disabled-btn":"plm-table-btn"}},data(){return{isTodoShow:!1,todoLabel:[],todoMember:[],todoNodes:[],todoInitor:[]}},methods:{async init(t){let e=this.$refs.partiDoneRef;e&&(e.doneOptions.data=t);let i=t.map(t=>t.participant_id),a={};try{const t=await Object(n["d"])({id:this.currTempKey});let e=[],o={};if(t&&t.length>0&&(this.todoLabel=[],t.forEach(t=>{if("label"===t.type){let e={...t.label,participant_id:t.participant_id,typeName:Object(s["s"])().label,type:"label"};i.includes(e.participant_id)?a[e.participant_id]=e:this.todoLabel.push(e)}else e.push({...t.entity}),o[`${t.entity.internal_name}-${t.entity.object_id}`]=t.participant_id})),e.length>0){this.todoMember=[];let t={},n=[];e.length>0&&(t=await Object(r["b"])({keys:e,strategy:{}})),t.existence&&t.existence.length>0&&(n=n.concat(t.existence.map(t=>("resigned"===t.person_state&&(t.isResigned=!0),t)))),t.nonexistence_keys&&t.nonexistence_keys.length>0&&(n=n.concat(t.nonexistence_keys.map(t=>(t.nonExist=!0,t)))),n.length>0&&n.forEach(t=>{let e=`${t.internal_name}-${t.object_id}`,n={nonExist:t.nonExist,isResigned:t.isResigned,name:t.name,internal_name:t.internal_name,object_id:t.object_id,persons:"person"===t.internal_name?void 0:[],participant_id:o[e],typeName:Object(s["s"])()[t.internal_name],type:t.internal_name};i.includes(n.participant_id)?a[n.participant_id]=n:this.todoMember.push(n)})}}catch(d){console.info("获取模板参与者计算当前节点未参与者 e",d)}try{const t=await Object(n["e"])({id:this.itemBaseInfo.id});t&&(this.todoNodes=[],t.forEach(t=>{let e={name:t.name,process_name:t.process_name,participant_id:t.id,typeName:Object(s["s"])().activity,type:"activity"};i.includes(e.participant_id)?a[e.participant_id]=e:this.todoNodes.push(e)}))}catch(d){console.info("获取模板未参与列表中的节点 e",d)}let o={name:Object(s["s"])().initor,participant_id:"8c912ce7-d58a-481e-8887-eb5561079afa",typeName:Object(s["s"])().initor,type:"initor"};i.includes(o.participant_id)?a[o.participant_id]=o:this.todoInitor=[o],this.setTablePerformer(a)},setTablePerformer(t){let e=this.$refs.partiDoneRef;e&&(e.doneOptions.data=e.doneOptions.data.map(e=>Object.assign(e,t[e.participant_id])),this.setStoreParti(e));let i=this.$refs.partiTodoRef;i&&i.init(this.todoMember)},addParti(t){let e=this.$refs.partiDoneRef;e&&(t[0].allow=!0,t[0].allowOption=["allow"],t[0].isAllowed=this.$t("wfDesigner.configMapper.dynamic.true"),e.doneOptions.data.push(t[0]),this.setStoreParti(e))},delParti(t){let e=[];e="initor"===t[0].type?this.todoInitor:"activity"===t[0].type?this.todoNodes:"label"===t[0].type?this.todoLabel:this.todoMember,e.push(t[0]),this.setStoreParti()},setStoreParti(t){let e=t||this.$refs.partiDoneRef;e&&this.$store.commit("wf-designer/graph/SET_CURR_NODE_PARTI",{currNodeParti:e.doneOptions.data})},updateTodoMember(t){this.todoMember=t},toggleTodo(t){this.isTodoShow=t}}},b=l,h=(i("03b8"),i("2be6")),m=Object(h["a"])(b,a,o,!1,null,null,null);e["default"]=m.exports}}]);