hrsass-components 2.3.5 → 2.3.6

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 = "2.3.5";
68
+ var version = "2.3.6";
69
69
 
70
70
  /**
71
71
  * 版本号
@@ -8217,31 +8217,13 @@ var index = {
8217
8217
  //根据回填传的rowIds,过滤选中的行
8218
8218
  selectedRowsList: {
8219
8219
  handler: function handler(rows) {
8220
- var _this2 = this;
8221
8220
  var rowIds = rows.map(function (item) {
8222
8221
  return _typeof(item) === 'object' ? item.id || item.t_0_hid : item;
8223
8222
  });
8224
- var _selectedUpdateRows = this.dataSource.filter(function (item) {
8225
- return rowIds.includes(item.t_0_hid) || rowIds.map(function (id) {
8226
- return id + '';
8227
- }).includes(item.id + '');
8228
- });
8223
+ this.selectedUpdateRows = rows;
8229
8224
  if (rowIds.length === 0) {
8230
8225
  this.selectedUpdateRows = [];
8231
8226
  }
8232
- this.selectedUpdateRows = _selectedUpdateRows.some(function (item) {
8233
- return _this2.selectedUpdateRows.find(function (selectedItem) {
8234
- return selectedItem.id === item.id || selectedItem.t_0_hid === item.t_0_hid;
8235
- });
8236
- }) ? _selectedUpdateRows : this.selectedUpdateRows.concat(_selectedUpdateRows);
8237
- if (this.keepSelected) {
8238
- var notInCurrentPageRows = this.selectedRowsList.filter(function (item) {
8239
- return !_this2.selectedUpdateRows.some(function (selectedItem) {
8240
- return item.id === selectedItem.id;
8241
- });
8242
- });
8243
- this.selectedUpdateRows = this.selectedUpdateRows.concat(notInCurrentPageRows);
8244
- }
8245
8227
  },
8246
8228
  immediate: true
8247
8229
  }
@@ -8271,7 +8253,7 @@ var index = {
8271
8253
  methods: {
8272
8254
  //方案列表
8273
8255
  _getSchemeList: function _getSchemeList(id) {
8274
- var _this3 = this;
8256
+ var _this2 = this;
8275
8257
  var _getOptionProps2 = getOptionProps(this),
8276
8258
  code = _getOptionProps2.code;
8277
8259
  this.setState({
@@ -8279,19 +8261,19 @@ var index = {
8279
8261
  });
8280
8262
  if (code) {
8281
8263
  this.$axios.get("/platform/userself/condition/getUserScreeningSchemeList.search?gridCode=".concat(code)).then(function (res) {
8282
- _this3.schemeList = res || [];
8264
+ _this2.schemeList = res || [];
8283
8265
  //当前已选中修改的方案,则查看是否在列表中
8284
8266
  //在方案列表中,说明是修改,需更新当前条件
8285
8267
  //不在方案列表中,则为删除,清空条件
8286
- if (id && id === _this3.selectedSchemeId) {
8287
- var _selectedScheme = _this3.schemeList.find(function (item) {
8268
+ if (id && id === _this2.selectedSchemeId) {
8269
+ var _selectedScheme = _this2.schemeList.find(function (item) {
8288
8270
  return item.id === id;
8289
8271
  });
8290
- _this3.conditionListByScheme = [];
8291
- _this3.schemeSearchHandler(_selectedScheme);
8272
+ _this2.conditionListByScheme = [];
8273
+ _this2.schemeSearchHandler(_selectedScheme);
8292
8274
  }
8293
8275
  })["finally"](function () {
8294
- _this3.setState({
8276
+ _this2.setState({
8295
8277
  loading: false
8296
8278
  });
8297
8279
  });
@@ -8299,18 +8281,18 @@ var index = {
8299
8281
  },
8300
8282
  //包装请求函数
8301
8283
  _getWrapAjax: function _getWrapAjax() {
8302
- var _this4 = this;
8284
+ var _this3 = this;
8303
8285
  var _getOptionProps3 = getOptionProps(this),
8304
8286
  code = _getOptionProps3.code;
8305
8287
  if (code && !this.ajax) {
8306
8288
  var url = "platform/metadata/executeGridSearch.search?code=".concat(code);
8307
8289
  this.ajax = warpFun(function (data) {
8308
- return _this4.$axios.post(url, data);
8290
+ return _this3.$axios.post(url, data);
8309
8291
  });
8310
8292
  }
8311
8293
  },
8312
8294
  _getConfig: function _getConfig() {
8313
- var _this5 = this;
8295
+ var _this4 = this;
8314
8296
  var _getOptionProps4 = getOptionProps(this),
8315
8297
  code = _getOptionProps4.code,
8316
8298
  _getOptionProps4$quer = _getOptionProps4.queryData,
@@ -8326,13 +8308,13 @@ var index = {
8326
8308
  if (lodash.isFunction(normalizeConfig)) {
8327
8309
  res = normalizeConfig(res);
8328
8310
  }
8329
- _this5.configState = stateMap.loaded;
8311
+ _this4.configState = stateMap.loaded;
8330
8312
  var conditions = res.conditions || [];
8331
8313
  var _query = queryData;
8332
- if (_this5.stack.length > 0) {
8333
- _query = _this5.stack[_this5.stack.length - 1];
8334
- _this5.stack.length = 0;
8335
- _this5.data = _query;
8314
+ if (_this4.stack.length > 0) {
8315
+ _query = _this4.stack[_this4.stack.length - 1];
8316
+ _this4.stack.length = 0;
8317
+ _this4.data = _query;
8336
8318
  }
8337
8319
  Object.keys(_query || {}).map(function (key) {
8338
8320
  var condition = conditions.find(function (item) {
@@ -8353,14 +8335,14 @@ var index = {
8353
8335
  columns = columns.map(function (item) {
8354
8336
  return item;
8355
8337
  });
8356
- _this5.setState({
8338
+ _this4.setState({
8357
8339
  columnList: columns,
8358
8340
  conditionList: conditions
8359
8341
  }, function () {
8360
- if (_this5.autoLoad) {
8361
- _this5._getData();
8342
+ if (_this4.autoLoad) {
8343
+ _this4._getData();
8362
8344
  } else {
8363
- _this5.setState({
8345
+ _this4.setState({
8364
8346
  loading: false
8365
8347
  });
8366
8348
  }
@@ -8369,7 +8351,7 @@ var index = {
8369
8351
  }
8370
8352
  },
8371
8353
  _getData: function _getData() {
8372
- var _this6 = this;
8354
+ var _this5 = this;
8373
8355
  var pagination = this.pagination,
8374
8356
  conditionList = this.conditionList,
8375
8357
  sorter = this.sorter,
@@ -8423,48 +8405,48 @@ var index = {
8423
8405
  sortList: sort,
8424
8406
  conditionList: [].concat(_toConsumableArray(fitlerOtehrConditionListDeepClone), _toConsumableArray(fitlerConditionListDeepClone))
8425
8407
  }).then(function (res) {
8426
- var _this6$selectedRowsLi, _this6$selectedRowsLi2;
8408
+ var _this5$selectedRowsLi, _this5$selectedRowsLi2;
8427
8409
  //res.dataList根据rowKey去重
8428
- res.dataList = _.uniqBy(res.dataList, _this6.rowKey || 'id');
8410
+ res.dataList = _.uniqBy(res.dataList, _this5.rowKey || 'id');
8429
8411
  //外部处理数据
8430
8412
  if (lodash.isFunction(normalizeData)) {
8431
8413
  res = normalizeData(res);
8432
8414
  }
8433
8415
  //处理props传入的已选中
8434
- if ((_this6 === null || _this6 === void 0 || (_this6$selectedRowsLi = _this6.selectedRowsList) === null || _this6$selectedRowsLi === void 0 ? void 0 : _this6$selectedRowsLi.length) > 0) {
8435
- var selectedRowIds = _this6.selectedRowsList.map(function (item) {
8416
+ if ((_this5 === null || _this5 === void 0 || (_this5$selectedRowsLi = _this5.selectedRowsList) === null || _this5$selectedRowsLi === void 0 ? void 0 : _this5$selectedRowsLi.length) > 0) {
8417
+ var selectedRowIds = _this5.selectedRowsList.map(function (item) {
8436
8418
  return _typeof(item) === 'object' ? item.id || item.t_0_hid : item;
8437
8419
  });
8438
- _this6.selectedUpdateRows = res.dataList.filter(function (item) {
8420
+ _this5.selectedUpdateRows = res.dataList.filter(function (item) {
8439
8421
  return selectedRowIds.includes(item.t_0_hid) || (selectedRowIds || []).map(function (id) {
8440
8422
  return id + '';
8441
8423
  }).includes(item.id + '');
8442
8424
  });
8443
- if (_this6.keepSelected) {
8444
- var notInCurrentPageRows = _this6.selectedRowsList.filter(function (item) {
8445
- return !_this6.selectedUpdateRows.some(function (selectedItem) {
8425
+ if (_this5.keepSelected) {
8426
+ var notInCurrentPageRows = _this5.selectedRowsList.filter(function (item) {
8427
+ return !_this5.selectedUpdateRows.some(function (selectedItem) {
8446
8428
  return item.id === selectedItem.id;
8447
8429
  });
8448
8430
  });
8449
- _this6.selectedUpdateRows = _this6.selectedUpdateRows.concat(notInCurrentPageRows);
8431
+ _this5.selectedUpdateRows = _this5.selectedUpdateRows.concat(notInCurrentPageRows);
8450
8432
  }
8451
8433
  }
8452
- if ((_this6 === null || _this6 === void 0 || (_this6$selectedRowsLi2 = _this6.selectedRowsList) === null || _this6$selectedRowsLi2 === void 0 ? void 0 : _this6$selectedRowsLi2.length) == 0) {
8453
- _this6.clearSelectedRows();
8434
+ if ((_this5 === null || _this5 === void 0 || (_this5$selectedRowsLi2 = _this5.selectedRowsList) === null || _this5$selectedRowsLi2 === void 0 ? void 0 : _this5$selectedRowsLi2.length) == 0) {
8435
+ _this5.clearSelectedRows();
8454
8436
  }
8455
- _this6.setState({
8437
+ _this5.setState({
8456
8438
  pagination: _objectSpread$d(_objectSpread$d({}, pagination), {}, {
8457
8439
  total: res.total
8458
8440
  }),
8459
8441
  dataSource: res.dataList,
8460
8442
  loading: false
8461
8443
  });
8462
- _this6.$emit("load");
8444
+ _this5.$emit("load");
8463
8445
  });
8464
8446
  },
8465
8447
  //分页、排序
8466
8448
  _handleTableChange: function _handleTableChange(pager, filters) {
8467
- var _this7 = this;
8449
+ var _this6 = this;
8468
8450
  var sort = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
8469
8451
  var pagination = this.pagination;
8470
8452
  this.setState({
@@ -8478,7 +8460,7 @@ var index = {
8478
8460
  field: sort.field
8479
8461
  }
8480
8462
  }, function () {
8481
- _this7._getData();
8463
+ _this6._getData();
8482
8464
  });
8483
8465
  },
8484
8466
  /**
@@ -8565,10 +8547,10 @@ var index = {
8565
8547
  new Vue({
8566
8548
  el: div,
8567
8549
  mounted: function mounted() {
8568
- var _this8 = this;
8550
+ var _this7 = this;
8569
8551
  setTimeout(function () {
8570
- _this8.$destroy();
8571
- _this8.$el.parentNode.removeChild(_this8.$el);
8552
+ _this7.$destroy();
8553
+ _this7.$el.parentNode.removeChild(_this7.$el);
8572
8554
  }, (duration + 0.5) * 1000);
8573
8555
  },
8574
8556
  render: function render() {
@@ -8597,19 +8579,19 @@ var index = {
8597
8579
  * 刷新表格
8598
8580
  */
