eoss-ui 0.5.28 → 0.5.30

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 (59) hide show
  1. package/lib/button-group.js +196 -203
  2. package/lib/button.js +11 -5
  3. package/lib/card.js +2 -2
  4. package/lib/checkbox-group.js +14 -8
  5. package/lib/clients.js +2 -2
  6. package/lib/data-table-form.js +8 -3
  7. package/lib/data-table.js +139 -309
  8. package/lib/date-picker.js +8 -3
  9. package/lib/dialog.js +17 -11
  10. package/lib/enterprise.js +2 -2
  11. package/lib/eoss-ui.common.js +389 -323
  12. package/lib/error-page.js +2 -2
  13. package/lib/flow-group.js +10 -5
  14. package/lib/flow-list.js +10 -5
  15. package/lib/flow.js +8 -3
  16. package/lib/form.js +11 -5
  17. package/lib/handle-user.js +10 -5
  18. package/lib/handler.js +10 -5
  19. package/lib/icons.js +4 -4
  20. package/lib/index.js +1 -1
  21. package/lib/input-number.js +8 -3
  22. package/lib/input.js +8 -3
  23. package/lib/layout.js +152 -166
  24. package/lib/login.js +11 -5
  25. package/lib/main.js +20 -14
  26. package/lib/nav.js +8 -3
  27. package/lib/page.js +8 -3
  28. package/lib/player.js +14 -9
  29. package/lib/qr-code.js +10 -5
  30. package/lib/radio-group.js +10 -5
  31. package/lib/retrial-auth.js +8 -3
  32. package/lib/select-ganged.js +10 -5
  33. package/lib/select.js +10 -5
  34. package/lib/selector-panel.js +11 -6
  35. package/lib/selector.js +38 -20
  36. package/lib/sizer.js +8 -3
  37. package/lib/steps.js +8 -3
  38. package/lib/switch.js +8 -3
  39. package/lib/table-form.js +8 -3
  40. package/lib/tabs.js +8 -3
  41. package/lib/theme-chalk/button.css +1 -1
  42. package/lib/theme-chalk/index.css +1 -1
  43. package/lib/tips.js +8 -3
  44. package/lib/tree-group.js +8 -3
  45. package/lib/tree.js +8 -3
  46. package/lib/upload.js +14 -8
  47. package/lib/utils/util.js +8 -3
  48. package/lib/wujie.js +8 -3
  49. package/lib/wxlogin.js +8 -3
  50. package/package.json +2 -2
  51. package/packages/button/src/main.vue +4 -2
  52. package/packages/data-table/src/main.vue +59 -13
  53. package/packages/main/src/userinfo.vue +5 -1
  54. package/packages/selector/src/main.vue +15 -13
  55. package/packages/theme-chalk/lib/button.css +1 -1
  56. package/packages/theme-chalk/lib/index.css +1 -1
  57. package/packages/theme-chalk/src/button.scss +8 -0
  58. package/src/index.js +1 -1
  59. package/src/utils/util.js +11 -3
package/lib/data-table.js CHANGED
@@ -239,16 +239,21 @@ var ajax = function ajax(_ref) {
239
239
  delPendingRequest(response.config);
240
240
  loading && loading.close();
241
241
  if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
242
- if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('ssId') || localStorage.getItem('token') || localStorage.getItem('Authorization')) {
243
- localStorage.setItem('ssId', response.headers.ssid);
242
+ if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('token') || localStorage.getItem('Authorization')) {
244
243
  localStorage.setItem('token', response.headers.authorization);
245
244
  localStorage.setItem('Authorization', response.headers.authorization);
246
245
  } else {
247
- sessionStorage.setItem('ssId', response.headers.ssid);
248
246
  sessionStorage.setItem('token', response.headers.authorization);
249
247
  sessionStorage.setItem('Authorization', response.headers.authorization);
250
248
  }
251
249
  }
250
+ if ((response.headers.ssId || response.headers.Ssid || response.headers.ssid) && (response.headers.ssId || response.headers.SsId || response.headers.ssid) !== getStorage('ssId')) {
251
+ if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('ssId')) {
252
+ localStorage.setItem('ssId', response.headers.ssId || response.headers.SsId || response.headers.ssid);
253
+ } else {
254
+ sessionStorage.setItem('ssId', response.headers.ssId || response.headers.SsId || response.headers.ssid);
255
+ }
256
+ }
252
257
  if (response.status === 200) {
253
258
  if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
254
259
  removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig', 'jump']);
@@ -3602,7 +3607,7 @@ module.exports = require("babel-runtime/regenerator");
3602
3607
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3603
3608
 
3604
3609
  "use strict";
3605
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16);
3610
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
3606
3611
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
3607
3612
 
