/*!
 *  build: vue-admin-beautiful 
 *  vue-admin-beautiful author: chuzhixin 1204505056@qq.com 
 *  vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756 
 *  time: 2024-10-10 11:14:28
 */
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-22607269"],{"120b":function(e,t,o){"use strict";o("cf5f")},"9520b":function(e,t,o){"use strict";o.r(t);var n=o("f2bf");const l={class:"dialog-footer"};function i(e,t,o,i,r,a){const d=Object(n["resolveComponent"])("el-option"),s=Object(n["resolveComponent"])("el-select"),c=Object(n["resolveComponent"])("el-form-item"),u=Object(n["resolveComponent"])("el-form"),m=Object(n["resolveComponent"])("el-button"),f=Object(n["resolveComponent"])("el-dialog");return Object(n["openBlock"])(),Object(n["createBlock"])(f,{modelValue:r.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>r.dialogFormVisible=e),title:e.title,width:"500px",onClose:a.close},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(u,{ref:"form",model:r.form,rules:e.rules,"label-width":"80px"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(c,{label:"角色授权",prop:"menuIds"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(s,{modelValue:r.form.menuIds,"onUpdate:modelValue":t[0]||(t[0]=e=>r.form.menuIds=e),size:"small",multiple:"",placeholder:"请选择"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(r.parentData,e=>(Object(n["openBlock"])(),Object(n["createBlock"])(d,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"]),Object(n["createElementVNode"])("div",l,[Object(n["createVNode"])(m,{type:"primary",size:"small",onClick:a.save},{default:Object(n["withCtx"])(()=>t[2]||(t[2]=[Object(n["createTextVNode"])("确 定")])),_:1},8,["onClick"]),Object(n["createVNode"])(m,{size:"small",onClick:a.close},{default:Object(n["withCtx"])(()=>t[3]||(t[3]=[Object(n["createTextVNode"])("取 消")])),_:1},8,["onClick"])])]),_:1},8,["modelValue","title","onClose"])}var r=o("cc5e"),a=o("1f27"),d={name:"RoleGrant",data(){return{form:{roleId:"",menuIds:""},node:[],clearable:!0,parentData:[],dialogFormVisible:!1}},created(){},methods:{async getParentData(){const{data:e}=await Object(a["miniMenuSelect"])();this.parentData=e},async getNodeData(){const{data:e}=await Object(r["getMiniRoleMenuIdsByRoleId"])({roleId:this.form.roleId});this.form.menuIds=e},roleGrant(e){this.title="角色授权",this.form=Object.assign({},e),this.form.roleId=e.id,this.dialogFormVisible=!0,this.getNodeData(),this.getParentData()},close(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1,this.$emit("fetch-data")},save(){this.$refs["form"].validate(async e=>{if(!e)return!1;{const{msg:e}=await Object(r["miniRoleAssignMenu"])(this.form);this.$notify({title:e,type:"success"}),this.dialogFormVisible=!1}})}}},s=(o("120b"),o("d959")),c=o.n(s);const u=c()(d,[["render",i]]);t["default"]=u},cc5e:function(e,t,o){"use strict";o.r(t),o.d(t,"getList",(function(){return l})),o.d(t,"doEdit",(function(){return i})),o.d(t,"doDelete",(function(){return r})),o.d(t,"doAdd",(function(){return a})),o.d(t,"getMenuIdsByRoleId",(function(){return d})),o.d(t,"assignMenu",(function(){return s})),o.d(t,"miniRoleSelect",(function(){return c})),o.d(t,"miniRoleInsert",(function(){return u})),o.d(t,"miniRoleUpdate",(function(){return m})),o.d(t,"miniRoleRemove",(function(){return f})),o.d(t,"miniRoleAssignMenu",(function(){return b})),o.d(t,"getMiniRoleMenuIdsByRoleId",(function(){return p}));var n=o("b775");function l(e){let t="?page="+e.page+"&size="+e.size;return e.name&&(t+="&name="+e.name),Object(n["default"])({url:"/sysRole/select"+t,method:"get",data:e})}function i(e){return Object(n["default"])({url:"/sysRole/update",method:"post",data:e})}function r(e){return Object(n["default"])({url:"/sysRole/remove",method:"post",data:e})}function a(e){return Object(n["default"])({url:"/sysRole/insert",method:"post",data:e})}function d(e){return Object(n["default"])({url:"/sysRole/getMenuIdsByRoleId?roleId="+e.roleId,method:"get",data:e})}function s(e){return Object(n["default"])({url:"/sysRole/assignMenu",method:"post",data:e})}function c(e){let t="?page="+e.page+"&size="+e.size;return void 0!=e.name&&(t+="&name="+e.name),Object(n["default"])({url:"/miniRole/select"+t,method:"get",data:e})}function u(e){return Object(n["default"])({url:"/miniRole/insert",method:"post",data:e})}function m(e){return Object(n["default"])({url:"/miniRole/update",method:"post",data:e})}function f(e){return Object(n["default"])({url:"/miniRole/remove?roleId="+e.roleId,method:"post",data:e})}function b(e){return Object(n["default"])({url:"/miniRole/assignMenu",method:"post",data:e})}function p(e){return Object(n["default"])({url:"/miniRole/getMenuIdsByRoleId?roleId="+e.roleId,method:"get",data:e})}},cf5f:function(e,t,o){}}]);