"use strict";(self.webpackChunkwu_vue_zone_ecology_net=self.webpackChunkwu_vue_zone_ecology_net||[]).push([[350],{72649:function(e,l,a){a.r(l),a.d(l,{default:function(){return t}});var o=a(67759),u=a(76364);var t={__name:"ApplicationEdit",props:{showDialog:{type:Boolean,default:!0},title:{type:String,default:"添加"},rowData:{type:Object,default:null}},emits:["closeDialog"],setup(e,{emit:l}){const a=e,t=l,{title:d,rowData:n}=(0,u.BK)(a),i=()=>{t("closeDialog",!1)},r=(0,u.qj)({code:"",icon:"",name:"",isStation:!0,openNewWindow:!0,url:""}),{code:p,icon:m,name:c,isStation:s,openNewWindow:w,url:_}=(0,u.BK)(r),f=(0,u.iH)(null),v={name:[{required:!0,message:"请输入应用名称",trigger:"blur"}],code:[{required:!0,message:"请输入应用编码",trigger:"blur"}],isStation:[{required:!0,message:"请选择是否站内",trigger:"blur"}],openNewWindow:[{required:!0,message:"请选择是否新窗口打开",trigger:"blur"}]};n.value&&(c.value=n.value.name,p.value=n.value.code,m.value=n.value.icon,s.value=n.value.isStation,w.value=n.value.openNewWindow,_.value=n.value.url);return(0,o.bv)((async()=>{})),(l,a)=>{const t=(0,o.up)("el-input"),b=(0,o.up)("el-form-item"),W=(0,o.up)("el-radio-button"),g=(0,o.up)("el-radio-group"),V=(0,o.up)("el-form"),U=(0,o.up)("el-button"),S=(0,o.up)("el-dialog");return(0,o.wg)(),(0,o.j4)(S,{title:(0,u.SU)(d),"append-to-body":"","destroy-on-close":"","model-value":e.showDialog,onClose:a[8]||(a[8]=e=>i())},{footer:(0,o.w5)((()=>[(0,o._)("span",null,[(0,o.Wm)(U,{onClick:a[6]||(a[6]=e=>i())},{default:(0,o.w5)((()=>a[13]||(a[13]=[(0,o.Uk)("取消")]))),_:1}),(0,o.Wm)(U,{type:"primary",onClick:a[7]||(a[7]=e=>{f.value.validate((async e=>{if(!e)return console.log("error submit!!"),!1;{let e,l=new FormData;l.append("name",r.name),l.append("code",r.code),l.append("icon",r.icon),l.append("isStation",r.isStation),l.append("openNewWindow",r.openNewWindow),l.append("url",r.url),e="添加"===d.value?await VE_API.application.applicationStory(r):await VE_API.application.applicationStory({id:n.value.id,...r});const{code:a}=e;0===a&&i()}}))})},{default:(0,o.w5)((()=>a[14]||(a[14]=[(0,o.Uk)("确定")]))),_:1})])])),default:(0,o.w5)((()=>[(0,o.Wm)(V,{model:r,ref_key:"formRef",ref:f,rules:v,inline:!1,"label-width":"120px"},{default:(0,o.w5)((()=>[(0,o.Wm)(b,{label:"应用名称",prop:"name",class:"role_edit_item"},{default:(0,o.w5)((()=>[(0,o.Wm)(t,{modelValue:(0,u.SU)(c),"onUpdate:modelValue":a[0]||(a[0]=e=>(0,u.dq)(c)?c.value=e:null),placeholder:"",clearable:""},null,8,["modelValue"])])),_:1}),(0,o.Wm)(b,{label:"应用编码",prop:"code",class:"role_edit_item"},{default:(0,o.w5)((()=>[(0,o.Wm)(t,{modelValue:(0,u.SU)(p),"onUpdate:modelValue":a[1]||(a[1]=e=>(0,u.dq)(p)?p.value=e:null),placeholder:"",clearable:""},null,8,["modelValue"])])),_:1}),(0,o.Wm)(b,{label:"应用图标",prop:"icon",class:"role_edit_item"},{default:(0,o.w5)((()=>[(0,o.Wm)(t,{modelValue:(0,u.SU)(m),"onUpdate:modelValue":a[2]||(a[2]=e=>(0,u.dq)(m)?m.value=e:null),placeholder:"",clearable:""},null,8,["modelValue"])])),_:1}),(0,o.Wm)(b,{label:"是否站内",prop:"isStation",class:"role_edit_item"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{modelValue:(0,u.SU)(s),"onUpdate:modelValue":a[3]||(a[3]=e=>(0,u.dq)(s)?s.value=e:null)},{default:(0,o.w5)((()=>[(0,o.Wm)(W,{label:!0},{default:(0,o.w5)((()=>a[9]||(a[9]=[(0,o.Uk)("站内")]))),_:1}),(0,o.Wm)(W,{label:!1},{default:(0,o.w5)((()=>a[10]||(a[10]=[(0,o.Uk)("站外")]))),_:1})])),_:1},8,["modelValue"])])),_:1}),(0,o.Wm)(b,{label:"应用地址",prop:"url",class:"role_edit_item"},{default:(0,o.w5)((()=>[(0,o.Wm)(t,{modelValue:(0,u.SU)(_),"onUpdate:modelValue":a[4]||(a[4]=e=>(0,u.dq)(_)?_.value=e:null),placeholder:"",clearable:""},null,8,["modelValue"])])),_:1}),(0,o.Wm)(b,{label:"是否新窗口打开",prop:"openNewWindow",class:"role_edit_item"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{modelValue:(0,u.SU)(w),"onUpdate:modelValue":a[5]||(a[5]=e=>(0,u.dq)(w)?w.value=e:null)},{default:(0,o.w5)((()=>[(0,o.Wm)(W,{label:!0},{default:(0,o.w5)((()=>a[11]||(a[11]=[(0,o.Uk)("新窗口打开")]))),_:1}),(0,o.Wm)(W,{label:!1},{default:(0,o.w5)((()=>a[12]||(a[12]=[(0,o.Uk)("当前页面跳转")]))),_:1})])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model"])])),_:1},8,["title","model-value"])}}}}}]);