hrsass-components 1.7.71 → 1.7.73

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.
@@ -65,7 +65,7 @@ var contentStyle = _interopDefault(require('!!raw-loader!tinymce/skins/content/d
65
65
  var SvgPanZoom = _interopDefault(require('svg-pan-zoom'));
66
66
  var saveSvgAsPng = require('save-svg-as-png');
67
67
 
68
- var version = "1.7.71";
68
+ var version = "1.7.73";
69
69
 
70
70
  /**
71
71
  * 版本号
@@ -7583,17 +7583,24 @@ var HrTableBase = {
7583
7583
  },
7584
7584
  _getDefaultHeight: function _getDefaultHeight(height) {
7585
7585
  // 定义常量,用于表示表格头部高度、工具栏高度、搜索框高度、布局内边距、表格头部高度以及分页组件高度
7586
- var headHeight = 48,
7587
- toolbarHeight = 32,
7588
- searchHeight = 120,
7589
- layoutPadding = 38,
7590
- tableHeaderHeight = 68,
7591
- // 根据条件判断是否显示分页组件,如果显示则高度为60,否则为0
7592
- paginationHeight = this.$props.pagination ? 60 : 0;
7593
- var defaultHeight = parseInt(window.innerHeight - headHeight - toolbarHeight - searchHeight - layoutPadding - tableHeaderHeight - paginationHeight);
7594
- if (this.dataList.length > 0 && this.$parent.$parent.$el.clientHeight - tableHeaderHeight - paginationHeight > defaultHeight) {
7595
- return defaultHeight;
7596
- }
7586
+ // var headHeight = 48,
7587
+ // toolbarHeight = 32,
7588
+ // searchHeight = 120,
7589
+ // layoutPadding = 60,
7590
+ // tableHeaderHeight = 68,
7591
+ // // 根据条件判断是否显示分页组件,如果显示则高度为56.5 ,否则为0
7592
+ // paginationHeight = this.$props.pagination ? 56.5 : 0,
7593
+ // tableRowHeight = 47.5;
7594
+
7595
+ // this.$refs.tableToolbar &&
7596
+ // (searchHeight = this.$refs.tableToolbar.$el.clientHeight + 24);
7597
+
7598
+ // // 默认高度为窗口高度减去以上所有高度
7599
+ // var defaultHeight = parseInt(window.innerHeight - headHeight - toolbarHeight - searchHeight - layoutPadding - tableHeaderHeight - paginationHeight);
7600
+ // if (this.dataList.length > 0) {
7601
+ // var tableHeight = this.$parent.$parent.$el.clientHeight + tableRowHeight * this.dataList.length - searchHeight - tableHeaderHeight - paginationHeight;
7602
+ // return tableHeight - defaultHeight > 0 ? defaultHeight : tableHeight;
7603
+ // }
7597
7604
  return height;
7598
7605
  },
7599
7606
  _renderTableBase: function _renderTableBase(locale) {
@@ -7636,6 +7643,7 @@ var HrTableBase = {
7636
7643
  var hasReset = title && (_conditions.length > 0 || typeof $listeners.reset === "function");
7637
7644
  var titleSolt = title && $scopedSlots.title ? this.normalizeTitleSlot($scopedSlots.title()) : null;
7638
7645
  var toolbar = title ? h(Toolbar, [h(TableToolbar, {
7646
+ ref: "tableToolbar",
7639
7647
  attrs: {
7640
7648
  data: _conditions,
7641
7649
  locale: locale,
@@ -7889,11 +7897,11 @@ var stateMap = {
7889
7897
  loaded: 2
7890
7898
  };
7891
7899
  var index = {
7892
- name: 'HrTable',
7900
+ name: "HrTable",
7893
7901
  mixins: [BaseMixin],
7894
7902
  props: initDefaultProps(TableProps, {
7895
- prefixCls: 'hr-table',
7896
- rowKey: '',
7903
+ prefixCls: "hr-table",
7904
+ rowKey: "",
7897
7905
  multiple: true,
7898
7906
  //是否多选
7899
7907
  columns: [],
@@ -7916,7 +7924,7 @@ var index = {
7916
7924
  //自动加载数据
7917
7925
  // action: { fixed: false, width: 100 }, //操作列宽度和锁定
7918
7926
  action: {
7919
- fixed: 'right',
7927
+ fixed: "right",
7920
7928
  width: 100
7921
7929
  },
7922
7930
  //操作列宽度和锁定
@@ -8018,7 +8026,7 @@ var index = {
8018
8026
  if (this.$refs.tableBase.$el) {
8019
8027
  resizeDetector.removeListener(this.$refs.tableBase.$el, this._setMaxWidth);
8020
8028
  }
8021
- console.log('hr-table beforeDestroy');
8029
+ console.log("hr-table beforeDestroy");
8022
8030
  },
8023
8031
  mounted: function mounted() {
8024
8032
  var _getOptionProps = getOptionProps(this),
@@ -8153,7 +8161,7 @@ var index = {
8153
8161
  if (sortColumn) {
8154
8162
  sort = [{
8155
8163
  field: sortColumn.sorterName || sortColumn.columnName,
8156
- style: sorter.order === 'descend' ? 'DESC' : 'ASC'
8164
+ style: sorter.order === "descend" ? "DESC" : "ASC"
8157
8165
  }];
8158
8166
  }
8159
8167
  }
@@ -8167,7 +8175,16 @@ var index = {
8167
8175
  if (this.selectedSchemeId && this.editSchemeId !== this.selectedSchemeId) {
8168
8176
  _conditionList = _conditionList.concat(conditionListByScheme);
8169
8177
  }
8170
- console.log('selected id', this.editSchemeId, this.selectedSchemeId, tempConditionListByScheme, conditionListByScheme);
8178
+ var conditonListDeepClone = _.cloneDeep(_conditionList);
8179
+ conditonListDeepClone.map(function (item) {
8180
+ if (item.code === "p_deptHid" && item.codeType === "org_organize_dept_tree_all" || item.controlType === "SELECTOR") {
8181
+ if (_.isArray(item.value)) {
8182
+ item.value = item.value.join(",");
8183
+ }
8184
+ return item;
8185
+ }
8186
+ });
8187
+ console.log("selected id", this.editSchemeId, this.selectedSchemeId, tempConditionListByScheme, conditionListByScheme, conditonListDeepClone);
8171
8188
  this.ajax({
8172
8189
  page: {
8173
8190
  autoCount: true,
@@ -8175,7 +8192,7 @@ var index = {
8175
8192
  pageSize: pagination.pageSize
8176
8193
  },
8177
8194
  sortList: sort,
8178
- conditionList: _conditionList
8195
+ conditionList: conditonListDeepClone
8179
8196
  }).then(function (res) {
8180
8197
  //外部处理数据
8181
8198
  if (lodash.isFunction(normalizeData)) {
@@ -8188,7 +8205,7 @@ var index = {
8188
8205
  dataSource: res.dataList,
8189
8206
  loading: false
8190
8207
  });
8191
- _this5.$emit('load');
8208
+ _this5.$emit("load");
8192
8209
  });
8193
8210
  },
8194
8211
  //分页、排序
@@ -8267,7 +8284,7 @@ var index = {
8267
8284
  conditionListByScheme = this.conditionListByScheme;
8268
8285
  console.log(tempConditionListByScheme, conditionListByScheme);
8269
8286
  var _conditionList = conditionList.filter(function (item) {
8270
- return item.value || item.controlType === 'SWITCH';
8287
+ return item.value || item.controlType === "SWITCH";
8271
8288
  });
8272
8289
  var opts = {
8273
8290
  condition: _conditionList.concat(tempConditionListByScheme, conditionListByScheme),
@@ -8275,7 +8292,7 @@ var index = {
8275
8292
  };
8276
8293
  this.$axios.post("platform/imp/downloadGridData.search?code=".concat(code), opts).then(function (res) {
8277
8294
  //下载完成后动画
8278
- var div = document.createElement('div');
8295
+ var div = document.createElement("div");
8279
8296
  document.body.appendChild(div);
8280
8297
  var _top = e.clientY - 40,
8281
8298
  _right = document.body.clientWidth - e.clientX - 12;
@@ -8287,9 +8304,9 @@ var index = {
8287
8304
  duration = 2.5;
8288
8305
  }
8289
8306
  var sty = {
8290
- top: _top + 'px',
8291
- right: _right + 'px',
8292
- 'animation-duration': duration + 's'
8307
+ top: _top + "px",
8308
+ right: _right + "px",
8309
+ "animation-duration": duration + "s"
8293
8310
  };
8294
8311
  new Vue({
8295
8312
  el: div,
@@ -8408,7 +8425,7 @@ var index = {
8408
8425
  current: 1
8409
8426
  })
8410
8427
  }, function () {
8411
- _this11.$emit('search', function () {
8428
+ _this11.$emit("search", function () {
8412
8429
  _this11._getData();
8413
8430
  }, _this11);
8414
8431
  });
@@ -8491,7 +8508,7 @@ var index = {
8491
8508
  _this12._downloadHandler(columns, e);
8492
8509
  },
8493
8510
  "rowSelected": function rowSelected(rows) {
8494
- _this12.$emit('rowSelected', rows);
8511
+ _this12.$emit("rowSelected", rows);
8495
8512
  },
8496
8513
  "schemeChange": function schemeChange(id) {
8497
8514
  _this12.editSchemeId = null;
@@ -8517,7 +8534,7 @@ var index = {
8517
8534
  _this12.searchHandler();
8518
8535
  },
8519
8536
  "cellClick": function cellClick(column, record) {
8520
- _this12.$emit('cellClick', column, record);
8537
+ _this12.$emit("cellClick", column, record);
8521
8538
  },
8522
8539
  "settingChange": function settingChange(cols) {
8523
8540
  _this12.setState({