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.
yanzong/public/admin/js/menu.a93ade6e.js

3 lines
42 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["menu"],{"16a5":function(e,t,r){"use strict";r("c204")},"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)}))}}},"378f":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("content-header",{attrs:{title:"API权限"}}),t("a-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{message:e.warningText,type:"warning","show-icon":""}}),t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),t("a-table",{attrs:{rowKey:"api_id",columns:e.columns,"data-source":e.list,loading:e.isLoading,pagination:!1},scopedSlots:e._u([{key:"action",fn:function(r,a){return t("span",{staticClass:"actions"},[t("a",{on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]),t("a",{on:{click:function(t){return e.handleDelete(a)}}},[e._v("删除")])])}}])}),t("add-form",{ref:"AddForm",attrs:{apiList:e.list},on:{handleSubmit:e.handleRefresh}}),t("edit-form",{ref:"EditForm",attrs:{apiList:e.list},on:{handleSubmit:e.handleRefresh}})],1)},n=[],i=(r("d3b7"),r("db8a")),o=r("2af9"),s=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:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}]})],1),t("a-form-item",{attrs:{label:"上级权限",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"默认为顶级权限"}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["parent_id"],expression:"['parent_id']"}],attrs:{"tree-data":e.apiListTreeData,"dropdown-style":{maxHeight:"400px",overflow:"auto"},"allow-clear":""}})],1),t("a-form-item",{attrs:{label:"权限url",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"例如:index/index"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["url",{rules:[{required:!0,message:"请输入权限url"}]}],expression:"['url', {rules: [{required: true, message: '请输入权限url'}]}]"}]})],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)},l=[],c=(r("159b"),r("b0c0"),{props:{apiList:{type:Array,required:!0}},data:function(){return{labelCol:{xs:{span:24},sm:{span:7}},wrapperCol:{xs:{span:24},sm:{span:13}},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),apiListTreeData:[]}},methods:{show:function(){this.visible=!0,this.getAccessList(),this.setFieldsValue()},setFieldsValue:function(){var e=this;this.$nextTick((function(){e.form.resetFields(),e.form.setFieldsValue({parent_id:0})}))},getAccessList:function(){var e=this.apiList,t=this.formatTreeData(e);t.unshift({title:"顶级权限",key:0,value:0}),this.apiListTreeData=t},formatTreeData:function(e){var t=this,r=[];return e.forEach((function(e){var a={title:e.name,key:e.api_id,value:e.api_id};e.children&&e.children.length&&(a["children"]=t.formatTreeData(e["children"])),r.push(a)})),r},handleSubmit:function(){var e=this,t=this.form.validateFields;this.confirmLoading=!0,t((function(t,r){t?e.confirmLoading=!1:e.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1},onFormSubmit:function(e){var t=this;i["a"]({form:e}).then((function(r){t.$message.success(r.message),t.visible=!1,t.form.resetFields(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}}),u=c,d=r("2877"),m=Object(d["a"])(u,s,l,!1,null,null,null),f=m.exports,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:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}]})],1),t("a-form-item",{attrs:{label:"上级权限",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"默认为顶级权限"}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["parent_id"],expression:"['parent_id']"}],attrs:{"tree-data":e.apiListTreeData,"dropdown-style":{maxHeight:"400px",overflow:"auto"},"allow-clear":""}})],1),t("a-form-item",{attrs:{label:"权限url",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"例如:index/index"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["url",{rules:[{required:!0,message:"请输入权限url"}]}],expression:"['url', {rules: [{required: true, message: '请输入权限url'}]}]"}]})],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)},p=[],b=(r("caad"),r("2532"),r("88bc")),v=r.n(b),g={props:{apiList:{type:Array,required:!0}},data:function(){return{labelCol:{xs:{span:24},sm:{span:7}},wrapperCol:{xs:{span:24},sm:{span:13}},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),apiListTreeData:[],record:{}}},methods:{show:function(e){this.visible=!0,this.record=e,this.getAccessList(),this.setFieldsValue()},setFieldsValue:function(){var e=this;this.$nextTick((function(){e.form.setFieldsValue(v()(e.record,["name","url","parent_id","sort"]))}))},getAccessList:function(){var e=this.apiList,t=this.formatTreeData(e);t.unshift({title:"顶级权限",key:0,value:0}),this.apiListTreeData=t},formatTreeData:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=[];return e.forEach((function(e){var n={title:e.name,key:e.api_id,value:e.api_id};([e.api_id,e.parent_id].includes(t.record.api_id)||!0===r)&&(n.disabled=!0),null!=e.children&&(n["children"]=t.formatTreeData(e["children"],n.disabled)),a.push(n)})),a},handleSubmit:function(){var e=this,t=this.form.validateFields;this.confirmLoading=!0,t((function(t,r){t?e.confirmLoading=!1:e.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1},onFormSubmit:function(e){var t=this;i["c"]({apiId:this.record["api_id"],form:e}).then((function(r){t.$message.success(r.message),t.visible=!1,t.form.resetFields(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},w=g,y=Object(d["a"])(w,h,p,!1,null,null,null),C=y.exports,x={components:{ContentHeader:o["a"],STable:o["d"],AddForm:f,EditForm:C},data:function(){return{warningText:"此处用于管理商户后台的菜单数据,请勿对本页面数据进行更改(会导致系统无法更新升级)",isLoading:!1,columns:[{title:"权限ID",dataIndex:"api_id",scopedSlots:{customRender:"api_id"}},{title:"权限名称",dataIndex:"name",scopedSlots:{customRender:"name"}},{title:"权限url",dataIndex:"url",scopedSlots:{customRender:"url"}},{title:"排序",dataIndex:"sort",scopedSlots:{customRender:"sort"}},{title:"添加时间",dataIndex:"create_time",scopedSlots:{customRender:"create_time"}},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],list:[]}},created:function(){this.getListData()},methods:{getListData:function(){var e=this;this.isLoading=!0,i["d"]().then((function(t){e.list=t.data.list})).finally((function(){return e.isLoading=!1}))},handleAdd:function(){this.$refs.AddForm.show()},handleEdit:function(e){this.$refs.EditForm.show(e)},handleDelete:function(e){var t=this;t.$confirm({title:"您确定要删除该记录吗?",content:"确认后将无法恢复",onOk:function(){return t.onSubmitDelete(e)}})},onSubmitDelete:function(e){var t=this;return i["b"]({apiId:e["api_id"]}).then((function(e){t.$message.success(e.message),t.handleRefresh()}))},handleRefresh:function(){this.getListData()}}},L=x,_=Object(d["a"])(L,a,n,!1,null,null,null);t["default"]=_.exports},"73f5":function(e,t,r){"use strict";r.d(t,"f",(function(){return i})),r.d(t,"k",(function(){return o})),r.d(t,"i",(function(){return s})),r.d(t,"a",(function(){return l})),r.d(t,"h",(function(){return c})),r.d(t,"b",(function(){return u})),r.d(t,"g",(function(){return d})),r.d(t,"c",(function(){return m})),r.d(t,"e",(function(){return f})),r.d(t,"j",(function(){return h})),r.d(t,"d",(function(){return p}));var a=r("f6ae"),n=r("b775");function i(e){return Object(n["b"])({url:a["a"].store.list,method:"get",params:e})}function o(e){var t=e.storeId;return Object(n["b"])({url:a["a"].store.superLogin,method:"get",params:{storeId:t}})}function s(e){return Object(n["b"])({url:a["a"].store.recycle,method:"get",params:e})}function l(e){return Object(n["b"])({url:a["a"].store.add,method:"post",data:e})}function c(e){return Object(n["b"])({url:a["a"].store.recovery,method:"post",data:e})}function u(e){return Object(n["b"])({url:a["a"].store.delete,method:"post",data:e})}function d(e){return Object(n["b"])({url:a["a"].store.move,method:"post",data:e})}function m(e){return Object(n["b"])({url:a["a"].store.module.dataList,method:"post",data:e})}function f(e){return Object(n["b"])({url:a["a"].store.module.getStorePlatform,method:"get"})}function h(e){return Object(n["b"])({url:a["a"].store.module.setStorePlatform,method:"post",data:e})}function p(e){return Object(n["b"])({url:a["a"].store.module.getGoodsList,method:"get",params:e})}},"88bc":function(e,t,r){(function(t){var r=1/0,a=9007199254740991,n="[object Arguments]",i="[object Function]",o="[object GeneratorFunction]",s="[object Symbol]",l="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")();function d(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function m(e,t){var r=-1,a=e?e.length:0,n=Array(a);while(++r<a)n[r]=t(e[r],r,e);return n}function f(e,t){var r=-1,a=t.length,n=e.length;while(++r<a)e[n+r]=t[r];return e}var h=Object.prototype,p=h.hasOwnProperty,b=h.toString,v=u.Symbol,g=h.propertyIsEnumerable,w=v?v.isConcatSpreadable:void 0,y=Math.max;function C(e,t,r,a,n){var i=-1,o=e.length;r||(r=k),n||(n=[]);while(++i<o){var s=e[i];t>0&&r(s)?t>1?C(s,t-1,r,a,n):f(n,s):a||(n[n.length]=s)}return n}function x(e,t){return e=Object(e),L(e,t,(function(t,r){return r in e}))}function L(e,t,r){var a=-1,n=t.length,i={};while(++a<n){var o=t[a],s=e[o];r(s,o)&&(i[o]=s)}return i}function _(e,t){return t=y(void 0===t?e.length-1:t,0),function(){var r=arguments,a=-1,n=y(r.length-t,0),i=Array(n);while(++a<n)i[a]=r[t+a];a=-1;var o=Array(t+1);while(++a<t)o[a]=r[a];return o[t]=i,d(e,this,o)}}function k(e){return j(e)||F(e)||!!(w&&e&&e[w])}function S(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-r?"-0":t}function F(e){return A(e)&&p.call(e,"callee")&&(!g.call(e,"callee")||b.call(e)==n)}var j=Array.isArray;function O(e){return null!=e&&T(e.length)&&!D(e)}function A(e){return E(e)&&O(e)}function D(e){var t=I(e)?b.call(e):"";return t==i||t==o}function T(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function I(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function E(e){return!!e&&"object"==typeof e}function q(e){return"symbol"==typeof e||E(e)&&b.call(e)==s}var $=_((function(e,t){return null==e?{}:x(e,m(C(t,1),S))}));e.exports=$}).call(this,r("c8ba"))},"8e0b":function(e,t,r){},"958d":function(e,t,r){"use strict";r("8e0b")},"97b8":function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;return t("a-card",{staticClass:"originData",attrs:{bordered:!1}},[t("content-header",{attrs:{title:"原始数据"}}),t("div",{staticClass:"formContent"},[t("div",{staticClass:"formItem"},[t("span",{staticClass:"formTitle"},[e._v("来源")]),t("a-select",{staticStyle:{width:"120px"},attrs:{placeholder:"请选择"},on:{change:e.getChannel}},e._l(e.checkList,(function(r){return t("a-select-option",{key:r.id,attrs:{value:r.id}},[e._v(" "+e._s(r.name)+" ")])})),1)],1),t("div",{staticClass:"formItem"},[t("span",{staticClass:"formTitle"},[e._v("获取时间")]),t("a-range-picker")],1),t("div",[t("a-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:e.getList}},[e._v("查询")])],1)]),t("a-table",{attrs:{pagination:!1,columns:e.columns,rowKey:"id","data-source":e.tableData},scopedSlots:e._u([{key:"channel",fn:function(r){return t("a",{},[e._v(e._s(e.getLable(e.item)))])}},{key:"action",fn:function(r,a){return t("span",{},[t("a",[e._v("编辑")]),t("a",{staticStyle:{"margin-left":"10px"}},[e._v("删除")])])}}])},[t("span",{attrs:{slot:"customTitle"},slot:"customTitle"},[t("a-icon",{attrs:{type:"smile-o"}}),e._v(" Name")],1)]),t("div",{staticStyle:{"text-align":"right","margin-top":"10px"}},[t("a-pagination",{attrs:{"page-size-options":e.pageSizeOptions,total:e.total,"show-size-changer":"","page-size":e.per_page},on:{change:e.changePageIndex,showSizeChange:e.onShowSizeChange},scopedSlots:e._u([{key:"buildOptionText",fn:function(r){return[t("span",[e._v(e._s(r.value)+"条/页")])]}}]),model:{value:e.page,callback:function(t){e.page=t},expression:"page"}})],1)],1)},n=[],i=(r("d3b7"),r("159b"),r("b64b"),r("73f5")),o=r("2af9"),s={components:{ContentHeader:o["a"],STable:o["d"]},data:function(){return{formInline:{source:""},tableData:[],columns:[{title:"ID",dataIndex:"id"},{title:"编码",dataIndex:"catalog_code"},{title:"名称",dataIndex:"catalog_name"},{title:"价格",dataIndex:"cost_price"},{title:"分类",dataIndex:"bu_name"},{title:"来源",dataIndex:"channel"},{title:"添加时间",dataIndex:"create_time"},{title:"更新时间",dataIndex:"update_time"},{title:"操作",dataIndex:"action",width:"100px",scopedSlots:{customRender:"action"}}],total:0,pageSizeOptions:["15","25","50","100"],page:1,per_page:15,checkList:[],channel:null}},created:function(){this.getDataList(),this.getList()},methods:{onShowSizeChange:function(e,t){this.per_page=t,this.getList()},changePageIndex:function(e){this.page=e,this.getList()},getDataList:function(){var e=this;return i["c"]().then((function(t){var r=t.data;Object.keys(r).forEach((function(t){e.checkList.push({id:t,name:r[t]})}))}))},getChannel:function(e){this.channel=e},getList:function(){var e=this,t={channel:this.channel,page:this.page,per_page:this.per_page};return i["d"](t).then((function(t){e.tableData=t.data.list.data,e.total=t.data.list.total}))},getLable:function(e){}}},l=s,c=(r("958d"),r("2877")),u=Object(c["a"])(l,a,n,!1,null,"7befcb3a",null);t["default"]=u.exports},c204:function(e,t,r){},c7eb:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var a=r("53ca");function n(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
n=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.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(A){u=function(e,t,r){return e[t]=r}}function d(e,t,r,a){var n=t&&t.prototype instanceof h?t:h,o=Object.create(n.prototype),s=new F(a||[]);return i(o,"_invoke",{value:L(e,r,s)}),o}function m(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(A){return{type:"throw",arg:A}}}e.wrap=d;var f={};function h(){}function p(){}function b(){}var v={};u(v,s,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(j([])));w&&w!==t&&r.call(w,s)&&(v=w);var y=b.prototype=h.prototype=Object.create(v);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,o,s,l){var c=m(e[i],e,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Object(a["a"])(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(d).then((function(e){u.value=e,s(u)}),(function(e){return n("throw",e,s,l)}))}l(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function L(e,t,r){var a="suspendedStart";return function(n,i){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===n)throw i;return O()}for(r.method=n,r.arg=i;;){var o=r.delegate;if(o){var s=_(o,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===a)throw a="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a="executing";var l=m(e,t,r);if("normal"===l.type){if(a=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a="completed",r.method="throw",r.arg=l.arg)}}}function _(e,t){var r=t.method,a=e.iterator[r];if(void 0===a)return t.delegate=null,"throw"===r&&e.iterator["return"]&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var n=m(a,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}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 S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function j(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,n=function t(){for(;++a<e.length;)if(r.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=b,i(y,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:p,configurable:!0}),p.displayName=u(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},C(x.prototype),u(x.prototype,l,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,a,n,i){void 0===i&&(i=Promise);var o=new x(d(t,r,a,n),i);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(y),u(y,c,"Generator"),u(y,s,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=j,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(r,a){return o.type="throw",o.arg=e,t.next=r,a&&(t.method="next",t.arg=void 0),!!a}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(o)},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),f},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),S(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;S(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}},db8a:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return s})),r.d(t,"b",(function(){return l}));var a=r("f6ae"),n=r("b775");function i(e){return Object(n["b"])({url:a["a"].store.api.list,method:"get",params:e})}function o(e){return Object(n["b"])({url:a["a"].store.api.add,method:"post",data:e})}function s(e){return Object(n["b"])({url:a["a"].store.api.edit,method:"post",data:e})}function l(e){return Object(n["b"])({url:a["a"].store.api.delete,method:"post",data:e})}},f833:function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("content-header",{attrs:{title:"菜单列表"}}),t("a-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{message:e.warningText,type:"warning","show-icon":""}}),t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),t("a-table",{attrs:{rowKey:"menu_id",columns:e.columns,"data-source":e.list,loading:e.isLoading,pagination:!1},scopedSlots:e._u([{key:"actions",fn:function(r,a){return t("span",{},e._l(a.actions,(function(r,a){return t("a-dropdown",{key:a,attrs:{title:"操作"}},[t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",{on:{click:function(t){return e.handleActionEdit(r)}}},[e._v("编辑")]),t("a-menu-item",{on:{click:function(t){return e.handleSetApi(r)}}},[e._v("API权限")]),t("a-menu-item",{on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])],1),t("a-tag",[e._v(e._s(r.name))])],1)})),1)}},{key:"action",fn:function(r,a){return t("span",{staticClass:"actions"},[t("a",{on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]),t("a-dropdown",[t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",[t("a",{on:{click:function(t){return e.handleSetApi(a)}}},[e._v("API权限")])]),t("a-menu-item",[t("a",{on:{click:function(t){return e.handleActionAdd(a)}}},[e._v("新增操作")])]),t("a-menu-item",[t("a",{on:{click:function(t){return e.handleDelete(a)}}},[e._v("删除")])])],1),t("a",[t("span",[e._v("更多")]),t("a-icon",{attrs:{type:"down"}})],1)],1)],1)}}])}),t("add-form",{ref:"AddForm",attrs:{menuList:e.list},on:{handleSubmit:e.handleRefresh}}),t("edit-form",{ref:"EditForm",attrs:{menuList:e.list},on:{handleSubmit:e.handleRefresh}}),t("action-form",{ref:"ActionForm",attrs:{menuList:e.list},on:{handleSubmit:e.handleRefresh}}),t("set-api-form",{ref:"SetApiForm",attrs:{apiList:e.apiList},on:{handleSubmit:e.handleRefresh}})],1)},n=[],i=r("c7eb"),o=r("1da1"),s=(r("d3b7"),r("159b"),r("4de4"),r("f6ae")),l=r("b775");function c(e){return Object(l["b"])({url:s["a"].store.menu.list,method:"get",params:e})}function u(e){return Object(l["b"])({url:s["a"].store.menu.info,method:"get",params:e})}function d(e){return Object(l["b"])({url:s["a"].store.menu.add,method:"post",data:e})}function m(e){return Object(l["b"])({url:s["a"].store.menu.edit,method:"post",data:e})}function f(e){return Object(l["b"])({url:s["a"].store.menu.setApis,method:"post",data:e})}function h(e){return Object(l["b"])({url:s["a"].store.menu.delete,method:"post",data:e})}var p=r("db8a"),b=r("2af9"),v=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:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }]} ]"}]})],1),t("a-form-item",{attrs:{label:"上级菜单",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"默认为顶级菜单"}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["parent_id",{rules:[{required:!0}]}],expression:"['parent_id', { rules: [{ required: true }] }]"}],attrs:{"tree-data":e.menuListTreeData,"dropdown-style":{maxHeight:"400px",overflow:"auto"},"allow-clear":""}})],1),t("a-form-item",{attrs:{label:"菜单path",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"指向的页面path"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["path",{rules:[{required:!0,message:"请输入菜单path"}]}],expression:"['path', { rules: [{ required: true, message: '请输入菜单path' }] }]"}]})],1),t("a-form-item",{attrs:{label:"是否为页面",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"如果为否,则为纯菜单项,仅做用于父级菜单使用"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_page",{initialValue:1,rules:[{required:!0}]}],expression:"['is_page', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("是")]),t("a-radio",{attrs:{value:0}},[e._v("否")])],1)],1),t("a-form-item",{attrs:{label:"功能模块key",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["module_key"],expression:"['module_key']"}]})],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)},g=[],w=r("5530"),y={props:{menuList:{type:Array,required:!0}},data:function(){return{labelCol:{xs:{span:24},sm:{span:7}},wrapperCol:{xs:{span:24},sm:{span:13}},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),menuListTreeData:[]}},methods:{show:function(){this.visible=!0,this.getMenuList(),this.setFieldsValue()},setFieldsValue:function(){var e=this;this.$nextTick((function(){e.form.resetFields(),e.form.setFieldsValue({parent_id:0})}))},getMenuList:function(){var e=this.menuList,t=this.formatTreeData(e);t.unshift({title:"顶级菜单",key:0,value:0}),this.menuListTreeData=t},formatTreeData:function(e){var t=this,r=[];return e.forEach((function(e){var a={title:e.name,key:e.menu_id,value:e.menu_id};e.hasOwnProperty("children")&&(a["children"]=t.formatTreeData(e["children"])),r.push(a)})),r},handleSubmit:function(){var e=this,t=this.form.validateFields;t((function(t,r){t||e.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,d({form:Object(w["a"])({type:10},e)}).then((function(r){t.$message.success(r.message),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},C=y,x=r("2877"),L=Object(x["a"])(C,v,g,!1,null,null,null),_=L.exports,k=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:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"上级菜单",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"默认为顶级菜单"}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["parent_id",{rules:[{required:!0}]}],expression:"['parent_id', { rules: [{ required: true }] }]"}],attrs:{"tree-data":e.menuListTreeData,"dropdown-style":{maxHeight:"400px",overflow:"auto"},"allow-clear":""}})],1),t("a-form-item",{attrs:{label:"菜单path",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"指向的页面path"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["path",{rules:[{required:!0,message:"请输入菜单path"}]}],expression:"['path', { rules: [{ required: true, message: '请输入菜单path' }] }]"}]})],1),t("a-form-item",{attrs:{label:"是否为页面",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"如果为否,则为纯菜单项,仅做用于父级菜单使用"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_page",{initialValue:1,rules:[{required:!0}]}],expression:"['is_page', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("是")]),t("a-radio",{attrs:{value:0}},[e._v("否")])],1)],1),t("a-form-item",{attrs:{label:"功能模块key",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["module_key"],expression:"['module_key']"}]})],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)},S=[],F=(r("caad"),r("2532"),r("88bc")),j=r.n(F),O={props:{menuList:{type:Array,required:!0}},data:function(){return{labelCol:{xs:{span:24},sm:{span:7}},wrapperCol:{xs:{span:24},sm:{span:13}},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{},menuListTreeData:[]}},created:function(){},methods:{show:function(e){var t=this;return Object(o["a"])(Object(i["a"])().mark((function r(){return Object(i["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.visible=!0,r.next=3,t.getMenuInfo(e);case 3:t.getMenuList(),t.setFieldsValue();case 5:case"end":return r.stop()}}),r)})))()},getMenuInfo:function(e){var t=this;return Object(o["a"])(Object(i["a"])().mark((function r(){return Object(i["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.confirmLoading=!0,r.next=3,u({menu_id:e.menu_id}).then((function(e){return e.data.info}));case 3:t.record=r.sent,t.confirmLoading=!1;case 5:case"end":return r.stop()}}),r)})))()},setFieldsValue:function(){var e=this;this.$nextTick((function(){e.form.setFieldsValue(j()(e.record,["name","path","module_key","is_page","parent_id","sort"]))}))},getMenuList:function(){var e=this.menuList,t=this.formatTreeDataForMenuList(e);t.unshift({title:"顶级菜单",key:0,value:0}),this.menuListTreeData=t},formatTreeDataForMenuList:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=[];return e.forEach((function(e){var n={title:e.name,key:e.menu_id,value:e.menu_id};([e.menu_id,e.parent_id].includes(t.record.menu_id)||!0===r)&&(n.disabled=!0),e.children&&e.children.length&&(n["children"]=t.formatTreeDataForMenuList(e["children"],n.disabled)),a.push(n)})),a},handleSubmit:function(){var e=this,t=this.form.validateFields;this.confirmLoading=!0,t((function(t,r){t?e.confirmLoading=!1:e.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;m({menuId:this.record["menu_id"],form:e}).then((function(r){t.$message.success(r.message),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},A=O,D=Object(x["a"])(A,k,S,!1,null,null,null),T=D.exports,I=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.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:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}]})],1),t("a-form-item",{attrs:{label:"权限标识",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["action_mark",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['action_mark', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}]})],1),t("a-form-item",{attrs:{label:"功能模块key",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["module_key"],expression:"['module_key']"}]})],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)},E=[],q={props:{menuList:{type:Array,required:!0}},data:function(){return{scene:"add",title:"新增权限",labelCol:{xs:{span:24},sm:{span:7}},wrapperCol:{xs:{span:24},sm:{span:13}},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),parentId:0,record:{}}},methods:{add:function(e){this.visible=!0,this.scene="add",this.title="新增操作权限",this.parentId=e,this.setFieldsValue()},edit:function(e){this.visible=!0,this.scene="edit",this.title="编辑操作权限",this.record=e,this.setFieldsValue(e)},setFieldsValue:function(e){var t=this;this.$nextTick((function(){t.form.resetFields(),e&&t.form.setFieldsValue(j()(e,["name","action_mark","sort"]))}))},handleSubmit:function(){var e=this,t=this.form.validateFields;t((function(t,r){t?e.confirmLoading=!1:e.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1},onFormSubmit:function(e){var t=this;this.confirmLoading=!0;var r=function(r){t.$message.success(r.message),t.visible=!1,t.form.resetFields(),t.$emit("handleSubmit",e)};"add"===this.scene?(e.parent_id=this.parentId,d({form:Object(w["a"])({type:20},e)}).then((function(e){return r(e)})).finally((function(){t.confirmLoading=!1}))):"edit"===this.scene&&m({menuId:this.record["menu_id"],form:e}).then((function(e){return r(e)})).finally((function(){t.confirmLoading=!1}))}}},$=q,N=Object(x["a"])($,I,E,!1,null,null,null),V=N.exports,P=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.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",{staticStyle:{"margin-bottom":"5px"},attrs:{label:(10===e.record.type?"菜单":"操作")+"名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",{staticStyle:{"margin-left":"23px",color:"rgba(0, 0, 0, 0.85)"}},[e._v(e._s(e.record.name))])]),t("a-form-item",{attrs:{label:"API权限",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"设置该菜单或操作使用的API权限"}},[t("a-tree",{ref:"ApiTree",attrs:{checkable:"",multiple:"",treeData:e.apiListTreeData,autoExpandParent:!1},model:{value:e.checkedKeys,callback:function(t){e.checkedKeys=t},expression:"checkedKeys"}})],1)],1)],1)],1)},R=[],M=r("2909"),K=(r("99af"),r("2ef0")),G=r.n(K),z={props:{apiList:{type:Array,required:!0}},data:function(){return{title:"设置API权限",labelCol:{xs:{span:24},sm:{span:7}},wrapperCol:{xs:{span:24},sm:{span:13}},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{},apiListTreeData:[],checkedKeys:[]}},methods:{show:function(e){this.visible=!0,this.record=e,this.menuId=e.menu_id,this.getApiList(),this.setApiChecked()},getApiList:function(){var e=this.apiList,t=this.formatTreeDataForApiList(e);this.apiListTreeData=t},setApiChecked:function(){var e=function e(t){var r=[];return t.forEach((function(t){if(t.children&&t.children.length){var a=e(t.children);a.length&&(r=r.concat(a))}else r.push(t.key)})),r},t=this.apiListTreeData,r=this.record,a=e(t);this.checkedKeys=G.a.intersection(r.apiIds,a)},formatTreeDataForApiList:function(e){var t=this,r=[];return e.forEach((function(e){var a={title:e.name,key:e.api_id};e.children&&e.children.length&&(a["children"]=t.formatTreeDataForApiList(e["children"])),r.push(a)})),r},handleSubmit:function(){var e=this.$refs.ApiTree,t={apiIds:[].concat(Object(M["a"])(e.getCheckedKeys()),Object(M["a"])(e.getHalfCheckedKeys()))};this.onFormSubmit(t)},handleCancel:function(){this.visible=!1,this.form.resetFields();var e=this.$refs.ApiTree;e.clearExpandedKeys(),this.checkedKeys=[]},onFormSubmit:function(e){var t=this;this.confirmLoading=!0;var r=function(r){t.$message.success(r.message),t.handleCancel(),t.$emit("handleSubmit",e)};f({menu_id:this.record["menu_id"],form:e}).then((function(e){return r(e)})).finally((function(){t.confirmLoading=!1}))}}},H=z,J=Object(x["a"])(H,P,R,!1,null,null,null),Y=J.exports,B={components:{ContentHeader:b["a"],STable:b["d"],AddForm:_,EditForm:T,ActionForm:V,SetApiForm:Y},data:function(){return{warningText:"此处用于管理商户后台的菜单数据,请勿对本页面数据进行更改(会导致系统无法更新升级)",isLoading:!1,columns:[{title:"菜单ID",dataIndex:"menu_id"},{title:"菜单名称",dataIndex:"name"},{title:"path",dataIndex:"path"},{title:"可操作权限",dataIndex:"actions",scopedSlots:{customRender:"actions"}},{title:"排序",dataIndex:"sort"},{title:"操作",dataIndex:"action",width:"250px",scopedSlots:{customRender:"action"}}],list:[],apiList:[]}},created:function(){this.getListData()},methods:{getListData:function(){var e=this;this.isLoading=!0,c().then((function(t){e.list=e.onFormatMenuList(t.data.list)})).finally((function(){return e.isLoading=!1}))},onFormatMenuList:function(e){var t=this,r=[];return e.forEach((function(e){10===e.type&&(e.children&&(e.actions=e.children.filter((function(e){return 20===e.type})),e.children=t.onFormatMenuList(e.children),!e.children.length&&delete e.children,!e.actions.length&&delete e.actions),r.push(e))})),r},getApiList:function(){var e=this;return Object(o["a"])(Object(i["a"])().mark((function t(){return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isLoading=!0,t.next=3,p["d"]().then((function(t){e.apiList=t.data.list})).finally((function(){return e.isLoading=!1}));case 3:case"end":return t.stop()}}),t)})))()},handleAdd:function(){this.$refs.AddForm.show()},handleEdit:function(e){this.$refs.EditForm.show(e)},handleSetApi:function(e){var t=this;return Object(o["a"])(Object(i["a"])().mark((function r(){return Object(i["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,t.getApiList();case 2:t.$refs.SetApiForm.show(e);case 3:case"end":return r.stop()}}),r)})))()},handleDelete:function(e){var t=this;t.$confirm({title:"您确定要删除该记录吗?",content:"确认后将无法恢复",onOk:function(){return t.onSubmitDelete(e)}})},onSubmitDelete:function(e){var t=this;return h({menuId:e["menu_id"]}).then((function(e){t.$message.success(e.message),t.handleRefresh()}))},handleRefresh:function(){this.getListData()},handleActionAdd:function(e){this.$refs.ActionForm.add(e.menu_id)},handleActionEdit:function(e){this.$refs.ActionForm.edit(e)}}},Q=B,U=(r("16a5"),Object(x["a"])(Q,a,n,!1,null,"669d76dd",null));t["default"]=U.exports}}]);