"use strict";(self["webpackChunkscui"]=self["webpackChunkscui"]||[]).push([[3797],{753:function(e,s,t){t.r(s),t.d(s,{default:function(){return b}});var l=t(66252),a=t(3577);const i={class:"el-dialog__title"},o={class:"sc-dialog__headerbtn"},d={class:"flowBody"},n={class:"footerLeft"},c=(0,l.Uk)(" 流程名称： "),u={class:"footerRight"},r=(0,l.Uk)("取 消"),m=(0,l.Uk)("保 存");function h(e,s,t,h,p,f){const w=(0,l.up)("sc-icon-DialogFull"),g=(0,l.up)("el-icon-close"),b=(0,l.up)("el-icon"),v=(0,l.up)("sc-workflow"),_=(0,l.up)("el-scrollbar"),k=(0,l.up)("el-input"),y=(0,l.up)("el-button"),C=(0,l.up)("el-dialog");return(0,l.wg)(),(0,l.j4)(C,{title:p.titleMap[p.mode],modelValue:p.visible,"onUpdate:modelValue":s[6]||(s[6]=e=>p.visible=e),width:"70%","destroy-on-close":"",draggable:"",onClosed:s[7]||(s[7]=s=>e.$emit("closed")),fullscreen:p.isFullscreen,"show-close":!1},{header:(0,l.w5)((()=>[(0,l.WI)(e.$slots,"header",{},(()=>[(0,l._)("span",i,(0,a.toDisplayString)(p.titleMap[p.mode]),1)]),!0),(0,l._)("div",o,[(0,l._)("button",{"aria-label":"fullscreen",type:"button",onClick:s[0]||(s[0]=e=>p.isFullscreen=!p.isFullscreen)},[(0,l.Wm)(w)]),(0,l._)("button",{"aria-label":"close",type:"button",onClick:s[1]||(s[1]=s=>e.$emit("closed"))},[(0,l.Wm)(b,{class:"el-dialog__close"},{default:(0,l.w5)((()=>[(0,l.Wm)(g)])),_:1})])])])),footer:(0,l.w5)((()=>[(0,l._)("div",n,[c,(0,l.Wm)(k,{style:{width:"200px","margin-left":"8px"},modelValue:p.data.name,"onUpdate:modelValue":s[3]||(s[3]=e=>p.data.name=e),size:"default",placeholder:"审核流程名称"},null,8,["modelValue"])]),(0,l._)("div",u,[(0,l.Wm)(y,{onClick:s[4]||(s[4]=e=>p.visible=!1)},{default:(0,l.w5)((()=>[r])),_:1}),"show"!==p.mode?((0,l.wg)(),(0,l.j4)(y,{key:0,type:"primary",loading:p.isSave,onClick:s[5]||(s[5]=e=>f.submit())},{default:(0,l.w5)((()=>[m])),_:1},8,["loading"])):(0,l.kq)("",!0)])])),default:(0,l.w5)((()=>[(0,l._)("div",d,[(0,l.Wm)(_,{"max-height":p.isFullscreen?"100%":"460px"},{default:(0,l.w5)((()=>[(0,l.Wm)(v,{modelValue:p.data.nodeConfig,"onUpdate:modelValue":s[2]||(s[2]=e=>p.data.nodeConfig=e)},null,8,["modelValue"])])),_:1},8,["max-height"])])])),_:3},8,["title","modelValue","fullscreen"])}var p=t(95375),f={components:{scWorkflow:p.Z},emits:["success","closed"],data(){return{isFullscreen:!1,mode:"add",titleMap:{add:"新增流程",edit:"编辑流程",show:"查看流程"},visible:!1,isSave:!1,data:{name:"",nodeConfig:{nodeName:"发起人",type:0,nodeRoleList:[]}}}},mounted(){},methods:{open(e="add"){return this.mode=e,this.visible=!0,this},async submit(){this.isSave=!0;let e=this.data;const s=await this.$API.system.reviewProcess.add.post(e);200===s.code?(this.$emit("success","",this.mode),this.isSave=!1,this.visible=!1,this.$message.success("操作成功")):this.isSave=!1},setData(e){const s={id:e.id};this.loading=!0,setTimeout((async()=>{const e=await this.$API.system.reviewProcess.info.post(s);200==e.code&&(this.data.id=e.data.id,this.data.name=e.data.name,this.data.nodeConfig=e.data.nodeConfig)}),100)}}},w=t(83744);const g=(0,w.Z)(f,[["render",h],["__scopeId","data-v-14b921c4"]]);var b=g}}]);