(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b1e33"],{2285:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("a-drawer",{attrs:{title:"数据规则/按钮权限配置",width:"365",closable:!1,visible:e.visible},on:{close:e.onClose}},[t("a-tabs",{attrs:{defaultActiveKey:"1"}},[t("a-tab-pane",{key:"1",attrs:{tab:"数据规则"}},[e.dataruleList.length>0?t("a-checkbox-group",{model:{value:e.dataruleChecked,callback:function(t){e.dataruleChecked=t},expression:"dataruleChecked"}},[t("a-row",[e._l(e.dataruleList,(function(a,s){return t("a-col",{key:"dr"+s,attrs:{span:24}},[t("a-checkbox",{attrs:{value:a.id}},[e._v(e._s(a.ruleName))])],1)})),t("a-col",{attrs:{span:24}},[t("div",{staticStyle:{width:"100%","margin-top":"15px"}},[t("a-button",{attrs:{type:"primary",size:"small",icon:"save"},on:{click:e.saveDataruleForRole}},[e._v("点击保存")])],1)])],2)],1):t("div",[t("h3",[e._v("无配置信息!")])])],1)],1)],1)},i=[],l=a("290c"),n=a("da05"),r=a("0fea"),o={name:"RoleDataruleModal",components:{ACol:n["b"],ARow:l["a"]},data:function(){return{functionId:"",roleId:"",visible:!1,tabList:[{key:"1",tab:"数据规则"},{key:"2",tab:"按钮权限"}],activeTabKey:"1",url:{datarule:"/sys/role/datarule"},dataruleList:[],dataruleChecked:[]}},methods:{loadData:function(){var e=this;Object(r["c"])("".concat(this.url.datarule,"/").concat(this.functionId,"/").concat(this.roleId)).then((function(t){if(t.success){e.dataruleList=t.result.datarule;var a=t.result.drChecked;a&&(e.dataruleChecked=a.split(","))}}))},saveDataruleForRole:function(){var e=this;this.dataruleChecked&&0!=this.dataruleChecked.length||this.$message.warning("请注意,现未勾选任何数据权限!");var t={permissionId:this.functionId,roleId:this.roleId,dataRuleIds:this.dataruleChecked.join(",")};Object(r["j"])(this.url.datarule,t).then((function(t){t.success?e.$message.success(t.message):e.$message.error(t.message)}))},show:function(e,t){this.onReset(),this.functionId=e,this.roleId=t,this.visible=!0,this.loadData()},onClose:function(){this.visible=!1,this.onReset()},onTabChange:function(e){this.activeTabKey=e},onReset:function(){this.functionId="",this.roleId="",this.dataruleList=[],this.dataruleChecked=[]}}},c=o,u=a("2877"),d=Object(u["a"])(c,s,i,!1,null,"5fa38486",null);t["default"]=d.exports}}]);