@panpanzhao/component-ui 0.0.9 → 0.0.12

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.
@@ -0,0 +1,2376 @@
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 = "/dist/";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = 80);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ([
89
+ /* 0 */
90
+ /***/ (function(module, exports) {
91
+
92
+ module.exports = require("@vue/babel-helper-vue-jsx-merge-props");
93
+
94
+ /***/ }),
95
+ /* 1 */
96
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
97
+
98
+ "use strict";
99
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
100
+ /* globals __VUE_SSR_CONTEXT__ */
101
+
102
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
103
+ // This module is a runtime utility for cleaner component module output and will
104
+ // be included in the final webpack user bundle.
105
+
106
+ function normalizeComponent(
107
+ scriptExports,
108
+ render,
109
+ staticRenderFns,
110
+ functionalTemplate,
111
+ injectStyles,
112
+ scopeId,
113
+ moduleIdentifier /* server only */,
114
+ shadowMode /* vue-cli only */
115
+ ) {
116
+ // Vue.extend constructor export interop
117
+ var options =
118
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
119
+
120
+ // render functions
121
+ if (render) {
122
+ options.render = render
123
+ options.staticRenderFns = staticRenderFns
124
+ options._compiled = true
125
+ }
126
+
127
+ // functional template
128
+ if (functionalTemplate) {
129
+ options.functional = true
130
+ }
131
+
132
+ // scopedId
133
+ if (scopeId) {
134
+ options._scopeId = 'data-v-' + scopeId
135
+ }
136
+
137
+ var hook
138
+ if (moduleIdentifier) {
139
+ // server build
140
+ hook = function (context) {
141
+ // 2.3 injection
142
+ context =
143
+ context || // cached call
144
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
145
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
146
+ // 2.2 with runInNewContext: true
147
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
148
+ context = __VUE_SSR_CONTEXT__
149
+ }
150
+ // inject component styles
151
+ if (injectStyles) {
152
+ injectStyles.call(this, context)
153
+ }
154
+ // register component module identifier for async chunk inferrence
155
+ if (context && context._registeredComponents) {
156
+ context._registeredComponents.add(moduleIdentifier)
157
+ }
158
+ }
159
+ // used by ssr in case component is cached and beforeCreate
160
+ // never gets called
161
+ options._ssrRegister = hook
162
+ } else if (injectStyles) {
163
+ hook = shadowMode
164
+ ? function () {
165
+ injectStyles.call(
166
+ this,
167
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
168
+ )
169
+ }
170
+ : injectStyles
171
+ }
172
+
173
+ if (hook) {
174
+ if (options.functional) {
175
+ // for template-only hot-reload because in that case the render fn doesn't
176
+ // go through the normalizer
177
+ options._injectStyles = hook
178
+ // register for functional component in vue file
179
+ var originalRender = options.render
180
+ options.render = function renderWithStyleInjection(h, context) {
181
+ hook.call(context)
182
+ return originalRender(h, context)
183
+ }
184
+ } else {
185
+ // inject component registration as beforeCreate hook
186
+ var existing = options.beforeCreate
187
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
188
+ }
189
+ }
190
+
191
+ return {
192
+ exports: scriptExports,
193
+ options: options
194
+ }
195
+ }
196
+
197
+
198
+ /***/ }),
199
+ /* 2 */
200
+ /***/ (function(module, exports) {
201
+
202
+ module.exports = require("lodash");
203
+
204
+ /***/ }),
205
+ /* 3 */
206
+ /***/ (function(module, exports) {
207
+
208
+ module.exports = require("@panpanzhao/component-ui/lib/utils/formula");
209
+
210
+ /***/ }),
211
+ /* 4 */
212
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
213
+
214
+ "use strict";
215
+ // ESM COMPAT FLAG
216
+ __webpack_require__.r(__webpack_exports__);
217
+
218
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=dfeb985e&
219
+ var render = function render() {
220
+ var _vm = this,
221
+ _c = _vm._self._c
222
+ return _c(
223
+ "div",
224
+ { class: ["form", { "is-full": _vm.isFull }] },
225
+ [
226
+ _vm._t("default", function () {
227
+ return [
228
+ _c(
229
+ "el-form",
230
+ _vm._g(
231
+ _vm._b({ ref: "form" }, "el-form", _vm.formProps, false),
232
+ _vm.formListeners
233
+ ),
234
+ [
235
+ _c(
236
+ "el-row",
237
+ _vm._b({}, "el-row", _vm.rowProps, false),
238
+ [
239
+ _vm._l(_vm.filterFormItems, function (item) {
240
+ return [
241
+ _c(
242
+ "el-col",
243
+ {
244
+ key: item.prop,
245
+ attrs: { span: item.span || _vm.span },
246
+ },
247
+ [
248
+ _c(
249
+ "form-item",
250
+ _vm._g(
251
+ _vm._b(
252
+ {
253
+ key: item.prop,
254
+ attrs: {
255
+ config: item,
256
+ actions: _vm.actionItem[item.prop],
257
+ value: _vm.formModel[item.prop],
258
+ },
259
+ on: { formItemChange: _vm.formItemChange },
260
+ },
261
+ "form-item",
262
+ item,
263
+ false
264
+ ),
265
+ item.on
266
+ )
267
+ ),
268
+ ],
269
+ 1
270
+ ),
271
+ ]
272
+ }),
273
+ ],
274
+ 2
275
+ ),
276
+ ],
277
+ 1
278
+ ),
279
+ ]
280
+ }),
281
+ ],
282
+ 2
283
+ )
284
+ }
285
+ var staticRenderFns = []
286
+ render._withStripped = true
287
+
288
+
289
+ // CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=dfeb985e&
290
+
291
+ // EXTERNAL MODULE: external "element-ui/lib/form"
292
+ var form_ = __webpack_require__(12);
293
+ var form_default = /*#__PURE__*/__webpack_require__.n(form_);
294
+
295
+ // EXTERNAL MODULE: external "element-ui/lib/row"
296
+ var row_ = __webpack_require__(13);
297
+ var row_default = /*#__PURE__*/__webpack_require__.n(row_);
298
+
299
+ // EXTERNAL MODULE: external "element-ui/lib/col"
300
+ var col_ = __webpack_require__(14);
301
+ var col_default = /*#__PURE__*/__webpack_require__.n(col_);
302
+
303
+ // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-item"
304
+ var form_item_ = __webpack_require__(15);
305
+ var form_item_default = /*#__PURE__*/__webpack_require__.n(form_item_);
306
+
307
+ // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
308
+ var formula_ = __webpack_require__(3);
309
+
310
+ // EXTERNAL MODULE: external "lodash"
311
+ var external_lodash_ = __webpack_require__(2);
312
+
313
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=script&lang=js&
314
+
315
+
316
+
317
+
318
+
319
+
320
+ /* harmony default export */ var formvue_type_script_lang_js_ = ({
321
+ name: "Form",
322
+ componentName: "Form",
323
+ components: {
324
+ elForm: form_default.a,
325
+ elRow: row_default.a,
326
+ elCol: col_default.a,
327
+ FormItem: form_item_default.a
328
+ },
329
+ provide: function provide() {
330
+ return {
331
+ form: this
332
+ };
333
+ },
334
+ props: {
335
+ isFull: {
336
+ type: Boolean,
337
+ default: true
338
+ },
339
+ prop: String,
340
+ span: Number,
341
+ formItems: {
342
+ type: Array,
343
+ default: function _default() {
344
+ return [];
345
+ }
346
+ },
347
+ actions: {
348
+ type: Array,
349
+ default: function _default() {
350
+ return [];
351
+ }
352
+ },
353
+ on: {
354
+ type: Object,
355
+ default: function _default() {
356
+ return {};
357
+ }
358
+ },
359
+ formModel: {
360
+ type: Object,
361
+ default: function _default() {
362
+ return {};
363
+ }
364
+ },
365
+ request: Function
366
+ },
367
+ computed: {
368
+ formProps: function formProps() {
369
+ return Object.assign({}, this.$attrs, {
370
+ model: this.formModel
371
+ });
372
+ },
373
+ formListeners: function formListeners() {
374
+ return Object.assign({}, this.$listeners);
375
+ },
376
+ rowProps: function rowProps() {
377
+ return Object.assign({}, this.$attrs);
378
+ },
379
+ filterFormItems: function filterFormItems() {
380
+ var _this = this;
381
+ return this.formItems.filter(function (item) {
382
+ if (item.show === false) {
383
+ return false;
384
+ }
385
+ if (typeof item.show === "function" && !item.show.call(_this, {
386
+ form: _this,
387
+ formModel: _this.formModel,
388
+ config: item
389
+ })) {
390
+ return false;
391
+ }
392
+ if (typeof item.show === "string" && !Object(formula_["evaluate"])(item.show, _this.formModel, {
393
+ evalMode: true
394
+ })) {
395
+ return false;
396
+ }
397
+ return true;
398
+ });
399
+ },
400
+ actionItem: function actionItem() {
401
+ var relItem = {};
402
+ this.actions.forEach(function (item) {
403
+ if (!relItem[item.trigger]) {
404
+ relItem[item.trigger] = [];
405
+ }
406
+ relItem[item.trigger].push(item);
407
+ });
408
+ return relItem;
409
+ }
410
+ },
411
+ data: function data() {
412
+ return {
413
+ defaultModel: {},
414
+ //默认值存储
415
+ formItemLayout: {}
416
+ };
417
+ },
418
+ created: function created() {
419
+ var _this2 = this;
420
+ this.formItems.forEach(function (item) {
421
+ _this2.formItemLayout[item.prop] = item;
422
+ if (typeof item.value === "function") {
423
+ item.value = item.value.call(_this2);
424
+ }
425
+ _this2.defaultModel[item.prop] = item.value;
426
+ //初始化值处理
427
+ var formVal = Object(external_lodash_["get"])(_this2.formModel, item.prop);
428
+ if (typeof formVal === 'undefined') {
429
+ //初始化数据值
430
+ if (item.prop && item.prop.indexOf(".") != -1) {
431
+ //循环设置值
432
+ var keyArr = item.prop.split('.');
433
+ var tempObj = _this2.formModel;
434
+ keyArr.forEach(function (key, index) {
435
+ if (index < keyArr.length - 1) {
436
+ if (typeof tempObj[key] === 'undefined') {
437
+ _this2.$set(tempObj, key, {});
438
+ }
439
+ tempObj = tempObj[key];
440
+ } else {
441
+ _this2.$set(tempObj, key, item.value || null);
442
+ }
443
+ });
444
+ } else {
445
+ _this2.$set(_this2.formModel, item.prop, item.value || null);
446
+ }
447
+ } else {
448
+ item.value = formVal;
449
+ }
450
+ });
451
+ },
452
+ methods: {
453
+ validate: function validate(callback) {
454
+ return this.$refs.form.validate(callback);
455
+ },
456
+ validateField: function validateField(props, callback) {
457
+ return this.$refs.form.validateField(props, callback);
458
+ },
459
+ reset: function reset() {
460
+ this.resetFields();
461
+ },
462
+ resetFields: function resetFields() {
463
+ for (var key in this.defaultModel) {
464
+ if (this.formItemLayout[key]) {
465
+ this.formItemLayout[key].value = this.defaultModel[key];
466
+ }
467
+ }
468
+ this.$refs.form.resetFields();
469
+ },
470
+ clearValidate: function clearValidate(props) {
471
+ return this.$refs.form.clearValidate(props);
472
+ },
473
+ formItemChange: function formItemChange(config) {
474
+ this.$emit("formChange", {
475
+ formProp: this.prop,
476
+ formModel: this.formModel,
477
+ formConfig: this.formItemLayout,
478
+ itemProp: config.itemProp,
479
+ itemModel: config.itemVal,
480
+ itemConfig: config.itemConfig
481
+ });
482
+ }
483
+ }
484
+ });
485
+ // CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=script&lang=js&
486
+ /* harmony default export */ var src_formvue_type_script_lang_js_ = (formvue_type_script_lang_js_);
487
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
488
+ var componentNormalizer = __webpack_require__(1);
489
+
490
+ // CONCATENATED MODULE: ./src/components/form/src/form.vue
491
+
492
+
493
+
494
+
495
+
496
+ /* normalize component */
497
+
498
+ var component = Object(componentNormalizer["a" /* default */])(
499
+ src_formvue_type_script_lang_js_,
500
+ render,
501
+ staticRenderFns,
502
+ false,
503
+ null,
504
+ null,
505
+ null
506
+
507
+ )
508
+
509
+ /* harmony default export */ var src_form = (component.exports);
510
+ // CONCATENATED MODULE: ./src/components/form/index.js
511
+
512
+ src_form.install = function (Vue) {
513
+ Vue.component(src_form.name, src_form);
514
+ };
515
+ /* harmony default export */ var components_form = __webpack_exports__["default"] = (src_form);
516
+
517
+ /***/ }),
518
+ /* 5 */
519
+ /***/ (function(module, exports) {
520
+
521
+ module.exports = require("element-ui/lib/button");
522
+
523
+ /***/ }),
524
+ /* 6 */
525
+ /***/ (function(module, exports) {
526
+
527
+ module.exports = require("element-ui/lib/tabs");
528
+
529
+ /***/ }),
530
+ /* 7 */
531
+ /***/ (function(module, exports) {
532
+
533
+ module.exports = require("element-ui/lib/tab-pane");
534
+
535
+ /***/ }),
536
+ /* 8 */
537
+ /***/ (function(module, exports) {
538
+
539
+ module.exports = require("element-ui/lib/collapse");
540
+
541
+ /***/ }),
542
+ /* 9 */
543
+ /***/ (function(module, exports) {
544
+
545
+ module.exports = require("element-ui/lib/collapse-item");
546
+
547
+ /***/ }),
548
+ /* 10 */
549
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
550
+
551
+ "use strict";
552
+ // ESM COMPAT FLAG
553
+ __webpack_require__.r(__webpack_exports__);
554
+
555
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-view/src/index.vue?vue&type=template&id=720bd4fc&
556
+ var render = function render() {
557
+ var _vm = this,
558
+ _c = _vm._self._c
559
+ return _c(
560
+ "div",
561
+ { staticClass: "form-view" },
562
+ [
563
+ _vm._t("default", function () {
564
+ return [
565
+ _c(
566
+ "el-descriptions",
567
+ _vm._g(
568
+ _vm._b({ ref: "form" }, "el-descriptions", _vm.formProps, false),
569
+ _vm.formListeners
570
+ ),
571
+ _vm._l(_vm.filterFormItems, function (item) {
572
+ return _c(
573
+ "el-descriptions-item",
574
+ _vm._g(
575
+ _vm._b(
576
+ { key: item.prop },
577
+ "el-descriptions-item",
578
+ item,
579
+ false
580
+ ),
581
+ item.on
582
+ ),
583
+ [
584
+ _vm._v(
585
+ "\n " + _vm._s(_vm.formModel[item.prop]) + "\n "
586
+ ),
587
+ ]
588
+ )
589
+ }),
590
+ 1
591
+ ),
592
+ ]
593
+ }),
594
+ ],
595
+ 2
596
+ )
597
+ }
598
+ var staticRenderFns = []
599
+ render._withStripped = true
600
+
601
+
602
+ // CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=template&id=720bd4fc&
603
+
604
+ // EXTERNAL MODULE: external "element-ui/lib/descriptions"
605
+ var descriptions_ = __webpack_require__(18);
606
+ var descriptions_default = /*#__PURE__*/__webpack_require__.n(descriptions_);
607
+
608
+ // EXTERNAL MODULE: external "element-ui/lib/descriptions-item"
609
+ var descriptions_item_ = __webpack_require__(19);
610
+ var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_item_);
611
+
612
+ // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
613
+ var formula_ = __webpack_require__(3);
614
+
615
+ // EXTERNAL MODULE: external "lodash"
616
+ var external_lodash_ = __webpack_require__(2);
617
+
618
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-view/src/index.vue?vue&type=script&lang=js&
619
+
620
+
621
+
622
+
623
+ /* harmony default export */ var srcvue_type_script_lang_js_ = ({
624
+ name: "FormView",
625
+ componentName: "FormView",
626
+ components: {
627
+ elDescriptions: descriptions_default.a,
628
+ elDescriptionsItem: descriptions_item_default.a
629
+ },
630
+ props: {
631
+ prop: String,
632
+ labelWidth: String,
633
+ formItems: {
634
+ type: Array,
635
+ default: function _default() {
636
+ return [];
637
+ }
638
+ },
639
+ formModel: {
640
+ type: Object,
641
+ default: function _default() {
642
+ return {};
643
+ }
644
+ }
645
+ },
646
+ computed: {
647
+ formProps: function formProps() {
648
+ return Object.assign({
649
+ border: true,
650
+ labelStyle: {
651
+ width: this.labelWidth
652
+ }
653
+ }, this.$attrs);
654
+ },
655
+ formListeners: function formListeners() {
656
+ return Object.assign({}, this.$listeners);
657
+ },
658
+ rowProps: function rowProps() {
659
+ return Object.assign({}, this.$attrs);
660
+ },
661
+ filterFormItems: function filterFormItems() {
662
+ var _this = this;
663
+ return this.formItems.filter(function (item) {
664
+ if (item.show === false) {
665
+ return false;
666
+ }
667
+ if (typeof item.show === "function" && !item.show.call(_this, {
668
+ form: _this,
669
+ config: item
670
+ })) {
671
+ return false;
672
+ }
673
+ if (typeof item.show === "string" && !Object(formula_["evaluate"])(item.show, _this.formModel, {
674
+ evalMode: true
675
+ })) {
676
+ return false;
677
+ }
678
+ return true;
679
+ });
680
+ }
681
+ },
682
+ data: function data() {
683
+ return {
684
+ formItemLayout: {}
685
+ };
686
+ },
687
+ created: function created() {
688
+ var _this2 = this;
689
+ this.formItems.forEach(function (item) {
690
+ _this2.formItemLayout[item.prop] = item;
691
+ //初始化数据值
692
+ _this2.$set(_this2.formModel, item.prop, null);
693
+ });
694
+ },
695
+ methods: {
696
+ setFormModel: function setFormModel(model) {
697
+ Object(external_lodash_["merge"])(this.formModel, model);
698
+ }
699
+ }
700
+ });
701
+ // CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=script&lang=js&
702
+ /* harmony default export */ var form_view_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
703
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
704
+ var componentNormalizer = __webpack_require__(1);
705
+
706
+ // CONCATENATED MODULE: ./src/components/form-view/src/index.vue
707
+
708
+
709
+
710
+
711
+
712
+ /* normalize component */
713
+
714
+ var component = Object(componentNormalizer["a" /* default */])(
715
+ form_view_srcvue_type_script_lang_js_,
716
+ render,
717
+ staticRenderFns,
718
+ false,
719
+ null,
720
+ null,
721
+ null
722
+
723
+ )
724
+
725
+ /* harmony default export */ var src = (component.exports);
726
+ // CONCATENATED MODULE: ./src/components/form-view/index.js
727
+
728
+ src.install = function (Vue) {
729
+ Vue.component(src.name, src);
730
+ };
731
+ /* harmony default export */ var form_view = __webpack_exports__["default"] = (src);
732
+
733
+ /***/ }),
734
+ /* 11 */
735
+ /***/ (function(module, exports) {
736
+
737
+ module.exports = require("@panpanzhao/component-ui/lib/components/dialog");
738
+
739
+ /***/ }),
740
+ /* 12 */
741
+ /***/ (function(module, exports) {
742
+
743
+ module.exports = require("element-ui/lib/form");
744
+
745
+ /***/ }),
746
+ /* 13 */
747
+ /***/ (function(module, exports) {
748
+
749
+ module.exports = require("element-ui/lib/row");
750
+
751
+ /***/ }),
752
+ /* 14 */
753
+ /***/ (function(module, exports) {
754
+
755
+ module.exports = require("element-ui/lib/col");
756
+
757
+ /***/ }),
758
+ /* 15 */
759
+ /***/ (function(module, exports) {
760
+
761
+ module.exports = require("@panpanzhao/component-ui/lib/components/form-item");
762
+
763
+ /***/ }),
764
+ /* 16 */
765
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
766
+
767
+ "use strict";
768
+ // ESM COMPAT FLAG
769
+ __webpack_require__.r(__webpack_exports__);
770
+
771
+ // EXTERNAL MODULE: external "@vue/babel-helper-vue-jsx-merge-props"
772
+ var babel_helper_vue_jsx_merge_props_ = __webpack_require__(0);
773
+ var babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props_);
774
+
775
+ // EXTERNAL MODULE: ./src/components/form/index.js + 5 modules
776
+ var components_form = __webpack_require__(4);
777
+
778
+ // CONCATENATED MODULE: ./src/components/form-group/src/content.js
779
+
780
+
781
+ /* harmony default export */ var content = ({
782
+ name: "Content",
783
+ inheritAttrs: false,
784
+ components: {
785
+ Form: components_form["default"]
786
+ },
787
+ props: {
788
+ control: String,
789
+ prop: String,
790
+ label: String,
791
+ actions: Array,
792
+ formItems: Array,
793
+ on: Object,
794
+ render: Function,
795
+ slots: Object,
796
+ config: Object,
797
+ show: {
798
+ type: [Boolean, Function],
799
+ default: true
800
+ }
801
+ },
802
+ data: function data() {
803
+ return {
804
+ formModel: {}
805
+ };
806
+ },
807
+ computed: {
808
+ _formGroup: function _formGroup() {
809
+ var parent = this.$parent;
810
+ while (parent) {
811
+ if (parent.$options.componentName !== 'FormGroup') {
812
+ parent = parent.$parent;
813
+ } else {
814
+ return parent;
815
+ }
816
+ }
817
+ return false;
818
+ }
819
+ },
820
+ created: function created() {
821
+ if (this.prop && this._formGroup) {
822
+ this._formGroup.formModel[this.prop] = this.formModel;
823
+ }
824
+ },
825
+ mounted: function mounted() {
826
+ if (this.prop && this._formGroup && this.$refs.form) {
827
+ this._formGroup.formLayout[this.prop] = this.$refs.form.formItemLayout;
828
+ }
829
+ },
830
+ methods: {
831
+ validate: function validate(callback) {
832
+ return this.$refs.form.validate(callback);
833
+ },
834
+ resetForm: function resetForm() {
835
+ this.$refs.form.resetFields();
836
+ }
837
+ },
838
+ render: function render(h) {
839
+ if (this.slots && this.slots.form) {
840
+ var vForm = typeof this.slots.form === "function" ? this.slots.form.call(this, h) : this.slots.form;
841
+ return vForm;
842
+ }
843
+ var formProp = {
844
+ attrs: Object.assign({
845
+ prop: this.prop,
846
+ formModel: this.formModel,
847
+ actions: this.actions,
848
+ formItems: this.formItems
849
+ }, this.$attrs),
850
+ on: this.on
851
+ };
852
+ return h(components_form["default"], babel_helper_vue_jsx_merge_props_default()([{
853
+ "ref": "form"
854
+ }, formProp]));
855
+ }
856
+ });
857
+ // EXTERNAL MODULE: external "element-ui/lib/tabs"
858
+ var tabs_ = __webpack_require__(6);
859
+ var tabs_default = /*#__PURE__*/__webpack_require__.n(tabs_);
860
+
861
+ // EXTERNAL MODULE: external "element-ui/lib/tab-pane"
862
+ var tab_pane_ = __webpack_require__(7);
863
+ var tab_pane_default = /*#__PURE__*/__webpack_require__.n(tab_pane_);
864
+
865
+ // EXTERNAL MODULE: external "element-ui/lib/collapse"
866
+ var collapse_ = __webpack_require__(8);
867
+ var collapse_default = /*#__PURE__*/__webpack_require__.n(collapse_);
868
+
869
+ // EXTERNAL MODULE: external "element-ui/lib/collapse-item"
870
+ var collapse_item_ = __webpack_require__(9);
871
+ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
872
+
873
+ // CONCATENATED MODULE: ./src/components/form-group/src/index.js
874
+
875
+
876
+
877
+
878
+
879
+
880
+
881
+
882
+ /* harmony default export */ var src = ({
883
+ name: "FormGroup",
884
+ componentName: "FormGroup",
885
+ components: {
886
+ elTabs: tabs_default.a,
887
+ elTabPane: tab_pane_default.a,
888
+ elCollapse: collapse_default.a,
889
+ elCollapseItem: collapse_item_default.a
890
+ },
891
+ props: {
892
+ request: Function,
893
+ control: {
894
+ type: String,
895
+ default: "Collapse"
896
+ },
897
+ actions: {
898
+ type: Array,
899
+ default: function _default() {
900
+ return [];
901
+ }
902
+ },
903
+ items: {
904
+ type: Array,
905
+ default: function _default() {
906
+ return [];
907
+ }
908
+ },
909
+ formModel: {
910
+ type: Object,
911
+ default: function _default() {
912
+ return {};
913
+ }
914
+ },
915
+ on: {
916
+ type: Object,
917
+ default: function _default() {
918
+ return {};
919
+ }
920
+ }
921
+ },
922
+ data: function data() {
923
+ return {
924
+ formLayout: {},
925
+ openedCode: null
926
+ };
927
+ },
928
+ computed: {
929
+ actionFormMap: function actionFormMap() {
930
+ var _this = this;
931
+ var actionForm = {};
932
+ this.actions.forEach(function (action) {
933
+ if (!action.trigger) {
934
+ return false;
935
+ }
936
+ var formCode = action.trigger.formCode;
937
+ if (!actionForm[formCode]) {
938
+ actionForm[formCode] = [];
939
+ }
940
+ actionForm[formCode].push({
941
+ trigger: action.trigger.fieldCode,
942
+ event: action.event,
943
+ target: null,
944
+ //action.target
945
+ exec: function exec(config) {
946
+ var _action$exec;
947
+ var targetConfig = {};
948
+ var targetForm = {};
949
+ action.target.forEach(function (formTarget) {
950
+ if (!targetConfig[formTarget.formCode]) {
951
+ targetConfig[formTarget.formCode] = {};
952
+ }
953
+ targetConfig[formTarget.formCode][formTarget.fieldCode] = _this.formLayout[formTarget.formCode][formTarget.fieldCode];
954
+ targetForm[formTarget.formCode] = _this.formModel[formTarget.formCode];
955
+ });
956
+ config.targetConfig = targetConfig;
957
+ config.targetForm = targetForm;
958
+ for (var _len = arguments.length, arg = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
959
+ arg[_key - 1] = arguments[_key];
960
+ }
961
+ (_action$exec = action.exec).call.apply(_action$exec, [_this, config].concat(arg));
962
+ }
963
+ });
964
+ });
965
+ return actionForm;
966
+ }
967
+ },
968
+ methods: {
969
+ validate: function validate(callback) {
970
+ var _this2 = this;
971
+ var promise;
972
+ // if no callback, return promise
973
+ if (typeof callback !== "function" && Promise) {
974
+ promise = new Promise(function (resolve, reject) {
975
+ callback = function callback(valid, invalidForms) {
976
+ valid ? resolve(valid) : reject(invalidForms);
977
+ };
978
+ });
979
+ }
980
+ var valid = true;
981
+ var count = 0;
982
+ // 如果需要验证的表格为空,调用验证时立刻返回callback
983
+ if (this.items.length === 0 && callback) {
984
+ callback(true);
985
+ }
986
+ var invalidForms = {};
987
+ this.items.forEach(function (form) {
988
+ var formNode = _this2.$refs[form.prop];
989
+ if (!formNode) {
990
+ if (typeof callback === "function" && ++count === _this2.items.length) {
991
+ callback(valid, invalidForms);
992
+ }
993
+ return true;
994
+ }
995
+ formNode.validate(function (flag, msgObj) {
996
+ if (!flag) {
997
+ valid = false;
998
+ invalidForms[form.prop] = msgObj;
999
+ }
1000
+ if (typeof callback === "function" && ++count === _this2.items.length) {
1001
+ callback(valid, invalidForms);
1002
+ }
1003
+ });
1004
+ });
1005
+ if (promise) {
1006
+ return promise;
1007
+ }
1008
+ },
1009
+ reset: function reset() {
1010
+ var _this3 = this;
1011
+ this.items.forEach(function (form) {
1012
+ var formNode = _this3.$refs[form.prop];
1013
+ if (!formNode) {
1014
+ return true;
1015
+ }
1016
+ formNode.resetForm();
1017
+ });
1018
+ },
1019
+ formNode: function formNode(form) {
1020
+ var h = this.$createElement;
1021
+ var formProp = {
1022
+ attrs: Object.assign({
1023
+ actions: this.actionFormMap[form.prop]
1024
+ }, form),
1025
+ on: form.on
1026
+ };
1027
+ return h(content, babel_helper_vue_jsx_merge_props_default()([{
1028
+ "ref": form.prop,
1029
+ "key": form.prop,
1030
+ "attrs": {
1031
+ "config": form,
1032
+ "control": this.control
1033
+ }
1034
+ }, formProp]));
1035
+ },
1036
+ renderTab: function renderTab(h, filterItems) {
1037
+ var _this4 = this;
1038
+ var itemNode = filterItems.map(function (item) {
1039
+ if (typeof item.render === "function") {
1040
+ return item.render(h, _this4.formModel, item);
1041
+ }
1042
+ return h("el-tab-pane", {
1043
+ "key": item.prop,
1044
+ "attrs": {
1045
+ "name": item.prop,
1046
+ "label": item.label
1047
+ }
1048
+ }, [h("template", {
1049
+ "slot": "label"
1050
+ }, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(_this4, h) : item.slots && item.slots.title]), _this4.formNode(item)]);
1051
+ });
1052
+ var tabsProp = {
1053
+ attrs: {
1054
+ type: "border-card",
1055
+ value: this.openedCode
1056
+ },
1057
+ on: {
1058
+ "tab-click": function tabClick(tabNode) {
1059
+ _this4.$emit("openedCode", tabNode.name);
1060
+ }
1061
+ }
1062
+ };
1063
+ return h("el-tabs", babel_helper_vue_jsx_merge_props_default()([{}, tabsProp]), [itemNode]);
1064
+ },
1065
+ renderCollapse: function renderCollapse(h, filterItems) {
1066
+ var _this5 = this;
1067
+ var itemNode = filterItems.map(function (item) {
1068
+ if (typeof item.render === "function") {
1069
+ return item.render(h, _this5.formModel, item);
1070
+ }
1071
+ return h("el-collapse-item", {
1072
+ "key": item.prop,
1073
+ "attrs": {
1074
+ "name": item.prop,
1075
+ "title": item.label
1076
+ }
1077
+ }, [h("template", {
1078
+ "slot": "title"
1079
+ }, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(_this5, h) : item.slots && item.slots.title]), _this5.formNode(item)]);
1080
+ });
1081
+ var collapseProp = {
1082
+ attrs: {
1083
+ value: this.openedCode
1084
+ },
1085
+ on: {
1086
+ change: function change(val) {
1087
+ _this5.$emit("openedCode", val);
1088
+ }
1089
+ }
1090
+ };
1091
+ return h("el-collapse", babel_helper_vue_jsx_merge_props_default()([{}, collapseProp]), [itemNode]);
1092
+ }
1093
+ },
1094
+ render: function render(h) {
1095
+ var _this6 = this;
1096
+ var filterItems = this.items.filter(function (item) {
1097
+ if (item.show === false) {
1098
+ return false;
1099
+ }
1100
+ if (typeof item.show === "function" && !item.show.call(_this6, {
1101
+ config: item
1102
+ })) {
1103
+ return false;
1104
+ }
1105
+ return true;
1106
+ });
1107
+ if (!filterItems.length > 0) {
1108
+ return null;
1109
+ }
1110
+ this.openedCode = filterItems[0] && filterItems[0].prop;
1111
+ return h("div", {
1112
+ "class": ["form-group", "is-" + (this.control === "Tab" ? "tab" : "collapse")]
1113
+ }, [this.control === "Tab" ? this.renderTab(h, filterItems) : this.renderCollapse(h, filterItems)]);
1114
+ }
1115
+ });
1116
+ // CONCATENATED MODULE: ./src/components/form-group/index.js
1117
+
1118
+ src.install = function (Vue) {
1119
+ Vue.component(src.name, src);
1120
+ };
1121
+ /* harmony default export */ var form_group = __webpack_exports__["default"] = (src);
1122
+
1123
+ /***/ }),
1124
+ /* 17 */,
1125
+ /* 18 */
1126
+ /***/ (function(module, exports) {
1127
+
1128
+ module.exports = require("element-ui/lib/descriptions");
1129
+
1130
+ /***/ }),
1131
+ /* 19 */
1132
+ /***/ (function(module, exports) {
1133
+
1134
+ module.exports = require("element-ui/lib/descriptions-item");
1135
+
1136
+ /***/ }),
1137
+ /* 20 */,
1138
+ /* 21 */
1139
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1140
+
1141
+ "use strict";
1142
+ // ESM COMPAT FLAG
1143
+ __webpack_require__.r(__webpack_exports__);
1144
+
1145
+ // EXTERNAL MODULE: external "@vue/babel-helper-vue-jsx-merge-props"
1146
+ var babel_helper_vue_jsx_merge_props_ = __webpack_require__(0);
1147
+ var babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props_);
1148
+
1149
+ // EXTERNAL MODULE: ./src/components/form-view/index.js + 5 modules
1150
+ var form_view = __webpack_require__(10);
1151
+
1152
+ // CONCATENATED MODULE: ./src/components/form-view-group/src/content.js
1153
+
1154
+
1155
+ /* harmony default export */ var content = ({
1156
+ name: "Content",
1157
+ inheritAttrs: false,
1158
+ components: {
1159
+ FormView: form_view["default"]
1160
+ },
1161
+ props: {
1162
+ control: String,
1163
+ prop: String,
1164
+ label: String,
1165
+ formItems: Array,
1166
+ on: Object,
1167
+ render: Function,
1168
+ slots: Object,
1169
+ config: Object,
1170
+ show: {
1171
+ type: [Boolean, Function],
1172
+ default: true
1173
+ }
1174
+ },
1175
+ data: function data() {
1176
+ return {
1177
+ formModel: {}
1178
+ };
1179
+ },
1180
+ computed: {
1181
+ _formViewGroup: function _formViewGroup() {
1182
+ var parent = this.$parent;
1183
+ while (parent) {
1184
+ if (parent.$options.componentName !== 'FormViewGroup') {
1185
+ parent = parent.$parent;
1186
+ } else {
1187
+ return parent;
1188
+ }
1189
+ }
1190
+ return false;
1191
+ }
1192
+ },
1193
+ methods: {},
1194
+ render: function render(h) {
1195
+ if (this.slots.form) {
1196
+ var vForm = typeof this.slots.form === "function" ? this.slots.form.call(this, h) : this.slots.form;
1197
+ return vForm;
1198
+ }
1199
+ var formProp = {
1200
+ attrs: Object.assign({
1201
+ prop: this.prop,
1202
+ formModel: this.formModel,
1203
+ formItems: this.formItems
1204
+ }, this.$attrs),
1205
+ on: this.on
1206
+ };
1207
+ return h(form_view["default"], babel_helper_vue_jsx_merge_props_default()([{
1208
+ "ref": "formView"
1209
+ }, formProp]));
1210
+ }
1211
+ });
1212
+ // EXTERNAL MODULE: external "element-ui/lib/tabs"
1213
+ var tabs_ = __webpack_require__(6);
1214
+ var tabs_default = /*#__PURE__*/__webpack_require__.n(tabs_);
1215
+
1216
+ // EXTERNAL MODULE: external "element-ui/lib/tab-pane"
1217
+ var tab_pane_ = __webpack_require__(7);
1218
+ var tab_pane_default = /*#__PURE__*/__webpack_require__.n(tab_pane_);
1219
+
1220
+ // EXTERNAL MODULE: external "element-ui/lib/collapse"
1221
+ var collapse_ = __webpack_require__(8);
1222
+ var collapse_default = /*#__PURE__*/__webpack_require__.n(collapse_);
1223
+
1224
+ // EXTERNAL MODULE: external "element-ui/lib/collapse-item"
1225
+ var collapse_item_ = __webpack_require__(9);
1226
+ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
1227
+
1228
+ // EXTERNAL MODULE: external "lodash"
1229
+ var external_lodash_ = __webpack_require__(2);
1230
+
1231
+ // CONCATENATED MODULE: ./src/components/form-view-group/src/index.js
1232
+
1233
+
1234
+
1235
+
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+ /* harmony default export */ var src = ({
1242
+ name: "FormViewGroup",
1243
+ componentName: "FormViewGroup",
1244
+ components: {
1245
+ elTabs: tabs_default.a,
1246
+ elTabPane: tab_pane_default.a,
1247
+ elCollapse: collapse_default.a,
1248
+ elCollapseItem: collapse_item_default.a
1249
+ },
1250
+ props: {
1251
+ request: Function,
1252
+ control: {
1253
+ type: String,
1254
+ default: "Collapse"
1255
+ },
1256
+ items: {
1257
+ type: Array,
1258
+ default: function _default() {
1259
+ return [];
1260
+ }
1261
+ },
1262
+ formModel: {
1263
+ type: Object,
1264
+ default: function _default() {
1265
+ return {};
1266
+ }
1267
+ },
1268
+ on: {
1269
+ type: Object,
1270
+ default: function _default() {
1271
+ return {};
1272
+ }
1273
+ }
1274
+ },
1275
+ data: function data() {
1276
+ return {
1277
+ formLayout: {},
1278
+ openedCode: null
1279
+ };
1280
+ },
1281
+ computed: {},
1282
+ methods: {
1283
+ setFormModel: function setFormModel(model) {
1284
+ Object(external_lodash_["merge"])(this.formModel, model);
1285
+ },
1286
+ formNode: function formNode(form) {
1287
+ var h = this.$createElement;
1288
+ var formProp = {
1289
+ attrs: Object.assign({}, form),
1290
+ on: form.on
1291
+ };
1292
+ return h(content, babel_helper_vue_jsx_merge_props_default()([{
1293
+ "ref": form.prop,
1294
+ "key": form.prop,
1295
+ "attrs": {
1296
+ "config": form,
1297
+ "control": this.control
1298
+ }
1299
+ }, formProp]));
1300
+ },
1301
+ renderTab: function renderTab(h, filterItems) {
1302
+ var _this = this;
1303
+ var itemNode = filterItems.map(function (item) {
1304
+ if (typeof item.render === "function") {
1305
+ return item.render(h, _this.formModel, item);
1306
+ }
1307
+ return h("el-tab-pane", {
1308
+ "key": item.prop,
1309
+ "attrs": {
1310
+ "name": item.prop,
1311
+ "label": item.label
1312
+ }
1313
+ }, [h("template", {
1314
+ "slot": "label"
1315
+ }, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(_this, h) : item.slots && item.slots.title]), _this.formNode(item)]);
1316
+ });
1317
+ var tabsProp = {
1318
+ attrs: {
1319
+ type: "border-card",
1320
+ value: this.openedCode
1321
+ },
1322
+ on: {
1323
+ "tab-click": function tabClick(tabNode) {
1324
+ _this.$emit("openedCode", tabNode.name);
1325
+ }
1326
+ }
1327
+ };
1328
+ return h("el-tabs", babel_helper_vue_jsx_merge_props_default()([{}, tabsProp]), [itemNode]);
1329
+ },
1330
+ renderCollapse: function renderCollapse(h, filterItems) {
1331
+ var _this2 = this;
1332
+ var itemNode = filterItems.map(function (item) {
1333
+ if (typeof item.render === "function") {
1334
+ return item.render(h, _this2.formModel, item);
1335
+ }
1336
+ return h("el-collapse-item", {
1337
+ "key": item.prop,
1338
+ "attrs": {
1339
+ "name": item.prop,
1340
+ "title": item.label
1341
+ }
1342
+ }, [h("template", {
1343
+ "slot": "title"
1344
+ }, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(_this2, h) : item.slots && item.slots.title]), _this2.formNode(item)]);
1345
+ });
1346
+ var collapseProp = {
1347
+ attrs: {
1348
+ value: this.openedCode
1349
+ },
1350
+ on: {
1351
+ change: function change(val) {
1352
+ _this2.$emit("openedCode", val);
1353
+ }
1354
+ }
1355
+ };
1356
+ return h("el-collapse", babel_helper_vue_jsx_merge_props_default()([{}, collapseProp]), [itemNode]);
1357
+ }
1358
+ },
1359
+ render: function render(h) {
1360
+ var _this3 = this;
1361
+ var filterItems = this.items.filter(function (item) {
1362
+ if (item.show === false) {
1363
+ return false;
1364
+ }
1365
+ if (typeof item.show === "function" && !item.show.call(_this3, {
1366
+ config: item
1367
+ })) {
1368
+ return false;
1369
+ }
1370
+ return true;
1371
+ });
1372
+ if (!filterItems.length > 0) {
1373
+ return null;
1374
+ }
1375
+ this.openedCode = filterItems[0] && filterItems[0].prop;
1376
+ return h("div", {
1377
+ "class": ["form-view-group", "is-" + (this.control === "Tab" ? "tab" : "collapse")]
1378
+ }, [this.control === "Tab" ? this.renderTab(h, filterItems) : this.renderCollapse(h, filterItems)]);
1379
+ }
1380
+ });
1381
+ // CONCATENATED MODULE: ./src/components/form-view-group/index.js
1382
+
1383
+ src.install = function (Vue) {
1384
+ Vue.component(src.name, src);
1385
+ };
1386
+ /* harmony default export */ var form_view_group = __webpack_exports__["default"] = (src);
1387
+
1388
+ /***/ }),
1389
+ /* 22 */,
1390
+ /* 23 */
1391
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1392
+
1393
+ "use strict";
1394
+ // ESM COMPAT FLAG
1395
+ __webpack_require__.r(__webpack_exports__);
1396
+
1397
+ // EXTERNAL MODULE: external "@vue/babel-helper-vue-jsx-merge-props"
1398
+ var babel_helper_vue_jsx_merge_props_ = __webpack_require__(0);
1399
+ var babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props_);
1400
+
1401
+ // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/dialog"
1402
+ var dialog_ = __webpack_require__(11);
1403
+ var dialog_default = /*#__PURE__*/__webpack_require__.n(dialog_);
1404
+
1405
+ // EXTERNAL MODULE: external "element-ui/lib/button"
1406
+ var button_ = __webpack_require__(5);
1407
+ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
1408
+
1409
+ // EXTERNAL MODULE: ./src/components/form/index.js + 5 modules
1410
+ var components_form = __webpack_require__(4);
1411
+
1412
+ // EXTERNAL MODULE: ./src/components/form-group/index.js + 2 modules
1413
+ var form_group = __webpack_require__(16);
1414
+
1415
+ // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
1416
+ var formula_ = __webpack_require__(3);
1417
+
1418
+ // EXTERNAL MODULE: external "lodash"
1419
+ var external_lodash_ = __webpack_require__(2);
1420
+
1421
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-dialog/src/index.vue?vue&type=script&lang=js&
1422
+
1423
+
1424
+
1425
+
1426
+
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+ /* harmony default export */ var srcvue_type_script_lang_js_ = ({
1434
+ name: "FormDialog",
1435
+ componentName: "FormDialog",
1436
+ components: {
1437
+ Form: components_form["default"],
1438
+ FormGroup: form_group["default"],
1439
+ Dialog: dialog_default.a,
1440
+ Tool: {
1441
+ components: {
1442
+ elButton: button_default.a
1443
+ },
1444
+ props: {
1445
+ label: String,
1446
+ show: {
1447
+ type: [Boolean, Function],
1448
+ default: true
1449
+ },
1450
+ on: {
1451
+ type: Object,
1452
+ default: function _default() {
1453
+ return {};
1454
+ }
1455
+ },
1456
+ render: Function
1457
+ },
1458
+ computed: {
1459
+ attrs: function attrs() {
1460
+ return Object.assign({
1461
+ size: "mini"
1462
+ }, this.$attrs);
1463
+ }
1464
+ },
1465
+ data: function data() {
1466
+ return {
1467
+ loading: this.$attrs.loading
1468
+ };
1469
+ },
1470
+ render: function render(h) {
1471
+ var _this = this;
1472
+ if (this.show === false) {
1473
+ return null;
1474
+ }
1475
+ if (typeof this.render === "function") {
1476
+ return this.render(h, this);
1477
+ }
1478
+ var param = {
1479
+ attrs: this.attrs,
1480
+ on: {
1481
+ click: function click(event) {
1482
+ if (typeof _this.$listeners.click === "function") {
1483
+ _this.$listeners.click.call(event, _this);
1484
+ }
1485
+ }
1486
+ }
1487
+ };
1488
+ return h("el-button", babel_helper_vue_jsx_merge_props_default()([{}, param, {
1489
+ "attrs": {
1490
+ "loading": this.loading
1491
+ }
1492
+ }]), [this.label]);
1493
+ }
1494
+ }
1495
+ },
1496
+ props: {
1497
+ request: Function,
1498
+ dialog: {
1499
+ type: Object,
1500
+ default: function _default() {
1501
+ return {
1502
+ confirmButtonText: "确认",
1503
+ confirmButtonType: "Primary",
1504
+ cancelButtonText: "取消",
1505
+ cancelButtonType: "Primary"
1506
+ };
1507
+ }
1508
+ },
1509
+ formMode: String,
1510
+ noApiClose: {
1511
+ type: Boolean,
1512
+ default: true
1513
+ },
1514
+ api: {
1515
+ type: Object,
1516
+ default: function _default() {
1517
+ return {};
1518
+ }
1519
+ },
1520
+ form: {
1521
+ type: Object,
1522
+ default: function _default() {
1523
+ return {};
1524
+ }
1525
+ },
1526
+ tools: Array,
1527
+ on: {
1528
+ type: Object,
1529
+ default: function _default() {
1530
+ return {};
1531
+ }
1532
+ },
1533
+ slots: {
1534
+ type: Object,
1535
+ default: function _default() {
1536
+ return {};
1537
+ }
1538
+ }
1539
+ },
1540
+ data: function data() {
1541
+ return {
1542
+ show: false,
1543
+ formModel: {},
1544
+ expandModel: null,
1545
+ defaultTools: [{
1546
+ label: this.dialog.cancelButtonText || "取消",
1547
+ type: this.confirmButtonType,
1548
+ loading: false,
1549
+ on: {
1550
+ click: this.close
1551
+ }
1552
+ }, {
1553
+ label: this.dialog.confirmButtonText || "确认",
1554
+ type: this.confirmButtonType || "primary",
1555
+ loading: false,
1556
+ on: {
1557
+ click: this.submit
1558
+ }
1559
+ }]
1560
+ };
1561
+ },
1562
+ computed: {
1563
+ requester: function requester() {
1564
+ return this.api.request || this.request || (this.$COMPONENT || {}).request;
1565
+ }
1566
+ },
1567
+ methods: {
1568
+ open: function open(model, expandModel) {
1569
+ var _this2 = this;
1570
+ this.show = true;
1571
+ this.expandModel = expandModel;
1572
+ if (model) {
1573
+ this.$nextTick(function () {
1574
+ _this2.setFormModel(model);
1575
+ });
1576
+ }
1577
+ },
1578
+ close: function close() {
1579
+ this.show = false;
1580
+ },
1581
+ setFormModel: function setFormModel(model) {
1582
+ Object(external_lodash_["merge"])(this.formModel, model);
1583
+ },
1584
+ reset: function reset() {
1585
+ this.$refs.form && this.$refs.form.reset();
1586
+ },
1587
+ closed: function closed() {
1588
+ this.reset();
1589
+ this.show = false;
1590
+ },
1591
+ submit: function submit(button) {
1592
+ var _this3 = this;
1593
+ this.$refs.form.validate(function (isValidate, errorMessage) {
1594
+ if (!isValidate) {
1595
+ return false;
1596
+ }
1597
+ var reqData = Object(external_lodash_["merge"])(_this3.api.data || {}, _this3.formModel);
1598
+ if (typeof _this3.api.before === "function") {
1599
+ reqData = _this3.api.before.call(_this3, reqData);
1600
+ }
1601
+ if (!(_this3.api.url && _this3.requester)) {
1602
+ if (_this3.noApiClose) {
1603
+ _this3.reset();
1604
+ _this3.show = false;
1605
+ }
1606
+ _this3.$emit("success", {
1607
+ request: _this3.requester,
1608
+ reqData: reqData,
1609
+ expandData: _this3.expandModel
1610
+ }, {
1611
+ button: button
1612
+ });
1613
+ return false;
1614
+ }
1615
+ button.loading = true;
1616
+ _this3.requester({
1617
+ url: Object(formula_["evaluate"])(_this3.api.url, reqData),
1618
+ method: _this3.api.method || "POST",
1619
+ headers: _this3.api.headers,
1620
+ data: reqData
1621
+ }).then(function (res) {
1622
+ button.loading = false;
1623
+ _this3.reset();
1624
+ _this3.show = false;
1625
+ _this3.$emit("success", {
1626
+ request: _this3.requester,
1627
+ reqData: reqData,
1628
+ resData: res,
1629
+ expandData: _this3.expandModel
1630
+ });
1631
+ }).catch(function (error) {
1632
+ button.loading = false;
1633
+ _this3.$emit("error", {
1634
+ request: _this3.requester,
1635
+ reqData: reqData,
1636
+ resError: error,
1637
+ expandData: _this3.expandModel
1638
+ });
1639
+ });
1640
+ });
1641
+ },
1642
+ renderForm: function renderForm(h) {
1643
+ var param = {
1644
+ attrs: Object.assign({
1645
+ formModel: this.formModel,
1646
+ request: this.request
1647
+ }, this.form)
1648
+ };
1649
+ if (this.formMode === "group") {
1650
+ return h(form_group["default"], babel_helper_vue_jsx_merge_props_default()([{
1651
+ "ref": "form"
1652
+ }, param]));
1653
+ }
1654
+ return h(components_form["default"], babel_helper_vue_jsx_merge_props_default()([{
1655
+ "ref": "form"
1656
+ }, param]));
1657
+ },
1658
+ renderTitle: function renderTitle(h) {
1659
+ if (typeof this.slots.title === "function") {
1660
+ return this.slots.title.call(this, this.formModel);
1661
+ }
1662
+ return this.slots.title || this.dialog.title;
1663
+ },
1664
+ renderTools: function renderTools(h) {
1665
+ if (typeof this.slots.footer === "function") {
1666
+ return this.slots.footer.call(this, this.formModel);
1667
+ }
1668
+ return h("div", [(this.tools || this.defaultTools).map(function (item) {
1669
+ var toolParam = {
1670
+ attrs: Object.assign({}, item),
1671
+ on: item.on
1672
+ };
1673
+ return h("Tool", babel_helper_vue_jsx_merge_props_default()([{}, toolParam]));
1674
+ })]);
1675
+ }
1676
+ },
1677
+ render: function render(h) {
1678
+ var _this4 = this;
1679
+ var param = {
1680
+ attrs: Object.assign({
1681
+ visible: this.show,
1682
+ closeOnClickModal: false,
1683
+ "customClass": "form-dialog"
1684
+ }, this.dialog),
1685
+ on: Object.assign(this.on, {
1686
+ close: function close() {
1687
+ _this4.reset();
1688
+ _this4.show = false;
1689
+ }
1690
+ })
1691
+ };
1692
+ return h(dialog_default.a, babel_helper_vue_jsx_merge_props_default()([{}, param]), [h("template", {
1693
+ "slot": "title",
1694
+ "class": "dialog-title"
1695
+ }, [this.renderTitle(h)]), h("template", {
1696
+ "slot": "footer",
1697
+ "class": "dialog-footer"
1698
+ }, [this.renderTools(h)]), this.renderForm(h)]);
1699
+ }
1700
+ });
1701
+ // CONCATENATED MODULE: ./src/components/form-dialog/src/index.vue?vue&type=script&lang=js&
1702
+ /* harmony default export */ var form_dialog_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
1703
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1704
+ var componentNormalizer = __webpack_require__(1);
1705
+
1706
+ // CONCATENATED MODULE: ./src/components/form-dialog/src/index.vue
1707
+ var src_render, staticRenderFns
1708
+
1709
+
1710
+
1711
+
1712
+ /* normalize component */
1713
+
1714
+ var component = Object(componentNormalizer["a" /* default */])(
1715
+ form_dialog_srcvue_type_script_lang_js_,
1716
+ src_render,
1717
+ staticRenderFns,
1718
+ false,
1719
+ null,
1720
+ null,
1721
+ null
1722
+
1723
+ )
1724
+
1725
+ /* harmony default export */ var src = (component.exports);
1726
+ // CONCATENATED MODULE: ./src/components/form-dialog/index.js
1727
+
1728
+ src.install = function (Vue) {
1729
+ Vue.component(src.name, src);
1730
+ };
1731
+ /* harmony default export */ var form_dialog = __webpack_exports__["default"] = (src);
1732
+
1733
+ /***/ }),
1734
+ /* 24 */
1735
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1736
+
1737
+ "use strict";
1738
+ // ESM COMPAT FLAG
1739
+ __webpack_require__.r(__webpack_exports__);
1740
+
1741
+ // EXTERNAL MODULE: external "@vue/babel-helper-vue-jsx-merge-props"
1742
+ var babel_helper_vue_jsx_merge_props_ = __webpack_require__(0);
1743
+ var babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props_);
1744
+
1745
+ // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/dialog"
1746
+ var dialog_ = __webpack_require__(11);
1747
+ var dialog_default = /*#__PURE__*/__webpack_require__.n(dialog_);
1748
+
1749
+ // EXTERNAL MODULE: external "element-ui/lib/button"
1750
+ var button_ = __webpack_require__(5);
1751
+ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
1752
+
1753
+ // EXTERNAL MODULE: ./src/components/form-view/index.js + 5 modules
1754
+ var form_view = __webpack_require__(10);
1755
+
1756
+ // EXTERNAL MODULE: ./src/components/form-view-group/index.js + 2 modules
1757
+ var form_view_group = __webpack_require__(21);
1758
+
1759
+ // EXTERNAL MODULE: external "lodash"
1760
+ var external_lodash_ = __webpack_require__(2);
1761
+
1762
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-view-dialog/src/index.vue?vue&type=script&lang=js&
1763
+
1764
+
1765
+
1766
+
1767
+
1768
+
1769
+
1770
+
1771
+
1772
+
1773
+ /* harmony default export */ var srcvue_type_script_lang_js_ = ({
1774
+ name: "FormViewDialog",
1775
+ componentName: "FormViewDialog",
1776
+ components: {
1777
+ FormView: form_view["default"],
1778
+ FormViewGroup: form_view_group["default"],
1779
+ Dialog: dialog_default.a,
1780
+ Tool: {
1781
+ components: {
1782
+ elButton: button_default.a
1783
+ },
1784
+ props: {
1785
+ label: String,
1786
+ show: {
1787
+ type: [Boolean, Function],
1788
+ default: true
1789
+ },
1790
+ on: {
1791
+ type: Object,
1792
+ default: function _default() {
1793
+ return {};
1794
+ }
1795
+ },
1796
+ render: Function
1797
+ },
1798
+ computed: {
1799
+ attrs: function attrs() {
1800
+ return Object.assign({
1801
+ size: "mini"
1802
+ }, this.$attrs);
1803
+ }
1804
+ },
1805
+ data: function data() {
1806
+ return {
1807
+ loading: this.$attrs.loading
1808
+ };
1809
+ },
1810
+ render: function render(h) {
1811
+ var _this = this;
1812
+ if (this.show === false) {
1813
+ return null;
1814
+ }
1815
+ if (typeof this.render === "function") {
1816
+ return this.render(h, this);
1817
+ }
1818
+ var param = {
1819
+ attrs: this.attrs,
1820
+ on: {
1821
+ click: function click(event) {
1822
+ if (typeof _this.$listeners.click === "function") {
1823
+ _this.$listeners.click.call(event, _this);
1824
+ }
1825
+ }
1826
+ }
1827
+ };
1828
+ return h("el-button", babel_helper_vue_jsx_merge_props_default()([{}, param, {
1829
+ "attrs": {
1830
+ "loading": this.loading
1831
+ }
1832
+ }]), [this.label]);
1833
+ }
1834
+ }
1835
+ },
1836
+ props: {
1837
+ dialog: {
1838
+ type: Object,
1839
+ default: function _default() {
1840
+ return {
1841
+ cancelButtonText: "关闭",
1842
+ cancelButtonType: "Primary"
1843
+ };
1844
+ }
1845
+ },
1846
+ formMode: String,
1847
+ api: {
1848
+ type: Object,
1849
+ default: function _default() {
1850
+ return {};
1851
+ }
1852
+ },
1853
+ form: {
1854
+ type: Object,
1855
+ default: function _default() {
1856
+ return {};
1857
+ }
1858
+ },
1859
+ tools: Array,
1860
+ on: {
1861
+ type: Object,
1862
+ default: function _default() {
1863
+ return {};
1864
+ }
1865
+ },
1866
+ slots: {
1867
+ type: Object,
1868
+ default: function _default() {
1869
+ return {};
1870
+ }
1871
+ }
1872
+ },
1873
+ data: function data() {
1874
+ return {
1875
+ show: false,
1876
+ formModel: {},
1877
+ defaultTools: [{
1878
+ label: this.dialog.cancelButtonText || "关闭",
1879
+ type: this.confirmButtonType,
1880
+ loading: false,
1881
+ on: {
1882
+ click: this.close
1883
+ }
1884
+ }]
1885
+ };
1886
+ },
1887
+ computed: {
1888
+ request: function request() {
1889
+ return this.api.request || (this.$COMPONENT || {}).request;
1890
+ }
1891
+ },
1892
+ methods: {
1893
+ open: function open() {
1894
+ this.show = true;
1895
+ },
1896
+ close: function close() {
1897
+ this.show = false;
1898
+ },
1899
+ setFormModel: function setFormModel(model) {
1900
+ Object(external_lodash_["merge"])(this.formModel, model);
1901
+ },
1902
+ renderForm: function renderForm(h) {
1903
+ var param = {
1904
+ attrs: Object.assign({
1905
+ formModel: this.formModel
1906
+ }, this.form)
1907
+ };
1908
+ if (this.formMode === "group") {
1909
+ return h(form_view_group["default"], babel_helper_vue_jsx_merge_props_default()([{
1910
+ "ref": "form"
1911
+ }, param]));
1912
+ }
1913
+ return h(form_view["default"], babel_helper_vue_jsx_merge_props_default()([{
1914
+ "ref": "form"
1915
+ }, param]));
1916
+ },
1917
+ renderTitle: function renderTitle(h) {
1918
+ if (typeof this.slots.title === "function") {
1919
+ return this.slots.title.call(this, this.formModel);
1920
+ }
1921
+ return this.slots.title || this.dialog.title;
1922
+ },
1923
+ renderTools: function renderTools(h) {
1924
+ if (typeof this.slots.footer === "function") {
1925
+ return this.slots.footer.call(this, this.formModel);
1926
+ }
1927
+ return h("div", [(this.tools || this.defaultTools).map(function (item) {
1928
+ var toolParam = {
1929
+ attrs: Object.assign({}, item),
1930
+ on: item.on
1931
+ };
1932
+ return h("Tool", babel_helper_vue_jsx_merge_props_default()([{}, toolParam]));
1933
+ })]);
1934
+ }
1935
+ },
1936
+ render: function render(h) {
1937
+ var _this2 = this;
1938
+ var param = {
1939
+ attrs: Object.assign({
1940
+ visible: this.show,
1941
+ "customClass": "form-view-dialog"
1942
+ }, this.dialog),
1943
+ on: Object.assign(this.on, {
1944
+ close: function close() {
1945
+ _this2.close();
1946
+ }
1947
+ })
1948
+ };
1949
+ return h(dialog_default.a, babel_helper_vue_jsx_merge_props_default()([{}, param]), [h("template", {
1950
+ "slot": "title",
1951
+ "class": "dialog-title"
1952
+ }, [this.renderTitle(h)]), h("template", {
1953
+ "slot": "footer",
1954
+ "class": "dialog-footer"
1955
+ }, [this.renderTools(h)]), this.renderForm(h)]);
1956
+ }
1957
+ });
1958
+ // CONCATENATED MODULE: ./src/components/form-view-dialog/src/index.vue?vue&type=script&lang=js&
1959
+ /* harmony default export */ var form_view_dialog_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
1960
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1961
+ var componentNormalizer = __webpack_require__(1);
1962
+
1963
+ // CONCATENATED MODULE: ./src/components/form-view-dialog/src/index.vue
1964
+ var src_render, staticRenderFns
1965
+
1966
+
1967
+
1968
+
1969
+ /* normalize component */
1970
+
1971
+ var component = Object(componentNormalizer["a" /* default */])(
1972
+ form_view_dialog_srcvue_type_script_lang_js_,
1973
+ src_render,
1974
+ staticRenderFns,
1975
+ false,
1976
+ null,
1977
+ null,
1978
+ null
1979
+
1980
+ )
1981
+
1982
+ /* harmony default export */ var src = (component.exports);
1983
+ // CONCATENATED MODULE: ./src/components/form-view-dialog/index.js
1984
+
1985
+ src.install = function (Vue) {
1986
+ Vue.component(src.name, src);
1987
+ };
1988
+ /* harmony default export */ var form_view_dialog = __webpack_exports__["default"] = (src);
1989
+
1990
+ /***/ }),
1991
+ /* 25 */,
1992
+ /* 26 */,
1993
+ /* 27 */
1994
+ /***/ (function(module, exports) {
1995
+
1996
+ module.exports = require("@panpanzhao/component-ui/lib/components/table-search");
1997
+
1998
+ /***/ }),
1999
+ /* 28 */,
2000
+ /* 29 */,
2001
+ /* 30 */
2002
+ /***/ (function(module, exports) {
2003
+
2004
+ module.exports = require("element-ui/lib/message-box");
2005
+
2006
+ /***/ }),
2007
+ /* 31 */,
2008
+ /* 32 */,
2009
+ /* 33 */,
2010
+ /* 34 */,
2011
+ /* 35 */,
2012
+ /* 36 */,
2013
+ /* 37 */,
2014
+ /* 38 */,
2015
+ /* 39 */,
2016
+ /* 40 */,
2017
+ /* 41 */,
2018
+ /* 42 */,
2019
+ /* 43 */,
2020
+ /* 44 */,
2021
+ /* 45 */,
2022
+ /* 46 */,
2023
+ /* 47 */,
2024
+ /* 48 */,
2025
+ /* 49 */,
2026
+ /* 50 */,
2027
+ /* 51 */,
2028
+ /* 52 */,
2029
+ /* 53 */,
2030
+ /* 54 */,
2031
+ /* 55 */,
2032
+ /* 56 */,
2033
+ /* 57 */,
2034
+ /* 58 */,
2035
+ /* 59 */,
2036
+ /* 60 */,
2037
+ /* 61 */,
2038
+ /* 62 */,
2039
+ /* 63 */,
2040
+ /* 64 */,
2041
+ /* 65 */,
2042
+ /* 66 */,
2043
+ /* 67 */,
2044
+ /* 68 */,
2045
+ /* 69 */,
2046
+ /* 70 */,
2047
+ /* 71 */,
2048
+ /* 72 */,
2049
+ /* 73 */,
2050
+ /* 74 */,
2051
+ /* 75 */,
2052
+ /* 76 */,
2053
+ /* 77 */,
2054
+ /* 78 */,
2055
+ /* 79 */,
2056
+ /* 80 */
2057
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2058
+
2059
+ "use strict";
2060
+ // ESM COMPAT FLAG
2061
+ __webpack_require__.r(__webpack_exports__);
2062
+
2063
+ // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-search"
2064
+ var table_search_ = __webpack_require__(27);
2065
+ var table_search_default = /*#__PURE__*/__webpack_require__.n(table_search_);
2066
+
2067
+ // EXTERNAL MODULE: ./src/components/form-dialog/index.js + 3 modules
2068
+ var form_dialog = __webpack_require__(23);
2069
+
2070
+ // EXTERNAL MODULE: ./src/components/form-view-dialog/index.js + 3 modules
2071
+ var form_view_dialog = __webpack_require__(24);
2072
+
2073
+ // EXTERNAL MODULE: external "element-ui/lib/message-box"
2074
+ var message_box_ = __webpack_require__(30);
2075
+ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
2076
+
2077
+ // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
2078
+ var formula_ = __webpack_require__(3);
2079
+
2080
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-operate/src/index.vue?vue&type=script&lang=js&
2081
+
2082
+
2083
+
2084
+
2085
+
2086
+ /* harmony default export */ var srcvue_type_script_lang_js_ = ({
2087
+ name: "TableOperate",
2088
+ componentName: "TableOperate",
2089
+ components: {
2090
+ TableSearch: table_search_default.a,
2091
+ FormDialog: form_dialog["default"],
2092
+ FormViewDialog: form_view_dialog["default"]
2093
+ },
2094
+ computed: {
2095
+ tableProps: function tableProps() {
2096
+ return {
2097
+ request: this.request,
2098
+ search: this.search,
2099
+ table: this.table
2100
+ };
2101
+ },
2102
+ createProps: function createProps() {
2103
+ return Object.assign({
2104
+ dialog: {
2105
+ title: "添加"
2106
+ }
2107
+ }, this.create);
2108
+ },
2109
+ updateProps: function updateProps() {
2110
+ return Object.assign({
2111
+ dialog: {
2112
+ title: "修改"
2113
+ }
2114
+ }, this.update);
2115
+ },
2116
+ viewProps: function viewProps() {
2117
+ return Object.assign({
2118
+ dialog: {
2119
+ title: "查看"
2120
+ }
2121
+ }, this.view);
2122
+ }
2123
+ },
2124
+ props: {
2125
+ request: Function,
2126
+ search: {
2127
+ type: Object,
2128
+ default: function _default() {
2129
+ return {};
2130
+ }
2131
+ },
2132
+ table: {
2133
+ type: Object,
2134
+ default: function _default() {
2135
+ return {};
2136
+ }
2137
+ },
2138
+ create: {
2139
+ type: Object,
2140
+ default: function _default() {
2141
+ return null;
2142
+ }
2143
+ },
2144
+ update: {
2145
+ type: Object,
2146
+ default: function _default() {
2147
+ return null;
2148
+ }
2149
+ },
2150
+ delete: {
2151
+ type: Object,
2152
+ default: function _default() {
2153
+ return null;
2154
+ }
2155
+ },
2156
+ view: {
2157
+ type: Object,
2158
+ default: function _default() {
2159
+ return null;
2160
+ }
2161
+ },
2162
+ on: {
2163
+ type: Object,
2164
+ default: function _default() {
2165
+ return {};
2166
+ }
2167
+ },
2168
+ slots: {
2169
+ type: Object,
2170
+ default: function _default() {
2171
+ return {};
2172
+ }
2173
+ }
2174
+ },
2175
+ data: function data() {
2176
+ return {};
2177
+ },
2178
+ mounted: function mounted() {
2179
+ this.addTools();
2180
+ },
2181
+ methods: {
2182
+ addTools: function addTools() {
2183
+ // 添加按钮处理
2184
+ if (this.create) {
2185
+ var tools = this.table && this.table.tools || [];
2186
+ tools.unshift(Object.assign({
2187
+ label: "添加",
2188
+ loading: false,
2189
+ on: {
2190
+ click: this.handleCreate
2191
+ }
2192
+ }, this.create.tool));
2193
+ this.table.tools = tools;
2194
+ }
2195
+ //修改和删除按钮处理
2196
+ if (!(this.update || this.delete || this.view)) {
2197
+ return false;
2198
+ }
2199
+ var filterColumns = this.table.columns.filter(function (item) {
2200
+ return item.control === "Operate";
2201
+ });
2202
+ var optColumn = filterColumns && filterColumns[0];
2203
+ var items = optColumn && optColumn.items || [];
2204
+ if (this.delete) {
2205
+ items.unshift(Object.assign({
2206
+ label: "删除",
2207
+ loading: false,
2208
+ on: {
2209
+ click: this.handleDelete
2210
+ }
2211
+ }, this.delete.tool));
2212
+ }
2213
+ if (this.update) {
2214
+ items.unshift(Object.assign({
2215
+ label: "修改",
2216
+ loading: false,
2217
+ on: {
2218
+ click: this.handleUpdate
2219
+ }
2220
+ }, this.update.tool));
2221
+ }
2222
+ if (this.view) {
2223
+ items.unshift(Object.assign({
2224
+ label: "查看",
2225
+ loading: false,
2226
+ on: {
2227
+ click: this.handleView
2228
+ }
2229
+ }, this.view.tool));
2230
+ }
2231
+ if (optColumn) {
2232
+ optColumn.items = items;
2233
+ } else {
2234
+ this.table.columns.push({
2235
+ control: "Operate",
2236
+ label: "操作",
2237
+ align: "center",
2238
+ items: items
2239
+ });
2240
+ }
2241
+ },
2242
+ handleCreate: function handleCreate() {
2243
+ this.$refs.createFormDialog.open();
2244
+ },
2245
+ handleUpdate: function handleUpdate(rowProps, that) {
2246
+ var _this = this;
2247
+ var rowData = rowProps.row;
2248
+ this.$refs.updateFormDialog.open();
2249
+ if (this.update.detail) {
2250
+ var request = this.update.detail.request || this.request;
2251
+ request({
2252
+ url: Object(formula_["evaluate"])(this.update.detail.url, rowData),
2253
+ method: this.update.detail.method || "GET",
2254
+ data: rowData
2255
+ }).then(function (res) {
2256
+ _this.$refs.updateFormDialog.setFormModel(res);
2257
+ }).catch(function (error) {});
2258
+ } else {
2259
+ this.$nextTick(function () {
2260
+ _this.$refs.updateFormDialog.setFormModel(rowData);
2261
+ });
2262
+ }
2263
+ },
2264
+ handleDelete: function handleDelete(rowProps, that) {
2265
+ var _this2 = this;
2266
+ message_box_default.a.confirm("是否确定删除", '提示', {
2267
+ confirmButtonText: '确定',
2268
+ cancelButtonText: '取消',
2269
+ type: 'warning'
2270
+ }).then(function () {
2271
+ var request = _this2.delete.api.request || _this2.request;
2272
+ var rowData = rowProps.row;
2273
+ that.loading = true;
2274
+ request({
2275
+ url: Object(formula_["evaluate"])(_this2.delete.api.url, rowData),
2276
+ method: _this2.delete.api.method || "GET",
2277
+ data: rowData
2278
+ }).then(function (res) {
2279
+ that.loading = false;
2280
+ }).catch(function (error) {
2281
+ that.loading = false;
2282
+ });
2283
+ }).catch(function () {});
2284
+ },
2285
+ handleView: function handleView(rowProps, that) {
2286
+ var _this3 = this;
2287
+ var rowData = rowProps.row;
2288
+ this.$refs.viewFormDialog.open();
2289
+ if (this.view.api) {
2290
+ var request = this.view.api.request || this.request;
2291
+ request({
2292
+ url: Object(formula_["evaluate"])(this.view.api.url, rowData),
2293
+ method: this.view.api.method || "GET",
2294
+ data: rowData
2295
+ }).then(function (res) {
2296
+ _this3.$refs.viewFormDialog.setFormModel(res);
2297
+ }).catch(function (error) {});
2298
+ } else {
2299
+ this.$nextTick(function () {
2300
+ _this3.$refs.viewFormDialog.setFormModel(rowData);
2301
+ });
2302
+ }
2303
+ }
2304
+ },
2305
+ render: function render() {
2306
+ var h = arguments[0];
2307
+ return h("div", [h("div", [h(table_search_default.a, {
2308
+ "ref": "table",
2309
+ "directives": [{
2310
+ name: "bind",
2311
+ value: "tableProps"
2312
+ }]
2313
+ })]), h("div", [h(form_dialog["default"], {
2314
+ "directives": [{
2315
+ name: "if",
2316
+ value: "create"
2317
+ }, {
2318
+ name: "bind",
2319
+ value: "createProps"
2320
+ }],
2321
+ "ref": "createFormDialog"
2322
+ }), h(form_dialog["default"], {
2323
+ "directives": [{
2324
+ name: "if",
2325
+ value: "update"
2326
+ }, {
2327
+ name: "bind",
2328
+ value: "updateProps"
2329
+ }],
2330
+ "ref": "updateFormDialog"
2331
+ }), h(form_view_dialog["default"], {
2332
+ "directives": [{
2333
+ name: "if",
2334
+ value: "view"
2335
+ }, {
2336
+ name: "bind",
2337
+ value: "viewProps"
2338
+ }],
2339
+ "ref": "viewFormDialog"
2340
+ })])]);
2341
+ }
2342
+ });
2343
+ // CONCATENATED MODULE: ./src/components/table-operate/src/index.vue?vue&type=script&lang=js&
2344
+ /* harmony default export */ var table_operate_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
2345
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2346
+ var componentNormalizer = __webpack_require__(1);
2347
+
2348
+ // CONCATENATED MODULE: ./src/components/table-operate/src/index.vue
2349
+ var src_render, staticRenderFns
2350
+
2351
+
2352
+
2353
+
2354
+ /* normalize component */
2355
+
2356
+ var component = Object(componentNormalizer["a" /* default */])(
2357
+ table_operate_srcvue_type_script_lang_js_,
2358
+ src_render,
2359
+ staticRenderFns,
2360
+ false,
2361
+ null,
2362
+ null,
2363
+ null
2364
+
2365
+ )
2366
+
2367
+ /* harmony default export */ var src = (component.exports);
2368
+ // CONCATENATED MODULE: ./src/components/table-operate/index.js
2369
+
2370
+ src.install = function (Vue) {
2371
+ Vue.component(src.name, src);
2372
+ };
2373
+ /* harmony default export */ var table_operate = __webpack_exports__["default"] = (src);
2374
+
2375
+ /***/ })
2376
+ /******/ ]);