You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
36 KiB
3 lines
36 KiB
11 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["manage"],{"1da1":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));r("d3b7");function a(e,t,r,a,n,i,o){try{var s=e[i](o),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(a,n)}function n(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,l,"next",e)}function l(e){a(o,n,i,s,l,"throw",e)}s(void 0)}))}}},"759b":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),e.isLoading?e._e():t("a-table",{attrs:{rowKey:"role_id",columns:e.columns,dataSource:e.roleList,defaultExpandAllRows:!0,expandIconColumnIndex:1,pagination:!1,loading:e.isLoading},scopedSlots:e._u([{key:"action",fn:function(r,a){return t("span",{},[[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(a)}}},[e._v("删除")])]],2)}}],null,!1,1478444480)}),t("AddForm",{ref:"AddForm",attrs:{roleList:e.roleList,menuList:e.menuList},on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",attrs:{roleList:e.roleList,menuList:e.menuList},on:{handleSubmit:e.handleRefresh}})],1)},n=[],i=r("c7eb"),o=r("1da1"),s=(r("d3b7"),r("782b")),l=r("b775"),c={list:"/store.menu/list"};function u(e){return Object(l["b"])({url:c.list,method:"get",params:e})}var d=r("2af9"),h=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"新增角色",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"角色名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["role_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['role_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"上级角色",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["parent_id"],expression:"['parent_id']"}],attrs:{treeData:e.roleListTree,dropdownStyle:{maxHeight:"400px",overflow:"auto"},allowClear:""}})],1),t("a-form-item",{attrs:{label:"菜单权限",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"设置该角色有权操作的功能"}},[t("a-tree",{ref:"MenuTree",attrs:{checkable:"",checkStrictly:"",treeData:e.menuListTreeData,autoExpandParent:!1},on:{check:e.onCheckedMenu},model:{value:e.checkedKeys,callback:function(t){e.checkedKeys=t},expression:"checkedKeys"}})],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},f=[],m=r("2909"),p=r("5530"),v=(r("99af"),r("159b"),r("b0c0"),r("2ef0")),g=r.n(v),b={props:{roleList:{type:Array,required:!0},menuList:{type:Array,required:!0}},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),roleListTree:[],menuListTreeData:[],checkedKeys:{checked:[],halfChecked:[]}}},methods:{add:function(){this.visible=!0,this.getRoleList(),this.getMenuList()},getMenuList:funct
|
||
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||
10 months ago
|
n=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function h(e,t,r,a){var n=t&&t.prototype instanceof y?t:y,i=Object.create(n.prototype),s=new O(a||[]);return o(i,"_invoke",{value:S(e,r,s)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var m="suspendedStart",p="suspendedYield",v="executing",g="completed",b={};function y(){}function w(){}function C(){}var L={};d(L,l,(function(){return this}));var k=Object.getPrototypeOf,_=k&&k(k(j([])));_&&_!==r&&i.call(_,l)&&(L=_);var x=C.prototype=y.prototype=Object.create(L);function F(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(n,o,s,l){var c=f(e[n],e,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Object(a["a"])(d)&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(d).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,l)}))}l(c.arg)}var n;o(this,"_invoke",{value:function(e,a){function i(){return new t((function(t,n){r(e,a,t,n)}))}return n=n?n.then(i,i):i()}})}function S(t,r,a){var n=m;return function(i,o){if(n===v)throw new Error("Generator is already running");if(n===g){if("throw"===i)throw o;return{value:e,done:!0}}for(a.method=i,a.arg=o;;){var s=a.delegate;if(s){var l=E(s,a);if(l){if(l===b)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===m)throw n=g,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=v;var c=f(t,r,a);if("normal"===c.type){if(n=a.done?g:p,c.arg===b)continue;return{value:c.arg,done:a.done}}"throw"===c.type&&(n=g,a.method="throw",a.arg=c.arg)}}}function E(t,r){var a=r.method,n=t.iterator[a];if(n===e)return r.delegate=null,"throw"===a&&t.iterator["return"]&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),b;var i=f(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function K(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 D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(K,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function r(){for(;++n<t.length;)if(i.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(Object(a["a"])(t)+" is not iterable")}return w.prototype=C,o(x,"constructor",{value:C,configurable:!0}),o(C,"constructor",{value:w,configurable:!0}),w.displayName=d(C,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,C):(e.__proto__=C,d(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},F(T.prototype),d(T.prototype,c,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,a,n,i){void 0===i&&(i=Promise);var o=new T(h(e,r,a,n),i);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},F(x),d(x,u,"Generat
|