hrsass-components 1.7.32 → 1.7.35
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 +143 -57
- package/lib/hrsass-components.min.js +1 -1
- package/package.json +1 -1
- package/rollup.build.css +68364 -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.35";
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* 版本号
|
|
@@ -1564,6 +1564,7 @@ var HrSetId = {
|
|
|
1564
1564
|
};
|
|
1565
1565
|
|
|
1566
1566
|
var defaultLocale = {
|
|
1567
|
+
//
|
|
1567
1568
|
locale: 'zh-cn',
|
|
1568
1569
|
HrAppendix: {
|
|
1569
1570
|
uploadBtnText: '上传文件'
|
|
@@ -3224,10 +3225,6 @@ var HrAppendix = {
|
|
|
3224
3225
|
"default": "default",
|
|
3225
3226
|
validator: function validator(val) {
|
|
3226
3227
|
return ["default", "inch-1", "inch-2"].includes(val);
|
|
3227
|
-
},
|
|
3228
|
-
isLanguage: {
|
|
3229
|
-
type: Boolean,
|
|
3230
|
-
"default": false
|
|
3231
3228
|
}
|
|
3232
3229
|
}
|
|
3233
3230
|
},
|
|
@@ -3458,13 +3455,11 @@ var HrAppendix = {
|
|
|
3458
3455
|
fileList = _ref4$fileList === void 0 ? [] : _ref4$fileList;
|
|
3459
3456
|
var _file$response = file.response,
|
|
3460
3457
|
response = _file$response === void 0 ? {} : _file$response;
|
|
3461
|
-
var successText = this.isLanguage ? 'file uploaded successfully' : '文件上传成功';
|
|
3462
|
-
var errorText = this.isLanguage ? 'file upload failed' : '文件上传失败';
|
|
3463
3458
|
if (file.status === "done") {
|
|
3464
3459
|
if (response.fileId) {
|
|
3465
3460
|
var value = this.multiple ? [].concat(_toConsumableArray(this.val), [response.fileId]) : response.fileId;
|
|
3466
3461
|
this.emitChange(value);
|
|
3467
|
-
this.$message.success("".concat(file.name).concat(successText));
|
|
3462
|
+
this.$message.success("".concat(file.name).concat(locale.successText));
|
|
3468
3463
|
} else if (response.errorMessage) {
|
|
3469
3464
|
this.$message.error("".concat(response.errorMessage));
|
|
3470
3465
|
if (!this.multiple && this.listType === "picture-card") {
|
|
@@ -3472,7 +3467,7 @@ var HrAppendix = {
|
|
|
3472
3467
|
}
|
|
3473
3468
|
}
|
|
3474
3469
|
} else if (file.status === "error") {
|
|
3475
|
-
this.$message.error(response.errorMessage || "".concat(file.name).concat(errorText));
|
|
3470
|
+
this.$message.error(response.errorMessage || "".concat(file.name).concat(locale.errorText));
|
|
3476
3471
|
if (!this.multiple && this.listType === "picture-card") {
|
|
3477
3472
|
fileList = [];
|
|
3478
3473
|
}
|
|
@@ -3528,9 +3523,8 @@ var HrAppendix = {
|
|
|
3528
3523
|
fileRemove: function fileRemove(file, locale) {
|
|
3529
3524
|
var _this6 = this;
|
|
3530
3525
|
// 禁用或只读情况下阻止删除
|
|
3531
|
-
var noRemoveText = this.isLanguage ? 'can not remove file in the status of disabled/readOnly' : '禁用或只读情况下不能删除文件';
|
|
3532
3526
|
if (this.disabled || this.readOnly) {
|
|
3533
|
-
this.$message.info("".concat(
|
|
3527
|
+
this.$message.info("".concat(locale.uploadBtnText));
|
|
3534
3528
|
return false;
|
|
3535
3529
|
}
|
|
3536
3530
|
return new Promise(function (resolve, reject) {
|
|
@@ -3863,7 +3857,10 @@ var HrSelectEmp = {
|
|
|
3863
3857
|
var _this = this;
|
|
3864
3858
|
queryString = encodeURI(queryString);
|
|
3865
3859
|
var queryData = this.queryData;
|
|
3866
|
-
this.$axios.
|
|
3860
|
+
this.$axios.get("business/emp/empinfo/empselector/getEmpSelectorInfoDTOListNew.search?inStr=".concat(queryString || ''), {
|
|
3861
|
+
headers: {
|
|
3862
|
+
functionid: 'STD-PWSQGL'
|
|
3863
|
+
},
|
|
3867
3864
|
queryData: queryData
|
|
3868
3865
|
}).then(function () {
|
|
3869
3866
|
var res = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -10942,13 +10939,19 @@ var OrganizationCard = {
|
|
|
10942
10939
|
//链接线高度
|
|
10943
10940
|
width: VuePropTypes.number,
|
|
10944
10941
|
//宽度
|
|
10945
|
-
height: VuePropTypes.number
|
|
10942
|
+
height: VuePropTypes.number,
|
|
10943
|
+
//高度
|
|
10944
|
+
topBorderHeight: VuePropTypes.number,
|
|
10945
|
+
//上边框高度
|
|
10946
|
+
isDownload: VuePropTypes.bool
|
|
10946
10947
|
}, {
|
|
10947
10948
|
prefixCls: 'hr-org-chart-organization-card',
|
|
10948
10949
|
data: {},
|
|
10949
10950
|
width: 260,
|
|
10950
10951
|
height: 160,
|
|
10951
|
-
lineHeight: 30
|
|
10952
|
+
lineHeight: 30,
|
|
10953
|
+
topBorderHeight: 4,
|
|
10954
|
+
isDownload: false
|
|
10952
10955
|
}),
|
|
10953
10956
|
data: function data() {
|
|
10954
10957
|
return {};
|
|
@@ -10977,13 +10980,19 @@ var OrganizationCard = {
|
|
|
10977
10980
|
data = _getOptionProps2.data,
|
|
10978
10981
|
width = _getOptionProps2.width,
|
|
10979
10982
|
height = _getOptionProps2.height,
|
|
10980
|
-
lineHeight = _getOptionProps2.lineHeight
|
|
10983
|
+
lineHeight = _getOptionProps2.lineHeight,
|
|
10984
|
+
topBorderHeight = _getOptionProps2.topBorderHeight,
|
|
10985
|
+
isDownload = _getOptionProps2.isDownload;
|
|
10981
10986
|
var kind = data.data.kind,
|
|
10982
10987
|
chargePersonType = data.data.chargePersonType;
|
|
10983
10988
|
var empMapList = [],
|
|
10984
10989
|
positionName = data.property.positionName;
|
|
10985
10990
|
//chargePersonType 2=为职位 1=人员
|
|
10986
10991
|
//职位时,不显示职位名称(?)
|
|
10992
|
+
var davidColor = {
|
|
10993
|
+
2: '#3FCF8E',
|
|
10994
|
+
3: '#F6A4EB'
|
|
10995
|
+
};
|
|
10987
10996
|
if (chargePersonType === '2') {
|
|
10988
10997
|
empMapList = data.property.empMapList || [];
|
|
10989
10998
|
//人员最多显示3个
|
|
@@ -11009,14 +11018,19 @@ var OrganizationCard = {
|
|
|
11009
11018
|
width: width,
|
|
11010
11019
|
height: height
|
|
11011
11020
|
},
|
|
11012
|
-
"class": "".concat(prefixCls, "-container")
|
|
11021
|
+
"class": "".concat(prefixCls, "-container"),
|
|
11022
|
+
style: "fill: #ffffff;stroke: rgba(0, 0, 0, 0.15);stroke-width: 1px"
|
|
11013
11023
|
}), h("rect", {
|
|
11014
11024
|
attrs: {
|
|
11015
11025
|
x: "0",
|
|
11016
11026
|
y: "0",
|
|
11017
|
-
width: width
|
|
11027
|
+
width: width,
|
|
11028
|
+
height: topBorderHeight
|
|
11018
11029
|
},
|
|
11019
|
-
"class": classNames("".concat(prefixCls, "-divider"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-divider-department"), kind == 2), _defineProperty(_classNames, "".concat(prefixCls, "-divider-virtual"), kind == 3), _classNames))
|
|
11030
|
+
"class": classNames("".concat(prefixCls, "-divider"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-divider-department"), kind == 2), _defineProperty(_classNames, "".concat(prefixCls, "-divider-virtual"), kind == 3), _classNames)),
|
|
11031
|
+
style: {
|
|
11032
|
+
fill: kind != 2 && kind != 3 ? '#4285F4' : davidColor[kind]
|
|
11033
|
+
}
|
|
11020
11034
|
}), h(IconBase, {
|
|
11021
11035
|
attrs: {
|
|
11022
11036
|
iconName: "dptIcon",
|
|
@@ -11079,6 +11093,9 @@ var OrganizationCard = {
|
|
|
11079
11093
|
width: "30",
|
|
11080
11094
|
height: "30",
|
|
11081
11095
|
fill: "".concat(emp.photo ? 'url(#circleImage' + emp.photo + ')' : '#d6d6d6')
|
|
11096
|
+
},
|
|
11097
|
+
style: {
|
|
11098
|
+
fill: isDownload ? '#d6d6d6' : ''
|
|
11082
11099
|
}
|
|
11083
11100
|
}), h("text", {
|
|
11084
11101
|
attrs: {
|
|
@@ -11127,22 +11144,42 @@ var OrganizationCard = {
|
|
|
11127
11144
|
y: height * 0.875
|
|
11128
11145
|
},
|
|
11129
11146
|
"class": "".concat(prefixCls, "-text")
|
|
11130
|
-
}, [h("tspan", [data.property.count])])]), data.level > 0 &&
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11147
|
+
}, [h("tspan", [data.property.count])])]), data.level > 0 &&
|
|
11148
|
+
// <line
|
|
11149
|
+
// class={`${prefixCls}-line`}
|
|
11150
|
+
// style="stroke: rgba(0, 0, 0, 0.7;stroke-width: 1px;"
|
|
11151
|
+
// x1={width / 2}
|
|
11152
|
+
// x2={width / 2}
|
|
11153
|
+
// y1="0"
|
|
11154
|
+
// y2={-lineHeight}
|
|
11155
|
+
// />
|
|
11156
|
+
//导出时,线条渲染不出来,所以改成rect
|
|
11157
|
+
h("rect", {
|
|
11158
|
+
attrs: {
|
|
11159
|
+
x: width / 2,
|
|
11160
|
+
y: -lineHeight,
|
|
11161
|
+
width: 1,
|
|
11162
|
+
height: lineHeight
|
|
11163
|
+
},
|
|
11164
|
+
style: "fill:#fff;stroke: rgba(0, 0, 0, 0.1);stroke-width: 1px"
|
|
11165
|
+
}), data.children && data.children.length > 0 && data.property.open &&
|
|
11166
|
+
// <line
|
|
11167
|
+
// class={`${prefixCls}-line`}
|
|
11168
|
+
// style="stroke: rgba(0, 0, 0, 0.7);stroke-width: 1px;"
|
|
11169
|
+
// x1={width / 2}
|
|
11170
|
+
// x2={width / 2}
|
|
11171
|
+
// y1={height}
|
|
11172
|
+
// y2={height + lineHeight}
|
|
11173
|
+
// />
|
|
11174
|
+
//导出时,线条渲染不出来,所以改成rect
|
|
11175
|
+
h("rect", {
|
|
11176
|
+
attrs: {
|
|
11177
|
+
x: width / 2,
|
|
11178
|
+
y: height,
|
|
11179
|
+
width: 1,
|
|
11180
|
+
height: lineHeight
|
|
11181
|
+
},
|
|
11182
|
+
style: "fill:#fff;stroke: rgba(0, 0, 0, 0.1);stroke-width: 1px"
|
|
11146
11183
|
}), data.property.count && data.property.count > 0 && h(IconBase, {
|
|
11147
11184
|
"class": "".concat(prefixCls, "-action"),
|
|
11148
11185
|
attrs: {
|
|
@@ -11206,7 +11243,8 @@ var index$6 = {
|
|
|
11206
11243
|
loading: false,
|
|
11207
11244
|
dataList: [],
|
|
11208
11245
|
svgPanZoom: null,
|
|
11209
|
-
standardZoom: 1
|
|
11246
|
+
standardZoom: 1,
|
|
11247
|
+
isDownload: false
|
|
11210
11248
|
};
|
|
11211
11249
|
},
|
|
11212
11250
|
watch: {
|
|
@@ -11357,14 +11395,23 @@ var index$6 = {
|
|
|
11357
11395
|
var lineXStart = children[0].x + width / 2;
|
|
11358
11396
|
var lineXEnd = children[children.length - 1].x + width / 2;
|
|
11359
11397
|
var lineY = level * height + lineHeight * (level * 2 - 1);
|
|
11360
|
-
return
|
|
11361
|
-
|
|
11398
|
+
// return <line
|
|
11399
|
+
// class="hr-org-chart-line"
|
|
11400
|
+
// x1={lineXStart}
|
|
11401
|
+
// x2={lineXEnd}
|
|
11402
|
+
// y1={lineY}
|
|
11403
|
+
// y2={lineY}
|
|
11404
|
+
// style="stroke: rgba(0, 0, 0, 0.15);stroke-width: 1px">
|
|
11405
|
+
// </line>
|
|
11406
|
+
//导出时,线条渲染不出来,所以改成rect
|
|
11407
|
+
return h("rect", {
|
|
11362
11408
|
attrs: {
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
}
|
|
11409
|
+
x: lineXStart,
|
|
11410
|
+
y: lineY,
|
|
11411
|
+
height: 1,
|
|
11412
|
+
width: lineXEnd - lineXStart
|
|
11413
|
+
},
|
|
11414
|
+
style: "fill:#fff;stroke: rgba(0, 0, 0, 0.1);stroke-width: 1px"
|
|
11368
11415
|
});
|
|
11369
11416
|
},
|
|
11370
11417
|
_renderOrgChart: function _renderOrgChart(data) {
|
|
@@ -11385,7 +11432,8 @@ var index$6 = {
|
|
|
11385
11432
|
data: item,
|
|
11386
11433
|
width: width,
|
|
11387
11434
|
height: height,
|
|
11388
|
-
lineHeight: lineHeight
|
|
11435
|
+
lineHeight: lineHeight,
|
|
11436
|
+
isDownload: _this4.isDownload
|
|
11389
11437
|
},
|
|
11390
11438
|
on: {
|
|
11391
11439
|
"click": function click(data) {
|
|
@@ -11418,7 +11466,7 @@ var index$6 = {
|
|
|
11418
11466
|
* @param {Boolean} isOpen 是否展开
|
|
11419
11467
|
* @param {Object} item 当前节点
|
|
11420
11468
|
* @param {Object} prevData 上一节点
|
|
11421
|
-
* @param {Array} children
|
|
11469
|
+
* @param {Array} children 子集.
|
|
11422
11470
|
*/
|
|
11423
11471
|
_handleExpand: function _handleExpand(isOpen, item, prevData, children) {
|
|
11424
11472
|
var _this5 = this;
|
|
@@ -11455,14 +11503,39 @@ var index$6 = {
|
|
|
11455
11503
|
});
|
|
11456
11504
|
},
|
|
11457
11505
|
exportSvg: function exportSvg(fileName) {
|
|
11458
|
-
var
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11506
|
+
var _this6 = this;
|
|
11507
|
+
var bBox = this.$refs.hrOrgChartSvg.getBBox(),
|
|
11508
|
+
options = {
|
|
11509
|
+
scale: 1,
|
|
11510
|
+
width: bBox.width,
|
|
11511
|
+
height: bBox.height,
|
|
11512
|
+
top: bBox.y,
|
|
11513
|
+
left: bBox.x
|
|
11514
|
+
};
|
|
11515
|
+
this.setState({
|
|
11516
|
+
loading: true,
|
|
11517
|
+
isDownload: true
|
|
11518
|
+
});
|
|
11519
|
+
saveSvgAsPng.svgAsDataUri(this.$refs.hrOrgChartSvg, options).then(function (url) {
|
|
11520
|
+
var dataUrL = url.split('base64,')[1];
|
|
11521
|
+
_this6.$axios.post('/business/org/Company/getOrgDiagram.data', {
|
|
11522
|
+
'base64Str': dataUrL,
|
|
11523
|
+
name: fileName || 'org.png'
|
|
11524
|
+
}).then(function (res) {
|
|
11525
|
+
window.open("".concat(process.env.VUE_APP_API_BASE_URL, "/file.nolog?method=download&fileId=").concat(res));
|
|
11526
|
+
_this6.setState({
|
|
11527
|
+
loading: false,
|
|
11528
|
+
isDownload: false
|
|
11529
|
+
});
|
|
11530
|
+
});
|
|
11465
11531
|
});
|
|
11532
|
+
// saveSvgAsPng(this.$refs.hrOrgChartSvg, fileName || 'org.png', {
|
|
11533
|
+
// scale: 1,
|
|
11534
|
+
// width: bBox.width,
|
|
11535
|
+
// height: bBox.height,
|
|
11536
|
+
// top: bBox.y,
|
|
11537
|
+
// left: bBox.x,
|
|
11538
|
+
// });
|
|
11466
11539
|
},
|
|
11467
11540
|
/**
|
|
11468
11541
|
* 获取当前缩放比例
|
|
@@ -11543,13 +11616,16 @@ var ReportCard = {
|
|
|
11543
11616
|
//链接线高度
|
|
11544
11617
|
width: VuePropTypes.number,
|
|
11545
11618
|
//宽度
|
|
11546
|
-
height: VuePropTypes.number
|
|
11619
|
+
height: VuePropTypes.number,
|
|
11620
|
+
//高度
|
|
11621
|
+
topBorderHeight: VuePropTypes.number //上边框高度
|
|
11547
11622
|
}, {
|
|
11548
11623
|
prefixCls: 'hr-report-chart-card',
|
|
11549
11624
|
data: {},
|
|
11550
11625
|
width: 260,
|
|
11551
11626
|
height: 160,
|
|
11552
|
-
lineHeight: 30
|
|
11627
|
+
lineHeight: 30,
|
|
11628
|
+
topBorderHeight: 4
|
|
11553
11629
|
}),
|
|
11554
11630
|
data: function data() {
|
|
11555
11631
|
return {
|
|
@@ -11589,7 +11665,8 @@ var ReportCard = {
|
|
|
11589
11665
|
data = _getOptionProps3.data,
|
|
11590
11666
|
width = _getOptionProps3.width,
|
|
11591
11667
|
height = _getOptionProps3.height,
|
|
11592
|
-
lineHeight = _getOptionProps3.lineHeight
|
|
11668
|
+
lineHeight = _getOptionProps3.lineHeight,
|
|
11669
|
+
topBorderHeight = _getOptionProps3.topBorderHeight;
|
|
11593
11670
|
return h("g", {
|
|
11594
11671
|
"class": prefixCls,
|
|
11595
11672
|
attrs: {
|
|
@@ -11621,7 +11698,8 @@ var ReportCard = {
|
|
|
11621
11698
|
attrs: {
|
|
11622
11699
|
x: "0",
|
|
11623
11700
|
y: "0",
|
|
11624
|
-
width: width
|
|
11701
|
+
width: width,
|
|
11702
|
+
height: topBorderHeight
|
|
11625
11703
|
},
|
|
11626
11704
|
"class": classNames("".concat(prefixCls, "-divider"), "".concat(prefixCls, "-divider-virtual"))
|
|
11627
11705
|
}), h("g", [h("defs", [h("pattern", {
|
|
@@ -11710,6 +11788,8 @@ var ReportCard = {
|
|
|
11710
11788
|
}
|
|
11711
11789
|
};
|
|
11712
11790
|
|
|
11791
|
+
//109%
|
|
11792
|
+
//<canvas width="87737" height="905" style="width: 87737px; height: 905px;"></canvas>
|
|
11713
11793
|
var HrReportChart = {
|
|
11714
11794
|
name: 'HrReportChart',
|
|
11715
11795
|
mixins: [BaseMixin],
|
|
@@ -12001,7 +12081,10 @@ var zh_CN = {
|
|
|
12001
12081
|
appendixName: '资料名称',
|
|
12002
12082
|
uploadError: '此附件有问题,请重新上传',
|
|
12003
12083
|
fileTypeError: '不支持的文件类型',
|
|
12004
|
-
fileSizeError: '文件大小限制'
|
|
12084
|
+
fileSizeError: '文件大小限制',
|
|
12085
|
+
noRemoveText: '禁用或只读情况下不能删除文件',
|
|
12086
|
+
successText: '文件上传成功',
|
|
12087
|
+
errorText: '文件上传失败'
|
|
12005
12088
|
},
|
|
12006
12089
|
HrAddrBookCard: {
|
|
12007
12090
|
viewReportRelate: '查看汇报关系',
|
|
@@ -12138,7 +12221,10 @@ var en_US = {
|
|
|
12138
12221
|
appendixName: 'Document Name',
|
|
12139
12222
|
uploadError: 'There is a problem with this attachment. Please upload it again',
|
|
12140
12223
|
fileTypeError: 'Unsupported file type',
|
|
12141
|
-
fileSizeError: 'File size limit'
|
|
12224
|
+
fileSizeError: 'File size limit',
|
|
12225
|
+
noRemoveText: 'can not remove file in the status of disabled/readOnly',
|
|
12226
|
+
successText: 'file uploaded successfully',
|
|
12227
|
+
errorText: 'file upload failed'
|
|
12142
12228
|
},
|
|
12143
12229
|
HrAddrBookCard: {
|
|
12144
12230
|
viewReportRelate: 'view report relation',
|