@ibiz-template/core 0.0.2-beta.0 → 0.0.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- System.register(["lodash-es","qx-util","axios","qs","pluralize"],(function(t){"use strict";var e,n,r,o,i,s,c,a,u;return{setters:[function(t){e=t.debounce,n=t.merge,r=t.uniqueId,o=t.isFunction},function(t){i=t.getCookie,s=t.notNilEmpty},function(t){c=t.default},function(t){a=t.stringify},function(t){u=t.default}],execute:function(){function l(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(n){if("default"!==n&&!(n in t)){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}))})),Object.freeze(t)}t({calcMimeByFileName:X,colorBlend:function(t,e,n,r){void 0===n&&(n=.5);void 0===r&&(r="hex");t=t.trim(),e=e.trim();var o=G(t),i=G(e),s=[H((1-n)*o[0]+n*i[0]),H((1-n)*o[1]+n*i[1]),H((1-n)*o[2]+n*i[2]),(1-n)*o[3]+n*i[3]];if("hex"===r){var c=[s[0].toString(16),s[1].toString(16),s[2].toString(16),0===s[3]?"00":H(255*s[3]).toString(16)];return"#".concat(c[0]).concat(c[1]).concat(c[2]).concat(c[3])}return"rgb(".concat(s[0]," ").concat(s[1]," ").concat(s[2]," / ").concat(s[3],")")},debounce:function(t,e,n){var r;return function(){for(var o=this,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(r&&clearTimeout(r),n){var c=!r;r=setTimeout((function(){r=null}),e),c&&t.apply(this,i)}else r=setTimeout((function(){t.apply(o,i)}),e)}},debounceAndAsyncMerge:function(t,n,r){var o,i=this,s=[],c=e((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return p(i,void 0,void 0,(function(){var n,r;return d(this,(function(i){switch(i.label){case 0:o=void 0,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,t.apply(void 0,v([],h(e),!1))];case 2:return n=i.sent(),s.forEach((function(t){t.resolve(n)})),s=[],[2,n];case 3:return r=i.sent(),s.forEach((function(t){t.reject(r)})),s=[],[3,4];case 4:return[2]}}))}))}),r);return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p(i,void 0,void 0,(function(){var e;return d(this,(function(r){return e=t,o&&(e=n(o,e)),o=e,c.apply(void 0,v([],h(e),!1)),[2,new Promise((function(t,e){s.push({resolve:t,reject:e})}))]}))}))}},debounceAndMerge:function(t,n,r){var o,i=e((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o=void 0,t.apply(void 0,v([],h(e),!1))}),r);return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t;return o&&(r=n(o,r)),o=r,i.apply(void 0,v([],h(r),!1))}},downloadFileFromBlob:function(t,e){var n=X(e),r=new Blob([t],{type:n}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)},eventPath:B,fileListToArr:J,getToken:P,install:function(){if(window.ibiz)throw new Error("ibiz 已经存在, 无需重复安装");window.ibiz=new Y,window.___fc=new $},isEventInside:V,isImage:function(t){var e=t.split(".").pop();if(!e)return!1;return[".jpeg","jpg","gif","png","bmp","svg"].includes(e)},isOverlap:function(t,e){return Array.from(new Set(v(v([],h(t),!1),h(e),!1))).length!==t.length+e.length},listenJSEvent:D,onClickOutside:function(t,e,n){void 0===n&&(n={});var r=n.window,o=void 0===r?W:r,i=n.ignore,s=void 0===i?[]:i,c=n.capture,a=void 0===c||c;if(!t)throw new O("target元素不存在");if(!o)throw new O("找不到window");var u,l=!0,f=function(e){return!v([t],h(s),!1).some((function(t){return V(e,t)}))},p=!1,d=function(t){p||(o.clearTimeout(u),l&&f(t)&&e(t))},m=[D(o,"click",d,{passive:!0,capture:a}),D(o,"pointerdown",(function(t){p||(l=f(t))}),{passive:!0}),D(o,"pointerup",(function(t){if(!p&&0===t.button){var e=B(t);t.composedPath=function(){return e},u=o.setTimeout((function(){return d(t)}),50)}}),{passive:!0})].filter(Boolean);return{stop:function(){return m.forEach((function(t){return t()}))},pause:function(){p=!0},proceed:function(){p=!1}}},plural:N,pluralLower:function(t){return N(t).toLowerCase()},selectFile:K,throttle:function(t,e){var n=null;return function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];n||(n=setTimeout((function(){t.apply(r,o),n=null}),e))}},toDisposable:b,uploadFile:function(t){var e=this,i=n({multiple:!0,accept:"",separate:!0,beforeUpload:function(t,e){return!0},finish:function(t){},success:function(t,e){},error:function(t,e){},progress:function(t){}},t),s=function(t,n){return p(e,void 0,void 0,(function(){var e;return d(this,(function(n){if(i.request&&o(i.request))return[2,i.request(t)];throw e=new FormData,t.forEach((function(t){e.append("file",t)})),new Error("多应用模式等待重新实现请求")}))}))},c=function(t){return p(e,void 0,void 0,(function(){var e,n,o;return d(this,(function(c){switch(c.label){case 0:if(e=t.map((function(t){return{status:"uploading",name:t.name,uid:r(),percentage:0}})),!i.beforeUpload(t,e))return e.forEach((function(t){t.status="cancel"})),ibiz.log.debug("取消上传",e),[2,e];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,s(t)];case 2:return n=c.sent(),e.forEach((function(t){t.status="finished"})),i.success(e,n),e.forEach((function(t){t.response=n})),[3,4];case 3:return o=c.sent(),e.forEach((function(t){t.status="fail"})),i.error(e,o),e.forEach((function(t){t.error=o})),ibiz.log.error(o),ibiz.log.error("".concat(t.map((function(t){return t.name})).join(","),"上传失败")),[3,4];case 4:return[2,e]}}))}))};K({accept:i.accept,multiple:i.multiple,onSelected:function(t){!function(t){p(e,void 0,void 0,(function(){var e,n,r,o=this;return d(this,(function(s){switch(s.label){case 0:return e=i.separate?t.map((function(t){return[t]})):[t],[4,Promise.allSettled(e.map((function(t){return p(o,void 0,void 0,(function(){return d(this,(function(e){return[2,c(t)]}))}))})))];case 1:return n=s.sent(),r=[],n.forEach((function(t){"fulfilled"===t.status&&r.push.apply(r,v([],h(t.value),!1))})),i.finish(r),[2]}}))}))}(t)}})}});var f=function(t,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},f(t,e)};function p(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,c)}a((r=r.apply(t,e||[])).next())}))}function d(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,r=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){s=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){s.label=c[1];break}if(6===c[0]&&s.label<o[1]){s.label=o[1],o=c;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(c);break}o[2]&&s.ops.pop(),s.trys.pop();continue}c=e.call(t,s)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}function h(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function v(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var m=function(){function t(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}return t.Undefined=new t(void 0),t}(),y=t("LinkedList",function(){function t(){this._first=m.Undefined,this._last=m.Undefined,this._size=0}return Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return this._first===m.Undefined},t.prototype.clear=function(){for(var t=this._first;t!==m.Undefined;){var e=t.next;t.prev=m.Undefined,t.next=m.Undefined,t=e}this._first=m.Undefined,this._last=m.Undefined,this._size=0},t.prototype.unshift=function(t){return this._insert(t,!1)},t.prototype.push=function(t){return this._insert(t,!0)},t.prototype._insert=function(t,e){var n=this,r=new m(t);if(this._first===m.Undefined)this._first=r,this._last=r;else if(e){var o=this._last;this._last=r,r.prev=o,o.next=r}else{var i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;var s=!1;return function(){s||(s=!0,n._remove(r))}},t.prototype.shift=function(){if(this._first!==m.Undefined){var t=this._first.element;return this._remove(this._first),t}},t.prototype.pop=function(){if(this._last!==m.Undefined){var t=this._last.element;return this._remove(this._last),t}},t.prototype._remove=function(t){if(t.prev!==m.Undefined&&t.next!==m.Undefined){var e=t.prev;e.next=t.next,t.next.prev=e}else t.prev===m.Undefined&&t.next===m.Undefined?(this._first=m.Undefined,this._last=m.Undefined):t.next===m.Undefined?(this._last=this._last.prev,this._last.next=m.Undefined):t.prev===m.Undefined&&(this._first=this._first.next,this._first.prev=m.Undefined);this._size-=1},t.prototype[Symbol.iterator]=function(){var t;return d(this,(function(e){switch(e.label){case 0:t=this._first,e.label=1;case 1:return t===m.Undefined?[3,3]:[4,t.element];case 2:return e.sent(),t=t.next,[3,1];case 3:return[2]}}))},t}());function g(t){var e,n=this,r=!1;return function(){return r?e:(r=!0,e=t.apply(n,arguments))}}function b(t){return{dispose:g((function(){t()}))}}var w,_,E=t("CommandsRegistry",function(){function t(){this.commands=new Map}return t.prototype.registerCommand=function(t,e,n){var r=this;if(!t)throw new Error("invalid command");if("string"==typeof t){if(!e)throw new Error("invalid command");return this.registerCommand({id:t,handler:e,opts:n})}var o=t.id,i=this.commands.get(o);i||(i=new y,this.commands.set(o,i));var s=i.unshift(t);return b((function(){s();var t=r.commands.get(o);(null==t?void 0:t.isEmpty())&&r.commands.delete(o)}))},t.prototype.hasCommand=function(t){return this.commands.has(t)},t.prototype.getCommand=function(t){var e=this.commands.get(t);if(e&&!e.isEmpty())return e[Symbol.iterator]().next().value},t.prototype.getCommands=function(){var t,e,n=new Map,r=this.commands.keys();try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=o.next();!i.done;i=o.next()){var s=i.value,c=this.getCommand(s);c&&n.set(s,c)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},t.prototype.getCommandOpt=function(t){var e=this.getCommand(t);return null==e?void 0:e.opts},t}()),U=t("CommandController",function(){function t(){this.commandRegister=new E}return t.prototype.register=function(t,e,n){return this.commandRegister.registerCommand(t,e,n)},t.prototype.execute=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return p(this,void 0,void 0,(function(){var n;return d(this,(function(r){if(n=this.commandRegister.getCommand(t))return[2,n.handler.apply(n,v([],h(e),!1))];throw new Error("未注册指令: ".concat(t,",请先注册指令"))}))}))},t.prototype.hasCommand=function(t,e){var n=!!this.commandRegister.hasCommand(t);if(!0===e&&!0===n)throw new Error("未注册指令: ".concat(t,",请先注册指令"));return n},t.prototype.getCommandOpts=function(t){return this.commandRegister.getCommandOpt(t)},t}()),x=(t("commands",new U),t("CoreConst",function(){function t(){}return t.DEFAULT_MODEL_SERVICE_TAG="default",t.TOKEN="access_token",t}())),R=t("NOOP",(function(){}));t("HttpStatusMessageConst",{200:"服务器成功返回请求的数据。",201:"新建或修改数据成功。",202:"一个请求已经进入后台排队(异步任务)。",204:"删除数据成功。",400:"发出的请求有错误,服务器没有进行新建或修改数据的操作。",401:"用户没有权限(令牌、用户名、密码错误)。",403:"用户得到授权,但是访问是被禁止的。",404:"发出的请求针对的是不存在的记录,服务器没有进行操作。",406:"请求的格式不可得。",410:"请求的资源被永久删除,且不会再得到的。",422:"当创建一个对象时,发生一个验证错误。",500:"服务器发生错误,请检查服务器。",502:"网关错误。",503:"服务不可用,服务器暂时过载或维护。",504:"网关超时。"});t("LoginMode",w),function(t){t.DEFAULT="DEFAULT",t.CUSTOM="CUSTOM",t.CAS="CAS"}(w||t("LoginMode",w={})),t("MenuPermissionMode",_),function(t){t.MIXIN="MIXIN",t.RESOURCE="RESOURCE",t.RT="RT"}(_||t("MenuPermissionMode",_={}));t("IBizContext",function(){function t(t,e){if(void 0===t&&(t={}),e){var n=this;Object.defineProperty(this,"_parent",{enumerable:!1,value:e}),Object.defineProperty(this,"_context",{enumerable:!1,value:{}});var r={};Object.keys(e).forEach((function(t){r[t]={enumerable:!0,set:function(e){n._context[t]=null==e?null:e},get:function(){return void 0!==n._context[t]?n._context[t]:e[t]}}})),Object.defineProperties(this,r)}Object.assign(this,t)}return t.prototype.getOwnContext=function(){var t=this,e={};return Object.keys(this).forEach((function(n){Object.prototype.hasOwnProperty.call(t._parent,n)&&!Object.prototype.hasOwnProperty.call(t._context,n)||(e[n]=t[n])})),e},t}());var C=t("Environment",{dev:!1,hub:!1,logLevel:"ERROR",baseUrl:"",appId:"",pluginBaseUrl:"./plugins",remoteModelUrl:"/remotemodel",assetsUrl:"./assets",dcSystem:"",downloadFileUrl:"/ibizutil/download",uploadFileUrl:"/ibizutil/upload",casLoginUrl:"",loginMode:w.DEFAULT,menuPermissionMode:_.MIXIN,enablePermission:!0}),k=t("HttpError",(function(t){this.name="HttpError";var e=t.response;this.response=t.response,e?(e.data?this.message=e.data.message:this.message=e.statusText,this.message||(this.message="网络异常,请稍后重试!"),this.status=e.status):(this.message=t.message,this.status=500)})),O=t("RuntimeError",(function(t){this.message=t,this.name="Runtime Error"}));function P(){return i(x.TOKEN)}var T,L,S,j=t("Interceptor",function(){function t(){}return t.prototype.onBeforeRequest=function(t){return p(this,void 0,void 0,(function(){return d(this,(function(e){return[2,t]}))}))},t.prototype.onRequestError=function(t){return Promise.reject(t)},t.prototype.onResponseSuccess=function(t){return p(this,void 0,void 0,(function(){return d(this,(function(e){return[2,t]}))}))},t.prototype.onResponseError=function(t){return Promise.reject(t)},t.prototype.use=function(t){this.requestTag=t.interceptors.request.use(this.onBeforeRequest,this.onRequestError),this.responseTag=t.interceptors.response.use(this.onResponseSuccess,this.onResponseError)},t.prototype.eject=function(t){this.requestTag&&t.interceptors.request.eject(this.requestTag),this.responseTag&&t.interceptors.response.eject(this.responseTag)},t}()),I=t("CoreInterceptor",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.onBeforeRequest=function(e){return p(this,void 0,void 0,(function(){var n;return d(this,(function(r){switch(r.label){case 0:return[4,t.prototype.onBeforeRequest.call(this,e)];case 1:return r.sent(),e.headers||(e.headers={}),e.headers.Authorization="Bearer ".concat(P()),(n=ibiz.orgData)&&(n.systemid&&(e.headers.srfsystemid=n.systemid),n.orgid&&(e.headers.srforgid=n.orgid)),[2,e]}}))}))},e}(j)),A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},z={};L=A,S=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(r){return"debug"===r&&(r="log"),typeof console!==e&&("trace"===r&&n?i:void 0!==console[r]?o(console,r):void 0!==console.log?o(console,"log"):t)}function c(e,n){for(var o=0;o<r.length;o++){var i=r[o];this[i]=o<e?t:this.methodFactory(i,e,n)}this.log=this.debug}function a(t,n,r){return function(){typeof console!==e&&(c.call(this,n,r),this[t].apply(this,arguments))}}function u(t,e,n){return s(t)||a.apply(this,arguments)}function l(t,n,o){var i,s=this;n=null==n?"WARN":n;var a="loglevel";function l(){var t;if(typeof window!==e&&a){try{t=window.localStorage[a]}catch(t){}if(typeof t===e)try{var n=window.document.cookie,r=n.indexOf(encodeURIComponent(a)+"=");-1!==r&&(t=/^([^;]+)/.exec(n.slice(r))[1])}catch(t){}return void 0===s.levels[t]&&(t=void 0),t}}"string"==typeof t?a+=":"+t:"symbol"==typeof t&&(a=void 0),s.name=t,s.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},s.methodFactory=o||u,s.getLevel=function(){return i},s.setLevel=function(n,o){if("string"==typeof n&&void 0!==s.levels[n.toUpperCase()]&&(n=s.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&function(t){var n=(r[t]||"silent").toUpperCase();if(typeof window!==e&&a){try{return void(window.localStorage[a]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(a)+"="+n+";"}catch(t){}}}(n),c.call(s,n,t),typeof console===e&&n<s.levels.SILENT)return"No console available for logging"},s.setDefaultLevel=function(t){n=t,l()||s.setLevel(t,!1)},s.resetLevel=function(){s.setLevel(n,!1),function(){if(typeof window!==e&&a){try{return void window.localStorage.removeItem(a)}catch(t){}try{window.document.cookie=encodeURIComponent(a)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}()},s.enableAll=function(t){s.setLevel(s.levels.TRACE,t)},s.disableAll=function(t){s.setLevel(s.levels.SILENT,t)};var f=l();null==f&&(f=n),s.setLevel(f,!1)}var f=new l,p={};f.getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=p[t];return e||(e=p[t]=new l(t,f.getLevel(),f.methodFactory)),e};var d=typeof window!==e?window.log:void 0;return f.noConflict=function(){return typeof window!==e&&window.log===f&&(window.log=d),f},f.getLoggers=function(){return p},f.default=f,f},(T={get exports(){return z},set exports(t){z=t}}).exports?T.exports=S():L.log=S();var M=l({__proto__:null,default:z},[z]);t("Logger",M);function q(t,e,n,r,o){var i="".concat(t,"-").concat(e);return n&&(i+="-".concat(n)),r&&(i+="__".concat(r)),o&&(i+="--".concat(o)),i}t("Namespace",function(){function t(t,e){this.block=t,this.namespace=e||"ibiz"}return t.prototype.b=function(t){return void 0===t&&(t=""),q(this.namespace,this.block,t,"","")},t.prototype.e=function(t){return t?q(this.namespace,this.block,"",t,""):""},t.prototype.m=function(t){return t?q(this.namespace,this.block,"","",t):""},t.prototype.be=function(t,e){return t&&e?q(this.namespace,this.block,t,e,""):""},t.prototype.em=function(t,e){return t&&e?q(this.namespace,this.block,"",t,e):""},t.prototype.bm=function(t,e){return t&&e?q(this.namespace,this.block,t,"",e):""},t.prototype.bem=function(t,e,n){return t&&e&&n?q(this.namespace,this.block,t,e,n):""},t.prototype.is=function(t,e){return t&&e?"".concat("is-").concat(t):""},t.prototype.cssVar=function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarName(n)]=t[n]);return e},t.prototype.cssVarBlock=function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarBlockName(n)]=t[n]);return e},t.prototype.cssVarName=function(t){return"--".concat(this.namespace,"-").concat(t)},t.prototype.cssVarBlockName=function(t){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(t)},t}()),t("HttpResponse",(function(t,e,n){this.local=!0,this.ok=!1,this.headers={},this.config={},this.data=t,this.status=e||200,this.statusText=n||"",this.status>=200&&this.status<300&&(this.ok=!0)}));var F=t("Net",function(){function t(t){this.interceptors=new Map,this.instance=c.create(t),this.addInterceptor("Default",new I)}return t.prototype.addInterceptor=function(t,e){e.use(this.instance),this.interceptors.set(t,e)},t.prototype.removeInterceptor=function(t){var e=this.interceptors.get(t);e&&(e.eject(this.instance),this.interceptors.delete(t))},Object.defineProperty(t.prototype,"presetConfig",{get:function(){return{baseURL:this.instance.defaults.baseURL||"".concat(ibiz.env.baseUrl,"/").concat(ibiz.env.appId),headers:{"Content-Type":"application/json;charset=UTF-8",Accept:"application/json"}}},enumerable:!1,configurable:!0}),t.prototype.mergeConfig=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this.presetConfig:n.apply(void 0,v([this.presetConfig],h(t),!1))},t.prototype.post=function(t,e,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),p(this,void 0,void 0,(function(){var o,i;return d(this,(function(s){switch(s.label){case 0:t=this.handleAppPresetParam(t,n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.request(t,{method:"post",data:e,headers:r})];case 2:return o=s.sent(),[2,this.doResponseResult(o)];case 3:throw i=s.sent(),new k(i);case 4:return[2]}}))}))},t.prototype.get=function(t,e,r,o){return void 0===e&&(e={}),void 0===r&&(r={}),void 0===o&&(o={}),p(this,void 0,void 0,(function(){var i,s;return d(this,(function(c){switch(c.label){case 0:t=this.attachUrlParam(t,e),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.request(t,n({method:"get",headers:r},o))];case 2:return i=c.sent(),[2,this.doResponseResult(i)];case 3:throw s=c.sent(),new k(s);case 4:return[2]}}))}))},t.prototype.delete=function(t,e,n){return void 0===n&&(n={}),p(this,void 0,void 0,(function(){var r,o;return d(this,(function(i){switch(i.label){case 0:t=this.handleAppPresetParam(t,e),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.request(t,{method:"delete",headers:n})];case 2:return r=i.sent(),[2,this.doResponseResult(r)];case 3:throw o=i.sent(),new k(o);case 4:return[2]}}))}))},t.prototype.put=function(t,e,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),p(this,void 0,void 0,(function(){var o,i;return d(this,(function(s){switch(s.label){case 0:t=this.handleAppPresetParam(t,n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.request(t,{method:"put",data:e,headers:r})];case 2:return o=s.sent(),[2,this.doResponseResult(o)];case 3:throw i=s.sent(),new k(i);case 4:return[2]}}))}))},t.prototype.getModel=function(t,e){return void 0===e&&(e={}),p(this,void 0,void 0,(function(){var n,r;return d(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.instance.get(t,{headers:e})];case 1:return n=o.sent(),[2,this.doResponseResult(n)];case 2:throw r=o.sent(),new k(r);case 3:return[2]}}))}))},t.prototype.request=function(t,e){return void 0===e&&(e={}),p(this,void 0,void 0,(function(){var n,r;return d(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.instance.request(this.mergeConfig({url:t},e))];case 1:return n=o.sent(),[2,this.doResponseResult(n)];case 2:throw r=o.sent(),new k(r);case 3:return[2]}}))}))},t.prototype.doResponseResult=function(t){var e=t;return e.status>=200&&e.status<=299&&(e.ok=!0),e},t.prototype.handleAppPresetParam=function(t,e){if(e){var n=Object.keys(e),r={};return n.forEach((function(t){t.startsWith("srf")&&s(e[t])&&(r[t]=e[t])})),this.attachUrlParam(t,e)}return t},t.prototype.attachUrlParam=function(t,e){var n=a(e);return s(n)&&(t=t.endsWith("?")||-1!==t.indexOf("?")&&t.endsWith("&")?"".concat(t).concat(n):-1===t.indexOf("?")||t.endsWith("&")?"".concat(t,"?").concat(n):"".concat(t,"&").concat(n)),t},t}());function N(t){return u(t)}t("UrlHelper",function(){function t(){}return Object.defineProperty(t,"routeBase",{get:function(){return"".concat(this.appBase,"/#")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"appBase",{get:function(){var t=window.location,e=t.origin,n=t.pathname;return"".concat(e).concat(n).replace(/\/$/,"")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"routePath",{get:function(){return window.location.hash.replace("#","")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"fullPath",{get:function(){return window.location.href},enumerable:!1,configurable:!0}),t}());function B(t){var e=t.composedPath&&t.composedPath()||t.path;if(null!=e)return e;return[t.target].concat(function t(e,n){void 0===n&&(n=[]);var r=e.parentNode;return r?t(r,n.concat([r])):n}(t.target))}function D(t,e,n,r){void 0===r&&(r={}),t.addEventListener(e,n,r);var o=function(){t.removeEventListener(e,n,r),o=R};return function(){o()}}function V(t,e){return e&&(t.target===e||B(t).includes(e))}var W="undefined"!=typeof window?window:void 0;var H=Math.round;function G(t){var e=t.length,n=[];if("rgb"===t.slice(0,3).toLowerCase()){var r=t.match(/([\d|.%]{1,3})/g);n[0]=parseInt(r[0],10),n[1]=parseInt(r[1],10),n[2]=parseInt(r[2],10),n[3]=r[3]?-1!==r[3].indexOf("%")?parseInt(r[3],10)/100:parseFloat(r[3]):1}else{r=void 0;r=e<6?parseInt(String(t[1])+t[1]+t[2]+t[2]+t[3]+t[3]+(e>4?String(t[4])+t[4]:""),16):parseInt(t.slice(1),16),n[0]=r>>16&255,n[1]=r>>8&255,n[2]=255&r,n[3]=9===e||5===e?H((r>>24&255)/255*1e4)/1e4:1}return n}function X(t){var e="";switch(t.split(".").pop()){case".wps":e="application/kswps";break;case".doc":e="application/msword";break;case".docx":e="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case".txt":e="text/plain";break;case".zip":e="application/zip";break;case".png":e="image/png";break;case".gif":e="image/gif";break;case".jpeg":case".jpg":e="image/jpeg";break;case".rtf":e="application/rtf";break;case".avi":e="video/x-msvideo";break;case".gz":e="application/x-gzip";break;case".tar":e="application/x-tar";break;case".xlsx":e="application/vnd.ms-excel";break;default:e=""}return e}function J(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e}function K(t){var e=n({multiple:!0,accept:""},t),r=document.createElement("input");r.setAttribute("type","file"),r.setAttribute("multiple","".concat(e.multiple)),r.setAttribute("accept",e.accept),r.onchange=function(t){var n=t.target,r=n.files?J(n.files):[];0!==r.length&&(e.onSelected(r),n.value="")},document.body.appendChild(r),r.click(),document.body.removeChild(r)}t("CountLatch",function(){function t(){this.promise=null,this.resolve=null,this.count=0}return t.prototype.startPromise=function(){var t=this;this.promise=new Promise((function(e){t.resolve=e}))},t.prototype.endPromise=function(){this.resolve&&(this.resolve(),this.resolve=null,this.promise=null)},t.prototype.lock=function(){console.log("lock"),this.count+=1,this.promise||(console.log("startPromise"),this.startPromise())},t.prototype.unlock=function(){if(this.count<1)throw new O("lock和unlock次数不匹配!");console.log("unlock"),this.count-=1,0===this.count&&this.endPromise()},t.prototype.await=function(){return p(this,void 0,void 0,(function(){return d(this,(function(t){switch(t.label){case 0:return this.promise?[4,this.promise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t}());var Y=t("IBizSys",(function(){this.env=C,this.log=M,this.net=new F,this.commands=new U})),$=t("FactoryCenter",(function(){}))}}}));
1
+ System.register(["lodash-es","qx-util","axios","qs","pluralize"],(function(t){"use strict";var e,n,r,o,i,s,a,c,u;return{setters:[function(t){e=t.debounce,n=t.merge,r=t.uniqueId,o=t.isFunction},function(t){i=t.getCookie,s=t.notNilEmpty},function(t){a=t.default},function(t){c=t.stringify},function(t){u=t.default}],execute:function(){function l(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(n){if("default"!==n&&!(n in t)){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}))})),Object.freeze(t)}t({calcMimeByFileName:X,colorBlend:function(t,e,n,r){void 0===n&&(n=.5);void 0===r&&(r="hex");t=t.trim(),e=e.trim();var o=G(t),i=G(e),s=[H((1-n)*o[0]+n*i[0]),H((1-n)*o[1]+n*i[1]),H((1-n)*o[2]+n*i[2]),(1-n)*o[3]+n*i[3]];if("hex"===r){var a=[s[0].toString(16),s[1].toString(16),s[2].toString(16),0===s[3]?"00":H(255*s[3]).toString(16)];return"#".concat(a[0]).concat(a[1]).concat(a[2]).concat(a[3])}return"rgb(".concat(s[0]," ").concat(s[1]," ").concat(s[2]," / ").concat(s[3],")")},debounce:function(t,e,n){var r;return function(){for(var o=this,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(r&&clearTimeout(r),n){var a=!r;r=setTimeout((function(){r=null}),e),a&&t.apply(this,i)}else r=setTimeout((function(){t.apply(o,i)}),e)}},debounceAndAsyncMerge:function(t,n,r){var o,i=this,s=[],a=e((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return p(i,void 0,void 0,(function(){var n,r;return d(this,(function(i){switch(i.label){case 0:o=void 0,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,t.apply(void 0,v([],h(e),!1))];case 2:return n=i.sent(),s.forEach((function(t){t.resolve(n)})),s=[],[2,n];case 3:return r=i.sent(),s.forEach((function(t){t.reject(r)})),s=[],[3,4];case 4:return[2]}}))}))}),r);return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p(i,void 0,void 0,(function(){var e;return d(this,(function(r){return e=t,o&&(e=n(o,e)),o=e,a.apply(void 0,v([],h(e),!1)),[2,new Promise((function(t,e){s.push({resolve:t,reject:e})}))]}))}))}},debounceAndMerge:function(t,n,r){var o,i=e((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o=void 0,t.apply(void 0,v([],h(e),!1))}),r);return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t;return o&&(r=n(o,r)),o=r,i.apply(void 0,v([],h(r),!1))}},downloadFileFromBlob:function(t,e){var n=X(e),r=new Blob([t],{type:n}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)},eventPath:B,fileListToArr:J,getToken:P,install:function(){if(window.ibiz)throw new Error("ibiz 已经存在, 无需重复安装");window.ibiz=new Y,window.___fc=new $},isEventInside:V,isImage:function(t){var e=t.split(".").pop();if(!e)return!1;return[".jpeg","jpg","gif","png","bmp","svg"].includes(e)},isOverlap:function(t,e){return Array.from(new Set(v(v([],h(t),!1),h(e),!1))).length!==t.length+e.length},listenJSEvent:D,onClickOutside:function(t,e,n){void 0===n&&(n={});var r=n.window,o=void 0===r?W:r,i=n.ignore,s=void 0===i?[]:i,a=n.capture,c=void 0===a||a;if(!t)throw new O("target元素不存在");if(!o)throw new O("找不到window");var u,l=!0,f=function(e){return!v([t],h(s),!1).some((function(t){return V(e,t)}))},p=!1,d=function(t){p||(o.clearTimeout(u),l&&f(t)&&e(t))},m=[D(o,"click",d,{passive:!0,capture:c}),D(o,"pointerdown",(function(t){p||(l=f(t))}),{passive:!0}),D(o,"pointerup",(function(t){if(!p&&0===t.button){var e=B(t);t.composedPath=function(){return e},u=o.setTimeout((function(){return d(t)}),50)}}),{passive:!0})].filter(Boolean);return{stop:function(){return m.forEach((function(t){return t()}))},pause:function(){p=!0},proceed:function(){p=!1}}},plural:N,pluralLower:function(t){return N(t).toLowerCase()},selectFile:K,throttle:function(t,e){var n=null;return function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];n||(n=setTimeout((function(){t.apply(r,o),n=null}),e))}},toDisposable:b,uploadFile:function(t){var e=this,i=n({multiple:!0,accept:"",separate:!0,beforeUpload:function(t,e){return!0},finish:function(t){},success:function(t,e){},error:function(t,e){},progress:function(t){}},t),s=function(t,n){return p(e,void 0,void 0,(function(){var e;return d(this,(function(n){if(i.request&&o(i.request))return[2,i.request(t)];throw e=new FormData,t.forEach((function(t){e.append("file",t)})),new Error("多应用模式等待重新实现请求")}))}))},a=function(t){return p(e,void 0,void 0,(function(){var e,n,o;return d(this,(function(a){switch(a.label){case 0:if(e=t.map((function(t){return{status:"uploading",name:t.name,uid:r(),percentage:0}})),!i.beforeUpload(t,e))return e.forEach((function(t){t.status="cancel"})),ibiz.log.debug("取消上传",e),[2,e];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,s(t)];case 2:return n=a.sent(),e.forEach((function(t){t.status="finished"})),i.success(e,n),e.forEach((function(t){t.response=n})),[3,4];case 3:return o=a.sent(),e.forEach((function(t){t.status="fail"})),i.error(e,o),e.forEach((function(t){t.error=o})),ibiz.log.error(o),ibiz.log.error("".concat(t.map((function(t){return t.name})).join(","),"上传失败")),[3,4];case 4:return[2,e]}}))}))};K({accept:i.accept,multiple:i.multiple,onSelected:function(t){!function(t){p(e,void 0,void 0,(function(){var e,n,r,o=this;return d(this,(function(s){switch(s.label){case 0:return e=i.separate?t.map((function(t){return[t]})):[t],[4,Promise.allSettled(e.map((function(t){return p(o,void 0,void 0,(function(){return d(this,(function(e){return[2,a(t)]}))}))})))];case 1:return n=s.sent(),r=[],n.forEach((function(t){"fulfilled"===t.status&&r.push.apply(r,v([],h(t.value),!1))})),i.finish(r),[2]}}))}))}(t)}})}});var f=function(t,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},f(t,e)};function p(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))}function d(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function h(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function v(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var m=function(){function t(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}return t.Undefined=new t(void 0),t}(),y=t("LinkedList",function(){function t(){this._first=m.Undefined,this._last=m.Undefined,this._size=0}return Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return this._first===m.Undefined},t.prototype.clear=function(){for(var t=this._first;t!==m.Undefined;){var e=t.next;t.prev=m.Undefined,t.next=m.Undefined,t=e}this._first=m.Undefined,this._last=m.Undefined,this._size=0},t.prototype.unshift=function(t){return this._insert(t,!1)},t.prototype.push=function(t){return this._insert(t,!0)},t.prototype._insert=function(t,e){var n=this,r=new m(t);if(this._first===m.Undefined)this._first=r,this._last=r;else if(e){var o=this._last;this._last=r,r.prev=o,o.next=r}else{var i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;var s=!1;return function(){s||(s=!0,n._remove(r))}},t.prototype.shift=function(){if(this._first!==m.Undefined){var t=this._first.element;return this._remove(this._first),t}},t.prototype.pop=function(){if(this._last!==m.Undefined){var t=this._last.element;return this._remove(this._last),t}},t.prototype._remove=function(t){if(t.prev!==m.Undefined&&t.next!==m.Undefined){var e=t.prev;e.next=t.next,t.next.prev=e}else t.prev===m.Undefined&&t.next===m.Undefined?(this._first=m.Undefined,this._last=m.Undefined):t.next===m.Undefined?(this._last=this._last.prev,this._last.next=m.Undefined):t.prev===m.Undefined&&(this._first=this._first.next,this._first.prev=m.Undefined);this._size-=1},t.prototype[Symbol.iterator]=function(){var t;return d(this,(function(e){switch(e.label){case 0:t=this._first,e.label=1;case 1:return t===m.Undefined?[3,3]:[4,t.element];case 2:return e.sent(),t=t.next,[3,1];case 3:return[2]}}))},t}());function g(t){var e,n=this,r=!1;return function(){return r?e:(r=!0,e=t.apply(n,arguments))}}function b(t){return{dispose:g((function(){t()}))}}var w,_,E=t("CommandsRegistry",function(){function t(){this.commands=new Map}return t.prototype.registerCommand=function(t,e,n){var r=this;if(!t)throw new Error("invalid command");if("string"==typeof t){if(!e)throw new Error("invalid command");return this.registerCommand({id:t,handler:e,opts:n})}var o=t.id,i=this.commands.get(o);i||(i=new y,this.commands.set(o,i));var s=i.unshift(t);return b((function(){s();var t=r.commands.get(o);(null==t?void 0:t.isEmpty())&&r.commands.delete(o)}))},t.prototype.hasCommand=function(t){return this.commands.has(t)},t.prototype.getCommand=function(t){var e=this.commands.get(t);if(e&&!e.isEmpty())return e[Symbol.iterator]().next().value},t.prototype.getCommands=function(){var t,e,n=new Map,r=this.commands.keys();try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=o.next();!i.done;i=o.next()){var s=i.value,a=this.getCommand(s);a&&n.set(s,a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},t.prototype.getCommandOpt=function(t){var e=this.getCommand(t);return null==e?void 0:e.opts},t}()),U=t("CommandController",function(){function t(){this.commandRegister=new E}return t.prototype.register=function(t,e,n){return this.commandRegister.registerCommand(t,e,n)},t.prototype.execute=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return p(this,void 0,void 0,(function(){var n;return d(this,(function(r){if(n=this.commandRegister.getCommand(t))return[2,n.handler.apply(n,v([],h(e),!1))];throw new Error("未注册指令: ".concat(t,",请先注册指令"))}))}))},t.prototype.hasCommand=function(t,e){var n=!!this.commandRegister.hasCommand(t);if(!0===e&&!0===n)throw new Error("未注册指令: ".concat(t,",请先注册指令"));return n},t.prototype.getCommandOpts=function(t){return this.commandRegister.getCommandOpt(t)},t}()),x=(t("commands",new U),t("CoreConst",function(){function t(){}return t.DEFAULT_MODEL_SERVICE_TAG="default",t.TOKEN="access_token",t}())),R=t("NOOP",(function(){}));t("HttpStatusMessageConst",{200:"服务器成功返回请求的数据。",201:"新建或修改数据成功。",202:"一个请求已经进入后台排队(异步任务)。",204:"删除数据成功。",400:"发出的请求有错误,服务器没有进行新建或修改数据的操作。",401:"用户没有权限(令牌、用户名、密码错误)。",403:"用户得到授权,但是访问是被禁止的。",404:"发出的请求针对的是不存在的记录,服务器没有进行操作。",406:"请求的格式不可得。",410:"请求的资源被永久删除,且不会再得到的。",422:"当创建一个对象时,发生一个验证错误。",500:"服务器发生错误,请检查服务器。",502:"网关错误。",503:"服务不可用,服务器暂时过载或维护。",504:"网关超时。"});t("LoginMode",w),function(t){t.DEFAULT="DEFAULT",t.CUSTOM="CUSTOM",t.CAS="CAS"}(w||t("LoginMode",w={})),t("MenuPermissionMode",_),function(t){t.MIXIN="MIXIN",t.RESOURCE="RESOURCE",t.RT="RT"}(_||t("MenuPermissionMode",_={}));t("IBizContext",function(){function t(t,e){if(void 0===t&&(t={}),e){var n=this;Object.defineProperty(this,"_parent",{enumerable:!1,value:e}),Object.defineProperty(this,"_context",{enumerable:!1,value:{}});var r={};Object.keys(e).forEach((function(t){r[t]={enumerable:!0,set:function(e){n._context[t]=null==e?null:e},get:function(){return void 0!==n._context[t]?n._context[t]:e[t]}}})),Object.defineProperties(this,r)}Object.assign(this,t)}return t.prototype.getOwnContext=function(){var t=this,e={};return Object.keys(this).forEach((function(n){t._parent&&Object.prototype.hasOwnProperty.call(t._parent,n)&&!Object.prototype.hasOwnProperty.call(t._context,n)||(e[n]=t[n])})),e},t}());var C=t("Environment",{dev:!1,hub:!0,logLevel:"ERROR",baseUrl:"/api",appId:"",pluginBaseUrl:"./plugins",remoteModelUrl:"/remotemodel",assetsUrl:"./assets",dcSystem:"",downloadFileUrl:"/ibizutil/download",uploadFileUrl:"/ibizutil/upload",casLoginUrl:"",loginMode:w.DEFAULT,menuPermissionMode:_.MIXIN,enablePermission:!0}),k=t("HttpError",(function(t){this.name="HttpError";var e=t.response;this.response=t.response,e?(e.data?this.message=e.data.message:this.message=e.statusText,this.message||(this.message="网络异常,请稍后重试!"),this.status=e.status):(this.message=t.message,this.status=500)})),O=t("RuntimeError",(function(t){this.message=t,this.name="Runtime Error"}));function P(){return i(x.TOKEN)}var T,L,S,j=t("Interceptor",function(){function t(){}return t.prototype.onBeforeRequest=function(t){return p(this,void 0,void 0,(function(){return d(this,(function(e){return[2,t]}))}))},t.prototype.onRequestError=function(t){return Promise.reject(t)},t.prototype.onResponseSuccess=function(t){return p(this,void 0,void 0,(function(){return d(this,(function(e){return[2,t]}))}))},t.prototype.onResponseError=function(t){return Promise.reject(t)},t.prototype.use=function(t){this.requestTag=t.interceptors.request.use(this.onBeforeRequest,this.onRequestError),this.responseTag=t.interceptors.response.use(this.onResponseSuccess,this.onResponseError)},t.prototype.eject=function(t){this.requestTag&&t.interceptors.request.eject(this.requestTag),this.responseTag&&t.interceptors.response.eject(this.responseTag)},t}()),I=t("CoreInterceptor",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.onBeforeRequest=function(e){return p(this,void 0,void 0,(function(){var n;return d(this,(function(r){switch(r.label){case 0:return[4,t.prototype.onBeforeRequest.call(this,e)];case 1:return r.sent(),e.headers||(e.headers={}),e.headers.Authorization="Bearer ".concat(P()),(n=ibiz.orgData)&&(n.systemid&&(e.headers.srfsystemid=n.systemid),n.orgid&&(e.headers.srforgid=n.orgid)),[2,e]}}))}))},e}(j)),A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},z={};L=A,S=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(r){return"debug"===r&&(r="log"),typeof console!==e&&("trace"===r&&n?i:void 0!==console[r]?o(console,r):void 0!==console.log?o(console,"log"):t)}function a(e,n){for(var o=0;o<r.length;o++){var i=r[o];this[i]=o<e?t:this.methodFactory(i,e,n)}this.log=this.debug}function c(t,n,r){return function(){typeof console!==e&&(a.call(this,n,r),this[t].apply(this,arguments))}}function u(t,e,n){return s(t)||c.apply(this,arguments)}function l(t,n,o){var i,s=this;n=null==n?"WARN":n;var c="loglevel";function l(){var t;if(typeof window!==e&&c){try{t=window.localStorage[c]}catch(t){}if(typeof t===e)try{var n=window.document.cookie,r=n.indexOf(encodeURIComponent(c)+"=");-1!==r&&(t=/^([^;]+)/.exec(n.slice(r))[1])}catch(t){}return void 0===s.levels[t]&&(t=void 0),t}}"string"==typeof t?c+=":"+t:"symbol"==typeof t&&(c=void 0),s.name=t,s.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},s.methodFactory=o||u,s.getLevel=function(){return i},s.setLevel=function(n,o){if("string"==typeof n&&void 0!==s.levels[n.toUpperCase()]&&(n=s.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&function(t){var n=(r[t]||"silent").toUpperCase();if(typeof window!==e&&c){try{return void(window.localStorage[c]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(t){}}}(n),a.call(s,n,t),typeof console===e&&n<s.levels.SILENT)return"No console available for logging"},s.setDefaultLevel=function(t){n=t,l()||s.setLevel(t,!1)},s.resetLevel=function(){s.setLevel(n,!1),function(){if(typeof window!==e&&c){try{return void window.localStorage.removeItem(c)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}()},s.enableAll=function(t){s.setLevel(s.levels.TRACE,t)},s.disableAll=function(t){s.setLevel(s.levels.SILENT,t)};var f=l();null==f&&(f=n),s.setLevel(f,!1)}var f=new l,p={};f.getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=p[t];return e||(e=p[t]=new l(t,f.getLevel(),f.methodFactory)),e};var d=typeof window!==e?window.log:void 0;return f.noConflict=function(){return typeof window!==e&&window.log===f&&(window.log=d),f},f.getLoggers=function(){return p},f.default=f,f},(T={get exports(){return z},set exports(t){z=t}}).exports?T.exports=S():L.log=S();var M=l({__proto__:null,default:z},[z]);t("Logger",M);function q(t,e,n,r,o){var i="".concat(t,"-").concat(e);return n&&(i+="-".concat(n)),r&&(i+="__".concat(r)),o&&(i+="--".concat(o)),i}t("Namespace",function(){function t(t,e){this.block=t,this.namespace=e||"ibiz"}return t.prototype.b=function(t){return void 0===t&&(t=""),q(this.namespace,this.block,t,"","")},t.prototype.e=function(t){return t?q(this.namespace,this.block,"",t,""):""},t.prototype.m=function(t){return t?q(this.namespace,this.block,"","",t):""},t.prototype.be=function(t,e){return t&&e?q(this.namespace,this.block,t,e,""):""},t.prototype.em=function(t,e){return t&&e?q(this.namespace,this.block,"",t,e):""},t.prototype.bm=function(t,e){return t&&e?q(this.namespace,this.block,t,"",e):""},t.prototype.bem=function(t,e,n){return t&&e&&n?q(this.namespace,this.block,t,e,n):""},t.prototype.is=function(t,e){return t&&e?"".concat("is-").concat(t):""},t.prototype.cssVar=function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarName(n)]=t[n]);return e},t.prototype.cssVarBlock=function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarBlockName(n)]=t[n]);return e},t.prototype.cssVarName=function(t){return"--".concat(this.namespace,"-").concat(t)},t.prototype.cssVarBlockName=function(t){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(t)},t}()),t("HttpResponse",(function(t,e,n){this.local=!0,this.ok=!1,this.headers={},this.config={},this.data=t,this.status=e||200,this.statusText=n||"",this.status>=200&&this.status<300&&(this.ok=!0)}));var F=t("Net",function(){function t(t){this.interceptors=new Map,this.instance=a.create(t),this.addInterceptor("Default",new I)}return t.prototype.addInterceptor=function(t,e){e.use(this.instance),this.interceptors.set(t,e)},t.prototype.removeInterceptor=function(t){var e=this.interceptors.get(t);e&&(e.eject(this.instance),this.interceptors.delete(t))},Object.defineProperty(t.prototype,"presetConfig",{get:function(){return{baseURL:this.instance.defaults.baseURL||"".concat(ibiz.env.baseUrl,"/").concat(ibiz.env.appId),headers:{"Content-Type":"application/json;charset=UTF-8",Accept:"application/json"}}},enumerable:!1,configurable:!0}),t.prototype.mergeConfig=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this.presetConfig:n.apply(void 0,v([this.presetConfig],h(t),!1))},t.prototype.post=function(t,e,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),p(this,void 0,void 0,(function(){var o,i;return d(this,(function(s){switch(s.label){case 0:t=this.handleAppPresetParam(t,n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.request(t,{method:"post",data:e,headers:r})];case 2:return o=s.sent(),[2,this.doResponseResult(o)];case 3:throw i=s.sent(),new k(i);case 4:return[2]}}))}))},t.prototype.get=function(t,e,r,o){return void 0===e&&(e={}),void 0===r&&(r={}),void 0===o&&(o={}),p(this,void 0,void 0,(function(){var i,s;return d(this,(function(a){switch(a.label){case 0:t=this.attachUrlParam(t,e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.request(t,n({method:"get",headers:r},o))];case 2:return i=a.sent(),[2,this.doResponseResult(i)];case 3:throw s=a.sent(),new k(s);case 4:return[2]}}))}))},t.prototype.delete=function(t,e,n){return void 0===n&&(n={}),p(this,void 0,void 0,(function(){var r,o;return d(this,(function(i){switch(i.label){case 0:t=this.handleAppPresetParam(t,e),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.request(t,{method:"delete",headers:n})];case 2:return r=i.sent(),[2,this.doResponseResult(r)];case 3:throw o=i.sent(),new k(o);case 4:return[2]}}))}))},t.prototype.put=function(t,e,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),p(this,void 0,void 0,(function(){var o,i;return d(this,(function(s){switch(s.label){case 0:t=this.handleAppPresetParam(t,n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.request(t,{method:"put",data:e,headers:r})];case 2:return o=s.sent(),[2,this.doResponseResult(o)];case 3:throw i=s.sent(),new k(i);case 4:return[2]}}))}))},t.prototype.getModel=function(t,e){return void 0===e&&(e={}),p(this,void 0,void 0,(function(){var n,r;return d(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.instance.get(t,{headers:e})];case 1:return n=o.sent(),[2,this.doResponseResult(n)];case 2:throw r=o.sent(),new k(r);case 3:return[2]}}))}))},t.prototype.request=function(t,e){return void 0===e&&(e={}),p(this,void 0,void 0,(function(){var n,r;return d(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.instance.request(this.mergeConfig({url:t},e))];case 1:return n=o.sent(),[2,this.doResponseResult(n)];case 2:throw r=o.sent(),new k(r);case 3:return[2]}}))}))},t.prototype.doResponseResult=function(t){var e=t;return e.status>=200&&e.status<=299&&(e.ok=!0),e},t.prototype.handleAppPresetParam=function(t,e){if(e){var n=Object.keys(e),r={};return n.forEach((function(t){t.startsWith("srf")&&s(e[t])&&(r[t]=e[t])})),this.attachUrlParam(t,e)}return t},t.prototype.attachUrlParam=function(t,e){var n=c(e);return s(n)&&(t=t.endsWith("?")||-1!==t.indexOf("?")&&t.endsWith("&")?"".concat(t).concat(n):-1===t.indexOf("?")||t.endsWith("&")?"".concat(t,"?").concat(n):"".concat(t,"&").concat(n)),t},t}());function N(t){return u(t)}t("UrlHelper",function(){function t(){}return Object.defineProperty(t,"routeBase",{get:function(){return"".concat(this.appBase,"/#")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"appBase",{get:function(){var t=window.location,e=t.origin,n=t.pathname;return"".concat(e).concat(n).replace(/\/$/,"")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"routePath",{get:function(){return window.location.hash.replace("#","")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"fullPath",{get:function(){return window.location.href},enumerable:!1,configurable:!0}),t}());function B(t){var e=t.composedPath&&t.composedPath()||t.path;if(null!=e)return e;return[t.target].concat(function t(e,n){void 0===n&&(n=[]);var r=e.parentNode;return r?t(r,n.concat([r])):n}(t.target))}function D(t,e,n,r){void 0===r&&(r={}),t.addEventListener(e,n,r);var o=function(){t.removeEventListener(e,n,r),o=R};return function(){o()}}function V(t,e){return e&&(t.target===e||B(t).includes(e))}var W="undefined"!=typeof window?window:void 0;var H=Math.round;function G(t){var e=t.length,n=[];if("rgb"===t.slice(0,3).toLowerCase()){var r=t.match(/([\d|.%]{1,3})/g);n[0]=parseInt(r[0],10),n[1]=parseInt(r[1],10),n[2]=parseInt(r[2],10),n[3]=r[3]?-1!==r[3].indexOf("%")?parseInt(r[3],10)/100:parseFloat(r[3]):1}else{r=void 0;r=e<6?parseInt(String(t[1])+t[1]+t[2]+t[2]+t[3]+t[3]+(e>4?String(t[4])+t[4]:""),16):parseInt(t.slice(1),16),n[0]=r>>16&255,n[1]=r>>8&255,n[2]=255&r,n[3]=9===e||5===e?H((r>>24&255)/255*1e4)/1e4:1}return n}function X(t){var e="";switch(t.split(".").pop()){case".wps":e="application/kswps";break;case".doc":e="application/msword";break;case".docx":e="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case".txt":e="text/plain";break;case".zip":e="application/zip";break;case".png":e="image/png";break;case".gif":e="image/gif";break;case".jpeg":case".jpg":e="image/jpeg";break;case".rtf":e="application/rtf";break;case".avi":e="video/x-msvideo";break;case".gz":e="application/x-gzip";break;case".tar":e="application/x-tar";break;case".xlsx":e="application/vnd.ms-excel";break;default:e=""}return e}function J(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e}function K(t){var e=n({multiple:!0,accept:""},t),r=document.createElement("input");r.setAttribute("type","file"),r.setAttribute("multiple","".concat(e.multiple)),r.setAttribute("accept",e.accept),r.onchange=function(t){var n=t.target,r=n.files?J(n.files):[];0!==r.length&&(e.onSelected(r),n.value="")},document.body.appendChild(r),r.click(),document.body.removeChild(r)}t("CountLatch",function(){function t(){this.promise=null,this.resolve=null,this.count=0}return t.prototype.startPromise=function(){var t=this;this.promise=new Promise((function(e){t.resolve=e}))},t.prototype.endPromise=function(){this.resolve&&(this.resolve(),this.resolve=null,this.promise=null)},t.prototype.lock=function(){this.count+=1,this.promise||this.startPromise()},t.prototype.unlock=function(){if(this.count<1)throw new O("lock和unlock次数不匹配!");this.count-=1,0===this.count&&this.endPromise()},t.prototype.await=function(){return p(this,void 0,void 0,(function(){return d(this,(function(t){switch(t.label){case 0:return this.promise?[4,this.promise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t}());var Y=t("IBizSys",(function(){this.env=C,this.log=M,this.net=new F,this.commands=new U})),$=t("FactoryCenter",(function(){}))}}}));
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,WAAY,YAAW,QAAQ;IAE1C,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAG,QAAQ,CAAC;IAE9B;;;;;;OAMG;IACK,OAAO,CAAC,EAAE,WAAW,CAAC;IAE9B;;;;;;;OAOG;gBAES,OAAO,GAAE,QAAa,EAAE,MAAM,CAAC,EAAE,WAAW;IA0CxD;;;;;;OAMG;IACH,aAAa,IAAI,QAAQ;CAa1B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,WAAY,YAAW,QAAQ;IAE1C,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAG,QAAQ,CAAC;IAE9B;;;;;;OAMG;IACK,OAAO,CAAC,EAAE,WAAW,CAAC;IAE9B;;;;;;;OAOG;gBAES,OAAO,GAAE,QAAa,EAAE,MAAM,CAAC,EAAE,WAAW;IA0CxD;;;;;;OAMG;IACH,aAAa,IAAI,QAAQ;CAe1B"}
@@ -68,7 +68,9 @@ export class IBizContext {
68
68
  const result = {};
69
69
  Object.keys(this).forEach(key => {
70
70
  // 父没有的,或者修改了父的上下文
71
- if (!Object.prototype.hasOwnProperty.call(this._parent, key) ||
71
+ // 父不存在则返回所有自身的属性
72
+ if (!this._parent ||
73
+ !Object.prototype.hasOwnProperty.call(this._parent, key) ||
72
74
  Object.prototype.hasOwnProperty.call(this._context, key)) {
73
75
  result[key] = this[key];
74
76
  }
@@ -4,9 +4,9 @@ import { LoginMode, MenuPermissionMode } from '../constant';
4
4
  */
5
5
  export const Environment = {
6
6
  dev: false,
7
- hub: false,
7
+ hub: true,
8
8
  logLevel: 'ERROR',
9
- baseUrl: '',
9
+ baseUrl: '/api',
10
10
  appId: '',
11
11
  pluginBaseUrl: './plugins',
12
12
  remoteModelUrl: '/remotemodel',
@@ -1 +1 @@
1
- {"version":3,"file":"count-latch.d.ts","sourceRoot":"","sources":["../../../src/utils/sync/count-latch.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAA8B;IAE7C,OAAO,CAAC,OAAO,CAAwC;IAEvD;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAK;IAElB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAMpB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IAQlB;;;;;;OAMG;IACH,IAAI;IASJ;;;;;;OAMG;IACH,MAAM;IAYN;;;;;OAKG;IACG,KAAK;CAKZ"}
1
+ {"version":3,"file":"count-latch.d.ts","sourceRoot":"","sources":["../../../src/utils/sync/count-latch.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAA8B;IAE7C,OAAO,CAAC,OAAO,CAAwC;IAEvD;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAK;IAElB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAMpB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IAQlB;;;;;;OAMG;IACH,IAAI;IAOJ;;;;;;OAMG;IACH,MAAM;IAWN;;;;;OAKG;IACG,KAAK;CAKZ"}
@@ -54,10 +54,8 @@ export class CountLatch {
54
54
  * @date 2022-11-24 19:11:27
55
55
  */
56
56
  lock() {
57
- console.log('lock');
58
57
  this.count += 1;
59
58
  if (!this.promise) {
60
- console.log('startPromise');
61
59
  this.startPromise();
62
60
  }
63
61
  }
@@ -72,7 +70,6 @@ export class CountLatch {
72
70
  if (this.count < 1) {
73
71
  throw new RuntimeError('lock和unlock次数不匹配!');
74
72
  }
75
- console.log('unlock');
76
73
  this.count -= 1;
77
74
  if (this.count === 0) {
78
75
  debugger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/core",
3
- "version": "0.0.2-beta.0",
3
+ "version": "0.0.3-beta.1",
4
4
  "description": "核心包",
5
5
  "type": "module",
6
6
  "main": "out/index.js",
@@ -45,5 +45,5 @@
45
45
  "lodash-es": "^4.17.21",
46
46
  "qx-util": "^0.4.4"
47
47
  },
48
- "gitHead": "d506d4940ad41b04bd65281df0eb2b444321be16"
48
+ "gitHead": "c25c8bc45b7ff892e64e59359e7864d1ec800e3a"
49
49
  }
@@ -91,7 +91,9 @@ export class IBizContext implements IContext {
91
91
  const result: IContext = {};
92
92
  Object.keys(this).forEach(key => {
93
93
  // 父没有的,或者修改了父的上下文
94
+ // 父不存在则返回所有自身的属性
94
95
  if (
96
+ !this._parent ||
95
97
  !Object.prototype.hasOwnProperty.call(this._parent, key) ||
96
98
  Object.prototype.hasOwnProperty.call(this._context, key)
97
99
  ) {
@@ -6,9 +6,9 @@ import { IEnvironment } from '../interface';
6
6
  */
7
7
  export const Environment: IEnvironment = {
8
8
  dev: false,
9
- hub: false,
9
+ hub: true,
10
10
  logLevel: 'ERROR',
11
- baseUrl: '',
11
+ baseUrl: '/api',
12
12
  appId: '',
13
13
  pluginBaseUrl: './plugins',
14
14
  remoteModelUrl: '/remotemodel',
@@ -58,10 +58,8 @@ export class CountLatch {
58
58
  * @date 2022-11-24 19:11:27
59
59
  */
60
60
  lock() {
61
- console.log('lock');
62
61
  this.count += 1;
63
62
  if (!this.promise) {
64
- console.log('startPromise');
65
63
  this.startPromise();
66
64
  }
67
65
  }
@@ -77,7 +75,6 @@ export class CountLatch {
77
75
  if (this.count < 1) {
78
76
  throw new RuntimeError('lock和unlock次数不匹配!');
79
77
  }
80
- console.log('unlock');
81
78
  this.count -= 1;
82
79
  if (this.count === 0) {
83
80
  debugger;