3608
3613
 
@@ -3612,231 +3617,12 @@ module.exports = require("babel-runtime/regenerator");
3612
3617
  /* 15 */
3613
3618
  /***/ (function(module, exports) {
3614
3619
 
3615
- module.exports = require("interactjs");
3616
-
3617
- /***/ }),
3618
- /* 16 */
3619
- /***/ (function(module, exports) {
3620
-
3621
3620
  module.exports = require("vue");
3622
3621
 
3623
3622
  /***/ }),
3623
+ /* 16 */,
3624
3624
  /* 17 */,
3625
- /* 18 */
3626
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3627
-
3628
- "use strict";
3629
-
3630
- // 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&
3631
- var render = function () {
3632
- var _vm = this
3633
- var _h = _vm.$createElement
3634
- var _c = _vm._self._c || _h
3635
- return _c(
3636
- "div",
3637
- {
3638
- ref: "move",
3639
- staticClass: "es-layout-item",
3640
- class: _vm.defaultClasss,
3641
- style: _vm.defaultaStyle,
3642
- },
3643
- [
3644
- _c("es-card"),
3645
- _c("div", { staticClass: "es-layout-resizable-width" }),
3646
- _c("div", { staticClass: "es-layout-resizable-height" }),
3647
- _c("div", { staticClass: "es-layout-resizable" }),
3648
- ],
3649
- 1
3650
- )
3651
- }
3652
- var staticRenderFns = []
3653
- render._withStripped = true
3654
-
3655
-
3656
- // CONCATENATED MODULE: ./packages/layout/src/item.vue?vue&type=template&id=124bb300&
3657
-
3658
- // EXTERNAL MODULE: external "interactjs"
3659
- var external_interactjs_ = __webpack_require__(15);
3660
- var external_interactjs_default = /*#__PURE__*/__webpack_require__.n(external_interactjs_);
3661
-
3662
- // 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&
3663
- //
3664
- //
3665
- //
3666
- //
3667
- //
3668
- //
3669
- //
3670
- //
3671
- //
3672
- //
3673
- //
3674
- //
3675
- //
3676
-
3677
- // import '@interactjs/auto-start';
3678
- // import '@interactjs/auto-scroll';
3679
- // import '@interactjs/actions/drag';
3680
- // import '@interactjs/actions/resize';
3681
- // import '@interactjs/modifiers';
3682
- // import '@interactjs/dev-tools';
3683
-
3684
- /* harmony default export */ var itemvue_type_script_lang_js_ = ({
3685
- name: 'LayoutItem',
3686
- components: {},
3687
- props: {
3688
- redact: {
3689
- type: Boolean,
3690
- default: true
3691
- },
3692
- width: {
3693
- type: String,
3694
- default: '100%'
3695
- },
3696
- height: {
3697
- type: String,
3698
- default: '100px'
3699
- },
3700
- left: String,
3701
- top: String,
3702
- index: Number
3703
- },
3704
- computed: {
3705
- defaultClasss: function defaultClasss() {
3706
- return {
3707
- 'es-dragging': this.dragging
3708
- };
3709
- },
3710
- defaultaStyle: function defaultaStyle() {
3711
- return {
3712
- width: this.width,
3713
- height: this.height,
3714
- left: this.left,
3715
- top: this.top
3716
- };
3717
- },
3718
- cardStyle: function cardStyle() {
3719
- return {
3720
- width: this.width,
3721
- height: this.height
3722
- };
3723
- }
3724
- },
3725
- watch: {},
3726
- data: function data() {
3727
- return {
3728
- position: { x: 0, y: 0 },
3729
- interaction: null,
3730
- dragging: false
3731
- };
3732
- },
3733
- created: function created() {
3734
- this.position = {
3735
- x: parseInt(this.left) || 0,
3736
- y: parseInt(this.top) || 0
3737
- };
3738
- console.log(this.position);
3739
- },
3740
- mounted: function mounted() {
3741
- console.log(external_interactjs_default.a.feedback);
3742
- this.interaction = external_interactjs_default()(this.$refs.move);
3743
- this.interaction.draggable({
3744
- // modifiers: [
3745
- // interact.modifiers.restrictRect({
3746
- // restriction: 'parent',
3747
- // endOnly: false
3748
- // })
3749
- // ],
3750
- // listeners: {
3751
- // start: (event) => {
3752
- // this.dragging = true;
3753
- // console.log(event.type, event.target, 111);
3754
- // },
3755
- // move: (event) => {
3756
- // this.position.x += event.dx;
3757
- // this.position.y += event.dy;
3758
- // event.target.style.transform = `translate(${this.position.x}px, ${this.position.y}px)`;
3759
- // },
3760
- // end: (event) => {
3761
- // this.dragging = false;
3762
- // console.log(event.type, event.target, 222);
3763
- // }
3764
- // }
3765
- inertia: true,
3766
- //autoScroll: { container: '.container' },
3767
- listeners: [external_interactjs_default.a.feedback.pointers()],
3768
- modifiers: [external_interactjs_default.a.modifiers.restrict({
3769
- restriction: 'html',
3770
- elementRect: { left: 0, top: 0, right: 1, bottom: 1 }
3771
- }), external_interactjs_default.a.modifiers.transform(), external_interactjs_default.a.modifiers.spring()]
3772
- });
3773
- this.interaction.resizable({
3774
- modifiers: [
3775
- // keep the edges inside the parent
3776
- external_interactjs_default.a.modifiers.restrictEdges({
3777
- outer: 'parent'
3778
- }),
3779
-
3780
- // minimum size
3781
- external_interactjs_default.a.modifiers.restrictSize({
3782
- min: { width: 100, height: 100 }
3783
- })],
3784
-
3785
- //inertia: true,
3786
- edges: { top: true, left: true, bottom: true, right: true },
3787
- listeners: {
3788
- move: function move(event) {
3789
- console.log(1212);
3790
- var _event$target$dataset = event.target.dataset,
3791
- x = _event$target$dataset.x,
3792
- y = _event$target$dataset.y;
3793
-
3794
-
3795
- x = (parseFloat(x) || 0) + event.deltaRect.left;
3796
- y = (parseFloat(y) || 0) + event.deltaRect.top;
3797
-
3798
- Object.assign(event.target.style, {
3799
- width: event.rect.width + 'px',
3800
- height: event.rect.height + 'px',
3801
- transform: 'translate(' + x + 'px, ' + y + 'px)'
3802
- });
3803
-
3804
- Object.assign(event.target.dataset, { x: x, y: y });
3805
- }
3806
- }
3807
- });
3808
- },
3809
-
3810
- methods: {},
3811
- beforeDestroy: function beforeDestroy() {}
3812
- });
3813
- // CONCATENATED MODULE: ./packages/layout/src/item.vue?vue&type=script&lang=js&
3814
- /* harmony default export */ var src_itemvue_type_script_lang_js_ = (itemvue_type_script_lang_js_);
3815
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
3816
- var componentNormalizer = __webpack_require__(3);
3817
-
3818
- // CONCATENATED MODULE: ./packages/layout/src/item.vue
3819
-
3820
-
3821
-
3822
-
3823
-
3824
- /* normalize component */
3825
-
3826
- var component = Object(componentNormalizer["a" /* default */])(
3827
- src_itemvue_type_script_lang_js_,
3828
- render,
3829
- staticRenderFns,
3830
- false,
3831
- null,
3832
- null,
3833
- null
3834
-
3835
- )
3836
-
3837
- /* harmony default export */ var item = __webpack_exports__["a"] = (component.exports);
3838
-
3839
- /***/ }),
3625
+ /* 18 */,
3840
3626
  /* 19 */,
