cnhis-design-vue 2.1.40 → 2.1.42
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/CHANGELOG.md +25 -31
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +91 -91
- package/es/big-table/style.css +1 -1
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +92 -46
- package/es/button/style.css +1 -1
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +104 -96
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +62 -62
- package/es/index/index.js +969 -609
- package/es/index/style.css +1 -1
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +80 -82
- package/es/multi-chat-client/index.js +74 -76
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +14 -14
- package/es/multi-chat-setting/index.js +27 -29
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-view/index.js +33 -33
- package/es/select/index.js +353 -45
- package/es/select/style.css +1 -1
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +2 -2
- package/es/shortcut-setter/index.js +10 -10
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +199 -112
- package/es/table-filter/style.css +1 -1
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/utils/UniRTCv2.js +2 -2
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +972 -593
- package/lib/cui.umd.js +972 -593
- package/lib/cui.umd.min.js +22 -22
- package/package.json +2 -2
- package/packages/big-table/src/BigTable.vue +1 -1
- package/packages/button/src/ButtonPrint/index.vue +47 -9
- package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +56 -50
- package/packages/multi-chat/store/actions.js +6 -6
- package/packages/scale-view/scaleView.vue +2010 -2010
- package/packages/select/src/Select/Select.vue +231 -0
- package/packages/select/src/{Select.jsx → Select/index.js} +2 -1
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +37 -4
- package/src/utils/UniRTCv2.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.42",
|
|
4
4
|
"description": "前端业务UI库",
|
|
5
5
|
"keyword": "cnhis-design-vue vue cnhis",
|
|
6
6
|
"homepage": "http://dv.cnhis.com/",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"core-js": "^3.6.5",
|
|
39
39
|
"crypto-js": "^4.0.0",
|
|
40
|
-
"fabric": "
|
|
40
|
+
"fabric": "4.5.1",
|
|
41
41
|
"moment": "^2.29.1",
|
|
42
42
|
"recorder-core": "^1.1.21080800",
|
|
43
43
|
"socket.io-client": "^2.4.0",
|
|
@@ -640,7 +640,7 @@ export default create({
|
|
|
640
640
|
|
|
641
641
|
if (!xGrid) return;
|
|
642
642
|
|
|
643
|
-
Promise.all([xGrid.
|
|
643
|
+
Promise.all([xGrid.reloadColumn(columns), xGrid.reloadData(list),]).then(() => {
|
|
644
644
|
console.log('列表加载完成');
|
|
645
645
|
this.setGroupTitleToFristColumnFieldData(list);
|
|
646
646
|
this.setGroupTreeExpand();
|
|
@@ -141,6 +141,24 @@ export default create({
|
|
|
141
141
|
token: {
|
|
142
142
|
type: String,
|
|
143
143
|
default: ''
|
|
144
|
+
},
|
|
145
|
+
// 打印弹窗设置,1弹0不弹,默认不弹
|
|
146
|
+
printdlgshow: {
|
|
147
|
+
type: [String, Number],
|
|
148
|
+
default: '0'
|
|
149
|
+
},
|
|
150
|
+
// 没有模板提示
|
|
151
|
+
noformatTips:{
|
|
152
|
+
type: String,
|
|
153
|
+
default: ''
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
getOnceParamsAfter:{
|
|
157
|
+
type: Function
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
getPrintParamsAfter:{
|
|
161
|
+
type: Function
|
|
144
162
|
}
|
|
145
163
|
},
|
|
146
164
|
computed: {
|
|
@@ -151,6 +169,9 @@ export default create({
|
|
|
151
169
|
},
|
|
152
170
|
formatTitle() {
|
|
153
171
|
return this.currentFormatItem?.name || '格式选择';
|
|
172
|
+
},
|
|
173
|
+
printExtraParams(){
|
|
174
|
+
return this?.printConfig?.printExtraParams || {};
|
|
154
175
|
}
|
|
155
176
|
},
|
|
156
177
|
data() {
|
|
@@ -257,7 +278,7 @@ export default create({
|
|
|
257
278
|
this.currentFormatId = this.getDefaultFormatId(this.formatList, 'defaultFlag');
|
|
258
279
|
|
|
259
280
|
if (!this.currentFormatId) {
|
|
260
|
-
this.$message.error('获取打印格式失败,请联系管理员!');
|
|
281
|
+
this.$message.error(this.noformatTips ||'获取打印格式失败,请联系管理员!');
|
|
261
282
|
return this.requestError();
|
|
262
283
|
}
|
|
263
284
|
if (!this.currentFormatId) {
|
|
@@ -363,6 +384,9 @@ export default create({
|
|
|
363
384
|
if (i.type === 'DATETIME') {
|
|
364
385
|
tVal = tableVal ? moment(tableVal).format('YYYY-MM-DD HH:mm:ss') : '';
|
|
365
386
|
}
|
|
387
|
+
if(i.type === 'TEXT'){
|
|
388
|
+
tVal = String(tableVal) || ''
|
|
389
|
+
}
|
|
366
390
|
|
|
367
391
|
return val ? val : tVal;
|
|
368
392
|
},
|
|
@@ -416,11 +440,18 @@ export default create({
|
|
|
416
440
|
},
|
|
417
441
|
/* */
|
|
418
442
|
getPrintParams(index = 0) {
|
|
419
|
-
const params = this
|
|
420
|
-
|
|
443
|
+
const params = this?.printParams?.[index] || {};
|
|
444
|
+
const extraParams = this?.printExtraParams || {};
|
|
445
|
+
let res = {
|
|
421
446
|
...(params || {}),
|
|
422
|
-
...(this.token ? { token: this.token } : {})
|
|
423
|
-
|
|
447
|
+
...(this.token ? { token: this.token } : {}),
|
|
448
|
+
...extraParams
|
|
449
|
+
}
|
|
450
|
+
if(typeof this.getPrintParamsAfter === 'function'){
|
|
451
|
+
let t = this.getPrintParamsAfter(res);
|
|
452
|
+
return t || res;
|
|
453
|
+
}
|
|
454
|
+
return JSON.stringify(res);
|
|
424
455
|
},
|
|
425
456
|
getTemplateIdByFormatId(id) {
|
|
426
457
|
let find = this.formatList.find(item => item.id === id);
|
|
@@ -430,9 +461,10 @@ export default create({
|
|
|
430
461
|
// 聚合一条
|
|
431
462
|
let params = {};
|
|
432
463
|
let obj = {};
|
|
464
|
+
let cur = this.printParams?.[0] || {}
|
|
433
465
|
if (this.templateParams?.customizeDataset?.length) {
|
|
434
466
|
// 有模板数据
|
|
435
|
-
const key = Object.keys(
|
|
467
|
+
const key = Object.keys(cur?.datasetData || {})?.[0] || '';
|
|
436
468
|
const datasetDataKeyVal = JSON.stringify(this.printParams.map(v => JSON.parse(v.datasetData[key])));
|
|
437
469
|
obj = {
|
|
438
470
|
datasetData: {}
|
|
@@ -440,7 +472,7 @@ export default create({
|
|
|
440
472
|
obj.datasetData[key] = datasetDataKeyVal;
|
|
441
473
|
} else {
|
|
442
474
|
// 无模板数据
|
|
443
|
-
Object.keys(
|
|
475
|
+
Object.keys(cur).forEach(v => {
|
|
444
476
|
obj[v] = [];
|
|
445
477
|
this.printParams.forEach(k => {
|
|
446
478
|
obj[v].push(k[v]);
|
|
@@ -449,6 +481,10 @@ export default create({
|
|
|
449
481
|
});
|
|
450
482
|
}
|
|
451
483
|
params = Object.assign({}, JSON.parse(this.getPrintParams(0)), obj);
|
|
484
|
+
if(typeof this.getOnceParamsAfter === 'function'){
|
|
485
|
+
let res = this.getOnceParamsAfter(params,obj);
|
|
486
|
+
return res || params;
|
|
487
|
+
}
|
|
452
488
|
return JSON.stringify(params);
|
|
453
489
|
},
|
|
454
490
|
handleClickPrint(e) {
|
|
@@ -500,7 +536,8 @@ export default create({
|
|
|
500
536
|
const queryParams = {
|
|
501
537
|
formatId: this.currentFormatId,
|
|
502
538
|
templateId: this.getTemplateIdByFormatId(this.currentFormatId),
|
|
503
|
-
params: this.getPrintParams(i)
|
|
539
|
+
params: this.getPrintParams(i),
|
|
540
|
+
printdlgshow: this.printdlgshow
|
|
504
541
|
};
|
|
505
542
|
printInstance.printDirect(queryParams, callLocalServicesSuccessCb, this.callLocalServicesErrorCb);
|
|
506
543
|
}
|
|
@@ -509,7 +546,8 @@ export default create({
|
|
|
509
546
|
const queryParams = {
|
|
510
547
|
formatId: this.currentFormatId,
|
|
511
548
|
templateId: this.getTemplateIdByFormatId(this.currentFormatId),
|
|
512
|
-
params: this.getOnceParams()
|
|
549
|
+
params: this.getOnceParams(),
|
|
550
|
+
printdlgshow: this.printdlgshow
|
|
513
551
|
};
|
|
514
552
|
printInstance.printDirect(
|
|
515
553
|
queryParams,
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
const data = {
|
|
2
|
-
style: {
|
|
3
|
-
evented: false,
|
|
4
|
-
selectable: false
|
|
5
|
-
},
|
|
6
|
-
rectStyle: {
|
|
7
|
-
fill: 'transparent',
|
|
8
|
-
stroke: '#999',
|
|
9
|
-
strokeWidth: 1
|
|
10
|
-
},
|
|
11
|
-
textStyle: {
|
|
12
|
-
fontFamily: '微软雅黑',
|
|
13
|
-
fontSize: 12,
|
|
14
|
-
fill: '#000',
|
|
15
|
-
lineHeight: 1
|
|
16
|
-
},
|
|
17
|
-
borderStyle: {
|
|
18
|
-
stroke: '#999',
|
|
19
|
-
strokeWidth: 1,
|
|
20
|
-
selectable: false,
|
|
21
|
-
evented: false
|
|
22
|
-
},
|
|
23
|
-
// 折线图中的点
|
|
24
|
-
pointStyle: {
|
|
25
|
-
fill: '#ffffff', // 填充色
|
|
26
|
-
stroke: '#000000', // 描边色
|
|
27
|
-
originX: 'center',
|
|
28
|
-
originY: 'center'
|
|
29
|
-
},
|
|
30
|
-
// 折线图中的线
|
|
31
|
-
lineStyle: {
|
|
32
|
-
stroke: '#000', // 描边色
|
|
33
|
-
strokeWidth: 1, // 描边宽度
|
|
34
|
-
originX: 'center',
|
|
35
|
-
originY: 'center'
|
|
36
|
-
},
|
|
37
|
-
topSpaceHeight: 10, // templateData.top.spaceHeight
|
|
38
|
-
topSpaceGridNumber: 3, // templateData.top.xScalevalue.spaceGridNumber
|
|
39
|
-
leftSpaceGridNumber: 2, // templateData.left.leftYScalevalue.spaceGridNumber
|
|
40
|
-
rightSpaceGridNumber: 2, // templateData.right.rightYScalevalue.spaceGridNumber
|
|
41
|
-
topTotal: {
|
|
42
|
-
title: '总量',
|
|
43
|
-
width: 0,
|
|
44
|
-
style: {
|
|
45
|
-
fontFamily: '微软雅黑',
|
|
46
|
-
fontSize: 12,
|
|
47
|
-
fill: '#000',
|
|
48
|
-
lineHeight: 1
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
criticalStyle: { // 危急值样式
|
|
52
|
-
stroke: 'purple', // 颜色 默认 #999
|
|
53
|
-
strokeWidth: 1, // 线宽 默认 1
|
|
54
|
-
strokeDashArray: [0, 0] // 实线设置 默认[0, 0]
|
|
55
|
-
},
|
|
56
|
-
bottomNumberLeftSpace: 10 // 底部标记的序号与标记之间的距离
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export default data;
|
|
1
|
+
const data = {
|
|
2
|
+
style: {
|
|
3
|
+
evented: false,
|
|
4
|
+
selectable: false
|
|
5
|
+
},
|
|
6
|
+
rectStyle: {
|
|
7
|
+
fill: 'transparent',
|
|
8
|
+
stroke: '#999',
|
|
9
|
+
strokeWidth: 1
|
|
10
|
+
},
|
|
11
|
+
textStyle: {
|
|
12
|
+
fontFamily: '微软雅黑',
|
|
13
|
+
fontSize: 12,
|
|
14
|
+
fill: '#000',
|
|
15
|
+
lineHeight: 1
|
|
16
|
+
},
|
|
17
|
+
borderStyle: {
|
|
18
|
+
stroke: '#999',
|
|
19
|
+
strokeWidth: 1,
|
|
20
|
+
selectable: false,
|
|
21
|
+
evented: false
|
|
22
|
+
},
|
|
23
|
+
// 折线图中的点
|
|
24
|
+
pointStyle: {
|
|
25
|
+
fill: '#ffffff', // 填充色
|
|
26
|
+
stroke: '#000000', // 描边色
|
|
27
|
+
originX: 'center',
|
|
28
|
+
originY: 'center'
|
|
29
|
+
},
|
|
30
|
+
// 折线图中的线
|
|
31
|
+
lineStyle: {
|
|
32
|
+
stroke: '#000', // 描边色
|
|
33
|
+
strokeWidth: 1, // 描边宽度
|
|
34
|
+
originX: 'center',
|
|
35
|
+
originY: 'center'
|
|
36
|
+
},
|
|
37
|
+
topSpaceHeight: 10, // templateData.top.spaceHeight
|
|
38
|
+
topSpaceGridNumber: 3, // templateData.top.xScalevalue.spaceGridNumber
|
|
39
|
+
leftSpaceGridNumber: 2, // templateData.left.leftYScalevalue.spaceGridNumber
|
|
40
|
+
rightSpaceGridNumber: 2, // templateData.right.rightYScalevalue.spaceGridNumber
|
|
41
|
+
topTotal: {
|
|
42
|
+
title: '总量',
|
|
43
|
+
width: 0,
|
|
44
|
+
style: {
|
|
45
|
+
fontFamily: '微软雅黑',
|
|
46
|
+
fontSize: 12,
|
|
47
|
+
fill: '#000',
|
|
48
|
+
lineHeight: 1
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
criticalStyle: { // 危急值样式
|
|
52
|
+
stroke: 'purple', // 颜色 默认 #999
|
|
53
|
+
strokeWidth: 1, // 线宽 默认 1
|
|
54
|
+
strokeDashArray: [0, 0] // 实线设置 默认[0, 0]
|
|
55
|
+
},
|
|
56
|
+
bottomNumberLeftSpace: 10 // 底部标记的序号与标记之间的距离
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default data;
|
|
@@ -90,6 +90,13 @@ export default {
|
|
|
90
90
|
computed: {
|
|
91
91
|
eventStyle() {
|
|
92
92
|
return this.propItems.eventStyle;
|
|
93
|
+
},
|
|
94
|
+
spaceWidth() {
|
|
95
|
+
const { xCellWidth, table } = this.propItems;
|
|
96
|
+
// const addPointSpaceGridNumbers = table.addPointSpaceGridNumbers || [];
|
|
97
|
+
let addPointSpaceGridNumber = table.addPointSpaceGridNumber || 1;
|
|
98
|
+
const spaceWidth = xCellWidth * addPointSpaceGridNumber;
|
|
99
|
+
return spaceWidth;
|
|
93
100
|
}
|
|
94
101
|
},
|
|
95
102
|
|
|
@@ -677,75 +684,74 @@ export default {
|
|
|
677
684
|
}
|
|
678
685
|
}
|
|
679
686
|
},
|
|
687
|
+
// 检查批量新增拖动过程中是否存在漏点的情况
|
|
688
|
+
checkPoints(point) {
|
|
689
|
+
const { originLeft, originTop, left, polylineTypeId } = point;
|
|
690
|
+
const PointLens = Math.floor((left - originLeft) / this.spaceWidth);
|
|
691
|
+
if (PointLens > 1 && this.addPointList?.length <= PointLens) {
|
|
692
|
+
const position = this.polyline[polylineTypeId].position;
|
|
693
|
+
for (let k = 0; k <= PointLens; k++) {
|
|
694
|
+
if (k > 0) {
|
|
695
|
+
const curLeft = originLeft + this.spaceWidth * k;
|
|
696
|
+
// 判断this.addPointList中的left是否包含curLeft,不包含就说明是漏了
|
|
697
|
+
const hasPoint = this.addPointList.some(p => Math.abs(p.left - curLeft) <= 0.001);
|
|
698
|
+
// const hasPoint = this.addPointList.some(v => v.left == curLeft);
|
|
699
|
+
if (!hasPoint) {
|
|
700
|
+
let index;
|
|
701
|
+
const pointObj = this.addPointList.find((v, i) => {
|
|
702
|
+
if (v.left > curLeft) {
|
|
703
|
+
index = i;
|
|
704
|
+
}
|
|
705
|
+
return v.left > curLeft;
|
|
706
|
+
});
|
|
707
|
+
if (pointObj) {
|
|
708
|
+
let cloneObj = JSON.parse(JSON.stringify(pointObj));
|
|
709
|
+
const prePoint = this.addPointList[index - 1] || {
|
|
710
|
+
left: originLeft,
|
|
711
|
+
top: originTop
|
|
712
|
+
};
|
|
713
|
+
const len = ~~((pointObj.left - (curLeft - this.spaceWidth)) / this.spaceWidth);
|
|
714
|
+
const spaceHeight = (pointObj.top - prePoint.top) / len;
|
|
715
|
+
cloneObj.top = prePoint.top + spaceHeight;
|
|
716
|
+
cloneObj.value.time = this.getXValue(curLeft);
|
|
717
|
+
cloneObj.value.value = this.getYValue(position, cloneObj.top);
|
|
718
|
+
cloneObj.left = curLeft;
|
|
719
|
+
this.addPointList.splice(index, 0, cloneObj);
|
|
720
|
+
this.clonePoint(point, [prePoint.left, prePoint.top, cloneObj.left, cloneObj.top]);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
// 纠正节点上的line1的坐标
|
|
727
|
+
this.setLinePatch(point);
|
|
728
|
+
},
|
|
680
729
|
/**
|
|
681
730
|
* @description: 拖动批量新增节点
|
|
682
731
|
* @param {*} point 拖动的最后一个节点
|
|
683
732
|
* @return {*}
|
|
684
733
|
*/
|
|
685
734
|
addPoint(point) {
|
|
686
|
-
const { xCellWidth, table, originX } = this.propItems;
|
|
687
|
-
// const addPointSpaceGridNumbers = table.addPointSpaceGridNumbers || [];
|
|
688
|
-
let addPointSpaceGridNumber = table.addPointSpaceGridNumber || 1;
|
|
689
|
-
|
|
690
735
|
let { left, top, originLeft, originTop } = point;
|
|
691
736
|
const currentLeft = left;
|
|
692
737
|
|
|
693
738
|
const startLength = this.addPointList.length;
|
|
694
739
|
const n = 6; // 拖动范围,在需要增加节点的刻度左右吸入的范围值
|
|
695
|
-
const
|
|
696
|
-
const residue = (left - originLeft) % spaceWidth;
|
|
740
|
+
const residue = (left - originLeft) % this.spaceWidth;
|
|
697
741
|
|
|
698
|
-
const condition = residue > 0 && (residue > spaceWidth - n || residue < n);
|
|
742
|
+
const condition = residue > 0 && (residue > this.spaceWidth - n || residue < n);
|
|
699
743
|
const conditionNoLine2 = !point.line2 && left > originLeft;
|
|
700
|
-
const conditionHasLine2 = point.line2 && left > originLeft + spaceWidth;
|
|
744
|
+
const conditionHasLine2 = point.line2 && left > originLeft + this.spaceWidth;
|
|
701
745
|
|
|
702
746
|
// if (!point.line2 && left > originLeft && condition) {
|
|
703
747
|
if (condition && (conditionNoLine2 || conditionHasLine2)) {
|
|
704
|
-
if (residue > spaceWidth - n) left = left - residue + spaceWidth;
|
|
748
|
+
if (residue > this.spaceWidth - n) left = left - residue + this.spaceWidth;
|
|
705
749
|
if (residue < n) left = left - residue;
|
|
706
750
|
point.set({
|
|
707
751
|
left
|
|
708
752
|
});
|
|
709
753
|
|
|
710
|
-
const
|
|
711
|
-
const PointLens = Math.floor((left - originLeft) / spaceWidth);
|
|
712
|
-
if (PointLens > 1 && this.addPointList?.length <= PointLens) {
|
|
713
|
-
for (let k = 0; k <= PointLens; k++) {
|
|
714
|
-
if (k > 0) {
|
|
715
|
-
const curLeft = originLeft + spaceWidth * k;
|
|
716
|
-
// 判断this.addPointList中的left是否包含curLeft,不包含就说明是漏了
|
|
717
|
-
const hasPoint = this.addPointList.some(p => Math.abs(p.left - curLeft) <= 0.001);
|
|
718
|
-
// const hasPoint = this.addPointList.some(v => v.left == curLeft);
|
|
719
|
-
if (!hasPoint) {
|
|
720
|
-
let index;
|
|
721
|
-
const pointObj = this.addPointList.find((v, i) => {
|
|
722
|
-
if (v.left > curLeft) {
|
|
723
|
-
index = i;
|
|
724
|
-
}
|
|
725
|
-
return v.left > curLeft;
|
|
726
|
-
});
|
|
727
|
-
if (pointObj) {
|
|
728
|
-
let cloneObj = JSON.parse(JSON.stringify(pointObj));
|
|
729
|
-
const len = ~~((pointObj.left - (curLeft - spaceWidth)) / spaceWidth);
|
|
730
|
-
const prePoint = this.addPointList[index - 1] || pointObj;
|
|
731
|
-
const spaceHeight = (pointObj.top - prePoint.top) / len;
|
|
732
|
-
const position = this.polyline[point.polylineTypeId].position;
|
|
733
|
-
cloneObj.top = prePoint.top + spaceHeight;
|
|
734
|
-
cloneObj.value.time = this.getXValue(curLeft);
|
|
735
|
-
cloneObj.value.value = this.getYValue(position, cloneObj.top);
|
|
736
|
-
cloneObj.left = curLeft;
|
|
737
|
-
this.addPointList.splice(index, 0, cloneObj);
|
|
738
|
-
this.clonePoint(point, [prePoint.left, prePoint.top, cloneObj.left, cloneObj.top]);
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
// 纠正节点上的line1的坐标
|
|
745
|
-
this.setLinePatch(point);
|
|
746
|
-
};
|
|
747
|
-
|
|
748
|
-
// const i = Math.floor((left - originLeft) / spaceWidth);
|
|
754
|
+
// const i = Math.floor((left - originLeft) / this.spaceWidth);
|
|
749
755
|
// 复制点和线
|
|
750
756
|
if (conditionNoLine2 || conditionHasLine2) {
|
|
751
757
|
// point.line1 && this.removePolyline(point.line1.id);
|
|
@@ -768,7 +774,7 @@ export default {
|
|
|
768
774
|
}
|
|
769
775
|
}
|
|
770
776
|
}
|
|
771
|
-
checkPoints();
|
|
777
|
+
this.checkPoints(point);
|
|
772
778
|
}
|
|
773
779
|
}
|
|
774
780
|
|
|
@@ -819,7 +825,7 @@ export default {
|
|
|
819
825
|
obj.line2?.set({ stroke: polylineObj.color });
|
|
820
826
|
}
|
|
821
827
|
});
|
|
822
|
-
if ((point.line1 || point.line2) && left < originLeft + spaceWidth) {
|
|
828
|
+
if ((point.line1 || point.line2) && left < originLeft + this.spaceWidth) {
|
|
823
829
|
setPointLineColor(point, polylineObj.color, true);
|
|
824
830
|
} else {
|
|
825
831
|
setPointLineColor(point, 'transparent', true);
|
|
@@ -380,10 +380,10 @@ export default {
|
|
|
380
380
|
const paramsData = {
|
|
381
381
|
clientType: '1',
|
|
382
382
|
deviceToken: uniRTC.deviceToken,
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
appId: 'hangchuang', // 测试(9997)账号
|
|
386
|
-
secretKey: 'hangchuang' // // 测试(9997)秘钥
|
|
383
|
+
appId: uniAppId,
|
|
384
|
+
secretKey: uniSecretKey
|
|
385
|
+
// appId: 'hangchuang', // 测试(9997)账号
|
|
386
|
+
// secretKey: 'hangchuang' // // 测试(9997)秘钥
|
|
387
387
|
};
|
|
388
388
|
try {
|
|
389
389
|
const { data } = await fetch.get('/chat/access/getMediaAuthSign', { params: paramsData });
|
|
@@ -396,8 +396,8 @@ export default {
|
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
398
398
|
};
|
|
399
|
-
|
|
400
|
-
uniRTC = new UniRTCObject('hangchuang', getLoginToken, vueSelf);
|
|
399
|
+
uniRTC = new UniRTCObject(uniAppId, getLoginToken, vueSelf);
|
|
400
|
+
// uniRTC = new UniRTCObject('hangchuang', getLoginToken, vueSelf); // 测试环境
|
|
401
401
|
console.log('uniRTC', uniRTC);
|
|
402
402
|
uniRTC.onCallComing = incoming => {
|
|
403
403
|
commit("setIncoming", incoming);
|