mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-15 04:52:50 +00:00
1 line
38 KiB
JavaScript
1 line
38 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0f5e790c"],{"129f":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},"160c":function(t,e,r){},2604:function(t,e,r){"use strict";var n=r("ee2f");r.n(n).a},4315:function(t,e,r){"use strict";r.r(e),r("a4d3"),r("e01a"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("131a"),r("fb6a");var n=r("0122"),o=r("c964"),i=r("f3f3"),a=(r("caad"),r("2532"),r("c740"),r("a434"),r("b0c0"),r("498a"),r("d3b7"),r("25f0"),r("b64b"),r("d81d"),r("159b"),r("2f62")),s=r("46c4"),c=r("30ba"),l=(c=r.n(c),r("ac1f"),r("5319"),r("5b81"),r("4de4"),r("841c"),r("5bb2"));function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(e){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i,a,s,c;e=e&&e.prototype instanceof m?e:m,e=Object.create(e.prototype),n=new k(n||[]);return o(e,"_invoke",{value:(i=t,a=r,s=n,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return O()}for(s.method=t,s.arg=e;;){var r=s.delegate;if(r&&(r=function t(e,r){var n=r.method,o=e.iterator[n];return void 0===o?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f):(n=d(o,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,f):(o=n.arg,o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)))}(r,s),r)){if(r===f)continue;return r}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===c)throw c="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(c="executing",r=d(i,a,s),"normal"===r.type){if(c=s.done?"completed":"suspendedYield",r.arg===f)continue;return{value:r.arg,done:s.done}}"throw"===r.type&&(c="completed",s.method="throw",s.arg=r.arg)}})}),e}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function m(){}function p(){}function g(){}i={};var v=(l(i,a,(function(){return this})),Object.getPrototypeOf),y=(v=v&&v(v(L([]))),v&&v!==e&&r.call(v,a)&&(i=v),g.prototype=m.prototype=Object.create(i));function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var i;o(this,"_invoke",{value:function(o,a){function s(){return new e((function(i,s){!function o(i,a,s,c){var l;i=d(t[i],t,a);if("throw"!==i.type)return(a=(l=i.arg).value)&&"object"==Object(n.a)(a)&&r.call(a,"__await")?e.resolve(a.__await).then((function(t){o("next",t,s,c)}),(function(t){o("throw",t,s,c)})):e.resolve(a).then((function(t){l.value=t,s(l)}),(function(t){return o("throw",t,s,c)}));c(i.arg)}(o,a,i,s)}))}return i=i?i.then(s,s):s()}})}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(t){if(t){var e,n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:O}}function O(){return{value:void 0,done:!0}}return o(y,"constructor",{value:p.prototype=g,configurable:!0}),o(g,"constructor",{value:p,configurable:!0}),p.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),l(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(h(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),l(y,c,"Generator"),l(y,a,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=L,k.prototype={constructor:k,reset:function(t){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(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;0<=o;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,x(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var h={name:"menusFrom",props:{formValidate:{type:Object,default:null},titleFrom:{type:String,default:""}},data:function(){return{arrs:[],searchRule:"",iconVal:"",grid:{xl:24,lg:24,md:24,sm:24,xs:24},modals:!1,modal12:!1,FromData:[],valids:!1,list2:[],list:l.a,authType:!0,search:l.a,ruleModal:!1,ruleList:[],searchData:[]}},watch:{"formValidate.header":function(t){this.formValidate.is_header=t?1:0},"formValidate.auth_type":function(t){this.authType=1===(t=void 0===t?1:t)},"formValidate.data":function(t){}},computed:{optionsList:function(){var t=[];return this.FromData.map((function(e){"pid"===e.field&&(t=e.options)})),t},headerOptionsList:function(){var t=[];return this.FromData.map((function(e){"header"===e.field&&(t=e.options)})),t},optionsListmodule:function(){var t=[];return this.FromData.map((function(e){"module"===e.field&&(t=e.options)})),t},optionsRadio:function(){var t=[];return this.FromData.map((function(e){"auth_type"===e.field&&(t=e.options)})),t},isheaderRadio:function(){var t=[];return this.FromData.map((function(e){"is_header"===e.field&&(t=e.options)})),t},isShowRadio:function(){var t=[];return this.FromData.map((function(e){"is_show"===e.field&&(t=e.options)})),t},isShowPathRadio:function(){var t=[];return this.FromData.map((function(e){"is_show_path"===e.field&&(t=e.options)})),t},menuList:function(){var t=[];return this.FromData.map((function(e){"menu_list"===e.field&&(t=e.props.options)})),t}},methods:{getRuleList:function(){var t=this;Object(s.d)().then((function(e){t.ruleList=e.data,t.ruleModal=!0}))},modalchange:function(){this.arrs=[],this.ruleModal="",this.ruleModal=!1},changeUnique:function(t){t=this.$routeProStr+t.target.value,"/"===t.slice(0,1)&&(t=t.replace("/","")),this.formValidate.unique_auth=t.replaceAll("/","-")},visible:function(){this.authType=!0},selectRule:function(t){var e=this;this.$emit("selectRule",t),this.$nextTick((function(t){e.ruleModal=!1}))},changeRadio:function(t){this.authType=1===t},upIcon:function(t){var e=this;this.searchData=this.list.filter((function(t){return-1<t.indexOf(e.iconVal)}))},searchRules:function(){if(this.searchRule.trim()){this.arrs=[];for(var t=0;t<this.ruleList.length;t++)-1!==this.ruleList[t].real_name.indexOf(this.searchRule)&&this.arrs.push(t)}else this.arrs=[]},init:function(){this.searchRule="",this.arrs=[]},handleCreate1:function(t){this.headerOptionsList.push({value:t,label:t})},getAddFrom:function(){var t=this;Object(s.a)().then(function(){var e=Object(o.a)(u().mark((function e(r){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.FromData=r.data.rules;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.msg)}))},iconClick:function(){this.modal12=!0},iconChange:function(t){this.formValidate.icon=t,this.modal12=!1},handleSubmit:function(t){var e=this,r=(this.formValidate.path&&(r=this.formValidate.path.length,this.formValidate.pid=this.formValidate.path[r-1]||0),{url:this.formValidate.id?"/setting/menus/".concat(this.formValidate.id):"/setting/menus",method:this.formValidate.id?"put":"post",datas:this.formValidate});if(this.authType){if(!this.formValidate.menu_name)return this.$message.warning("请填写按钮名称");if(!this.formValidate.menu_path)return this.$message.warning("请填写路由地址")}else{if(!this.formValidate.menu_name)return this.$message.warning("请填写接口名称");if(!this.formValidate.methods)return this.$message.warning("请选择请求方式");if(!this.formValidate.api_url)return this.$message.warning("请选择接口地址")}this.valids=!0,Object(s.b)(r).then(function(){var t=Object(o.a)(u().mark((function t(r){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(r.msg),e.modals=!1,e.$emit("changeMenu",e.formValidate),e.getAddFrom();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.valids=!1,e.$message.error(t.msg)}))},handleReset:function(){this.modals=!1,this.authType=!0,this.$refs.formValidate.resetFields(),this.$emit("clearFrom")}},created:function(){this.list=this.search,this.getAddFrom()}},d=(r("7e51"),r("2877")),f=(h=Object(d.a)(h,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("el-dialog",{attrs:{visible:t.modals,width:"540px",title:t.titleFrom,"close-on-click-modal":!1},on:{"update:visible":function(e){t.modals=e},closed:t.visible}},[r("el-form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":"80px"},nativeOn:{submit:function(t){t.preventDefault()}}},[r("el-row",{attrs:{gutter:24}},[r("el-col",t._b({},"el-col",t.grid,!1),[r("el-form-item",{attrs:{label:t.authType?"按钮名称:":"接口名称:",prop:"menu_name"}},[r("div",{staticClass:"add"},[r("el-input",{attrs:{placeholder:t.authType?"请输入按钮名称":"请输入接口名称"},model:{value:t.formValidate.menu_name,callback:function(e){t.$set(t.formValidate,"menu_name",e)},expression:"formValidate.menu_name"}})],1)])],1),r("el-col",t._b({},"el-col",t.grid,!1),[r("el-form-item",{attrs:{label:"父级分类:"}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{options:t.menuList,"change-on-select":"",filterable:""},model:{value:t.formValidate.path,callback:function(e){t.$set(t.formValidate,"path",e)},expression:"formValidate.path"}})],1)],1),t.authType?r("el-col",t._b({},"el-col",t.grid,!1),[r("el-form-item",{attrs:{label:"图标:"}},[r("el-input",{attrs:{placeholder:"请选择图标,点击右面图标",icon:"ios-appstore"},model:{value:t.formValidate.icon,callback:function(e){t.$set(t.formValidate,"icon",e)},expression:"formValidate.icon"}},[r("el-button",{attrs:{slot:"append",icon:"el-icon-picture-outline"},on:{click:t.iconClick},slot:"append"})],1)],1)],1):t._e(),t.authType?r("el-col",t._b({},"el-col",t.grid,!1),[r("el-form-item",{attrs:{label:"排序:"}},[r("el-input",{attrs:{type:"number",placeholder:"请输入排序",number:""},model:{value:t.formValidate.sort,callback:function(e){t.$set(t.formValidate,"sort",e)},expression:"formValidate.sort"}})],1)],1):t._e(),r("el-col",t._b({},"el-col",t.grid,!1),[r("el-form-item",{attrs:{label:"是否显示:"}},[r("el-radio-group",{model:{value:t.formValidate.is_show_path,callback:function(e){t.$set(t.formValidate,"is_show_path",e)},expression:"formValidate.is_show_path"}},t._l(t.isShowPathRadio,(function(e,n){return r("el-radio",{key:n,attrs:{label:e.value}},[r("span",[t._v(t._s(e.label))])])})),1)],1)],1)],1)],1),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:t.handleReset}},[t._v("取 消")]),r("el-button",{attrs:{type:"primary",disabled:t.valids},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提 交")])],1)],1),r("el-dialog",{attrs:{visible:t.modal12,width:"720px",title:"图标选择"},on:{"update:visible":function(e){t.modal12=e}}},[r("el-input",{ref:"search",staticStyle:{width:"300px"},attrs:{placeholder:"输入关键词搜索,注意全是英文",clearable:""},on:{change:function(e){return t.upIcon(t.iconVal)}},model:{value:t.iconVal,callback:function(e){t.iconVal=e},expression:"iconVal"}}),r("div",{staticClass:"trees-coadd"},[r("div",{staticClass:"scollhide"},[r("div",{staticClass:"iconlist"},[r("ul",{staticClass:"list-inline"},t._l(t.iconVal?t.searchData:t.list,(function(e,n){return r("li",{key:n,staticClass:"icons-item",attrs:{title:e}},[r("i",{staticClass:"f-s-24",class:"el-icon-"+e,on:{click:function(r){return t.iconChange(e)}}})])})),0)])])])],1),r("el-dialog",{attrs:{visible:t.ruleModal,width:"1100px",title:"权限列表"},on:{"update:visible":function(e){t.ruleModal=e},closed:t.modalchange}},[r("div",{staticClass:"search-rule"},[r("el-input",{ref:"search",staticClass:"mr10",staticStyle:{width:"300px"},attrs:{placeholder:"输入关键词搜索",clearable:""},model:{value:t.searchRule,callback:function(e){t.searchRule=e},expression:"searchRule"}}),r("el-button",{staticClass:"mr10",attrs:{type:"primary"},on:{click:t.searchRules}},[t._v("搜索")]),r("el-button",{on:{click:t.init}},[t._v("重置")])],1),r("div",{staticClass:"rule"},t._l(t.ruleList,(function(e,n){return r("div",{directives:[{name:"show",rawName:"v-show",value:!t.arrs.length||t.arrs.includes(n),expression:"!arrs.length || arrs.includes(index)"}],key:n,staticClass:"rule-list",class:{"select-rule":t.arrs.includes(n)},on:{click:function(r){return t.selectRule(e)}}},[r("div",[t._v("接口名称:"+t._s(e.real_name))]),r("div",[t._v("请求方式:"+t._s(e.method))]),r("div",[t._v("接口地址:"+t._s(e.rule))])])})),0)])],1)}),[],!1,null,"23232ec9",null).exports,r("6987"));function m(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */m=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(e){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i,a,s,c;e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),n=new k(n||[]);return o(e,"_invoke",{value:(i=t,a=r,s=n,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return O()}for(s.method=t,s.arg=e;;){var r=s.delegate;if(r&&(r=function t(e,r){var n=r.method,o=e.iterator[n];return void 0===o?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d):(n=h(o,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,d):(o=n.arg,o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)))}(r,s),r)){if(r===d)continue;return r}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===c)throw c="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(c="executing",r=h(i,a,s),"normal"===r.type){if(c=s.done?"completed":"suspendedYield",r.arg===d)continue;return{value:r.arg,done:s.done}}"throw"===r.type&&(c="completed",s.method="throw",s.arg=r.arg)}})}),e}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function p(){}function g(){}i={};var v=(l(i,a,(function(){return this})),Object.getPrototypeOf),y=(v=v&&v(v(L([]))),v&&v!==e&&r.call(v,a)&&(i=v),g.prototype=f.prototype=Object.create(i));function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var i;o(this,"_invoke",{value:function(o,a){function s(){return new e((function(i,s){!function o(i,a,s,c){var l;i=h(t[i],t,a);if("throw"!==i.type)return(a=(l=i.arg).value)&&"object"==Object(n.a)(a)&&r.call(a,"__await")?e.resolve(a.__await).then((function(t){o("next",t,s,c)}),(function(t){o("throw",t,s,c)})):e.resolve(a).then((function(t){l.value=t,s(l)}),(function(t){return o("throw",t,s,c)}));c(i.arg)}(o,a,i,s)}))}return i=i?i.then(s,s):s()}})}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(t){if(t){var e,n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:O}}function O(){return{value:void 0,done:!0}}return o(y,"constructor",{value:p.prototype=g,configurable:!0}),o(g,"constructor",{value:p,configurable:!0}),p.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),l(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),l(y,c,"Generator"),l(y,a,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=L,k.prototype={constructor:k,reset:function(t){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(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;0<=o;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,x(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}h={name:"systemMenus",data:function(){return{children:[],expandedKeys:[],tabconfig:{children:"children",reserve:!0,accordion:!0},spinShow:!1,ruleModal:!1,searchRule:"",grid:{xl:7,lg:7,md:12,sm:24,xs:24},roleData:{is_show:1,keyword:""},defaultProps:{children:"children",label:"name"},ruleCateList:[],loading:!1,tableData:[],FromData:null,icons:"",formValidate:{},titleFrom:"",modalTitleSs:"",routeType:"0",arrs:[],foundationList:[],openList:[],seletRoute:[],seletRouteIds:[],menusId:0,nodeKey:0,openId:""}},components:{menusFrom:h,formCreate:c.a.$form()},computed:Object(i.a)(Object(i.a)({},Object(a.d)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.getData()},methods:{init:function(){this.searchRule="",this.searchRules()},addRouters:function(){var t=this,e={menus:this.seletRoute};Object(s.g)(e).then((function(e){t.getData()})).catch((function(e){t.$message.error(e.msg)}))},selectRule:function(t){var e;this.seletRouteIds.includes(t.id)?(e=this.seletRouteIds.findIndex((function(e){return e==t.id})),this.seletRouteIds.splice(e,1),this.seletRoute.splice(e,1)):(this.seletRouteIds.push(t.id),this.seletRoute.push({menu_name:t.name,unique_auth:"",api_url:t.path,path:this.menusId,method:t.method}))},changTab:function(t){this.routeType=t,t=parseInt(t),this.children=this.foundationList[t]?this.foundationList[t].children:[],this.searchRules()},searchRules:function(){if(this.searchRule.trim()){this.arrs=[];for(var t=this.foundationList,e=0;e<t.length;e++)-1!==t[e].name.indexOf(this.searchRule)&&this.arrs.push(t[e].id)}else this.arrs=[]},addRoute:function(t){var e=this;this.menusId=t.id,this.routeType="0",Object(s.i)().then((function(t){e.ruleCateList=t.data,e.ruleModal=!0,t.data.length&&e.$nextTick((function(r){e.expandedKeys=Object(f.b)(t.data[0],[]),e.nodeKey=Object(f.a)(t.data).id,e.$refs.treeBox.setCurrentKey(e.nodeKey),e.getRuleList(e.nodeKey)}))}))},handleNodeClick:function(t){this.getRuleList(t.id)},modalchange:function(){this.seletRouteIds=[],this.seletRoute=[]},getRuleList:function(t){var e=this;Object(s.d)(t).then((function(t){e.foundationList=t.data,e.children=t.data,e.searchRules()}))},onchangeIsShow:function(t){var e=this;t={id:t.id,is_show_path:t.is_show_path,is_show:-1};Object(s.f)(t).then(function(){var t=Object(o.a)(m().mark((function t(r){return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(r.msg),e.$store.dispatch("menus/getMenusNavList");case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.msg)}))},getList:function(){this.formValidate=Object.assign({},this.$options.data().formValidate),this.getData()},clearFrom:function(){this.formValidate=Object.assign({},this.$options.data().formValidate)},addE:function(t,e){var r=this,n=(this.formValidate={},t.id.toString());n?Object(s.h)(t.id).then(function(){var i=Object(o.a)(m().mark((function o(i){return m().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:r.formValidate.path=i.data.path,r.formValidate.path.push(t.id),r.formValidate.pid=n,r.$refs.menusFrom.modals=!0,r.$refs.menusFrom.valids=!1,r.titleFrom=e,r.formValidate.auth_type=1,r.formValidate.is_show=0,r.formValidate.is_show_path=0;case 9:case"end":return o.stop()}}),o)})));return function(t){return i.apply(this,arguments)}}()).catch((function(t){r.$message.error(t.msg)})):(this.formValidate.pid=n,this.$refs.menusFrom.modals=!0,this.$refs.menusFrom.valids=!1,this.titleFrom=e,this.formValidate.auth_type=1,this.formValidate.is_show=0,this.formValidate.is_show_path=0)},del:function(t,e){var r=this;e={title:e,url:"/setting/menus/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){r.$message.success(t.msg),r.getData(),r.getMenusUnique()})).catch((function(t){r.$message.error(t.msg)}))},menusDetails:function(t){var e=this;Object(s.h)(t).then(function(){var t=Object(o.a)(m().mark((function t(r){return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.formValidate=r.data,e.$refs.menusFrom.modals=!0;case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.msg)}))},edit:function(t,e,r){this.openId=t.id,this.formValidate={},this.menusDetails(t.id),this.titleFrom=e,this.$refs.menusFrom.valids=!1,this.$refs.menusFrom.getAddFrom(t.id)},menusAdd:function(t){this.formValidate={},this.$refs.menusFrom.modals=!0,this.$refs.menusFrom.valids=!1,this.titleFrom=t,this.formValidate.auth_type=1,this.formValidate.is_show=0,this.formValidate.is_show_path=0},getData:function(){var t=this;this.loading=!0,Object(s.e)(this.roleData).then(function(){var e=Object(o.a)(m().mark((function e(r){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.tableData=r.data,t.loading=!1;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$message.error(e.msg)}))},changeMenu:function(t){this.changeData(this.tableData,t),this.getMenusUnique()},changeData:function(t,e){var r=this,n=Object.keys(e);t.map((function(t){t.id==r.openId?n.map((function(r){t[r]=e[r]})):t.children&&r.changeData(t.children,e)}))},getMenusUnique:function(){var t=this;Object(s.c)().then((function(e){e=e.data;var r=(t.$store.commit("userInfo/uniqueAuth",e.uniqueAuth),t.$store.commit("menus/getmenusNav",e.menus),t.$store.dispatch("routesList/setRoutesList",e.menus),Object(f.c)(t.$router.options.routes));t.formatTwoStageRoutes(r),r=Object(f.c)(e.menus);t.$store.commit("menus/setOneLvRoute",r),t.bus.$emit("routesListChange")}))},formatTwoStageRoutes:function(t){var e,r,n=this;return!(t.length<=0)&&(e=[],r=[],t.forEach((function(t){t&&t.meta&&t.meta.keepAlive&&(e.push(Object(i.a)({},t)),r.push(t.name),n.$store.dispatch("keepAliveNames/setCacheKeepAlive",r))})),e)},cancel:function(){this.$emit("onCancel")}}},r("2604"),c=Object(d.a)(h,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("el-card",{staticClass:"ivu-mb-16",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[r("div",{staticClass:"padding-add"},[r("el-form",{ref:"roleData",attrs:{model:t.roleData,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[r("el-form-item",{attrs:{label:"按钮名称:",prop:"status2","label-for":"status2"}},[r("el-input",{staticClass:"form_content_width",attrs:{clearable:"",placeholder:"请输入按钮名称"},model:{value:t.roleData.keyword,callback:function(e){t.$set(t.roleData,"keyword",e)},expression:"roleData.keyword"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:t.getData}},[t._v("查询")])],1)],1)],1)]),r("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never"}},[r("vxe-table",{ref:"xTable",staticClass:"vxeTable",attrs:{border:!1,"highlight-hover-row":"","highlight-current-row":"",loading:t.loading,"header-row-class-name":"false","tree-config":t.tabconfig,data:t.tableData,"row-id":"id"}},[r("vxe-table-column",{attrs:{field:"menu_name","tree-node":"",title:"按钮名称","min-width":"100"}}),r("vxe-table-column",{attrs:{field:"menu_path",title:"类型","min-width":"240",tooltip:"true"},scopedSlots:t._u([{key:"default",fn:function(e){return e=e.row,[1==e.auth_type?r("span",[t._v("菜单:"+t._s(e.menu_path))]):t._e(),3==e.auth_type?r("span",[t._v("按钮")]):t._e(),2==e.auth_type?r("span",[t._v("数据权限")]):t._e()]}}])}),r("vxe-table-column",{attrs:{field:"sort",title:"排序",width:"150"}}),r("vxe-table-column",{attrs:{field:"flag",title:"是否显示",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("el-switch",{attrs:{"active-value":1,"inactive-value":0,value:n.is_show_path,size:"large"},on:{change:function(e){return t.onchangeIsShow(n)}},model:{value:n.is_show_path,callback:function(e){t.$set(n,"is_show_path",e)},expression:"row.is_show_path"}})]}}])}),r("vxe-table-column",{attrs:{field:"date",title:"操作",align:"center",width:"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("a",{on:{click:function(e){return t.edit(n,"编辑")}}},[t._v("编辑")])]}}])})],1)],1),r("menus-from",{ref:"menusFrom",attrs:{formValidate:t.formValidate,titleFrom:t.titleFrom},on:{getList:t.getList,changeMenu:t.changeMenu,clearFrom:t.clearFrom}}),r("el-dialog",{attrs:{visible:t.ruleModal,width:"1100px",title:"权限列表"},on:{"update:visible":function(e){t.ruleModal=e},closed:t.modalchange}},[r("div",{staticClass:"search-rule"},[r("el-alert",{attrs:{title:"基础接口,可多选,并且添加后不会再展示出现;删除权限后才会出现;公共接口,可多选,并且添加后会继续展示;"}}),r("el-input",{ref:"search",staticClass:"mr10",staticStyle:{width:"300px"},attrs:{placeholder:"输入关键词搜索",clearable:""},on:{"on-enter":t.searchRules,"on-clear":t.searchRules},model:{value:t.searchRule,callback:function(e){t.searchRule=e},expression:"searchRule"}}),r("el-button",{staticClass:"mr10",attrs:{type:"primary"},on:{click:t.searchRules}},[t._v("搜索")]),r("el-button",{on:{click:t.init}},[t._v("重置")])],1),r("div",{staticClass:"route-list"},[r("div",{staticClass:"tree"},[r("el-tree",{ref:"treeBox",attrs:{data:t.ruleCateList,"highlight-current":!0,props:t.defaultProps,"node-key":"id","default-expanded-keys":t.expandedKeys,"current-node-key":t.nodeKey},on:{"node-click":t.handleNodeClick}})],1),r("div",{staticClass:"rule"},t._l(t.children,(function(e,n){return r("div",{directives:[{name:"show",rawName:"v-show",value:!t.arrs.length||t.arrs.includes(e.id),expression:"!arrs.length || arrs.includes(item.id)"}],key:n,staticClass:"rule-list",class:{"select-rule":t.seletRouteIds.includes(e.id)},on:{click:function(r){return t.selectRule(e)}}},[r("div",[t._v("接口名称:"+t._s(e.name))]),r("div",[t._v("请求方式:"+t._s(e.method))]),r("div",[t._v("接口地址:"+t._s(e.path))])])})),0)]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(e){t.ruleModal=!1}}},[t._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:t.addRouters}},[t._v("确 定")])],1)])],1)}),[],!1,null,"f7bd6a04",null),e.default=c.exports},"46c4":function(t,e,r){"use strict";r.d(e,"e",(function(){return o})),r.d(e,"c",(function(){return i})),r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return s})),r.d(e,"h",(function(){return c})),r.d(e,"f",(function(){return l})),r.d(e,"d",(function(){return u})),r.d(e,"g",(function(){return h})),r.d(e,"i",(function(){return d}));var n=r("6b6c");function o(t){return Object(n.a)({url:"/setting/menus",method:"get",params:t})}function i(t){return Object(n.a)({url:"/setting/menus/unique",method:"get",params:t})}function a(){return Object(n.a)({url:"/setting/menus/create",method:"get"})}function s(t){return Object(n.a)({url:t.url,method:t.method,data:t.datas})}function c(t){return Object(n.a)({url:"/setting/menus/".concat(t),method:"get"})}function l(t){return Object(n.a)({url:"/setting/menus/show/".concat(t.id),method:"put",data:t})}function u(t){return Object(n.a)({url:"/setting/ruleList?cate_id=".concat(t),method:"get"})}function h(t){return Object(n.a)({url:"setting/menus/batch",method:"post",data:t})}function d(t){return Object(n.a)({url:"setting/rule_cate",method:"get"})}},"5b81":function(t,e,r){"use strict";function n(t,e,r){return r>t.length?-1:""===e?r:b(t,e,r)}var o=r("23e7"),i=r("da84"),a=r("c65b"),s=r("e330"),c=r("1d80"),l=r("1626"),u=r("44e7"),h=r("577e"),d=r("dc4a"),f=r("90d8"),m=r("0cb2"),p=r("b622"),g=r("c430"),v=p("replace"),y=i.TypeError,b=s("".indexOf),w=s("".replace),_=s("".slice),x=Math.max;o({target:"String",proto:!0},{replaceAll:function(t,e){var r,o,i,s,p,k,L,O,V=c(this),j=0,R=0,$="";if(null!=t){if((r=u(t))&&(o=h(c(f(t))),!~b(o,"g")))throw y("`.replaceAll` does not allow non-global regexes");if(o=d(t,v))return a(o,t,V,e);if(g&&r)return w(h(V),t,e)}for(i=h(V),s=h(t),(p=l(e))||(e=h(e)),k=s.length,L=x(1,k),j=n(i,s,0);-1!==j;)O=p?h(e(s,j,i)):m(s,i,j,[],void 0,e),$+=_(i,R,j)+O,R=j+k,j=n(i,s,j+L);return R<i.length&&($+=_(i,R)),$}})},"5bb2":function(t,e,r){"use strict";e.a=["platform-eleme","eleme","delete-solid","delete","s-tools","setting","user-solid","user","phone","phone-outline","more","more-outline","star-on","star-off","s-goods","goods","warning","warning-outline","question","info","remove","circle-plus","success","error","zoom-in","zoom-out","remove-outline","circle-plus-outline","circle-check","circle-close","s-help","help","minus","plus","check","close","picture","picture-outline","picture-outline-round","upload","upload2","download","camera-solid","camera","video-camera-solid","video-camera","message-solid","bell","s-cooperation","s-order","s-platform","s-fold","s-unfold","s-operation","s-promotion","s-home","s-release","s-ticket","s-management","s-open","s-shop","s-marketing","s-flag","s-comment","s-finance","s-claim","s-custom","s-opportunity","s-data","s-check","s-grid","menu","share","d-caret","caret-left","caret-right","caret-bottom","caret-top","bottom-left","bottom-right","back","right","bottom","top","top-left","top-right","arrow-left","arrow-right","arrow-down","arrow-up","d-arrow-left","d-arrow-right","video-pause","video-play","refresh","refresh-right","refresh-left","finished","sort","category-up","category-down","rank","loading","view","c-scale-to-original","date","edit","edit-outline","folder","folder-opened","folder-add","folder-remove","folder-delete","folder-checked","tickets","document-remove","document-delete","document-copy","document-checked","document","document-add","printer","paperclip","takeaway-box","search","monitor","attract","mobile","scissors","umbrella","headset","brush","mouse","coordinate","magic-stick","reading","data-line","data-board","pie-chart","data-analysis","collection-tag","film","suitcase","suitcase-1","receiving","collection","files","notebook-1","notebook-2","toilet-paper","office-building","school","table-lamp","house","no-smoking","smoking","shopping-cart-full","shopping-cart-1","shopping-cart-2","shopping-bag-1","shopping-bag-2","sold-out","sell","present","box","bank-card","money","coin","wallet","discount","price-tag","news","guide","male","female","thumb","cpu","link","connection","open","turn-off","set-up","chat-round","chat-line-round","chat-square","chat-dot-round","chat-dot-square","chat-line-square","message","postcard","position","turn-off-microphone","microphone","close-notification","bangzhu","time","odometer","crop","aim","switch-button","full-screen","copy-document","mic","stopwatch","medal-1","medal","trophy","trophy-1","first-aid-kit","discover","place","location","location-outline","location-information","add-location","delete-location","map-location","alarm-clock","timer","watch-1","watch","lock","unlock","key","service","mobile-phone","bicycle","truck","ship","basketball","football","soccer","baseball","wind-power","light-rain","lightning","heavy-rain","sunrise","sunrise-1","sunset","sunny","cloudy","partly-cloudy","cloudy-and-sunny","moon","moon-night","dish","dish-1","food","chicken","fork-spoon","knife-fork","burger","tableware","sugar","dessert","ice-cream","hot-water","water-cup","coffee-cup","cold-drink","goblet","goblet-full","goblet-square","goblet-square-full","refrigerator","grape","watermelon","cherry","apple","pear","orange","coffee","ice-tea","ice-drink","milk-tea","potato-strips","lollipop","ice-cream-square","ice-cream-round"]},"7e51":function(t,e,r){"use strict";var n=r("160c");r.n(n).a},"841c":function(t,e,r){"use strict";var n=r("c65b"),o=r("d784"),i=r("825a"),a=r("1d80"),s=r("129f"),c=r("577e"),l=r("dc4a"),u=r("14c3");o("search",(function(t,e,r){return[function(e){var r=a(this),o=null==e?void 0:l(e,t);return o?n(o,e,r):new RegExp(e)[t](c(r))},function(t){var n=i(this),o=(t=c(t),r(e,n,t));return o.done?o.value:(o=n.lastIndex,s(o,0)||(n.lastIndex=0),t=u(n,t),s(n.lastIndex,o)||(n.lastIndex=o),null===t?-1:t.index)}]}))},ee2f:function(t,e,r){}}]); |