山东雷驰
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 line
17 KiB

3 months ago
!function(){function e(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||t(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{AVcX:function(r,i,a){"use strict";a.r(i),a.d(i,"BasicModule",function(){return W});var c=a("PCNd"),s=a("tyNb"),l=a("mrSG"),u=a("R0Ic"),d=a("0EQZ"),f=a("FvrZ"),h=a("0IaG"),p=a("8yBR"),v=a("fXoL"),b=a("bUwk"),m=a("Xi3o"),g=a("Olgc"),_=a("ofXK"),w=a("bTqV"),y=a("Xa2L"),S=a("bSwM"),k=a("NFeN"),O=a("sYmb");function x(e,t){1&e&&(v.Ub(0,"div",7),v.Pb(1,"mat-spinner"),v.Tb())}function C(e,t){if(1&e){var r=v.Vb();v.Ub(0,"mat-tree-node"),v.Pb(1,"button",11),v.Ub(2,"mat-checkbox",12),v.bc("change",function(){v.wc(r);var e=t.$implicit;return v.fc(2).toggle(e)}),v.Hc(3),v.gc(4,"translate"),v.Tb(),v.Tb()}if(2&e){var n=t.$implicit,i=v.fc(2);v.Cb(2),v.lc("checked",i.selection.isSelected(n.data.id)),v.Cb(1),v.Ic(v.hc(4,2,n.data.header))}}function T(e,t){if(1&e){var r=v.Vb();v.Ub(0,"mat-nested-tree-node"),v.Ub(1,"div"),v.Ub(2,"button",13),v.Ub(3,"mat-icon"),v.Hc(4),v.Tb(),v.Tb(),v.Ub(5,"mat-checkbox",14),v.bc("change",function(){v.wc(r);var e=t.$implicit;return v.fc(2).toggle(e)}),v.Hc(6),v.gc(7,"translate"),v.Tb(),v.Tb(),v.Ub(8,"div",15),v.Qb(9,16),v.Tb(),v.Tb()}if(2&e){var n=t.$implicit,i=v.fc(2);v.Cb(4),v.Ic(i.ctrl.isExpanded(n)?"expand_more":"chevron_right"),v.Cb(1),v.lc("checked",i.selected(n,!1))("indeterminate",i.selected(n,!0)),v.Cb(1),v.Ic(v.hc(7,5,n.data.header)),v.Cb(2),v.lc("@expand",i.ctrl.isExpanded(n)?"expanded":"collapsed")}}function j(e,t){if(1&e&&(v.Ub(0,"mat-tree",8),v.Fc(1,C,5,4,"mat-tree-node",9),v.Fc(2,T,10,7,"mat-nested-tree-node",10),v.Tb()),2&e){var r=v.fc();v.lc("dataSource",r.tree)("treeControl",r.ctrl),v.Cb(2),v.lc("matTreeNodeDefWhen",r.expandable)}}var I,U=((I=function(){function r(i,o,a,c,s){var u=this;n(this,r),this._id=i,this._httpService=o,this._i18nService=a,this._toastService=c,this._dialogRef=s,this._loading=!0,this.expandable=function(e,t){var r;return null===(r=t.children)||void 0===r?void 0:r.length},this.selected=function(e,t){if(u._tree.data){var r=u._ctrl.getDescendants(e),n=r.some(function(e){return u._selection.isSelected(e.data.id)});return t&&n&&(n=!r.every(function(e){return u._selection.isSelected(e.data.id)})),n}},this.toggle=function(t){var r,n;u._selection.toggle(t.data.id);var i=u._ctrl.getDescendants(t);i.length&&(u._selection.isSelected(t.data.id)?(r=u._selection).select.apply(r,e(i.map(function(e){return e.data.id}))):(n=u._selection).deselect.apply(n,e(i.map(function(e){return e.data.id}))));for(var o=t.parent;o;)u._selection.isSelected(o.data.id)?u.selected(o,!1)||u._selection.deselect(o.data.id):u.selected(o,!1)&&u._selection.select(o.data.id),o=o.parent},this.save=function(){return Object(l.a)(u,void 0,void 0,regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:void 0!==this._httpService.post("roles/".concat(this._id,"/menu"),this._selection.selected).catch(function(e){return Object(l.a)(t,void 0,void 0,regeneratorRuntime.mark(function t(){var r,n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t