eoss-ui 0.5.13 → 0.5.15

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 (69) hide show
  1. package/lib/button-group.js +5 -1
  2. package/lib/button.js +7 -3
  3. package/lib/cascader.js +2 -2
  4. package/lib/checkbox-group.js +44 -22
  5. package/lib/data-table-form.js +8 -3
  6. package/lib/data-table.js +1205 -1517
  7. package/lib/date-picker.js +7 -3
  8. package/lib/dialog.js +14 -10
  9. package/lib/eoss-ui.common.js +1211 -1752
  10. package/lib/flow-group.js +5 -1
  11. package/lib/flow-list.js +7 -3
  12. package/lib/flow.js +12 -7
  13. package/lib/form.js +9 -10
  14. package/lib/handle-user.js +5 -1
  15. package/lib/handler.js +5 -1
  16. package/lib/icons.js +2 -2
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +7 -3
  19. package/lib/input.js +7 -3
  20. package/lib/label.js +2 -2
  21. package/lib/layout.js +166 -152
  22. package/lib/login.js +5 -1
  23. package/lib/main.js +11 -6
  24. package/lib/menu.js +2 -2
  25. package/lib/nav.js +14 -10
  26. package/lib/notify.js +2 -2
  27. package/lib/page.js +7 -3
  28. package/lib/pagination.js +2 -2
  29. package/lib/player.js +13 -9
  30. package/lib/qr-code.js +9 -5
  31. package/lib/radio-group.js +48 -22
  32. package/lib/retrial-auth.js +7 -3
  33. package/lib/select-ganged.js +30 -6
  34. package/lib/select.js +46 -19
  35. package/lib/selector-panel.js +11 -6
  36. package/lib/selector.js +9 -5
  37. package/lib/sizer.js +7 -3
  38. package/lib/steps.js +14 -10
  39. package/lib/switch.js +7 -3
  40. package/lib/table-form.js +7 -3
  41. package/lib/tabs-panel.js +2 -2
  42. package/lib/tabs.js +7 -3
  43. package/lib/theme-chalk/data-table.css +1 -1
  44. package/lib/theme-chalk/index.css +1 -1
  45. package/lib/tips.js +7 -3
  46. package/lib/toolbar.js +2 -2
  47. package/lib/tree-group.js +7 -3
  48. package/lib/tree.js +7 -3
  49. package/lib/upload.js +8 -4
  50. package/lib/utils/util.js +5 -1
  51. package/lib/wujie.js +7 -3
  52. package/lib/wxlogin.js +7 -3
  53. package/package.json +2 -2
  54. package/packages/checkbox-group/src/main.vue +20 -30
  55. package/packages/data-table/src/children.vue +4 -8
  56. package/packages/data-table/src/column.vue +524 -575
  57. package/packages/data-table/src/main.vue +95 -119
  58. package/packages/form/src/main.vue +2 -7
  59. package/packages/radio-group/src/main.vue +20 -30
  60. package/packages/select/src/main.vue +20 -29
  61. package/packages/select-ganged/src/main.vue +1 -3
  62. package/packages/theme-chalk/lib/data-table.css +1 -1
  63. package/packages/theme-chalk/lib/index.css +1 -1
  64. package/packages/theme-chalk/src/data-table.scss +2 -1
  65. package/src/index.js +1 -1
  66. package/src/utils/util.js +5 -1
  67. package/packages/data-table/src/column copy.vue +0 -977
  68. package/packages/data-table/src/main copy.vue +0 -1325
  69. package/packages/data-table/src/mixins/table.js +0 -12
package/lib/data-table.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 31);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 32);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ([
@@ -1965,7 +1965,11 @@ var isLogined = function isLogined(_ref8) {
1965
1965
  // const logined = getStorage('logined');
1966
1966
  // eslint-disable-next-line eqeqeq
1967
1967
  if (token || cookie == true || cookie == 1) {
1968
- next && next();
1968
+ if (to.path === '/main' || to.path === '/login') {
1969
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1970
+ } else {
1971
+ next && next();
1972
+ }
1969
1973
  } else {
1970
1974
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1971
1975
  ajax({
@@ -3596,26 +3600,245 @@ module.exports = require("babel-runtime/regenerator");
3596
3600
 
3597
3601
  /***/ }),
3598
3602
  /* 13 */,
3599
- /* 14 */,
3600
- /* 15 */,
3601
- /* 16 */
3603
+ /* 14 */
3602
3604
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3603
3605
 
3604
3606
  "use strict";
3605
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
3607
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16);
3606
3608
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
3607
3609
 
3608
3610
 
3609
3611
  /* harmony default export */ __webpack_exports__["a"] = (new vue__WEBPACK_IMPORTED_MODULE_0___default.a());
3610
3612
 
3611
3613
  /***/ }),
3612
- /* 17 */
3614
+ /* 15 */
3615
+ /***/ (function(module, exports) {
3616
+
3617
+ module.exports = require("interactjs");
3618
+
3619
+ /***/ }),
3620
+ /* 16 */
3613
3621
  /***/ (function(module, exports) {
3614
3622
 
3615
3623
  module.exports = require("vue");
3616
3624
 
3617
3625
  /***/ }),
3618
- /* 18 */,
3626
+ /* 17 */,
3627
+ /* 18 */
3628
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3629
+
3630
+ "use strict";
3631
+
3632
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/layout/src/item.vue?vue&type=template&id=124bb300&
3633
+ var render = function () {
3634
+ var _vm = this
3635
+ var _h = _vm.$createElement
3636
+ var _c = _vm._self._c || _h
3637
+ return _c(
3638
+ "div",
3639
+ {
3640
+ ref: "move",
3641
+ staticClass: "es-layout-item",
3642
+ class: _vm.defaultClasss,
3643
+ style: _vm.defaultaStyle,
3644
+ },
3645
+ [
3646
+ _c("es-card"),
3647
+ _c("div", { staticClass: "es-layout-resizable-width" }),
3648
+ _c("div", { staticClass: "es-layout-resizable-height" }),
3649
+ _c("div", { staticClass: "es-layout-resizable" }),
3650
+ ],
3651
+ 1
3652
+ )
3653
+ }
3654
+ var staticRenderFns = []
3655
+ render._withStripped = true
3656
+
3657
+
3658
+ // CONCATENATED MODULE: ./packages/layout/src/item.vue?vue&type=template&id=124bb300&
3659
+
3660
+ // EXTERNAL MODULE: external "interactjs"
3661
+ var external_interactjs_ = __webpack_require__(15);
3662
+ var external_interactjs_default = /*#__PURE__*/__webpack_require__.n(external_interactjs_);
3663
+
3664
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/layout/src/item.vue?vue&type=script&lang=js&
3665
+ //
3666
+ //
3667
+ //
3668
+ //
3669
+ //
3670
+ //
3671
+ //
3672
+ //
3673
+ //
3674
+ //
3675
+ //
3676
+ //
3677
+ //
3678
+
3679
+ // import '@interactjs/auto-start';
3680
+ // import '@interactjs/auto-scroll';
3681
+ // import '@interactjs/actions/drag';
3682
+ // import '@interactjs/actions/resize';
3683
+ // import '@interactjs/modifiers';
3684
+ // import '@interactjs/dev-tools';
3685
+
3686
+ /* harmony default export */ var itemvue_type_script_lang_js_ = ({
3687
+ name: 'LayoutItem',
3688
+ components: {},
3689
+ props: {
3690
+ redact: {
3691
+ type: Boolean,
3692
+ default: true
3693
+ },
3694
+ width: {
3695
+ type: String,
3696
+ default: '100%'
3697
+ },
3698
+ height: {
3699
+ type: String,
3700
+ default: '100px'
3701
+ },
3702
+ left: String,
3703
+ top: String,
3704
+ index: Number
3705
+ },
3706
+ computed: {
3707
+ defaultClasss: function defaultClasss() {
3708
+ return {
3709
+ 'es-dragging': this.dragging
3710
+ };
3711
+ },
3712
+ defaultaStyle: function defaultaStyle() {
3713
+ return {
3714
+ width: this.width,
3715
+ height: this.height,
3716
+ left: this.left,
3717
+ top: this.top
3718
+ };
3719
+ },
3720
+ cardStyle: function cardStyle() {
3721
+ return {
3722
+ width: this.width,
3723
+ height: this.height
3724
+ };
3725
+ }
3726
+ },
3727
+ watch: {},
3728
+ data: function data() {
3729
+ return {
3730
+ position: { x: 0, y: 0 },
3731
+ interaction: null,
3732
+ dragging: false
3733
+ };
3734
+ },
3735
+ created: function created() {
3736
+ this.position = {
3737
+ x: parseInt(this.left) || 0,
3738
+ y: parseInt(this.top) || 0
3739
+ };
3740
+ console.log(this.position);
3741
+ },
3742
+ mounted: function mounted() {
3743
+ console.log(external_interactjs_default.a.feedback);
3744
+ this.interaction = external_interactjs_default()(this.$refs.move);
3745
+ this.interaction.draggable({
3746
+ // modifiers: [
3747
+ // interact.modifiers.restrictRect({
3748
+ // restriction: 'parent',
3749
+ // endOnly: false
3750
+ // })
3751
+ // ],
3752
+ // listeners: {
3753
+ // start: (event) => {
3754
+ // this.dragging = true;
3755
+ // console.log(event.type, event.target, 111);
3756
+ // },
3757
+ // move: (event) => {
3758
+ // this.position.x += event.dx;
3759
+ // this.position.y += event.dy;
3760
+ // event.target.style.transform = `translate(${this.position.x}px, ${this.position.y}px)`;
3761
+ // },
3762
+ // end: (event) => {
3763
+ // this.dragging = false;
3764
+ // console.log(event.type, event.target, 222);
3765
+ // }
3766
+ // }
3767
+ inertia: true,
3768
+ //autoScroll: { container: '.container' },
3769
+ listeners: [external_interactjs_default.a.feedback.pointers()],
3770
+ modifiers: [external_interactjs_default.a.modifiers.restrict({
3771
+ restriction: 'html',
3772
+ elementRect: { left: 0, top: 0, right: 1, bottom: 1 }
3773
+ }), external_interactjs_default.a.modifiers.transform(), external_interactjs_default.a.modifiers.spring()]
3774
+ });
3775
+ this.interaction.resizable({
3776
+ modifiers: [
3777
+ // keep the edges inside the parent
3778
+ external_interactjs_default.a.modifiers.restrictEdges({
3779
+ outer: 'parent'
3780
+ }),
3781
+
3782
+ // minimum size
3783
+ external_interactjs_default.a.modifiers.restrictSize({
3784
+ min: { width: 100, height: 100 }
3785
+ })],
3786
+
3787
+ //inertia: true,
3788
+ edges: { top: true, left: true, bottom: true, right: true },
3789
+ listeners: {
3790
+ move: function move(event) {
3791
+ console.log(1212);
3792
+ var _event$target$dataset = event.target.dataset,
3793
+ x = _event$target$dataset.x,
3794
+ y = _event$target$dataset.y;
3795
+
3796
+
3797
+ x = (parseFloat(x) || 0) + event.deltaRect.left;
3798
+ y = (parseFloat(y) || 0) + event.deltaRect.top;
3799
+
3800
+ Object.assign(event.target.style, {
3801
+ width: event.rect.width + 'px',
3802
+ height: event.rect.height + 'px',
3803
+ transform: 'translate(' + x + 'px, ' + y + 'px)'
3804
+ });
3805
+
3806
+ Object.assign(event.target.dataset, { x: x, y: y });
3807
+ }
3808
+ }
3809
+ });
3810
+ },
3811
+
3812
+ methods: {},
3813
+ beforeDestroy: function beforeDestroy() {}
3814
+ });
3815
+ // CONCATENATED MODULE: ./packages/layout/src/item.vue?vue&type=script&lang=js&
3816
+ /* harmony default export */ var src_itemvue_type_script_lang_js_ = (itemvue_type_script_lang_js_);
3817
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
3818
+ var componentNormalizer = __webpack_require__(3);
3819
+
3820
+ // CONCATENATED MODULE: ./packages/layout/src/item.vue
3821
+
3822
+
3823
+
3824
+
3825
+
3826
+ /* normalize component */
3827
+
3828
+ var component = Object(componentNormalizer["a" /* default */])(
3829
+ src_itemvue_type_script_lang_js_,
3830
+ render,
3831
+ staticRenderFns,
3832
+ false,
3833
+ null,
3834
+ null,
3835
+ null
3836
+
3837
+ )
3838
+
3839
+ /* harmony default export */ var item = __webpack_exports__["a"] = (component.exports);
3840
+
3841
+ /***/ }),
3619
3842
  /* 19 */,
3620
3843
  /* 20 */,
3621
3844
  /* 21 */,
@@ -3628,15 +3851,16 @@ module.exports = require("vue");
3628
3851
  /* 28 */,
3629
3852
  /* 29 */,
3630
3853
  /* 30 */,
3631
- /* 31 */
3854
+ /* 31 */,
3855
+ /* 32 */
3632
3856
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3633
3857
 
3634
3858
  "use strict";
3635
3859
  // ESM COMPAT FLAG
3636
3860
  __webpack_require__.r(__webpack_exports__);
3637
3861
 
