WangHan
2025-04-03 a1b85ef72062ca80db35546e4216dd564f3e0f57
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c1e7a890","chunk-2d0c9509"],{3528:function(e,t,r){"use strict";r.d(t,"j",(function(){return o})),r.d(t,"k",(function(){return a})),r.d(t,"i",(function(){return i})),r.d(t,"a",(function(){return s})),r.d(t,"m",(function(){return c})),r.d(t,"g",(function(){return u})),r.d(t,"f",(function(){return l})),r.d(t,"h",(function(){return f})),r.d(t,"b",(function(){return h})),r.d(t,"l",(function(){return d})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return p})),r.d(t,"e",(function(){return y}));var n=r("b775");function o(e){return Object(n["a"])({url:"/system/role/list",method:"get",params:e})}function a(e){return Object(n["a"])({url:"/pc/fin/sys/server/selectByDataScope",method:"get",params:e})}function i(e){return Object(n["a"])({url:"/system/role/view/"+e,method:"get"})}function s(e){return Object(n["a"])({url:"/system/role/add",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/system/role/edit",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/system/role/dataScope",method:"put",data:e})}function l(e){return Object(n["a"])({url:"/system/role/edit",method:"post",data:e})}function f(e){return Object(n["a"])({url:"/system/role/remove/"+e,method:"get"})}function h(e){return Object(n["a"])({url:"/system/role/select/authUser/allocatedList",method:"get",params:e})}function d(e){return Object(n["a"])({url:"/system/role/select/authUser/unallocatedList",method:"get",params:e})}function m(e){return Object(n["a"])({url:"/system/role/select/authUser/cancel",method:"post",data:e})}function p(e){return Object(n["a"])({url:"/system/role/authUser/cancelAll",method:"post",params:e})}function y(e){return Object(n["a"])({url:"/system/role/select/authUser/all",method:"post",params:e})}},"433d":function(e,t,r){"use strict";var n=r("c559"),o={ftpUrl:n["a"].ftpUrl,apiBaseURL:n["a"].apiBaseURL};t["a"]=o},"592a":function(e,t,r){"use strict";r.r(t),t["default"]=[{type:"text",dataIndex:"roleName",label:"角色名称",placeholder:"请输入",defaultValue:""},{type:"select",dataIndex:"status",label:"状态",defaultValue:"0",placeholder:"请选择",options:[{value:"0",label:"启用"},{value:"1",label:"禁用"}]}]},"80bd":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-container",[r("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"8px"}},[r("el-col",[e.tableShow?r("my-table-v2",{ref:"myTable",attrs:{filter:e.queryParams,table:e.table}}):e._e()],1)],1)],1)],1),e._v(" "),r("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[r("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"角色名称",prop:"role_name"}},[r("el-input",{attrs:{placeholder:"请输入角色名称"},model:{value:e.form.role_name,callback:function(t){e.$set(e.form,"role_name",t)},expression:"form.role_name"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"角色顺序",prop:"role_sort"}},[r("el-input-number",{attrs:{"controls-position":"right",min:0},model:{value:e.form.role_sort,callback:function(t){e.$set(e.form,"role_sort",t)},expression:"form.role_sort"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"状态"}},[r("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},[r("el-radio",{attrs:{label:0}},[e._v("正常")]),e._v(" "),r("el-radio",{attrs:{label:1}},[e._v("禁用")])],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"角色范围"}},[r("el-radio-group",{model:{value:e.form.data_scope,callback:function(t){e.$set(e.form,"data_scope",t)},expression:"form.data_scope"}},[e.$store.getters.userInfo.lv<2?r("el-radio",{attrs:{label:1}},[e._v("省")]):e._e(),e._v(" "),e.$store.getters.userInfo.lv<3?r("el-radio",{attrs:{label:2}},[e._v("市")]):e._e(),e._v(" "),e.$store.getters.userInfo.lv<4?r("el-radio",{attrs:{label:3}},[e._v("县")]):e._e()],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"菜单权限"}},[r("el-checkbox",{on:{change:function(t){return e.handleCheckedTreeExpand(t,"menu")}},model:{value:e.menuExpand,callback:function(t){e.menuExpand=t},expression:"menuExpand"}},[e._v("展开/折叠")]),e._v(" "),r("el-checkbox",{on:{change:function(t){return e.handleCheckedTreeNodeAll(t,"menu")}},model:{value:e.menuNodeAll,callback:function(t){e.menuNodeAll=t},expression:"menuNodeAll"}},[e._v("全选/全不选\n        ")]),e._v(" "),r("el-checkbox",{on:{change:function(t){return e.handleCheckedTreeConnect(t,"menu")}},model:{value:e.form.menu_check_strictly,callback:function(t){e.$set(e.form,"menu_check_strictly",t)},expression:"form.menu_check_strictly"}},[e._v("父子联动\n        ")]),e._v(" "),r("el-tree",{ref:"menu",staticClass:"tree-border",attrs:{data:e.menuOptions,"show-checkbox":"","node-key":"menu_id","check-strictly":!e.form.menu_check_strictly,"empty-text":"加载中,请稍候",props:e.defaultProps}})],1),e._v(" "),r("el-form-item",{attrs:{label:"备注"}},[r("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),e._v(" "),r("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},o=[],a=r("3528"),i=r("a6dc"),s=r("fcb7"),c=r("80cb"),u=r("433d"),l=r("592a");function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){var t=y(e,"string");return"symbol"==f(t)?t:t+""}function y(e,t){if("object"!=f(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */g=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),s=new T(n||[]);return o(i,"_invoke",{value:$(e,r,s)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",m="suspendedYield",p="executing",y="completed",v={};function b(){}function _(){}function O(){}var w={};u(w,i,(function(){return this}));var k=Object.getPrototypeOf,j=k&&k(k(N([])));j&&j!==r&&n.call(j,i)&&(w=j);var x=O.prototype=b.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function r(o,a,i,s){var c=h(e[o],e,a);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==f(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(l).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,s)}))}s(c.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function $(t,r,n){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var c=E(s,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?y:m,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function E(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=h(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(f(t)+" is not iterable")}return _.prototype=O,o(x,"constructor",{value:O,configurable:!0}),o(O,"constructor",{value:_,configurable:!0}),_.displayName=u(O,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,u(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},S(L.prototype),u(L.prototype,s,(function(){return this})),t.AsyncIterator=L,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new L(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(x),u(x,c,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function v(e,t,r,n,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function b(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){v(a,n,o,i,s,"next",e)}function s(e){v(a,n,o,i,s,"throw",e)}i(void 0)}))}}var _={name:"Role",components:{MyTableV2:c["a"]},data:function(){var e=this;return{radio:3,scopeOption:[{value:1,label:"省"},{value:2,label:"市"},{value:3,label:"县"}],constants:this.$constants,rootOrgList:[],selectedRootOrgId:void 0,loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,roleList:[],title:"",open:!1,openDataScope:!1,menuExpand:!1,menuNodeAll:!1,deptExpand:!0,deptNodeAll:!1,dateRange:[],dataScopeOptions:[{value:"1",label:"全部数据权限"},{value:"2",label:"自定数据权限"},{value:"3",label:"本部门数据权限"},{value:"4",label:"本部门及以下数据权限"},{value:"5",label:"仅本人数据权限"}],menuOptions:[],deptOptions:[],items:l["default"],queryParams:{roleName:"",roleKey:"",status:0},tableShow:!1,table:{autoLoad:!1,showIndex:!0,expand:!1,url:u["a"].apiBaseURL+"/pc/fin/sys/tenant/user/query/role",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[{name:"新增",click:function(){e.handleAdd(null)}}]},columns:[{title:"角色编号",field:"role_id",align:"center",width:135},{title:"角色名称",field:"role_name",align:"left",minWidth:200},{title:"显示顺序",field:"role_sort",align:"center",width:100},{title:"状态",field:"status",align:"center",width:100,switch:function(t){var r={};return 0==t.status?Object.assign(r,{value:!0,label:"启用",click:function(){e.handleStatusChange(t)}}):Object.assign(r,{value:!1,label:"禁用",click:function(){e.handleStatusChange(t)}}),r}},{title:"备注",field:"remark",align:"left",minWidth:200}],operation:{width:150,align:"center",show:!0,attr:[{title:"修改",events:function(t){e.handleUpdate(t)}},{title:"删除",events:function(t){e.handleDelete(t)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}},form:{role_name:"",role_key:"",role_sort:"",data_scope:1,status:1},defaultProps:{children:"children",label:"menu_name"},rules:{role_name:[{required:!0,message:"角色名称不能为空",trigger:"blur"}],role_key:[{required:!1,message:"权限字符不能为空",trigger:"blur"}],role_sort:[{required:!0,message:"角色顺序不能为空",trigger:"blur"}]}}},created:function(){this.getRootOrgList()},methods:{fifterForm:function(e){this.queryParams=Object.assign(this.queryParams,e),this.search(1)},search:function(e){void 0!=e?this.$refs.myTable.search({pageNum:e}):this.$refs.myTable.search()},getRootOrgList:function(){var e=this;Object(s["e"])().then((function(t){e.rootOrgList=t,e.selectedRootOrgId=e.rootOrgList[0].id,e.queryParams.orgId=e.selectedRootOrgId})).then((function(){e.tableShow=!0,e.$nextTick((function(){e.search(1)}))}))},getList:function(){var e=this;this.selectedRootOrgId=this.queryParams.orgId,Object(a["j"])(this.queryParams).then((function(t){e.roleList=t.datas,e.total=t.totalRows}))},getMenuTreeselect:function(){var e=b(g().mark((function e(){var t=this;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(i["f"])().then((function(e){t.menuOptions=e}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),getDeptTreeselect:function(){var e=this;Object(s["h"])().then((function(t){e.deptOptions=t}))},getMenuAllCheckedKeys:function(){var e=this.$refs.menu.getCheckedKeys(),t=this.$refs.menu.getHalfCheckedKeys();return e.unshift.apply(e,t),e},getDeptAllCheckedKeys:function(){var e=this.$refs.dept.getCheckedKeys(),t=this.$refs.dept.getHalfCheckedKeys();return e.unshift.apply(e,t),e},getRoleMenuTreeselect:function(e){var t=this;return Object(i["e"])(e).then((function(e){return t.menuOptions=e.menus,e}))},getRoleDeptTreeselect:function(e){var t=this;return Object(s["g"])(e).then((function(e){return t.deptOptions=e.depts,e}))},handleStatusChange:function(e){var t=this,r=0==e.status?"禁用":"启用";this.$modal.confirm("确认要"+r+'"'+e.role_name+'"角色吗?').then((function(){return e.status=0==e.status?1:0,Object(a["f"])(e)})).then((function(){t.$modal.msgSuccess(r+"成功"),t.search()})).catch((function(){e.status=0==e.status?1:0}))},cancel:function(){this.open=!1,this.reset()},cancelDataScope:function(){this.openDataScope=!1,this.reset()},reset:function(){void 0!=this.$refs.menu&&this.$refs.menu.setCheckedKeys([]),this.menuExpand=!1,this.menuNodeAll=!1,this.deptExpand=!0,this.deptNodeAll=!1,this.form={org_id:void 0,role_id:void 0,role_name:void 0,data_scope:this.$store.getters.userInfo?this.$store.getters.userInfo.lv:1,role_key:"None",role_sort:0,status:0,menuIds:[],deptIds:[],menu_check_strictly:!0,dept_check_strictly:!0,remark:void 0},this.resetForm("form")},changeSize:function(e){this.queryParams.pageSize=e,this.getList()},changePage:function(e){this.queryParams.pageNum=e,this.getList()},handleQuery:function(){this.queryParams.pageNum=1,this.queryParams.orgId=this.selectedRootOrgId,this.getList()},resetQuery:function(){this.dateRange=[],this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.roleId})),this.single=1!=e.length,this.multiple=!e.length},handleCommand:function(e,t){switch(e){case"handleDataScope":this.handleDataScope(t);break;case"handleAuthUser":this.handleAuthUser(t);break;default:break}},handleCheckedTreeExpand:function(e,t){if("menu"==t)for(var r=this.menuOptions,n=0;n<r.length;n++)this.$refs.menu.store.nodesMap[r[n].id].expanded=e;else if("dept"==t)for(var o=this.deptOptions,a=0;a<o.length;a++)this.$refs.dept.store.nodesMap[o[a].id].expanded=e},handleCheckedTreeNodeAll:function(e,t){"menu"==t?this.$refs.menu.setCheckedNodes(e?this.menuOptions:[]):"dept"==t&&this.$refs.dept.setCheckedNodes(e?this.deptOptions:[])},handleCheckedTreeConnect:function(e,t){"menu"==t?this.form.menu_check_strictly=!!e:"dept"==t&&(this.form.dept_check_strictly=!!e)},handleAdd:function(){var e=b(g().mark((function e(){return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loading=!0,this.reset(),e.next=4,this.getMenuTreeselect();case 4:this.form.org_id=this.selectedRootOrgId,this.open=!0,this.title="添加角色",this.loading=!1;case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleUpdate:function(e){var t=this;this.reset();var r=e.role_id,n=this.getRoleMenuTreeselect(r);this.loading=!0,Object(a["i"])(r).then((function(e){t.form=e,t.open=!0,t.$nextTick((function(){n.then((function(e){var r=e.checkedKeys;r&&r.forEach((function(e){t.$nextTick((function(){t.$refs.menu.setChecked(e,!0,!1)}))}))}))})),t.title="修改角色",t.loading=!1})).catch((function(){t.loading=!1}))},dataScopeSelectChange:function(e){"2"!==e&&this.$refs.dept.setCheckedKeys([])},handleDataScope:function(e){var t=this;this.reset();var r=this.getRoleDeptTreeselect(e.role_id);Object(a["i"])(e.role_id).then((function(e){t.form=e,t.openDataScope=!0,t.$nextTick((function(){r.then((function(e){t.$refs.dept.setCheckedKeys(e.checkedKeys)}))})),t.title="分配数据权限"}))},handleAuthUser:function(e){var t=e.role_id;this.$router.push("/system/role-auth/user/"+t)},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(e.form.menu_check_strictly=1,e.form.dept_check_strictly=1,void 0!=e.form.role_id?(e.form.menuIds=e.getMenuAllCheckedKeys(),Object(a["m"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.search()}))):(e.form.menuIds=e.getMenuAllCheckedKeys(),Object(a["a"])(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.search()}))))}))},submitDataScope:function(){var e=this;void 0!=this.form.roleId&&(this.form.deptIds=this.getDeptAllCheckedKeys(),Object(a["g"])(this.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.openDataScope=!1,e.getList()})))},handleDelete:function(e){var t=this,r=e.role_id;this.$modal.confirm('是否确认删除角色为"'+e.role_name+'"的数据项?').then((function(){return Object(a["h"])(r)})).then((function(){t.search(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("system/role/export",d({},this.queryParams),"role_".concat((new Date).getTime(),".xlsx"))}}},O=_,w=r("2877"),k=Object(w["a"])(O,n,o,!1,null,null,null);t["default"]=k.exports},a6dc:function(e,t,r){"use strict";r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"f",(function(){return i})),r.d(t,"e",(function(){return s})),r.d(t,"a",(function(){return c})),r.d(t,"g",(function(){return u})),r.d(t,"b",(function(){return l}));var n=r("b775");function o(e){return Object(n["a"])({url:"/system/menu/list",method:"get",params:e})}function a(e){return Object(n["a"])({url:"/system/menu/view/"+e,method:"get"})}function i(){return Object(n["a"])({url:"/system/menu/select/tree",method:"get"})}function s(e){return Object(n["a"])({url:"/system/menu/select/roleMenuTree/"+e,method:"get"})}function c(e){return Object(n["a"])({url:"/system/menu/add",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/system/menu/edit",method:"post",data:e})}function l(e){return Object(n["a"])({url:"/system/menu/remove/"+e,method:"get"})}},fcb7:function(e,t,r){"use strict";r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"h",(function(){return i})),r.d(t,"f",(function(){return s})),r.d(t,"e",(function(){return c})),r.d(t,"g",(function(){return u})),r.d(t,"a",(function(){return l})),r.d(t,"i",(function(){return f})),r.d(t,"b",(function(){return h}));var n=r("b775");function o(e){return Object(n["a"])({url:"/system/dept/list",method:"get",params:e})}function a(e){return Object(n["a"])({url:"/system/dept/view/"+e,method:"get"})}function i(e){return Object(n["a"])({url:"/system/dept/select/tree_dept/"+e,method:"get"})}function s(){return Object(n["a"])({url:"/system/dept/select/tree_org",method:"get"})}function c(){return Object(n["a"])({url:"/system/dept/select/list_root_org",method:"get"})}function u(e){return Object(n["a"])({url:"/system/dept/roleDeptTreeselect/"+e,method:"get"})}function l(e){return Object(n["a"])({url:"/system/dept/add",method:"post",data:e})}function f(e){return Object(n["a"])({url:"/system/dept/edit",method:"post",data:e})}function h(e){return Object(n["a"])({url:"/system/dept/remove/"+e,method:"get"})}}}]);