hrsass-components 1.7.38 → 1.7.40
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 +96 -54
- package/lib/hrsass-components.min.js +1 -1
- package/package.json +1 -1
- package/rollup.build.css +186480 -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 = "1.7.
|
|
68
|
+
var version = "1.7.40";
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* 版本号
|
|
@@ -4503,6 +4503,7 @@ var TableProps = {
|
|
|
4503
4503
|
selection: VuePropTypes.bool,
|
|
4504
4504
|
hasQueryData: VuePropTypes.bool,
|
|
4505
4505
|
showDownload: VuePropTypes.bool,
|
|
4506
|
+
showFilter: VuePropTypes.bool,
|
|
4506
4507
|
autoLoad: VuePropTypes.bool,
|
|
4507
4508
|
normalizeConfig: VuePropTypes.func,
|
|
4508
4509
|
normalizeData: VuePropTypes.func
|
|
@@ -7676,6 +7677,8 @@ var index = {
|
|
|
7676
7677
|
//是否需要选择列
|
|
7677
7678
|
showDownload: true,
|
|
7678
7679
|
//是否显示导出
|
|
7680
|
+
showFilter: true,
|
|
7681
|
+
//是否显示筛选
|
|
7679
7682
|
autoLoad: true,
|
|
7680
7683
|
//自动加载数据
|
|
7681
7684
|
action: {
|
|
@@ -8206,6 +8209,7 @@ var index = {
|
|
|
8206
8209
|
multiple = _getOptionProps6.multiple,
|
|
8207
8210
|
rowKey = _getOptionProps6.rowKey,
|
|
8208
8211
|
showDownload = _getOptionProps6.showDownload,
|
|
8212
|
+
showFilter = _getOptionProps6.showFilter,
|
|
8209
8213
|
code = _getOptionProps6.code;
|
|
8210
8214
|
return h("div", {
|
|
8211
8215
|
"class": classNames(prefixCls, cls)
|
|
@@ -8225,7 +8229,7 @@ var index = {
|
|
|
8225
8229
|
pagination: pagination,
|
|
8226
8230
|
maxWidth: scrollWidth,
|
|
8227
8231
|
action: action,
|
|
8228
|
-
showFilter:
|
|
8232
|
+
showFilter: showFilter,
|
|
8229
8233
|
selectedSchemeId: selectedSchemeId,
|
|
8230
8234
|
schemeList: schemeList,
|
|
8231
8235
|
sortOrder: sortOrder,
|
|
@@ -14024,6 +14028,11 @@ var index$h = {
|
|
|
14024
14028
|
isDetailDelFile: {
|
|
14025
14029
|
type: Boolean,
|
|
14026
14030
|
"default": false
|
|
14031
|
+
},
|
|
14032
|
+
//首页批量删除
|
|
14033
|
+
isMainUploadFile: {
|
|
14034
|
+
type: Boolean,
|
|
14035
|
+
"default": false
|
|
14027
14036
|
}
|
|
14028
14037
|
},
|
|
14029
14038
|
data: function data() {
|
|
@@ -14040,7 +14049,8 @@ var index$h = {
|
|
|
14040
14049
|
pageSize: 10,
|
|
14041
14050
|
total: 0,
|
|
14042
14051
|
showSizeChanger: true
|
|
14043
|
-
}
|
|
14052
|
+
},
|
|
14053
|
+
dataSource: []
|
|
14044
14054
|
};
|
|
14045
14055
|
},
|
|
14046
14056
|
watch: {
|
|
@@ -14105,7 +14115,7 @@ var index$h = {
|
|
|
14105
14115
|
listType = this.listType,
|
|
14106
14116
|
disabled = this.disabled,
|
|
14107
14117
|
readOnly = this.readOnly;
|
|
14108
|
-
var cleanFileList = fileList.map(function (file) {
|
|
14118
|
+
var cleanFileList = fileList && fileList.map(function (file) {
|
|
14109
14119
|
// hack to fix a-upload 图片不展示的bug
|
|
14110
14120
|
if (_this.listType === "picture-card" && file.status === "done") {
|
|
14111
14121
|
var response = file.response,
|
|
@@ -14115,7 +14125,7 @@ var index$h = {
|
|
|
14115
14125
|
return file;
|
|
14116
14126
|
}
|
|
14117
14127
|
});
|
|
14118
|
-
var _fileList = _.cloneDeep(cleanFileList).map(function (file) {
|
|
14128
|
+
var _fileList = cleanFileList && _.cloneDeep(cleanFileList).map(function (file) {
|
|
14119
14129
|
if (file.name === "null") {
|
|
14120
14130
|
file.name = _this.locale.uploadError;
|
|
14121
14131
|
}
|
|
@@ -14154,7 +14164,7 @@ var index$h = {
|
|
|
14154
14164
|
methods: {
|
|
14155
14165
|
beforeUpload: function beforeUpload(file) {
|
|
14156
14166
|
var _this2 = this;
|
|
14157
|
-
this.fileList =
|
|
14167
|
+
this.fileList = [].concat(_toConsumableArray(this.fileList), [file]);
|
|
14158
14168
|
return new Promise( /*#__PURE__*/function () {
|
|
14159
14169
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(resolve, reject) {
|
|
14160
14170
|
var name, size, types, result, num;
|
|
@@ -14171,10 +14181,8 @@ var index$h = {
|
|
|
14171
14181
|
});
|
|
14172
14182
|
}
|
|
14173
14183
|
if (!size) {
|
|
14174
|
-
|
|
14175
|
-
//this.$message.error('文件是空的')
|
|
14184
|
+
result = false;
|
|
14176
14185
|
}
|
|
14177
|
-
|
|
14178
14186
|
if (!result) {
|
|
14179
14187
|
// this.$message.error(
|
|
14180
14188
|
// `${this.locale.fileTypeError} (${this.fileTypes})`
|
|
@@ -14262,21 +14270,17 @@ var index$h = {
|
|
|
14262
14270
|
if (response.fileId) {
|
|
14263
14271
|
var value = this.multiple ? [].concat(_toConsumableArray(this.val), [response.fileId]) : response.fileId;
|
|
14264
14272
|
this.emitChange(value);
|
|
14273
|
+
fileList = fileList.filter(function (file) {
|
|
14274
|
+
return file.size;
|
|
14275
|
+
});
|
|
14276
|
+
this.isMainUploadFile && this.validatorFile(response.fileId);
|
|
14265
14277
|
//this.$message.success(`${file.name}${this.locale.successText}`);
|
|
14266
14278
|
//this.$message.success(`${file.name || file.response.fileName}${this.locale.successText}`);产品需求,批量上传不提示上传成功
|
|
14267
|
-
} else if (response.errorMessage)
|
|
14268
|
-
//this.$message.error(`${response.errorMessage}`);
|
|
14269
|
-
if (!this.multiple && this.listType === "picture-card") {
|
|
14270
|
-
fileList = [];
|
|
14271
|
-
}
|
|
14272
|
-
}
|
|
14279
|
+
} else if (response.errorMessage) ;
|
|
14273
14280
|
} else if (file.status === "error") {
|
|
14274
14281
|
// this.$message.error(
|
|
14275
14282
|
// response.errorMessage || `${file.name}${this.locale.errorText}`
|
|
14276
14283
|
// );
|
|
14277
|
-
if (!this.multiple && this.listType === "picture-card") {
|
|
14278
|
-
fileList = [];
|
|
14279
|
-
}
|
|
14280
14284
|
this.errorFileList.push(file.name);
|
|
14281
14285
|
}
|
|
14282
14286
|
fileList = fileList.map(function (file) {
|
|
@@ -14285,7 +14289,9 @@ var index$h = {
|
|
|
14285
14289
|
}
|
|
14286
14290
|
return file;
|
|
14287
14291
|
});
|
|
14292
|
+
//附件详情页,上传空文件删除不了,故排除上传为空的文件
|
|
14288
14293
|
this.fileList = fileList;
|
|
14294
|
+
console.log('fileList-components', this.fileList);
|
|
14289
14295
|
},
|
|
14290
14296
|
realRemove: function realRemove(file) {
|
|
14291
14297
|
var _this5 = this;
|
|
@@ -14312,6 +14318,12 @@ var index$h = {
|
|
|
14312
14318
|
var fId = file.response && file.response.fileId || file.uid;
|
|
14313
14319
|
return fId !== fileId;
|
|
14314
14320
|
});
|
|
14321
|
+
if (_this5.isMainUploadFile) {
|
|
14322
|
+
_this5.dataSource = _this5.dataSource.filter(function (file) {
|
|
14323
|
+
var fId = file.response && file.response.fileId || file.uid;
|
|
14324
|
+
return fId !== fileId;
|
|
14325
|
+
});
|
|
14326
|
+
}
|
|
14315
14327
|
if (_this5.multiple) {
|
|
14316
14328
|
var _value2 = _this5.value.filter(function (item) {
|
|
14317
14329
|
return "".concat(item) !== "".concat(fileId);
|
|
@@ -14366,8 +14378,50 @@ var index$h = {
|
|
|
14366
14378
|
preview: function preview(fileId) {
|
|
14367
14379
|
window.open("".concat(baseUrl$1, "/file.nolog?method=preview&fileId=").concat(fileId));
|
|
14368
14380
|
},
|
|
14369
|
-
|
|
14381
|
+
validatorFile: function validatorFile(fileId) {
|
|
14370
14382
|
var _this7 = this;
|
|
14383
|
+
//后端上传校验失败接口
|
|
14384
|
+
this.$axios.post("/business/emp/empinfo/empbasic/validateAttachment.search", {
|
|
14385
|
+
blobIds: fileId
|
|
14386
|
+
}).then(function (res) {
|
|
14387
|
+
res && res.map(function (item) {
|
|
14388
|
+
var success = item.success,
|
|
14389
|
+
fileName = item.fileName,
|
|
14390
|
+
blobId = item.blobId,
|
|
14391
|
+
msg = item.msg;
|
|
14392
|
+
if (!success) {
|
|
14393
|
+
_this7.errorFileList.push(fileName);
|
|
14394
|
+
} else {
|
|
14395
|
+
_this7.fileList.map(function (file) {
|
|
14396
|
+
if (file.response && +file.response.fileId === blobId) {
|
|
14397
|
+
var lastModified = file.lastModified,
|
|
14398
|
+
lastModifiedDate = file.lastModifiedDate,
|
|
14399
|
+
name = file.name,
|
|
14400
|
+
response = file.response,
|
|
14401
|
+
status = file.status,
|
|
14402
|
+
uid = file.uid,
|
|
14403
|
+
url = file.url,
|
|
14404
|
+
size = file.size,
|
|
14405
|
+
type = file.type;
|
|
14406
|
+
_this7.dataSource.push({
|
|
14407
|
+
lastModified: lastModified,
|
|
14408
|
+
lastModifiedDate: lastModifiedDate,
|
|
14409
|
+
name: name,
|
|
14410
|
+
response: response,
|
|
14411
|
+
status: status,
|
|
14412
|
+
uid: uid,
|
|
14413
|
+
url: url,
|
|
14414
|
+
size: size,
|
|
14415
|
+
type: type
|
|
14416
|
+
});
|
|
14417
|
+
}
|
|
14418
|
+
});
|
|
14419
|
+
}
|
|
14420
|
+
});
|
|
14421
|
+
});
|
|
14422
|
+
},
|
|
14423
|
+
_renderHrAppendixDirectory: function _renderHrAppendixDirectory(locale) {
|
|
14424
|
+
var _this8 = this;
|
|
14371
14425
|
var h = this.$createElement;
|
|
14372
14426
|
this.locale = locale;
|
|
14373
14427
|
var btn = null;
|
|
@@ -14381,33 +14435,19 @@ var index$h = {
|
|
|
14381
14435
|
}
|
|
14382
14436
|
// 只读情况不出上传按钮
|
|
14383
14437
|
if (!this.readOnly) {
|
|
14384
|
-
|
|
14385
|
-
|
|
14386
|
-
|
|
14387
|
-
btn = h("div", [h(antDesignVue.Icon, {
|
|
14388
|
-
attrs: {
|
|
14389
|
-
type: "plus"
|
|
14390
|
-
}
|
|
14391
|
-
}), h("div", {
|
|
14392
|
-
"class": "ant-upload-text"
|
|
14393
|
-
}, [locale.uploadBtnText])]);
|
|
14438
|
+
btn = h(antDesignVue.Button, {
|
|
14439
|
+
attrs: {
|
|
14440
|
+
disabled: disabled
|
|
14394
14441
|
}
|
|
14395
|
-
}
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
}
|
|
14401
|
-
}, [" ", h(antDesignVue.Icon, {
|
|
14402
|
-
attrs: {
|
|
14403
|
-
type: "upload"
|
|
14404
|
-
}
|
|
14405
|
-
}), " ", locale.uploadBtnText, " "]);
|
|
14406
|
-
}
|
|
14442
|
+
}, [" ", h(antDesignVue.Icon, {
|
|
14443
|
+
attrs: {
|
|
14444
|
+
type: "upload"
|
|
14445
|
+
}
|
|
14446
|
+
}), " ", locale.uploadBtnText, " "]);
|
|
14407
14447
|
}
|
|
14408
14448
|
var options = _objectSpread$o({}, this.options);
|
|
14409
14449
|
options.props.remove = function (file) {
|
|
14410
|
-
return
|
|
14450
|
+
return _this8.fileRemove(file, locale);
|
|
14411
14451
|
};
|
|
14412
14452
|
//隐藏删除按钮
|
|
14413
14453
|
if (this.readOnly || this.disabled) {
|
|
@@ -14417,9 +14457,10 @@ var index$h = {
|
|
|
14417
14457
|
}
|
|
14418
14458
|
var $appendixDirectory;
|
|
14419
14459
|
if (this.listType === "text" && this.$attrs.showUploadList !== false && this.multiple) {
|
|
14420
|
-
var dataSource = this.fileList.filter(function (file) {
|
|
14460
|
+
var dataSource = !this.isMainUploadFile ? this.fileList.filter(function (file) {
|
|
14421
14461
|
return file.status === "done";
|
|
14422
|
-
});
|
|
14462
|
+
}) : this.dataSource;
|
|
14463
|
+
this.$emit('errorFileNum', this.errorFileList.length || 0);
|
|
14423
14464
|
this.$emit('save', dataSource);
|
|
14424
14465
|
$appendixDirectory = h("div", {
|
|
14425
14466
|
"class": "hr-appendix-directory hr-appendix-directory-table hr-appendix-directory-".concat(this.imageSize)
|
|
@@ -14427,17 +14468,19 @@ var index$h = {
|
|
|
14427
14468
|
props: _objectSpread$o(_objectSpread$o({}, options.props), {}, {
|
|
14428
14469
|
showUploadList: false
|
|
14429
14470
|
})
|
|
14430
|
-
}), [btn ? this.$slots["default"] || btn : null])]), h("div", {
|
|
14471
|
+
}), [btn ? this.$slots["default"] || btn : null])]), this.isMainUploadFile && this.errorFileList.length > 0 && h("div", {
|
|
14431
14472
|
"class": "hr-appendix-directory-error-file-list"
|
|
14432
|
-
}, [
|
|
14473
|
+
}, [h("div", {
|
|
14433
14474
|
"class": "hr-appendix-directory-error-file-title"
|
|
14434
14475
|
}, ["\u6821\u9A8C\u6CA1\u6709\u901A\u8FC7\u7684\u6587\u4EF6"]), h("ul", {
|
|
14435
14476
|
"class": "hr-appendix-directory-error-file-ul"
|
|
14436
14477
|
}, [this.errorFileList.map(function (item) {
|
|
14478
|
+
var nameArr = item.split('/');
|
|
14479
|
+
var name = nameArr[nameArr.length - 1];
|
|
14437
14480
|
return h("li", {
|
|
14438
14481
|
"class": "hr-appendix-directory-error-file-li"
|
|
14439
|
-
}, [
|
|
14440
|
-
})])])
|
|
14482
|
+
}, [name]);
|
|
14483
|
+
})])]), this.isMainUploadFile && h("div", {
|
|
14441
14484
|
"class": "hr-appendix-directory-error-file-title"
|
|
14442
14485
|
}, ["\u6821\u9A8C\u901A\u8FC7\u7684\u6587\u4EF6"]), h("a-table", {
|
|
14443
14486
|
attrs: {
|
|
@@ -14453,7 +14496,6 @@ var index$h = {
|
|
|
14453
14496
|
},
|
|
14454
14497
|
scopedSlots: {
|
|
14455
14498
|
"default": function _default(name, record, idx) {
|
|
14456
|
-
var fileId = record.response && record.response.fileId || record.uid;
|
|
14457
14499
|
return h("div", [name === "null" ? h("span", {
|
|
14458
14500
|
"class": "hr-appendix-directory-tip"
|
|
14459
14501
|
}, [locale.uploadError]) : name]);
|
|
@@ -14466,7 +14508,7 @@ var index$h = {
|
|
|
14466
14508
|
"data-index": "uid"
|
|
14467
14509
|
},
|
|
14468
14510
|
scopedSlots: {
|
|
14469
|
-
"default": function _default(
|
|
14511
|
+
"default": function _default(name, record, idx) {
|
|
14470
14512
|
var fileId = record.response && record.response.fileId || record.uid;
|
|
14471
14513
|
return h("div", [h("a-button", {
|
|
14472
14514
|
props: {
|
|
@@ -14475,7 +14517,7 @@ var index$h = {
|
|
|
14475
14517
|
},
|
|
14476
14518
|
on: {
|
|
14477
14519
|
click: function click() {
|
|
14478
|
-
return
|
|
14520
|
+
return _this8.preview(fileId);
|
|
14479
14521
|
}
|
|
14480
14522
|
}
|
|
14481
14523
|
}), h("a-button", {
|
|
@@ -14485,17 +14527,17 @@ var index$h = {
|
|
|
14485
14527
|
},
|
|
14486
14528
|
on: {
|
|
14487
14529
|
click: function click() {
|
|
14488
|
-
return
|
|
14530
|
+
return _this8.downloadItem(fileId);
|
|
14489
14531
|
}
|
|
14490
14532
|
}
|
|
14491
|
-
}),
|
|
14533
|
+
}), _this8.readOnly ? null : h("a-button", {
|
|
14492
14534
|
props: {
|
|
14493
14535
|
type: "link",
|
|
14494
14536
|
icon: "close"
|
|
14495
14537
|
},
|
|
14496
14538
|
on: {
|
|
14497
14539
|
click: function click() {
|
|
14498
|
-
return
|
|
14540
|
+
return _this8.fileRemove(record, locale);
|
|
14499
14541
|
}
|
|
14500
14542
|
}
|
|
14501
14543
|
})]);
|