(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0dc9a440"],{"83a0":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{visible:t.show,"append-to-body":"",width:"600",title:"选择打印模板","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.show=e}}},[e("avue-crud",{ref:"form2",attrs:{data:t.printData,page:t.printPage,option:t.printOption},on:{"update:page":function(e){t.printPage=e},"current-change":t.handlePrintChangeCurrent,"size-change":t.handlePrintChangeSize},scopedSlots:t._u([{key:"radio",fn:function(i){var n=i.row;return[e("el-radio",{attrs:{label:n.id},model:{value:t.chooseData,callback:function(e){t.chooseData=e},expression:"chooseData"}},[t._v(t._s(""))])]}}])}),e("span",{attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:function(e){t.show=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.handlePrintClick}},[t._v("确定")])],1)],1)},a=[],r=i("ac4d1"),s=r["a"],o=i("2877"),c=Object(o["a"])(s,n,a,!1,null,null,null);e["default"]=c.exports},ac4d1:function(t,e,i){"use strict";(function(t){i("6b54"),i("7514"),i("96cf");var n=i("3b8d"),a=i("7c54");e["a"]={props:{visible:{type:Boolean,default:!1},processDefKey:{type:String,default:""},taskId:{type:String,default:""},processInsId:{type:String,default:""}},data:function(){return{show:!1,printData:[],chooseData:"",printPage:{page:1,size:10,total:0}}},computed:{printOption:function(){return{size:"mini",height:"500",calcHeight:30,tip:!1,border:!0,index:!1,viewBtn:!1,addBtn:!1,editBtn:!1,delBtn:!1,selection:!1,menu:!1,columnBtn:!1,refreshBtn:!1,dialogType:"drawer",align:"center",searchMenuSpan:6,menuWidth:320,dialogEscape:!1,dialogClickModal:!1,dialogMenuPosition:"center",column:[{label:"#",width:60,prop:"radio"},{label:"打印标题",prop:"templateName"},{label:"打印版本",prop:"version",width:100}]}}},watch:{visible:{deep:!0,immediate:!0,handler:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.visible){t.next=17;break}return this.$set(this.printPage,"page",1),this.$set(this.printPage,"size",10),t.next=5,this.getPrintPage();case 5:if(0!=this.printPage.total){t.next=11;break}return this.$message.warning("流程未配置打印模板，无法进行打印"),this.$emit("update:visible",!1),t.abrupt("return");case 11:if(1!=this.printPage.total){t.next=16;break}return this.chooseData=this.printData[0].id,this.handlePrintClick(),this.$emit("update:visible",!1),t.abrupt("return");case 16:this.show=this.visible;case 17:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},show:{deep:!0,immediate:!0,handler:function(){this.show||this.$emit("update:visible",!1)}}},methods:{handlePrintChangeCurrent:function(t){this.$set(this.printPage,"page",t),this.getPrintPage()},handlePrintChangeSize:function(t){this.$set(this.printPage,"size",t),this.getPrintPage()},getPrintPage:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){var e,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(a["getList"])({processDefKey:this.processDefKey,current:this.printPage.page,size:this.printPage.size});case 2:e=t.sent,this.printData=e.data.data.records,this.chooseData||(i=this.printData.find((function(t){return t.defaultTemplate})),i?this.chooseData=i.id:this.printData[0]&&(this.chooseData=this.printData[0].id)),this.$set(this.printPage,"total",e.data.data.total);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),handlePrintClick:function(){if(this.chooseData){var e=t.from(JSON.stringify({printId:this.chooseData,taskId:this.taskId,processInsId:this.processInsId})).toString("base64");this.$router.push("/workflow/design/print/"+e)}else this.$message.warning("请选择打印模板")}}}}).call(this,i("b639").Buffer)}}]);