netty-server-ui.v1.js.776.001941e9.js Maven / Gradle / Ivy
The newest version!
"use strict";(self.webpackChunkwu_smart_agent_network=self.webpackChunkwu_smart_agent_network||[]).push([[776],{80776:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var u=n(83986),l=n(35145),r=n(93540),a=(n(34284),n(66252)),o=n(2262);const i={__name:"DictionaryEdit",props:{showDialog:{type:Boolean,default:!0},title:{type:String,default:"添加"},rowData:{type:Object,default:null}},emits:["closeDialog"],setup:function(e,t){var n=t.emit,i=e,c=n,d=(0,o.BK)(i),f=d.title,s=d.rowData,p=function(){c("closeDialog",!1)},m=(0,o.qj)({code:"",name:"",type:1}),w=(0,o.BK)(m),v=w.code,b=w.name,_=w.type,k=(0,o.iH)(null),g={name:[{required:!0,message:"请输入字典名称",trigger:"blur"}],code:[{required:!0,message:"请输入字典编码",trigger:"blur"}]};s.value&&(b.value=s.value.name,v.value=s.value.code,_.value=s.value.type);return(0,a.bv)((0,r.Z)((0,u.Z)().mark((function e(){return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))),function(t,n){var i=(0,a.up)("el-input"),c=(0,a.up)("el-form-item"),d=(0,a.up)("el-radio-button"),w=(0,a.up)("el-radio-group"),y=(0,a.up)("el-form"),h=(0,a.up)("el-button"),U=(0,a.up)("el-dialog");return(0,a.wg)(),(0,a.j4)(U,{title:(0,o.SU)(f),"append-to-body":"","destroy-on-close":"","model-value":e.showDialog,onClose:n[5]||(n[5]=function(e){return p()})},{footer:(0,a.w5)((function(){return[(0,a._)("span",null,[(0,a.Wm)(h,{onClick:n[3]||(n[3]=function(e){return p()})},{default:(0,a.w5)((function(){return[(0,a.Uk)("取消")]})),_:1}),(0,a.Wm)(h,{type:"primary",onClick:n[4]||(n[4]=function(e){k.value.validate(function(){var e=(0,r.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=14;break}if("添加"!==f.value){e.next=7;break}return e.next=4,VE_API.system.dictionaryAdd(m);case 4:n=e.sent,e.next=10;break;case 7:return e.next=9,VE_API.system.dictionaryEdit((0,l.Z)({id:s.value.id},m));case 9:n=e.sent;case 10:"00"==n.code&&p(),e.next=16;break;case 14:return console.log("error submit!!"),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())})},{default:(0,a.w5)((function(){return[(0,a.Uk)("确定")]})),_:1})])]})),default:(0,a.w5)((function(){return[(0,a.Wm)(y,{model:m,ref_key:"formRef",ref:k,rules:g,"label-width":"80px",inline:!1},{default:(0,a.w5)((function(){return[(0,a.Wm)(c,{label:"字典名称",prop:"name"},{default:(0,a.w5)((function(){return[(0,a.Wm)(i,{modelValue:(0,o.SU)(b),"onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,o.dq)(b)?b.value=e:null}),placeholder:"",clearable:""},null,8,["modelValue"])]})),_:1}),(0,a.Wm)(c,{label:"字典编码",prop:"code"},{default:(0,a.w5)((function(){return[(0,a.Wm)(i,{modelValue:(0,o.SU)(v),"onUpdate:modelValue":n[1]||(n[1]=function(e){return(0,o.dq)(v)?v.value=e:null}),placeholder:"",clearable:""},null,8,["modelValue"])]})),_:1}),(0,a.Wm)(c,{label:"字典类型",prop:"status"},{default:(0,a.w5)((function(){return[(0,a.Wm)(w,{modelValue:(0,o.SU)(_),"onUpdate:modelValue":n[2]||(n[2]=function(e){return(0,o.dq)(_)?_.value=e:null})},{default:(0,a.w5)((function(){return[(0,a.Wm)(d,{label:1},{default:(0,a.w5)((function(){return[(0,a.Uk)("树状")]})),_:1}),(0,a.Wm)(d,{label:0},{default:(0,a.w5)((function(){return[(0,a.Uk)("列表")]})),_:1})]})),_:1},8,["modelValue"])]})),_:1})]})),_:1},8,["model"])]})),_:1},8,["title","model-value"])}}}}}]);