(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21350b"],{abc7:function(n,t,e){"use strict";e.r(t);var o=function(){var n=this,t=n._self._c;return t("div",[t("a-form-model",{attrs:{"label-col":{span:3},"wrapper-col":{span:21},model:n.conditionInfo}},[t("a-form-model-item",{attrs:{label:n.$t("wfDesigner.itemConfig.condition.transType")}},[t("a-select",{attrs:{"allow-clear":"",options:n.transTypeOpts,disabled:n.disabled},model:{value:n.conditionInfo.transfer_type,callback:function(t){n.$set(n.conditionInfo,"transfer_type",t)},expression:"conditionInfo.transfer_type"}})],1),t("a-form-model-item",{attrs:{label:n.$t("wfDesigner.itemConfig.condition.condType")}},[t("a-radio-group",{attrs:{disabled:n.disabled||n.isDefault,"allow-clear":"",options:n.condTypeOpts},model:{value:n.conditionInfo.condition_type,callback:function(t){n.$set(n.conditionInfo,"condition_type",t)},expression:"conditionInfo.condition_type"}})],1),t("a-form-model-item",{attrs:{label:n.$t("wfDesigner.itemConfig.condition.expression")}},[t("a-input",{attrs:{maxLength:n.GLOBAL.inputMaxLen,"allow-clear":"",disabled:n.disabled||n.isDefault||n.isNoCond},model:{value:n.conditionInfo.expression,callback:function(t){n.$set(n.conditionInfo,"expression",t)},expression:"conditionInfo.expression"}})],1),t("event-set",{directives:[{name:"show",rawName:"v-show",value:2===n.conditionInfo.condition_type,expression:"conditionInfo.condition_type === 2"}],ref:"transEventRef",attrs:{disable:n.disabled||n.isDefault,namespace:n.namespace,type:n.conditionInfo.type}})],1)],1)},i=[],a=e("6dea"),s=e("a780"),r={name:"Condition",props:["info","readonly","disabled","namespace"],components:{EventSet:s["default"]},computed:{isDefault:function(){return"OTHERWISE"===this.conditionInfo.transfer_type||"DEFAULTEXCEPTION"===this.conditionInfo.transfer_type},isNoCond:function(){return 0===this.conditionInfo.condition_type}},data(){return{transTypeOpts:Object(a["y"])(),condTypeOpts:Object(a["b"])(),conditionInfo:{transfer_type:"",condition_type:"",expression:"",type:"",program:[]}}},watch:{"$store.state.app.lang":{handler(){this.transTypeOpts=Object(a["y"])(),this.condTypeOpts=Object(a["b"])()}}},methods:{init(){this.conditionInfo={...this.info,type:"condition",program:this.info.program&&this.info.program.id?[this.info.program]:[]},this.$nextTick(()=>{const n=this.$refs.transEventRef;n&&(n.gridOptions.data=this.conditionInfo.program)})},save(){const{transfer_type:n,condition_type:t,expression:e,program:o}=this.conditionInfo;let i=1===o.length?o.map(n=>({id:n.id,script_id:n.script_id,actual_parameters:n.actual_parameters?n.actual_parameters.map(n=>n.value):n.actual_parameters}))[0]:{};return{transfer_type:n,condition_type:t,expression:e,program:i}}},watch:{info:{handler:function(n){n&&this.init()},immediate:!0}}},d=r,p=e("2be6"),c=Object(p["a"])(d,o,i,!1,null,null,null);t["default"]=c.exports}}]);