hrsass-components 2.2.4 → 2.2.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 +75 -70
- package/lib/hrsass-components.min.js +1 -1
- package/package.json +1 -1
- package/rollup.build.css +10480 -0
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.2.
|
|
68
|
+
var version = "2.2.6";
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* 版本号
|
|
@@ -8044,12 +8044,17 @@ var index = {
|
|
|
8044
8044
|
//根据回填传的rowIds,过滤选中的行
|
|
8045
8045
|
selectedRowsList: {
|
|
8046
8046
|
handler: function handler(rowIds) {
|
|
8047
|
+
var _this2 = this;
|
|
8047
8048
|
var _selectedUpdateRows = this.dataSource.filter(function (item) {
|
|
8048
8049
|
return rowIds.includes(item.t_0_hid) || rowIds.map(function (id) {
|
|
8049
8050
|
return id + '';
|
|
8050
8051
|
}).includes(item.id + '');
|
|
8051
8052
|
});
|
|
8052
|
-
this.selectedUpdateRows = _selectedUpdateRows
|
|
8053
|
+
this.selectedUpdateRows = _selectedUpdateRows.some(function (item) {
|
|
8054
|
+
return _this2.selectedUpdateRows.find(function (selectedItem) {
|
|
8055
|
+
return selectedItem.id === item.id || selectedItem.t_0_hid === item.t_0_hid;
|
|
8056
|
+
});
|
|
8057
|
+
}) ? this.selectedUpdateRows : this.selectedUpdateRows.concat(_selectedUpdateRows);
|
|
8053
8058
|
},
|
|
8054
8059
|
immediate: true
|
|
8055
8060
|
}
|
|
@@ -8079,7 +8084,7 @@ var index = {
|
|
|
8079
8084
|
methods: {
|
|
8080
8085
|
//方案列表
|
|
8081
8086
|
_getSchemeList: function _getSchemeList(id) {
|
|
8082
|
-
var
|
|
8087
|
+
var _this3 = this;
|
|
8083
8088
|
var _getOptionProps2 = getOptionProps(this),
|
|
8084
8089
|
code = _getOptionProps2.code;
|
|
8085
8090
|
this.setState({
|
|
@@ -8087,19 +8092,19 @@ var index = {
|
|
|
8087
8092
|
});
|
|
8088
8093
|
if (code) {
|
|
8089
8094
|
this.$axios.get("/platform/userself/condition/getUserScreeningSchemeList.search?gridCode=".concat(code)).then(function (res) {
|
|
8090
|
-
|
|
8095
|
+
_this3.schemeList = res || [];
|
|
8091
8096
|
//当前已选中修改的方案,则查看是否在列表中
|
|
8092
8097
|
//在方案列表中,说明是修改,需更新当前条件
|
|
8093
8098
|
//不在方案列表中,则为删除,清空条件
|
|
8094
|
-
if (id && id ===
|
|
8095
|
-
var _selectedScheme =
|
|
8099
|
+
if (id && id === _this3.selectedSchemeId) {
|
|
8100
|
+
var _selectedScheme = _this3.schemeList.find(function (item) {
|
|
8096
8101
|
return item.id === id;
|
|
8097
8102
|
});
|
|
8098
|
-
|
|
8099
|
-
|
|
8103
|
+
_this3.conditionListByScheme = [];
|
|
8104
|
+
_this3.schemeSearchHandler(_selectedScheme);
|
|
8100
8105
|
}
|
|
8101
8106
|
})["finally"](function () {
|
|
8102
|
-
|
|
8107
|
+
_this3.setState({
|
|
8103
8108
|
loading: false
|
|
8104
8109
|
});
|
|
8105
8110
|
});
|
|
@@ -8107,18 +8112,18 @@ var index = {
|
|
|
8107
8112
|
},
|
|
8108
8113
|
//包装请求函数
|
|
8109
8114
|
_getWrapAjax: function _getWrapAjax() {
|
|
8110
|
-
var
|
|
8115
|
+
var _this4 = this;
|
|
8111
8116
|
var _getOptionProps3 = getOptionProps(this),
|
|
8112
8117
|
code = _getOptionProps3.code;
|
|
8113
8118
|
if (code && !this.ajax) {
|
|
8114
8119
|
var url = "platform/metadata/executeGridSearch.search?code=".concat(code);
|
|
8115
8120
|
this.ajax = warpFun(function (data) {
|
|
8116
|
-
return
|
|
8121
|
+
return _this4.$axios.post(url, data);
|
|
8117
8122
|
});
|
|
8118
8123
|
}
|
|
8119
8124
|
},
|
|
8120
8125
|
_getConfig: function _getConfig() {
|
|
8121
|
-
var
|
|
8126
|
+
var _this5 = this;
|
|
8122
8127
|
var _getOptionProps4 = getOptionProps(this),
|
|
8123
8128
|
code = _getOptionProps4.code,
|
|
8124
8129
|
_getOptionProps4$quer = _getOptionProps4.queryData,
|
|
@@ -8134,13 +8139,13 @@ var index = {
|
|
|
8134
8139
|
if (lodash.isFunction(normalizeConfig)) {
|
|
8135
8140
|
res = normalizeConfig(res);
|
|
8136
8141
|
}
|
|
8137
|
-
|
|
8142
|
+
_this5.configState = stateMap.loaded;
|
|
8138
8143
|
var conditions = res.conditions || [];
|
|
8139
8144
|
var _query = queryData;
|
|
8140
|
-
if (
|
|
8141
|
-
_query =
|
|
8142
|
-
|
|
8143
|
-
|
|
8145
|
+
if (_this5.stack.length > 0) {
|
|
8146
|
+
_query = _this5.stack[_this5.stack.length - 1];
|
|
8147
|
+
_this5.stack.length = 0;
|
|
8148
|
+
_this5.data = _query;
|
|
8144
8149
|
}
|
|
8145
8150
|
Object.keys(_query || {}).map(function (key) {
|
|
8146
8151
|
var condition = conditions.find(function (item) {
|
|
@@ -8161,14 +8166,14 @@ var index = {
|
|
|
8161
8166
|
columns = columns.map(function (item) {
|
|
8162
8167
|
return item;
|
|
8163
8168
|
});
|
|
8164
|
-
|
|
8169
|
+
_this5.setState({
|
|
8165
8170
|
columnList: columns,
|
|
8166
8171
|
conditionList: conditions
|
|
8167
8172
|
}, function () {
|
|
8168
|
-
if (
|
|
8169
|
-
|
|
8173
|
+
if (_this5.autoLoad) {
|
|
8174
|
+
_this5._getData();
|
|
8170
8175
|
} else {
|
|
8171
|
-
|
|
8176
|
+
_this5.setState({
|
|
8172
8177
|
loading: false
|
|
8173
8178
|
});
|
|
8174
8179
|
}
|
|
@@ -8177,7 +8182,7 @@ var index = {
|
|
|
8177
8182
|
}
|
|
8178
8183
|
},
|
|
8179
8184
|
_getData: function _getData() {
|
|
8180
|
-
var
|
|
8185
|
+
var _this6 = this;
|
|
8181
8186
|
var pagination = this.pagination,
|
|
8182
8187
|
conditionList = this.conditionList,
|
|
8183
8188
|
sorter = this.sorter,
|
|
@@ -8231,32 +8236,32 @@ var index = {
|
|
|
8231
8236
|
sortList: sort,
|
|
8232
8237
|
conditionList: [].concat(_toConsumableArray(fitlerOtehrConditionListDeepClone), _toConsumableArray(fitlerConditionListDeepClone))
|
|
8233
8238
|
}).then(function (res) {
|
|
8234
|
-
var
|
|
8239
|
+
var _this6$selectedRowsLi, _this6$selectedUpdate, _this6$dataSource;
|
|
8235
8240
|
//外部处理数据
|
|
8236
8241
|
if (lodash.isFunction(normalizeData)) {
|
|
8237
8242
|
res = normalizeData(res);
|
|
8238
8243
|
}
|
|
8239
8244
|
//处理props传入的已选中
|
|
8240
|
-
if ((
|
|
8241
|
-
|
|
8242
|
-
return
|
|
8245
|
+
if ((_this6 === null || _this6 === void 0 || (_this6$selectedRowsLi = _this6.selectedRowsList) === null || _this6$selectedRowsLi === void 0 ? void 0 : _this6$selectedRowsLi.length) > 0 && (_this6 === null || _this6 === void 0 || (_this6$selectedUpdate = _this6.selectedUpdateRows) === null || _this6$selectedUpdate === void 0 ? void 0 : _this6$selectedUpdate.length) == 0 && (_this6 === null || _this6 === void 0 || (_this6$dataSource = _this6.dataSource) === null || _this6$dataSource === void 0 ? void 0 : _this6$dataSource.length) == 0) {
|
|
8246
|
+
_this6.selectedUpdateRows = res.dataList.filter(function (item) {
|
|
8247
|
+
return _this6.selectedRowsList.includes(item.t_0_hid) || (_this6.selectedRowsList || []).map(function (id) {
|
|
8243
8248
|
return id + '';
|
|
8244
8249
|
}).includes(item.id + '');
|
|
8245
8250
|
});
|
|
8246
8251
|
}
|
|
8247
|
-
|
|
8252
|
+
_this6.setState({
|
|
8248
8253
|
pagination: _objectSpread$d(_objectSpread$d({}, pagination), {}, {
|
|
8249
8254
|
total: res.total
|
|
8250
8255
|
}),
|
|
8251
8256
|
dataSource: res.dataList,
|
|
8252
8257
|
loading: false
|
|
8253
8258
|
});
|
|
8254
|
-
|
|
8259
|
+
_this6.$emit("load");
|
|
8255
8260
|
});
|
|
8256
8261
|
},
|
|
8257
8262
|
//分页、排序
|
|
8258
8263
|
_handleTableChange: function _handleTableChange(pager, filters) {
|
|
8259
|
-
var
|
|
8264
|
+
var _this7 = this;
|
|
8260
8265
|
var sort = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8261
8266
|
var pagination = this.pagination;
|
|
8262
8267
|
this.setState({
|
|
@@ -8270,7 +8275,7 @@ var index = {
|
|
|
8270
8275
|
field: sort.field
|
|
8271
8276
|
}
|
|
8272
8277
|
}, function () {
|
|
8273
|
-
|
|
8278
|
+
_this7._getData();
|
|
8274
8279
|
});
|
|
8275
8280
|
},
|
|
8276
8281
|
/**
|
|
@@ -8357,10 +8362,10 @@ var index = {
|
|
|
8357
8362
|
new Vue({
|
|
8358
8363
|
el: div,
|
|
8359
8364
|
mounted: function mounted() {
|
|
8360
|
-
var
|
|
8365
|
+
var _this8 = this;
|
|
8361
8366
|
setTimeout(function () {
|
|
8362
|
-
|
|
8363
|
-
|
|
8367
|
+
_this8.$destroy();
|
|
8368
|
+
_this8.$el.parentNode.removeChild(_this8.$el);
|
|
8364
8369
|
}, (duration + 0.5) * 1000);
|
|
8365
8370
|
},
|
|
8366
8371
|
render: function render() {
|
|
@@ -8389,19 +8394,19 @@ var index = {
|
|
|
8389
8394
|
* 刷新表格
|
|
8390
8395
|
*/
|
|
8391
8396
|
refresh: function refresh() {
|
|
8392
|
-
var
|
|
8397
|
+
var _this9 = this;
|
|
8393
8398
|
var pagination = this.pagination;
|
|
8394
8399
|
pagination.current = 1;
|
|
8395
8400
|
this.setState({
|
|
8396
8401
|
pagination: pagination
|
|
8397
8402
|
}, function () {
|
|
8398
|
-
|
|
8403
|
+
_this9._getData();
|
|
8399
8404
|
});
|
|
8400
8405
|
},
|
|
8401
8406
|
getSchemeConditionList: function getSchemeConditionList(id) {
|
|
8402
|
-
var
|
|
8407
|
+
var _this10 = this;
|
|
8403
8408
|
return new Promise(function (resolve, reject) {
|
|
8404
|
-
|
|
8409
|
+
_this10.$axios.get("/platform/userself/condition/getUserScreeningScheme.search?id=".concat(id)).then(function (res) {
|
|
8405
8410
|
var list = [];
|
|
8406
8411
|
(res && res.userScreeningConditionVOList || []).map(function (item) {
|
|
8407
8412
|
if (item.conditionList) {
|
|
@@ -8421,20 +8426,20 @@ var index = {
|
|
|
8421
8426
|
},
|
|
8422
8427
|
//选择方案搜索
|
|
8423
8428
|
schemeSearchHandler: function schemeSearchHandler(scheme) {
|
|
8424
|
-
var
|
|
8429
|
+
var _this11 = this;
|
|
8425
8430
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
8426
8431
|
var list;
|
|
8427
8432
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
8428
8433
|
while (1) switch (_context.prev = _context.next) {
|
|
8429
8434
|
case 0:
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8435
|
+
_this11.loading = true;
|
|
8436
|
+
_this11.tempConditionListByScheme = [];
|
|
8437
|
+
_this11.selectedSchemeId = scheme && scheme.id;
|
|
8433
8438
|
if (scheme) {
|
|
8434
8439
|
_context.next = 7;
|
|
8435
8440
|
break;
|
|
8436
8441
|
}
|
|
8437
|
-
|
|
8442
|
+
_this11.conditionListByScheme = [];
|
|
8438
8443
|
_context.next = 16;
|
|
8439
8444
|
break;
|
|
8440
8445
|
case 7:
|
|
@@ -8442,18 +8447,18 @@ var index = {
|
|
|
8442
8447
|
_context.next = 11;
|
|
8443
8448
|
break;
|
|
8444
8449
|
}
|
|
8445
|
-
|
|
8450
|
+
_this11.conditionListByScheme = scheme.$$conditionList;
|
|
8446
8451
|
_context.next = 16;
|
|
8447
8452
|
break;
|
|
8448
8453
|
case 11:
|
|
8449
8454
|
_context.next = 13;
|
|
8450
|
-
return
|
|
8455
|
+
return _this11.getSchemeConditionList(scheme.id);
|
|
8451
8456
|
case 13:
|
|
8452
8457
|
list = _context.sent;
|
|
8453
|
-
|
|
8454
|
-
|
|
8458
|
+
_this11.setSchemeConditionList(scheme.id, list);
|
|
8459
|
+
_this11.conditionListByScheme = list;
|
|
8455
8460
|
case 16:
|
|
8456
|
-
|
|
8461
|
+
_this11.searchHandler();
|
|
8457
8462
|
case 17:
|
|
8458
8463
|
case "end":
|
|
8459
8464
|
return _context.stop();
|
|
@@ -8463,7 +8468,7 @@ var index = {
|
|
|
8463
8468
|
},
|
|
8464
8469
|
//搜索
|
|
8465
8470
|
searchHandler: function searchHandler() {
|
|
8466
|
-
var
|
|
8471
|
+
var _this12 = this;
|
|
8467
8472
|
var pagination = this.pagination;
|
|
8468
8473
|
if (this.$listeners.search) {
|
|
8469
8474
|
this.setState({
|
|
@@ -8471,9 +8476,9 @@ var index = {
|
|
|
8471
8476
|
current: 1
|
|
8472
8477
|
})
|
|
8473
8478
|
}, function () {
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
},
|
|
8479
|
+
_this12.$emit("search", function () {
|
|
8480
|
+
_this12._getData();
|
|
8481
|
+
}, _this12);
|
|
8477
8482
|
});
|
|
8478
8483
|
} else {
|
|
8479
8484
|
this.setState({
|
|
@@ -8481,7 +8486,7 @@ var index = {
|
|
|
8481
8486
|
current: 1
|
|
8482
8487
|
})
|
|
8483
8488
|
}, function () {
|
|
8484
|
-
|
|
8489
|
+
_this12._getData();
|
|
8485
8490
|
});
|
|
8486
8491
|
}
|
|
8487
8492
|
},
|
|
@@ -8490,7 +8495,7 @@ var index = {
|
|
|
8490
8495
|
}
|
|
8491
8496
|
},
|
|
8492
8497
|
render: function render() {
|
|
8493
|
-
var
|
|
8498
|
+
var _this13 = this;
|
|
8494
8499
|
var h = arguments[0];
|
|
8495
8500
|
var $scopedSlots = this.$scopedSlots,
|
|
8496
8501
|
loading = this.loading,
|
|
@@ -8548,42 +8553,42 @@ var index = {
|
|
|
8548
8553
|
scopedSlots: $scopedSlots,
|
|
8549
8554
|
on: {
|
|
8550
8555
|
"change": function change(pagination, filters, sorter) {
|
|
8551
|
-
|
|
8556
|
+
_this13._handleTableChange(pagination, filters, sorter);
|
|
8552
8557
|
},
|
|
8553
8558
|
"download": function download(columns, e) {
|
|
8554
|
-
|
|
8559
|
+
_this13._downloadHandler(columns, e);
|
|
8555
8560
|
},
|
|
8556
8561
|
"rowSelected": function rowSelected(rows) {
|
|
8557
|
-
|
|
8562
|
+
_this13.$emit("rowSelected", rows);
|
|
8558
8563
|
},
|
|
8559
8564
|
"schemeChange": function schemeChange(id) {
|
|
8560
|
-
|
|
8565
|
+
_this13.editSchemeId = null;
|
|
8561
8566
|
if (id) {
|
|
8562
|
-
|
|
8567
|
+
_this13._getSchemeList(id);
|
|
8563
8568
|
} else {
|
|
8564
8569
|
// this.selectedSchemeId = null;
|
|
8565
|
-
|
|
8570
|
+
_this13._getSchemeList();
|
|
8566
8571
|
}
|
|
8567
8572
|
},
|
|
8568
8573
|
"tempSearch": function tempSearch(tempConditionList, schemeId) {
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8574
|
+
_this13.tempConditionListByScheme = tempConditionList;
|
|
8575
|
+
_this13.editSchemeId = schemeId;
|
|
8576
|
+
_this13.searchHandler();
|
|
8572
8577
|
},
|
|
8573
8578
|
"schemeSearch": function schemeSearch(scheme) {
|
|
8574
|
-
|
|
8575
|
-
|
|
8579
|
+
_this13.editSchemeId = null;
|
|
8580
|
+
_this13.schemeSearchHandler(scheme);
|
|
8576
8581
|
},
|
|
8577
8582
|
"search": function search() {
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8583
|
+
_this13.tempConditionListByScheme = [];
|
|
8584
|
+
_this13.editSchemeId = null;
|
|
8585
|
+
_this13.searchHandler();
|
|
8581
8586
|
},
|
|
8582
8587
|
"cellClick": function cellClick(column, record) {
|
|
8583
|
-
|
|
8588
|
+
_this13.$emit("cellClick", column, record);
|
|
8584
8589
|
},
|
|
8585
8590
|
"settingChange": function settingChange(cols) {
|
|
8586
|
-
|
|
8591
|
+
_this13.setState({
|
|
8587
8592
|
columnList: columnList.map(function (c) {
|
|
8588
8593
|
var column = cols.find(function (o) {
|
|
8589
8594
|
return o.columnName === c.columnName;
|
|
@@ -8593,7 +8598,7 @@ var index = {
|
|
|
8593
8598
|
});
|
|
8594
8599
|
})
|
|
8595
8600
|
}, function () {
|
|
8596
|
-
|
|
8601
|
+
_this13._setMaxWidth();
|
|
8597
8602
|
});
|
|
8598
8603
|
}
|
|
8599
8604
|
}
|