3638
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=1d557e20&
3639
- var mainvue_type_template_id_1d557e20_render = function () {
3862
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=2d512d7f&
3863
+ var mainvue_type_template_id_2d512d7f_render = function () {
3640
3864
  var _vm = this
3641
3865
  var _h = _vm.$createElement
3642
3866
  var _c = _vm._self._c || _h
@@ -3651,7 +3875,6 @@ var mainvue_type_template_id_1d557e20_render = function () {
3651
3875
  expression: "tableLoading",
3652
3876
  },
3653
3877
  ],
3654
- ref: "esTableForm",
3655
3878
  tag: "component",
3656
3879
  staticClass: "es-data-table",
3657
3880
  attrs: {
@@ -3741,103 +3964,17 @@ var mainvue_type_template_id_1d557e20_render = function () {
3741
3964
  [
3742
3965
  _vm._t("prepend"),
3743
3966
  _vm._t("default"),
3744
- _vm.checkbox
3745
- ? _c(
3746
- "el-table-column",
3747
- _vm._b(
3748
- {},
3749
- "el-table-column",
3750
- {
3751
- type: "selection",
3752
- width: "55",
3753
- align: "center",
3754
- fixed: "left",
3755
- selectable: _vm.selectable,
3756
- reserveSelection: _vm.reserveSelection,
3757
- filterIcon: _vm.getIcon(),
3758
- },
3759
- false
3760
- )
3761
- )
3762
- : _vm._e(),
3763
- _vm.numbers
3764
- ? _c(
3765
- "el-table-column",
3766
- _vm._b(
3767
- {},
3768
- "el-table-column",
3769
- {
3770
- type: "index",
3771
- label: "序号",
3772
- width: "70",
3773
- align: "center",
3774
- fixed: "left",
3775
- index:
3776
- _vm.index === true
3777
- ? (_vm.config.pageNum - 1) *
3778
- _vm.config.pageSize +
3779
- 1
3780
- : _vm.index === false
3781
- ? 1
3782
- : _vm.index,
3783
- filterIcon: _vm.getIcon(),
3784
- },
3785
- false
3786
- )
3787
- )
3788
- : _vm._e(),
3789
- _vm._l(_vm.theads, function (items, indexs) {
3967
+ _vm._l(_vm.theads, function (item, index) {
3790
3968
  return [
3791
- items.hide !== true
3969
+ item.hide !== true
3792
3970
  ? [
3793
- items.type === "index"
3971
+ item.type === "index" || item.type === "selection"
3794
3972
  ? _c(
3795
3973
  "el-table-column",
3796
3974
  _vm._b(
3797
- { key: indexs },
3975
+ { key: index },
3798
3976
  "el-table-column",
3799
- Object.assign(
3800
- {},
3801
- {
3802
- type: "index",
3803
- label: "序号",
3804
- width: "70",
3805
- align: "center",
3806
- fixed: "left",
3807
- index:
3808
- _vm.index === true
3809
- ? (_vm.config.pageNum - 1) *
3810
- _vm.config.pageSize +
3811
- 1
3812
- : _vm.index === false
3813
- ? 1
3814
- : _vm.index,
3815
- filterIcon: _vm.getIcon(),
3816
- },
3817
- items
3818
- ),
3819
- false
3820
- )
3821
- )
3822
- : items.type === "selection"
3823
- ? _c(
3824
- "el-table-column",
3825
- _vm._b(
3826
- { key: indexs },
3827
- "el-table-column",
3828
- Object.assign(
3829
- {},
3830
- {
3831
- type: "selection",
3832
- width: "55",
3833
- align: "center",
3834
- fixed: "left",
3835
- selectable: _vm.selectable,
3836
- reserveSelection: _vm.reserveSelection,
3837
- filterIcon: _vm.getIcon(),
3838
- },
3839
- items
3840
- ),
3977
+ item,
3841
3978
  false
3842
3979
  )
3843
3980
  )
@@ -3845,21 +3982,18 @@ var mainvue_type_template_id_1d557e20_render = function () {
3845
3982
  "children",
3846
3983
  _vm._g(
3847
3984
  _vm._b(
3848
- { key: indexs },
3985
+ { key: item.label || item.title },
3849
3986
  "children",
3850
- {
3851
- name: _vm.name,
3852
- item: items,
3853
- width: items.width,
3854
- index: indexs,
3855
- readonly: _vm.readonly,
3856
- optionData: _vm.optionDatas,
3857
- form: _vm.form,
3858
- minWidth: _vm.minWidth,
3859
- filterIcon: _vm.getIcon(items.fixed),
3860
- children: items.children,
3861
- childHead: items.childHead,
3862
- },
3987
+ Object.assign(
3988
+ {},
3989
+ {
3990
+ name: _vm.name,
3991
+ indexs: index,
3992
+ form: _vm.form,
3993
+ optionData: _vm.optionDatas,
3994
+ },
3995
+ item
3996
+ ),
3863
3997
  false
3864
3998
  ),
3865
3999
  {
@@ -3973,16 +4107,16 @@ var mainvue_type_template_id_1d557e20_render = function () {
3973
4107
  )
3974
4108
  }
3975
4109
  var staticRenderFns = []
3976
- mainvue_type_template_id_1d557e20_render._withStripped = true
4110
+ mainvue_type_template_id_2d512d7f_render._withStripped = true
3977
4111
 
3978
4112
 
3979
- // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=1d557e20&
4113
+ // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=2d512d7f&
3980
4114
 
3981
4115
  // EXTERNAL MODULE: ./src/config/api.js
3982
4116
  var api = __webpack_require__(1);
3983
4117
 
3984
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/children.vue?vue&type=template&id=796433ee&
3985
- var childrenvue_type_template_id_796433ee_render = function () {
4118
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/children.vue?vue&type=template&id=29bcbc72&
4119
+ var childrenvue_type_template_id_29bcbc72_render = function () {
3986
4120
  var _vm = this
3987
4121
  var _h = _vm.$createElement
3988
4122
  var _c = _vm._self._c || _h
@@ -3990,7 +4124,7 @@ var childrenvue_type_template_id_796433ee_render = function () {
3990
4124
  "column",
3991
4125
  _vm._g(_vm._b({}, "column", _vm.$attrs, false), _vm.$listeners),
3992
4126
  [
3993
- _vm.childrens && _vm.childrens.length
4127
+ _vm.childrens.length
3994
4128
  ? [
3995
4129
  _vm._l(_vm.childrens, function (item, index) {
3996
4130
  return [
@@ -4001,13 +4135,8 @@ var childrenvue_type_template_id_796433ee_render = function () {
4001
4135
  _vm._b(
4002
4136
  { key: index },
4003
4137
  "children",
4004
- Object.assign({}, _vm.$attrs, {
4005
- filterIcon: false,
4006
- item: item,
4007
- width: item.width,
4008
- index: index,
4009
- children: item.children,
4010
- childHead: item.childHead,
4138
+ Object.assign({}, _vm.$attrs, item, {
4139
+ indexs: index,
4011
4140
  }),
4012
4141
  false
4013
4142
  ),
@@ -4023,1181 +4152,703 @@ var childrenvue_type_template_id_796433ee_render = function () {
4023
4152
  2
4024
4153
  )
4025
4154
  }
4026
- var childrenvue_type_template_id_796433ee_staticRenderFns = []
4027
- childrenvue_type_template_id_796433ee_render._withStripped = true
4155
+ var childrenvue_type_template_id_29bcbc72_staticRenderFns = []
4156
+ childrenvue_type_template_id_29bcbc72_render._withStripped = true
4028
4157
 
4029
4158
 
4030
- // CONCATENATED MODULE: ./packages/data-table/src/children.vue?vue&type=template&id=796433ee&
4159
+ // CONCATENATED MODULE: ./packages/data-table/src/children.vue?vue&type=template&id=29bcbc72&
4031
4160
 
4032
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/column.vue?vue&type=template&id=00ff0a77&
4033
- var columnvue_type_template_id_00ff0a77_render = function () {
4161
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/column.vue?vue&type=template&id=cd703de2&
4162
+ var columnvue_type_template_id_cd703de2_render = function () {
4034
4163
  var _vm = this
4035
4164
  var _h = _vm.$createElement
4036
4165
  var _c = _vm._self._c || _h
4037
- return _vm.showTemplate(_vm.item)
4038
- ? _c("el-table-column", {
4039
- directives: [
4040
- {
4041
- name: "show",
4042
- rawName: "v-show",
4043
- value: !_vm.item.hide,
4044
- expression: "!item.hide",
4045
- },
4046
- ],
4047
- attrs: {
4048
- "filter-icon": _vm.filterIcon,
4049
- label: _vm.item.title || _vm.item.label,
4050
- "label-key": _vm.item.labelKey,
4051
- "value-key": _vm.item.valueKey,
4052
- prop: _vm.item.field || _vm.item.prop,
4053
- fixed: _vm.item.fixed,
4054
- sortable: _vm.item.sortable || _vm.item.sort,
4055
- "column-key": _vm.item.columnKey,
4056
- width: _vm.width,
4057
- "min-width": _vm.item.minWidth,
4058
- "render-header": _vm.item.renderHeader,
4059
- "sort-method": _vm.item.sortMethod,
4060
- "sort-by": _vm.item.sortBy,
4061
- "sort-orders": _vm.item.sortOrders,
4062
- resizable: _vm.item.resizable,
4063
- formatter: _vm.item.formatter,
4064
- "show-overflow-tooltip": _vm.item.showOverflowTooltip,
4065
- align: _vm.item.align,
4066
- "header-align": _vm.item.headerAlign,
4067
- "class-name":
4068
- (_vm.item.className
4069
- ? _vm.item.className +
4070
- (_vm.item.type ? " es-table-" + _vm.item.type + "-box" : "")
4071
- : _vm.item.type
4072
- ? "es-table-" + _vm.item.type + "-box"
4073
- : "") + (_vm.item.showOverflowTooltip ? " es-text-ellipsis" : ""),
4074
- "label-class-name": _vm.item.required
4075
- ? "es-required" +
4076
- (_vm.item.labelClassName ? " " + _vm.item.labelClassName : "")
4077
- : _vm.item.labelClassName,
4078
- selectable: _vm.item.selectable,
4079
- "reserve-selection": _vm.item.reserveSelection,
4080
- filters: _vm.item.filters,
4081
- "filter-placement": _vm.item.filterPlacement,
4082
- "filter-multiple": _vm.item.filterMultiple,
4083
- "filter-method": _vm.item.filterMethod,
4084
- "filtered-value": _vm.item.filteredValue,
4085
- colspan: _vm.item.colspan,
4086
- rowspan: _vm.item.rowspan,
4087
- total: _vm.item.total,
4088
- },
4166
+ return _c(
4167
+ "el-table-column",
4168
+ _vm._b(
4169
+ {
4089
4170
  scopedSlots: _vm._u([
4090
4171
  {
4091
4172
  key: "default",
4092
4173
  fn: function (scope) {
4093
4174
  return [
4094
- _vm.form && _vm.item.type !== "handle"
4175
+ _vm.isForm && !_vm.isReadOnly(scope)
4095
4176
  ? [
4096
- _vm.isReadOnly(_vm.item, scope)
4097
- ? [
4098
- _vm.item.render
4099
- ? _c("expand-dom", {
4100
- attrs: {
4101
- column: _vm.item,
4102
- row: scope.row,
4103
- render: _vm.item.render,
4104
- index: _vm.index,
4177
+ _c(
4178
+ "el-form-item",
4179
+ {
4180
+ attrs: {
4181
+ name: _vm.name,
4182
+ prop: _vm.field || _vm.prop,
4183
+ rules: _vm.isNotRule(scope) ? [] : _vm.rules,
4184
+ index: scope.$index,
4185
+ },
4186
+ },
4187
+ [
4188
+ _vm.type === "select"
4189
+ ? _c(
4190
+ "es-select",
4191
+ _vm._b(
4192
+ {
4193
+ on: {
4194
+ blur: function (event) {
4195
+ _vm.handleBlur({
4196
+ item: _vm.config,
4197
+ event: event,
4198
+ data: scope.row,
4199
+ scope: scope,
4200
+ })
4201
+ },
4202
+ focus: function (event) {
4203
+ _vm.handleFocus({
4204
+ item: _vm.config,
4205
+ event: event,
4206
+ data: scope.row,
4207
+ scope: scope,
4208
+ })
4209
+ },
4210
+ change: function (value) {
4211
+ _vm.handleChange({
4212
+ item: _vm.config,
4213
+ name: _vm.field || _vm.prop,
4214
+ value: value,
4215
+ data: scope.row,
4216
+ scope: scope,
4217
+ })
4218
+ },
4219
+ },
4220
+ model: {
4221
+ value: scope.row[_vm.field || _vm.prop],
4222
+ callback: function ($$v) {
4223
+ _vm.$set(
4224
+ scope.row,
4225
+ _vm.field || _vm.prop,
4226
+ $$v
4227
+ )
4228
+ },
4229
+ expression: "scope.row[field || prop]",
4230
+ },
4105
4231
  },
4106
- })
4107
- : [
4108
- _vm._v(
4109
- _vm._s(_vm.format(scope.row, _vm.item))
4110
- ),
4111
- ],
4112
- ]
4113
- : [
4114
- _vm.item.type === "slot"
4115
- ? _c("section", [_vm._t(_vm.item.prop)], 2)
4116
- : _c(
4117
- "el-form-item",
4232
+ "es-select",
4233
+ _vm.formOption,
4234
+ false
4235
+ )
4236
+ )
4237
+ : _vm.type == "cascader"
4238
+ ? _c(
4239
+ "es-cascader",
4240
+ _vm._b(
4241
+ {
4242
+ on: {
4243
+ blur: function (event) {
4244
+ _vm.handleBlur({
4245
+ item: _vm.config,
4246
+ event: event,
4247
+ data: scope.row,
4248
+ scope: scope,
4249
+ })
4250
+ },
4251
+ focus: function (event) {
4252
+ _vm.handleFocus({
4253
+ item: _vm.config,
4254
+ event: event,
4255
+ data: scope.row,
4256
+ scope: scope,
4257
+ })
4258
+ },
4259
+ change: function (value) {
4260
+ _vm.handleChange({
4261
+ item: _vm.config,
4262
+ name: _vm.field || _vm.prop,
4263
+ value: value,
4264
+ data: scope.row,
4265
+ scope: scope,
4266
+ })
4267
+ },
4268
+ },
4269
+ model: {
4270
+ value: scope.row[_vm.field || _vm.prop],
4271
+ callback: function ($$v) {
4272
+ _vm.$set(
4273
+ scope.row,
4274
+ _vm.field || _vm.prop,
4275
+ $$v
4276
+ )
4277
+ },
4278
+ expression: "scope.row[field || prop]",
4279
+ },
4280
+ },
4281
+ "es-cascader",
4282
+ _vm.formOption,
4283
+ false
4284
+ )
4285
+ )
4286
+ : _vm.type === "ganged"
4287
+ ? _c(
4288
+ "es-select-ganged",
4289
+ _vm._b(
4118
4290
  {
4119
4291
  attrs: {
4120
- name: _vm.name,
4121
- prop: _vm.item.field,
4122
- rules: _vm.isNotRule(_vm.item, scope)
4123
- ? []
4124
- : _vm.item.rules,
4125
- index: scope.$index,
4292
+ data: _vm.init(_vm.option, _vm.config),
4293
+ },
4294
+ on: {
4295
+ change: function (value) {
4296
+ _vm.handleChange({
4297
+ name: _vm.field || _vm.prop,
4298
+ value: value,
4299
+ data: scope.row,
4300
+ item: _vm.item,
4301
+ })
4302
+ },
4303
+ },
4304
+ model: {
4305
+ value: scope.row[_vm.field || _vm.prop],
4306
+ callback: function ($$v) {
4307
+ _vm.$set(
4308
+ scope.row,
4309
+ _vm.field || _vm.prop,
4310
+ $$v
4311
+ )
4312
+ },
4313
+ expression: "scope.row[field || prop]",
4126
4314
  },
4127
4315
  },
4128
- [
4129
- _vm.item.type === "select"
4130
- ? _c(
4131
- "es-select",
4132
- _vm._b(
4133
- {
4134
- attrs: {
4135
- ajax: false,
4136
- data: _vm.item.data
4137
- ? _vm.item.data
4138
- : _vm.item.optionData
4139
- ? scope.row[
4140
- _vm.item.optionData
4141
- ]
4142
- : _vm.optionDatas[
4143
- _vm.item.field ||
4144
- _vm.item.prop
4145
- ],
4146
- },
4147
- on: {
4148
- blur: function (event) {
4149
- _vm.handleBlur({
4150
- item: _vm.item,
4151
- event: event,
4152
- data: scope.row,
4153
- scope: scope,
4154
- })
4155
- },
4156
- focus: function (event) {
4157
- _vm.handleFocus({
4158
- item: _vm.item,
4159
- event: event,
4160
- data: scope.row,
4161
- scope: scope,
4162
- })
4163
- },
4164
- change: function (value) {
4165
- _vm.handleChange({
4166
- item: _vm.item,
4167
- name:
4168
- _vm.item.field ||
4169
- _vm.item.prop,
4170
- value: value,
4171
- data: scope.row,
4172
- scope: scope,
4173
- })
4174
- },
4175
- },
4176
- model: {
4177
- value:
4178
- scope.row[_vm.item.field],
4179
- callback: function ($$v) {
4180
- _vm.$set(
4181
- scope.row,
4182
- _vm.item.field,
4183
- $$v
4184
- )
4185
- },
4186
- expression:
4187
- "scope.row[item.field]",
4188
- },
4189
- },
4190
- "es-select",
4191
- _vm.exclAttribute({
4192
- data: _vm.item,
4193
- attrs: "width",
4194
- }),
4195
- false
4196
- )
4316
+ "es-select-ganged",
4317
+ _vm.exclAttribute({
4318
+ data: _vm.config,
4319
+ attrs: ["width", "url", "sysCode"],
4320
+ }),
4321
+ false
4322
+ )
4323
+ )
4324
+ : _vm.type === "radio"
4325
+ ? _c(
4326
+ "es-radio-group",
4327
+ _vm._b(
4328
+ {
4329
+ on: {
4330
+ change: function (value) {
4331
+ _vm.handleChange({
4332
+ item: _vm.config,
4333
+ name: _vm.field || _vm.prop,
4334
+ value: value,
4335
+ data: scope.row,
4336
+ })
4337
+ },
4338
+ },
4339
+ model: {
4340
+ value: scope.row[_vm.field || _vm.prop],
4341
+ callback: function ($$v) {
4342
+ _vm.$set(
4343
+ scope.row,
4344
+ _vm.field || _vm.prop,
4345
+ $$v
4197
4346
  )
4198
- : _vm.item.type == "cascader"
4199
- ? _c(
4200
- "es-cascader",
4201
- _vm._b(
4202
- {
4203
- attrs: {
4204
- data: _vm.item.data
4205
- ? _vm.item.data
4206
- : _vm.item.optionData
4207
- ? scope.row[
4208
- _vm.item.optionData
4209
- ]
4210
- : _vm.optionDatas[
4211
- _vm.item.field ||
4212
- _vm.item.prop
4213
- ],
4214
- },
4215
- on: {
4216
- blur: function (event) {
4217
- _vm.handleBlur({
4218
- item: _vm.item,
4219
- event: event,
4220
- data: scope.row,
4221
- scope: scope,
4222
- })
4223
- },
4224
- focus: function (event) {
4225
- _vm.handleFocus({
4226
- item: _vm.item,
4227
- event: event,
4228
- data: scope.row,
4229
- scope: scope,
4230
- })
4231
- },
4232
- change: function (value) {
4233
- _vm.handleChange({
4234
- item: _vm.item,
4235
- name:
4236
- _vm.item.field ||
4237
- _vm.item.prop,
4238
- value: value,
4239
- data: scope.row,
4240
- scope: scope,
4241
- })
4242
- },
4243
- },
4244
- model: {
4245
- value:
4246
- scope.row[_vm.item.field],
4247
- callback: function ($$v) {
4248
- _vm.$set(
4249
- scope.row,
4250
- _vm.item.field,
4251
- $$v
4252
- )
4253
- },
4254
- expression:
4255
- "scope.row[item.field]",
4256
- },
4257
- },
4258
- "es-cascader",
4259
- _vm.exclAttribute({
4260
- data: _vm.item,
4261
- attrs: "width",
4262
- }),
4263
- false
4264
- )
4347
+ },
4348
+ expression: "scope.row[field || prop]",
4349
+ },
4350
+ },
4351
+ "es-radio-group",
4352
+ _vm.formOption,
4353
+ false
4354
+ )
4355
+ )
4356
+ : _vm.type === "checkbox"
4357
+ ? _c(
4358
+ "es-checkbox-group",
4359
+ _vm._b(
4360
+ {
4361
+ on: {
4362
+ change: function (value) {
4363
+ _vm.handleChange({
4364
+ item: _vm.config,
4365
+ name: _vm.field || _vm.prop,
4366
+ value: value,
4367
+ data: scope.row,
4368
+ })
4369
+ },
4370
+ },
4371
+ model: {
4372
+ value: scope.row[_vm.field || _vm.prop],
4373
+ callback: function ($$v) {
4374
+ _vm.$set(
4375
+ scope.row,
4376
+ _vm.field || _vm.prop,
4377
+ $$v
4265
4378
  )
4266
- : _vm.item.type === "ganged"
4267
- ? _c(
4268
- "es-select-ganged",
4269
- _vm._b(
4270
- {
4271
- attrs: {
4272
- data: _vm.init(
4273
- _vm.item.data
4274
- ? _vm.item.data
4275
- : _vm.item.optionData
4276
- ? scope.row[
4277
- _vm.item.optionData
4278
- ]
4279
- : _vm.optionDatas[
4280
- _vm.item.field ||
4281
- _vm.item.prop
4282
- ],
4283
- scope.row[_vm.item.field],
4284
- _vm.item
4285
- ),
4286
- },
4287
- on: {
4288
- change: function (value) {
4289
- _vm.handleChange({
4290
- name:
4291
- _vm.item.field ||
4292
- _vm.item.prop,
4293
- value: value,
4294
- data: scope.row,
4295
- item: _vm.item,
4296
- })
4297
- },
4298
- },
4299
- model: {
4300
- value:
4301
- scope.row[_vm.item.field],
4302
- callback: function ($$v) {
4303
- _vm.$set(
4304
- scope.row,
4305
- _vm.item.field,
4306
- $$v
4307
- )
4308
- },
4309
- expression:
4310
- "scope.row[item.field]",
4311
- },
4312
- },
4313
- "es-select-ganged",
4314
- _vm.exclAttribute({
4315
- data: _vm.item,
4316
- attrs: [
4317
- "width",
4318
- "url",
4319
- "sysCode",
4320
- ],
4321
- }),
4322
- false
4323
- )
4379
+ },
4380
+ expression: "scope.row[field || prop]",
4381
+ },
4382
+ },
4383
+ "es-checkbox-group",
4384
+ _vm.formOption,
4385
+ false
4386
+ )
4387
+ )
4388
+ : _vm.type === "switch"
4389
+ ? _c(
4390
+ "es-switch",
4391
+ _vm._b(
4392
+ {
4393
+ on: {
4394
+ change: function (value) {
4395
+ _vm.handleChange({
4396
+ item: _vm.config,
4397
+ name: _vm.field || _vm.prop,
4398
+ value: value,
4399
+ data: scope.row,
4400
+ })
4401
+ },
4402
+ },
4403
+ model: {
4404
+ value: scope.row[_vm.field || _vm.prop],
4405
+ callback: function ($$v) {
4406
+ _vm.$set(
4407
+ scope.row,
4408
+ _vm.field || _vm.prop,
4409
+ $$v
4324
4410
  )
4325
- : _vm.item.type === "radio"
4326
- ? _c(
4327
- "es-radio-group",
4328
- _vm._b(
4329
- {
4330
- attrs: {
4331
- data: _vm.item.data
4332
- ? _vm.item.data
4333
- : _vm.item.optionData
4334
- ? scope.row[
4335
- _vm.item.optionData
4336
- ]
4337
- : _vm.optionDatas[
4338
- _vm.item.field ||
4339
- _vm.item.prop
4340
- ],
4341
- ajax: false,
4342
- },
4343
- on: {
4344
- change: function (value) {
4345
- _vm.handleChange({
4346
- item: _vm.item,
4347
- name:
4348
- _vm.item.field ||
4349
- _vm.item.prop,
4350
- value: value,
4351
- data: scope.row,
4352
- })
4353
- },
4354
- },
4355
- model: {
4356
- value:
4357
- scope.row[_vm.item.field],
4358
- callback: function ($$v) {
4359
- _vm.$set(
4360
- scope.row,
4361
- _vm.item.field,
4362
- $$v
4363
- )
4364
- },
4365
- expression:
4366
- "scope.row[item.field]",
4367
- },
4368
- },
4369
- "es-radio-group",
4370
- _vm.exclAttribute({
4371
- data: _vm.item,
4372
- attrs: "width",
4373
- }),
4374
- false
4375
- )
4411
+ },
4412
+ expression: "scope.row[field || prop]",
4413
+ },
4414
+ },
4415
+ "es-switch",
4416
+ _vm.formOption,
4417
+ false
4418
+ )
4419
+ )
4420
+ : _vm.config.date ||
4421
+ _vm.type == "date" ||
4422
+ _vm.type == "year" ||
4423
+ _vm.type == "month" ||
4424
+ _vm.type == "date" ||
4425
+ _vm.type == "dates" ||
4426
+ _vm.type == "week" ||
4427
+ _vm.type == "datetime" ||
4428
+ _vm.type == "datetimerange" ||
4429
+ _vm.type == "daterange" ||
4430
+ _vm.type == "monthrange" ||
4431
+ _vm.type == "quarter" ||
4432
+ _vm.type == "halfyear"
4433
+ ? _c(
4434
+ "es-date-picker",
4435
+ _vm._b(
4436
+ {
4437
+ on: {
4438
+ blur: function (event) {
4439
+ _vm.handleBlur({
4440
+ item: _vm.config,
4441
+ event: event,
4442
+ data: scope.row,
4443
+ scope: scope,
4444
+ })
4445
+ },
4446
+ focus: function (event) {
4447
+ _vm.handleFocus({
4448
+ item: _vm.config,
4449
+ event: event,
4450
+ data: scope.row,
4451
+ scope: scope,
4452
+ })
4453
+ },
4454
+ change: function (value) {
4455
+ _vm.handleChange({
4456
+ item: _vm.config,
4457
+ name: _vm.field || _vm.prop,
4458
+ value: value,
4459
+ data: scope.row,
4460
+ scope: scope,
4461
+ })
4462
+ },
4463
+ },
4464
+ model: {
4465
+ value: scope.row[_vm.field || _vm.prop],
4466
+ callback: function ($$v) {
4467
+ _vm.$set(
4468
+ scope.row,
4469
+ _vm.field || _vm.prop,
4470
+ $$v
4376
4471
  )
4377
- : _vm.item.type === "checkbox"
4378
- ? _c(
4379
- "es-checkbox-group",
4380
- _vm._b(
4381
- {
4382
- attrs: {
4383
- data: _vm.item.data
4384
- ? _vm.item.data
4385
- : _vm.item.optionData
4386
- ? scope.row[
4387
- _vm.item.optionData
4388
- ]
4389
- : _vm.optionDatas[
4390
- _vm.item.field ||
4391
- _vm.item.prop
4392
- ],
4393
- ajax: false,
4394
- },
4395
- on: {
4396
- change: function (value) {
4397
- _vm.handleChange({
4398
- item: _vm.item,
4399
- name:
4400
- _vm.item.field ||
4401
- _vm.item.prop,
4402
- value: value,
4403
- data: scope.row,
4404
- })
4405
- },
4406
- },
4407
- model: {
4408
- value:
4409
- scope.row[_vm.item.field],
4410
- callback: function ($$v) {
4411
- _vm.$set(
4412
- scope.row,
4413
- _vm.item.field,
4414
- $$v
4415
- )
4416
- },
4417
- expression:
4418
- "scope.row[item.field]",
4419
- },
4420
- },
4421
- "es-checkbox-group",
4422
- _vm.exclAttribute({
4423
- data: _vm.item,
4424
- attrs: "width",
4425
- }),
4426
- false
4427
- )
4472
+ },
4473
+ expression: "scope.row[field || prop]",
4474
+ },
4475
+ },
4476
+ "es-date-picker",
4477
+ _vm.formOption,
4478
+ false
4479
+ )
4480
+ )
4481
+ : _vm.type == "number"
4482
+ ? _c(
4483
+ "es-input-number",
4484
+ _vm._b(
4485
+ {
4486
+ on: {
4487
+ blur: function (event) {
4488
+ _vm.handleBlur({
4489
+ item: _vm.config,
4490
+ event: event,
4491
+ data: scope.row,
4492
+ scope: scope,
4493
+ })
4494
+ },
4495
+ focus: function (event) {
4496
+ _vm.handleFocus({
4497
+ item: _vm.config,
4498
+ event: event,
4499
+ data: scope.row,
4500
+ scope: scope,
4501
+ })
4502
+ },
4503
+ change: function (value) {
4504
+ _vm.handleChange({
4505
+ item: _vm.config,
4506
+ name: _vm.field || _vm.prop,
4507
+ value: value,
4508
+ data: scope.row,
4509
+ scope: scope,
4510
+ })
4511
+ },
4512
+ },
4513
+ model: {
4514
+ value: scope.row[_vm.field || _vm.prop],
4515
+ callback: function ($$v) {
4516
+ _vm.$set(
4517
+ scope.row,
4518
+ _vm.field || _vm.prop,
4519
+ $$v
4428
4520
  )
4429
- : _vm.item.type === "switch"
4430
- ? _c(
4431
- "es-switch",
4432
- _vm._b(
4433
- {
4434
- attrs: {
4435
- data: _vm.item.data
4436
- ? _vm.item.data
4437
- : _vm.item.optionData
4438
- ? scope.row[
4439
- _vm.item.optionData
4440
- ]
4441
- : _vm.optionDatas[
4442
- _vm.item.field ||
4443
- _vm.item.prop
4444
- ],
4445
- },
4446
- on: {
4447
- change: function (value) {
4448
- _vm.handleChange({
4449
- item: _vm.item,
4450
- name:
4451
- _vm.item.field ||
4452
- _vm.item.prop,
4453
- value: value,
4454
- data: scope.row,
4455
- })
4456
- },
4457
- },
4458
- model: {
4459
- value:
4460
- scope.row[_vm.item.field],
4461
- callback: function ($$v) {
4462
- _vm.$set(
4463
- scope.row,
4464
- _vm.item.field,
4465
- $$v
4466
- )
4467
- },
4468
- expression:
4469
- "scope.row[item.field]",
4470
- },
4471
- },
4472
- "es-switch",
4473
- _vm.exclAttribute({
4474
- data: _vm.item,
4475
- attrs: "width",
4476
- }),
4477
- false
4521
+ },
4522
+ expression: "scope.row[field || prop]",
4523
+ },
4524
+ },
4525
+ "es-input-number",
4526
+ _vm.formOption,
4527
+ false
4528
+ )
4529
+ )
4530
+ : _vm.type == "selector"
4531
+ ? _c(
4532
+ "es-selector",
4533
+ _vm._g(
4534
+ _vm._b(
4535
+ {
4536
+ on: {
4537
+ change: function (value) {
4538
+ _vm.handleChange({
4539
+ item: _vm.config,
4540
+ name: _vm.field || _vm.prop,
4541
+ value: value,
4542
+ data: scope.row,
4543
+ })
4544
+ },
4545
+ },
4546
+ model: {
4547
+ value: scope.row[_vm.field || _vm.prop],
4548
+ callback: function ($$v) {
4549
+ _vm.$set(
4550
+ scope.row,
4551
+ _vm.field || _vm.prop,
4552
+ $$v
4478
4553
  )
4479
- )
4480
- : _vm.item.date ||
4481
- _vm.item.type == "date" ||
4482
- _vm.item.type == "year" ||
4483
- _vm.item.type == "month" ||
4484
- _vm.item.type == "date" ||
4485
- _vm.item.type == "dates" ||
4486
- _vm.item.type == "week" ||
4487
- _vm.item.type == "datetime" ||
4488
- _vm.item.type == "datetimerange" ||
4489
- _vm.item.type == "daterange" ||
4490
- _vm.item.type == "monthrange" ||
4491
- _vm.item.type == "quarter" ||
4492
- _vm.item.type == "halfyear"
4493
- ? _c(
4494
- "es-date-picker",
4495
- _vm._b(
4496
- {
4497
- on: {
4498
- blur: function (event) {
4499
- _vm.handleBlur({
4500
- item: _vm.item,
4501
- event: event,
4502
- data: scope.row,
4503
- scope: scope,
4504
- })
4505
- },
4506
- focus: function (event) {
4507
- _vm.handleFocus({
4508
- item: _vm.item,
4509
- event: event,
4510
- data: scope.row,
4511
- scope: scope,
4512
- })
4513
- },
4514
- change: function (value) {
4515
- _vm.handleChange({
4516
- item: _vm.item,
4517
- name:
4518
- _vm.item.field ||
4519
- _vm.item.prop,
4520
- value: value,
4521
- data: scope.row,
4522
- scope: scope,
4523
- })
4524
- },
4525
- },
4526
- model: {
4527
- value:
4528
- scope.row[_vm.item.field],
4529
- callback: function ($$v) {
4530
- _vm.$set(
4531
- scope.row,
4532
- _vm.item.field,
4533
- $$v
4534
- )
4535
- },
4536
- expression:
4537
- "scope.row[item.field]",
4538
- },
4539
- },
4540
- "es-date-picker",
4541
- _vm.exclAttribute({
4542
- data: _vm.item,
4543
- attrs: "width",
4544
- }),
4545
- false
4546
- )
4547
- )
4548
- : _vm.item.type == "number"
4549
- ? _c(
4550
- "es-input-number",
4551
- _vm._b(
4552
- {
4553
- on: {
4554
- blur: function (event) {
4555
- _vm.handleBlur({
4556
- item: _vm.item,
4557
- event: event,
4558
- data: scope.row,
4559
- scope: scope,
4560
- })
4561
- },
4562
- focus: function (event) {
4563
- _vm.handleFocus({
4564
- item: _vm.item,
4565
- event: event,
4566
- data: scope.row,
4567
- scope: scope,
4568
- })
4569
- },
4570
- change: function (value) {
4571
- _vm.handleChange({
4572
- item: _vm.item,
4573
- name:
4574
- _vm.item.field ||
4575
- _vm.item.prop,
4576
- value: value,
4577
- data: scope.row,
4578
- scope: scope,
4579
- })
4580
- },
4581
- },
4582
- model: {
4583
- value:
4584
- scope.row[_vm.item.field],
4585
- callback: function ($$v) {
4586
- _vm.$set(
4587
- scope.row,
4588
- _vm.item.field,
4589
- $$v
4590
- )
4591
- },
4592
- expression:
4593
- "scope.row[item.field]",
4594
- },
4595
- },
4596
- "es-input-number",
4597
- _vm.exclAttribute({
4598
- data: _vm.item,
4599
- attrs: "width",
4600
- }),
4601
- false
4602
- )
4603
- )
4604
- : _vm.item.type == "selector"
4605
- ? _c(
4606
- "es-selector",
4607
- _vm._g(
4554
+ },
4555
+ expression: "scope.row[field || prop]",
4556
+ },
4557
+ },
4558
+ "es-selector",
4559
+ _vm.formOption,
4560
+ false
4561
+ ),
4562
+ _vm.exclAttribute({
4563
+ data: _vm.events,
4564
+ attrs: "change",
4565
+ })
4566
+ )
4567
+ )
4568
+ : _vm.type === "text" || _vm.type === "textarea"
4569
+ ? [
4570
+ _vm.config.lazy
4571
+ ? [
4572
+ _vm.type === "text"
4573
+ ? _c(
4574
+ "input",
4608
4575
  _vm._b(
4609
4576
  {
4577
+ directives: [
4578
+ {
4579
+ name: "model",
4580
+ rawName: "v-model.lazy",
4581
+ value: scope.row[_vm.field],
4582
+ expression:
4583
+ "scope.row[field]",
4584
+ modifiers: { lazy: true },
4585
+ },
4586
+ ],
4587
+ staticClass: "el-input__inner",
4588
+ domProps: {
4589
+ value: scope.row[_vm.field],
4590
+ },
4610
4591
  on: {
4611
- change: function (value) {
4612
- _vm.handleChange({
4613
- item: _vm.item,
4614
- name:
4615
- _vm.item.field ||
4616
- _vm.item.prop,
4617
- value: value,
4592
+ blur: function (event) {
4593
+ _vm.handleBlur({
4594
+ item: _vm.config,
4595
+ event: event,
4618
4596
  data: scope.row,
4597
+ scope: scope,
4619
4598
  })
4620
4599
  },
4621
- },
4622
- model: {
4623
- value:
4624
- scope.row[_vm.item.field],
4625
- callback: function ($$v) {
4626
- _vm.$set(
4627
- scope.row,
4628
- _vm.item.field,
4629
- $$v
4630
- )
4600
+ focus: function (event) {
4601
+ _vm.handleFocus({
4602
+ item: _vm.config,
4603
+ event: event,
4604
+ data: scope.row,
4605
+ scope: scope,
4606
+ })
4631
4607
  },
4632
- expression:
4633
- "scope.row[item.field]",
4608
+ change: [
4609
+ function ($event) {
4610
+ _vm.$set(
4611
+ scope.row,
4612
+ _vm.field,
4613
+ $event.target.value
4614
+ )
4615
+ },
4616
+ function (value) {
4617
+ _vm.handleChange({
4618
+ item: _vm.config,
4619
+ name:
4620
+ _vm.field || _vm.prop,
4621
+ value: value,
4622
+ data: scope.row,
4623
+ scope: scope,
4624
+ })
4625
+ },
4626
+ ],
4634
4627
  },
4635
4628
  },
4636
- "es-selector",
4637
- _vm.exclAttribute({
4638
- data: _vm.item,
4639
- attrs: "width",
4640
- }),
4629
+ "input",
4630
+ _vm.formOption,
4641
4631
  false
4642
- ),
4643
- _vm.exclAttribute({
4644
- data: _vm.item.events,
4645
- attrs: "change",
4646
- })
4632
+ )
4647
4633
  )
4648
- )
4649
- : _vm.item.type === "text" ||
4650
- _vm.item.type === "textarea"
4651
- ? [
4652
- _vm.item.lazy
4653
- ? [
4654
- _vm.item.type === "text"
4655
- ? _c(
4656
- "input",
4657
- _vm._b(
4658
- {
4659
- directives: [
4660
- {
4661
- name: "model",
4662
- rawName:
4663
- "v-model.lazy",
4664
- value:
4665
- scope.row[
4666
- _vm.item.field
4667
- ],
4668
- expression:
4669
- "scope.row[item.field]",
4670
- modifiers: {
4671
- lazy: true,
4672
- },
4673
- },
4674
- ],
4675
- staticClass:
4676
- "el-input__inner",
4677
- domProps: {
4678
- value:
4679
- scope.row[
4680
- _vm.item.field
4681
- ],
4682
- },
4683
- on: {
4684
- blur: function (
4685
- event
4686
- ) {
4687
- _vm.handleBlur({
4688
- item: _vm.item,
4689
- event: event,
4690
- data: scope.row,
4691
- scope: scope,
4692
- })
4693
- },
4694
- focus: function (
4695
- event
4696
- ) {
4697
- _vm.handleFocus({
4698
- item: _vm.item,
4699
- event: event,
4700
- data: scope.row,
4701
- scope: scope,
4702
- })
4703
- },
4704
- change: [
4705
- function (
4706
- $event
4707
- ) {
4708
- _vm.$set(
4709
- scope.row,
4710
- _vm.item
4711
- .field,
4712
- $event.target
4713
- .value
4714
- )
4715
- },
4716
- function (value) {
4717
- _vm.handleChange(
4718
- {
4719
- item: _vm.item,
4720
- name:
4721
- _vm.item
4722
- .field ||
4723
- _vm.item
4724
- .prop,
4725
- value:
4726
- value,
4727
- data: scope.row,
4728
- scope:
4729
- scope,
4730
- }
4731
- )
4732
- },
4733
- ],
4734
- },
4735
- },
4736
- "input",
4737
- _vm.exclAttribute({
4738
- data: _vm.item,
4739
- attrs: "width",
4740
- }),
4741
- false
4742
- )
4743
- )
4744
- : _c(
4745
- "textarea",
4746
- _vm._b(
4747
- {
4748
- directives: [
4749
- {
4750
- name: "model",
4751
- rawName:
4752
- "v-model.lazy",
4753
- value:
4754
- scope.row[
4755
- _vm.item.field
4756
- ],
4757
- expression:
4758
- "scope.row[item.field]",
4759
- modifiers: {
4760
- lazy: true,
4761
- },
4762
- },
4763
- ],
4764
- staticClass:
4765
- "el-textarea__inner",
4766
- domProps: {
4767
- value:
4768
- scope.row[
4769
- _vm.item.field
4770
- ],
4771
- },
4772
- on: {
4773
- blur: function (
4774
- event
4775
- ) {
4776
- _vm.handleBlur({
4777
- item: _vm.item,
4778
- event: event,
4779
- data: scope.row,
4780
- scope: scope,
4781
- })
4782
- },
4783
- focus: function (
4784
- event
4785
- ) {
4786
- _vm.handleFocus({
4787
- item: _vm.item,
4788
- event: event,
4789
- data: scope.row,
4790
- scope: scope,
4791
- })
4792
- },
4793
- change: [
4794
- function (
4795
- $event
4796
- ) {
4797
- _vm.$set(
4798
- scope.row,
4799
- _vm.item
4800
- .field,
4801
- $event.target
4802
- .value
4803
- )
4804
- },
4805
- function (value) {
4806
- _vm.handleChange(
4807
- {
4808
- item: _vm.item,
4809
- name:
4810
- _vm.item
4811
- .field ||
4812
- _vm.item
4813
- .prop,
4814
- value:
4815
- value,
4816
- data: scope.row,
4817
- scope:
4818
- scope,
4819
- }
4820
- )
4821
- },
4822
- ],
4823
- },
4824
- },
4825
- "textarea",
4826
- _vm.exclAttribute({
4827
- data: _vm.item,
4828
- attrs: "width",
4829
- }),
4830
- false
4831
- )
4832
- ),
4833
- ]
4834
- : _c(
4835
- "es-input",
4836
- _vm._b(
4634
+ : _c(
4635
+ "textarea",
4636
+ _vm._b(
4637
+ {
4638
+ directives: [
4837
4639
  {
4838
- attrs: { scope: scope },
4839
- on: {
4840
- blur: function (event) {
4841
- _vm.handleBlur({
4842
- item: _vm.item,
4843
- event: event,
4844
- data: scope.row,
4845
- scope: scope,
4846
- })
4847
- },
4848
- focus: function (event) {
4849
- _vm.handleFocus({
4850
- item: _vm.item,
4851
- event: event,
4852
- data: scope.row,
4853
- scope: scope,
4854
- })
4855
- },
4856
- change: function (value) {
4857
- _vm.handleChange({
4858
- item: _vm.item,
4859
- name:
4860
- _vm.item.field ||
4861
- _vm.item.prop,
4862
- value: value,
4863
- data: scope.row,
4864
- scope: scope,
4865
- })
4866
- },
4867
- },
4868
- model: {
4869
- value:
4870
- scope.row[
4871
- _vm.item.field
4872
- ],
4873
- callback: function ($$v) {
4874
- _vm.$set(
4875
- scope.row,
4876
- _vm.item.field,
4877
- $$v
4878
- )
4879
- },
4880
- expression:
4881
- "scope.row[item.field]",
4882
- },
4640
+ name: "model",
4641
+ rawName: "v-model.lazy",
4642
+ value: scope.row[_vm.field],
4643
+ expression:
4644
+ "scope.row[field]",
4645
+ modifiers: { lazy: true },
4883
4646
  },
4884
- "es-input",
4885
- _vm.exclAttribute({
4886
- data: _vm.item,
4887
- attrs: "width",
4888
- }),
4889
- false
4890
- )
4891
- ),
4892
- ]
4893
- : _vm._e(),
4894
- ],
4895
- 2
4896
- ),
4897
- ],
4898
- ]
4899
- : _vm._e(),
4900
- _vm.item.type === "handle" && !scope.row.hideHandle
4901
- ? _c(
4902
- "es-button-group",
4903
- _vm._b(
4904
- {
4905
- attrs: {
4906
- stop: "",
4907
- contents: _vm.item.contents || _vm.item.events,
4908
- data: scope.row,
4909
- },
4910
- on: { handleClick: _vm.handleClick },
4911
- model: {
4912
- value: _vm.width,
4913
- callback: function ($$v) {
4914
- _vm.width = $$v
4915
- },
4916
- expression: "width",
4917
- },
4918
- },
4919
- "es-button-group",
4920
- _vm.exclAttribute({
4921
- data: _vm.item,
4922
- attrs: [
4923
- "contents",
4924
- "events",
4925
- "type",
4926
- "width",
4927
- "template",
4928
- "title",
4929
- ],
4930
- }),
4931
- false
4932
- )
4933
- )
4934
- : _vm._e(),
4935
- ]
4936
- },
4937
- },
4938
- ]),
4939
- })
4940
- : _c(
4941
- "el-table-column",
4942
- {
4943
- directives: [
4944
- {
4945
- name: "show",
4946
- rawName: "v-show",
4947
- value: !_vm.item.hide,
4948
- expression: "!item.hide",
4949
- },
4950
- ],
4951
- key: _vm.index,
4952
- attrs: {
4953
- "filter-icon": _vm.filterIcon,
4954
- label: _vm.item.title || _vm.item.label,
4955
- "label-key": _vm.item.labelKey,
4956
- "value-key": _vm.item.valueKey,
4957
- prop: _vm.item.field || _vm.item.prop,
4958
- fixed: _vm.item.fixed,
4959
- sortable: _vm.item.sortable || _vm.item.sort,
4960
- index: _vm.item.index,
4961
- "column-key": _vm.item.columnKey,
4962
- width: _vm.item.width,
4963
- "min-width": _vm.item.minWidth,
4964
- "render-header": _vm.item.renderHeader,
4965
- "sort-method": _vm.item.sortMethod,
4966
- "sort-by": _vm.item.sortBy,
4967
- "sort-orders": _vm.item.sortOrders,
4968
- resizable: _vm.item.resizable,
4969
- formatter: _vm.item.formatter,
4970
- "show-overflow-tooltip": _vm.item.showOverflowTooltip,
4971
- align: _vm.item.align,
4972
- "header-align": _vm.item.headerAlign,
4973
- "class-name": _vm.item.className,
4974
- "label-class-name": _vm.item.labelClassName,
4975
- selectable: _vm.item.selectable,
4976
- "reserve-selection": _vm.item.reserveSelection,
4977
- filters: _vm.item.filters,
4978
- "filter-placement": _vm.item.filterPlacement,
4979
- "filter-multiple": _vm.item.filterMultiple,
4980
- "filter-method": _vm.item.filterMethod,
4981
- "filtered-value": _vm.item.filteredValue,
4982
- colspan: _vm.item.colspan,
4983
- rowspan: _vm.item.rowspan,
4984
- total: _vm.item.total,
4985
- },
4986
- scopedSlots: _vm._u([
4987
- {
4988
- key: "default",
4989
- fn: function (scope) {
4990
- return [
4991
- _vm.item.render
4992
- ? _c("expand-dom", {
4993
- attrs: {
4994
- column: _vm.item,
4995
- row: scope.row,
4996
- render: _vm.item.render,
4997
- index: _vm.index,
4998
- },
4999
- })
5000
- : [
5001
- _vm._v(
5002
- _vm._s(
5003
- _vm.item.formatDate
5004
- ? _vm.formatDate(
5005
- scope.row[_vm.item.field || _vm.item.prop],
5006
- _vm.item.formatDate
5007
- )
5008
- : _vm.format(scope.row, _vm.item)
5009
- )
5010
- ),
5011
- ],
5012
- ]
5013
- },
5014
- },
5015
- ]),
5016
- },
5017
- [_vm._t("default")],
5018
- 2
5019
- )
5020
- }
5021
- var columnvue_type_template_id_00ff0a77_staticRenderFns = []
5022
- columnvue_type_template_id_00ff0a77_render._withStripped = true
5023
-
5024
-
5025
- // CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=00ff0a77&
5026
-
5027
- // EXTERNAL MODULE: external "babel-runtime/regenerator"
5028
- var regenerator_ = __webpack_require__(12);
5029
- var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator_);
5030
-
5031
- // CONCATENATED MODULE: ./packages/data-table/src/mixins/table.js
5032
- /* harmony default export */ var table = ({
5033
- methods: {
5034
- showTemplate: function showTemplate(item) {
5035
- if (item.type) {
5036
- item.type.toLowerCase();
5037
- }
5038
- return this.form && ['text', 'textarea', 'checkbox', 'radio', 'select', 'handle', 'date', 'year', 'month', 'date', 'dates', 'week', 'datetime', 'datetimerange', 'daterange', 'monthrange', 'quarter', 'halfyear', 'switch', 'selector', 'ganged', 'number'].indexOf(item.type) > -1 || ['space', 'slot', 'handle', 'template'].indexOf(item.type) > -1;
5039
- }
5040
- }
5041
- });
5042
- // EXTERNAL MODULE: ./src/utils/util.js
5043
- var util = __webpack_require__(0);
5044
-
5045
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/column.vue?vue&type=script&lang=js&
5046
-
5047
-
5048
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
5049
-
5050
- //
5051
- //
5052
- //
5053
- //
5054
- //
5055
- //
5056
- //
5057
- //
5058
- //
5059
- //
5060
- //
5061
- //
5062
- //
5063
- //
5064
- //
5065
- //
5066
- //
5067
- //
5068
- //
5069
- //
5070
- //
5071
- //
5072
- //
5073
- //
5074
- //
5075
- //
5076
- //
5077
- //
5078
- //
5079
- //
5080
- //
5081
- //
5082
- //
5083
- //
5084
- //
5085
- //
5086
- //
5087
- //
5088
- //
5089
- //
5090
- //
5091
- //
5092
- //
5093
- //
5094
- //
5095
- //
5096
- //
5097
- //
5098
- //
5099
- //
5100
- //
5101
- //
5102
- //
5103
- //
5104
- //
5105
- //
5106
- //
5107
- //
5108
- //
5109
- //
5110
- //
5111
- //
5112
- //
5113
- //
5114
- //
5115
- //
5116
- //
5117
- //
5118
- //
5119
- //
5120
- //
5121
- //
5122
- //
5123
- //
5124
- //
5125
- //
5126
- //
5127
- //
5128
- //
5129
- //
5130
- //
5131
- //
5132
- //
5133
- //
5134
- //
5135
- //
5136
- //
5137
- //
5138
- //
5139
- //
5140
- //
5141
- //
5142
- //
5143
- //
5144
- //
5145
- //
5146
- //
5147
- //
5148
- //
5149
- //
5150
- //
5151
- //
5152
- //
5153
- //
5154
- //
5155
- //
5156
- //
5157
- //
5158
- //
5159
- //
5160
- //
5161
- //
5162
- //
5163
- //
5164
- //
5165
- //
5166
- //
5167
- //
5168
- //
5169
- //
5170
- //
5171
- //
5172
- //
5173
- //
5174
- //
5175
- //
5176
- //
5177
- //
5178
- //
5179
- //
5180
- //
5181
- //
5182
- //
5183
- //
5184
- //
5185
- //
5186
- //
5187
- //
5188
- //
5189
- //
5190
- //
5191
- //
5192
- //
5193
- //
5194
- //
5195
- //
5196
- //
5197
- //
5198
- //
5199
- //
5200
- //
4647
+ ],
4648
+ staticClass:
4649
+ "el-textarea__inner",
4650
+ domProps: {
4651
+ value: scope.row[_vm.field],
4652
+ },
4653
+ on: {
4654
+ blur: function (event) {
4655
+ _vm.handleBlur({
4656
+ item: _vm.config,
4657
+ event: event,
4658
+ data: scope.row,
4659
+ scope: scope,
4660
+ })
4661
+ },
4662
+ focus: function (event) {
4663
+ _vm.handleFocus({
4664
+ item: _vm.config,
4665
+ event: event,
4666
+ data: scope.row,
4667
+ scope: scope,
4668
+ })
4669
+ },
4670
+ change: [
4671
+ function ($event) {
4672
+ _vm.$set(
4673
+ scope.row,
4674
+ _vm.field,
4675
+ $event.target.value
4676
+ )
4677
+ },
4678
+ function (value) {
4679
+ _vm.handleChange({
4680
+ item: _vm.config,
4681
+ name:
4682
+ _vm.field || _vm.prop,
4683
+ value: value,
4684
+ data: scope.row,
4685
+ scope: scope,
4686
+ })
4687
+ },
4688
+ ],
4689
+ },
4690
+ },
4691
+ "textarea",
4692
+ _vm.formOption,
4693
+ false
4694
+ )
4695
+ ),
4696
+ ]
4697
+ : _c(
4698
+ "es-input",
4699
+ _vm._b(
4700
+ {
4701
+ attrs: { scope: scope },
4702
+ on: {
4703
+ blur: function (event) {
4704
+ _vm.handleBlur({
4705
+ item: _vm.config,
4706
+ event: event,
4707
+ data: scope.row,
4708
+ scope: scope,
4709
+ })
4710
+ },
4711
+ focus: function (event) {
4712
+ _vm.handleFocus({
4713
+ item: _vm.config,
4714
+ event: event,
4715
+ data: scope.row,
4716
+ scope: scope,
4717
+ })
4718
+ },
4719
+ change: function (value) {
4720
+ _vm.handleChange({
4721
+ item: _vm.config,
4722
+ name: _vm.field || _vm.prop,
4723
+ value: value,
4724
+ data: scope.row,
4725
+ scope: scope,
4726
+ })
4727
+ },
4728
+ },
4729
+ model: {
4730
+ value:
4731
+ scope.row[_vm.field || _vm.prop],
4732
+ callback: function ($$v) {
4733
+ _vm.$set(
4734
+ scope.row,
4735
+ _vm.field || _vm.prop,
4736
+ $$v
4737
+ )
4738
+ },
4739
+ expression:
4740
+ "scope.row[field || prop]",
4741
+ },
4742
+ },
4743
+ "es-input",
4744
+ _vm.formOption,
4745
+ false
4746
+ )
4747
+ ),
4748
+ ]
4749
+ : _vm._e(),
4750
+ ],
4751
+ 2
4752
+ ),
4753
+ ]
4754
+ : _vm.type === "handle" && !scope.row.hideHandle
4755
+ ? _c(
4756
+ "es-button-group",
4757
+ _vm._b(
4758
+ {
4759
+ attrs: {
4760
+ stop: "",
4761
+ contents: _vm.contents || _vm.events,
4762
+ data: scope.row,
4763
+ },
4764
+ on: { handleClick: _vm.handleClick },
4765
+ model: {
4766
+ value: _vm.btnWidth,
4767
+ callback: function ($$v) {
4768
+ _vm.btnWidth = $$v
4769
+ },
4770
+ expression: "btnWidth",
4771
+ },
4772
+ },
4773
+ "es-button-group",
4774
+ _vm.exclAttribute({
4775
+ data: _vm.config,
4776
+ attrs: [
4777
+ "contents",
4778
+ "events",
4779
+ "type",
4780
+ "width",
4781
+ "template",
4782
+ "title",
4783
+ ],
4784
+ }),
4785
+ false
4786
+ )
4787
+ )
4788
+ : _vm.render
4789
+ ? _c("expand-dom", {
4790
+ attrs: {
4791
+ column: _vm.config,
4792
+ row: scope.row,
4793
+ render: _vm.render,
4794
+ index: _vm.indexs,
4795
+ },
4796
+ })
4797
+ : _vm.dateFormat
4798
+ ? [
4799
+ _vm._v(
4800
+ "\n " +
4801
+ _vm._s(
4802
+ _vm.formatDate(
4803
+ scope.row[_vm.field || _vm.prop],
4804
+ _vm.dateFormat
4805
+ )
4806
+ ) +
4807
+ "\n "
4808
+ ),
4809
+ ]
4810
+ : _c(
4811
+ "span",
4812
+ {
4813
+ style: _vm.styles
4814
+ ? _vm.styles[scope.row[_vm.prop]]
4815
+ : {},
4816
+ },
4817
+ [_vm._v(_vm._s(_vm.format(scope.row)))]
4818
+ ),
4819
+ ]
4820
+ },
4821
+ },
4822
+ ]),
4823
+ },
4824
+ "el-table-column",
4825
+ _vm.config,
4826
+ false
4827
+ ),
4828
+ [_vm._t("default")],
4829
+ 2
4830
+ )
4831
+ }
4832
+ var columnvue_type_template_id_cd703de2_staticRenderFns = []
4833
+ columnvue_type_template_id_cd703de2_render._withStripped = true
4834
+
4835
+
4836
+ // CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=cd703de2&
4837
+
4838
+ // EXTERNAL MODULE: external "babel-runtime/regenerator"
4839
+ var regenerator_ = __webpack_require__(12);
4840
+ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator_);
4841
+
4842
+ // EXTERNAL MODULE: ./src/utils/util.js
4843
+ var util = __webpack_require__(0);
4844
+
4845
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/column.vue?vue&type=script&lang=js&
4846
+
4847
+
4848
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
4849
+
4850
+ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
4851
+
5201
4852
  //
5202
4853
  //
5203
4854
  //
@@ -5607,7 +5258,6 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5607
5258
 
5608
5259
 
5609
5260
 
5610
-
5611
5261
  /* harmony default export */ var columnvue_type_script_lang_js_ = ({
5612
5262
  name: 'Column',
5613
5263
  components: {
@@ -5647,38 +5297,52 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5647
5297
  },
5648
5298
  tableReload: {
5649
5299
  default: ''
5300
+ },
5301
+ table: {
5302
+ default: ''
5650
5303
  }
5651
5304
  },
5652
- mixins: [table],
5653
5305
  props: {
5306
+ form: Boolean,
5654
5307
  readonly: Boolean,
5655
5308
  name: String,
5656
5309
  filterIcon: [Boolean, String],
5657
- item: {
5658
- type: Object,
5659
- default: function _default() {
5660
- return {};
5661
- }
5662
- },
5663
- index: {
5310
+ title: String,
5311
+ label: String,
5312
+ labelKey: String,
5313
+ valueKey: String,
5314
+ field: String,
5315
+ prop: String,
5316
+ sortable: [Boolean, String],
5317
+ sort: [Boolean, String],
5318
+ className: String,
5319
+ labelClassName: String,
5320
+ type: String,
5321
+ required: Boolean,
5322
+ width: String,
5323
+ minWidth: String,
5324
+ hide: Boolean,
5325
+ showOverflowTooltip: Boolean,
5326
+ render: [Function, String],
5327
+ contents: Array,
5328
+ events: [Array, Object],
5329
+ dateFormat: String,
5330
+ styles: [Array, Object],
5331
+ sysCode: String,
5332
+ valueToString: Boolean,
5333
+ symbol: String,
5334
+ rules: [Array, Object],
5335
+ method: String,
5336
+ indexs: {
5664
5337
  type: Number,
5665
5338
  default: null
5666
5339
  },
5667
- minWidth: {
5668
- type: String,
5669
- default: function _default() {
5670
- return this.form ? '180px' : undefined;
5671
- }
5672
- },
5340
+ data: Object,
5673
5341
  optionData: {
5674
5342
  type: Object,
5675
5343
  default: function _default() {
5676
5344
  return {};
5677
5345
  }
5678
- },
5679
- form: {
5680
- type: Boolean,
5681
- default: false
5682
5346
  }
5683
5347
  },
5684
5348
  watch: {
@@ -5687,12 +5351,68 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5687
5351
  handler: function handler(val) {
5688
5352
  this.optionDatas = val;
5689
5353
  }
5354
+ },
5355
+ width: {
5356
+ immediate: true,
5357
+ handler: function handler(val) {
5358
+ if (val) {
5359
+ this.btnWidth = parseInt(val, 10) + 'px';
5360
+ }
5361
+ }
5362
+ }
5363
+ },
5364
+ computed: {
5365
+ config: function config() {
5366
+ var config = {
5367
+ label: this.label || this.title,
5368
+ width: this.btnWidth || this.width
5369
+ };
5370
+
5371
+ if (this.type === 'expand') {
5372
+ config = _extends({ type: this.type }, config, this.$attrs);
5373
+ return config;
5374
+ }
5375
+ var minWidth = this.label || this.title ? (this.label || this.title).length * 14 + 20 : this.width ? '' : '180px';
5376
+ config = _extends({}, config, {
5377
+ filterIcon: this.icon,
5378
+ sortable: this.sortable || this.sort,
5379
+ minWidth: this.minWidth || this.table.minWidth || minWidth,
5380
+ className: [this.className ? this.className : '', this.type ? ' es-table-' + this.type + '-box' : '', this.showOverflowTooltip ? ' es-text-ellipsis' : ''].join(' '),
5381
+ labelClassName: [this.labelClassName ? this.labelClassName : '', this.required ? 'es-required' : ''].join(' '),
5382
+ prop: this.field || this.prop,
5383
+ field: this.field
5384
+ }, this.$attrs);
5385
+ return config;
5386
+ },
5387
+ formOption: function formOption() {
5388
+ return _extends({
5389
+ labelKey: this.sysCode ? 'shortName' : this.labelKey,
5390
+ valueKey: this.sysCode ? 'cciValue' : this.valueKey,
5391
+ rules: this.rules,
5392
+ events: this.events
5393
+ }, this.$attrs, {
5394
+ data: this.option
5395
+ });
5396
+ },
5397
+ icon: function icon() {
5398
+ if (this.filterIcon === true) {
5399
+ return 'es-icon-biao';
5400
+ }
5401
+ return false;
5402
+ },
5403
+ isForm: function isForm() {
5404
+ var type = this.type ? this.type.toLowerCase() : '';
5405
+ var flag = this.form && ['text', 'textarea', 'checkbox', 'radio', 'select', 'handle', 'date', 'year', 'month', 'date', 'dates', 'week', 'datetime', 'datetimerange', 'daterange', 'monthrange', 'quarter', 'halfyear', 'switch', 'selector', 'ganged', 'number'].indexOf(type) > -1 || ['space', 'slot'].indexOf(type) > -1;
5406
+ return flag;
5407
+ },
5408
+ option: function option() {
5409
+ var field = this.field || this.prop;
5410
+ return this.data ? this.data : this.optionDatas[this.sysCode || field];
5690
5411
  }
5691
5412
  },
5692
- computed: {},
5693
5413
  data: function data() {
5694
5414
  return {
5695
- width: Object.prototype.hasOwnProperty.call(this.item, 'width') ? parseInt(this.item.width, 10) + 'px' : undefined,
5415
+ btnWidth: '',
5696
5416
  searchs: [],
5697
5417
  optionDatas: this.optionData
5698
5418
  };
@@ -5705,7 +5425,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5705
5425
 
5706
5426
  if (data && value) {
5707
5427
  if (Array.isArray(value) && value.length) {
5708
- if (item.url || item.sysCode) {
5428
+ if (item.url || this.sysCode) {
5709
5429
  value.forEach(function () {
5710
5430
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee(val, index) {
5711
5431
  var option, lists, v, queryKey, param, i, params;
@@ -5713,7 +5433,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5713
5433
  while (1) {
5714
5434
  switch (_context.prev = _context.next) {
5715
5435
  case 0:
5716
- if (!(val.hasSub == false || _this.searchs.indexOf(val[item.valueKey] || val.value) > -1)) {
5436
+ if (!(val.hasSub == false || _this.searchs.indexOf(val[_this.valueKey] || val.value) > -1)) {
5717
5437
  _context.next = 2;
5718
5438
  break;
5719
5439
  }
@@ -5721,7 +5441,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5721
5441
  return _context.abrupt('return');
5722
5442
 
5723
5443
  case 2:
5724
- _this.searchs.push(val[item.valueKey] || val.value);
5444
+ _this.searchs.push(val[_this.valueKey] || val.value);
5725
5445
 
5726
5446
  if (!(item.ganged && index < item.ganged - 1 || val.hasSub)) {
5727
5447
  _context.next = 14;
@@ -5732,7 +5452,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5732
5452
  lists = [];
5733
5453
 
5734
5454
  if (option) {
5735
- v = val[item.valueKey] || val.value;
5455
+ v = val[_this.valueKey] || val.value;
5736
5456
 
5737
5457
  lists = option.filter(function (list) {
5738
5458
  return list[item.filtrateKey] == v;
@@ -5752,10 +5472,10 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5752
5472
  param[i] = val[queryKey[i]];
5753
5473
  }
5754
5474
  }
5755
- params = util["a" /* default */].extend(true, item.sysCode ? { sysAppCode: item.sysCode } : {}, item.param ? item.param : {}, param);
5475
+ params = util["a" /* default */].extend(true, _this.sysCode ? { sysAppCode: _this.sysCode } : {}, item.param ? item.param : {}, param);
5756
5476
  _context.next = 14;
5757
5477
  return util["a" /* default */].ajax({
5758
- url: item.sysCode ? api["u" /* findSysCode */] : item.url,
5478
+ url: _this.sysCode ? api["u" /* findSysCode */] : item.url,
5759
5479
  method: _this.method,
5760
5480
  params: params,
5761
5481
  data: params
@@ -5800,73 +5520,69 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5800
5520
 
5801
5521
  return util["a" /* default */].exclAttribute({ data: data, attrs: attrs });
5802
5522
  },
5803
- format: function format(rows, col) {
5523
+ format: function format(rows) {
5804
5524
  var _this2 = this;
5805
5525
 
5806
- var field = col.field || col.prop;
5807
- var data = col.data ? col.data : col.optionData ? rows[col.optionData] : this.optionDatas[field];
5526
+ var field = this.field || this.prop;
5527
+ var data = this.option;
5808
5528
  if (util["a" /* default */].isObject(rows[field])) {
5809
- return rows[field][col.labelKey] || rows[field]['name'] || rows[field]['label'] || rows[field]['shortName'];
5529
+ return rows[field][this.labelKey] || rows[field]['name'] || rows[field]['label'] || rows[field]['shortName'];
5810
5530
  } else if (Array.isArray(rows[field])) {
5811
5531
  var vals = rows[field].map(function (item) {
5812
5532
  if (util["a" /* default */].isObject(item)) {
5813
- return item[col.labelKey] || item['name'] || item['label'] || item['shortName'];
5533
+ return item[_this2.labelKey] || item['name'] || item['label'] || item['shortName'];
5814
5534
  } else {
5815
5535
  if (data && data.length && util["a" /* default */].isObject(data[0])) {
5816
- return _this2.getLabel(data, item, col);
5536
+ return _this2.getLabel(data, item);
5817
5537
  }
5818
5538
  return item;
5819
5539
  }
5820
5540
  });
5821
- return vals.join(col.symbol ? col.symbol : '-');
5541
+ return vals.join(this.symbol ? this.symbol : '-');
5822
5542
  } else {
5823
- if (col.valueToString || col['value-to-string']) {
5543
+ if (this.valueToString) {
5824
5544
  var _vals = rows[field].split(',').map(function (item) {
5825
5545
  if (data && data.length && util["a" /* default */].isObject(data[0])) {
5826
- return _this2.getLabel(data, item, col);
5546
+ return _this2.getLabel(data, item);
5827
5547
  }
5828
5548
  return item;
5829
5549
  });
5830
- return _vals.join(col.symbol ? col.symbol : '-');
5550
+ return _vals.join(this.symbol ? this.symbol : '-');
5831
5551
  } else {
5832
5552
  if (data && data.length && util["a" /* default */].isObject(data[0])) {
5833
- return this.getLabel(data, rows[field], col);
5553
+ return this.getLabel(data, rows[field]);
5834
5554
  }
5835
5555
  return rows[field];
5836
5556
  }
5837
5557
  }
5838
5558
  },
5839
- getLabel: function getLabel(obj, val, col) {
5559
+ getLabel: function getLabel(obj, val) {
5840
5560
  for (var i = 0; i < obj.length; i++) {
5841
5561
  var item = obj[i];
5842
- var value = item[col.valueKey || 'cciValue'] || item['value'];
5562
+ var value = item[this.valueKey || 'cciValue'] || item['value'];
5843
5563
  if (value == val) {
5844
- return item[col.labelKey] || item['name'] || item['label'] || item['shortName'];
5564
+ return item[this.labelKey] || item['name'] || item['label'] || item['shortName'];
5845
5565
  } else if (item.children && item.children.length) {
5846
- return this.getLabel(item.children, val, col);
5566
+ return this.getLabel(item.children, val);
5847
5567
  }
5848
5568
  }
5849
5569
  },
5850
- isReadOnly: function isReadOnly(item, scope) {
5851
- return scope.row.canEdit === false || this.readonly || item.editable === false || scope.row.cantEditKey && scope.row.cantEditKey.indexOf(item.field || item.prop) > -1 || item.readonly;
5570
+ isReadOnly: function isReadOnly(scope) {
5571
+ return scope.row.canEdit === false || this.readonly || this.$attrs.editable === false || scope.row.cantEditKey && scope.row.cantEditKey.indexOf(this.field || this.prop) > -1;
5852
5572
  },
5853
- isNotRule: function isNotRule(item, scope) {
5854
- if (scope.row.canRule === false || scope.row.notRules && scope.row.notRules.indexOf(item.field || item.prop) > -1) {
5855
- this.elForm && this.elForm.clearValidate(item.field || item.prop);
5573
+ isNotRule: function isNotRule(scope) {
5574
+ if (scope.row.canRule === false || scope.row.notRules && scope.row.notRules.indexOf(this.field || this.prop) > -1) {
5575
+ this.elForm && this.elForm.clearValidate(this.field || this.prop);
5856
5576
  return true;
5857
5577
  }
5858
5578
  return false;
5859
5579
  },
5860
5580
  handleBlur: function handleBlur(data) {
5861
- var item = data.item;
5862
-
5863
- item.events && item.events.blur && item.events.blur(data);
5581
+ this.events && this.events.blur && this.events.blur(data);
5864
5582
  this.$emit('formBlur', data);
5865
5583
  },
5866
5584
  handleFocus: function handleFocus(data) {
5867
- var item = data.item;
5868
-
5869
- item.events && item.events.focus && item.events.focus(data);
5585
+ this.events && this.events.focus && this.events.focus(data);
5870
5586
  this.$emit('formFocus', data);
5871
5587
  },
5872
5588
  handleChange: function handleChange(data) {
@@ -5874,16 +5590,16 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5874
5590
 
5875
5591
  var item = data.item;
5876
5592
 
5877
- if (item && item.type == 'ganged') {
5593
+ if (item && this.type == 'ganged') {
5878
5594
  var _data$value = data.value,
5879
5595
  index = _data$value.index,
5880
5596
  value = _data$value.value;
5881
5597
 
5882
- if ((item.url || item.sysCode) && (item.ganged && index > item.ganged - 1 || value.hasSub)) {
5883
- var filte = value[item.valueKey] || value.value;
5598
+ if ((item.url || this.sysCode) && (item.ganged && index > item.ganged - 1 || value.hasSub)) {
5599
+ var filte = value[this.valueKey] || value.value;
5884
5600
  var datas = [];
5885
- if (this.optionDatas[item.field || item.prop][index + 1]) {
5886
- datas = this.optionDatas[item.field || item.prop][index + 1].filter(function (items) {
5601
+ if (this.optionDatas[this.field || this.prop][index + 1]) {
5602
+ datas = this.optionDatas[this.field || this.prop][index + 1].filter(function (items) {
5887
5603
  return filte == items[item.filtrateKey];
5888
5604
  });
5889
5605
  }
@@ -5895,21 +5611,21 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5895
5611
  param[i] = value[queryKey[i]];
5896
5612
  }
5897
5613
  }
5898
- var params = util["a" /* default */].extend(true, item.sysCode ? { sysAppCode: item.sysCode } : {}, item.param ? item.param : {}, param);
5614
+ var params = util["a" /* default */].extend(true, this.sysCode ? { sysAppCode: this.sysCode } : {}, item.param ? item.param : {}, param);
5899
5615
  util["a" /* default */].ajax({
5900
- url: item.sysCode ? api["u" /* findSysCode */] : item.url,
5616
+ url: this.sysCode ? api["u" /* findSysCode */] : item.url,
5901
5617
  method: this.method,
5902
5618
  params: params,
5903
5619
  data: params
5904
5620
  }).then(function (res) {
5905
5621
  if (res.rCode === 0) {
5906
- var options = JSON.parse(JSON.stringify(_this3.optionDatas[item.field || item.prop]));
5622
+ var options = JSON.parse(JSON.stringify(_this3.optionDatas[_this3.sysCode]));
5907
5623
  if (options[index + 1]) {
5908
5624
  options[index + 1] = options[index + 1].concat(JSON.parse(JSON.stringify(res.results)));
5909
5625
  } else {
5910
5626
  options.push(JSON.parse(JSON.stringify(res.results)));
5911
5627
  }
5912
- _this3.$set(_this3.optionDatas, item.field || item.prop, options);
5628
+ _this3.$set(_this3.optionDatas, _this3.sysCode, options);
5913
5629
  } else {
5914
5630
  var msg = res.msg || '系统错误,请联系管理员!';
5915
5631
  _this3.$message.error(msg);
@@ -5922,7 +5638,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5922
5638
  }
5923
5639
  }
5924
5640
  }
5925
- item.events && item.events.change && item.events.change(data);
5641
+ this.events && this.events.change && this.events.change(data);
5926
5642
  this.$emit('formChange', data);
5927
5643
  },
5928
5644
  handleClick: function handleClick(data) {
@@ -5948,8 +5664,8 @@ var componentNormalizer = __webpack_require__(3);
5948
5664
 
5949
5665
  var component = Object(componentNormalizer["a" /* default */])(
5950
5666
  src_columnvue_type_script_lang_js_,
5951
- columnvue_type_template_id_00ff0a77_render,
5952
- columnvue_type_template_id_00ff0a77_staticRenderFns,
5667
+ columnvue_type_template_id_cd703de2_render,
5668
+ columnvue_type_template_id_cd703de2_staticRenderFns,
5953
5669
  false,
5954
5670
  null,
5955
5671
  null,
@@ -5979,10 +5695,6 @@ var _components;
5979
5695
  //
5980
5696
  //
5981
5697
  //
5982
- //
5983
- //
5984
- //
5985
- //
5986
5698
 
5987
5699
 
5988
5700
  /* harmony default export */ var childrenvue_type_script_lang_js_ = ({
@@ -5994,7 +5706,7 @@ var _components;
5994
5706
  },
5995
5707
  computed: {
5996
5708
  childrens: function childrens() {
5997
- return this.children || this.childHead;
5709
+ return this.children || this.childHead || [];
5998
5710
  }
5999
5711
  }
6000
5712
  });
@@ -6010,8 +5722,8 @@ var _components;
6010
5722
 
6011
5723
  var children_component = Object(componentNormalizer["a" /* default */])(
6012
5724
  src_childrenvue_type_script_lang_js_,
6013
- childrenvue_type_template_id_796433ee_render,
6014
- childrenvue_type_template_id_796433ee_staticRenderFns,
5725
+ childrenvue_type_template_id_29bcbc72_render,
5726
+ childrenvue_type_template_id_29bcbc72_staticRenderFns,
6015
5727
  false,
6016
5728
  null,
6017
5729
  null,
@@ -6079,7 +5791,7 @@ sizervue_type_template_id_58e4111d_render._withStripped = true
6079
5791
  // CONCATENATED MODULE: ./packages/data-table/src/sizer.vue?vue&type=template&id=58e4111d&
6080
5792
 
6081
5793
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/sizer.vue?vue&type=script&lang=js&
6082
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
5794
+ var sizervue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
6083
5795
 
6084
5796
  function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
6085
5797
 
@@ -6182,7 +5894,7 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
6182
5894
  title = item.title,
6183
5895
  other = _objectWithoutProperties(item, ['fixed', 'hide', 'childHead', 'children', 'title']);
6184
5896
 
6185
- var items = _extends({
5897
+ var items = sizervue_type_script_lang_js_extends({
6186
5898
  title: title ? title : item.label,
6187
5899
  fixed: fixed === true ? 'left' : fixed === undefined || fixed === false ? '' : fixed,
6188
5900
  hide: hide ? false : true,
@@ -6257,13 +5969,18 @@ var sizer_component = Object(componentNormalizer["a" /* default */])(
6257
5969
 
6258
5970
  /* harmony default export */ var sizer = (sizer_component.exports);
6259
5971
  // EXTERNAL MODULE: ./src/utils/bus.js
6260
- var bus = __webpack_require__(16);
5972
+ var bus = __webpack_require__(14);
6261
5973
 
6262
5974
  // EXTERNAL MODULE: external "qs"
6263
5975
  var external_qs_ = __webpack_require__(4);
6264
5976
  var external_qs_default = /*#__PURE__*/__webpack_require__.n(external_qs_);
6265
5977
 
5978
+ // EXTERNAL MODULE: ./packages/layout/src/item.vue + 4 modules
5979
+ var src_item = __webpack_require__(18);
5980
+
6266
5981
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=script&lang=js&
5982
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
5983
+
6267
5984
  var mainvue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
6268
5985
 
6269
5986
  var mainvue_type_script_lang_js_components;
@@ -6403,70 +6120,7 @@ var mainvue_type_script_lang_js_components;
6403
6120
  //
6404
6121
  //
6405
6122
  //
6406
- //
6407
- //
6408
- //
6409
- //
6410
- //
6411
- //
6412
- //
6413
- //
6414
- //
6415
- //
6416
- //
6417
- //
6418
- //
6419
- //
6420
- //
6421
- //
6422
- //
6423
- //
6424
- //
6425
- //
6426
- //
6427
- //
6428
- //
6429
- //
6430
- //
6431
- //
6432
- //
6433
- //
6434
- //
6435
- //
6436
- //
6437
- //
6438
- //
6439
- //
6440
- //
6441
- //
6442
- //
6443
- //
6444
- //
6445
- //
6446
- //
6447
- //
6448
- //
6449
- //
6450
- //
6451
- //
6452
- //
6453
- //
6454
- //
6455
- //
6456
- //
6457
- //
6458
- //
6459
- //
6460
- //
6461
- //
6462
- //
6463
- //
6464
- //
6465
- //
6466
- //
6467
- //
6468
- //
6469
- //
6123
+
6470
6124
 
6471
6125
 
6472
6126
 
@@ -6579,10 +6233,6 @@ var mainvue_type_script_lang_js_components;
6579
6233
  type: String,
6580
6234
  default: 'id'
6581
6235
  },
6582
- sizer: {
6583
- type: Boolean,
6584
- default: true
6585
- },
6586
6236
  // 无数据时显示的文本
6587
6237
  emptyText: {
6588
6238
  type: String,
@@ -6716,7 +6366,8 @@ var mainvue_type_script_lang_js_components;
6716
6366
  selected: null,
6717
6367
  options: {},
6718
6368
  icon: true,
6719
- show: true
6369
+ show: true,
6370
+ sysCodes: []
6720
6371
  };
6721
6372
  },
6722
6373
 
@@ -6727,12 +6378,33 @@ var mainvue_type_script_lang_js_components;
6727
6378
 
6728
6379
  theads: {
6729
6380
  get: function get() {
6381
+ var thead = [];
6382
+ if (this.checkbox) {
6383
+ thead.push({
6384
+ type: 'selection',
6385
+ width: '55',
6386
+ align: 'center',
6387
+ fixed: 'left',
6388
+ selectable: this.selectable,
6389
+ reserveSelection: this.reserveSelection
6390
+ });
6391
+ }
6392
+ if (this.numbers) {
6393
+ thead.push({
6394
+ type: 'index',
6395
+ label: '序号',
6396
+ width: '70',
6397
+ align: 'center',
6398
+ fixed: 'left',
6399
+ index: this.index === true ? (this.config.pageNum - 1) * this.config.pageSize + 1 : this.index === false ? 1 : this.index
6400
+ });
6401
+ }
6730
6402
  if (this.theadData.length) {
6731
- this.setMinWidth(this.theadData);
6732
- return this.theadData;
6403
+ thead = [].concat(thead, this.theadData);
6404
+ } else {
6405
+ thead = [].concat(thead, this.thead);
6733
6406
  }
6734
- this.setMinWidth(this.thead);
6735
- return this.thead;
6407
+ return thead;
6736
6408
  },
6737
6409
  set: function set(val) {
6738
6410
  return val;
@@ -6781,7 +6453,8 @@ var mainvue_type_script_lang_js_components;
6781
6453
 
6782
6454
  optionDatas: {
6783
6455
  get: function get() {
6784
- return this.optionData ? mainvue_type_script_lang_js_extends({}, this.optionData, this.options) : this.options;
6456
+ var data = this.optionData ? mainvue_type_script_lang_js_extends({}, this.optionData, this.options) : this.options;
6457
+ return data;
6785
6458
  },
6786
6459
  set: function set(val) {
6787
6460
  return val;
@@ -6836,12 +6509,20 @@ var mainvue_type_script_lang_js_components;
6836
6509
  immediate: true,
6837
6510
  deep: true,
6838
6511
  handler: function handler(val) {
6839
- this.config = util["a" /* default */].extend({}, this.config, this.page);
6512
+ if ((typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') {
6513
+ this.config = util["a" /* default */].extend({}, this.config, val);
6514
+ } else {
6515
+ this.config = {
6516
+ pageNum: 1,
6517
+ pageSize: 20,
6518
+ totalCount: 0
6519
+ };
6520
+ }
6840
6521
  }
6841
6522
  },
6842
6523
  'config.pageNum': function configPageNum() {
6843
6524
  if (this.data.length) {
6844
- this.$refs.oaTable.resetScroll(0, 0);
6525
+ this.$refs.oaTable && this.$refs.oaTable.resetScroll && this.$refs.oaTable.resetScroll(0, 0);
6845
6526
  }
6846
6527
  },
6847
6528
 
@@ -6889,80 +6570,68 @@ var mainvue_type_script_lang_js_components;
6889
6570
 
6890
6571
  return [method, url, external_qs_default.a.stringify(params), external_qs_default.a.stringify(data)].join('&');
6891
6572
  },
6892
- getIcon: function getIcon(res) {
6893
- if (this.sizer && this.icon && res !== 'right' && !this.$slots.prepend && !this.$slots.append && !this.$slots.default && !this.form) {
6894
- this.icon = false;
6895
- return 'es-icon-biao';
6896
- }
6897
- return false;
6898
- },
6899
- setMinWidth: function setMinWidth(obj) {
6900
- var _this2 = this;
6901
-
6902
- obj.forEach(function (item) {
6903
- if (item.childHead && item.childHead.length) {
6904
- _this2.setMinWidth(item.childHead);
6905
- } else if (item.children && item.children.length) {
6906
- _this2.setMinWidth(item.children);
6907
- } else if (!item.width && !item.minWidth && item.title) {
6908
- var width = item.title.length * 14 + 20;
6909
- if (width > 80) {
6910
- _this2.$set(item, 'minWidth', width);
6911
- }
6912
- }
6913
- });
6914
- },
6915
6573
  getOptions: function getOptions(res) {
6916
- var _this3 = this;
6574
+ var _this2 = this;
6917
6575
 
6576
+ var sysCodes = [];
6918
6577
  res.forEach(function (item) {
6919
6578
  if (item.sysCode || item.url) {
6579
+ item.sysCode && sysCodes.push(item.sysCode);
6920
6580
  var params = util["a" /* default */].extend({}, item.sysCode ? { sysAppCode: item.sysCode } : {}, item.param ? item.param : {});
6921
- var key = _this3.getRequestKey({
6922
- method: _this3.method,
6581
+ var key = _this2.getRequestKey({
6582
+ method: _this2.method,
6923
6583
  url: item.sysCode ? api["u" /* findSysCode */] : item.url,
6924
6584
  params: params,
6925
6585
  data: {}
6926
6586
  });
6927
- if (!_this3.requests.includes(key)) {
6587
+ if (!_this2.requests.includes(key)) {
6928
6588
  util["a" /* default */].ajax({
6929
6589
  url: item.sysCode ? api["u" /* findSysCode */] : item.url,
6930
- method: _this3.method,
6590
+ method: _this2.method,
6931
6591
  params: params,
6932
6592
  data: params
6933
6593
  }).then(function (res) {
6934
6594
  if (res.rCode === 0) {
6935
6595
  if (item.type == 'ganged') {
6936
- _this3.$set(_this3.options, item.field || item.prop, [JSON.parse(JSON.stringify(res.results))]);
6596
+ _this2.$set(_this2.options, item.sysCode || item.field || item.prop, [JSON.parse(JSON.stringify(res.results))]);
6597
+ if (item.sysCode) {
6598
+ bus["a" /* default */].$emit(item.sysCode, JSON.parse(JSON.stringify(_this2.options[item.sysCode])));
6599
+ }
6937
6600
  } else {
6938
- _this3.$set(_this3.options, item.field || item.prop, JSON.parse(JSON.stringify(res.results)));
6601
+ _this2.$set(_this2.options, item.sysCode || item.field || item.prop, JSON.parse(JSON.stringify(res.results)));
6602
+ if (item.sysCode) {
6603
+ bus["a" /* default */].$emit(item.sysCode, JSON.parse(JSON.stringify(res.results)));
6604
+ }
6939
6605
  }
6940
- _this3.requests.push(key);
6606
+ _this2.requests.push(key);
6941
6607
  } else {
6942
6608
  var msg = res.msg || '系统错误,请联系管理员!';
6943
- _this3.$message.error(msg);
6609
+ _this2.$message.error(msg);
6944
6610
  }
6945
6611
  }).catch(function (err) {
6946
6612
  if (err.message && err.message !== 'canceled') {
6947
- _this3.$message.error(err.message);
6613
+ _this2.$message.error(err.message);
6948
6614
  }
6949
6615
  });
6950
6616
  }
6951
6617
  } else {
6952
6618
  if (item.childHead && item.childHead.length) {
6953
- _this3.getOptions(item.childHead);
6619
+ _this2.getOptions(item.childHead);
6954
6620
  }
6955
6621
  if (item.children && item.children.length) {
6956
- _this3.getOptions(item.children);
6622
+ _this2.getOptions(item.children);
6957
6623
  }
6958
6624
  }
6959
6625
  });
6626
+ this.sysCodes = sysCodes;
6627
+
6628
+ this.bindEventBus();
6960
6629
  },
6961
6630
  checkObject: function checkObject(item) {
6962
6631
  return util["a" /* default */].getObjectType(item) === 'object';
6963
6632
  },
6964
6633
  chekOpenTotalArea: function chekOpenTotalArea() {
6965
- var _this4 = this;
6634
+ var _this3 = this;
6966
6635
 
6967
6636
  if (this.total || this.showSummary) {
6968
6637
  this.showTotal = true;
@@ -6971,7 +6640,7 @@ var mainvue_type_script_lang_js_components;
6971
6640
  var arr = JSON.parse(JSON.stringify(this.theads));
6972
6641
  arr.forEach(function (item) {
6973
6642
  if (item.total) {
6974
- _this4.showTotal = true;
6643
+ _this3.showTotal = true;
6975
6644
  }
6976
6645
  });
6977
6646
  },
@@ -7010,27 +6679,27 @@ var mainvue_type_script_lang_js_components;
7010
6679
  });
7011
6680
  },
7012
6681
  checkSelect: function checkSelect(newVal) {
7013
- var _this5 = this;
6682
+ var _this4 = this;
7014
6683
 
7015
6684
  this.$nextTick(function () {
7016
6685
  if (util["a" /* default */].getObjectType(newVal) === 'array') {
7017
6686
  newVal.forEach(function (row) {
7018
6687
  if (util["a" /* default */].isObject(row)) {
7019
- _this5.$refs.oaTable.toggleRowSelection(row, true);
7020
- } else _this5.datas.forEach(function (item) {
7021
- if (item[_this5.checkedKey] === row) {
7022
- _this5.$refs.oaTable.toggleRowSelection(item, true);
6688
+ _this4.$refs.oaTable.toggleRowSelection(row, true);
6689
+ } else _this4.datas.forEach(function (item) {
6690
+ if (item[_this4.checkedKey] === row) {
6691
+ _this4.$refs.oaTable.toggleRowSelection(item, true);
7023
6692
  return;
7024
6693
  }
7025
6694
  });
7026
6695
  });
7027
6696
  } else if (newVal === true) {
7028
- _this5.toggleAllSelection();
6697
+ _this4.toggleAllSelection();
7029
6698
  }
7030
6699
  });
7031
6700
  },
7032
6701
  getTheads: function getTheads() {
7033
- var _this6 = this;
6702
+ var _this5 = this;
7034
6703
 
7035
6704
  util["a" /* default */].ajax({
7036
6705
  url: this.thead,
@@ -7042,27 +6711,27 @@ var mainvue_type_script_lang_js_components;
7042
6711
  if (res.rCode === 0) {
7043
6712
  var results = res.results;
7044
6713
  if (Array.isArray(results)) {
7045
- _this6.theadData = results;
6714
+ _this5.theadData = results;
7046
6715
  } else {
7047
- _this6.theadData = results.theadData || [];
7048
- _this6.list = results.data || results.records || [];
7049
- _this6.config.totalCount = results.count || results.total || results.totalCount;
7050
- _this6.getOptions(_this6.theadData);
6716
+ _this5.theadData = results.theadData || [];
6717
+ _this5.list = results.data || results.records || [];
6718
+ _this5.config.totalCount = results.count || results.total || results.totalCount;
6719
+ _this5.getOptions(_this5.theadData);
7051
6720
  }
7052
6721
  } else {
7053
- _this6.theadData = [];
6722
+ _this5.theadData = [];
7054
6723
  var msg = res.msg || '系统错误,请联系管理员!';
7055
- _this6.$message.error(msg);
6724
+ _this5.$message.error(msg);
7056
6725
  }
7057
- _this6.$emit('success', res);
6726
+ _this5.$emit('success', res);
7058
6727
  }).catch(function (err) {
7059
6728
  if (err.message && err.message !== 'canceled') {
7060
- _this6.$message.error(err.message);
6729
+ _this5.$message.error(err.message);
7061
6730
  }
7062
6731
  });
7063
6732
  },
7064
6733
  getTableData: function getTableData(res) {
7065
- var _this7 = this;
6734
+ var _this6 = this;
7066
6735
 
7067
6736
  var where = void 0;
7068
6737
  var first = void 0;
@@ -7092,28 +6761,28 @@ var mainvue_type_script_lang_js_components;
7092
6761
  params: reqData,
7093
6762
  data: reqData
7094
6763
  }).then(function (res) {
7095
- _this7.tableLoading = false;
6764
+ _this6.tableLoading = false;
7096
6765
  if (res.rCode === 0 || res.status === 'success') {
7097
- _this7.$refs.oaTable.resetScroll(0, 0);
7098
- var results = _this7.parseData !== undefined ? _this7.parseData(res.results || res.data || res) : res.results || res.data;
7099
- _this7.list = results.data || results.records || results.list || [];
7100
- _this7.config.totalCount = results.count || results.total || results.totalCount;
7101
- _this7.checked && _this7.$nextTick(function () {
7102
- _this7.checkSelect(_this7.checked);
6766
+ _this6.$refs.oaTable.resetScroll(0, 0);
6767
+ var results = _this6.parseData !== undefined ? _this6.parseData(res.results || res.data || res) : res.results || res.data;
6768
+ _this6.list = results.data || results.records || results.list || [];
6769
+ _this6.config.totalCount = results.count || results.total || results.totalCount;
6770
+ _this6.checked && _this6.$nextTick(function () {
6771
+ _this6.checkSelect(_this6.checked);
7103
6772
  });
7104
6773
  } else {
7105
- _this7.list = [];
6774
+ _this6.list = [];
7106
6775
  //this.tableHeight = false;
7107
6776
  var msg = res.msg || '系统错误,请联系管理员!';
7108
- _this7.$message.error(msg);
6777
+ _this6.$message.error(msg);
7109
6778
  }
7110
- _this7.$emit('success', res);
6779
+ _this6.$emit('success', res);
7111
6780
  }).catch(function (err) {
7112
6781
  //this.tableHeight = false;
7113
6782
  if (err.message && err.message !== 'canceled') {
7114
- _this7.$message.error(err.message);
6783
+ _this6.$message.error(err.message);
7115
6784
  }
7116
- _this7.tableLoading = false;
6785
+ _this6.tableLoading = false;
7117
6786
  });
7118
6787
  },
7119
6788
  selectionChange: function selectionChange(data) {
@@ -7158,7 +6827,7 @@ var mainvue_type_script_lang_js_components;
7158
6827
  this.$emit('change', data, this.datas);
7159
6828
  },
7160
6829
  handleAjax: function handleAjax(handle, row) {
7161
- var _this8 = this;
6830
+ var _this7 = this;
7162
6831
 
7163
6832
  this.changeLoading(true, handle.text + '\u4E2D...');
7164
6833
  var params = handle.param || {};
@@ -7214,9 +6883,9 @@ var mainvue_type_script_lang_js_components;
7214
6883
  method: handle.method,
7215
6884
  format: handle.format
7216
6885
  }).then(function (res) {
7217
- _this8.changeLoading(false);
6886
+ _this7.changeLoading(false);
7218
6887
  if (res.rCode === 0) {
7219
- _this8.$message({
6888
+ _this7.$message({
7220
6889
  message: handle.text + '\u6210\u529F',
7221
6890
  duration: 2000,
7222
6891
  type: 'success',
@@ -7224,17 +6893,17 @@ var mainvue_type_script_lang_js_components;
7224
6893
  var first = Object.prototype.hasOwnProperty.call(handle, 'first') ? handle.first : false;
7225
6894
  var reload = handle.reload || true;
7226
6895
  if (reload) {
7227
- _this8.reload({}, first);
6896
+ _this7.reload({}, first);
7228
6897
  }
7229
6898
  }
7230
6899
  });
7231
6900
  } else {
7232
- _this8.$message.error(res.msg || handle.text + '\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01');
6901
+ _this7.$message.error(res.msg || handle.text + '\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01');
7233
6902
  }
7234
6903
  }).catch(function (err) {
7235
- _this8.changeLoading(false);
6904
+ _this7.changeLoading(false);
7236
6905
  if (err.message && err.message !== 'canceled') {
7237
- _this8.$message.error(err.message);
6906
+ _this7.$message.error(err.message);
7238
6907
  }
7239
6908
  });
7240
6909
  },
@@ -7259,7 +6928,7 @@ var mainvue_type_script_lang_js_components;
7259
6928
  return mainvue_type_script_lang_js_extends({}, obj, item);
7260
6929
  },
7261
6930
  handleClick: function handleClick(res) {
7262
- var _this9 = this;
6931
+ var _this8 = this;
7263
6932
 
7264
6933
  var row = res.row,
7265
6934
  handle = res.handle;
@@ -7295,7 +6964,7 @@ var mainvue_type_script_lang_js_components;
7295
6964
  cancelButtonText: '取消',
7296
6965
  type: 'warning'
7297
6966
  }).then(function () {
7298
- _this9.handleAjax(handle, rows);
6967
+ _this8.handleAjax(handle, rows);
7299
6968
  }).catch(function () {});
7300
6969
  } else {
7301
6970
  this.handleAjax(handle, rows);
@@ -7383,7 +7052,7 @@ var mainvue_type_script_lang_js_components;
7383
7052
  var type = ['selection', 'index', 'expand'];
7384
7053
  thead = thead.map(function (item) {
7385
7054
  return item.filter(function (ele) {
7386
- return !type.includes(ele.type) && ele.label !== text && !_this9.exportExcludeLabel.includes(ele.label);
7055
+ return !type.includes(ele.type) && ele.label !== text && !_this8.exportExcludeLabel.includes(ele.label);
7387
7056
  });
7388
7057
  });
7389
7058
  util["a" /* default */].exportXls({
@@ -7489,47 +7158,47 @@ var mainvue_type_script_lang_js_components;
7489
7158
  }
7490
7159
  },
7491
7160
  resetHeight: function resetHeight(warn) {
7492
- var _this10 = this;
7161
+ var _this9 = this;
7493
7162
 
7494
7163
  this.$nextTick(function () {
7495
- if (_this10.full && !_this10.height && !_this10.maxHeight) {
7496
- var height = _this10.$el.parentNode.offsetHeight;
7164
+ if (_this9.full && !_this9.height && !_this9.maxHeight) {
7165
+ var height = _this9.$el.parentNode.offsetHeight;
7497
7166
  if (height) {
7498
- height = parseInt(util["a" /* default */].getStyle(_this10.$el.parentNode, 'height', '%'), 10);
7499
- height = (height == NaN ? 0 : height) - parseInt(util["a" /* default */].getStyle(_this10.$el.parentNode, 'padding-top'), 10) - parseInt(util["a" /* default */].getStyle(_this10.$el.parentNode, 'padding-bottom'), 10);
7500
- for (var i = 0; i < _this10.$el.parentNode.childNodes.length; i++) {
7501
- var ele = _this10.$el.parentNode.childNodes[i];
7502
- if (ele !== _this10.$el && ele.offsetHeight !== undefined) {
7167
+ height = parseInt(util["a" /* default */].getStyle(_this9.$el.parentNode, 'height', '%'), 10);
7168
+ height = (height == NaN ? 0 : height) - parseInt(util["a" /* default */].getStyle(_this9.$el.parentNode, 'padding-top'), 10) - parseInt(util["a" /* default */].getStyle(_this9.$el.parentNode, 'padding-bottom'), 10);
7169
+ for (var i = 0; i < _this9.$el.parentNode.childNodes.length; i++) {
7170
+ var ele = _this9.$el.parentNode.childNodes[i];
7171
+ if (ele !== _this9.$el && ele.offsetHeight !== undefined) {
7503
7172
  height = height - ele.offsetHeight - parseInt(util["a" /* default */].getStyle(ele, 'margin-top'), 10) - parseInt(util["a" /* default */].getStyle(ele, 'margin-bottom'), 10);
7504
7173
  }
7505
7174
  }
7506
- height -= _this10.showToolbar ? 45 : 0;
7507
- height -= _this10.page === false ? 0 : 46;
7508
- height -= _this10.title ? _this10.$refs.title.offsetHeight : 0;
7509
- height -= parseInt(util["a" /* default */].getStyle(_this10.$refs.esTableContent, 'padding-top'), 10);
7510
- height -= parseInt(util["a" /* default */].getStyle(_this10.$refs.esTableContent, 'padding-bottom'), 10);
7511
- var emptyText = _this10.$refs.esTableContent.querySelector('.el-table__empty-text');
7175
+ height -= _this9.showToolbar ? 45 : 0;
7176
+ height -= _this9.page === false ? 0 : 46;
7177
+ height -= _this9.title ? _this9.$refs.title.offsetHeight : 0;
7178
+ height -= parseInt(util["a" /* default */].getStyle(_this9.$refs.esTableContent, 'padding-top'), 10);
7179
+ height -= parseInt(util["a" /* default */].getStyle(_this9.$refs.esTableContent, 'padding-bottom'), 10);
7180
+ var emptyText = _this9.$refs.esTableContent.querySelector('.el-table__empty-text');
7512
7181
  var eht = 0;
7513
7182
  if (emptyText) {
7514
7183
  eht = emptyText.offsetHeight;
7515
- var thead = _this10.$refs.esTableContent.querySelector('.el-table__header');
7184
+ var thead = _this9.$refs.esTableContent.querySelector('.el-table__header');
7516
7185
  thead && (eht += thead.offsetHeight);
7517
7186
  }
7518
7187
  if (height > 1 && height - eht > 1) {
7519
- _this10.tableHeight = height;
7188
+ _this9.tableHeight = height;
7520
7189
  } else {
7521
- console.warn(_this10.$el.parentNode, '\u83B7\u53D6\u4E0D\u5230\u9AD8\u5EA6\uFF01');
7190
+ console.warn(_this9.$el.parentNode, '\u83B7\u53D6\u4E0D\u5230\u9AD8\u5EA6\uFF01');
7522
7191
  }
7523
7192
  } else if (!warn) {
7524
7193
  setTimeout(function () {
7525
- _this10.resetHeight(true);
7194
+ _this9.resetHeight(true);
7526
7195
  }, 1000);
7527
7196
  }
7528
7197
  }
7529
7198
  });
7530
7199
  },
7531
7200
  validate: function validate(callback) {
7532
- var form = this.elForm || this.$refs.esTableForm;
7201
+ var form = this.elForm || this.$el;
7533
7202
  form.validate(function (valid) {
7534
7203
  callback(valid);
7535
7204
  });
@@ -7550,13 +7219,32 @@ var mainvue_type_script_lang_js_components;
7550
7219
  this.$emit('sort-change', res);
7551
7220
  },
7552
7221
  mergeThead: function mergeThead(res) {
7553
- var _this11 = this;
7222
+ var _this10 = this;
7554
7223
 
7555
7224
  this.theadData = res;
7556
7225
  this.icon = true;
7557
7226
  setTimeout(function () {
7558
- _this11.show = true;
7227
+ _this10.show = true;
7559
7228
  }, 100);
7229
+ },
7230
+ setOptions: function setOptions(val, sysCode) {
7231
+ this.$set(this.options, sysCode, val);
7232
+ },
7233
+ bindEventBus: function bindEventBus() {
7234
+ var _this11 = this;
7235
+
7236
+ this.sysCodes.forEach(function (item) {
7237
+ bus["a" /* default */].$on(item, function (val) {
7238
+ _this11.setOptions(val, item);
7239
+ });
7240
+ });
7241
+ },
7242
+ unbindEventBus: function unbindEventBus() {
7243
+ var _this12 = this;
7244
+
7245
+ this.sysCodes.forEach(function (item) {
7246
+ bus["a" /* default */].$off(item, _this12.setOptions);
7247
+ });
7560
7248
  }
7561
7249
  }
7562
7250
  });
@@ -7572,7 +7260,7 @@ var mainvue_type_script_lang_js_components;
7572
7260
 
7573
7261
  var main_component = Object(componentNormalizer["a" /* default */])(
7574
7262
  src_mainvue_type_script_lang_js_,
7575
- mainvue_type_template_id_1d557e20_render,
7263
+ mainvue_type_template_id_2d512d7f_render,
7576
7264
  staticRenderFns,
7577
7265
  false,
7578
7266
  null,