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.
 
 
 
 

1 lines
44 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-687a19de"],{"09f4":function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),Math.easeInOutQuad=function(e,t,n,o){return e/=o/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var o=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function i(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function c(e,t,n){var c=r(),a=e-c,s=20,l=0;t="undefined"===typeof t?500:t;var u=function e(){l+=s;var r=Math.easeInOutQuad(l,c,a,t);i(r),l<t?o(e):n&&"function"===typeof n&&n()};u()}},1771:function(e,t,n){"use strict";n.d(t,"f",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return m})),n.d(t,"e",(function(){return h}));n("caad"),n("d3b7"),n("ac1f"),n("8a79"),n("2532"),n("3ca3"),n("1276"),n("2ca0"),n("498a"),n("ddb0"),n("2b3d");var o=n("5530"),i=n("b85c"),r=n("c2cf"),c=n("ebb5"),a=void 0,s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"authority";"string"===typeof e&&(e=[e]),e&&e.length>0&&r["a"].enums({codes:e},n).then((function(n){var o,r=n.data,c=Object(i["a"])(e);try{for(c.s();!(o=c.n()).done;){var a=o.value;t[a]=r.data[a]}}catch(s){c.e(s)}finally{c.f()}}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(e,t,"authority")},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(e,t,"msgs")},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"===typeof e&&(e=[e]),e&&e.length>0&&c["a"].list({codes:e}).then((function(n){var o,r=n.data,c=Object(i["a"])(e);try{for(c.s();!(o=c.n()).done;){var a=o.value;t[a]=r.data[a]}}catch(s){c.e(s)}finally{c.f()}}))},m=function(e){console.log(e,12);var t=e.data,n=t.type;if(n&&n.includes("application/json")){var o=new FileReader;o.onload=function(e){if(2===e.target.readyState){var t=JSON.parse(e.target.result);a.$message({message:t.msg,type:"warning"})}},o.readAsText(t)}else{var i=e.headers["content-disposition"],r="下载文件.zip";if(i)for(var c=i.split(";"),s=0;s<c.length;s++){var l=c[s];if(null!==l&&""!==l){var u=l.split("=");if(null!==u&&u.length>0&&"filename"===u[0].trim().toLowerCase()){r=decodeURI(u[1]);break}}}(r.startsWith("'")||r.startsWith('"'))&&(r.endsWith("'")||r.endsWith('"'))&&(r=r.substring(1,r.length-1));var d=new Blob([t]),m=document.createElement("a");m.href=window.URL.createObjectURL(d),m.download=r,m.click(),window.URL.revokeObjectURL(m.href)}},h=function(e){var t={size:10,current:1,sort:"id",order:"descending",model:{},map:{},timeRange:null};return e?Object(o["a"])(Object(o["a"])({},t),e):t}},"1f43":function(e,t,n){"use strict";var o=n("7c77"),i=n.n(o);i.a},"20db":function(e,t,n){"use strict";var o=n("5530"),i=n("9256"),r={page:{method:"POST",url:"/resource/page"},save:{method:"POST",url:"/resource"},update:{method:"PUT",url:"/resource"},delete:{method:"DELETE",url:"/resource"}};t["a"]={page:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.page),{},{data:e}))},save:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.save),{},{data:e}))},update:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.update),{},{data:e}))},delete:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.delete),{},{data:e}))}}},"27ae":function(e,t,n){(function(n){var o,i;(function(t,n){e.exports=n(t)})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n?n:this,(function(n){"use strict";n=n||{};var r,c=n.Base64,a="2.6.4",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},n=0,o=e.length;n<o;n++)t[e.charAt(n)]=n;return t}(s),u=String.fromCharCode,d=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?u(192|t>>>6)+u(128|63&t):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|63&t)}t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|63&t)},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(e){return e.replace(m,d)},f=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),o=[s.charAt(n>>>18),s.charAt(n>>>12&63),t>=2?"=":s.charAt(n>>>6&63),t>=1?"=":s.charAt(63&n)];return o.join("")},p=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,f)},b=function(e){return p(h(String(e)))},g=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},v=function(e,t){return t?g(b(e)):b(e)},y=function(e){return v(e,!0)};n.Uint8Array&&(r=function(e,t){for(var n="",o=0,i=e.length;o<i;o+=3){var r=e[o],c=e[o+1],a=e[o+2],l=r<<16|c<<8|a;n+=s.charAt(l>>>18)+s.charAt(l>>>12&63)+("undefined"!=typeof c?s.charAt(l>>>6&63):"=")+("undefined"!=typeof a?s.charAt(63&l):"=")}return t?g(n):n});var w,k=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,$=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return u(55296+(n>>>10))+u(56320+(1023&n));case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},x=function(e){return e.replace(k,$)},O=function(e){var t=e.length,n=t%4,o=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),i=[u(o>>>16),u(o>>>8&255),u(255&o)];return i.length-=[0,0,2,1][n],i.join("")},C=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,O)},S=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},T=function(e){return x(C(e))},j=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},I=function(e){return T(j(e))};n.Uint8Array&&(w=function(e){return Uint8Array.from(S(j(e)),(function(e){return e.charCodeAt(0)}))});var _=function(){var e=n.Base64;return n.Base64=c,e};if(n.Base64={VERSION:a,atob:S,btoa:p,fromBase64:I,toBase64:v,utob:h,encode:v,encodeURI:y,btou:x,decode:I,noConflict:_,fromUint8Array:r,toUint8Array:w},"function"===typeof Object.defineProperty){var P=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",P((function(){return I(this)}))),Object.defineProperty(String.prototype,"toBase64",P((function(e){return v(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",P((function(){return v(this,!0)})))}}return n["Meteor"]&&(Base64=n.Base64),e.exports?e.exports.Base64=n.Base64:(o=[],i=function(){return n.Base64}.apply(t,o),void 0===i||(e.exports=i)),{Base64:n.Base64}}))}).call(this,n("c8ba"))},"288a":function(e,t,n){"use strict";var o=n("7758"),i=n.n(o);i.a},"4fad":function(e,t,n){var o=n("23e7"),i=n("6f53").entries;o({target:"Object",stat:!0},{entries:function(e){return i(e)}})},56925:function(e,t,n){"use strict";var o=n("f25c"),i=n.n(o);i.a},"6f53":function(e,t,n){var o=n("83ab"),i=n("df75"),r=n("fc6a"),c=n("d1e7").f,a=function(e){return function(t){var n,a=r(t),s=i(a),l=s.length,u=0,d=[];while(l>u)n=s[u++],o&&!c.call(a,n)||d.push(e?[n,a[n]]:a[n]);return d}};e.exports={entries:a(!0),values:a(!1)}},7758:function(e,t,n){},"7c77":function(e,t,n){},"81ee":function(e,t,n){"use strict";var o=n("5530"),i=n("9256"),r={allTree:{method:"GET",url:"/menu/tree"},save:{method:"POST",url:"/menu"},update:{method:"PUT",url:"/menu"},delete:{method:"DELETE",url:"/menu"}};t["a"]={allTree:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.allTree),{},{data:e}))},save:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.save),{},{data:e}))},update:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.update),{},{data:e}))},delete:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.delete),{},{data:e}))}}},"8a79":function(e,t,n){"use strict";var o=n("23e7"),i=n("06cf").f,r=n("50c4"),c=n("5a34"),a=n("1d80"),s=n("ab13"),l=n("c430"),u="".endsWith,d=Math.min,m=s("endsWith"),h=!l&&!m&&!!function(){var e=i(String.prototype,"endsWith");return e&&!e.writable}();o({target:"String",proto:!0,forced:!h&&!m},{endsWith:function(e){var t=String(a(this));c(e);var n=arguments.length>1?arguments[1]:void 0,o=r(t.length),i=void 0===n?o:d(r(n),o),s=String(e);return u?u.call(t,s,i):t.slice(i-s.length,i)===s}})},9256:function(e,t,n){"use strict";n("99af"),n("4160"),n("caad"),n("4fad"),n("d3b7"),n("159b");var o=n("5530"),i=n("bc3a"),r=n.n(i),c=n("5c96"),a=n("5657");n("27ae");function s(e,t){"ECONNABORTED"===e.code?Object(c["Message"])({message:"请求超时"}):e.response&&e.response.data?Object(c["Message"])({message:e.response.data}):e.message&&Object(c["Message"])({message:e.message}),t(e)}function l(e,t){e.data.isError&&(4e4===e.data.code||40001===e.data.code||40002===e.data.code||40003===e.data.code||40005===e.data.code||40006===e.data.code||40008===e.data.code?c["MessageBox"].alert(e.data.msg,"提醒",{confirmButtonText:"确定",callback:function(){window.location.hash="/login"}}):c["Message"].error(e.data.msg)),t(e)}r.a.interceptors.request.use((function(e){var t=!1!==e.headers["X-isToken"]||e.headers["X-isToken"],n=a["a"].get("TOKEN","");n&&t&&(e.headers.token="Bearer "+n);var o="ceres_admin_web",i="ceres_admin_web";return e.headers["Authorization"]="Basic ".concat("".concat(o,":").concat(i)),e}),(function(e){return Promise.reject(e)})),r.a.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)}));var u=function(e){console.log(e,"opts");var t={ts:Date.now()},n=e.method.toUpperCase(),i={method:n,url:"".concat("https://pos.admin.api.lotus-wallet.com").concat(e.url),responseType:e.responseType||"",timeout:2e4},c=["PUT","POST","PATCH"];c.includes(n)?i.data=e.data||{}:i.params=Object(o["a"])(Object(o["a"])({},t),e.data||{}),e.formData&&(i.transformRequest=[function(e){var t=new FormData;return e&&Object.entries(e).forEach((function(e){t.append(e[0],e[1])})),t}]);var a=new Promise((function(e,t){r()(i).then((function(t){l(t,e)})).catch((function(e){s(e,t)}))}));return a};t["a"]=u},a888:function(e,t,n){"use strict";n("99af"),n("caad"),n("ac1f"),n("2532"),n("5319");var o={bind:function(e,t,n){var o=e.querySelector(".el-dialog__header"),i=e.querySelector(".el-dialog");o.style.cssText+=";cursor:move;",i.style.cssText+=";top:0px;";var r=function(){return window.document.currentStyle?function(e,t){return e.currentStyle[t]}:function(e,t){return getComputedStyle(e,!1)[t]}}();o.onmousedown=function(e){var t=e.clientX-o.offsetLeft,c=e.clientY-o.offsetTop,a=i.offsetWidth,s=i.offsetHeight,l=document.body.clientWidth,u=document.body.clientHeight,d=i.offsetLeft,m=l-i.offsetLeft-a,h=i.offsetTop,f=u-i.offsetTop-s,p=r(i,"left"),b=r(i,"top");p.includes("%")?(p=+document.body.clientWidth*(+p.replace(/\%/g,"")/100),b=+document.body.clientHeight*(+b.replace(/\%/g,"")/100)):(p=+p.replace(/\px/g,""),b=+b.replace(/\px/g,"")),document.onmousemove=function(e){var o=e.clientX-t,r=e.clientY-c;-o>d?o=-d:o>m&&(o=m),-r>h?r=-h:r>f&&(r=f),i.style.cssText+=";left:".concat(o+p,"px;top:").concat(r+b,"px;"),n.child.$emit("dragDialog")},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null}}}},i=function(e){e.directive("el-drag-dialog",o)};window.Vue&&(window["el-drag-dialog"]=o,Vue.use(i)),o.install=i;t["a"]=o},b2cc:function(e,t,n){"use strict";var o=n("b5db"),i=n.n(o);i.a},b5db:function(e,t,n){},ba1f:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"menu"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:6,xs:24}},[n("div",{staticClass:"app-container"},[n("div",{staticClass:"filter-container"},[n("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.menu.label"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search(t)}},model:{value:e.label,callback:function(t){e.label=t},expression:"label"}}),n("el-tooltip",{staticClass:"item",attrs:{content:"新增/删除时,请先勾选菜单",effect:"dark",placement:"right"}},[n("el-dropdown",{directives:[{name:"has-any-permission",rawName:"v-has-any-permission",value:["menu:add","menu:delete","menu:export"],expression:"['menu:add','menu:delete','menu:export']"}],staticClass:"filter-item",attrs:{trigger:"click"}},[n("el-button",[e._v(" "+e._s(e.$t("table.more"))+" "),n("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["menu:add"],expression:"['menu:add']"}],nativeOn:{click:function(t){return e.add(t)}}},[e._v(" "+e._s(e.$t("table.add"))+" ")]),n("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["menu:delete"],expression:"['menu:delete']"}],nativeOn:{click:function(t){return e.deleteMenu(t)}}},[e._v(" "+e._s(e.$t("table.delete"))+" ")])],1)],1)],1)],1),n("commonTree",{ref:"menuTree",attrs:{"tree-data":e.menuTree},on:{nodeClick:e.nodeClick},scopedSlots:e._u([{key:"default",fn:function(e){return[n("span",{staticClass:"tree-icon"},[n("i",{class:e.data.icon?e.data.icon:"el-icon-document"})]),n("span",{staticClass:"tree-icon"},[n("el-badge",{staticClass:"status-item",attrs:{type:e.data.isEnable?"success":"danger","is-dot":""}})],1)]}}])})],1)]),n("el-col",{attrs:{sm:8,xs:24}},[n("el-card",{staticClass:"box-card"},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("span",[e._v(e._s(""===e.menu.id?this.$t("common.add"):this.$t("common.edit")))])]),n("div",[n("el-form",{ref:"form",attrs:{model:e.menu,rules:e.rules,"label-position":"right","label-width":"100px"}},[n("el-form-item",{attrs:{label:e.$t("table.menu.parentId"),prop:"parentId"}},[n("el-tooltip",{staticClass:"item",attrs:{content:e.$t("tips.topId"),effect:"dark",placement:"right"}},[n("el-input",{attrs:{readonly:""},model:{value:e.menu.parentId,callback:function(t){e.$set(e.menu,"parentId",t)},expression:"menu.parentId"}})],1)],1),n("el-form-item",{attrs:{label:e.$t("table.menu.label"),prop:"label"}},[n("el-input",{model:{value:e.menu.label,callback:function(t){e.$set(e.menu,"label",t)},expression:"menu.label"}})],1),n("el-form-item",{attrs:{label:e.$t("table.menu.path"),prop:"path"}},[n("el-input",{nativeOn:{keyup:function(t){return e.menuPath(t)}},model:{value:e.menu.path,callback:function(t){e.$set(e.menu,"path",t)},expression:"menu.path"}})],1),n("el-form-item",{attrs:{label:e.$t("table.menu.component"),prop:"component"}},[n("el-input",{model:{value:e.menu.component,callback:function(t){e.$set(e.menu,"component",t)},expression:"menu.component"}}),n("span",[e._v(e._s(e.menuComponent))])],1),n("el-form-item",{attrs:{label:e.$t("table.menu.icon"),prop:"icon"}},[n("el-input",{model:{value:e.menu.icon,callback:function(t){e.$set(e.menu,"icon",t)},expression:"menu.icon"}},[n("el-button",{staticStyle:{"padding-left":"0"},attrs:{slot:"append",icon:"el-icon-brush"},on:{click:e.chooseIcons},slot:"append"})],1)],1),n("el-row",[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:e.$t("table.status"),prop:"isEnable"}},[n("el-switch",{attrs:{"active-text":e.$t("common.status.valid"),"inactive-text":e.$t("common.status.invalid")},model:{value:e.menu.isEnable,callback:function(t){e.$set(e.menu,"isEnable",t)},expression:"menu.isEnable"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:e.$t("table.menu.isPublic"),prop:"isPublic"}},[n("el-switch",{attrs:{"active-text":e.$t("common.yes"),"inactive-text":e.$t("common.no")},model:{value:e.menu.isPublic,callback:function(t){e.$set(e.menu,"isPublic",t)},expression:"menu.isPublic"}})],1)],1)],1),n("el-form-item",{attrs:{label:e.$t("table.menu.sortValue"),prop:"sortValue"}},[n("el-input-number",{attrs:{max:100,min:0},on:{change:e.handleNumChange},model:{value:e.menu.sortValue,callback:function(t){e.$set(e.menu,"sortValue",t)},expression:"menu.sortValue"}})],1),n("el-form-item",{attrs:{label:e.$t("table.menu.group"),prop:"group"}},[n("el-tooltip",{staticClass:"item",attrs:{content:"用于区分多组菜单",effect:"dark",placement:"right"}},[n("el-input",{model:{value:e.menu.group,callback:function(t){e.$set(e.menu,"group",t)},expression:"menu.group"}})],1)],1),n("el-form-item",{attrs:{label:e.$t("table.menu.describe"),prop:"describe"}},[n("el-input",{model:{value:e.menu.describe,callback:function(t){e.$set(e.menu,"describe",t)},expression:"menu.describe"}})],1)],1)],1)]),n("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"-2rem"}},[n("el-row",[n("el-col",{staticStyle:{"text-align":"right"},attrs:{span:24}},[n("el-button",{attrs:{plain:"",type:"primary"},on:{click:e.submit}},[e._v(e._s(""===e.menu.id?this.$t("common.add"):this.$t("common.edit"))+" ")])],1)],1)],1)],1),n("el-col",{attrs:{sm:10,xs:24}},[n("el-card",{staticClass:"box-card"},[n("div",{staticClass:"app-container"},[n("div",{staticClass:"filter-container"},[n("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.resource.code"),clearable:""},model:{value:e.resourceQueryParams.model.code,callback:function(t){e.$set(e.resourceQueryParams.model,"code",t)},expression:"resourceQueryParams.model.code"}}),n("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.resource.name"),clearable:""},model:{value:e.resourceQueryParams.model.name,callback:function(t){e.$set(e.resourceQueryParams.model,"name",t)},expression:"resourceQueryParams.model.name"}}),n("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"primary"},on:{click:e.resourceSearch}},[e._v(e._s(e.$t("table.search"))+" ")]),n("el-dropdown",{directives:[{name:"has-any-permission",rawName:"v-has-any-permission",value:["resource:add","resource:delete"],expression:"['resource:add','resource:delete']"}],staticClass:"filter-item",attrs:{trigger:"click"}},[n("el-button",[e._v(" "+e._s(e.$t("table.more"))+" "),n("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["resource:add"],expression:"['resource:add']"}],attrs:{disabled:!e.menu.id},nativeOn:{click:function(t){return e.resourceAdd(t)}}},[e._v(e._s(e.$t("table.add"))+" ")]),n("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["resource:delete"],expression:"['resource:delete']"}],nativeOn:{click:function(t){return e.resourceBatchDelete(t)}}},[e._v(e._s(e.$t("table.delete"))+" ")])],1)],1)],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.resourceLoading,expression:"resourceLoading"}],key:e.resourceTableKey,ref:"resourceTable",staticStyle:{width:"100%"},attrs:{data:e.resourceTableData.records,border:"",fit:""},on:{"selection-change":e.onResourceSelectChange,"sort-change":e.resourceSortChange,"filter-change":e.resourceFilterChange}},[n("el-table-column",{attrs:{align:"center",type:"selection",width:"40px"}}),n("el-table-column",{attrs:{label:e.$t("table.resource.code"),"show-overflow-tooltip":!0,align:"center",prop:"code"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(t.row.code))])]}}])}),n("el-table-column",{attrs:{label:e.$t("table.resource.name"),"show-overflow-tooltip":!0,align:"center",prop:"name"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(t.row.name))])]}}])}),n("el-table-column",{attrs:{label:e.$t("table.operation"),align:"center","class-name":"small-padding fixed-width",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;return[n("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["resource:update"],expression:"['resource:update']"}],staticClass:"el-icon-edit table-operation",staticStyle:{color:"#2db7f5"},on:{click:function(t){return e.resourceEdit(o)}}}),n("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["resource:delete"],expression:"['resource:delete']"}],staticClass:"el-icon-delete table-operation",staticStyle:{color:"#f50"},on:{click:function(t){return e.resourceSingleDelete(o)}}}),n("el-link",{directives:[{name:"has-no-permission",rawName:"v-has-no-permission",value:["resource:update","resource:delete"],expression:"['resource:update','resource:delete']"}],staticClass:"no-perm"},[e._v(e._s(e.$t("tips.noPermission"))+" ")])]}}])})],1),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.resourceTableData.total>0,expression:"resourceTableData.total>0"}],attrs:{limit:e.resourceQueryParams.size,page:e.resourceQueryParams.current,total:Number(e.resourceTableData.total)},on:{"update:limit":function(t){return e.$set(e.resourceQueryParams,"size",t)},"update:page":function(t){return e.$set(e.resourceQueryParams,"current",t)},pagination:e.resourceFetch}})],1)])],1)],1),n("Icons",{attrs:{"dialog-visible":e.iconVisible},on:{choose:e.chooseIcon,close:function(t){e.iconVisible=!1}}}),n("resource-edit",{ref:"resourceEdit",attrs:{"dialog-visible":e.dialog.isVisible,type:e.dialog.type},on:{close:e.resourceEditClose,success:e.resourceEditSuccess}}),n("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:"预览",width:"80%",top:"50px",visible:e.preview.isVisible},on:{"update:visible":function(t){return e.$set(e.preview,"isVisible",t)}}},[n("el-scrollbar",[n("div",{domProps:{innerHTML:e._s(e.preview.context)}})])],1)],1)},i=[],r=(n("4de4"),n("c740"),n("caad"),n("d81d"),n("d3b7"),n("ac1f"),n("8a79"),n("2532"),n("1276"),n("2ca0"),n("5530")),c=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"common-tree"},[n("el-tree",{ref:e.treeRef,attrs:{data:e.treeData,"check-strictly":e.checkStrictly,"show-checkbox":"",accordion:!1,"node-key":"id","default-expand-all":"","highlight-current":!0,"expand-on-click-node":!1,"filter-node-method":e.filterNodeMethod},on:{"check-change":e.checkChange,"node-click":e.nodeClick,"current-change":e.currentChange},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.data,i=t.node;return n("span",{staticClass:"custom-tree-node"},[n("span",{staticStyle:{"margin-right":"15px"}},[e._v(e._s(o.label))]),e._t("default",null,{data:o,node:i})],2)}}],null,!0)})],1)},a=[],s=(n("c975"),{props:{treeRef:{type:String,default:"treeRef"},treeData:{type:Array,required:!0,default:function(){return[]}},checkStrictly:{type:Boolean,default:function(){return!0}},opeBtns:{type:Array,default:function(){return["add","edit","remove"]}}},methods:{modify:function(e,t,n){window.event.stopPropagation(),this.$emit(e,t,n)},checkChange:function(e,t,n){this.$emit("checkChange",e,t,n)},nodeClick:function(e,t,n){this.$emit("nodeClick",e,t,n)},currentChange:function(e,t){this.$emit("currentChange",e,t)},filterNodeMethod:function(e,t){return!e||-1!==t.label.indexOf(e)}}}),l=s,u=(n("b2cc"),n("2877")),d=Object(u["a"])(l,c,a,!1,null,null,null),m=d.exports,h=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{attrs:{"close-on-click-modal":!1,title:e.$t("table.menu.icon"),visible:e.isVisible,width:e.width,top:"50px"},on:{"update:visible":function(t){e.isVisible=t}}},[n("el-input",{staticClass:"filter-item search-item",attrs:{clearable:"",placeholder:"icon"},nativeOn:{keyup:function(t){return e.searchIcon(t)}},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}}),n("el-tabs",{staticStyle:{"margin-top":"-1rem"},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[n("el-tab-pane",{attrs:{label:e.$t("common.tab.common"),name:"first"}},[n("ul",e._l(e.icons.commonIcons,(function(t){return n("li",{key:t,staticClass:"icons-item"},[n("span",{class:{active:e.activeIndex===t}},[n("el-icon",{class:t,attrs:{title:t},nativeOn:{click:function(n){return e.chooseIcon(t)},dblclick:function(t){return e.confirm(t)}}})],1),n("p",[e._v(e._s(t))])])})),0)]),n("el-tab-pane",{attrs:{label:e.$t("common.tab.directivity"),name:"second"}},[n("ul",e._l(e.icons.directivityIcons,(function(t){return n("li",{key:t},[n("span",{class:{active:e.activeIndex===t}},[n("el-icon",{class:t,attrs:{title:t},nativeOn:{click:function(n){return e.chooseIcon(t)},dblclick:function(t){return e.confirm(t)}}})],1),n("p",[e._v(e._s(t))])])})),0)]),n("el-tab-pane",{attrs:{label:e.$t("common.tab.solid"),name:"third"}},[n("ul",e._l(e.icons.solidIcons,(function(t){return n("li",{key:t},[n("span",{class:{active:e.activeIndex===t}},[n("el-icon",{class:t,attrs:{title:t},nativeOn:{click:function(n){return e.chooseIcon(t)},dblclick:function(t){return e.confirm(t)}}})],1),n("p",[e._v(e._s(t))])])})),0)]),n("el-tab-pane",{attrs:{label:e.$t("common.tab.food"),name:"fourth"}},[n("ul",e._l(e.icons.foodIcons,(function(t){return n("li",{key:t},[n("span",{class:{active:e.activeIndex===t}},[n("el-icon",{class:t,attrs:{title:t},nativeOn:{click:function(n){return e.chooseIcon(t)},dblclick:function(t){return e.confirm(t)}}})],1),n("p",[e._v(e._s(t))])])})),0)])],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(t){e.isVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),n("el-button",{attrs:{plain:"",type:"primary"},on:{click:e.confirm}},[e._v(e._s(e.$t("common.confirm")))])],1)],1)},f=[],p=(n("b0c0"),n("498a"),["el-icon-eleme","el-icon-delete","el-icon-setting","el-icon-user","el-icon-phone-outline","el-icon-more-outline","el-icon-star-off","el-icon-goods","el-icon-warning-outline","el-icon-zoom-in","el-icon-zoom-out","el-icon-remove-outline","el-icon-circle-plus-outline","el-icon-circle-check","el-icon-circle-close","el-icon-help","el-icon-minus","el-icon-plus","el-icon-check","el-icon-close","el-icon-picture-outline","el-icon-picture-outline-round","el-icon-upload2","el-icon-download","el-icon-camera","el-icon-video-camera","el-icon-bell","el-icon-video-pause","el-icon-video-play","el-icon-refresh","el-icon-refresh-right","el-icon-refresh-left","el-icon-finished","el-icon-loading","el-icon-view","el-icon-c-scale-to-original","el-icon-date","el-icon-edit","el-icon-edit-outline","el-icon-folder","el-icon-folder-opened","el-icon-folder-add","el-icon-folder-remove","el-icon-folder-delete","el-icon-folder-checked","el-icon-tickets","el-icon-document-remove","el-icon-document-delete","el-icon-document-copy","el-icon-document-checked","el-icon-document","el-icon-document-add","el-icon-printer","el-icon-paperclip","el-icon-takeaway-box","el-icon-search","el-icon-monitor","el-icon-attract","el-icon-mobile","el-icon-scissors","el-icon-umbrella","el-icon-headset","el-icon-brush","el-icon-mouse","el-icon-coordinate","el-icon-magic-stick","el-icon-reading","el-icon-data-line","el-icon-data-board","el-icon-pie-chart","el-icon-data-analysis","el-icon-collection-tag","el-icon-film","el-icon-suitcase","el-icon-suitcase-1","el-icon-receiving","el-icon-collection","el-icon-files","el-icon-notebook-1","el-icon-notebook-2","el-icon-toilet-paper","el-icon-office-building","el-icon-school","el-icon-table-lamp","el-icon-house","el-icon-no-smoking","el-icon-smoking","el-icon-shopping-cart-full","el-icon-shopping-cart-1","el-icon-shopping-cart-2","el-icon-shopping-bag-1","el-icon-shopping-bag-2","el-icon-sold-out","el-icon-sell","el-icon-present","el-icon-box","el-icon-bank-card","el-icon-money","el-icon-coin","el-icon-wallet","el-icon-discount","el-icon-price-tag","el-icon-news","el-icon-guide","el-icon-male","el-icon-female","el-icon-thumb","el-icon-cpu","el-icon-link","el-icon-connection","el-icon-open","el-icon-turn-off","el-icon-set-up","el-icon-chat-round","el-icon-chat-line-round","el-icon-chat-square","el-icon-chat-dot-round","el-icon-chat-dot-square","el-icon-chat-line-square","el-icon-message","el-icon-postcard","el-icon-position","el-icon-turn-off-microphone","el-icon-microphone","el-icon-close-notification","el-icon-bangzhu","el-icon-time","el-icon-odometer","el-icon-crop","el-icon-aim","el-icon-switch-button","el-icon-full-screen","el-icon-copy-document","el-icon-mic","el-icon-stopwatch","el-icon-medal-1","el-icon-medal","el-icon-trophy","el-icon-trophy-1","el-icon-first-aid-kit","el-icon-discover","el-icon-place","el-icon-location-outline","el-icon-location-information","el-icon-add-location","el-icon-delete-location","el-icon-map-location","el-icon-alarm-clock","el-icon-timer","el-icon-watch-1","el-icon-watch","el-icon-lock","el-icon-unlock","el-icon-key","el-icon-service","el-icon-mobile-phone","el-icon-bicycle","el-icon-truck","el-icon-ship","el-icon-basketball","el-icon-football","el-icon-soccer","el-icon-baseball"]),b=["el-icon-d-caret","el-icon-caret-left","el-icon-caret-right","el-icon-caret-bottom","el-icon-caret-top","el-icon-bottom-left","el-icon-bottom-right","el-icon-back","el-icon-right","el-icon-bottom","el-icon-top","el-icon-top-left","el-icon-top-right","el-icon-arrow-left","el-icon-arrow-right","el-icon-arrow-down","el-icon-arrow-up","el-icon-d-arrow-left","el-icon-d-arrow-right","el-icon-sort","el-icon-sort-up","el-icon-sort-down","el-icon-rank"],g=["el-icon-question","el-icon-info","el-icon-remove","el-icon-circle-plus","el-icon-success","el-icon-error","el-icon-platform-eleme","el-icon-delete-solid","el-icon-s-tools","el-icon-user-solid","el-icon-phone","el-icon-star-on","el-icon-s-goods","el-icon-warning","el-icon-s-help","el-icon-picture","el-icon-upload","el-icon-camera-solid","el-icon-video-camera-solid","el-icon-message-solid","el-icon-s-cooperation","el-icon-s-order","el-icon-s-platform","el-icon-s-fold","el-icon-s-unfold","el-icon-s-operation","el-icon-s-promotion","el-icon-s-home","el-icon-s-release","el-icon-s-ticket","el-icon-s-management","el-icon-s-open","el-icon-s-shop","el-icon-s-marketing","el-icon-s-flag","el-icon-s-comment","el-icon-s-finance","el-icon-s-claim","el-icon-s-custom","el-icon-s-opportunity","el-icon-s-data","el-icon-s-check","el-icon-s-grid","el-icon-menu","el-icon-share","el-icon-d-caret","el-icon-caret-left","el-icon-caret-right","el-icon-caret-bottom","el-icon-caret-top","el-icon-location"],v=["el-icon-dish","el-icon-dish-1","el-icon-food","el-icon-chicken","el-icon-fork-spoon","el-icon-knife-fork","el-icon-burger","el-icon-tableware","el-icon-sugar","el-icon-dessert","el-icon-ice-cream","el-icon-hot-water","el-icon-water-cup","el-icon-coffee-cup","el-icon-cold-drink","el-icon-goblet","el-icon-goblet-full","el-icon-goblet-square","el-icon-goblet-square-full","el-icon-refrigerator","el-icon-grape","el-icon-watermelon","el-icon-cherry","el-icon-apple","el-icon-pear","el-icon-orange","el-icon-coffee","el-icon-ice-tea","el-icon-ice-drink","el-icon-milk-tea","el-icon-potato-strips","el-icon-lollipop","el-icon-ice-cream-square","el-icon-ice-cream-round"],y={name:"Icons",props:{dialogVisible:{type:Boolean,default:!1}},data:function(){return{name:"",icons:{commonIcons:p,directivityIcons:b,solidIcons:g,foodIcons:v},activeIndex:"",choosedIcon:"",activeName:"first",screenWidth:0,width:this.initWidth()}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close()}}},mounted:function(){var e=this;window.onresize=function(){return function(){e.width=e.initWidth()}()}},methods:{initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<991?"90%":this.screenWidth<1400?"60%":"800px"},close:function(){this.$emit("close"),this.activeName="first",this.choosedIcon=this.activeIndex=""},chooseIcon:function(e){this.activeIndex=e,this.choosedIcon=e},confirm:function(){this.choosedIcon?(this.$emit("choose",this.choosedIcon),this.activeName="first",this.choosedIcon=this.activeIndex=""):this.$message({message:this.$t("tips.chooseNothing"),type:"warning"})},searchIcon:function(){var e=this;""===this.name.trim()&&(this.icons.commonIcons=p,this.icons.directivityIcons=b,this.icons.solidIcons=g,this.icons.foodIcons=v,this.activeName="first");var t=p.filter((function(t){return-1!==t.indexOf(e.name)})),n=b.filter((function(t){return-1!==t.indexOf(e.name)})),o=g.filter((function(t){return-1!==t.indexOf(e.name)})),i=v.filter((function(t){return-1!==t.indexOf(e.name)}));this.icons.commonIcons=t,this.icons.directivityIcons=n,this.icons.solidIcons=o,this.icons.foodIcons=i,t.length>0?this.activeName="first":n.length>0?this.activeName="second":o.length>0?this.activeName="third":i.length>0?this.activeName="fourth":this.activeName="first"}}},w=y,k=(n("1f43"),Object(u["a"])(w,h,f,!1,null,"aa34f802",null)),$=k.exports,x=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{attrs:{"close-on-click-modal":!1,title:e.title,type:e.type,visible:e.isVisible,width:e.width,top:"50px"},on:{"update:visible":function(t){e.isVisible=t}}},[n("el-form",{ref:"form",attrs:{model:e.resource,rules:e.rules,"label-position":"right","label-width":"100px"}},[n("el-form-item",{attrs:{label:e.$t("table.resource.code"),prop:"code"}},[n("el-input",{attrs:{disabled:"edit"===e.type},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.submitForm(t)}},model:{value:e.resource.code,callback:function(t){e.$set(e.resource,"code",t)},expression:"resource.code"}}),n("p",{staticClass:"note"},[e._v("建议使用:作为分隔符,并以view、add、update、delete、export、import、download、upload等关键词结尾")]),n("p",{staticClass:"note"},[e._v("如:menu:add、 resource:view、 file:upload")])],1),n("el-form-item",{attrs:{label:e.$t("table.resource.name"),prop:"name"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.submitForm(t)}}},[n("el-input",{model:{value:e.resource.name,callback:function(t){e.$set(e.resource,"name",t)},expression:"resource.name"}})],1),n("el-form-item",{attrs:{label:e.$t("table.resource.describe"),prop:"describe"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.submitForm(t)}}},[n("el-input",{model:{value:e.resource.describe,callback:function(t){e.$set(e.resource,"describe",t)},expression:"resource.describe"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(t){e.isVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),n("el-button",{attrs:{plain:"",type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("common.confirm")))])],1)],1)},O=[],C=n("20db"),S={name:"ResourceEdit",components:{},props:{dialogVisible:{type:Boolean,default:!1},type:{type:String,default:"add"}},data:function(){var e=this;return{resource:this.initResource(),screenWidth:0,width:this.initWidth(),rules:{code:[{required:!0,message:this.$t("rules.require"),trigger:"blur"},{min:1,max:255,message:this.$t("rules.range4to10"),trigger:"blur"},{validator:function(t,n,o){e.resource.id,o()},trigger:"blur"}],name:{required:!0,message:this.$t("rules.require"),trigger:"blur"}}}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}},title:function(){return"add"===this.type?this.$t("common.add"):this.$t("common.edit")}},watch:{},mounted:function(){var e=this;window.onresize=function(){return function(){e.width=e.initWidth()}()}},methods:{initResource:function(){return{id:"",name:"",code:"",describe:""}},initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<991?"90%":this.screenWidth<1400?"45%":"800px"},setResource:function(e){var t=this;e&&(t.resource=Object(r["a"])({},e))},close:function(){this.$emit("close")},reset:function(){this.$refs.form.clearValidate(),this.$refs.form.resetFields(),this.resource=this.initResource()},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;e.editSubmit()}))},editSubmit:function(){var e=this;"add"===e.type?e.save():e.update()},save:function(){var e=this;C["a"].save(this.resource).then((function(t){var n=t.data;n.isSuccess&&(e.isVisible=!1,e.$message({message:e.$t("tips.createSuccess"),type:"success"}),e.$emit("success"))}))},update:function(){var e=this;C["a"].update(this.resource).then((function(t){var n=t.data;n.isSuccess&&(e.isVisible=!1,e.$message({message:e.$t("tips.updateSuccess"),type:"success"}),e.$emit("success"))}))}}},T=S,j=(n("288a"),Object(u["a"])(T,x,O,!1,null,"7ca00244",null)),I=j.exports,_=n("333d"),P=n("a888"),E=n("81ee"),A=n("1771"),N={name:"MenuManage",directives:{elDragDialog:P["a"]},components:{Icons:$,commonTree:m,Pagination:_["a"],ResourceEdit:I},data:function(){var e=this;return{dialog:{isVisible:!1,type:"add"},preview:{isVisible:!1,context:""},iconVisible:!1,menuTree:[],label:"",menu:this.initMenu(),resourceQueryParams:Object(A["e"])({model:{menuId:null}}),resourceTableKey:0,resourceLoading:!1,resourceSelection:[],resourceTableData:{total:0},rules:{label:[{required:!0,message:this.$t("rules.require"),trigger:"blur"},{min:1,max:255,message:this.$t("rules.range2to10"),trigger:"blur"}],path:[{max:255,message:this.$t("rules.noMoreThan100"),trigger:"blur"},{required:!0,message:this.$t("rules.require"),trigger:"blur"},{validator:function(t,n,o){var i=e.isUrl(e.menu.path);"/"===n||!i&&n.endsWith("/")?o("请填写有效的路由地址"):o()},trigger:"blur"}]}}},computed:{menuComponent:function(){var e="";if(this.menu.path&&"/"!==this.menu.path){var t=this.isUrl(this.menu.path);e=t?"跳转地址:".concat(this.menu.path):"组件路径:src/views/".concat(this.menu.component,".vue")}else e="组件路径:src/views/ceres/Index.vue";return e}},watch:{"menu.path":function(){this.computedComponent()}},mounted:function(){this.initMenuTree()},methods:{isUrl:function(e){var t=["http://","/http://","https://","/https://","www.","/www."],n=t.findIndex((function(t){return e.startsWith(t)}));return n>=0},menuPath:function(){var e=this.isUrl(this.menu.path);e||this.menu.path.startsWith("/")?e&&this.menu.path.startsWith("/")&&(this.menu.path=this.menu.path.substr(1)):this.menu.path="/"+this.menu.path},computedComponent:function(){var e=this.isUrl(this.menu.path);e?this.menu.component="Layout":this.menu.path?this.menu.component="ceres".concat(this.menu.path,"/Index"):this.menu.component="ceres/Index"},initMenuTree:function(){var e=this;E["a"].allTree().then((function(t){console.log(n,"redsadfewfdsfds");var n=t.data;e.menuTree=n.data}))},initMenu:function(){return{id:"",label:"",describe:"",code:"",isPublic:!1,path:"",component:"",isEnable:!0,sortValue:"",parentId:0,icon:"",group:""}},nodeClick:function(e){this.menu=Object(r["a"])({},e),this.$refs.form.clearValidate(),this.resourceQueryParams.model.menuId=e.id,this.resourceSearch()},handleNumChange:function(e){this.menu.sortValue=e},chooseIcons:function(){this.iconVisible=!0},chooseIcon:function(e){this.menu.icon=e,this.iconVisible=!1},submit:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;e.menu.createTime=e.menu.updateTime=null,e.menu.id?e.update():e.save()}))},save:function(){var e=this;console.log(this.menu.component),E["a"].save(this.menu).then((function(t){var n=t.data;n.isSuccess&&e.$message({message:e.$t("tips.createSuccess"),type:"success"}),e.reset()}))},update:function(){var e=this;console.log(this.menu),E["a"].update(this.menu).then((function(t){var n=t.data;n.isSuccess&&e.$message({message:e.$t("tips.updateSuccess"),type:"success"}),e.reset()}))},reset:function(){this.initMenuTree(),this.label="",this.resetForm()},search:function(){this.$refs.menuTree.$refs.treeRef.filter(this.label)},add:function(){this.resetForm();var e=this.$refs.menuTree.$refs.treeRef.getCheckedKeys();e.length>1?this.$message({message:this.$t("tips.onlyChooseOne"),type:"warning"}):e.length>0?this.menu.parentId=e[0]:this.menu.parentId=0,this.resourceQueryParams.model.menuId=null,this.resourceReset()},deleteMenu:function(){var e=this,t=this.$refs.menuTree.$refs.treeRef.getCheckedKeys();0===t.length?this.$message({message:this.$t("tips.noNodeSelected"),type:"warning"}):this.$confirm(this.$t("tips.confirmDeleteNode"),this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){E["a"].delete({ids:t}).then((function(t){var n=t.data;n.isSuccess&&e.$message({message:e.$t("tips.deleteSuccess"),type:"success"}),e.reset(),e.resourceQueryParams.model.menuId=null,e.resourceReset()}))})).catch((function(){e.$refs.menuTree.$refs.treeRef.setCheckedKeys([])}))},resetForm:function(){this.$refs.form.clearValidate(),this.$refs.form.resetFields(),this.menu=this.initMenu()},resourceAdd:function(){this.dialog.type="add",this.dialog.isVisible=!0,this.$refs.resourceEdit.setResource({menuId:this.menu.id})},resourceEdit:function(e){this.dialog.type="edit",this.dialog.isVisible=!0,e.menuId=this.menu.id,this.$refs.resourceEdit.setResource(e)},resourceSingleDelete:function(e){this.$refs.resourceTable.clearSelection(),this.$refs.resourceTable.toggleRowSelection(e,!0),this.resourceBatchDelete()},resourceBatchDelete:function(){var e=this;this.resourceSelection.length?this.$confirm(this.$t("tips.confirmDeleteNode"),this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){var t=e.resourceSelection.map((function(e){return e.id}));C["a"].delete({ids:t}).then((function(t){var n=t.data;n.isSuccess&&e.$message({message:e.$t("tips.deleteSuccess"),type:"success"}),e.resourceReset()}))})):this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},resourceReset:function(){this.resourceQueryParams=Object(A["e"])({model:{menuId:this.resourceQueryParams.menuId}}),this.$refs.resourceTable.clearSort(),this.$refs.resourceTable.clearFilter(),this.resourceSearch()},resourceSearch:function(){this.resourceFetch(Object(r["a"])({},this.resourceQueryParams))},resourceFetch:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.resourceQueryParams.timeRange&&(this.resourceQueryParams.map.createTime_st=this.queryParams.timeRange[0],this.resourceQueryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.resourceQueryParams.current=t.current?t.current:this.resourceQueryParams.current,this.resourceQueryParams.size=t.size?t.size:this.resourceQueryParams.size,this.resourceQueryParams.model.menuId?(this.resourceLoading=!0,C["a"].page(this.resourceQueryParams).then((function(t){var n=t.data;n.isSuccess&&(e.resourceTableData=n.data)})).finally((function(){return e.resourceLoading=!1}))):this.resourceTableData={}},resourceSortChange:function(e){this.resourceQueryParams.sort=e.prop,this.resourceQueryParams.order=e.order,this.resourceQueryParams.sort&&this.resourceSearch()},resourceFilterChange:function(e){for(var t in e)if(t.includes(".")){var n={};n[t.split(".")[1]]=e[t][0],this.resourceQueryParams.model[t.split(".")[0]]=n}else this.resourceQueryParams.model[t]=e[t][0];this.resourceSearch()},onResourceSelectChange:function(e){this.resourceSelection=e},resourceEditClose:function(){this.dialog.isVisible=!1},resourceEditSuccess:function(){this.resourceSearch()}}},R=N,V=(n("56925"),Object(u["a"])(R,o,i,!1,null,"7d38226c",null));t["default"]=V.exports},c2cf:function(e,t,n){"use strict";var o=n("5530"),i=n("9256"),r={enums:{method:"GET",url:"/enums"}};t["a"]={uploadFile:"".concat("https://pos.admin.api.lotus-wallet.com","/attachment/upload"),enums:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.enums),{},{data:e}))}}},ebb5:function(e,t,n){"use strict";var o=n("5530"),i=n("9256"),r={page:{method:"POST",url:"/dictionaryItem/page"},update:{method:"PUT",url:"/dictionaryItem"},save:{method:"POST",url:"/dictionaryItem"},delete:{method:"DELETE",url:"/dictionaryItem"},list:{method:"GET",url:"/dictionaryItem/codes"},preview:{method:"POST",url:"/dictionaryItem/preview"},export:{method:"POST",url:"/dictionaryItem/export"},import:{method:"POST",url:"/dictionaryItem/import"}};t["a"]={page:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.page),{},{data:e}))},save:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.save),{},{data:e}))},update:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.update),{},{data:e}))},delete:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.delete),{},{data:e}))},list:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.list),{},{data:e}))},preview:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.preview),{},{data:e}))},export:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.export),{},{responseType:"blob",data:e}))},import:function(e){return Object(i["a"])(Object(o["a"])(Object(o["a"])({},r.import),{},{data:e}))}}},f25c:function(e,t,n){}}]);