All Downloads are FREE. Search and download functionalities are using the official Maven repository.

netty-server-ui.v1.js.247.ab7f191b.js Maven / Gradle / Ivy

The newest version!
"use strict";(self.webpackChunkwu_smart_agent_network=self.webpackChunkwu_smart_agent_network||[]).push([[247],{61247:(e,t,u)=>{u.r(t),u.d(t,{default:()=>i});var r=u(35145),n=u(83986),l=u(93540),a=(u(34284),u(66252)),o=u(2262);const s={__name:"UsersEdit",props:{showDialog:{type:Boolean,default:!0},title:{type:String,default:"添加"},rowData:{type:Object,default:null}},emits:["closeDialog"],setup:function(e,t){var u=t.emit,s={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],roleIds:[{required:!0,message:"请选择角色",trigger:"change"}]},i=e,d=u,c=(0,o.BK)(i),f=c.title,p=c.rowData,m=function(){d("closeDialog",!1)},w=(0,o.iH)(null),v=(0,o.qj)({username:"",password:"",roleIds:[],status:!0}),b=(0,o.BK)(v),_=b.username,g=b.password,k=b.roleIds,h=b.status,y=(0,o.iH)([]);p.value&&(_.value=p.value.username,g.value=p.value.password,k.value=p.value.roleIds,h.value=p.value.status);var V=function(){var e=(0,l.Z)((0,n.Z)().mark((function e(){var t,u,r;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,VE_API.system.roleList();case 2:t=e.sent,u=t.code,r=t.data,0===u&&(y.value=r);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,a.bv)((0,l.Z)((0,n.Z)().mark((function e(){return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V();case 2:case"end":return e.stop()}}),e)}))));return function(t,u){var i=(0,a.up)("el-input"),d=(0,a.up)("el-form-item"),c=(0,a.up)("el-option"),b=(0,a.up)("el-select"),V=(0,a.up)("el-radio-button"),U=(0,a.up)("el-radio-group"),W=(0,a.up)("el-form"),x=(0,a.up)("el-button"),Z=(0,a.up)("el-dialog");return(0,a.wg)(),(0,a.j4)(Z,{title:(0,o.SU)(f),"append-to-body":"","destroy-on-close":"","model-value":e.showDialog,onClose:u[6]||(u[6]=function(e){return m()})},{footer:(0,a.w5)((function(){return[(0,a._)("span",null,[(0,a.Wm)(x,{onClick:u[4]||(u[4]=function(e){return m()})},{default:(0,a.w5)((function(){return[(0,a.Uk)("取消")]})),_:1}),(0,a.Wm)(x,{type:"primary",onClick:u[5]||(u[5]=function(e){w.value.validate(function(){var e=(0,l.Z)((0,n.Z)().mark((function e(t){var u;return(0,n.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.userAdd(v);case 4:u=e.sent,e.next=10;break;case 7:return e.next=9,VE_API.system.userEdit((0,r.Z)({id:p.value.id},v));case 9:u=e.sent;case 10:0===u.code&&m(),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)(W,{model:v,ref_key:"formRef",ref:w,rules:s,"label-width":"80px",inline:!1},{default:(0,a.w5)((function(){return[(0,a.Wm)(d,{label:"用户名",prop:"username"},{default:(0,a.w5)((function(){return[(0,a.Wm)(i,{modelValue:(0,o.SU)(_),"onUpdate:modelValue":u[0]||(u[0]=function(e){return(0,o.dq)(_)?_.value=e:null}),placeholder:"",clearable:""},null,8,["modelValue"])]})),_:1}),(0,a.Wm)(d,{label:"密码",prop:"password"},{default:(0,a.w5)((function(){return[(0,a.Wm)(i,{modelValue:(0,o.SU)(g),"onUpdate:modelValue":u[1]||(u[1]=function(e){return(0,o.dq)(g)?g.value=e:null}),"show-password":"",placeholder:"",clearable:""},null,8,["modelValue"])]})),_:1}),(0,a.Wm)(d,{label:"角色",prop:"roleIds"},{default:(0,a.w5)((function(){return[(0,a.Wm)(b,{style:{width:"100%"},modelValue:(0,o.SU)(k),"onUpdate:modelValue":u[2]||(u[2]=function(e){return(0,o.dq)(k)?k.value=e:null}),multiple:"",placeholder:"",clearable:""},{default:(0,a.w5)((function(){return[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(y.value,(function(e){return(0,a.wg)(),(0,a.j4)(c,{key:e.id,label:e.name,value:e.id},null,8,["label","value"])})),128))]})),_:1},8,["modelValue"])]})),_:1}),(0,a.Wm)(d,{label:"状态"},{default:(0,a.w5)((function(){return[(0,a.Wm)(U,{modelValue:(0,o.SU)(h),"onUpdate:modelValue":u[3]||(u[3]=function(e){return(0,o.dq)(h)?h.value=e:null})},{default:(0,a.w5)((function(){return[(0,a.Wm)(V,{label:!0},{default:(0,a.w5)((function(){return[(0,a.Uk)("启用")]})),_:1}),(0,a.Wm)(V,{label:!1},{default:(0,a.w5)((function(){return[(0,a.Uk)("停用")]})),_:1})]})),_:1},8,["modelValue"])]})),_:1})]})),_:1},8,["model"])]})),_:1},8,["title","model-value"])}}};const i=(0,u(48118).Z)(s,[["__scopeId","data-v-259b6f0a"]])}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy