cnhis-design-vue 2.1.35 → 2.1.36
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 -10
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +70 -54
- package/es/big-table/style.css +1 -1
- package/es/button/index.js +2 -2
- package/es/captcha/index.js +3 -3
- package/es/checkbox/index.js +1 -1
- package/es/color-picker/index.js +1 -1
- package/es/drag-layout/index.js +3 -3
- package/es/editor/index.js +1 -1
- package/es/fabric-chart/index.js +161 -168
- package/es/fabric-chart/style.css +1 -1
- package/es/form-table/index.js +17 -17
- package/es/index/index.js +1005 -656
- package/es/index/style.css +1 -1
- package/es/input/index.js +1 -1
- package/es/map/index.js +1 -1
- package/es/multi-chat/index.js +678 -331
- package/es/multi-chat/style.css +1 -1
- package/es/multi-chat-client/index.js +605 -277
- package/es/multi-chat-client/style.css +1 -1
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +110 -30
- package/es/multi-chat-setting/index.js +152 -47
- package/es/multi-chat-sip/index.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/scale-view/index.js +24 -24
- package/es/select/index.js +3 -3
- package/es/select-label/index.js +3 -3
- package/es/select-person/index.js +2 -2
- package/es/shortcut-setter/index.js +2 -2
- package/es/table-filter/index.js +21 -21
- package/es/tag/index.js +1 -1
- package/es/utils/UniRTCv2.js +50 -15
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +1263 -884
- package/lib/cui.umd.js +1263 -884
- package/lib/cui.umd.min.js +37 -37
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +10 -8
- package/packages/fabric-chart/src/FabricChart.vue +8 -19
- package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +3 -3
- package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +1 -1
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +10 -9
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +29 -26
- package/packages/fabric-chart/src/mixins/draw.js +24 -5
- package/packages/multi-chat/chat/audio.vue +82 -14
- package/packages/multi-chat/chat/chatFooter.vue +3 -1
- package/packages/multi-chat/chat/chatMain.vue +17 -2
- package/packages/multi-chat/chat/index.vue +23 -3
- package/packages/multi-chat/chat/multiVideo.vue +4 -3
- package/packages/multi-chat/chat/video.vue +2 -1
- package/packages/multi-chat/store/getters.js +12 -0
- package/packages/multi-chat/store/mutation.js +12 -0
- package/packages/multi-chat/store/state.js +5 -1
- package/packages/multi-chat/utils/index.js +53 -0
- package/packages/multi-chat/utils/rtc-client.js +50 -3
- package/src/utils/UniRTCv2.js +40 -12
package/package.json
CHANGED
|
@@ -2254,7 +2254,7 @@ export default create({
|
|
|
2254
2254
|
// 嵌套表与主表click切换时需要清除上次的选中
|
|
2255
2255
|
this.isAboutNestTable && this.$emit('resetNestLastClickTable', table);
|
|
2256
2256
|
|
|
2257
|
-
let { row, $event = {}, rowIndex } = data;
|
|
2257
|
+
let { row, $event = {}, rowIndex, source } = data;
|
|
2258
2258
|
// 点击主表格展开行按钮 不需要触发选中行
|
|
2259
2259
|
let { className } = $event.target || {};
|
|
2260
2260
|
if (className && vexutils.isString(className) && className.includes('vxe-table--expand-btn')) return;
|
|
@@ -2278,7 +2278,7 @@ export default create({
|
|
|
2278
2278
|
const value = this.getRowClassName({ row }) == 'single--checked' ? [] : [row];
|
|
2279
2279
|
this.$set(this, 'checkedRows', value);
|
|
2280
2280
|
this.pubCheckChange(value);
|
|
2281
|
-
this.$emit('handlerClickRow', row, rowIndex);
|
|
2281
|
+
this.$emit('handlerClickRow', row, rowIndex, {source});
|
|
2282
2282
|
return;
|
|
2283
2283
|
}
|
|
2284
2284
|
this.visibleCheckAllWrap = false;
|
|
@@ -2324,7 +2324,7 @@ export default create({
|
|
|
2324
2324
|
}
|
|
2325
2325
|
this.updateAddCheckedRows(rowVal, true);
|
|
2326
2326
|
// 需要选中行
|
|
2327
|
-
this.$emit('handlerClickRow', rowVal);
|
|
2327
|
+
this.$emit('handlerClickRow', rowVal, rowIndex, {source});
|
|
2328
2328
|
return;
|
|
2329
2329
|
}
|
|
2330
2330
|
let newTheUniqueKeyArr = [];
|
|
@@ -2343,7 +2343,7 @@ export default create({
|
|
|
2343
2343
|
if (rowLen > 1) {
|
|
2344
2344
|
this.selectType != 'radio' && table.setCheckboxRow([row], true);
|
|
2345
2345
|
this.isTree != 0 && this.selectType != 'radio' && this.pubCheckChange(newRow);
|
|
2346
|
-
this.selectType != 'radio' && this.$emit('handlerClickRow', row, rowIndex);
|
|
2346
|
+
this.selectType != 'radio' && this.$emit('handlerClickRow', row, rowIndex, {source});
|
|
2347
2347
|
} else {
|
|
2348
2348
|
setChecked = !setChecked;
|
|
2349
2349
|
if (!setChecked) {
|
|
@@ -2357,7 +2357,7 @@ export default create({
|
|
|
2357
2357
|
this.selectType != 'radio' && table.setCheckboxRow([row], setChecked);
|
|
2358
2358
|
}
|
|
2359
2359
|
if (this.isTree != 0) {
|
|
2360
|
-
setChecked && this.$emit('handlerClickRow', row, rowIndex);
|
|
2360
|
+
setChecked && this.$emit('handlerClickRow', row, rowIndex, {source});
|
|
2361
2361
|
return;
|
|
2362
2362
|
}
|
|
2363
2363
|
|
|
@@ -2370,7 +2370,7 @@ export default create({
|
|
|
2370
2370
|
}
|
|
2371
2371
|
this.setCurrentCheckedLength();
|
|
2372
2372
|
this.lastPageIndex = this.pageVO.pageIndex;
|
|
2373
|
-
setChecked && this.$emit('handlerClickRow', row, rowIndex);
|
|
2373
|
+
setChecked && this.$emit('handlerClickRow', row, rowIndex, {source});
|
|
2374
2374
|
},
|
|
2375
2375
|
/**
|
|
2376
2376
|
* 单选行数据 树结构 扁平化处理
|
|
@@ -2646,9 +2646,11 @@ export default create({
|
|
|
2646
2646
|
// e.stopPropagation();
|
|
2647
2647
|
// 方晶晶验收2.5.12需求, 要求link字段第一次可选中checkbox, 第二次点击不取消选中
|
|
2648
2648
|
let isCheckedByCheckboxRow = vxeTable.isCheckedByCheckboxRow(row);
|
|
2649
|
-
|
|
2650
|
-
|
|
2649
|
+
// 不冒泡 手动触发方法
|
|
2650
|
+
if (!isCheckedByCheckboxRow) {
|
|
2651
|
+
this.handlerClickRow({row, rowIndex: index, source:'linkDetail'})
|
|
2651
2652
|
}
|
|
2653
|
+
e.stopPropagation();
|
|
2652
2654
|
vxeTable.setCurrentRow(row);
|
|
2653
2655
|
this.$emit('setNestTableClick', this.isNestTable);
|
|
2654
2656
|
this.$emit('setCurRowIndex', index);
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="c-fabric-chart" :style="{ width: canvasWidth }">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
<fabric-grid></fabric-grid>
|
|
11
|
-
<fabric-scale-value v-if="hasTable" :templateData="templateData"></fabric-scale-value>
|
|
12
|
-
<fabric-lines v-if="hasTopTable" ref="lines" :linesObj="templateData.top" v-on="$listeners"></fabric-lines>
|
|
13
|
-
<fabric-polylines ref="polylines" v-if="hasTable" :polyline="polylines" :other="templateData.left.other || {}" @pointOperation="pointOperation" v-on="$listeners"></fabric-polylines>
|
|
14
|
-
</template>
|
|
15
|
-
</component>
|
|
3
|
+
<fabric-canvas ref="canvasEle" v-bind="$attrs" :templateData="templateData" v-if="rendercanvas">
|
|
4
|
+
<fabric-text-group v-if="hasXScalevalue" :templateData="templateData" v-on="$listeners"></fabric-text-group>
|
|
5
|
+
<fabric-grid></fabric-grid>
|
|
6
|
+
<fabric-scale-value v-if="hasTable" :templateData="templateData"></fabric-scale-value>
|
|
7
|
+
<fabric-lines v-if="hasTopTable" ref="lines" :linesObj="templateData.top" v-on="$listeners"></fabric-lines>
|
|
8
|
+
<fabric-polylines ref="polylines" v-if="hasTable" :polyline="polylines" :other="templateData.left.other || {}" @pointOperation="pointOperation" v-on="$listeners"></fabric-polylines>
|
|
9
|
+
</fabric-canvas>
|
|
16
10
|
</div>
|
|
17
11
|
</template>
|
|
18
12
|
|
|
@@ -34,11 +28,6 @@ import { isObject } from './mixins/type';
|
|
|
34
28
|
export default create({
|
|
35
29
|
name: 'fabric-chart',
|
|
36
30
|
props: {
|
|
37
|
-
id: {
|
|
38
|
-
type: String,
|
|
39
|
-
required: false,
|
|
40
|
-
default: 'c-fabric-canvas'
|
|
41
|
-
},
|
|
42
31
|
templateData: {
|
|
43
32
|
type: Object,
|
|
44
33
|
required: true
|
|
@@ -50,7 +39,7 @@ export default create({
|
|
|
50
39
|
FabricTextGroup,
|
|
51
40
|
FabricPolylines,
|
|
52
41
|
FabricScaleValue,
|
|
53
|
-
FabricLines
|
|
42
|
+
FabricLines
|
|
54
43
|
},
|
|
55
44
|
computed: {
|
|
56
45
|
polylines() {
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
props: {
|
|
15
15
|
id: {
|
|
16
16
|
type: String,
|
|
17
|
-
|
|
17
|
+
default: 'c-fabric-canvas'
|
|
18
18
|
},
|
|
19
19
|
templateData: {
|
|
20
20
|
type: Object,
|
|
@@ -204,7 +204,7 @@ export default {
|
|
|
204
204
|
return this.templateData.table?.eventStyle || { selectable: true, evented: true };
|
|
205
205
|
},
|
|
206
206
|
operable() {
|
|
207
|
-
return this.templateData.table?.operable || { set: false, connect: false };
|
|
207
|
+
return this.templateData.table?.operable || { set: false, connect: false, lockMovementX: false };
|
|
208
208
|
}
|
|
209
209
|
},
|
|
210
210
|
mounted() {
|
|
@@ -212,7 +212,7 @@ export default {
|
|
|
212
212
|
},
|
|
213
213
|
methods: {
|
|
214
214
|
init() {
|
|
215
|
-
this.canvas = new this.fabric.Canvas(
|
|
215
|
+
this.canvas = new this.fabric.Canvas(this.id, {
|
|
216
216
|
width: this.templateData.canvasWidth,
|
|
217
217
|
height: this.templateData.canvasHeight,
|
|
218
218
|
// margin: [this.templateData.margin.top, this.templateData.margin.right, this.templateData.margin.bottom, this.templateData.margin.left],
|
|
@@ -262,7 +262,7 @@ export default {
|
|
|
262
262
|
this.lineEvent({ line: rightLine, line2: centerLine, text, textObj, limitX: rightLimt, startTime: item[0], endTime: item[1], preText: null, textLimitRight: rightLimt.x2 });
|
|
263
263
|
});
|
|
264
264
|
this.canvas.add(...lineItemList, ...textList);
|
|
265
|
-
this.canvas.requestRenderAll();
|
|
265
|
+
// this.canvas.requestRenderAll();
|
|
266
266
|
},
|
|
267
267
|
drawLineText(textArr, top, i, j, centerLine, x1, x2) {
|
|
268
268
|
// const value = textArr.map(v => {
|
|
@@ -245,7 +245,7 @@ export default {
|
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
const eventStyle = { selectable: false, evented: false };
|
|
248
|
-
const types = ['arrow', '+', 'shjs', 'shks', 'cg', 'jxtq'];
|
|
248
|
+
const types = ['arrow', '+', 'shjs', 'shks', 'cg', 'jxtq', 'qgcg', 'zrhz'];
|
|
249
249
|
leftTitleList.forEach(async (v, i) => {
|
|
250
250
|
const baseTop = canvasHeight - lableMargin[1];
|
|
251
251
|
const top = baseTop - i * lableLineHeight;
|
|
@@ -353,7 +353,7 @@ export default {
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
this.canvas.add(text, icon);
|
|
356
|
-
this.canvas.requestRenderAll();
|
|
356
|
+
// this.canvas.requestRenderAll();
|
|
357
357
|
});
|
|
358
358
|
},
|
|
359
359
|
// 点移动限制
|
|
@@ -473,9 +473,9 @@ export default {
|
|
|
473
473
|
if (points) {
|
|
474
474
|
Object.assign(pointOthers, {
|
|
475
475
|
originLeft: points[0],
|
|
476
|
-
originTop: points[1]
|
|
476
|
+
originTop: points[1],
|
|
477
|
+
time: linePoints.time
|
|
477
478
|
});
|
|
478
|
-
pointOthers.time = linePoints.time;
|
|
479
479
|
point = previousLine ? this.drawPoint(...points, previousLine, line, polyline.type, pointOthers, isInit) : this.drawPoint(...points, null, line, polyline.type, pointOthers, isInit);
|
|
480
480
|
}
|
|
481
481
|
lineList.push(line);
|
|
@@ -511,7 +511,7 @@ export default {
|
|
|
511
511
|
return v;
|
|
512
512
|
});
|
|
513
513
|
this.canvas.add(...lineList, ...res);
|
|
514
|
-
this.canvas.requestRenderAll();
|
|
514
|
+
// this.canvas.requestRenderAll();
|
|
515
515
|
});
|
|
516
516
|
|
|
517
517
|
this.createAttrVaule('critical', polyline, polylineIndex, polylineType, polylineTypeId);
|
|
@@ -591,9 +591,10 @@ export default {
|
|
|
591
591
|
},
|
|
592
592
|
// 拖动停止后 设置回调触发方法
|
|
593
593
|
setEmitFunction(point, isInit = false) {
|
|
594
|
+
const { operable } = this.propItems;
|
|
594
595
|
const { data, x, y } = this.getValue(point);
|
|
595
596
|
Object.assign(data, {
|
|
596
|
-
value: { time: x, value: y },
|
|
597
|
+
value: { time: operable.lockMovementX ? point.time : x, value: y },
|
|
597
598
|
isInit
|
|
598
599
|
});
|
|
599
600
|
if (this.addPointList.length === 0) {
|
|
@@ -690,12 +691,12 @@ export default {
|
|
|
690
691
|
const checkPoints = () => {
|
|
691
692
|
const PointLens = Math.floor((left - originLeft) / spaceWidth);
|
|
692
693
|
if (PointLens > 1 && this.addPointList?.length <= PointLens) {
|
|
693
|
-
for (let k = 0; k
|
|
694
|
+
for (let k = 0; k <= PointLens; k++) {
|
|
694
695
|
if (k > 0) {
|
|
695
696
|
const curLeft = originLeft + spaceWidth * k;
|
|
696
697
|
// 判断this.addPointList中的left是否包含curLeft,不包含就说明是漏了
|
|
697
|
-
|
|
698
|
-
const hasPoint = this.addPointList.some(v => v.left == curLeft);
|
|
698
|
+
const hasPoint = this.addPointList.some(p => Math.abs(p.left - curLeft) <= 0.001);
|
|
699
|
+
// const hasPoint = this.addPointList.some(v => v.left == curLeft);
|
|
699
700
|
if (!hasPoint) {
|
|
700
701
|
let index;
|
|
701
702
|
const pointObj = this.addPointList.find((v, i) => {
|
|
@@ -348,9 +348,32 @@ export default {
|
|
|
348
348
|
const lineHeightText = (obj.style?.fontSize || 12) + 2;
|
|
349
349
|
const lineHeightImg = (obj.iconStyle?.height || 12) + 2;
|
|
350
350
|
const lineHeightSeq = (obj.seqStyle?.circle?.radius || 9) * 2 + 2;
|
|
351
|
+
const addCanvas = point => {
|
|
352
|
+
point.hasControls = point.hasBorders = false;
|
|
353
|
+
this.pointEvent(point);
|
|
354
|
+
this.canvas.add(point);
|
|
355
|
+
// this.canvas.requestRenderAll();
|
|
356
|
+
};
|
|
357
|
+
const setTop = (lineHeight, i, condition) => {
|
|
358
|
+
if (!~condition.limitIndex) {
|
|
359
|
+
condition.y += i === 0 ? lineHeight / 2 : lineHeight;
|
|
360
|
+
if (condition.y >= canvasHeight - lineHeight / 2) {
|
|
361
|
+
condition.limitIndex++;
|
|
362
|
+
if (condition.limitIndex === 0) {
|
|
363
|
+
condition.y = baseYLimit;
|
|
364
|
+
condition.y -= lineHeight / 2;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
} else {
|
|
368
|
+
condition.y -= lineHeight;
|
|
369
|
+
}
|
|
370
|
+
return condition.y;
|
|
371
|
+
};
|
|
351
372
|
obj.list.forEach((item, index) => {
|
|
352
|
-
|
|
353
|
-
|
|
373
|
+
const condition = {
|
|
374
|
+
limitIndex: -1, // 标志点是否往上排列的标志,大于-1则表示需要往上排列
|
|
375
|
+
y: baseY
|
|
376
|
+
};
|
|
354
377
|
const x = this.cumputedX(item[0]);
|
|
355
378
|
if (this.isLimit(item[0])) {
|
|
356
379
|
item[1].forEach(async (v, i) => {
|
|
@@ -364,21 +387,7 @@ export default {
|
|
|
364
387
|
name: v.name,
|
|
365
388
|
type: 'mark'
|
|
366
389
|
};
|
|
367
|
-
|
|
368
|
-
if (!~limitIndex) {
|
|
369
|
-
y += i === 0 ? lineHeight / 2 : lineHeight;
|
|
370
|
-
if (y >= canvasHeight - lineHeight / 2) {
|
|
371
|
-
limitIndex++;
|
|
372
|
-
if (limitIndex === 0) {
|
|
373
|
-
y = baseYLimit;
|
|
374
|
-
y -= lineHeight / 2;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
} else {
|
|
378
|
-
y -= lineHeight;
|
|
379
|
-
}
|
|
380
|
-
common.top = y;
|
|
381
|
-
}
|
|
390
|
+
|
|
382
391
|
const eventStyle = !this.eventStyle.evented
|
|
383
392
|
? {
|
|
384
393
|
lockMovementX: true,
|
|
@@ -386,14 +395,8 @@ export default {
|
|
|
386
395
|
}
|
|
387
396
|
: {};
|
|
388
397
|
|
|
389
|
-
const addCanvas = async point => {
|
|
390
|
-
point.hasControls = point.hasBorders = false;
|
|
391
|
-
this.pointEvent(point);
|
|
392
|
-
this.canvas.add(point);
|
|
393
|
-
this.canvas.requestRenderAll();
|
|
394
|
-
};
|
|
395
398
|
if (this.isObject(v) && !v.value) {
|
|
396
|
-
setTop(lineHeightImg);
|
|
399
|
+
common.top = setTop(lineHeightImg, i, condition);
|
|
397
400
|
const option = Object.assign({}, obj.iconStyle || {}, v || {}, {
|
|
398
401
|
...common,
|
|
399
402
|
...eventStyle
|
|
@@ -409,7 +412,7 @@ export default {
|
|
|
409
412
|
addCanvas(img);
|
|
410
413
|
} else if (v.value) {
|
|
411
414
|
if (v.seq) {
|
|
412
|
-
setTop(lineHeightSeq);
|
|
415
|
+
common.top = setTop(lineHeightSeq, i, condition);
|
|
413
416
|
// 标记增加序号
|
|
414
417
|
const circle = await this.createPoint('circle', {
|
|
415
418
|
...common,
|
|
@@ -431,7 +434,7 @@ export default {
|
|
|
431
434
|
});
|
|
432
435
|
addCanvas(group);
|
|
433
436
|
} else {
|
|
434
|
-
setTop(lineHeightText);
|
|
437
|
+
common.top = setTop(lineHeightText, i, condition);
|
|
435
438
|
const text = new this.fabric.Text(String(v.value), {
|
|
436
439
|
...defaultVaule.textStyle,
|
|
437
440
|
...obj.style,
|
|
@@ -50,10 +50,6 @@ export default {
|
|
|
50
50
|
...lineStyle
|
|
51
51
|
});
|
|
52
52
|
},
|
|
53
|
-
// 绘制点
|
|
54
|
-
// drawPoint(points, style) {
|
|
55
|
-
// console.log(points, style);
|
|
56
|
-
// },
|
|
57
53
|
// 绘制文本区
|
|
58
54
|
drawTextGroup(rectStyle, fontStyle, groupStyle) {
|
|
59
55
|
const rect_style = this.isObject(rectStyle)
|
|
@@ -116,7 +112,7 @@ export default {
|
|
|
116
112
|
// fabric.loadSVGFromURL的工作方式相同,只不过您传递的是包含URL而不是SVG内容的字符串
|
|
117
113
|
return new Promise((resolve, reject) => {
|
|
118
114
|
const svg = document?.querySelector(iconClassName)?.querySelector('svg');
|
|
119
|
-
if (!svg) reject('图片转换svg失败!')
|
|
115
|
+
if (!svg) reject('图片转换svg失败!');
|
|
120
116
|
svg.setAttribute('version', 1.1);
|
|
121
117
|
svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
|
122
118
|
svg.style.color = others.color || '#000';
|
|
@@ -292,6 +288,29 @@ export default {
|
|
|
292
288
|
scale: 1,
|
|
293
289
|
...data
|
|
294
290
|
});
|
|
291
|
+
case 'qgcg': {
|
|
292
|
+
const { width, height } = data;
|
|
293
|
+
obj1 = new this.fabric.Line([0, height / 2, width, height / 2], {
|
|
294
|
+
strokeWidth: 1,
|
|
295
|
+
...data
|
|
296
|
+
});
|
|
297
|
+
obj2 = this.createCircleBorder({ ...data, width: width / 2 });
|
|
298
|
+
return new this.fabric.Group([obj2, obj1], {
|
|
299
|
+
...data
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
case 'zrhz': {
|
|
303
|
+
const { width, height } = data;
|
|
304
|
+
obj1 = new this.fabric.Line([0, height / 2, width, height / 2], {
|
|
305
|
+
strokeWidth: 1,
|
|
306
|
+
...data
|
|
307
|
+
});
|
|
308
|
+
obj2 = this.createCircleBorder({ ...data, width: width / 2 });
|
|
309
|
+
const obj3 = this.createCircleBorder({ ...data, width: width / 3 });
|
|
310
|
+
return new this.fabric.Group([obj2, obj3, obj1], {
|
|
311
|
+
...data
|
|
312
|
+
});
|
|
313
|
+
}
|
|
295
314
|
case 'cg':
|
|
296
315
|
obj1 = this.ceateLineArrow(data);
|
|
297
316
|
obj2 = this.createCircleBorder(data);
|
|
@@ -76,7 +76,7 @@ import fetch, { qs } from '@/utils/chatFetch';
|
|
|
76
76
|
import RtcClient from '../utils/rtc-client-multi';
|
|
77
77
|
import { getSipUserId } from '@/utils/sip-device';
|
|
78
78
|
import uniRTCAPI from './mixins/uniRTCAPI';
|
|
79
|
-
import { getClientDeviceToken } from '../utils/index';
|
|
79
|
+
import { getClientDeviceToken, startVideoCall, getUuid } from '../utils/index';
|
|
80
80
|
export default {
|
|
81
81
|
inject: ['store', 'i18nText'],
|
|
82
82
|
mixins: [uniRTCAPI],
|
|
@@ -119,7 +119,10 @@ export default {
|
|
|
119
119
|
'muteAudio',
|
|
120
120
|
'curScrollItem',
|
|
121
121
|
'outing',
|
|
122
|
-
'callerStatus'
|
|
122
|
+
'callerStatus',
|
|
123
|
+
'doctorInfo',
|
|
124
|
+
'requestId',
|
|
125
|
+
'callTimer'
|
|
123
126
|
]),
|
|
124
127
|
mySipName() {
|
|
125
128
|
const videoData = this.videoData;
|
|
@@ -202,12 +205,14 @@ export default {
|
|
|
202
205
|
}
|
|
203
206
|
},
|
|
204
207
|
beforeDestroy() {
|
|
208
|
+
clearInterval(this.callTimer)
|
|
209
|
+
this.setCallTimer(null)
|
|
205
210
|
clearInterval(this.timer);
|
|
206
211
|
clearInterval(this.expireTimer);
|
|
207
212
|
},
|
|
208
213
|
methods: {
|
|
209
214
|
...mapActions(['sendMessage']),
|
|
210
|
-
...mapMutations(['setShowAudio', 'setVideoData', 'setRecordId', 'setShowVideo', 'setVideoMembers', 'setMuteAudio']),
|
|
215
|
+
...mapMutations(['setShowAudio', 'setVideoData', 'setRecordId', 'setShowVideo', 'setVideoMembers', 'setMuteAudio', 'setTargetInfo', 'setRequestId', 'setCallTimer']),
|
|
211
216
|
playStream(stream, id, isUserId = true) {
|
|
212
217
|
const el = this.$el.querySelector(`#${isUserId ? 'uid_' : ''}${id}`);
|
|
213
218
|
el && stream.play(el);
|
|
@@ -242,6 +247,23 @@ export default {
|
|
|
242
247
|
document.onmouseup = null;
|
|
243
248
|
};
|
|
244
249
|
},
|
|
250
|
+
sendVideoCall(flag) {
|
|
251
|
+
const curScrollItemParams = JSON.parse(this.curScrollItem?.params)
|
|
252
|
+
const startVideoParam = {
|
|
253
|
+
customerId: curScrollItemParams.customerId,
|
|
254
|
+
doctorIdNo: this.doctorInfo.idCard,
|
|
255
|
+
doctorId: this.doctorInfo.userId,
|
|
256
|
+
sendStatus: flag,
|
|
257
|
+
requestId: this.requestId
|
|
258
|
+
}
|
|
259
|
+
return startVideoCall(startVideoParam).then(videoRes => {
|
|
260
|
+
if (!videoRes) {
|
|
261
|
+
return false
|
|
262
|
+
}
|
|
263
|
+
console.log('推送公众号成功');
|
|
264
|
+
return videoRes
|
|
265
|
+
})
|
|
266
|
+
},
|
|
245
267
|
/* 发起邀请 */
|
|
246
268
|
lanchInvite() {
|
|
247
269
|
let memberIds = this.videoMembers.map(item => item.userId).join(',');
|
|
@@ -258,25 +280,62 @@ export default {
|
|
|
258
280
|
params.sipKey = callerSipKey;
|
|
259
281
|
params.sipName = callerSipName;
|
|
260
282
|
}
|
|
261
|
-
fetch.post('/chat/access/videoInvite', qs.stringify(params)).then(({ data }) => {
|
|
283
|
+
fetch.post('/chat/access/videoInvite', qs.stringify(params)).then(async ({ data }) => {
|
|
262
284
|
if (data.result === 'SUCCESS') {
|
|
285
|
+
this.setRequestId(getUuid())
|
|
263
286
|
this.$message.success(this.i18nText('1.9.386'));
|
|
264
287
|
// this.appendVideoMessage();
|
|
265
288
|
this.setVideoData(data.map);
|
|
289
|
+
this.setTargetInfo({username: data.map?.targetList[0].username, token: data.map?.targetList[0].token})
|
|
266
290
|
// 江苏省
|
|
267
291
|
if (this.uniRTC || data.map?.vendor == 3) {
|
|
268
292
|
console.log('this.curScrollItem', this.curScrollItem);
|
|
269
293
|
const curScrollItemParams = JSON.parse(this.curScrollItem?.params)
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
294
|
+
const videoCallInfo = await this.sendVideoCall(false)
|
|
295
|
+
if (Array.isArray(videoCallInfo) && videoCallInfo.length) {
|
|
296
|
+
let targetList = videoCallInfo.map(item => {
|
|
297
|
+
return {
|
|
298
|
+
deviceToken: item.token
|
|
299
|
+
}
|
|
300
|
+
})
|
|
277
301
|
this.checkStatus(targetList);
|
|
278
|
-
|
|
279
|
-
|
|
302
|
+
} else {
|
|
303
|
+
getClientDeviceToken(curScrollItemParams.customerId).then(tokenRes => {
|
|
304
|
+
if (!tokenRes || tokenRes.code != 200) {
|
|
305
|
+
return
|
|
306
|
+
}
|
|
307
|
+
const targetInfo = data.map?.targetList || [];
|
|
308
|
+
// const targetList = data.map?.targetList || [];
|
|
309
|
+
const targetList = [{deviceToken: tokenRes.deviceToken, username: targetInfo[0].username, token: targetInfo[0].token}]
|
|
310
|
+
this.checkStatus(targetList);
|
|
311
|
+
// this.startCall(targetList);
|
|
312
|
+
})
|
|
313
|
+
}
|
|
314
|
+
const timerId = setInterval(async () => {
|
|
315
|
+
console.log('定时调用查询状态');
|
|
316
|
+
const curScrollItemParams1 = JSON.parse(this.curScrollItem?.params)
|
|
317
|
+
const videoCallInfo1 = await this.sendVideoCall(false)
|
|
318
|
+
if (Array.isArray(videoCallInfo1) && videoCallInfo1.length) {
|
|
319
|
+
let targetList = videoCallInfo1.map(item => {
|
|
320
|
+
return {
|
|
321
|
+
deviceToken: item.token
|
|
322
|
+
}
|
|
323
|
+
})
|
|
324
|
+
this.checkStatus(targetList);
|
|
325
|
+
} else {
|
|
326
|
+
getClientDeviceToken(curScrollItemParams1.customerId).then(tokenRes => {
|
|
327
|
+
if (!tokenRes || tokenRes.code != 200) {
|
|
328
|
+
return
|
|
329
|
+
}
|
|
330
|
+
const targetInfo = data.map?.targetList || [];
|
|
331
|
+
// const targetList = data.map?.targetList || [];
|
|
332
|
+
const targetList = [{deviceToken: tokenRes.deviceToken, username: targetInfo[0].username, token: targetInfo[0].token}]
|
|
333
|
+
this.checkStatus(targetList);
|
|
334
|
+
// this.startCall(targetList);
|
|
335
|
+
})
|
|
336
|
+
}
|
|
337
|
+
}, 7000)
|
|
338
|
+
this.setCallTimer(timerId)
|
|
280
339
|
}
|
|
281
340
|
} else {
|
|
282
341
|
this.$message.warning(data.resultMsg);
|
|
@@ -286,6 +345,8 @@ export default {
|
|
|
286
345
|
},
|
|
287
346
|
/* 挂断视频 */
|
|
288
347
|
handleReject(accept, isTimeOut = false) {
|
|
348
|
+
clearInterval(this.callTimer)
|
|
349
|
+
this.setCallTimer(null)
|
|
289
350
|
if (!this.videoData?.inviteResult) {
|
|
290
351
|
if (this.validTalkingEnv && accept == '1') {
|
|
291
352
|
this.validTalkingEnv().then(res => {
|
|
@@ -335,6 +396,8 @@ export default {
|
|
|
335
396
|
if (accept == '0') {
|
|
336
397
|
this.$message.success(`${this.i18nText('1.9.387')}!`);
|
|
337
398
|
this.setShowAudio(false);
|
|
399
|
+
clearInterval(this.callTimer)
|
|
400
|
+
this.setCallTimer(null)
|
|
338
401
|
this.setMuteAudio(false);
|
|
339
402
|
this.setVideoMembers([]);
|
|
340
403
|
this.setVideoData({});
|
|
@@ -352,6 +415,8 @@ export default {
|
|
|
352
415
|
if (data.map.type == 1 && data.map.mode == 2) {
|
|
353
416
|
this.setShowVideo(true);
|
|
354
417
|
this.setShowAudio(false);
|
|
418
|
+
clearInterval(this.callTimer)
|
|
419
|
+
this.setCallTimer(null)
|
|
355
420
|
}
|
|
356
421
|
this.setVideoData(data.map);
|
|
357
422
|
this.$nextTick(() => {
|
|
@@ -409,7 +474,8 @@ export default {
|
|
|
409
474
|
wsUrl: this.sdkInfo?.wsUrl,
|
|
410
475
|
turnUrl: this.sdkInfo?.turnUrl,
|
|
411
476
|
turnUsername: this.sdkInfo?.turnUsername,
|
|
412
|
-
turnCredential: this.sdkInfo?.turnCredential
|
|
477
|
+
turnCredential: this.sdkInfo?.turnCredential,
|
|
478
|
+
videoData: this.videoData
|
|
413
479
|
});
|
|
414
480
|
this.timer = setInterval(() => {
|
|
415
481
|
this.meetingTime = this.meetingTime + 1;
|
|
@@ -429,6 +495,8 @@ export default {
|
|
|
429
495
|
this.rtc.leave();
|
|
430
496
|
this.rtc = null;
|
|
431
497
|
}
|
|
498
|
+
clearInterval(this.callTimer)
|
|
499
|
+
this.setCallTimer(null)
|
|
432
500
|
}
|
|
433
501
|
},
|
|
434
502
|
watch: {
|
|
@@ -402,7 +402,8 @@ export default {
|
|
|
402
402
|
'setLastCurrentTab',
|
|
403
403
|
'setIsRecorderVoice',
|
|
404
404
|
'setVideoData',
|
|
405
|
-
'setSessionType'
|
|
405
|
+
'setSessionType',
|
|
406
|
+
'setCallerStatus'
|
|
406
407
|
]),
|
|
407
408
|
...mapMutations({
|
|
408
409
|
clearMsgList: 'setMsgList'
|
|
@@ -722,6 +723,7 @@ export default {
|
|
|
722
723
|
});
|
|
723
724
|
},
|
|
724
725
|
handleVideoClick(type) {
|
|
726
|
+
this.setCallerStatus('')
|
|
725
727
|
// this.curScrollItem.type 2多人 1单人
|
|
726
728
|
if (this.sessionType === 2) {
|
|
727
729
|
this.$emit('update:addvisible', true);
|
|
@@ -299,7 +299,9 @@ export default {
|
|
|
299
299
|
'enable',
|
|
300
300
|
'appendList',
|
|
301
301
|
'queueItem',
|
|
302
|
-
'isRecorderVoice'
|
|
302
|
+
'isRecorderVoice',
|
|
303
|
+
'callTimer',
|
|
304
|
+
'requestId'
|
|
303
305
|
]),
|
|
304
306
|
orgId() {
|
|
305
307
|
const getters = this.store.getters;
|
|
@@ -396,6 +398,7 @@ export default {
|
|
|
396
398
|
},
|
|
397
399
|
created() {
|
|
398
400
|
this.attachEvent();
|
|
401
|
+
this.getUserInformation();
|
|
399
402
|
},
|
|
400
403
|
methods: {
|
|
401
404
|
...mapMutations([
|
|
@@ -411,13 +414,25 @@ export default {
|
|
|
411
414
|
'setShowAudio',
|
|
412
415
|
'setVideoMode',
|
|
413
416
|
'setVideoMembers',
|
|
414
|
-
'setIsRecorderVoice'
|
|
417
|
+
'setIsRecorderVoice',
|
|
418
|
+
'setDoctorInfo',
|
|
419
|
+
'setCallTimer'
|
|
415
420
|
]),
|
|
416
421
|
...mapActions({
|
|
417
422
|
getEarlierMsg: 'setMsgList',
|
|
418
423
|
handleBotChat: 'handleBotChat',
|
|
419
424
|
sendMessage: 'sendMessage'
|
|
420
425
|
}),
|
|
426
|
+
// 获取医生信息
|
|
427
|
+
getUserInformation() {
|
|
428
|
+
const url = '/user/getUserInformation';
|
|
429
|
+
fetch.get(url).then(({ data }) => {
|
|
430
|
+
if (data.result === 'SUCCESS') {
|
|
431
|
+
this.setDoctorInfo(data?.map?.sysUserInformation)
|
|
432
|
+
console.log('data?.map?.sysUserInformation', data?.map?.sysUserInformation);
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
},
|
|
421
436
|
getMessageItemClass(item) {
|
|
422
437
|
// content.source === 1, 代表为系统消息, 系统统一左侧展示
|
|
423
438
|
if (item.content?.source === 1) {
|
|
@@ -336,7 +336,7 @@ import addConference from './addConference';
|
|
|
336
336
|
import ClassifyTabs from '../components/classify-tabs';
|
|
337
337
|
import ChatTabsHeader from '../components/chat-tabs-header';
|
|
338
338
|
import UserStatus from '../components/user-status';
|
|
339
|
-
import { checkTalkingEnv } from '../utils/index';
|
|
339
|
+
import { checkTalkingEnv, startVideoCall } from '../utils/index';
|
|
340
340
|
import uniRTCAPI from './mixins/uniRTCAPI';
|
|
341
341
|
|
|
342
342
|
export default {
|
|
@@ -475,7 +475,10 @@ export default {
|
|
|
475
475
|
'curScrollItem',
|
|
476
476
|
'disableOperate',
|
|
477
477
|
'sdkInfo',
|
|
478
|
-
'closedSession'
|
|
478
|
+
'closedSession',
|
|
479
|
+
'doctorInfo',
|
|
480
|
+
'targetInfo',
|
|
481
|
+
'requestId'
|
|
479
482
|
]),
|
|
480
483
|
isNormalStyle() {
|
|
481
484
|
return this.styleFold !== 'Y';
|
|
@@ -646,7 +649,8 @@ export default {
|
|
|
646
649
|
'setQueueItem',
|
|
647
650
|
'setCurScrollItem',
|
|
648
651
|
'setSessionType',
|
|
649
|
-
'setCallerStatus'
|
|
652
|
+
'setCallerStatus',
|
|
653
|
+
'setOuting'
|
|
650
654
|
]),
|
|
651
655
|
...mapActions(['setChatTimer', 'getVideoHistoryList', 'initUniRTC']),
|
|
652
656
|
...mapActions({
|
|
@@ -1309,6 +1313,22 @@ export default {
|
|
|
1309
1313
|
assemblyId: this.assemblyId
|
|
1310
1314
|
}
|
|
1311
1315
|
},
|
|
1316
|
+
sendVideoCall() {
|
|
1317
|
+
const curScrollItemParams = JSON.parse(this.curScrollItem?.params)
|
|
1318
|
+
const startVideoParam = {
|
|
1319
|
+
customerId: curScrollItemParams.customerId,
|
|
1320
|
+
doctorIdNo: this.doctorInfo.idCard,
|
|
1321
|
+
doctorId: this.doctorInfo.userId,
|
|
1322
|
+
sendStatus: true,
|
|
1323
|
+
requestId: this.requestId
|
|
1324
|
+
}
|
|
1325
|
+
startVideoCall(startVideoParam).then(videoRes => {
|
|
1326
|
+
if (!videoRes) {
|
|
1327
|
+
return
|
|
1328
|
+
}
|
|
1329
|
+
console.log('推送公众号成功');
|
|
1330
|
+
})
|
|
1331
|
+
},
|
|
1312
1332
|
// 获取视频sdk
|
|
1313
1333
|
getSdkAppId() {
|
|
1314
1334
|
fetch
|