hrsass-components 1.7.38 → 1.7.39
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 +90 -54
- package/lib/hrsass-components.min.js +1 -1
- package/package.json +1 -1
- package/rollup.build.css +160580 -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.39";
|
|
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;
|
|
@@ -14172,9 +14182,8 @@ var index$h = {
|
|
|
14172
14182
|
}
|
|
14173
14183
|
if (!size) {
|
|
14174
14184
|
_this2.errorFileList.push(name);
|
|
14175
|
-
|
|
14185
|
+
_this2.isDetailDelFile && _this2.$message.info('文件大小0kb');
|
|
14176
14186
|
}
|
|
14177
|
-
|
|
14178
14187
|
if (!result) {
|
|
14179
14188
|
// this.$message.error(
|
|
14180
14189
|
// `${this.locale.fileTypeError} (${this.fileTypes})`
|
|
@@ -14262,21 +14271,14 @@ var index$h = {
|
|
|
14262
14271
|
if (response.fileId) {
|
|
14263
14272
|
var value = this.multiple ? [].concat(_toConsumableArray(this.val), [response.fileId]) : response.fileId;
|
|
14264
14273
|
this.emitChange(value);
|
|
14274
|
+
this.isMainUploadFile && this.validatorFile(response.fileId);
|
|
14265
14275
|
//this.$message.success(`${file.name}${this.locale.successText}`);
|
|
14266
14276
|
//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
|
-
}
|
|
14277
|
+
} else if (response.errorMessage) ;
|
|
14273
14278
|
} else if (file.status === "error") {
|
|
14274
14279
|
// this.$message.error(
|
|
14275
14280
|
// response.errorMessage || `${file.name}${this.locale.errorText}`
|
|
14276
14281
|
// );
|
|
14277
|
-
if (!this.multiple && this.listType === "picture-card") {
|
|
14278
|
-
fileList = [];
|
|
14279
|
-
}
|
|
14280
14282
|
this.errorFileList.push(file.name);
|
|
14281
14283
|
}
|
|
14282
14284
|
fileList = fileList.map(function (file) {
|
|
@@ -14285,7 +14287,11 @@ var index$h = {
|
|
|
14285
14287
|
}
|
|
14286
14288
|
return file;
|
|
14287
14289
|
});
|
|
14288
|
-
|
|
14290
|
+
//附件详情页,上传空文件删除不了,故排除上传为空的文件
|
|
14291
|
+
this.fileList = fileList.filter(function (file) {
|
|
14292
|
+
return file.size;
|
|
14293
|
+
});
|
|
14294
|
+
console.log('fileList-components', this.fileList);
|
|
14289
14295
|
},
|
|
14290
14296
|
realRemove: function realRemove(file) {
|
|
14291
14297
|
var _this5 = this;
|
|
@@ -14366,8 +14372,50 @@ var index$h = {
|
|
|
14366
14372
|
preview: function preview(fileId) {
|
|
14367
14373
|
window.open("".concat(baseUrl$1, "/file.nolog?method=preview&fileId=").concat(fileId));
|
|
14368
14374
|
},
|
|
14369
|
-
|
|
14375
|
+
validatorFile: function validatorFile(fileId) {
|
|
14370
14376
|
var _this7 = this;
|
|
14377
|
+
//后端上传校验失败接口
|
|
14378
|
+
this.$axios.post("/business/emp/empinfo/empbasic/validateAttachment.search", {
|
|
14379
|
+
blobIds: fileId
|
|
14380
|
+
}).then(function (res) {
|
|
14381
|
+
res && res.map(function (item) {
|
|
14382
|
+
var success = item.success,
|
|
14383
|
+
fileName = item.fileName,
|
|
14384
|
+
blobId = item.blobId,
|
|
14385
|
+
msg = item.msg;
|
|
14386
|
+
if (!success) {
|
|
14387
|
+
_this7.errorFileList.push(fileName);
|
|
14388
|
+
} else {
|
|
14389
|
+
_this7.fileList.map(function (file) {
|
|
14390
|
+
if (file.response && +file.response.fileId === blobId) {
|
|
14391
|
+
var lastModified = file.lastModified,
|
|
14392
|
+
lastModifiedDate = file.lastModifiedDate,
|
|
14393
|
+
name = file.name,
|
|
14394
|
+
response = file.response,
|
|
14395
|
+
status = file.status,
|
|
14396
|
+
uid = file.uid,
|
|
14397
|
+
url = file.url,
|
|
14398
|
+
size = file.size,
|
|
14399
|
+
type = file.type;
|
|
14400
|
+
_this7.dataSource.push({
|
|
14401
|
+
lastModified: lastModified,
|
|
14402
|
+
lastModifiedDate: lastModifiedDate,
|
|
14403
|
+
name: name,
|
|
14404
|
+
response: response,
|
|
14405
|
+
status: status,
|
|
14406
|
+
uid: uid,
|
|
14407
|
+
url: url,
|
|
14408
|
+
size: size,
|
|
14409
|
+
type: type
|
|
14410
|
+
});
|
|
14411
|
+
}
|
|
14412
|
+
});
|
|
14413
|
+
}
|
|
14414
|
+
});
|
|
14415
|
+
});
|
|
14416
|
+
},
|
|
14417
|
+
_renderHrAppendixDirectory: function _renderHrAppendixDirectory(locale) {
|
|
14418
|
+
var _this8 = this;
|
|
14371
14419
|
var h = this.$createElement;
|
|
14372
14420
|
this.locale = locale;
|
|
14373
14421
|
var btn = null;
|
|
@@ -14381,33 +14429,19 @@ var index$h = {
|
|
|
14381
14429
|
}
|
|
14382
14430
|
// 只读情况不出上传按钮
|
|
14383
14431
|
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])]);
|
|
14432
|
+
btn = h(antDesignVue.Button, {
|
|
14433
|
+
attrs: {
|
|
14434
|
+
disabled: disabled
|
|
14394
14435
|
}
|
|
14395
|
-
}
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
}
|
|
14401
|
-
}, [" ", h(antDesignVue.Icon, {
|
|
14402
|
-
attrs: {
|
|
14403
|
-
type: "upload"
|
|
14404
|
-
}
|
|
14405
|
-
}), " ", locale.uploadBtnText, " "]);
|
|
14406
|
-
}
|
|
14436
|
+
}, [" ", h(antDesignVue.Icon, {
|
|
14437
|
+
attrs: {
|
|
14438
|
+
type: "upload"
|
|
14439
|
+
}
|
|
14440
|
+
}), " ", locale.uploadBtnText, " "]);
|
|
14407
14441
|
}
|
|
14408
14442
|
var options = _objectSpread$o({}, this.options);
|
|
14409
14443
|
options.props.remove = function (file) {
|
|
14410
|
-
return
|
|
14444
|
+
return _this8.fileRemove(file, locale);
|
|
14411
14445
|
};
|
|
14412
14446
|
//隐藏删除按钮
|
|
14413
14447
|
if (this.readOnly || this.disabled) {
|
|
@@ -14417,9 +14451,10 @@ var index$h = {
|
|
|
14417
14451
|
}
|
|
14418
14452
|
var $appendixDirectory;
|
|
14419
14453
|
if (this.listType === "text" && this.$attrs.showUploadList !== false && this.multiple) {
|
|
14420
|
-
var dataSource = this.fileList.filter(function (file) {
|
|
14454
|
+
var dataSource = !this.isMainUploadFile ? this.fileList.filter(function (file) {
|
|
14421
14455
|
return file.status === "done";
|
|
14422
|
-
});
|
|
14456
|
+
}) : this.dataSource;
|
|
14457
|
+
this.$emit('errorFileNum', this.errorFileList.length || 0);
|
|
14423
14458
|
this.$emit('save', dataSource);
|
|
14424
14459
|
$appendixDirectory = h("div", {
|
|
14425
14460
|
"class": "hr-appendix-directory hr-appendix-directory-table hr-appendix-directory-".concat(this.imageSize)
|
|
@@ -14427,17 +14462,19 @@ var index$h = {
|
|
|
14427
14462
|
props: _objectSpread$o(_objectSpread$o({}, options.props), {}, {
|
|
14428
14463
|
showUploadList: false
|
|
14429
14464
|
})
|
|
14430
|
-
}), [btn ? this.$slots["default"] || btn : null])]), h("div", {
|
|
14465
|
+
}), [btn ? this.$slots["default"] || btn : null])]), this.isMainUploadFile && this.errorFileList.length > 0 && h("div", {
|
|
14431
14466
|
"class": "hr-appendix-directory-error-file-list"
|
|
14432
|
-
}, [
|
|
14467
|
+
}, [h("div", {
|
|
14433
14468
|
"class": "hr-appendix-directory-error-file-title"
|
|
14434
14469
|
}, ["\u6821\u9A8C\u6CA1\u6709\u901A\u8FC7\u7684\u6587\u4EF6"]), h("ul", {
|
|
14435
14470
|
"class": "hr-appendix-directory-error-file-ul"
|
|
14436
14471
|
}, [this.errorFileList.map(function (item) {
|
|
14472
|
+
var nameArr = item.split('/');
|
|
14473
|
+
var name = nameArr[nameArr.length - 1];
|
|
14437
14474
|
return h("li", {
|
|
14438
14475
|
"class": "hr-appendix-directory-error-file-li"
|
|
14439
|
-
}, [
|
|
14440
|
-
})])])
|
|
14476
|
+
}, [name]);
|
|
14477
|
+
})])]), this.isMainUploadFile && h("div", {
|
|
14441
14478
|
"class": "hr-appendix-directory-error-file-title"
|
|
14442
14479
|
}, ["\u6821\u9A8C\u901A\u8FC7\u7684\u6587\u4EF6"]), h("a-table", {
|
|
14443
14480
|
attrs: {
|
|
@@ -14453,7 +14490,6 @@ var index$h = {
|
|
|
14453
14490
|
},
|
|
14454
14491
|
scopedSlots: {
|
|
14455
14492
|
"default": function _default(name, record, idx) {
|
|
14456
|
-
var fileId = record.response && record.response.fileId || record.uid;
|
|
14457
14493
|
return h("div", [name === "null" ? h("span", {
|
|
14458
14494
|
"class": "hr-appendix-directory-tip"
|
|
14459
14495
|
}, [locale.uploadError]) : name]);
|
|
@@ -14466,7 +14502,7 @@ var index$h = {
|
|
|
14466
14502
|
"data-index": "uid"
|
|
14467
14503
|
},
|
|
14468
14504
|
scopedSlots: {
|
|
14469
|
-
"default": function _default(
|
|
14505
|
+
"default": function _default(name, record, idx) {
|
|
14470
14506
|
var fileId = record.response && record.response.fileId || record.uid;
|
|
14471
14507
|
return h("div", [h("a-button", {
|
|
14472
14508
|
props: {
|
|
@@ -14475,7 +14511,7 @@ var index$h = {
|
|
|
14475
14511
|
},
|
|
14476
14512
|
on: {
|
|
14477
14513
|
click: function click() {
|
|
14478
|
-
return
|
|
14514
|
+
return _this8.preview(fileId);
|
|
14479
14515
|
}
|
|
14480
14516
|
}
|
|
14481
14517
|
}), h("a-button", {
|
|
@@ -14485,17 +14521,17 @@ var index$h = {
|
|
|
14485
14521
|
},
|
|
14486
14522
|
on: {
|
|
14487
14523
|
click: function click() {
|
|
14488
|
-
return
|
|
14524
|
+
return _this8.downloadItem(fileId);
|
|
14489
14525
|
}
|
|
14490
14526
|
}
|
|
14491
|
-
}),
|
|
14527
|
+
}), _this8.readOnly ? null : h("a-button", {
|
|
14492
14528
|
props: {
|
|
14493
14529
|
type: "link",
|
|
14494
14530
|
icon: "close"
|
|
14495
14531
|
},
|
|
14496
14532
|
on: {
|
|
14497
14533
|
click: function click() {
|
|
14498
|
-
return
|
|
14534
|
+
return _this8.fileRemove(record, locale);
|
|
14499
14535
|
}
|
|
14500
14536
|
}
|
|
14501
14537
|
})]);
|