cnhis-design-vue 2.1.106 → 2.1.109

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +16 -2
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +188 -182
  4. package/es/big-table/style.css +1 -1
  5. package/es/button/index.js +2 -2
  6. package/es/captcha/index.js +3 -3
  7. package/es/card-reader-sdk/index.js +1 -1
  8. package/es/checkbox/index.js +1 -1
  9. package/es/color-picker/index.js +1 -1
  10. package/es/drag-layout/index.js +3 -3
  11. package/es/editor/index.js +1 -1
  12. package/es/ellipsis/index.js +1 -1
  13. package/es/fabric-chart/index.js +9 -9
  14. package/es/form-table/index.js +20 -20
  15. package/es/index/index.js +899 -339
  16. package/es/index/style.css +1 -1
  17. package/es/input/index.js +1 -1
  18. package/es/map/index.js +1 -1
  19. package/es/multi-chat/index.js +25 -25
  20. package/es/multi-chat-client/index.js +19 -19
  21. package/es/multi-chat-history/index.js +4 -4
  22. package/es/multi-chat-record/index.js +4 -4
  23. package/es/multi-chat-setting/index.js +20 -20
  24. package/es/multi-chat-sip/index.js +1 -1
  25. package/es/radio/index.js +1 -1
  26. package/es/scale-container/index.js +1 -1
  27. package/es/scale-view/index.js +27 -27
  28. package/es/select/index.js +4 -4
  29. package/es/select-label/index.js +3 -3
  30. package/es/select-person/index.js +2 -2
  31. package/es/select-tag/index.js +4 -4
  32. package/es/shortcut-setter/index.js +2 -2
  33. package/es/slider-tree/index.js +1064 -0
  34. package/es/slider-tree/style.css +1 -0
  35. package/es/table-filter/index.js +30 -30
  36. package/es/tag/index.js +1 -1
  37. package/es/verification-code/index.js +2 -2
  38. package/lib/cui.common.js +940 -404
  39. package/lib/cui.umd.js +940 -404
  40. package/lib/cui.umd.min.js +124 -124
  41. package/package.json +1 -1
  42. package/packages/big-table/src/components/edit-form/EditForm.vue +8 -3
  43. package/packages/big-table/src/components/edit-form/edit-component/mixins/search.js +214 -259
  44. package/packages/index.js +6 -3
  45. package/packages/slider-tree/hooks/useAsyncData.js +53 -0
  46. package/packages/slider-tree/index.js +7 -0
  47. package/packages/slider-tree/index.vue +439 -0
  48. package/packages/slider-tree/utils/index.js +10 -0
