hrsass-components 2.3.4 → 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.
- package/lib/hrsass-components.js +79 -95
- package/lib/hrsass-components.min.js +1 -1
- package/package.json +1 -1
package/lib/hrsass-components.js
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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 = rows.filter(function (item) {
|
|
8239
|
-
return !_this2.selectedUpdateRows.some(function (selectedItem) {
|
|
8240
|
-
return selectedItem.id === item.id || selectedItem.t_0_hid === item.t_0_hid;
|
|
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
|
|
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
|
-
|
|
8264
|
+
_this2.schemeList = res || [];
|
|
8283
8265
|
//当前已选中修改的方案,则查看是否在列表中
|
|
8284
8266
|
//在方案列表中,说明是修改,需更新当前条件
|
|
8285
8267
|
//不在方案列表中,则为删除,清空条件
|
|
8286
|
-
if (id && id ===
|
|
8287
|
-
var _selectedScheme =
|
|
8268
|
+
if (id && id === _this2.selectedSchemeId) {
|
|
8269
|
+
var _selectedScheme = _this2.schemeList.find(function (item) {
|
|
8288
8270
|
return item.id === id;
|
|
8289
8271
|
});
|
|
8290
|
-
|
|
8291
|
-
|
|
8272
|
+
_this2.conditionListByScheme = [];
|
|
8273
|
+
_this2.schemeSearchHandler(_selectedScheme);
|
|
8292
8274
|
}
|
|
8293
8275
|
})["finally"](function () {
|
|
8294
|
-
|
|
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
|
|
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
|
|
8290
|
+
return _this3.$axios.post(url, data);
|
|
8309
8291
|
});
|
|
8310
8292
|
}
|
|
8311
8293
|
},
|
|
8312
8294
|
_getConfig: function _getConfig() {
|
|
8313
|
-
var
|
|
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
|
-
|
|
8311
|
+
_this4.configState = stateMap.loaded;
|
|
8330
8312
|
var conditions = res.conditions || [];
|
|
8331
8313
|
var _query = queryData;
|
|
8332
|
-
if (
|
|
8333
|
-
_query =
|
|
8334
|
-
|
|
8335
|
-
|
|
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
|
-
|
|
8338
|
+
_this4.setState({
|
|
8357
8339
|
columnList: columns,
|
|
8358
8340
|
conditionList: conditions
|
|
8359
8341
|
}, function () {
|
|
8360
|
-
if (
|
|
8361
|
-
|
|
8342
|
+
if (_this4.autoLoad) {
|
|
8343
|
+
_this4._getData();
|
|
8362
8344
|
} else {
|
|
8363
|
-
|
|
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
|
|
8354
|
+
var _this5 = this;
|
|
8373
8355
|
var pagination = this.pagination,
|
|
8374
8356
|
conditionList = this.conditionList,
|
|
8375
8357
|
sorter = this.sorter,
|
|
@@ -8423,46 +8405,48 @@ var index = {
|
|
|
8423
8405
|
sortList: sort,
|
|
8424
8406
|
conditionList: [].concat(_toConsumableArray(fitlerOtehrConditionListDeepClone), _toConsumableArray(fitlerConditionListDeepClone))
|
|
8425
8407
|
}).then(function (res) {
|
|
8426
|
-
var
|
|
8408
|
+
var _this5$selectedRowsLi, _this5$selectedRowsLi2;
|
|
8409
|
+
//res.dataList根据rowKey去重
|
|
8410
|
+
res.dataList = _.uniqBy(res.dataList, _this5.rowKey || 'id');
|
|
8427
8411
|
//外部处理数据
|
|
8428
8412
|
if (lodash.isFunction(normalizeData)) {
|
|
8429
8413
|
res = normalizeData(res);
|
|
8430
8414
|
}
|
|
8431
8415
|
//处理props传入的已选中
|
|
8432
|
-
if ((
|
|
8433
|
-
var selectedRowIds =
|
|
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) {
|
|
8434
8418
|
return _typeof(item) === 'object' ? item.id || item.t_0_hid : item;
|
|
8435
8419
|
});
|
|
8436
|
-
|
|
8420
|
+
_this5.selectedUpdateRows = res.dataList.filter(function (item) {
|
|
8437
8421
|
return selectedRowIds.includes(item.t_0_hid) || (selectedRowIds || []).map(function (id) {
|
|
8438
8422
|
return id + '';
|
|
8439
8423
|
}).includes(item.id + '');
|
|
8440
8424
|
});
|
|
8441
|
-
if (
|
|
8442
|
-
var notInCurrentPageRows =
|
|
8443
|
-
return !
|
|
8444
|
-
return
|
|
8425
|
+
if (_this5.keepSelected) {
|
|
8426
|
+
var notInCurrentPageRows = _this5.selectedRowsList.filter(function (item) {
|
|
8427
|
+
return !_this5.selectedUpdateRows.some(function (selectedItem) {
|
|
8428
|
+
return item.id === selectedItem.id;
|
|
8445
8429
|
});
|
|
8446
8430
|
});
|
|
8447
|
-
|
|
8431
|
+
_this5.selectedUpdateRows = _this5.selectedUpdateRows.concat(notInCurrentPageRows);
|
|
8448
8432
|
}
|
|
8449
8433
|
}
|
|
8450
|
-
if ((
|
|
8451
|
-
|
|
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();
|
|
8452
8436
|
}
|
|
8453
|
-
|
|
8437
|
+
_this5.setState({
|
|
8454
8438
|
pagination: _objectSpread$d(_objectSpread$d({}, pagination), {}, {
|
|
8455
8439
|
total: res.total
|
|
8456
8440
|
}),
|
|
8457
8441
|
dataSource: res.dataList,
|
|
8458
8442
|
loading: false
|
|
8459
8443
|
});
|
|
8460
|
-
|
|
8444
|
+
_this5.$emit("load");
|
|
8461
8445
|
});
|
|
8462
8446
|
},
|
|
8463
8447
|
//分页、排序
|
|
8464
8448
|
_handleTableChange: function _handleTableChange(pager, filters) {
|
|
8465
|
-
var
|
|
8449
|
+
var _this6 = this;
|
|
8466
8450
|
var sort = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8467
8451
|
var pagination = this.pagination;
|
|
8468
8452
|
this.setState({
|
|
@@ -8476,7 +8460,7 @@ var index = {
|
|
|
8476
8460
|
field: sort.field
|
|
8477
8461
|
}
|
|
8478
8462
|
}, function () {
|
|
8479
|
-
|
|
8463
|
+
_this6._getData();
|
|
8480
8464
|
});
|
|
8481
8465
|
},
|
|
8482
8466
|
/**
|
|
@@ -8563,10 +8547,10 @@ var index = {
|
|
|
8563
8547
|
new Vue({
|
|
8564
8548
|
el: div,
|
|
8565
8549
|
mounted: function mounted() {
|
|
8566
|
-
var
|
|
8550
|
+
var _this7 = this;
|
|
8567
8551
|
setTimeout(function () {
|
|
8568
|
-
|
|
8569
|
-
|
|
8552
|
+
_this7.$destroy();
|
|
8553
|
+
_this7.$el.parentNode.removeChild(_this7.$el);
|
|
8570
8554
|
}, (duration + 0.5) * 1000);
|
|
8571
8555
|
},
|
|
8572
8556
|
render: function render() {
|
|
@@ -8595,19 +8579,19 @@ var index = {
|
|
|
8595
8579
|
* 刷新表格
|
|
8596
8580
|
*/
|
|
8597
8581
|
refresh: function refresh() {
|
|
8598
|
-
var
|
|
8582
|
+
var _this8 = this;
|
|
8599
8583
|
var pagination = this.pagination;
|
|
8600
8584
|
pagination.current = 1;
|
|
8601
8585
|
this.setState({
|
|
8602
8586
|
pagination: pagination
|
|
8603
8587
|
}, function () {
|
|
8604
|
-
|
|
8588
|
+
_this8._getData();
|
|
8605
8589
|
});
|
|
8606
8590
|
},
|
|
8607
8591
|
getSchemeConditionList: function getSchemeConditionList(id) {
|
|
8608
|
-
var
|
|
8592
|
+
var _this9 = this;
|
|
8609
8593
|
return new Promise(function (resolve, reject) {
|
|
8610
|
-
|
|
8594
|
+
_this9.$axios.get("/platform/userself/condition/getUserScreeningScheme.search?id=".concat(id)).then(function (res) {
|
|
8611
8595
|
var list = [];
|
|
8612
8596
|
(res && res.userScreeningConditionVOList || []).map(function (item) {
|
|
8613
8597
|
if (item.conditionList) {
|
|
@@ -8627,20 +8611,20 @@ var index = {
|
|
|
8627
8611
|
},
|
|
8628
8612
|
//选择方案搜索
|
|
8629
8613
|
schemeSearchHandler: function schemeSearchHandler(scheme) {
|
|
8630
|
-
var
|
|
8614
|
+
var _this10 = this;
|
|
8631
8615
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
8632
8616
|
var list;
|
|
8633
8617
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
8634
8618
|
while (1) switch (_context.prev = _context.next) {
|
|
8635
8619
|
case 0:
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8620
|
+
_this10.loading = true;
|
|
8621
|
+
_this10.tempConditionListByScheme = [];
|
|
8622
|
+
_this10.selectedSchemeId = scheme && scheme.id;
|
|
8639
8623
|
if (scheme) {
|
|
8640
8624
|
_context.next = 7;
|
|
8641
8625
|
break;
|
|
8642
8626
|
}
|
|
8643
|
-
|
|
8627
|
+
_this10.conditionListByScheme = [];
|
|
8644
8628
|
_context.next = 16;
|
|
8645
8629
|
break;
|
|
8646
8630
|
case 7:
|
|
@@ -8648,18 +8632,18 @@ var index = {
|
|
|
8648
8632
|
_context.next = 11;
|
|
8649
8633
|
break;
|
|
8650
8634
|
}
|
|
8651
|
-
|
|
8635
|
+
_this10.conditionListByScheme = scheme.$$conditionList;
|
|
8652
8636
|
_context.next = 16;
|
|
8653
8637
|
break;
|
|
8654
8638
|
case 11:
|
|
8655
8639
|
_context.next = 13;
|
|
8656
|
-
return
|
|
8640
|
+
return _this10.getSchemeConditionList(scheme.id);
|
|
8657
8641
|
case 13:
|
|
8658
8642
|
list = _context.sent;
|
|
8659
|
-
|
|
8660
|
-
|
|
8643
|
+
_this10.setSchemeConditionList(scheme.id, list);
|
|
8644
|
+
_this10.conditionListByScheme = list;
|
|
8661
8645
|
case 16:
|
|
8662
|
-
|
|
8646
|
+
_this10.searchHandler();
|
|
8663
8647
|
case 17:
|
|
8664
8648
|
case "end":
|
|
8665
8649
|
return _context.stop();
|
|
@@ -8669,7 +8653,7 @@ var index = {
|
|
|
8669
8653
|
},
|
|
8670
8654
|
//搜索
|
|
8671
8655
|
searchHandler: function searchHandler() {
|
|
8672
|
-
var
|
|
8656
|
+
var _this11 = this;
|
|
8673
8657
|
var pagination = this.pagination;
|
|
8674
8658
|
if (this.$listeners.search) {
|
|
8675
8659
|
this.setState({
|
|
@@ -8677,9 +8661,9 @@ var index = {
|
|
|
8677
8661
|
current: 1
|
|
8678
8662
|
})
|
|
8679
8663
|
}, function () {
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
},
|
|
8664
|
+
_this11.$emit("search", function () {
|
|
8665
|
+
_this11._getData();
|
|
8666
|
+
}, _this11);
|
|
8683
8667
|
});
|
|
8684
8668
|
} else {
|
|
8685
8669
|
this.setState({
|
|
@@ -8687,7 +8671,7 @@ var index = {
|
|
|
8687
8671
|
current: 1
|
|
8688
8672
|
})
|
|
8689
8673
|
}, function () {
|
|
8690
|
-
|
|
8674
|
+
_this11._getData();
|
|
8691
8675
|
});
|
|
8692
8676
|
}
|
|
8693
8677
|
},
|
|
@@ -8696,7 +8680,7 @@ var index = {
|
|
|
8696
8680
|
}
|
|
8697
8681
|
},
|
|
8698
8682
|
render: function render() {
|
|
8699
|
-
var
|
|
8683
|
+
var _this12 = this;
|
|
8700
8684
|
var h = arguments[0];
|
|
8701
8685
|
var $scopedSlots = this.$scopedSlots,
|
|
8702
8686
|
loading = this.loading,
|
|
@@ -8754,42 +8738,42 @@ var index = {
|
|
|
8754
8738
|
scopedSlots: $scopedSlots,
|
|
8755
8739
|
on: {
|
|
8756
8740
|
"change": function change(pagination, filters, sorter) {
|
|
8757
|
-
|
|
8741
|
+
_this12._handleTableChange(pagination, filters, sorter);
|
|
8758
8742
|
},
|
|
8759
8743
|
"download": function download(columns, e) {
|
|
8760
|
-
|
|
8744
|
+
_this12._downloadHandler(columns, e);
|
|
8761
8745
|
},
|
|
8762
8746
|
"rowSelected": function rowSelected(rows) {
|
|
8763
|
-
|
|
8747
|
+
_this12.$emit("rowSelected", rows);
|
|
8764
8748
|
},
|
|
8765
8749
|
"schemeChange": function schemeChange(id) {
|
|
8766
|
-
|
|
8750
|
+
_this12.editSchemeId = null;
|
|
8767
8751
|
if (id) {
|
|
8768
|
-
|
|
8752
|
+
_this12._getSchemeList(id);
|
|
8769
8753
|
} else {
|
|
8770
8754
|
// this.selectedSchemeId = null;
|
|
8771
|
-
|
|
8755
|
+
_this12._getSchemeList();
|
|
8772
8756
|
}
|
|
8773
8757
|
},
|
|
8774
8758
|
"tempSearch": function tempSearch(tempConditionList, schemeId) {
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8759
|
+
_this12.tempConditionListByScheme = tempConditionList;
|
|
8760
|
+
_this12.editSchemeId = schemeId;
|
|
8761
|
+
_this12.searchHandler();
|
|
8778
8762
|
},
|
|
8779
8763
|
"schemeSearch": function schemeSearch(scheme) {
|
|
8780
|
-
|
|
8781
|
-
|
|
8764
|
+
_this12.editSchemeId = null;
|
|
8765
|
+
_this12.schemeSearchHandler(scheme);
|
|
8782
8766
|
},
|
|
8783
8767
|
"search": function search() {
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8768
|
+
_this12.tempConditionListByScheme = [];
|
|
8769
|
+
_this12.editSchemeId = null;
|
|
8770
|
+
_this12.searchHandler();
|
|
8787
8771
|
},
|
|
8788
8772
|
"cellClick": function cellClick(column, record) {
|
|
8789
|
-
|
|
8773
|
+
_this12.$emit("cellClick", column, record);
|
|
8790
8774
|
},
|
|
8791
8775
|
"settingChange": function settingChange(cols) {
|
|
8792
|
-
|
|
8776
|
+
_this12.setState({
|
|
8793
8777
|
columnList: columnList.map(function (c) {
|
|
8794
8778
|
var column = cols.find(function (o) {
|
|
8795
8779
|
return o.columnName === c.columnName;
|
|
@@ -8799,7 +8783,7 @@ var index = {
|
|
|
8799
8783
|
});
|
|
8800
8784
|
})
|
|
8801
8785
|
}, function () {
|
|
8802
|
-
|
|
8786
|
+
_this12._setMaxWidth();
|
|
8803
8787
|
});
|
|
8804
8788
|
}
|
|
8805
8789
|
}
|