3841
3627
  /* 20 */,
3842
3628
  /* 21 */,
@@ -3857,8 +3643,8 @@ var component = Object(componentNormalizer["a" /* default */])(
3857
3643
  // ESM COMPAT FLAG
3858
3644
  __webpack_require__.r(__webpack_exports__);
3859
3645
 
3860
- // 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=4564aac4&
3861
- var mainvue_type_template_id_4564aac4_render = function () {
3646
+ // 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=a455250e&
3647
+ var mainvue_type_template_id_a455250e_render = function () {
3862
3648
  var _vm = this
3863
3649
  var _h = _vm.$createElement
3864
3650
  var _c = _vm._self._c || _h
@@ -4018,6 +3804,7 @@ var mainvue_type_template_id_4564aac4_render = function () {
4018
3804
  align: "center",
4019
3805
  label: "操作",
4020
3806
  fixed: "right",
3807
+ button: _vm.headButton,
4021
3808
  total: false,
4022
3809
  },
4023
3810
  scopedSlots: _vm._u([
@@ -4044,7 +3831,7 @@ var mainvue_type_template_id_4564aac4_render = function () {
4044
3831
  ]
4045
3832
  )
4046
3833
  : _vm._e(),
4047
- !scope.row.cantDelete
3834
+ !scope.row.cantDelete && !_vm.isLeast
4048
3835
  ? _c(
4049
3836
  "el-button",
4050
3837
  {
@@ -4107,10 +3894,10 @@ var mainvue_type_template_id_4564aac4_render = function () {
4107
3894
  )
4108
3895
  }
4109
3896
  var staticRenderFns = []
4110
- mainvue_type_template_id_4564aac4_render._withStripped = true
3897
+ mainvue_type_template_id_a455250e_render._withStripped = true
4111
3898
 
4112
3899
 
4113
- // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=4564aac4&
3900
+ // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=a455250e&
4114
3901
 
4115
3902
  // EXTERNAL MODULE: ./src/config/api.js
4116
3903
  var api = __webpack_require__(1);
@@ -6060,9 +5847,6 @@ var bus = __webpack_require__(14);
6060
5847
  var external_qs_ = __webpack_require__(4);
6061
5848
  var external_qs_default = /*#__PURE__*/__webpack_require__.n(external_qs_);
6062
5849
 
6063
- // EXTERNAL MODULE: ./packages/layout/src/item.vue + 4 modules
6064
- var src_item = __webpack_require__(18);
6065
-
6066
5850
  // 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&
6067
5851
  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; };
6068
5852
 
@@ -6207,7 +5991,7 @@ var mainvue_type_script_lang_js_components, _watch;
6207
5991
  //
6208
5992
  //
6209
5993
  //
6210
-
5994
+ //
6211
5995
 
6212
5996
 
6213
5997
 
@@ -6373,6 +6157,10 @@ var mainvue_type_script_lang_js_components, _watch;
6373
6157
  type: Boolean,
6374
6158
  default: false
6375
6159
  },
6160
+ theadAdd: {
6161
+ type: Boolean,
6162
+ default: true
6163
+ },
6376
6164
  // 单元格点击事件
6377
6165
  click: {
6378
6166
  type: Boolean,
@@ -6426,6 +6214,11 @@ var mainvue_type_script_lang_js_components, _watch;
6426
6214
  default: function _default() {
6427
6215
  return [];
6428
6216
  }
6217
+ },
6218
+ rowData: [Object, Boolean],
6219
+ least: {
6220
+ type: Boolean,
6221
+ default: false
6429
6222
  }
6430
6223
  },
6431
6224
  data: function data() {
@@ -6546,6 +6339,16 @@ var mainvue_type_script_lang_js_components, _watch;
6546
6339
  set: function set(val) {
6547
6340
  return val;
6548
6341
  }
6342
+ },
6343
+ headButton: function headButton() {
6344
+ return this.theadAdd ? {
6345
+ icon: 'el-icon-circle-plus-outline',
6346
+ type: 'text',
6347
+ event: this.handleClickAddData
6348
+ } : false;
6349
+ },
6350
+ isLeast: function isLeast() {
6351
+ return this.data.length < 2 && this.least;
6549
6352
  }
6550
6353
  },
6551
6354
  watch: (_watch = {
@@ -6739,18 +6542,45 @@ var mainvue_type_script_lang_js_components, _watch;
6739
6542
  this.$emit('row-click', row, column, event);
6740
6543
  },
6741
6544
  handleClickAddData: function handleClickAddData(scope) {
6742
- var data = JSON.parse(JSON.stringify(scope.row));
6743
- var index = scope.$index + 1;
6744
- if (this.page) {
6745
- index += (this.config.pageNum - 1) * this.config.pageSize;
6545
+ if (scope && scope.row) {
6546
+ var data = JSON.parse(JSON.stringify(scope.row));
6547
+ var index = scope.$index + 1;
6548
+ if (this.page) {
6549
+ index += (this.config.pageNum - 1) * this.config.pageSize;
6550
+ }
6551
+ this.data.splice(index, 0, data);
6552
+ this.$emit('dataChange', 'add', data);
6553
+ this.$emit('btnClick', {
6554
+ event: 'addRow',
6555
+ row: data,
6556
+ index: index,
6557
+ data: this.data
6558
+ });
6559
+ } else {
6560
+ var _index = this.data.length;
6561
+ if (this.page) {
6562
+ _index += (this.config.pageNum - 1) * this.config.pageSize;
6563
+ }
6564
+ var rows = {};
6565
+ if (this.rowData && _typeof(this.rowData) == 'object') {
6566
+ rows = this.rowData;
6567
+ } else if (_index && this.rowData === true) {
6568
+ rows = JSON.parse(JSON.stringify(this.data[_index - 1]));
6569
+ } else {
6570
+ this.getRow(this.thead, rows);
6571
+ }
6572
+ this.data.splice(_index, 0, rows);
6746
6573
  }
6747
- this.data.splice(index, 0, data);
6748
- this.$emit('dataChange', 'add', data);
6749
- this.$emit('btnClick', {
6750
- event: 'addRow',
6751
- row: data,
6752
- index: index,
6753
- data: this.data
6574
+ },
6575
+ getRow: function getRow(thead, obj) {
6576
+ var _this4 = this;
6577
+
6578
+ thead.forEach(function (item) {
6579
+ if (item.field) {
6580
+ obj[item['field']] = item.defaultValue || '';
6581
+ } else if (item.children && item.children.length) {
6582
+ _this4.getRow(item.children, obj);
6583
+ }
6754
6584
  });
6755
6585
  },
6756
6586
  handleClickDeleteData: function handleClickDeleteData(scope) {
@@ -6769,27 +6599,27 @@ var mainvue_type_script_lang_js_components, _watch;
6769
6599
  });
6770
6600
  },
6771
6601
  checkSelect: function checkSelect(newVal) {
6772
- var _this4 = this;
6602
+ var _this5 = this;
6773
6603
 
6774
6604
  this.$nextTick(function () {
6775
6605
  if (util["a" /* default */].getObjectType(newVal) === 'array') {
6776
6606
  newVal.forEach(function (row) {
6777
6607
  if (util["a" /* default */].isObject(row)) {
6778
- _this4.$refs.oaTable.toggleRowSelection(row, true);
6779
- } else _this4.datas.forEach(function (item) {
6780
- if (item[_this4.checkedKey] === row) {
6781
- _this4.$refs.oaTable.toggleRowSelection(item, true);
6608
+ _this5.$refs.oaTable.toggleRowSelection(row, true);
6609
+ } else _this5.datas.forEach(function (item) {
6610
+ if (item[_this5.checkedKey] === row) {
6611
+ _this5.$refs.oaTable.toggleRowSelection(item, true);
6782
6612
  return;
6783
6613
  }
6784
6614
  });
6785
6615
  });
6786
6616
  } else if (newVal === true) {
6787
- _this4.toggleAllSelection();
6617
+ _this5.toggleAllSelection();
6788
6618
  }
6789
6619
  });
6790
6620
  },
6791
6621
  getTheads: function getTheads() {
6792
- var _this5 = this;
6622
+ var _this6 = this;
6793
6623
 
6794
6624
  util["a" /* default */].ajax({
6795
6625
  url: this.thead,
@@ -6801,27 +6631,27 @@ var mainvue_type_script_lang_js_components, _watch;
6801
6631
  if (res.rCode === 0) {
6802
6632
  var results = res.results;
6803
6633
  if (Array.isArray(results)) {
6804
- _this5.theadData = results;
6634
+ _this6.theadData = results;
6805
6635
  } else {
6806
- _this5.theadData = results.theadData || [];
6807
- _this5.list = results.data || results.records || [];
6808
- _this5.config.totalCount = results.count || results.total || results.totalCount;
6809
- _this5.getOptions(_this5.theadData);
6636
+ _this6.theadData = results.theadData || [];
6637
+ _this6.list = results.data || results.records || [];
6638
+ _this6.config.totalCount = results.count || results.total || results.totalCount;
6639
+ _this6.getOptions(_this6.theadData);
6810
6640
  }
6811
6641
  } else {
6812
- _this5.theadData = [];
6642
+ _this6.theadData = [];
6813
6643
  var msg = res.msg || '系统错误,请联系管理员!';
6814
- _this5.$message.error(msg);
6644
+ _this6.$message.error(msg);
6815
6645
  }
6816
- _this5.$emit('success', res);
6646
+ _this6.$emit('success', res);
6817
6647
  }).catch(function (err) {
6818
6648
  if (err.message && err.message !== 'canceled') {
6819
- _this5.$message.error(err.message);
6649
+ _this6.$message.error(err.message);
6820
6650
  }
6821
6651
  });
6822
6652
  },
6823
6653
  getTableData: function getTableData(res) {
6824
- var _this6 = this;
6654
+ var _this7 = this;
6825
6655
 
6826
6656
  var where = void 0;
6827
6657
  var first = void 0;
@@ -6851,28 +6681,28 @@ var mainvue_type_script_lang_js_components, _watch;
6851
6681
  params: reqData,
6852
6682
  data: reqData
6853
6683
  }).then(function (res) {
6854
- _this6.tableLoading = false;
6684
+ _this7.tableLoading = false;
6855
6685
  if (res.rCode === 0 || res.status === 'success') {
6856
- _this6.$refs.oaTable && _this6.$refs.oaTable.resetScroll && _this6.$refs.oaTable.resetScroll(0, 0);
6857
- var results = _this6.parseData !== undefined ? _this6.parseData(res.results || res.data || res) : res.results || res.data;
6858
- _this6.list = results.data || results.records || results.list || [];
6859
- _this6.config.totalCount = results.count || results.total || results.totalCount;
6860
- _this6.checked && _this6.$nextTick(function () {
6861
- _this6.checkSelect(_this6.checked);
6686
+ _this7.$refs.oaTable && _this7.$refs.oaTable.resetScroll && _this7.$refs.oaTable.resetScroll(0, 0);
6687
+ var results = _this7.parseData !== undefined ? _this7.parseData(res.results || res.data || res) : res.results || res.data;
6688
+ _this7.list = results.data || results.records || results.list || [];
6689
+ _this7.config.totalCount = results.count || results.total || results.totalCount;
6690
+ _this7.checked && _this7.$nextTick(function () {
6691
+ _this7.checkSelect(_this7.checked);
6862
6692
  });
6863
6693
  } else {
6864
- _this6.list = [];
6694
+ _this7.list = [];
6865
6695
  //this.tableHeight = false;
6866
6696
  var msg = res.msg || '系统错误,请联系管理员!';
6867
- _this6.$message.error(msg);
6697
+ _this7.$message.error(msg);
6868
6698
  }
6869
- _this6.$emit('success', res);
6699
+ _this7.$emit('success', res);
6870
6700
  }).catch(function (err) {
6871
6701
  //this.tableHeight = false;
6872
6702
  if (err.message && err.message !== 'canceled') {
6873
- _this6.$message.error(err.message);
6703
+ _this7.$message.error(err.message);
6874
6704
  }
6875
- _this6.tableLoading = false;
6705
+ _this7.tableLoading = false;
6876
6706
  });
6877
6707
  },
6878
6708
  selectionChange: function selectionChange(data) {
@@ -6917,7 +6747,7 @@ var mainvue_type_script_lang_js_components, _watch;
6917
6747
  this.$emit('change', data, this.datas);
6918
6748
  },
6919
6749
  handleAjax: function handleAjax(handle, row) {
6920
- var _this7 = this;
6750
+ var _this8 = this;
6921
6751
 
6922
6752
  this.changeLoading(true, handle.text + '\u4E2D...');
6923
6753
  var params = handle.param || {};
@@ -6973,9 +6803,9 @@ var mainvue_type_script_lang_js_components, _watch;
6973
6803
  method: handle.method,
6974
6804
  format: handle.format
6975
6805
  }).then(function (res) {
6976
- _this7.changeLoading(false);
6806
+ _this8.changeLoading(false);
6977
6807
  if (res.rCode === 0) {
6978
- _this7.$message({
6808
+ _this8.$message({
6979
6809
  message: handle.text + '\u6210\u529F',
6980
6810
  duration: 2000,
6981
6811
  type: 'success',
@@ -6983,17 +6813,17 @@ var mainvue_type_script_lang_js_components, _watch;
6983
6813
  var first = Object.prototype.hasOwnProperty.call(handle, 'first') ? handle.first : false;
6984
6814
  var reload = handle.reload || true;
6985
6815
  if (reload) {
6986
- _this7.reload({}, first);
6816
+ _this8.reload({}, first);
6987
6817
  }
6988
6818
  }
6989
6819
  });
6990
6820
  } else {
6991
- _this7.$message.error(res.msg || handle.text + '\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01');
6821
+ _this8.$message.error(res.msg || handle.text + '\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01');
6992
6822
  }
6993
6823
  }).catch(function (err) {
6994
- _this7.changeLoading(false);
6824
+ _this8.changeLoading(false);
6995
6825
  if (err.message && err.message !== 'canceled') {
6996
- _this7.$message.error(err.message);
6826
+ _this8.$message.error(err.message);
6997
6827
  }
6998
6828
  });
6999
6829
  },
@@ -7018,7 +6848,7 @@ var mainvue_type_script_lang_js_components, _watch;
7018
6848
  return mainvue_type_script_lang_js_extends({}, obj, item);
7019
6849
  },
7020
6850
  handleClick: function handleClick(res) {
7021
- var _this8 = this;
6851
+ var _this9 = this;
7022
6852
 
7023
6853
  var row = res.row,
7024
6854
  handle = res.handle;
@@ -7054,7 +6884,7 @@ var mainvue_type_script_lang_js_components, _watch;
7054
6884
  cancelButtonText: '取消',
7055
6885
  type: 'warning'
7056
6886
  }).then(function () {
7057
- _this8.handleAjax(handle, rows);
6887
+ _this9.handleAjax(handle, rows);
7058
6888
  }).catch(function () {});
7059
6889
  } else {
7060
6890
  this.handleAjax(handle, rows);
@@ -7142,7 +6972,7 @@ var mainvue_type_script_lang_js_components, _watch;
7142
6972
  var type = ['selection', 'index', 'expand'];
7143
6973
  thead = thead.map(function (item) {
7144
6974
  return item.filter(function (ele) {
7145
- return !type.includes(ele.type) && ele.label !== text && !_this8.exportExcludeLabel.includes(ele.label);
6975
+ return !type.includes(ele.type) && ele.label !== text && !_this9.exportExcludeLabel.includes(ele.label);
7146
6976
  });
7147
6977
  });
7148
6978
  util["a" /* default */].exportXls({
@@ -7248,40 +7078,40 @@ var mainvue_type_script_lang_js_components, _watch;
7248
7078
  }
7249
7079
  },
7250
7080
  resetHeight: function resetHeight(warn) {
7251
- var _this9 = this;
7081
+ var _this10 = this;
7252
7082
 
7253
7083
  this.$nextTick(function () {
7254
- if (_this9.full && !_this9.height && !_this9.maxHeight) {
7255
- var height = _this9.$el.parentNode.offsetHeight;
7084
+ if (_this10.full && !_this10.height && !_this10.maxHeight) {
7085
+ var height = _this10.$el.parentNode.offsetHeight;
7256
7086
  if (height) {
7257
- height = parseInt(util["a" /* default */].getStyle(_this9.$el.parentNode, 'height', '%'), 10);
7258
- 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);
7259
- for (var i = 0; i < _this9.$el.parentNode.childNodes.length; i++) {
7260
- var ele = _this9.$el.parentNode.childNodes[i];
7261
- if (ele !== _this9.$el && ele.offsetHeight !== undefined) {
7087
+ height = parseInt(util["a" /* default */].getStyle(_this10.$el.parentNode, 'height', '%'), 10);
7088
+ 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);
7089
+ for (var i = 0; i < _this10.$el.parentNode.childNodes.length; i++) {
7090
+ var ele = _this10.$el.parentNode.childNodes[i];
7091
+ if (ele !== _this10.$el && ele.offsetHeight !== undefined) {
7262
7092
  height = height - ele.offsetHeight - parseInt(util["a" /* default */].getStyle(ele, 'margin-top'), 10) - parseInt(util["a" /* default */].getStyle(ele, 'margin-bottom'), 10);
7263
7093
  }
7264
7094
  }
7265
- height -= _this9.showToolbar ? 45 : 0;
7266
- height -= _this9.page === false ? 0 : 46;
7267
- height -= _this9.title ? _this9.$refs.title.offsetHeight : 0;
7268
- height -= parseInt(util["a" /* default */].getStyle(_this9.$refs.esTableContent, 'padding-top'), 10);
7269
- height -= parseInt(util["a" /* default */].getStyle(_this9.$refs.esTableContent, 'padding-bottom'), 10);
7270
- var emptyText = _this9.$refs.esTableContent.querySelector('.el-table__empty-text');
7095
+ height -= _this10.showToolbar ? 45 : 0;
7096
+ height -= _this10.page === false ? 0 : 46;
7097
+ height -= _this10.title ? _this10.$refs.title.offsetHeight : 0;
7098
+ height -= parseInt(util["a" /* default */].getStyle(_this10.$refs.esTableContent, 'padding-top'), 10);
7099
+ height -= parseInt(util["a" /* default */].getStyle(_this10.$refs.esTableContent, 'padding-bottom'), 10);
7100
+ var emptyText = _this10.$refs.esTableContent.querySelector('.el-table__empty-text');
7271
7101
  var eht = 0;
7272
7102
  if (emptyText) {
7273
7103
  eht = emptyText.offsetHeight;
7274
- var thead = _this9.$refs.esTableContent.querySelector('.el-table__header');
7104
+ var thead = _this10.$refs.esTableContent.querySelector('.el-table__header');
7275
7105
  thead && (eht += thead.offsetHeight);
7276
7106
  }
7277
7107
  if (height > 1 && height - eht > 1) {
7278
- _this9.tableHeight = height;
7108
+ _this10.tableHeight = height;
7279
7109
  } else {
7280
- console.warn(_this9.$el.parentNode, '\u83B7\u53D6\u4E0D\u5230\u9AD8\u5EA6\uFF01');
7110
+ console.warn(_this10.$el.parentNode, '\u83B7\u53D6\u4E0D\u5230\u9AD8\u5EA6\uFF01');
7281
7111
  }
7282
7112
  } else if (!warn) {
7283
7113
  setTimeout(function () {
7284
- _this9.resetHeight(true);
7114
+ _this10.resetHeight(true);
7285
7115
  }, 1000);
7286
7116
  }
7287
7117
  }
@@ -7311,31 +7141,31 @@ var mainvue_type_script_lang_js_components, _watch;
7311
7141
  this.$emit('sort-change', res);
7312
7142
  },
7313
7143
  mergeThead: function mergeThead(res) {
7314
- var _this10 = this;
7144
+ var _this11 = this;
7315
7145
 
7316
7146
  this.theadData = res;
7317
7147
  this.icon = true;
7318
7148
  setTimeout(function () {
7319
- _this10.show = true;
7149
+ _this11.show = true;
7320
7150
  }, 100);
7321
7151
  },
7322
7152
  setOptions: function setOptions(val, sysCode) {
7323
7153
  this.$set(this.options, sysCode, val);
7324
7154
  },
7325
7155
  bindEventBus: function bindEventBus() {
7326
- var _this11 = this;
7156
+ var _this12 = this;
7327
7157
 
7328
7158
  this.sysCodes.forEach(function (item) {
7329
7159
  bus["a" /* default */].$on(item, function (val) {
7330
- _this11.setOptions(val, item);
7160
+ _this12.setOptions(val, item);
7331
7161
  });
7332
7162
  });
7333
7163
  },
7334
7164
  unbindEventBus: function unbindEventBus() {
7335
- var _this12 = this;
7165
+ var _this13 = this;
7336
7166
 
7337
7167
  this.sysCodes.forEach(function (item) {
7338
- bus["a" /* default */].$off(item, _this12.setOptions);
7168
+ bus["a" /* default */].$off(item, _this13.setOptions);
7339
7169
  });
7340
7170
  }
7341
7171
  }
@@ -7352,7 +7182,7 @@ var mainvue_type_script_lang_js_components, _watch;
7352
7182
 
7353
7183
  var main_component = Object(componentNormalizer["a" /* default */])(
7354
7184
  src_mainvue_type_script_lang_js_,
7355
- mainvue_type_template_id_4564aac4_render,
7185
+ mainvue_type_template_id_a455250e_render,
7356
7186
  staticRenderFns,
7357
7187
  false,
7358
7188
  null,