iv-npm 1.1.3 → 1.1.4

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,2 +1,953 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+
7
+ var _hoisted_1$2 = /*#__PURE__*/vue.createTextVNode("npm包");
8
+ /**
9
+ * show:Boolean 是否显示弹窗 v-model:show="Visible"
10
+ *
11
+ * remove-padding:Boolean 是否需要弹窗内边距(defult:true)
12
+ * 内边距 padding: 100px 0 100px 100px;
13
+ *
14
+ * @cancelHandle:Function 关闭时触发事件
15
+ *
16
+ * v-slot:title 弹窗头部
17
+ *
18
+ * v-slot:body 弹窗主体
19
+ *
20
+ * */
21
+
22
+ var script$2 = /*#__PURE__*/vue.defineComponent({
23
+ __name: 'IVMrpModal',
24
+ props: {
25
+ show: {
26
+ type: Boolean,
27
+ "default": false
28
+ },
29
+ removePadding: {
30
+ type: Boolean,
31
+ "default": true
32
+ }
33
+ },
34
+ emits: ["update:show", "cancelHandle"],
35
+ setup: function setup(__props, _ref) {
36
+ var emit = _ref.emit;
37
+ var props = __props;
38
+ var isShow = vue.ref(props.show);
39
+
40
+ function cancel() {
41
+ emit("update:show", false);
42
+ emit("cancelHandle", false);
43
+ }
44
+
45
+ return function (_ctx, _cache) {
46
+ var _component_close_circle_outlined = vue.resolveComponent("close-circle-outlined");
47
+
48
+ var _component_a_modal = vue.resolveComponent("a-modal");
49
+
50
+ return vue.openBlock(), vue.createBlock(_component_a_modal, {
51
+ wrapClassName: [__props.removePadding ? '' : 'not-padding', 'module-class modal-components'],
52
+ visible: isShow.value,
53
+ "onUpdate:visible": _cache[0] || (_cache[0] = function ($event) {
54
+ return isShow.value = $event;
55
+ }),
56
+ onCancel: cancel,
57
+ destroyOnClose: "",
58
+ footer: null
59
+ }, {
60
+ title: vue.withCtx(function () {
61
+ return [vue.renderSlot(_ctx.$slots, "title", {}, function () {
62
+ return [_hoisted_1$2];
63
+ })];
64
+ }),
65
+ closeIcon: vue.withCtx(function () {
66
+ return [vue.createVNode(_component_close_circle_outlined, {
67
+ "class": "text-[#006ab2] text-[30px]"
68
+ })];
69
+ }),
70
+ "default": vue.withCtx(function () {
71
+ return [vue.renderSlot(_ctx.$slots, "body")];
72
+ }),
73
+ _: 3
74
+ /* FORWARDED */
75
+
76
+ }, 8
77
+ /* PROPS */
78
+ , ["wrapClassName", "visible"]);
79
+ };
80
+ }
81
+ });
82
+
83
+ script$2.__file = "src/function-ui/component/IVMrpModal.vue";
84
+
85
+ function ownKeys(object, enumerableOnly) {
86
+ var keys = Object.keys(object);
87
+
88
+ if (Object.getOwnPropertySymbols) {
89
+ var symbols = Object.getOwnPropertySymbols(object);
90
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
91
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
92
+ })), keys.push.apply(keys, symbols);
93
+ }
94
+
95
+ return keys;
96
+ }
97
+
98
+ function _objectSpread2(target) {
99
+ for (var i = 1; i < arguments.length; i++) {
100
+ var source = null != arguments[i] ? arguments[i] : {};
101
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
102
+ _defineProperty(target, key, source[key]);
103
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
104
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
105
+ });
106
+ }
107
+
108
+ return target;
109
+ }
110
+
111
+ function _regeneratorRuntime() {
112
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
113
+
114
+ _regeneratorRuntime = function () {
115
+ return exports;
116
+ };
117
+
118
+ var exports = {},
119
+ Op = Object.prototype,
120
+ hasOwn = Op.hasOwnProperty,
121
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
122
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
123
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
124
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
125
+
126
+ function define(obj, key, value) {
127
+ return Object.defineProperty(obj, key, {
128
+ value: value,
129
+ enumerable: !0,
130
+ configurable: !0,
131
+ writable: !0
132
+ }), obj[key];
133
+ }
134
+
135
+ try {
136
+ define({}, "");
137
+ } catch (err) {
138
+ define = function (obj, key, value) {
139
+ return obj[key] = value;
140
+ };
141
+ }
142
+
143
+ function wrap(innerFn, outerFn, self, tryLocsList) {
144
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
145
+ generator = Object.create(protoGenerator.prototype),
146
+ context = new Context(tryLocsList || []);
147
+ return generator._invoke = function (innerFn, self, context) {
148
+ var state = "suspendedStart";
149
+ return function (method, arg) {
150
+ if ("executing" === state) throw new Error("Generator is already running");
151
+
152
+ if ("completed" === state) {
153
+ if ("throw" === method) throw arg;
154
+ return doneResult();
155
+ }
156
+
157
+ for (context.method = method, context.arg = arg;;) {
158
+ var delegate = context.delegate;
159
+
160
+ if (delegate) {
161
+ var delegateResult = maybeInvokeDelegate(delegate, context);
162
+
163
+ if (delegateResult) {
164
+ if (delegateResult === ContinueSentinel) continue;
165
+ return delegateResult;
166
+ }
167
+ }
168
+
169
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
170
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
171
+ context.dispatchException(context.arg);
172
+ } else "return" === context.method && context.abrupt("return", context.arg);
173
+ state = "executing";
174
+ var record = tryCatch(innerFn, self, context);
175
+
176
+ if ("normal" === record.type) {
177
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
178
+ return {
179
+ value: record.arg,
180
+ done: context.done
181
+ };
182
+ }
183
+
184
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
185
+ }
186
+ };
187
+ }(innerFn, self, context), generator;
188
+ }
189
+
190
+ function tryCatch(fn, obj, arg) {
191
+ try {
192
+ return {
193
+ type: "normal",
194
+ arg: fn.call(obj, arg)
195
+ };
196
+ } catch (err) {
197
+ return {
198
+ type: "throw",
199
+ arg: err
200
+ };
201
+ }
202
+ }
203
+
204
+ exports.wrap = wrap;
205
+ var ContinueSentinel = {};
206
+
207
+ function Generator() {}
208
+
209
+ function GeneratorFunction() {}
210
+
211
+ function GeneratorFunctionPrototype() {}
212
+
213
+ var IteratorPrototype = {};
214
+ define(IteratorPrototype, iteratorSymbol, function () {
215
+ return this;
216
+ });
217
+ var getProto = Object.getPrototypeOf,
218
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
219
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
220
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
221
+
222
+ function defineIteratorMethods(prototype) {
223
+ ["next", "throw", "return"].forEach(function (method) {
224
+ define(prototype, method, function (arg) {
225
+ return this._invoke(method, arg);
226
+ });
227
+ });
228
+ }
229
+
230
+ function AsyncIterator(generator, PromiseImpl) {
231
+ function invoke(method, arg, resolve, reject) {
232
+ var record = tryCatch(generator[method], generator, arg);
233
+
234
+ if ("throw" !== record.type) {
235
+ var result = record.arg,
236
+ value = result.value;
237
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
238
+ invoke("next", value, resolve, reject);
239
+ }, function (err) {
240
+ invoke("throw", err, resolve, reject);
241
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
242
+ result.value = unwrapped, resolve(result);
243
+ }, function (error) {
244
+ return invoke("throw", error, resolve, reject);
245
+ });
246
+ }
247
+
248
+ reject(record.arg);
249
+ }
250
+
251
+ var previousPromise;
252
+
253
+ this._invoke = function (method, arg) {
254
+ function callInvokeWithMethodAndArg() {
255
+ return new PromiseImpl(function (resolve, reject) {
256
+ invoke(method, arg, resolve, reject);
257
+ });
258
+ }
259
+
260
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
261
+ };
262
+ }
263
+
264
+ function maybeInvokeDelegate(delegate, context) {
265
+ var method = delegate.iterator[context.method];
266
+
267
+ if (undefined === method) {
268
+ if (context.delegate = null, "throw" === context.method) {
269
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
270
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
271
+ }
272
+
273
+ return ContinueSentinel;
274
+ }
275
+
276
+ var record = tryCatch(method, delegate.iterator, context.arg);
277
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
278
+ var info = record.arg;
279
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
280
+ }
281
+
282
+ function pushTryEntry(locs) {
283
+ var entry = {
284
+ tryLoc: locs[0]
285
+ };
286
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
287
+ }
288
+
289
+ function resetTryEntry(entry) {
290
+ var record = entry.completion || {};
291
+ record.type = "normal", delete record.arg, entry.completion = record;
292
+ }
293
+
294
+ function Context(tryLocsList) {
295
+ this.tryEntries = [{
296
+ tryLoc: "root"
297
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
298
+ }
299
+
300
+ function values(iterable) {
301
+ if (iterable) {
302
+ var iteratorMethod = iterable[iteratorSymbol];
303
+ if (iteratorMethod) return iteratorMethod.call(iterable);
304
+ if ("function" == typeof iterable.next) return iterable;
305
+
306
+ if (!isNaN(iterable.length)) {
307
+ var i = -1,
308
+ next = function next() {
309
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
310
+
311
+ return next.value = undefined, next.done = !0, next;
312
+ };
313
+
314
+ return next.next = next;
315
+ }
316
+ }
317
+
318
+ return {
319
+ next: doneResult
320
+ };
321
+ }
322
+
323
+ function doneResult() {
324
+ return {
325
+ value: undefined,
326
+ done: !0
327
+ };
328
+ }
329
+
330
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
331
+ var ctor = "function" == typeof genFun && genFun.constructor;
332
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
333
+ }, exports.mark = function (genFun) {
334
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
335
+ }, exports.awrap = function (arg) {
336
+ return {
337
+ __await: arg
338
+ };
339
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
340
+ return this;
341
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
342
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
343
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
344
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
345
+ return result.done ? result.value : iter.next();
346
+ });
347
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
348
+ return this;
349
+ }), define(Gp, "toString", function () {
350
+ return "[object Generator]";
351
+ }), exports.keys = function (object) {
352
+ var keys = [];
353
+
354
+ for (var key in object) keys.push(key);
355
+
356
+ return keys.reverse(), function next() {
357
+ for (; keys.length;) {
358
+ var key = keys.pop();
359
+ if (key in object) return next.value = key, next.done = !1, next;
360
+ }
361
+
362
+ return next.done = !0, next;
363
+ };
364
+ }, exports.values = values, Context.prototype = {
365
+ constructor: Context,
366
+ reset: function (skipTempReset) {
367
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
368
+ },
369
+ stop: function () {
370
+ this.done = !0;
371
+ var rootRecord = this.tryEntries[0].completion;
372
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
373
+ return this.rval;
374
+ },
375
+ dispatchException: function (exception) {
376
+ if (this.done) throw exception;
377
+ var context = this;
378
+
379
+ function handle(loc, caught) {
380
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
381
+ }
382
+
383
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
384
+ var entry = this.tryEntries[i],
385
+ record = entry.completion;
386
+ if ("root" === entry.tryLoc) return handle("end");
387
+
388
+ if (entry.tryLoc <= this.prev) {
389
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
390
+ hasFinally = hasOwn.call(entry, "finallyLoc");
391
+
392
+ if (hasCatch && hasFinally) {
393
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
394
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
395
+ } else if (hasCatch) {
396
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
397
+ } else {
398
+ if (!hasFinally) throw new Error("try statement without catch or finally");
399
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
400
+ }
401
+ }
402
+ }
403
+ },
404
+ abrupt: function (type, arg) {
405
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
406
+ var entry = this.tryEntries[i];
407
+
408
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
409
+ var finallyEntry = entry;
410
+ break;
411
+ }
412
+ }
413
+
414
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
415
+ var record = finallyEntry ? finallyEntry.completion : {};
416
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
417
+ },
418
+ complete: function (record, afterLoc) {
419
+ if ("throw" === record.type) throw record.arg;
420
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
421
+ },
422
+ finish: function (finallyLoc) {
423
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
424
+ var entry = this.tryEntries[i];
425
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
426
+ }
427
+ },
428
+ catch: function (tryLoc) {
429
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
430
+ var entry = this.tryEntries[i];
431
+
432
+ if (entry.tryLoc === tryLoc) {
433
+ var record = entry.completion;
434
+
435
+ if ("throw" === record.type) {
436
+ var thrown = record.arg;
437
+ resetTryEntry(entry);
438
+ }
439
+
440
+ return thrown;
441
+ }
442
+ }
443
+
444
+ throw new Error("illegal catch attempt");
445
+ },
446
+ delegateYield: function (iterable, resultName, nextLoc) {
447
+ return this.delegate = {
448
+ iterator: values(iterable),
449
+ resultName: resultName,
450
+ nextLoc: nextLoc
451
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
452
+ }
453
+ }, exports;
454
+ }
455
+
456
+ function _typeof(obj) {
457
+ "@babel/helpers - typeof";
458
+
459
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
460
+ return typeof obj;
461
+ } : function (obj) {
462
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
463
+ }, _typeof(obj);
464
+ }
465
+
466
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
467
+ try {
468
+ var info = gen[key](arg);
469
+ var value = info.value;
470
+ } catch (error) {
471
+ reject(error);
472
+ return;
473
+ }
474
+
475
+ if (info.done) {
476
+ resolve(value);
477
+ } else {
478
+ Promise.resolve(value).then(_next, _throw);
479
+ }
480
+ }
481
+
482
+ function _asyncToGenerator(fn) {
483
+ return function () {
484
+ var self = this,
485
+ args = arguments;
486
+ return new Promise(function (resolve, reject) {
487
+ var gen = fn.apply(self, args);
488
+
489
+ function _next(value) {
490
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
491
+ }
492
+
493
+ function _throw(err) {
494
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
495
+ }
496
+
497
+ _next(undefined);
498
+ });
499
+ };
500
+ }
501
+
502
+ function _defineProperty(obj, key, value) {
503
+ if (key in obj) {
504
+ Object.defineProperty(obj, key, {
505
+ value: value,
506
+ enumerable: true,
507
+ configurable: true,
508
+ writable: true
509
+ });
510
+ } else {
511
+ obj[key] = value;
512
+ }
513
+
514
+ return obj;
515
+ }
516
+
517
+ function _loadChildren(obj, list) {
518
+ var arr = list.filter(function (x) {
519
+ return x.parentId == obj.id;
520
+ });
521
+ if (!arr.length) return;
522
+ obj.children = arr;
523
+ obj.children.forEach(function (x) {
524
+ _loadChildren(x, list);
525
+ });
526
+ return obj;
527
+ }
528
+ function tranListToTreeData(list) {
529
+ var results = list.filter(function (x) {
530
+ return x.parentId == null;
531
+ });
532
+ results.forEach(function (x) {
533
+ return _loadChildren(x, list);
534
+ });
535
+ return results;
536
+ }
537
+ var isObject = function isObject(val) {
538
+ return val !== null && _typeof(val) === "object";
539
+ };
540
+ var assign = Object.assign;
541
+
542
+ var BASE_URL = "https://basis.nacho.cn";
543
+ var DEFIND_OPTION = {
544
+ headers: {
545
+ "Content-Type": "application/json;charset=UTF-8",
546
+ "Accept-Language": "zh-Hans",
547
+ authorization: localStorage.getItem("token") ? "Bearer " + localStorage.getItem("token") : null
548
+ },
549
+ cache: "no-cache",
550
+ credentials: "include",
551
+ responseType: "JSON",
552
+ mode: "cors"
553
+ };
554
+ var API_OPTION = {
555
+ getIVMrpOrgDropdown: {
556
+ url: "/api/identity/users/allOrganizationByUser",
557
+ option: _objectSpread2({
558
+ method: "GET"
559
+ }, DEFIND_OPTION)
560
+ },
561
+ getIVMrpProdBaseDropdown: {
562
+ url: "/api/basis-management/production-base/all",
563
+ option: _objectSpread2({
564
+ method: "GET"
565
+ }, DEFIND_OPTION)
566
+ }
567
+ };
568
+ var formatHTTP = function formatHTTP(fetch) {
569
+ return new Promise(function (resolve, reject) {
570
+ fetch.then(function (data) {
571
+ data.json().then(function (data) {
572
+ return resolve(data);
573
+ })["catch"](function (err) {
574
+ return reject(err);
575
+ });
576
+ })["catch"](function (err) {
577
+ return reject(err);
578
+ });
579
+ });
580
+ };
581
+ var formatUrl = function formatUrl(base, api, params) {
582
+ if (!isObject(params)) return base + api;
583
+ if (Object.keys(params).length === 0) return base + api;
584
+ var urlTemparr = [];
585
+
586
+ for (var k in params) {
587
+ urlTemparr.push("".concat(k, "=").concat(params[k]));
588
+ }
589
+
590
+ return base + api + "?" + urlTemparr.join("&");
591
+ };
592
+
593
+ var _hoisted_1$1 = /*#__PURE__*/vue.createElementVNode("div", {
594
+ "class": "text-[#0000006D] text-[14px]"
595
+ }, "所属组织", -1
596
+ /* HOISTED */
597
+ );
598
+ /**
599
+ * 组件定义-------------------------------------
600
+ * */
601
+
602
+ var script$1 = /*#__PURE__*/vue.defineComponent({
603
+ __name: 'IVMrpOrgDropdown',
604
+ props: {
605
+ value: {
606
+ type: null,
607
+ required: true
608
+ },
609
+ params: {
610
+ type: Object,
611
+ required: false
612
+ },
613
+ data: {
614
+ type: Object,
615
+ required: false
616
+ },
617
+ replaceFields: {
618
+ type: null,
619
+ required: false
620
+ }
621
+ },
622
+ emits: ["update:value"],
623
+ setup: function setup(__props, _ref) {
624
+ var emit = _ref.emit;
625
+
626
+ var _a;
627
+
628
+ var props = __props;
629
+ /**
630
+ * 获取数据-------------------------------------
631
+ * */
632
+
633
+ var dataV = vue.ref();
634
+
635
+ var getData = /*#__PURE__*/function () {
636
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
637
+ var _option,
638
+ _a,
639
+ _yield$formatHTTP,
640
+ items,
641
+ _args = arguments;
642
+
643
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
644
+ while (1) {
645
+ switch (_context.prev = _context.next) {
646
+ case 0:
647
+ _option = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
648
+ _context.next = 3;
649
+ return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpOrgDropdown.url, _option.params), assign({
650
+ data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
651
+ }, API_OPTION.getIVMrpOrgDropdown.option)));
652
+
653
+ case 3:
654
+ _yield$formatHTTP = _context.sent;
655
+ items = _yield$formatHTTP.items;
656
+ dataV.value = tranListToTreeData(items);
657
+
658
+ case 6:
659
+ case "end":
660
+ return _context.stop();
661
+ }
662
+ }
663
+ }, _callee);
664
+ }));
665
+
666
+ return function getData() {
667
+ return _ref2.apply(this, arguments);
668
+ };
669
+ }();
670
+ /**
671
+ * 默认参数-------------------------------------
672
+ * */
673
+
674
+
675
+ var replaceFields = vue.ref((_a = props.replaceFields) !== null && _a !== void 0 ? _a : {
676
+ children: "children",
677
+ label: "displayName",
678
+ key: "id",
679
+ value: "id"
680
+ });
681
+ var inputV = vue.computed({
682
+ get: function get() {
683
+ return props.value;
684
+ },
685
+ set: function set(value) {
686
+ emit("update:value", value);
687
+ }
688
+ });
689
+ /**
690
+ * 侦听器-------------------------------------
691
+ * */
692
+
693
+ vue.watchEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
694
+ var _a, _b;
695
+
696
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
697
+ while (1) {
698
+ switch (_context2.prev = _context2.next) {
699
+ case 0:
700
+ // 由于打包问题,侦听器一定要在最后,否则找不到getData方法
701
+ getData({
702
+ params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
703
+ type: 1
704
+ }),
705
+ data: (_b = props.data) !== null && _b !== void 0 ? _b : null
706
+ });
707
+
708
+ case 1:
709
+ case "end":
710
+ return _context2.stop();
711
+ }
712
+ }
713
+ }, _callee2);
714
+ })));
715
+ return function (_ctx, _cache) {
716
+ var _component_a_tree_select = vue.resolveComponent("a-tree-select");
717
+
718
+ var _component_a_form_item = vue.resolveComponent("a-form-item");
719
+
720
+ return vue.openBlock(), vue.createBlock(_component_a_form_item, {
721
+ name: "organizationId",
722
+ rules: [{
723
+ required: true,
724
+ message: '请选择所属组织'
725
+ }]
726
+ }, {
727
+ label: vue.withCtx(function () {
728
+ return [_hoisted_1$1];
729
+ }),
730
+ "default": vue.withCtx(function () {
731
+ return [vue.createVNode(_component_a_tree_select, vue.mergeProps(_ctx.$attrs, {
732
+ value: vue.unref(inputV),
733
+ "onUpdate:value": _cache[0] || (_cache[0] = function ($event) {
734
+ return vue.isRef(inputV) ? inputV.value = $event : null;
735
+ }),
736
+ "tree-data": dataV.value,
737
+ getPopupContainer: function getPopupContainer(triggerNode) {
738
+ return triggerNode.parentNode;
739
+ },
740
+ placeholder: "请选择",
741
+ showArrow: "",
742
+ treeDefaultExpandAll: "",
743
+ style: {
744
+ "width": "300px"
745
+ },
746
+ replaceFields: replaceFields.value
747
+ }), null, 16
748
+ /* FULL_PROPS */
749
+ , ["value", "tree-data", "getPopupContainer", "replaceFields"])];
750
+ }),
751
+ _: 1
752
+ /* STABLE */
753
+
754
+ });
755
+ };
756
+ }
757
+ });
758
+
759
+ script$1.__file = "src/business-ui/component/IVMrpOrgDropdown.vue";
760
+
761
+ var _hoisted_1 = /*#__PURE__*/vue.createElementVNode("div", {
762
+ "class": "text-[#0000006D] text-[14px]"
763
+ }, "所属基地", -1
764
+ /* HOISTED */
765
+ );
766
+ /**
767
+ * 组件定义-------------------------------------
768
+ * */
769
+
770
+ var script = /*#__PURE__*/vue.defineComponent({
771
+ __name: 'IVMrpProdBaseDropdown',
772
+ props: {
773
+ value: {
774
+ type: null,
775
+ required: true
776
+ },
777
+ params: {
778
+ type: Object,
779
+ required: false
780
+ },
781
+ data: {
782
+ type: Object,
783
+ required: false
784
+ },
785
+ fieldNames: {
786
+ type: null,
787
+ required: false
788
+ }
789
+ },
790
+ emits: ["update:value"],
791
+ setup: function setup(__props, _ref) {
792
+ var emit = _ref.emit;
793
+
794
+ var _a;
795
+
796
+ var props = __props;
797
+ /**
798
+ * 获取数据-------------------------------------
799
+ * */
800
+
801
+ var dataV = vue.ref();
802
+
803
+ var getData = /*#__PURE__*/function () {
804
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
805
+ var _option,
806
+ _a,
807
+ _args = arguments;
808
+
809
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
810
+ while (1) {
811
+ switch (_context.prev = _context.next) {
812
+ case 0:
813
+ _option = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
814
+ _context.next = 3;
815
+ return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpProdBaseDropdown.url, _option.params), assign({
816
+ data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
817
+ }, API_OPTION.getIVMrpProdBaseDropdown.option)));
818
+
819
+ case 3:
820
+ dataV.value = _context.sent;
821
+
822
+ case 4:
823
+ case "end":
824
+ return _context.stop();
825
+ }
826
+ }
827
+ }, _callee);
828
+ }));
829
+
830
+ return function getData() {
831
+ return _ref2.apply(this, arguments);
832
+ };
833
+ }();
834
+ /**
835
+ * 默认参数-------------------------------------
836
+ * */
837
+
838
+
839
+ var fieldNames = vue.ref((_a = props.fieldNames) !== null && _a !== void 0 ? _a : {
840
+ label: "name",
841
+ value: "id"
842
+ });
843
+ var inputV = vue.computed({
844
+ get: function get() {
845
+ return props.value;
846
+ },
847
+ set: function set(value) {
848
+ emit("update:value", value);
849
+ }
850
+ });
851
+ /**
852
+ * 侦听器-------------------------------------
853
+ * */
854
+
855
+ vue.watchEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
856
+ var _a, _b;
857
+
858
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
859
+ while (1) {
860
+ switch (_context2.prev = _context2.next) {
861
+ case 0:
862
+ // 由于打包问题,侦听器一定要在最后,否则找不到getData方法
863
+ getData({
864
+ params: (_a = props.params) !== null && _a !== void 0 ? _a : null,
865
+ data: (_b = props.data) !== null && _b !== void 0 ? _b : null
866
+ });
867
+
868
+ case 1:
869
+ case "end":
870
+ return _context2.stop();
871
+ }
872
+ }
873
+ }, _callee2);
874
+ })));
875
+ return function (_ctx, _cache) {
876
+ var _component_a_select = vue.resolveComponent("a-select");
877
+
878
+ var _component_a_form_item = vue.resolveComponent("a-form-item");
879
+
880
+ return vue.openBlock(), vue.createBlock(_component_a_form_item, {
881
+ name: "organizationIds",
882
+ "wrapper-col": {
883
+ span: 8
884
+ },
885
+ rules: [{
886
+ required: true,
887
+ message: '请选择所属基地'
888
+ }]
889
+ }, {
890
+ label: vue.withCtx(function () {
891
+ return [_hoisted_1];
892
+ }),
893
+ "default": vue.withCtx(function () {
894
+ return [vue.createVNode(_component_a_select, vue.mergeProps(_ctx.$attrs, {
895
+ getPopupContainer: function getPopupContainer(triggerNode) {
896
+ return triggerNode.parentNode;
897
+ },
898
+ value: vue.unref(inputV),
899
+ "onUpdate:value": _cache[0] || (_cache[0] = function ($event) {
900
+ return vue.isRef(inputV) ? inputV.value = $event : null;
901
+ }),
902
+ mode: "multiple",
903
+ style: {
904
+ "width": "100%"
905
+ },
906
+ placeholder: "请选择",
907
+ options: dataV.value,
908
+ fieldNames: fieldNames.value
909
+ }), null, 16
910
+ /* FULL_PROPS */
911
+ , ["getPopupContainer", "value", "options", "fieldNames"])];
912
+ }),
913
+ _: 1
914
+ /* STABLE */
915
+
916
+ });
917
+ };
918
+ }
919
+ });
920
+
921
+ script.__file = "src/business-ui/component/IVMrpProdBaseDropdown.vue";
922
+
923
+ /*
924
+ * @Author: Mr.Cong Wei
925
+ * @Date: 2022-08-08 18:47:06
926
+ * @LastEditTime: 2022-08-10 16:16:59
927
+ */
928
+ var components = [script$2, script$1, script];
929
+ installComponents(); // 单独引用
930
+
931
+ function installComponents() {
932
+ components.forEach(function (component) {
933
+ component.install = function (app) {
934
+ app.component(component.name, component);
935
+ };
936
+ });
937
+ } // 全局引用
938
+
939
+
940
+ var install = function install(app) {
941
+ components.forEach(function (component) {
942
+ app.component(component.name, component);
943
+ });
944
+ };
945
+
946
+ var cAll = {
947
+ install: install
948
+ };
949
+
950
+ exports.IVMrpModal = script$2;
951
+ exports.IVMrpOrgDropdown = script$1;
952
+ exports.IVMrpProdBaseDropdown = script;
953
+ exports["default"] = cAll;