iv-npm 1.0.49 → 1.1.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iv-npm",
3
- "version": "1.0.49",
3
+ "version": "1.1.0",
4
4
  "description": "公共通用包",
5
5
  "author": "Mr.Cong",
6
6
  "license": "ISC",
@@ -24,3 +24,46 @@ app.use(ivUi)
24
24
 
25
25
 
26
26
 
27
+ ## 组织架构/部门下拉
28
+
29
+ - 组件API
30
+
31
+ ```js
32
+ {
33
+ method: "GET",
34
+ url:'/api/identity/users/allOrganizationByUser',
35
+ params:{type:1},
36
+ }
37
+ ```
38
+
39
+
40
+
41
+
42
+ - 示例
43
+
44
+ ```vue
45
+ <template>
46
+ <IVMrpOrgDropdown
47
+ v-model:value="Detail.organizationId"
48
+ :params="{type:1}"
49
+ :data="{name:123}"
50
+ :replaceFields="{
51
+ children: "children",
52
+ label: "displayName",
53
+ key: "id",
54
+ value: "id",
55
+ }"
56
+ />
57
+ </template>
58
+ <script setup lang="ts">
59
+ import { IVMrpOrgDropdown } from "iv-npm/packages/ui";
60
+ </script>
61
+ ```
62
+
63
+ | props | describe | type |
64
+ | ------------- | ------------------------------ | ------------- |
65
+ | v-model:value | 绑定值 | any |
66
+ | params | GET请求参数(响应式,值改变会触发接口) | object |
67
+ | data | POST请求参数(响应式,值改变会触发接口) | object |
68
+ | replaceFields | 指定value,key,label, children字段名 | ReplaceFields |
69
+
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("vue"),e=t.createTextVNode("npm包"),r=t.defineComponent({__name:"IVMrpModal",props:{show:{type:Boolean,default:!1},removePadding:{type:Boolean,default:!0}},emits:["update:show","cancelHandle"],setup:function(r,n){var o=n.emit,i=r,a=t.ref(i.show);function c(){o("update:show",!1),o("cancelHandle",!1)}return function(n,o){var i=t.resolveComponent("close-circle-outlined"),u=t.resolveComponent("a-modal");return t.openBlock(),t.createBlock(u,{wrapClassName:[r.removePadding?"":"not-padding","module-class modal-components"],visible:a.value,"onUpdate:visible":o[0]||(o[0]=function(t){return a.value=t}),onCancel:c,destroyOnClose:"",footer:null},{title:t.withCtx((function(){return[t.renderSlot(n.$slots,"title",{},(function(){return[e]}))]})),closeIcon:t.withCtx((function(){return[t.createVNode(i,{class:"text-[#006ab2] text-[30px]"})]})),default:t.withCtx((function(){return[t.renderSlot(n.$slots,"body")]})),_:3},8,["wrapClassName","visible"])}}});function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(){
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=e.createTextVNode("npm包"),r=e.defineComponent({__name:"IVMrpModal",props:{show:{type:Boolean,default:!1},removePadding:{type:Boolean,default:!0}},emits:["update:show","cancelHandle"],setup:function(r,n){var o=n.emit,a=r,i=e.ref(a.show);function u(){o("update:show",!1),o("cancelHandle",!1)}return function(n,o){var a=e.resolveComponent("close-circle-outlined"),c=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(c,{wrapClassName:[r.removePadding?"":"not-padding","module-class modal-components"],visible:i.value,"onUpdate:visible":o[0]||(o[0]=function(e){return i.value=e}),onCancel:u,destroyOnClose:"",footer:null},{title:e.withCtx((function(){return[e.renderSlot(n.$slots,"title",{},(function(){return[t]}))]})),closeIcon:e.withCtx((function(){return[e.createVNode(a,{class:"text-[#006ab2] text-[30px]"})]})),default:e.withCtx((function(){return[e.renderSlot(n.$slots,"body")]})),_:3},8,["wrapClassName","visible"])}}});function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",c=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function p(){}function h(){}function d(){}var v={};u(v,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(L([])));m&&m!==e&&r.call(m,i)&&(v=m);var g=d.prototype=p.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function L(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return h.prototype=d,u(g,"constructor",d),u(d,"constructor",h),h.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),u(g,c,"Generator"),u(g,i,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function i(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function c(t){i(a,n,o,c,u,"next",t)}function u(t){i(a,n,o,c,u,"throw",t)}c(void 0)}))}}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.__file="src/function-ui/component/IVMrpModal.vue";var u={getIVMrpOrgDropdown:{url:"/api/identity/users/allOrganizationByUser",option:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({method:"GET"},{headers:{"Content-Type":"application/json;charset=UTF-8","Accept-Language":"zh-Hans",authorization:localStorage.getItem("token")?"Bearer "+localStorage.getItem("token"):null},cache:"no-cache",credentials:"include",responseType:"JSON",mode:"cors"})}},l=function(t){return new Promise((function(e,r){t.then((function(t){t.json().then((function(t){return e(t)})).catch((function(t){return r(t)}))})).catch((function(t){return r(t)}))}))},s=function(t,e,r){if(0===Object.keys(r).length)return t+e;var n=[];for(var o in r)n.push("".concat(o,"=").concat(r[o]));return t+e+"?"+n.join("&")};function f(t,e){var r=e.filter((function(e){return e.parentId==t.id}));if(r.length)return t.children=r,t.children.forEach((function(t){f(t,e)})),t}function p(t){var e=t.filter((function(t){return null==t.parentId}));return e.forEach((function(e){return f(e,t)})),e}var h=Object.assign,d=t.createElementVNode("div",{class:"text-[#0000006D] text-[14px]"},"所属组织",-1),v=t.defineComponent({__name:"IVMrpOrgDropdown",props:{value:{type:null,required:!0},params:{type:Object,required:!1},replaceFields:{type:Object,required:!1}},emits:["update:value"],setup:function(e,r){var n,i=r.emit,c=e,f=t.ref(),v=function(){var t=a(o().mark((function t(){var e,r,n,i,a=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},t.next=3,l(fetch(s("https://basis.nacho.cn",u.getIVMrpOrgDropdown.url,e.params),h({data:null!==(r=e.data)&&void 0!==r?r:null},u.getIVMrpOrgDropdown.option)));case 3:n=t.sent,i=n.items,f.value=p(i);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),y=t.ref(null!==(n=c.replaceFields)&&void 0!==n?n:{children:"children",label:"displayName",key:"id",value:"id"}),m=t.computed({get:function(){return c.value},set:function(t){i("update:value",t)}});return t.watchEffect(a(o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:v({params:h(null!==(e=c.params)&&void 0!==e?e:{},{type:1})});case 1:case"end":return t.stop()}}),t)})))),function(e,r){var n=t.resolveComponent("a-tree-select"),o=t.resolveComponent("a-form-item");return t.openBlock(),t.createBlock(o,{name:"organizationId",rules:[{required:!0,message:"请选择所属组织"}]},{label:t.withCtx((function(){return[d]})),default:t.withCtx((function(){return[t.createVNode(n,{value:t.unref(m),"onUpdate:value":r[0]||(r[0]=function(e){return t.isRef(m)?m.value=e:null}),"tree-data":f.value,getPopupContainer:function(t){return t.parentNode},placeholder:"请选择",showArrow:"",treeDefaultExpandAll:"",style:{width:"300px"},replaceFields:y.value},null,8,["value","tree-data","getPopupContainer","replaceFields"])]})),_:1})}}});v.__file="src/business-ui/component/IVMrpOrgDropdown.vue";var y=[r,v];y.forEach((function(t){t.install=function(e){e.component(t.name,t)}}));var m={install:function(t){y.forEach((function(e){t.component(e.name,e)}))}};exports.IVMrpModal=r,exports.IVMrpOrgDropdown=v,exports.default=m;
3
+ a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",u=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),i=new E(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return _()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=x(i,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,i),a}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var p={};function f(){}function d(){}function h(){}var v={};c(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(P([])));y&&y!==t&&r.call(y,o)&&(v=y);var g=h.prototype=f.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(o,a,i,u){var c=s(e[o],e,a);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==typeof p&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,i,u)}),(function(e){n("throw",e,i,u)})):t.resolve(p).then((function(e){l.value=e,i(l)}),(function(e){return n("throw",e,i,u)}))}u(c.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:_}}function _(){return{value:void 0,done:!0}}return d.prototype=h,c(g,"constructor",h),c(h,"constructor",d),d.displayName=c(h,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,u,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},w(b.prototype),c(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new b(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(g),c(g,u,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=P,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.__file="src/function-ui/component/IVMrpModal.vue";var l="https://basis.nacho.cn",s={headers:{"Content-Type":"application/json;charset=UTF-8","Accept-Language":"zh-Hans",authorization:localStorage.getItem("token")?"Bearer "+localStorage.getItem("token"):null},cache:"no-cache",credentials:"include",responseType:"JSON",mode:"cors"},p={getIVMrpOrgDropdown:{url:"/api/identity/users/allOrganizationByUser",option:o({method:"GET"},s)},getIVMrpProdBaseDropdown:{url:"/api/basis-management/production-base/all",option:o({method:"GET"},s)}},f=function(e){return new Promise((function(t,r){e.then((function(e){e.json().then((function(e){return t(e)})).catch((function(e){return r(e)}))})).catch((function(e){return r(e)}))}))},d=function(e,t,r){if(0===Object.keys(r).length)return e+t;var n=[];for(var o in r)n.push("".concat(o,"=").concat(r[o]));return e+t+"?"+n.join("&")};function h(e,t){var r=t.filter((function(t){return t.parentId==e.id}));if(r.length)return e.children=r,e.children.forEach((function(e){h(e,t)})),e}function v(e){var t=e.filter((function(e){return null==e.parentId}));return t.forEach((function(t){return h(t,e)})),t}var m=Object.assign,y=e.createElementVNode("div",{class:"text-[#0000006D] text-[14px]"},"所属组织",-1),g=e.defineComponent({__name:"IVMrpOrgDropdown",props:{value:{type:null,required:!0},params:{type:Object,required:!1},data:{type:Object,required:!1},replaceFields:{type:Object,required:!1}},emits:["update:value"],setup:function(t,r){var n,o=r.emit,i=t,c=e.ref(),s=function(){var e=u(a().mark((function e(){var t,r,n,o,i=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:{},e.next=3,f(fetch(d(l,p.getIVMrpOrgDropdown.url,t.params),m({data:null!==(r=t.data)&&void 0!==r?r:null},p.getIVMrpOrgDropdown.option)));case 3:n=e.sent,o=n.items,c.value=v(o);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),h=e.ref(null!==(n=i.replaceFields)&&void 0!==n?n:{children:"children",label:"displayName",key:"id",value:"id"}),g=e.computed({get:function(){return i.value},set:function(e){o("update:value",e)}});return e.watchEffect(u(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({params:m(null!==(t=i.params)&&void 0!==t?t:{},{type:1}),data:null!==(r=i.data)&&void 0!==r?r:null});case 1:case"end":return e.stop()}}),e)})))),function(t,r){var n=e.resolveComponent("a-tree-select"),o=e.resolveComponent("a-form-item");return e.openBlock(),e.createBlock(o,{name:"organizationId",rules:[{required:!0,message:"请选择所属组织"}]},{label:e.withCtx((function(){return[y]})),default:e.withCtx((function(){return[e.createVNode(n,e.mergeProps(t.$attrs,{value:e.unref(g),"onUpdate:value":r[0]||(r[0]=function(t){return e.isRef(g)?g.value=t:null}),"tree-data":c.value,getPopupContainer:function(e){return e.parentNode},placeholder:"请选择",showArrow:"",treeDefaultExpandAll:"",style:{width:"300px"},replaceFields:h.value}),null,16,["value","tree-data","getPopupContainer","replaceFields"])]})),_:1})}}});g.__file="src/business-ui/component/IVMrpOrgDropdown.vue";var w=e.createElementVNode("div",{class:"text-[#0000006D] text-[14px]"},"所属基地",-1),b=e.defineComponent({__name:"IVMrpProdBaseDropdown",props:{value:{type:null,required:!0},params:{type:Object,required:!1},data:{type:Object,required:!1},fieldNames:{type:Object,required:!1}},emits:["update:value"],setup:function(t,r){var n,o=r.emit,i=t,c=e.ref(),s=function(){var e=u(a().mark((function e(){var t,r,n=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,f(fetch(d(l,p.getIVMrpProdBaseDropdown.url,t.params),m({data:null!==(r=t.data)&&void 0!==r?r:null},p.getIVMrpProdBaseDropdown.option)));case 3:c.value=e.sent;case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),h=e.ref(null!==(n=i.fieldNames)&&void 0!==n?n:{label:"name",value:"id"}),v=e.computed({get:function(){return i.value},set:function(e){o("update:value",e)}});return e.watchEffect(u(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({params:null!==(t=i.params)&&void 0!==t?t:null,data:null!==(r=i.data)&&void 0!==r?r:null});case 1:case"end":return e.stop()}}),e)})))),function(t,r){var n=e.resolveComponent("a-select"),o=e.resolveComponent("a-form-item");return e.openBlock(),e.createBlock(o,{name:"organizationIds","wrapper-col":{span:8},rules:[{required:!0,message:"请选择所属基地"}]},{label:e.withCtx((function(){return[w]})),default:e.withCtx((function(){return[e.createVNode(n,e.mergeProps(t.$attrs,{getPopupContainer:function(e){return e.parentNode},value:e.unref(v),"onUpdate:value":r[0]||(r[0]=function(t){return e.isRef(v)?v.value=t:null}),mode:"multiple",style:{width:"100%"},placeholder:"请选择",options:c.value,fieldNames:h.value}),null,16,["getPopupContainer","value","options","fieldNames"])]})),_:1})}}});b.__file="src/business-ui/component/IVMrpProdBaseDropdown.vue";var x=[r,g,b];x.forEach((function(e){e.install=function(t){t.component(e.name,e)}}));var O={install:function(e){x.forEach((function(t){e.component(t.name,t)}))}};exports.IVMrpModal=r,exports.IVMrpOrgDropdown=g,exports.IVMrpProdBaseDropdown=b,exports.default=O;
@@ -1,3 +1,3 @@
1
- import{defineComponent as t,ref as e,resolveComponent as r,openBlock as n,createBlock as o,withCtx as i,renderSlot as a,createVNode as c,createTextVNode as u,computed as l,watchEffect as s,unref as f,isRef as p,createElementVNode as h}from"vue";var d=u("npm包"),v=t({__name:"IVMrpModal",props:{show:{type:Boolean,default:!1},removePadding:{type:Boolean,default:!0}},emits:["update:show","cancelHandle"],setup:function(t,u){var l=u.emit,s=e(t.show);function f(){l("update:show",!1),l("cancelHandle",!1)}return function(e,u){var l=r("close-circle-outlined"),p=r("a-modal");return n(),o(p,{wrapClassName:[t.removePadding?"":"not-padding","module-class modal-components"],visible:s.value,"onUpdate:visible":u[0]||(u[0]=function(t){return s.value=t}),onCancel:f,destroyOnClose:"",footer:null},{title:i((function(){return[a(e.$slots,"title",{},(function(){return[d]}))]})),closeIcon:i((function(){return[c(l,{class:"text-[#006ab2] text-[30px]"})]})),default:i((function(){return[a(e.$slots,"body")]})),_:3},8,["wrapClassName","visible"])}}});function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function m(){
1
+ import{defineComponent as t,ref as e,resolveComponent as r,openBlock as n,createBlock as o,withCtx as a,renderSlot as i,createVNode as u,createTextVNode as c,computed as l,watchEffect as s,mergeProps as p,unref as f,isRef as d,createElementVNode as h}from"vue";var v=c("npm包"),m=t({__name:"IVMrpModal",props:{show:{type:Boolean,default:!1},removePadding:{type:Boolean,default:!0}},emits:["update:show","cancelHandle"],setup:function(t,c){var l=c.emit,s=e(t.show);function p(){l("update:show",!1),l("cancelHandle",!1)}return function(e,c){var l=r("close-circle-outlined"),f=r("a-modal");return n(),o(f,{wrapClassName:[t.removePadding?"":"not-padding","module-class modal-components"],visible:s.value,"onUpdate:visible":c[0]||(c[0]=function(t){return s.value=t}),onCancel:p,destroyOnClose:"",footer:null},{title:a((function(){return[i(e.$slots,"title",{},(function(){return[v]}))]})),closeIcon:a((function(){return[u(l,{class:"text-[#006ab2] text-[30px]"})]})),default:a((function(){return[i(e.$slots,"body")]})),_:3},8,["wrapClassName","visible"])}}});function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function g(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach((function(e){x(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function w(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- m=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===s)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(L([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=h.prototype=f.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function L(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:_}}function _(){return{value:void 0,done:!0}}return p.prototype=h,c(g,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},t}function g(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function w(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){g(i,n,o,a,c,"next",t)}function c(t){g(i,n,o,a,c,"throw",t)}a(void 0)}))}}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}v.__file="src/function-ui/component/IVMrpModal.vue";var O={getIVMrpOrgDropdown:{url:"/api/identity/users/allOrganizationByUser",option:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach((function(e){b(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({method:"GET"},{headers:{"Content-Type":"application/json;charset=UTF-8","Accept-Language":"zh-Hans",authorization:localStorage.getItem("token")?"Bearer "+localStorage.getItem("token"):null},cache:"no-cache",credentials:"include",responseType:"JSON",mode:"cors"})}},x=function(t){return new Promise((function(e,r){t.then((function(t){t.json().then((function(t){return e(t)})).catch((function(t){return r(t)}))})).catch((function(t){return r(t)}))}))},j=function(t,e,r){if(0===Object.keys(r).length)return t+e;var n=[];for(var o in r)n.push("".concat(o,"=").concat(r[o]));return t+e+"?"+n.join("&")};function E(t,e){var r=e.filter((function(e){return e.parentId==t.id}));if(r.length)return t.children=r,t.children.forEach((function(t){E(t,e)})),t}function L(t){var e=t.filter((function(t){return null==t.parentId}));return e.forEach((function(e){return E(e,t)})),e}var _=Object.assign,P=h("div",{class:"text-[#0000006D] text-[14px]"},"所属组织",-1),I=t({__name:"IVMrpOrgDropdown",props:{value:{type:null,required:!0},params:{type:Object,required:!1},replaceFields:{type:Object,required:!1}},emits:["update:value"],setup:function(t,a){var u,h=a.emit,d=t,v=e(),y=function(){var t=w(m().mark((function t(){var e,r,n,o,i=arguments;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:{},t.next=3,x(fetch(j("https://basis.nacho.cn",O.getIVMrpOrgDropdown.url,e.params),_({data:null!==(r=e.data)&&void 0!==r?r:null},O.getIVMrpOrgDropdown.option)));case 3:n=t.sent,o=n.items,v.value=L(o);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),g=e(null!==(u=d.replaceFields)&&void 0!==u?u:{children:"children",label:"displayName",key:"id",value:"id"}),b=l({get:function(){return d.value},set:function(t){h("update:value",t)}});return s(w(m().mark((function t(){var e;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:y({params:_(null!==(e=d.params)&&void 0!==e?e:{},{type:1})});case 1:case"end":return t.stop()}}),t)})))),function(t,e){var a=r("a-tree-select"),u=r("a-form-item");return n(),o(u,{name:"organizationId",rules:[{required:!0,message:"请选择所属组织"}]},{label:i((function(){return[P]})),default:i((function(){return[c(a,{value:f(b),"onUpdate:value":e[0]||(e[0]=function(t){return p(b)?b.value=t:null}),"tree-data":v.value,getPopupContainer:function(t){return t.parentNode},placeholder:"请选择",showArrow:"",treeDefaultExpandAll:"",style:{width:"300px"},replaceFields:g.value},null,8,["value","tree-data","getPopupContainer","replaceFields"])]})),_:1})}}});I.__file="src/business-ui/component/IVMrpOrgDropdown.vue";var k=[v,I];k.forEach((function(t){t.install=function(e){e.component(t.name,t)}}));var N={install:function(t){k.forEach((function(e){t.component(e.name,e)}))}};export{v as IVMrpModal,I as IVMrpOrgDropdown,N as default};
3
+ w=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new E(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return _()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=O(i,r);if(u){if(u===s)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===s)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var s={};function p(){}function f(){}function d(){}var h={};u(h,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(P([])));m&&m!==e&&r.call(m,o)&&(h=m);var y=d.prototype=p.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,a,i,u){var c=l(t[o],t,a);if("throw"!==c.type){var s=c.arg,p=s.value;return p&&"object"==typeof p&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(p).then((function(t){s.value=t,i(s)}),(function(t){return n("throw",t,i,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function a(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(a,a):a()}}function O(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:_}}function _(){return{value:void 0,done:!0}}return f.prototype=d,u(y,"constructor",d),u(d,"constructor",f),f.displayName=u(d,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new b(c(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),u(y,i,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},t}function b(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function O(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){b(a,n,o,i,u,"next",t)}function u(t){b(a,n,o,i,u,"throw",t)}i(void 0)}))}}function x(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}m.__file="src/function-ui/component/IVMrpModal.vue";var j="https://basis.nacho.cn",E={headers:{"Content-Type":"application/json;charset=UTF-8","Accept-Language":"zh-Hans",authorization:localStorage.getItem("token")?"Bearer "+localStorage.getItem("token"):null},cache:"no-cache",credentials:"include",responseType:"JSON",mode:"cors"},P={getIVMrpOrgDropdown:{url:"/api/identity/users/allOrganizationByUser",option:g({method:"GET"},E)},getIVMrpProdBaseDropdown:{url:"/api/basis-management/production-base/all",option:g({method:"GET"},E)}},_=function(t){return new Promise((function(e,r){t.then((function(t){t.json().then((function(t){return e(t)})).catch((function(t){return r(t)}))})).catch((function(t){return r(t)}))}))},L=function(t,e,r){if(0===Object.keys(r).length)return t+e;var n=[];for(var o in r)n.push("".concat(o,"=").concat(r[o]));return t+e+"?"+n.join("&")};function I(t,e){var r=e.filter((function(e){return e.parentId==t.id}));if(r.length)return t.children=r,t.children.forEach((function(t){I(t,e)})),t}function D(t){var e=t.filter((function(t){return null==t.parentId}));return e.forEach((function(e){return I(e,t)})),e}var M=Object.assign,N=h("div",{class:"text-[#0000006D] text-[14px]"},"所属组织",-1),k=t({__name:"IVMrpOrgDropdown",props:{value:{type:null,required:!0},params:{type:Object,required:!1},data:{type:Object,required:!1},replaceFields:{type:Object,required:!1}},emits:["update:value"],setup:function(t,i){var c,h=i.emit,v=t,m=e(),y=function(){var t=O(w().mark((function t(){var e,r,n,o,a=arguments;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},t.next=3,_(fetch(L(j,P.getIVMrpOrgDropdown.url,e.params),M({data:null!==(r=e.data)&&void 0!==r?r:null},P.getIVMrpOrgDropdown.option)));case 3:n=t.sent,o=n.items,m.value=D(o);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),g=e(null!==(c=v.replaceFields)&&void 0!==c?c:{children:"children",label:"displayName",key:"id",value:"id"}),b=l({get:function(){return v.value},set:function(t){h("update:value",t)}});return s(O(w().mark((function t(){var e,r;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:y({params:M(null!==(e=v.params)&&void 0!==e?e:{},{type:1}),data:null!==(r=v.data)&&void 0!==r?r:null});case 1:case"end":return t.stop()}}),t)})))),function(t,e){var i=r("a-tree-select"),c=r("a-form-item");return n(),o(c,{name:"organizationId",rules:[{required:!0,message:"请选择所属组织"}]},{label:a((function(){return[N]})),default:a((function(){return[u(i,p(t.$attrs,{value:f(b),"onUpdate:value":e[0]||(e[0]=function(t){return d(b)?b.value=t:null}),"tree-data":m.value,getPopupContainer:function(t){return t.parentNode},placeholder:"请选择",showArrow:"",treeDefaultExpandAll:"",style:{width:"300px"},replaceFields:g.value}),null,16,["value","tree-data","getPopupContainer","replaceFields"])]})),_:1})}}});k.__file="src/business-ui/component/IVMrpOrgDropdown.vue";var V=h("div",{class:"text-[#0000006D] text-[14px]"},"所属基地",-1),S=t({__name:"IVMrpProdBaseDropdown",props:{value:{type:null,required:!0},params:{type:Object,required:!1},data:{type:Object,required:!1},fieldNames:{type:Object,required:!1}},emits:["update:value"],setup:function(t,i){var c,h=i.emit,v=t,m=e(),y=function(){var t=O(w().mark((function t(){var e,r,n=arguments;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.next=3,_(fetch(L(j,P.getIVMrpProdBaseDropdown.url,e.params),M({data:null!==(r=e.data)&&void 0!==r?r:null},P.getIVMrpProdBaseDropdown.option)));case 3:m.value=t.sent;case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),g=e(null!==(c=v.fieldNames)&&void 0!==c?c:{label:"name",value:"id"}),b=l({get:function(){return v.value},set:function(t){h("update:value",t)}});return s(O(w().mark((function t(){var e,r;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:y({params:null!==(e=v.params)&&void 0!==e?e:null,data:null!==(r=v.data)&&void 0!==r?r:null});case 1:case"end":return t.stop()}}),t)})))),function(t,e){var i=r("a-select"),c=r("a-form-item");return n(),o(c,{name:"organizationIds","wrapper-col":{span:8},rules:[{required:!0,message:"请选择所属基地"}]},{label:a((function(){return[V]})),default:a((function(){return[u(i,p(t.$attrs,{getPopupContainer:function(t){return t.parentNode},value:f(b),"onUpdate:value":e[0]||(e[0]=function(t){return d(b)?b.value=t:null}),mode:"multiple",style:{width:"100%"},placeholder:"请选择",options:m.value,fieldNames:g.value}),null,16,["getPopupContainer","value","options","fieldNames"])]})),_:1})}}});S.__file="src/business-ui/component/IVMrpProdBaseDropdown.vue";var q=[m,k,S];q.forEach((function(t){t.install=function(e){e.component(t.name,t)}}));var B={install:function(t){q.forEach((function(e){t.component(e.name,e)}))}};export{m as IVMrpModal,k as IVMrpOrgDropdown,S as IVMrpProdBaseDropdown,B as default};
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@IVNPM/ui"]={},t.vue)}(this,(function(t,e){"use strict";var r=e.createTextVNode("npm包"),n=e.defineComponent({__name:"IVMrpModal",props:{show:{type:Boolean,default:!1},removePadding:{type:Boolean,default:!0}},emits:["update:show","cancelHandle"],setup:function(t,n){var o=n.emit,i=t,a=e.ref(i.show);function c(){o("update:show",!1),o("cancelHandle",!1)}return function(n,o){var i=e.resolveComponent("close-circle-outlined"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{wrapClassName:[t.removePadding?"":"not-padding","module-class modal-components"],visible:a.value,"onUpdate:visible":o[0]||(o[0]=function(t){return a.value=t}),onCancel:c,destroyOnClose:"",footer:null},{title:e.withCtx((function(){return[e.renderSlot(n.$slots,"title",{},(function(){return[r]}))]})),closeIcon:e.withCtx((function(){return[e.createVNode(i,{class:"text-[#006ab2] text-[30px]"})]})),default:e.withCtx((function(){return[e.renderSlot(n.$slots,"body")]})),_:3},8,["wrapClassName","visible"])}}});function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(){
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@IVNPM/ui"]={},e.vue)}(this,(function(e,t){"use strict";var r=t.createTextVNode("npm包"),n=t.defineComponent({__name:"IVMrpModal",props:{show:{type:Boolean,default:!1},removePadding:{type:Boolean,default:!0}},emits:["update:show","cancelHandle"],setup:function(e,n){var o=n.emit,a=e,i=t.ref(a.show);function u(){o("update:show",!1),o("cancelHandle",!1)}return function(n,o){var a=t.resolveComponent("close-circle-outlined"),c=t.resolveComponent("a-modal");return t.openBlock(),t.createBlock(c,{wrapClassName:[e.removePadding?"":"not-padding","module-class modal-components"],visible:i.value,"onUpdate:visible":o[0]||(o[0]=function(e){return i.value=e}),onCancel:u,destroyOnClose:"",footer:null},{title:t.withCtx((function(){return[t.renderSlot(n.$slots,"title",{},(function(){return[r]}))]})),closeIcon:t.withCtx((function(){return[t.createVNode(a,{class:"text-[#006ab2] text-[30px]"})]})),default:t.withCtx((function(){return[t.renderSlot(n.$slots,"body")]})),_:3},8,["wrapClassName","visible"])}}});function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",c=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function p(){}function h(){}function d(){}var v={};u(v,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(L([])));m&&m!==e&&r.call(m,o)&&(v=m);var g=d.prototype=p.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function L(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:_}}function _(){return{value:void 0,done:!0}}return h.prototype=d,u(g,"constructor",d),u(d,"constructor",h),h.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),u(g,c,"Generator"),u(g,o,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function a(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function c(t){a(i,n,o,c,u,"next",t)}function u(t){a(i,n,o,c,u,"throw",t)}c(void 0)}))}}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}n.__file="src/function-ui/component/IVMrpModal.vue";var l="https://basis.nacho.cn",s={getIVMrpOrgDropdown:{url:"/api/identity/users/allOrganizationByUser",option:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({method:"GET"},{headers:{"Content-Type":"application/json;charset=UTF-8","Accept-Language":"zh-Hans",authorization:localStorage.getItem("token")?"Bearer "+localStorage.getItem("token"):null},cache:"no-cache",credentials:"include",responseType:"JSON",mode:"cors"})}},f=function(t){return new Promise((function(e,r){t.then((function(t){t.json().then((function(t){return e(t)})).catch((function(t){return r(t)}))})).catch((function(t){return r(t)}))}))},p=function(t,e,r){if(0===Object.keys(r).length)return t+e;var n=[];for(var o in r)n.push("".concat(o,"=").concat(r[o]));return t+e+"?"+n.join("&")};function h(t,e){var r=e.filter((function(e){return e.parentId==t.id}));if(r.length)return t.children=r,t.children.forEach((function(t){h(t,e)})),t}function d(t){var e=t.filter((function(t){return null==t.parentId}));return e.forEach((function(e){return h(e,t)})),e}var v=Object.assign,y=e.createElementVNode("div",{class:"text-[#0000006D] text-[14px]"},"所属组织",-1),m=e.defineComponent({__name:"IVMrpOrgDropdown",props:{value:{type:null,required:!0},params:{type:Object,required:!1},replaceFields:{type:Object,required:!1}},emits:["update:value"],setup:function(t,r){var n,o=r.emit,a=t,u=e.ref(),h=function(){var t=c(i().mark((function t(){var e,r,n,o,a=arguments;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},t.next=3,f(fetch(p(l,s.getIVMrpOrgDropdown.url,e.params),v({data:null!==(r=e.data)&&void 0!==r?r:null},s.getIVMrpOrgDropdown.option)));case 3:n=t.sent,o=n.items,u.value=d(o);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),m=e.ref(null!==(n=a.replaceFields)&&void 0!==n?n:{children:"children",label:"displayName",key:"id",value:"id"}),g=e.computed({get:function(){return a.value},set:function(t){o("update:value",t)}});return e.watchEffect(c(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:h({params:v(null!==(e=a.params)&&void 0!==e?e:{},{type:1})});case 1:case"end":return t.stop()}}),t)})))),function(t,r){var n=e.resolveComponent("a-tree-select"),o=e.resolveComponent("a-form-item");return e.openBlock(),e.createBlock(o,{name:"organizationId",rules:[{required:!0,message:"请选择所属组织"}]},{label:e.withCtx((function(){return[y]})),default:e.withCtx((function(){return[e.createVNode(n,{value:e.unref(g),"onUpdate:value":r[0]||(r[0]=function(t){return e.isRef(g)?g.value=t:null}),"tree-data":u.value,getPopupContainer:function(t){return t.parentNode},placeholder:"请选择",showArrow:"",treeDefaultExpandAll:"",style:{width:"300px"},replaceFields:m.value},null,8,["value","tree-data","getPopupContainer","replaceFields"])]})),_:1})}}});m.__file="src/business-ui/component/IVMrpOrgDropdown.vue";var g=[n,m];g.forEach((function(t){t.install=function(e){e.component(t.name,t)}}));var w={install:function(t){g.forEach((function(e){t.component(e.name,e)}))}};t.IVMrpModal=n,t.IVMrpOrgDropdown=m,t.default=w,Object.defineProperty(t,"__esModule",{value:!0})}));
3
+ i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",u=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),i=new E(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return _()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=x(i,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,i),a}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var p={};function f(){}function d(){}function h(){}var v={};c(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(P([])));y&&y!==t&&r.call(y,o)&&(v=y);var g=h.prototype=f.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(o,a,i,u){var c=s(e[o],e,a);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==typeof p&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,i,u)}),(function(e){n("throw",e,i,u)})):t.resolve(p).then((function(e){l.value=e,i(l)}),(function(e){return n("throw",e,i,u)}))}u(c.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:_}}function _(){return{value:void 0,done:!0}}return d.prototype=h,c(g,"constructor",h),c(h,"constructor",d),d.displayName=c(h,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,u,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new b(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(g),c(g,u,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=P,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){u(a,n,o,i,c,"next",e)}function c(e){u(a,n,o,i,c,"throw",e)}i(void 0)}))}}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}n.__file="src/function-ui/component/IVMrpModal.vue";var s="https://basis.nacho.cn",p={headers:{"Content-Type":"application/json;charset=UTF-8","Accept-Language":"zh-Hans",authorization:localStorage.getItem("token")?"Bearer "+localStorage.getItem("token"):null},cache:"no-cache",credentials:"include",responseType:"JSON",mode:"cors"},f={getIVMrpOrgDropdown:{url:"/api/identity/users/allOrganizationByUser",option:a({method:"GET"},p)},getIVMrpProdBaseDropdown:{url:"/api/basis-management/production-base/all",option:a({method:"GET"},p)}},d=function(e){return new Promise((function(t,r){e.then((function(e){e.json().then((function(e){return t(e)})).catch((function(e){return r(e)}))})).catch((function(e){return r(e)}))}))},h=function(e,t,r){if(0===Object.keys(r).length)return e+t;var n=[];for(var o in r)n.push("".concat(o,"=").concat(r[o]));return e+t+"?"+n.join("&")};function v(e,t){var r=t.filter((function(t){return t.parentId==e.id}));if(r.length)return e.children=r,e.children.forEach((function(e){v(e,t)})),e}function m(e){var t=e.filter((function(e){return null==e.parentId}));return t.forEach((function(t){return v(t,e)})),t}var y=Object.assign,g=t.createElementVNode("div",{class:"text-[#0000006D] text-[14px]"},"所属组织",-1),w=t.defineComponent({__name:"IVMrpOrgDropdown",props:{value:{type:null,required:!0},params:{type:Object,required:!1},data:{type:Object,required:!1},replaceFields:{type:Object,required:!1}},emits:["update:value"],setup:function(e,r){var n,o=r.emit,a=e,u=t.ref(),l=function(){var e=c(i().mark((function e(){var t,r,n,o,a=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,d(fetch(h(s,f.getIVMrpOrgDropdown.url,t.params),y({data:null!==(r=t.data)&&void 0!==r?r:null},f.getIVMrpOrgDropdown.option)));case 3:n=e.sent,o=n.items,u.value=m(o);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),p=t.ref(null!==(n=a.replaceFields)&&void 0!==n?n:{children:"children",label:"displayName",key:"id",value:"id"}),v=t.computed({get:function(){return a.value},set:function(e){o("update:value",e)}});return t.watchEffect(c(i().mark((function e(){var t,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l({params:y(null!==(t=a.params)&&void 0!==t?t:{},{type:1}),data:null!==(r=a.data)&&void 0!==r?r:null});case 1:case"end":return e.stop()}}),e)})))),function(e,r){var n=t.resolveComponent("a-tree-select"),o=t.resolveComponent("a-form-item");return t.openBlock(),t.createBlock(o,{name:"organizationId",rules:[{required:!0,message:"请选择所属组织"}]},{label:t.withCtx((function(){return[g]})),default:t.withCtx((function(){return[t.createVNode(n,t.mergeProps(e.$attrs,{value:t.unref(v),"onUpdate:value":r[0]||(r[0]=function(e){return t.isRef(v)?v.value=e:null}),"tree-data":u.value,getPopupContainer:function(e){return e.parentNode},placeholder:"请选择",showArrow:"",treeDefaultExpandAll:"",style:{width:"300px"},replaceFields:p.value}),null,16,["value","tree-data","getPopupContainer","replaceFields"])]})),_:1})}}});w.__file="src/business-ui/component/IVMrpOrgDropdown.vue";var b=t.createElementVNode("div",{class:"text-[#0000006D] text-[14px]"},"所属基地",-1),x=t.defineComponent({__name:"IVMrpProdBaseDropdown",props:{value:{type:null,required:!0},params:{type:Object,required:!1},data:{type:Object,required:!1},fieldNames:{type:Object,required:!1}},emits:["update:value"],setup:function(e,r){var n,o=r.emit,a=e,u=t.ref(),l=function(){var e=c(i().mark((function e(){var t,r,n=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,d(fetch(h(s,f.getIVMrpProdBaseDropdown.url,t.params),y({data:null!==(r=t.data)&&void 0!==r?r:null},f.getIVMrpProdBaseDropdown.option)));case 3:u.value=e.sent;case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),p=t.ref(null!==(n=a.fieldNames)&&void 0!==n?n:{label:"name",value:"id"}),v=t.computed({get:function(){return a.value},set:function(e){o("update:value",e)}});return t.watchEffect(c(i().mark((function e(){var t,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l({params:null!==(t=a.params)&&void 0!==t?t:null,data:null!==(r=a.data)&&void 0!==r?r:null});case 1:case"end":return e.stop()}}),e)})))),function(e,r){var n=t.resolveComponent("a-select"),o=t.resolveComponent("a-form-item");return t.openBlock(),t.createBlock(o,{name:"organizationIds","wrapper-col":{span:8},rules:[{required:!0,message:"请选择所属基地"}]},{label:t.withCtx((function(){return[b]})),default:t.withCtx((function(){return[t.createVNode(n,t.mergeProps(e.$attrs,{getPopupContainer:function(e){return e.parentNode},value:t.unref(v),"onUpdate:value":r[0]||(r[0]=function(e){return t.isRef(v)?v.value=e:null}),mode:"multiple",style:{width:"100%"},placeholder:"请选择",options:u.value,fieldNames:p.value}),null,16,["getPopupContainer","value","options","fieldNames"])]})),_:1})}}});x.__file="src/business-ui/component/IVMrpProdBaseDropdown.vue";var O=[n,w,x];O.forEach((function(e){e.install=function(t){t.component(e.name,e)}}));var j={install:function(e){O.forEach((function(t){e.component(t.name,t)}))}};e.IVMrpModal=n,e.IVMrpOrgDropdown=w,e.IVMrpProdBaseDropdown=x,e.default=j,Object.defineProperty(e,"__esModule",{value:!0})}));
4
4
  //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../../shared/dist/utils/index.mjs"],"sourcesContent":["// utils/arr/tree.ts\nfunction arrToTree(list, parentMark, childrenMark) {\n let result = [], temp;\n for (let i = 0; i < list.length; i++) {\n if (!list[i][parentMark]) {\n temp = list.filter(\n (item) => item[parentMark] === list[i][childrenMark]\n );\n if (temp.length > 0) {\n list[i].children = temp;\n }\n result.push(list[i]);\n }\n }\n return result;\n}\nfunction _loadChildren(obj, list) {\n const arr = list.filter((x) => x.parentId == obj.id);\n if (!arr.length)\n return;\n obj.children = arr;\n obj.children.forEach((x) => {\n _loadChildren(x, list);\n });\n return obj;\n}\nfunction tranListToTreeData(list) {\n const results = list.filter((x) => x.parentId == null);\n results.forEach((x) => _loadChildren(x, list));\n return results;\n}\nfunction findTree(id, list, idName) {\n let result;\n if (!list.length)\n return;\n const fn = (id2, list2, idName2) => {\n list2.find((_e) => {\n if (_e[idName2] === id2) {\n result = _e;\n } else if (_e.children && _e.children.length !== 0)\n return fn(id2, _e.children, idName2);\n });\n };\n fn(id, list, idName);\n return result;\n}\n\n// utils/obj/judge.ts\nfunction isPlainObject(obj) {\n let proto, Ctor;\n if (!obj || toString.call(obj) !== \"[object Object]\") {\n return false;\n }\n proto = Object.getPrototypeOf(obj);\n if (!proto) {\n return true;\n }\n Ctor = {}.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && {}.hasOwnProperty.toString.call(Ctor) === {}.hasOwnProperty.toString.call(Object);\n}\n\n// utils/obj/cache.ts\nvar assign = Object.assign;\nexport {\n arrToTree,\n assign,\n findTree,\n isPlainObject,\n tranListToTreeData\n};\n"],"names":["_loadChildren","obj","list","arr","filter","x","parentId","id","length","children","forEach","tranListToTreeData","results","assign","Object"],"mappings":";;yyPAgBA,SAASA,EAAcC,EAAKC,GAC1B,IAAMC,EAAMD,EAAKE,QAAO,SAACC,GAAD,OAAOA,EAAEC,UAAYL,EAAIM,EAAzB,IACxB,GAAKJ,EAAIK,OAMT,OAJAP,EAAIQ,SAAWN,EACfF,EAAIQ,SAASC,SAAQ,SAACL,GACpBL,EAAcK,EAAGH,MAEZD,CACR,CACD,SAASU,EAAmBT,GAC1B,IAAMU,EAAUV,EAAKE,QAAO,SAACC,GAAD,OAAqB,MAAdA,EAAEC,QAAT,IAE5B,OADAM,EAAQF,SAAQ,SAACL,GAAD,OAAOL,EAAcK,EAAGH,MACjCU,CACR,CAgCD,IAAIC,EAASC,OAAOD"}
1
+ {"version":3,"file":"index.umd.js","sources":["../../shared/dist/utils/index.mjs"],"sourcesContent":["// utils/arr/tree.ts\nfunction arrToTree(list, parentMark, childrenMark) {\n let result = [], temp;\n for (let i = 0; i < list.length; i++) {\n if (!list[i][parentMark]) {\n temp = list.filter(\n (item) => item[parentMark] === list[i][childrenMark]\n );\n if (temp.length > 0) {\n list[i].children = temp;\n }\n result.push(list[i]);\n }\n }\n return result;\n}\nfunction _loadChildren(obj, list) {\n const arr = list.filter((x) => x.parentId == obj.id);\n if (!arr.length)\n return;\n obj.children = arr;\n obj.children.forEach((x) => {\n _loadChildren(x, list);\n });\n return obj;\n}\nfunction tranListToTreeData(list) {\n const results = list.filter((x) => x.parentId == null);\n results.forEach((x) => _loadChildren(x, list));\n return results;\n}\nfunction findTree(id, list, idName) {\n let result;\n if (!list.length)\n return;\n const fn = (id2, list2, idName2) => {\n list2.find((_e) => {\n if (_e[idName2] === id2) {\n result = _e;\n } else if (_e.children && _e.children.length !== 0)\n return fn(id2, _e.children, idName2);\n });\n };\n fn(id, list, idName);\n return result;\n}\n\n// utils/obj/judge.ts\nfunction isPlainObject(obj) {\n let proto, Ctor;\n if (!obj || toString.call(obj) !== \"[object Object]\") {\n return false;\n }\n proto = Object.getPrototypeOf(obj);\n if (!proto) {\n return true;\n }\n Ctor = {}.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && {}.hasOwnProperty.toString.call(Ctor) === {}.hasOwnProperty.toString.call(Object);\n}\n\n// utils/obj/cache.ts\nvar assign = Object.assign;\nexport {\n arrToTree,\n assign,\n findTree,\n isPlainObject,\n tranListToTreeData\n};\n"],"names":["_loadChildren","obj","list","arr","filter","x","parentId","id","length","children","forEach","tranListToTreeData","results","assign","Object"],"mappings":";;qjPAgBA,SAASA,EAAcC,EAAKC,GAC1B,IAAMC,EAAMD,EAAKE,QAAO,SAACC,GAAD,OAAOA,EAAEC,UAAYL,EAAIM,EAAzB,IACxB,GAAKJ,EAAIK,OAMT,OAJAP,EAAIQ,SAAWN,EACfF,EAAIQ,SAASC,SAAQ,SAACL,GACpBL,EAAcK,EAAGH,MAEZD,CACR,CACD,SAASU,EAAmBT,GAC1B,IAAMU,EAAUV,EAAKE,QAAO,SAACC,GAAD,OAAqB,MAAdA,EAAEC,QAAT,IAE5B,OADAM,EAAQF,SAAQ,SAACL,GAAD,OAAOL,EAAcK,EAAGH,MACjCU,CACR,CAgCD,IAAIC,EAASC,OAAOD"}