hrsass-components 1.7.17 → 1.7.20
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 +101 -58
- package/lib/hrsass-components.min.js +1 -1
- package/package.json +1 -1
- package/rollup.build.css +15192 -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.20";
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* 版本号
|
|
@@ -3698,44 +3698,77 @@ var HrAppendix = {
|
|
|
3698
3698
|
beforeUpload: function beforeUpload(file) {
|
|
3699
3699
|
var _this2 = this;
|
|
3700
3700
|
|
|
3701
|
-
return new Promise(function (
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3701
|
+
return new Promise( /*#__PURE__*/function () {
|
|
3702
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(resolve, reject) {
|
|
3703
|
+
var name, size, types, result, num;
|
|
3704
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
3705
|
+
while (1) {
|
|
3706
|
+
switch (_context.prev = _context.next) {
|
|
3707
|
+
case 0:
|
|
3708
|
+
//验证文件类型、文件大小
|
|
3709
|
+
name = file.name, size = file.size;
|
|
3710
|
+
types = _this2.fileTypeArr;
|
|
3711
|
+
result = true;
|
|
3712
|
+
|
|
3713
|
+
if (types.length) {
|
|
3714
|
+
result = types.some(function (type) {
|
|
3715
|
+
return new RegExp(type + "$", "ig").test(name);
|
|
3716
|
+
});
|
|
3717
|
+
}
|
|
3713
3718
|
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3719
|
+
if (!result) {
|
|
3720
|
+
_this2.$message.error("".concat(_this2.locale.fileTypeError, " (").concat(_this2.fileTypes, ")"));
|
|
3721
|
+
} else {
|
|
3722
|
+
if (_this2.fileSizeLimit > 0) {
|
|
3723
|
+
if (_this2.fileSizeLimit * 1024 < size) {
|
|
3724
|
+
result = false;
|
|
3725
|
+
num = _this2.fileSizeLimit / 1024;
|
|
3726
|
+
|
|
3727
|
+
if (num > 0) {
|
|
3728
|
+
num = "".concat(Number(num.toFixed(2)), "MB");
|
|
3729
|
+
} else {
|
|
3730
|
+
num = "".concat(_this2.fileSizeLimit, "KB");
|
|
3731
|
+
}
|
|
3732
|
+
|
|
3733
|
+
_this2.$message.error("".concat(_this2.locale.fileSizeError, " (").concat(num, ")"));
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3721
3737
|
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
}
|
|
3738
|
+
if (!_this2.customBeforeUpload) {
|
|
3739
|
+
_context.next = 15;
|
|
3740
|
+
break;
|
|
3741
|
+
}
|
|
3727
3742
|
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
}
|
|
3743
|
+
_context.prev = 6;
|
|
3744
|
+
_context.next = 9;
|
|
3745
|
+
return _this2.customBeforeUpload(file);
|
|
3732
3746
|
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3747
|
+
case 9:
|
|
3748
|
+
result = _context.sent;
|
|
3749
|
+
_context.next = 15;
|
|
3750
|
+
break;
|
|
3736
3751
|
|
|
3737
|
-
|
|
3738
|
-
|
|
3752
|
+
case 12:
|
|
3753
|
+
_context.prev = 12;
|
|
3754
|
+
_context.t0 = _context["catch"](6);
|
|
3755
|
+
result = false;
|
|
3756
|
+
|
|
3757
|
+
case 15:
|
|
3758
|
+
result ? resolve(file) : reject(file);
|
|
3759
|
+
|
|
3760
|
+
case 16:
|
|
3761
|
+
case "end":
|
|
3762
|
+
return _context.stop();
|
|
3763
|
+
}
|
|
3764
|
+
}
|
|
3765
|
+
}, _callee, null, [[6, 12]]);
|
|
3766
|
+
}));
|
|
3767
|
+
|
|
3768
|
+
return function (_x, _x2) {
|
|
3769
|
+
return _ref2.apply(this, arguments);
|
|
3770
|
+
};
|
|
3771
|
+
}());
|
|
3739
3772
|
},
|
|
3740
3773
|
capture: function capture(dataUrl, prefix) {
|
|
3741
3774
|
var reg0 = new RegExp(String.fromCharCode(0), "g");
|
|
@@ -3762,9 +3795,9 @@ var HrAppendix = {
|
|
|
3762
3795
|
|
|
3763
3796
|
if (files) {
|
|
3764
3797
|
this.$axios.get("/file.nolog?method=getFileName&fileId=".concat(files)).then(function (files) {
|
|
3765
|
-
var fileList = files.map(function (
|
|
3766
|
-
var fileId =
|
|
3767
|
-
fileName =
|
|
3798
|
+
var fileList = files.map(function (_ref3) {
|
|
3799
|
+
var fileId = _ref3.fileId,
|
|
3800
|
+
fileName = _ref3.fileName;
|
|
3768
3801
|
var fileObj = {
|
|
3769
3802
|
uid: "".concat(fileId),
|
|
3770
3803
|
name: fileName,
|
|
@@ -3783,13 +3816,13 @@ var HrAppendix = {
|
|
|
3783
3816
|
}
|
|
3784
3817
|
},
|
|
3785
3818
|
// 针对原上传组件的change事件做拦截, 同步fileList以及处理value
|
|
3786
|
-
change: function change(
|
|
3819
|
+
change: function change(_ref4) {
|
|
3787
3820
|
var _this4 = this;
|
|
3788
3821
|
|
|
3789
|
-
var
|
|
3790
|
-
file =
|
|
3791
|
-
|
|
3792
|
-
fileList =
|
|
3822
|
+
var _ref4$file = _ref4.file,
|
|
3823
|
+
file = _ref4$file === void 0 ? {} : _ref4$file,
|
|
3824
|
+
_ref4$fileList = _ref4.fileList,
|
|
3825
|
+
fileList = _ref4$fileList === void 0 ? [] : _ref4$fileList;
|
|
3793
3826
|
var _file$response = file.response,
|
|
3794
3827
|
response = _file$response === void 0 ? {} : _file$response;
|
|
3795
3828
|
|
|
@@ -3978,9 +4011,9 @@ var HrAppendix = {
|
|
|
3978
4011
|
display: "none"
|
|
3979
4012
|
} : {},
|
|
3980
4013
|
on: {
|
|
3981
|
-
change: function change(
|
|
3982
|
-
var dataUrl =
|
|
3983
|
-
prefix =
|
|
4014
|
+
change: function change(_ref5) {
|
|
4015
|
+
var dataUrl = _ref5.dataUrl,
|
|
4016
|
+
prefix = _ref5.prefix;
|
|
3984
4017
|
return _this7.capture(dataUrl, prefix);
|
|
3985
4018
|
}
|
|
3986
4019
|
}
|
|
@@ -4396,7 +4429,8 @@ var HrDynamic = {
|
|
|
4396
4429
|
onlyLeafSelectable: VuePropTypes.bool,
|
|
4397
4430
|
isEncrypt: VuePropTypes.bool,
|
|
4398
4431
|
fileSizeLimit: VuePropTypes.number,
|
|
4399
|
-
fileTypes: VuePropTypes.string
|
|
4432
|
+
fileTypes: VuePropTypes.string,
|
|
4433
|
+
customBeforeUpload: VuePropTypes.func
|
|
4400
4434
|
}, {
|
|
4401
4435
|
prefixCls: 'hr-dynamic'
|
|
4402
4436
|
}),
|
|
@@ -4436,7 +4470,8 @@ var HrDynamic = {
|
|
|
4436
4470
|
isEncrypt = _getOptionProps$isEnc === void 0 ? false : _getOptionProps$isEnc,
|
|
4437
4471
|
onlyLeafSelectable = _getOptionProps.onlyLeafSelectable,
|
|
4438
4472
|
fileSizeLimit = _getOptionProps.fileSizeLimit,
|
|
4439
|
-
fileTypes = _getOptionProps.fileTypes
|
|
4473
|
+
fileTypes = _getOptionProps.fileTypes,
|
|
4474
|
+
customBeforeUpload = _getOptionProps.customBeforeUpload;
|
|
4440
4475
|
|
|
4441
4476
|
var hrDynamicProps = {
|
|
4442
4477
|
"class": classNames(prefixCls, cls, _defineProperty({}, "".concat(prefixCls, "-read-only"), !isEncrypt && readOnly)),
|
|
@@ -4732,6 +4767,7 @@ var HrDynamic = {
|
|
|
4732
4767
|
fileTypes: fileTypes,
|
|
4733
4768
|
readOnly: readOnly,
|
|
4734
4769
|
disabled: disabled,
|
|
4770
|
+
customBeforeUpload: customBeforeUpload,
|
|
4735
4771
|
queryData: queryData
|
|
4736
4772
|
},
|
|
4737
4773
|
on: {
|
|
@@ -4747,7 +4783,8 @@ var HrDynamic = {
|
|
|
4747
4783
|
multiple: true,
|
|
4748
4784
|
queryData: queryData,
|
|
4749
4785
|
readOnly: readOnly,
|
|
4750
|
-
disabled: disabled
|
|
4786
|
+
disabled: disabled,
|
|
4787
|
+
customBeforeUpload: customBeforeUpload
|
|
4751
4788
|
},
|
|
4752
4789
|
on: {
|
|
4753
4790
|
"change": function change(val) {
|
|
@@ -4762,6 +4799,7 @@ var HrDynamic = {
|
|
|
4762
4799
|
listType: "picture-card",
|
|
4763
4800
|
queryData: queryData,
|
|
4764
4801
|
disabled: disabled,
|
|
4802
|
+
customBeforeUpload: customBeforeUpload,
|
|
4765
4803
|
readOnly: readOnly
|
|
4766
4804
|
},
|
|
4767
4805
|
on: {
|
|
@@ -4778,6 +4816,7 @@ var HrDynamic = {
|
|
|
4778
4816
|
listType: "picture-card",
|
|
4779
4817
|
queryData: queryData,
|
|
4780
4818
|
disabled: disabled,
|
|
4819
|
+
customBeforeUpload: customBeforeUpload,
|
|
4781
4820
|
readOnly: readOnly
|
|
4782
4821
|
},
|
|
4783
4822
|
on: {
|
|
@@ -7621,15 +7660,17 @@ var HrTableBase = {
|
|
|
7621
7660
|
var _rowKey = rowKey || 'id';
|
|
7622
7661
|
|
|
7623
7662
|
var id = record[_rowKey];
|
|
7624
|
-
var encryptObj = record.encryptObj || {
|
|
7625
|
-
|
|
7663
|
+
var encryptObj = record.encryptObj || {};
|
|
7664
|
+
encryptObj[columnName] = encryptObj[columnName] || {
|
|
7665
|
+
isReal: flase
|
|
7626
7666
|
};
|
|
7667
|
+
var filedEncryptObj = encryptObj[columnName];
|
|
7627
7668
|
console.log(encryptObj);
|
|
7628
7669
|
|
|
7629
|
-
if (
|
|
7630
|
-
record[columnName] =
|
|
7631
|
-
} else if (
|
|
7632
|
-
record[columnName] =
|
|
7670
|
+
if (filedEncryptObj.isReal) {
|
|
7671
|
+
record[columnName] = filedEncryptObj.encryptValue;
|
|
7672
|
+
} else if (filedEncryptObj.realValue) {
|
|
7673
|
+
record[columnName] = filedEncryptObj.realValue;
|
|
7633
7674
|
} else {
|
|
7634
7675
|
this.$axios.post("/platform/metadata/getSingleData.search", {
|
|
7635
7676
|
gridCode: code,
|
|
@@ -7641,15 +7682,15 @@ var HrTableBase = {
|
|
|
7641
7682
|
return;
|
|
7642
7683
|
}
|
|
7643
7684
|
|
|
7644
|
-
|
|
7685
|
+
filedEncryptObj.encryptValue = record[columnName]; //加密值
|
|
7645
7686
|
|
|
7646
|
-
record[columnName] =
|
|
7687
|
+
record[columnName] = filedEncryptObj.realValue = res; //真实值
|
|
7647
7688
|
|
|
7648
7689
|
_this5.$set(record, columnName, res);
|
|
7649
7690
|
});
|
|
7650
7691
|
}
|
|
7651
7692
|
|
|
7652
|
-
|
|
7693
|
+
filedEncryptObj.isReal = !filedEncryptObj.isReal;
|
|
7653
7694
|
this.$set(record, 'encryptObj', encryptObj);
|
|
7654
7695
|
},
|
|
7655
7696
|
_renderCellText: function _renderCellText(item, v, record) {
|
|
@@ -7662,6 +7703,8 @@ var HrTableBase = {
|
|
|
7662
7703
|
|
|
7663
7704
|
var cellClass = classNames("".concat(prefixCls, "-text"), _defineProperty({}, "".concat(prefixCls, "-text-active"), item.pass));
|
|
7664
7705
|
var text = !this._isEmpty(v) ? v.name || this._getFormatValue(item.controlType, v) : '';
|
|
7706
|
+
var encryptObj = record.encryptObj || {};
|
|
7707
|
+
var filedEncryptOjb = encryptObj[item.dataIndex];
|
|
7665
7708
|
return h("div", {
|
|
7666
7709
|
attrs: {
|
|
7667
7710
|
title: text
|
|
@@ -7678,7 +7721,7 @@ var HrTableBase = {
|
|
|
7678
7721
|
},
|
|
7679
7722
|
slot: "suffix",
|
|
7680
7723
|
attrs: {
|
|
7681
|
-
type:
|
|
7724
|
+
type: filedEncryptOjb && filedEncryptOjb.isReal ? "eye" : "eye-invisible"
|
|
7682
7725
|
},
|
|
7683
7726
|
style: "margin-left:4px;color: rgba(0,0,0,.25)"
|
|
7684
7727
|
})]);
|