@@ -0,0 +1,1064 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = "cf66");
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ "1f70":
91
+ /***/ (function(module, exports, __webpack_require__) {
92
+
93
+ // extracted by mini-css-extract-plugin
94
+
95
+ /***/ }),
96
+
97
+ /***/ "2439":
98
+ /***/ (function(module, exports) {
99
+
100
+ module.exports = require("core-js/modules/es.array.push.js");
101
+
102
+ /***/ }),
103
+
104
+ /***/ "2871":
105
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
+
107
+ "use strict";
108
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return KEY_COMPONENT_NAME; });
109
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GROUP_TITLE_KEY; });
110
+ const KEY_COMPONENT_NAME = 'c-';
111
+ const GROUP_TITLE_KEY = 'group-show-title';
112
+
113
+ /***/ }),
114
+
115
+ /***/ "2876":
116
+ /***/ (function(module, exports) {
117
+
118
+ module.exports = require("ant-design-vue/es/tree/style");
119
+
120
+ /***/ }),
121
+
122
+ /***/ "2877":
123
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
124
+
125
+ "use strict";
126
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
127
+ /* globals __VUE_SSR_CONTEXT__ */
128
+
129
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
130
+ // This module is a runtime utility for cleaner component module output and will
131
+ // be included in the final webpack user bundle.
132
+
133
+ function normalizeComponent(
134
+ scriptExports,
135
+ render,
136
+ staticRenderFns,
137
+ functionalTemplate,
138
+ injectStyles,
139
+ scopeId,
140
+ moduleIdentifier /* server only */,
141
+ shadowMode /* vue-cli only */
142
+ ) {
143
+ // Vue.extend constructor export interop
144
+ var options =
145
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
146
+
147
+ // render functions
148
+ if (render) {
149
+ options.render = render
150
+ options.staticRenderFns = staticRenderFns
151
+ options._compiled = true
152
+ }
153
+
154
+ // functional template
155
+ if (functionalTemplate) {
156
+ options.functional = true
157
+ }
158
+
159
+ // scopedId
160
+ if (scopeId) {
161
+ options._scopeId = 'data-v-' + scopeId
162
+ }
163
+
164
+ var hook
165
+ if (moduleIdentifier) {
166
+ // server build
167
+ hook = function (context) {
168
+ // 2.3 injection
169
+ context =
170
+ context || // cached call
171
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
172
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
173
+ // 2.2 with runInNewContext: true
174
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
175
+ context = __VUE_SSR_CONTEXT__
176
+ }
177
+ // inject component styles
178
+ if (injectStyles) {
179
+ injectStyles.call(this, context)
180
+ }
181
+ // register component module identifier for async chunk inferrence
182
+ if (context && context._registeredComponents) {
183
+ context._registeredComponents.add(moduleIdentifier)
184
+ }
185
+ }
186
+ // used by ssr in case component is cached and beforeCreate
187
+ // never gets called
188
+ options._ssrRegister = hook
189
+ } else if (injectStyles) {
190
+ hook = shadowMode
191
+ ? function () {
192
+ injectStyles.call(
193
+ this,
194
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
195
+ )
196
+ }
197
+ : injectStyles
198
+ }
199
+
200
+ if (hook) {
201
+ if (options.functional) {
202
+ // for template-only hot-reload because in that case the render fn doesn't
203
+ // go through the normalizer
204
+ options._injectStyles = hook
205
+ // register for functional component in vue file
206
+ var originalRender = options.render
207
+ options.render = function renderWithStyleInjection(h, context) {
208
+ hook.call(context)
209
+ return originalRender(h, context)
210
+ }
211
+ } else {
212
+ // inject component registration as beforeCreate hook
213
+ var existing = options.beforeCreate
214
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
215
+ }
216
+ }
217
+
218
+ return {
219
+ exports: scriptExports,
220
+ options: options
221
+ }
222
+ }
223
+
224
+
225
+ /***/ }),
226
+
227
+ /***/ "47c5":
228
+ /***/ (function(module, exports) {
229
+
230
+ module.exports = require("ant-design-vue/es/empty/style");
231
+
232
+ /***/ }),
233
+
234
+ /***/ "87e0":
235
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
236
+
237
+ "use strict";
238
+ /* unused harmony export FlexibleResize */
239
+ /* harmony import */ var D_works_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ade3");
240
+ /* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("b7ac");
241
+ /* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_1__);
242
+
243
+
244
+ class FlexibleResize {
245
+ constructor(options) {
246
+ Object(D_works_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "maskMove", e => {
247
+ const v = this._isV ? e.screenX : e.screenY;
248
+ const distance = parseInt(v - this._mv);
249
+ this._mv = v;
250
+ const {
251
+ onMove
252
+ } = this.options;
253
+ onMove && onMove({
254
+ evt: e,
255
+ distance: distance
256
+ });
257
+ });
258
+ Object(D_works_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "maskUp", e => {
259
+ const {
260
+ onEnd
261
+ } = this.options;
262
+ const v = this._isV ? e.screenX : e.screenY;
263
+ onEnd && onEnd({
264
+ evt: e,
265
+ distance: parseInt(v - this._ms)
266
+ });
267
+ this.maskRemove();
268
+ });
269
+ Object(D_works_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "toolDown", e => {
270
+ this.maskInsert();
271
+ this._isV = /^V/.test(this.options.mode);
272
+ this._ms = this._mv = this._isV ? e.screenX : e.screenY;
273
+ const {
274
+ onStart
275
+ } = this.options;
276
+ onStart && onStart({
277
+ evt: e,
278
+ distance: 0
279
+ });
280
+ });
281
+ this.init(options);
282
+ }
283
+ init(options) {
284
+ this.options = options || {};
285
+ this.tool = null;
286
+ this.mask = null;
287
+ const {
288
+ el
289
+ } = options;
290
+ if (!el) return;
291
+ const tool = this.toolCreate();
292
+ this.initElPosition();
293
+ el.appendChild(tool);
294
+ }
295
+ destroyed() {
296
+ const {
297
+ el
298
+ } = this.options;
299
+ this.maskRemove();
300
+ this.toolRemove();
301
+ if (this._elPosition) {
302
+ el.style.setProperty("position", this._elPosition);
303
+ } else {
304
+ el.style.removeProperty("position");
305
+ }
306
+ }
307
+ initElPosition() {
308
+ const el = this.options.el;
309
+ if (!el) return;
310
+ this._elPosition = el.style.position;
311
+ const defStyle = window.getComputedStyle(el, null);
312
+ const position = defStyle.position;
313
+ if (!position || position === "static") {
314
+ el.style.setProperty("position", "relative");
315
+ }
316
+ }
317
+ maskCreate(mode) {
318
+ if (this.mask) return this.mask;
319
+ const mask = document.createElement("div");
320
+ mask.style = "position:fixed;top:0;bottom:0;left:0;right:0;z-index:99999;cursor:" + (/^V/.test(mode) ? "col" : "row") + "-resize";
321
+ mask.addEventListener("mousemove", this.maskMove);
322
+ mask.addEventListener("mouseup", this.maskUp);
323
+ this.mask = mask;
324
+ return mask;
325
+ }
326
+ maskRemove() {
327
+ const mask = this.mask;
328
+ if (!mask) return;
329
+ mask.parentNode && mask.parentNode.removeChild(mask);
330
+ mask.removeEventListener("mousemove", this.maskMove);
331
+ mask.removeEventListener("mouseup", this.maskUp);
332
+ this.mask = null;
333
+ }
334
+ maskInsert() {
335
+ let mask = this.mask || this.maskCreate(this.options.mode);
336
+ document.body.appendChild(mask);
337
+ return mask;
338
+ }
339
+ toolCreate() {
340
+ if (this.tool) return this.tool;
341
+ const div = document.createElement("div");
342
+ div.addEventListener("mousedown", this.toolDown);
343
+ this.tool = div;
344
+ this.toolInitStyle();
345
+ return div;
346
+ }
347
+ toolRemove() {
348
+ const tool = this.tool;
349
+ if (!tool) return;
350
+ tool.parentNode && tool.parentNode.removeChild(tool);
351
+ this.tool = null;
352
+ }
353
+ toolInitStyle() {
354
+ let style = "user-select:none;cursor:col-resize;position:absolute;";
355
+ const mode = this.options.mode;
356
+ if (/^V/.test(mode)) {
357
+ style += "width: 8px;cursor:col-resize;";
358
+ } else {
359
+ style += "height: 8px;cursor:row-resize;";
360
+ }
361
+ const keys = {
362
+ VR: "left",
363
+ VL: "right",
364
+ HT: "bottom",
365
+ HB: "top"
366
+ };
367
+ const mk = keys[mode];
368
+ const p = Object.keys(keys).reduce((v, k) => {
369
+ const value = keys[k];
370
+ if (value !== mk) {
371
+ v += `${value}:0;`;
372
+ }
373
+ return v;
374
+ }, "");
375
+ style += p;
376
+ if (this.tool) {
377
+ this.tool.style = style;
378
+ }
379
+ }
380
+ }
381
+ /* harmony default export */ __webpack_exports__["a"] = ({
382
+ inserted(el, {
383
+ value
384
+ }) {
385
+ if (el._flexibleResize) return;
386
+ el._flexibleResize = new FlexibleResize({
387
+ el: el,
388
+ mode: value.mode || "VR",
389
+ onMove: value.onMove,
390
+ onEnd: value.onEnd
391
+ });
392
+ },
393
+ unbind(el) {
394
+ if (el._flexibleResize) {
395
+ el._flexibleResize.destroyed();
396
+ el._flexibleResize = void 0;
397
+ }
398
+ }
399
+ });
400
+
401
+ /***/ }),
402
+
403
+ /***/ "8aef":
404
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
405
+
406
+ "use strict";
407
+ /* harmony import */ var _global_variable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2871");
408
+
409
+ /* harmony default export */ __webpack_exports__["a"] = (function (vm) {
410
+ vm.name = _global_variable__WEBPACK_IMPORTED_MODULE_0__[/* KEY_COMPONENT_NAME */ "b"] + (vm.name || '');
411
+ vm.mixins = vm.mixins || [];
412
+ return vm;
413
+ });
414
+
415
+ /***/ }),
416
+
417
+ /***/ "9d9e":
418
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
419
+
420
+ "use strict";
421
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_91d47f5e_prod_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1f70");
422
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_91d47f5e_prod_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_91d47f5e_prod_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
423
+ /* unused harmony reexport * */
424
+
425
+
426
+ /***/ }),
427
+
428
+ /***/ "ade3":
429
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
430
+
431
+ "use strict";
432
+
433
+ // EXPORTS
434
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _defineProperty; });
435
+
436
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
437
+ function _typeof(o) {
438
+ "@babel/helpers - typeof";
439
+
440
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
441
+ return typeof o;
442
+ } : function (o) {
443
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
444
+ }, _typeof(o);
445
+ }
446
+ // EXTERNAL MODULE: external "core-js/modules/es.error.cause.js"
447
+ var es_error_cause_js_ = __webpack_require__("dc50");
448
+
449
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
450
+
451
+
452
+ function _toPrimitive(input, hint) {
453
+ if (_typeof(input) !== "object" || input === null) return input;
454
+ var prim = input[Symbol.toPrimitive];
455
+ if (prim !== undefined) {
456
+ var res = prim.call(input, hint || "default");
457
+ if (_typeof(res) !== "object") return res;
458
+ throw new TypeError("@@toPrimitive must return a primitive value.");
459
+ }
460
+ return (hint === "string" ? String : Number)(input);
461
+ }
462
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
463
+
464
+
465
+ function _toPropertyKey(arg) {
466
+ var key = _toPrimitive(arg, "string");
467
+ return _typeof(key) === "symbol" ? key : String(key);
468
+ }
469
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
470
+
471
+ function _defineProperty(obj, key, value) {
472
+ key = _toPropertyKey(key);
473
+ if (key in obj) {
474
+ Object.defineProperty(obj, key, {
475
+ value: value,
476
+ enumerable: true,
477
+ configurable: true,
478
+ writable: true
479
+ });
480
+ } else {
481
+ obj[key] = value;
482
+ }
483
+ return obj;
484
+ }
485
+
486
+ /***/ }),
487
+
488
+ /***/ "ae3b":
489
+ /***/ (function(module, exports) {
490
+
491
+ module.exports = require("ant-design-vue/es/input");
492
+
493
+ /***/ }),
494
+
495
+ /***/ "b436":
496
+ /***/ (function(module, exports) {
497
+
498
+ module.exports = require("ant-design-vue/es/empty");
499
+
500
+ /***/ }),
501
+
502
+ /***/ "b7ac":
503
+ /***/ (function(module, exports) {
504
+
505
+ module.exports = require("core-js/modules/es.array.reduce.js");
506
+
507
+ /***/ }),
508
+
509
+ /***/ "c3aa":
510
+ /***/ (function(module, exports) {
511
+
512
+ module.exports = require("ant-design-vue/es/input/style");
513
+
514
+ /***/ }),
515
+
516
+ /***/ "cf66":
517
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
518
+
519
+ "use strict";
520
+ // ESM COMPAT FLAG
521
+ __webpack_require__.r(__webpack_exports__);
522
+
523
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6fa9d082-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider-tree/index.vue?vue&type=template&id=91d47f5e&scoped=true&
524
+ var render = function render() {
525
+ var _vm = this,
526
+ _c = _vm._self._c,
527
+ _setup = _vm._self._setupProxy;
528
+ return _c('div', {
529
+ directives: [{
530
+ name: "flexible-resize",
531
+ rawName: "v-flexible-resize",
532
+ value: {
533
+ mode: 'VR',
534
+ onMove: _vm.changeWidth,
535
+ onEnd: _vm.saveWidth
536
+ },
537
+ expression: "{\n mode: 'VR',\n onMove: changeWidth,\n onEnd: saveWidth\n }"
538
+ }],
539
+ ref: "left",
540
+ staticClass: "left-tree-wrap",
541
+ style: {
542
+ width: _vm.flexWidth + 'px'
543
+ }
544
+ }, [_c('div', {
545
+ staticClass: "search-groups"
546
+ }, [_c('a-input-search', {
547
+ attrs: {
548
+ "placeholder": "搜索关键字",
549
+ "allowClear": ""
550
+ },
551
+ on: {
552
+ "change": _vm.onSearch,
553
+ "search": _vm.onSearch
554
+ },
555
+ model: {
556
+ value: _vm.searchValue,
557
+ callback: function ($$v) {
558
+ _vm.searchValue = $$v;
559
+ },
560
+ expression: "searchValue"
561
+ }
562
+ }), _vm._t("buttons")], 2), _vm._t("tabs"), _c('div', {
563
+ staticClass: "tree-wrap"
564
+ }, [_c('a-tree', {
565
+ attrs: {
566
+ "tree-data": _vm.treeData,
567
+ "replaceFields": _vm.treeRenderConfig.replaceFields,
568
+ "expanded-keys": _vm.expandedKeys,
569
+ "selectedKeys": _vm.selectedKeys,
570
+ "showIcon": true,
571
+ "draggable": _vm.isDraggable,
572
+ "loadedKeys": _vm.loadedKeys,
573
+ "load-data": _vm.onLoadData
574
+ },
575
+ on: {
576
+ "expand": _vm.onExpand,
577
+ "select": _vm.onNodeSelect,
578
+ "dragenter": _vm.onDragEnter,
579
+ "drop": _vm.onDrop
580
+ },
581
+ scopedSlots: _vm._u([{
582
+ key: "title",
583
+ fn: function (node) {
584
+ return [_c('div', {
585
+ staticClass: "tree-left"
586
+ }, [_vm._t("icons", null, {
587
+ "node": node
588
+ }), node.name.indexOf(_vm.searchValue.trim()) > -1 ? _c('span', {
589
+ staticClass: "dept-name",
590
+ attrs: {
591
+ "title": node.name
592
+ }
593
+ }, [_vm._v(" " + _vm._s(node.name.substr(0, node.name.indexOf(_vm.searchValue.trim()))) + " "), _c('span', {
594
+ staticStyle: {
595
+ "color": "#2563F4"
596
+ }
597
+ }, [_vm._v(_vm._s(_vm.searchValue.trim()))]), _vm._v(" " + _vm._s(node.name.substr(node.name.indexOf(_vm.searchValue.trim()) + _vm.searchValue.trim().length)) + " ")]) : _c('span', {
598
+ attrs: {
599
+ "title": node.name
600
+ }
601
+ }, [_vm._v(_vm._s(node.name))])], 2), _vm._t("operate", null, {
602
+ "node": node
603
+ })];
604
+ }
605
+ }], null, true)
606
+ }), _c('a-empty', {
607
+ attrs: {
608
+ "description": "暂无数据"
609
+ }
610
+ })], 1), _c('div', {
611
+ staticClass: "table-footer-wrap"
612
+ }, [_vm._t("output")], 2)], 2);
613
+ };
614
+ var staticRenderFns = [];
615
+
616
+ // CONCATENATED MODULE: ./packages/slider-tree/index.vue?vue&type=template&id=91d47f5e&scoped=true&
617
+
618
+ // EXTERNAL MODULE: external "ant-design-vue/es/input/style"
619
+ var style_ = __webpack_require__("c3aa");
620
+
621
+ // EXTERNAL MODULE: external "ant-design-vue/es/input"
622
+ var input_ = __webpack_require__("ae3b");
623
+ var input_default = /*#__PURE__*/__webpack_require__.n(input_);
624
+
625
+ // EXTERNAL MODULE: external "ant-design-vue/es/empty/style"
626
+ var empty_style_ = __webpack_require__("47c5");
627
+
628
+ // EXTERNAL MODULE: external "ant-design-vue/es/empty"
629
+ var empty_ = __webpack_require__("b436");
630
+ var empty_default = /*#__PURE__*/__webpack_require__.n(empty_);
631
+
632
+ // EXTERNAL MODULE: external "ant-design-vue/es/tree/style"
633
+ var tree_style_ = __webpack_require__("2876");
634
+
635
+ // EXTERNAL MODULE: external "ant-design-vue/es/tree"
636
+ var tree_ = __webpack_require__("fd28");
637
+ var tree_default = /*#__PURE__*/__webpack_require__.n(tree_);
638
+
639
+ // EXTERNAL MODULE: external "core-js/modules/es.array.push.js"
640
+ var es_array_push_js_ = __webpack_require__("2439");
641
+
642
+ // EXTERNAL MODULE: ./src/directive/flexibleResize.js
643
+ var flexibleResize = __webpack_require__("87e0");
644
+
645
+ // EXTERNAL MODULE: external "core-js/modules/es.error.cause.js"
646
+ var es_error_cause_js_ = __webpack_require__("dc50");
647
+
648
+ // CONCATENATED MODULE: ./packages/slider-tree/hooks/useAsyncData.js
649
+
650
+ function useAsyncData() {
651
+ async function handleGetConfigApi(params, key, filterApiConfig) {
652
+ try {
653
+ // TODO: 判断 fn 是异步函数还是同步
654
+ const fn = filterApiConfig[key] || null;
655
+ if (typeof fn === 'function') {
656
+ const res = await fn(params);
657
+ return Promise.resolve(res);
658
+ } else {
659
+ return Promise.reject(new Error(`${key} Is not a function`));
660
+ }
661
+ } catch (error) {
662
+ return Promise.reject(error);
663
+ }
664
+ }
665
+
666
+ // 根据机构id查本身及下级机构,平级返回 /corp-center/iho/org/manage/getChildrenByOrgPartenId
667
+ async function getChildrenByOrgPartenId(params, filterApiConfig) {
668
+ return await handleGetConfigApi(params, 'getChildrenByOrgPartenId', filterApiConfig);
669
+ }
670
+
671
+ // 员工左侧树搜索,接口/corp-center/iho/dept/selectOrgBck1TreeByParam
672
+ async function searchEmpTreeData(params, filterApiConfig) {
673
+ return await handleGetConfigApi(params, 'searchEmpTreeData', filterApiConfig);
674
+ }
675
+
676
+ // 拖动修改科室的排序,接口/corp-center/iho/dept/updateSort
677
+ async function updateDeptSort(params, filterApiConfig) {
678
+ return await handleGetConfigApi(params, 'updateDeptSort', filterApiConfig);
679
+ }
680
+
681
+ // 获取科室管理科室列表,接口/corp-center/iho/dept/selectBck1ListByParam
682
+ async function getDeptList(params, filterApiConfig) {
683
+ return await handleGetConfigApi(params, 'getDeptList', filterApiConfig);
684
+ }
685
+
686
+ // 删除科室,接口/corp-center/iho/dept/deleteBck1
687
+ // async function deleteDept(params, filterApiConfig) {
688
+ // return await handleGetConfigApi(params, 'deleteDept', filterApiConfig);
689
+ // }
690
+
691
+ return {
692
+ getChildrenByOrgPartenId,
693
+ searchEmpTreeData,
694
+ updateDeptSort,
695
+ getDeptList
696
+ // deleteDept
697
+ };
698
+ }
699
+ // CONCATENATED MODULE: ./packages/slider-tree/utils/index.js
700
+ function* traversalData(data, children = "children") {
701
+ if (!data || !Array.isArray(data)) return;
702
+ for (let i = 0; i < data.length; i++) {
703
+ yield data[i];
704
+ if (data[i][children]) {
705
+ yield* traversalData(data[i][children], children);
706
+ }
707
+ }
708
+ }
709
+ // EXTERNAL MODULE: ./src/core/create.js
710
+ var create = __webpack_require__("8aef");
711
+
712
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider-tree/index.vue?vue&type=script&lang=js&
713
+
714
+
715
+
716
+
717
+
718
+
719
+ /* eslint-disable no-async-promise-executor */
720
+
721
+
722
+
723
+
724
+ const {
725
+ getChildrenByOrgPartenId,
726
+ searchEmpTreeData,
727
+ updateDeptSort,
728
+ getDeptList
729
+ } = useAsyncData();
730
+
731
+ const isMatchFn = (node, keyword) => {
732
+ var _keyword, _name$toLowerCase, _code$toLowerCase, _abbrp$toLowerCase, _abbrw$toLowerCase;
733
+ keyword = (_keyword = keyword) === null || _keyword === void 0 ? void 0 : _keyword.toLowerCase();
734
+ let {
735
+ name = "",
736
+ abbrp = "",
737
+ abbrw = "",
738
+ code
739
+ } = node;
740
+ const nameMatch = (name === null || name === void 0 || (_name$toLowerCase = name.toLowerCase()) === null || _name$toLowerCase === void 0 ? void 0 : _name$toLowerCase.indexOf(keyword)) > -1; // 名字匹配
741
+ const codeMatch = (code === null || code === void 0 || (_code$toLowerCase = code.toLowerCase()) === null || _code$toLowerCase === void 0 ? void 0 : _code$toLowerCase.indexOf(keyword)) > -1; // 编码匹配
742
+ const pyCodeMatch = (abbrp === null || abbrp === void 0 || (_abbrp$toLowerCase = abbrp.toLowerCase()) === null || _abbrp$toLowerCase === void 0 ? void 0 : _abbrp$toLowerCase.indexOf(keyword)) > -1; // 拼音匹配
743
+ const wbCodeMatch = (abbrw === null || abbrw === void 0 || (_abbrw$toLowerCase = abbrw.toLowerCase()) === null || _abbrw$toLowerCase === void 0 ? void 0 : _abbrw$toLowerCase.indexOf(keyword)) > -1; // 五笔匹配
744
+ if (nameMatch || pyCodeMatch || wbCodeMatch || codeMatch) {
745
+ return true;
746
+ } else {
747
+ return false;
748
+ }
749
+ };
750
+ /* harmony default export */ var slider_treevue_type_script_lang_js_ = (Object(create["a" /* default */])({
751
+ name: 'slider-tree',
752
+ directives: {
753
+ flexibleResize: flexibleResize["a" /* default */]
754
+ },
755
+ components: {
756
+ [tree_default.a.name]: tree_default.a,
757
+ [empty_default.a.name]: tree_default.a,
758
+ [input_default.a.Search.name]: input_default.a.Search
759
+ },
760
+ props: {
761
+ // 回调对象集合
762
+ treeSearchApiConfig: {
763
+ type: Object,
764
+ default: () => ({})
765
+ },
766
+ // 树节点渲染配置
767
+ treeRenderConfig: {
768
+ type: Object,
769
+ default: () => ({
770
+ replaceFields: {
771
+ children: "childrenList",
772
+ title: "name",
773
+ key: "code"
774
+ },
775
+ title: 'bck03',
776
+ key: 'bck02'
777
+ })
778
+ },
779
+ // 是否需要拖拽树节点
780
+ isDraggable: {
781
+ type: Boolean,
782
+ default: true
783
+ },
784
+ // 是否需要更新数据
785
+ isRefresh: {
786
+ type: Boolean,
787
+ default: false
788
+ }
789
+ },
790
+ data() {
791
+ return {
792
+ // 初始宽度
793
+ flexWidth: 260,
794
+ // 搜索关键词
795
+ searchValue: "",
796
+ treeData: [],
797
+ // replaceFields: {
798
+ // children: "childrenList",
799
+ // title: "name",
800
+ // key: "code"
801
+ // },
802
+ expandedKeys: [],
803
+ selectedKeys: [],
804
+ // 选中的左侧树节点
805
+ selectNode: {},
806
+ loadedKeys: [],
807
+ // 拖拽的数据
808
+ dragData: {}
809
+ };
810
+ },
811
+ async mounted() {
812
+ await this.init();
813
+ },
814
+ watch: {
815
+ isRefresh(val) {
816
+ if (val) {
817
+ this.refreshTreeData();
818
+ }
819
+ }
820
+ },
821
+ methods: {
822
+ // 更新treeData数据,在拖拽节点和删除节点的时候使用
823
+ async refreshTreeData() {
824
+ await this.getChildrenByOrgPartenId();
825
+ // 更新完成
826
+ this.$emit("refreshEnd", true);
827
+ if (!this.treeData.length) return;
828
+ },
829
+ // 初始化节点数据
830
+ async init() {
831
+ await this.getChildrenByOrgPartenId();
832
+ if (!this.treeData.length) return;
833
+ this.expandedKeys = [this.treeData[0].code];
834
+ this.selectedKeys = [this.treeData[0].code];
835
+ this.selectNode = this.treeData[0];
836
+ this.$emit("select", JSON.parse(JSON.stringify(this.treeData[0])));
837
+ },
838
+ onExpand(expandedKeys) {
839
+ this.expandedKeys = expandedKeys;
840
+ },
841
+ // 选中树节点
842
+ onNodeSelect(selectedKeys = [], {
843
+ node
844
+ }) {
845
+ if (selectedKeys.length) {
846
+ // 选中
847
+ this.expandedKeys = [...this.expandedKeys, ...selectedKeys];
848
+ } else {
849
+ // 取消选中
850
+ this.expandedKeys = this.expandedKeys.filter(key => key !== this.selectedKeys[0]);
851
+ }
852
+ this.selectedKeys = selectedKeys;
853
+ this.$emit("select", node.dataRef);
854
+ const data = Object.create(node.dataRef);
855
+ this.selectNode = data;
856
+ },
857
+ async onSearch() {
858
+ const searchValue = this.searchValue.trim();
859
+ if (searchValue) {
860
+ const {
861
+ data,
862
+ success
863
+ } = await searchEmpTreeData({
864
+ search: searchValue
865
+ }, this.treeSearchApiConfig);
866
+ if (success) {
867
+ data.forEach(org => {
868
+ org.childrenList = this.handleDeptData(org.bck1TreeManageRespDTO || []);
869
+ org.isLeaf = org.childrenList.length ? false : true;
870
+ org.isOrg = true;
871
+ });
872
+ this.treeData = data;
873
+ this.expandedKeys = this.getExpandKeys(data);
874
+ }
875
+ } else {
876
+ this.reset();
877
+ }
878
+ },
879
+ async reset(flag, selectOrgId) {
880
+ await this.getChildrenByOrgPartenId();
881
+ let orgId = this.treeData[0].orgId;
882
+ let setIndex = 0;
883
+ if (flag) {
884
+ orgId = selectOrgId;
885
+ setIndex = this.treeData.findIndex(org => org.orgId === orgId);
886
+ }
887
+ const data = await this.getDeptData(orgId);
888
+ if (data) {
889
+ this.$set(this.treeData, setIndex, data);
890
+ }
891
+ },
892
+ onDragEnter(info) {
893
+ console.log(info, "drag enter info");
894
+ },
895
+ async onDrop(info) {
896
+ const {
897
+ dragNode,
898
+ node
899
+ } = info;
900
+ const {
901
+ dataRef: dragData
902
+ } = dragNode;
903
+ const {
904
+ dataRef: dropData
905
+ } = node;
906
+ if (dragData.isOrg) {
907
+ this.$message.error("机构不能拖动排序");
908
+ return;
909
+ }
910
+ if (dragData.orgId !== dropData.orgId) {
911
+ this.$message.error("不能跨机构移动科室");
912
+ return;
913
+ }
914
+ if (dragData.bck01a !== dropData.bck01a) {
915
+ this.$message.error("仅允许同层级科室排序");
916
+ return;
917
+ }
918
+ this.dragData = dragData;
919
+ const params = {
920
+ bck01: dragData.bck01,
921
+ moveTobck01: dropData.bck01,
922
+ orgId: dragData.orgId
923
+ };
924
+ const {
925
+ success
926
+ } = await updateDeptSort(params, this.treeSearchApiConfig);
927
+ if (success) {
928
+ this.$message.success("排序成功");
929
+ this.reset(true, dragData.orgId);
930
+ this.$emit("dropEnd", params);
931
+ }
932
+ },
933
+ // 获取科室管理科室列表
934
+ async getDeptData(orgId) {
935
+ const {
936
+ data,
937
+ success
938
+ } = await getDeptList({
939
+ orgId
940
+ }, this.treeSearchApiConfig);
941
+ if (success) {
942
+ const temp = this.treeData.find(org => org.orgId === orgId);
943
+ temp.childrenList = this.handleDeptData(data);
944
+ return temp;
945
+ }
946
+ },
947
+ handleDeptData(data) {
948
+ for (const item of traversalData(data, "childrenList")) {
949
+ item.name = item[this.treeRenderConfig.title];
950
+ item.code = item[this.treeRenderConfig.key];
951
+ item.isLeaf = item.childrenList && item.childrenList.length ? false : true;
952
+ }
953
+ return data;
954
+ },
955
+ // 根据机构id查本身及下级机构
956
+ async getChildrenByOrgPartenId() {
957
+ const {
958
+ success,
959
+ data
960
+ } = await getChildrenByOrgPartenId(null, this.treeSearchApiConfig);
961
+ if (success) {
962
+ data.forEach(org => {
963
+ org.isOrg = true;
964
+ org.isLeaf = !org.existBck1;
965
+ });
966
+ this.treeData = data;
967
+ }
968
+ },
969
+ // 更新树节点信息
970
+ onLoadData(treeNode) {
971
+ return new Promise(async resolve => {
972
+ if (treeNode.dataRef.isOrg && !treeNode.dataRef.children) {
973
+ const data = await this.getDeptData(treeNode.dataRef.orgId);
974
+ if (data) {
975
+ treeNode.dataRef.children = data;
976
+ }
977
+ resolve();
978
+ return;
979
+ }
980
+ resolve();
981
+ });
982
+ },
983
+ // 获取展开的key
984
+ getExpandKeys(data) {
985
+ const expandKeys = [];
986
+ for (const item of traversalData(data, "childrenList")) {
987
+ // 有子级匹配就展开
988
+ let hasChildMatch = false;
989
+ for (const subItem of traversalData(item.childrenList, "childrenList")) {
990
+ if (isMatchFn(subItem, this.searchValue)) {
991
+ hasChildMatch = true;
992
+ }
993
+ }
994
+ if (hasChildMatch) {
995
+ expandKeys.push(item.code);
996
+ }
997
+ }
998
+ return expandKeys;
999
+ },
1000
+ changeWidth({
1001
+ distance
1002
+ }) {
1003
+ const w = this.flexWidth + distance;
1004
+ this.flexWidth = Math.min(Math.max(w, 50), 1000);
1005
+ },
1006
+ // 保存拖动的宽度
1007
+ saveWidth() {
1008
+ this.$emit("saveWidth", this.flexWidth);
1009
+ }
1010
+ }
1011
+ }));
1012
+ // CONCATENATED MODULE: ./packages/slider-tree/index.vue?vue&type=script&lang=js&
1013
+ /* harmony default export */ var packages_slider_treevue_type_script_lang_js_ = (slider_treevue_type_script_lang_js_);
1014
+ // EXTERNAL MODULE: ./packages/slider-tree/index.vue?vue&type=style&index=0&id=91d47f5e&prod&lang=less&scoped=true&
1015
+ var slider_treevue_type_style_index_0_id_91d47f5e_prod_lang_less_scoped_true_ = __webpack_require__("9d9e");
1016
+
1017
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1018
+ var componentNormalizer = __webpack_require__("2877");
1019
+
1020
+ // CONCATENATED MODULE: ./packages/slider-tree/index.vue
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+
1027
+ /* normalize component */
1028
+
1029
+ var component = Object(componentNormalizer["a" /* default */])(
1030
+ packages_slider_treevue_type_script_lang_js_,
1031
+ render,
1032
+ staticRenderFns,
1033
+ false,
1034
+ null,
1035
+ "91d47f5e",
1036
+ null
1037
+
1038
+ )
1039
+
1040
+ /* harmony default export */ var slider_tree = (component.exports);
1041
+ // CONCATENATED MODULE: ./packages/slider-tree/index.js
1042
+
1043
+ slider_tree.install = function (Vue) {
1044
+ Vue.component(slider_tree.name, slider_tree);
1045
+ };
1046
+ /* harmony default export */ var packages_slider_tree = __webpack_exports__["default"] = (slider_tree);
1047
+
1048
+ /***/ }),
1049
+
1050
+ /***/ "dc50":
1051
+ /***/ (function(module, exports) {
1052
+
1053
+ module.exports = require("core-js/modules/es.error.cause.js");
1054
+
1055
+ /***/ }),
1056
+
1057
+ /***/ "fd28":
1058
+ /***/ (function(module, exports) {
1059
+
1060
+ module.exports = require("ant-design-vue/es/tree");
1061
+
1062
+ /***/ })
1063
+
1064
+ /******/ })["default"];