8599
8581
  refresh: function refresh() {
8600
- var _this9 = this;
8582
+ var _this8 = this;
8601
8583
  var pagination = this.pagination;
8602
8584
  pagination.current = 1;
8603
8585
  this.setState({
8604
8586
  pagination: pagination
8605
8587
  }, function () {
8606
- _this9._getData();
8588
+ _this8._getData();
8607
8589
  });
8608
8590
  },
8609
8591
  getSchemeConditionList: function getSchemeConditionList(id) {
8610
- var _this10 = this;
8592
+ var _this9 = this;
8611
8593
  return new Promise(function (resolve, reject) {
8612
- _this10.$axios.get("/platform/userself/condition/getUserScreeningScheme.search?id=".concat(id)).then(function (res) {
8594
+ _this9.$axios.get("/platform/userself/condition/getUserScreeningScheme.search?id=".concat(id)).then(function (res) {
8613
8595
  var list = [];
8614
8596
  (res && res.userScreeningConditionVOList || []).map(function (item) {
8615
8597
  if (item.conditionList) {
@@ -8629,20 +8611,20 @@ var index = {
8629
8611
  },
8630
8612
  //选择方案搜索
8631
8613
  schemeSearchHandler: function schemeSearchHandler(scheme) {
8632
- var _this11 = this;
8614
+ var _this10 = this;
8633
8615
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
8634
8616
  var list;
8635
8617
  return _regeneratorRuntime.wrap(function _callee$(_context) {
8636
8618
  while (1) switch (_context.prev = _context.next) {
8637
8619
  case 0:
8638
- _this11.loading = true;
8639
- _this11.tempConditionListByScheme = [];
8640
- _this11.selectedSchemeId = scheme && scheme.id;
8620
+ _this10.loading = true;
8621
+ _this10.tempConditionListByScheme = [];
8622
+ _this10.selectedSchemeId = scheme && scheme.id;
8641
8623
  if (scheme) {
8642
8624
  _context.next = 7;
8643
8625
  break;
8644
8626
  }
8645
- _this11.conditionListByScheme = [];
8627
+ _this10.conditionListByScheme = [];
8646
8628
  _context.next = 16;
8647
8629
  break;
8648
8630
  case 7:
@@ -8650,18 +8632,18 @@ var index = {
8650
8632
  _context.next = 11;
8651
8633
  break;
8652
8634
  }
8653
- _this11.conditionListByScheme = scheme.$$conditionList;
8635
+ _this10.conditionListByScheme = scheme.$$conditionList;
8654
8636
  _context.next = 16;
8655
8637
  break;
8656
8638
  case 11:
8657
8639
  _context.next = 13;
8658
- return _this11.getSchemeConditionList(scheme.id);
8640
+ return _this10.getSchemeConditionList(scheme.id);
8659
8641
  case 13:
8660
8642
  list = _context.sent;
8661
- _this11.setSchemeConditionList(scheme.id, list);
8662
- _this11.conditionListByScheme = list;
8643
+ _this10.setSchemeConditionList(scheme.id, list);
8644
+ _this10.conditionListByScheme = list;
8663
8645
  case 16:
8664
- _this11.searchHandler();
8646
+ _this10.searchHandler();
8665
8647
  case 17:
8666
8648
  case "end":
8667
8649
  return _context.stop();
@@ -8671,7 +8653,7 @@ var index = {
8671
8653
  },
8672
8654
  //搜索
8673
8655
  searchHandler: function searchHandler() {
8674
- var _this12 = this;
8656
+ var _this11 = this;
8675
8657
  var pagination = this.pagination;
8676
8658
  if (this.$listeners.search) {
8677
8659
  this.setState({
@@ -8679,9 +8661,9 @@ var index = {
8679
8661
  current: 1
8680
8662
  })
8681
8663
  }, function () {
8682
- _this12.$emit("search", function () {
8683
- _this12._getData();
8684
- }, _this12);
8664
+ _this11.$emit("search", function () {
8665
+ _this11._getData();
8666
+ }, _this11);
8685
8667
  });
8686
8668
  } else {
8687
8669
  this.setState({
@@ -8689,7 +8671,7 @@ var index = {
8689
8671
  current: 1
8690
8672
  })
8691
8673
  }, function () {
8692
- _this12._getData();
8674
+ _this11._getData();
8693
8675
  });
8694
8676
  }
8695
8677
  },
@@ -8698,7 +8680,7 @@ var index = {
8698
8680
  }
8699
8681
  },
8700
8682
  render: function render() {
8701
- var _this13 = this;
8683
+ var _this12 = this;
8702
8684
  var h = arguments[0];
8703
8685
  var $scopedSlots = this.$scopedSlots,
8704
8686
  loading = this.loading,
@@ -8756,42 +8738,42 @@ var index = {
8756
8738
  scopedSlots: $scopedSlots,
8757
8739
  on: {
8758
8740
  "change": function change(pagination, filters, sorter) {
8759
- _this13._handleTableChange(pagination, filters, sorter);
8741
+ _this12._handleTableChange(pagination, filters, sorter);
8760
8742
  },
8761
8743
  "download": function download(columns, e) {
8762
- _this13._downloadHandler(columns, e);
8744
+ _this12._downloadHandler(columns, e);
8763
8745
  },
8764
8746
  "rowSelected": function rowSelected(rows) {
8765
- _this13.$emit("rowSelected", rows);
8747
+ _this12.$emit("rowSelected", rows);
8766
8748
  },
8767
8749
  "schemeChange": function schemeChange(id) {
8768
- _this13.editSchemeId = null;
8750
+ _this12.editSchemeId = null;
8769
8751
  if (id) {
8770
- _this13._getSchemeList(id);
8752
+ _this12._getSchemeList(id);
8771
8753
  } else {
8772
8754
  // this.selectedSchemeId = null;
8773
- _this13._getSchemeList();
8755
+ _this12._getSchemeList();
8774
8756
  }
8775
8757
  },
8776
8758
  "tempSearch": function tempSearch(tempConditionList, schemeId) {
8777
- _this13.tempConditionListByScheme = tempConditionList;
8778
- _this13.editSchemeId = schemeId;
8779
- _this13.searchHandler();
8759
+ _this12.tempConditionListByScheme = tempConditionList;
8760
+ _this12.editSchemeId = schemeId;
8761
+ _this12.searchHandler();
8780
8762
  },
8781
8763
  "schemeSearch": function schemeSearch(scheme) {
8782
- _this13.editSchemeId = null;
8783
- _this13.schemeSearchHandler(scheme);
8764
+ _this12.editSchemeId = null;
8765
+ _this12.schemeSearchHandler(scheme);
8784
8766
  },
8785
8767
  "search": function search() {
8786
- _this13.tempConditionListByScheme = [];
8787
- _this13.editSchemeId = null;
8788
- _this13.searchHandler();
8768
+ _this12.tempConditionListByScheme = [];
8769
+ _this12.editSchemeId = null;
8770
+ _this12.searchHandler();
8789
8771
  },
8790
8772
  "cellClick": function cellClick(column, record) {
8791
- _this13.$emit("cellClick", column, record);
8773
+ _this12.$emit("cellClick", column, record);
8792
8774
  },
8793
8775
  "settingChange": function settingChange(cols) {
8794
- _this13.setState({
8776
+ _this12.setState({
8795
8777
  columnList: columnList.map(function (c) {
8796
8778
  var column = cols.find(function (o) {
8797
8779
  return o.columnName === c.columnName;
@@ -8801,7 +8783,7 @@ var index = {
8801
8783
  });
8802
8784
  })
8803
8785
  }, function () {
8804
- _this13._setMaxWidth();
8786
+ _this12._setMaxWidth();
8805
8787
  });
8806
8788
  }
8807
8789
  }