cnhis-design-vue 2.1.29 → 2.1.31

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.
Files changed (121) hide show
  1. package/CHANGELOG.md +34 -16
  2. package/es/affix/index.js +8 -8
  3. package/es/age/index.js +10 -10
  4. package/es/alert/index.js +8 -8
  5. package/es/anchor/index.js +8 -8
  6. package/es/auto-complete/index.js +8 -8
  7. package/es/avatar/index.js +8 -8
  8. package/es/back-top/index.js +8 -8
  9. package/es/badge/index.js +8 -8
  10. package/es/base/index.js +8 -8
  11. package/es/big-table/index.js +68 -68
  12. package/es/breadcrumb/index.js +8 -8
  13. package/es/button/index.js +22 -22
  14. package/es/calendar/index.js +8 -8
  15. package/es/captcha/index.js +3 -3
  16. package/es/card/index.js +8 -8
  17. package/es/carousel/index.js +8 -8
  18. package/es/cascader/index.js +8 -8
  19. package/es/checkbox/index.js +9 -9
  20. package/es/col/index.js +8 -8
  21. package/es/collapse/index.js +8 -8
  22. package/es/color-picker/index.js +1 -1
  23. package/es/comment/index.js +8 -8
  24. package/es/config-provider/index.js +8 -8
  25. package/es/date-picker/index.js +8 -8
  26. package/es/descriptions/index.js +8 -8
  27. package/es/divider/index.js +8 -8
  28. package/es/drag-layout/index.js +3 -3
  29. package/es/drawer/index.js +8 -8
  30. package/es/dropdown/index.js +8 -8
  31. package/es/editor/index.js +1 -1
  32. package/es/empty/index.js +8 -8
  33. package/es/fabric-chart/index.js +21 -30
  34. package/es/form/index.js +8 -8
  35. package/es/form-model/index.js +8 -8
  36. package/es/form-table/index.js +94 -92
  37. package/es/form-table/style.css +1 -1
  38. package/es/index/index.js +1247 -1008
  39. package/es/index/style.css +1 -1
  40. package/es/input/index.js +9 -9
  41. package/es/input-number/index.js +8 -8
  42. package/es/layout/index.js +8 -8
  43. package/es/list/index.js +8 -8
  44. package/es/locale-provider/index.js +8 -8
  45. package/es/map/index.js +9 -9
  46. package/es/mentions/index.js +8 -8
  47. package/es/menu/index.js +8 -8
  48. package/es/message/index.js +8 -8
  49. package/es/multi-chat/index.js +772 -559
  50. package/es/multi-chat/style.css +1 -1
  51. package/es/multi-chat-client/index.js +368 -220
  52. package/es/multi-chat-client/style.css +1 -1
  53. package/es/multi-chat-history/index.js +292 -39
  54. package/es/multi-chat-history/style.css +1 -1
  55. package/es/multi-chat-record/index.js +114 -40
  56. package/es/multi-chat-record/style.css +1 -1
  57. package/es/multi-chat-setting/index.js +132 -57
  58. package/es/multi-chat-setting/style.css +1 -1
  59. package/es/multi-chat-sip/index.js +1 -1
  60. package/es/notification/index.js +8 -8
  61. package/es/page-header/index.js +8 -8
  62. package/es/pagination/index.js +8 -8
  63. package/es/popconfirm/index.js +8 -8
  64. package/es/popover/index.js +8 -8
  65. package/es/progress/index.js +8 -8
  66. package/es/radio/index.js +9 -9
  67. package/es/rate/index.js +8 -8
  68. package/es/result/index.js +8 -8
  69. package/es/row/index.js +8 -8
  70. package/es/scale-view/index.js +24 -24
  71. package/es/select/index.js +11 -11
  72. package/es/select-label/index.js +11 -11
  73. package/es/select-person/index.js +36 -28
  74. package/es/select-person/style.css +1 -1
  75. package/es/shortcut-setter/index.js +10 -10
  76. package/es/skeleton/index.js +8 -8
  77. package/es/slider/index.js +8 -8
  78. package/es/space/index.js +8 -8
  79. package/es/spin/index.js +8 -8
  80. package/es/statistic/index.js +8 -8
  81. package/es/steps/index.js +8 -8
  82. package/es/switch/index.js +8 -8
  83. package/es/table-filter/index.js +47 -47
  84. package/es/tabs/index.js +8 -8
  85. package/es/tag/index.js +9 -9
  86. package/es/time-picker/index.js +8 -8
  87. package/es/timeline/index.js +8 -8
  88. package/es/tooltip/index.js +8 -8
  89. package/es/transfer/index.js +8 -8
  90. package/es/tree/index.js +8 -8
  91. package/es/tree-select/index.js +8 -8
  92. package/es/upload/index.js +8 -8
  93. package/es/utils/UniRTCv2.js +89 -13
  94. package/es/utils/trtc.js +19025 -0
  95. package/es/verification-code/index.js +2 -2
  96. package/lib/cui.common.js +26238 -6114
  97. package/lib/cui.umd.js +26238 -6114
  98. package/lib/cui.umd.min.js +150 -148
  99. package/package.json +2 -2
  100. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +3 -11
  101. package/packages/form-table/src/FormTable.vue +4 -1
  102. package/packages/multi-chat/chat/audio.vue +22 -6
  103. package/packages/multi-chat/chat/chatHeader.vue +4 -1
  104. package/packages/multi-chat/chat/chatHistory.vue +16 -2
  105. package/packages/multi-chat/chat/chatMain.vue +5 -0
  106. package/packages/multi-chat/chat/index.vue +31 -1
  107. package/packages/multi-chat/chat/mixins/uniRTCAPI.js +10 -7
  108. package/packages/multi-chat/chat/multiVideo.vue +16 -4
  109. package/packages/multi-chat/chat/scrollList.vue +9 -3
  110. package/packages/multi-chat/components/avatar.vue +63 -26
  111. package/packages/multi-chat/img/replay.png +0 -0
  112. package/packages/multi-chat/setting/sessionList/messageRecord.vue +9 -0
  113. package/packages/multi-chat/store/actions.js +8 -4
  114. package/packages/multi-chat/store/getters.js +3 -0
  115. package/packages/multi-chat/store/mutation.js +3 -0
  116. package/packages/multi-chat/store/state.js +2 -1
  117. package/packages/multi-chat/utils/index.js +25 -0
  118. package/packages/multi-chat/utils/rtc-client.js +23 -3
  119. package/packages/select-person/select-person.vue +9 -4
  120. package/src/utils/UniRTCv2.js +53 -15
  121. package/src/utils/trtc.js +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.29",
3
+ "version": "2.1.31",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -104,4 +104,4 @@
104
104
  "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
105
105
  }
106
106
  }
107
- }
107
+ }
@@ -705,6 +705,8 @@ export default {
705
705
  let cloneObj = JSON.parse(JSON.stringify(pointObj));
706
706
  cloneObj.value.time = this.getXValue(curLeft);
707
707
  cloneObj.left = curLeft;
708
+ // 补充的节点会和滑动的线条对应不上
709
+ // await this.clonePoint(point, [curLeft, cloneObj.top, cloneObj.left, cloneObj.top])
708
710
  this.addPointList.splice(index, 0, cloneObj);
709
711
  }
710
712
  }
@@ -718,9 +720,7 @@ export default {
718
720
  if (conditionNoLine2 || conditionHasLine2) {
719
721
  // point.line1 && this.removePolyline(point.line1.id);
720
722
  setPointLineColor(point, 'transparent', conditionHasLine2);
721
- // if (i === 1) {
722
723
  this.addPointList.length == 0 && (await this.clonePoint(point, [point.line1 ? point.line1.x1 : originLeft, point.line1 ? point.line1.y1 : originTop, originLeft, originTop]));
723
- // }
724
724
  if (this.addPointList.every(v => v.left !== left)) {
725
725
  // const points1 = i === 1 ? [originLeft, originTop] : point.prePoints;
726
726
  const points1 = this.addPointList.length == 0 ? [originLeft, originTop] : point.prePoints;
@@ -876,11 +876,6 @@ export default {
876
876
  evented: false,
877
877
  ...others
878
878
  });
879
- // line.hasControls = line.hasBorders = false;
880
- // line.on('mouseover', () => {
881
- // // 将当条线段以及点层级置顶
882
- // // 此处有问题,线段定位是斜角形成的整个矩形,会挡住其他点或线段的mouseover事件
883
- // });
884
879
 
885
880
  return line;
886
881
  },
@@ -1019,10 +1014,7 @@ export default {
1019
1014
  const point = this.canvas.getObjects().filter(item => item[pointId] === id);
1020
1015
  if (point && point.length > 0) {
1021
1016
  point.forEach(v => {
1022
- if (left && v.left >= left) {
1023
- this.canvas.remove(v);
1024
- v.line1 && this.canvas.remove(v.line1);
1025
- } else if (!left) {
1017
+ if ((left && v.left >= left) || !left) {
1026
1018
  this.canvas.remove(v);
1027
1019
  v.line1 && this.canvas.remove(v.line1);
1028
1020
  }
@@ -344,7 +344,10 @@ export default create({
344
344
  ];
345
345
  },
346
346
  async loadData(list) {
347
- if (!list || !list.length) return;
347
+ if (!list || !list.length) {
348
+ this.$refs[this.formTableGridRef]?.loadData([]);
349
+ return
350
+ }
348
351
  this.tableList = vexutils.clone(list, true);
349
352
  this.fullTableList = vexutils.clone(list, true);
350
353
  this.handlerFieldToggleList(this.tableList);
@@ -35,7 +35,9 @@
35
35
  padding: size === 'big' ? '24px 18px 7px' : '0 0 0 6px'
36
36
  }"
37
37
  >
38
- <span :style="{ fontSize: size === 'big' ? '24px' : '14px' }">{{ name }}</span>
38
+ <span :style="{ fontSize: size === 'big' ? '24px' : '14px' }">
39
+ {{ name }}
40
+ <span v-if="sdkInfo.vendor == 3">({{callerStatus}})</span></span>
39
41
  <span
40
42
  class="status"
41
43
  :style="{
@@ -74,6 +76,7 @@ import fetch, { qs } from '@/utils/chatFetch';
74
76
  import RtcClient from '../utils/rtc-client-multi';
75
77
  import { getSipUserId } from '@/utils/sip-device';
76
78
  import uniRTCAPI from './mixins/uniRTCAPI';
79
+ import { getClientDeviceToken } from '../utils/index';
77
80
  export default {
78
81
  inject: ['store', 'i18nText'],
79
82
  mixins: [uniRTCAPI],
@@ -113,7 +116,10 @@ export default {
113
116
  'accessParams',
114
117
  'queryParams',
115
118
  'chatUserId',
116
- 'muteAudio'
119
+ 'muteAudio',
120
+ 'curScrollItem',
121
+ 'outing',
122
+ 'callerStatus'
117
123
  ]),
118
124
  mySipName() {
119
125
  const videoData = this.videoData;
@@ -259,9 +265,18 @@ export default {
259
265
  this.setVideoData(data.map);
260
266
  // 江苏省
261
267
  if (this.uniRTC || data.map?.vendor == 3) {
262
- const targetList = data.map?.targetList || [];
263
- this.checkStatus(targetList);
264
- this.startCall(targetList);
268
+ console.log('this.curScrollItem', this.curScrollItem);
269
+ const curScrollItemParams = JSON.parse(this.curScrollItem?.params)
270
+ getClientDeviceToken(curScrollItemParams.customerId).then(tokenRes => {
271
+ if (!tokenRes) {
272
+ return
273
+ }
274
+ const targetInfo = data.map?.targetList || [];
275
+ // const targetList = data.map?.targetList || [];
276
+ const targetList = [{deviceToken: tokenRes.deviceToken, username: targetInfo[0].username, token: targetInfo[0].token}]
277
+ this.checkStatus(targetList);
278
+ this.startCall(targetList);
279
+ })
265
280
  }
266
281
  } else {
267
282
  this.$message.warning(data.resultMsg);
@@ -325,7 +340,8 @@ export default {
325
340
  this.setVideoData({});
326
341
  // 江苏省
327
342
  if (this.uniRTC) {
328
- if (this.videoData.isCaller || this.videoData.inviteResult == 1) {
343
+ if (accept === '0') {
344
+ console.log('this.outing', this.outing);
329
345
  this.stopCall();
330
346
  } else {
331
347
  // 拒接
@@ -452,11 +452,14 @@ export default {
452
452
  color: #2d7aff;
453
453
  border: 1px solid #2d7aff;
454
454
  }
455
- /deep/ .avatar-logo {
455
+ /deep/ .avatar-wrap {
456
456
  font-size: 12px;
457
457
  position: absolute;
458
458
  left: 0;
459
459
  top: 50%;
460
+ }
461
+ /deep/ .avatar-logo {
462
+ font-size: 12px;
460
463
  margin-top: -15px;
461
464
  }
462
465
  }
@@ -36,6 +36,7 @@
36
36
  <div class="content">
37
37
  <img style="width:16px;" src="../img/video_consult.png" />
38
38
  {{ item.content.content }}
39
+ <img v-if="item.content.name" @click="openReplayVideo(item.content.name)" style="width: 20px;margin-left: 12px;cursor:pointer" src="../img/replay.png" />
39
40
  </div>
40
41
  </div>
41
42
  <div class="content-wrap" v-else-if="item.content.type === 6">
@@ -92,7 +93,7 @@ import MsgDescribe from '../components/msg-describe';
92
93
  import MsgPicture from '../components/msg-picture';
93
94
  import MsgPrescription from '../components/msg-prescription';
94
95
  import viewerOptions from './mixins/viewerOptions';
95
- import InfiniteScroll from 'vue-infinite-scroll';
96
+ import InfiniteScroll from '@/directive/scroll';
96
97
  import vexutils from '@/utils/vexutils';
97
98
  import fetch from '@/utils/chatFetch';
98
99
  import { Icon, Spin } from 'ant-design-vue';
@@ -108,6 +109,7 @@ export default {
108
109
  MsgDescribe
109
110
  },
110
111
  data() {
112
+ this.handleInfiniteOnLoad = vexutils.debounce(this.handleInfiniteOnLoad, 200)
111
113
  return {
112
114
  msgList: [],
113
115
  historySessionId: '',
@@ -116,7 +118,8 @@ export default {
116
118
  visible: false,
117
119
  images: [],
118
120
  curAudioUrl: '',
119
- lastAudioItem: null
121
+ lastAudioItem: null,
122
+ loadFinished: false
120
123
  };
121
124
  },
122
125
  props: ['params', 'i18nText'],
@@ -138,6 +141,9 @@ export default {
138
141
  this.handleInfiniteOnLoad();
139
142
  },
140
143
  methods: {
144
+ openReplayVideo(url) {
145
+ window.open(url)
146
+ },
141
147
  getMessageItemClass(item) {
142
148
  return {
143
149
  right: item.senderFlag === 2,
@@ -146,6 +152,11 @@ export default {
146
152
  },
147
153
  /* 向上滚动刷新 */
148
154
  handleInfiniteOnLoad() {
155
+ console.log('加载记录');
156
+ if (this.loadFinished) {
157
+ console.log('loadFinished')
158
+ return
159
+ }
149
160
  this.loading = true;
150
161
  let id = this.msgList[0] && this.msgList[0].id;
151
162
  // let params = {
@@ -169,6 +180,7 @@ export default {
169
180
  if (data.result === 'SUCCESS') {
170
181
  this.loading = false;
171
182
  if (id && data.list.length === 0) {
183
+ this.loadFinished = true
172
184
  return '没有更多消息了';
173
185
  }
174
186
  this.msgList = [...data.list, ...this.msgList];
@@ -176,6 +188,8 @@ export default {
176
188
  .filter(v => !v.recallFlag && v.content.type == 1)
177
189
  ?.map(v => v.content?.content);
178
190
  this.handleScrollTo('current');
191
+ } else {
192
+ console.log('加载失败');
179
193
  }
180
194
  });
181
195
  },
@@ -640,6 +640,11 @@ export default {
640
640
  return;
641
641
  }
642
642
  if (openMode === 'EJECT') {
643
+ // 打开云his页面需要从cookie内获取最新的jsessionids
644
+ if (address.includes('jsessionidsFlag=1')) {
645
+ let jsessionids = vexutils.cookie.get('jsessionids')
646
+ address = address + `&jsessionids=${jsessionids}`
647
+ }
643
648
  this.modalShow = true;
644
649
  this.modalData = Object.assign({}, data, {
645
650
  address
@@ -645,7 +645,8 @@ export default {
645
645
  'setLastCurrentTab',
646
646
  'setQueueItem',
647
647
  'setCurScrollItem',
648
- 'setSessionType'
648
+ 'setSessionType',
649
+ 'setCallerStatus'
649
650
  ]),
650
651
  ...mapActions(['setChatTimer', 'getVideoHistoryList', 'initUniRTC']),
651
652
  ...mapActions({
@@ -849,6 +850,7 @@ export default {
849
850
  this.subscribeVideoRecord();
850
851
  this.subscribeOfflineSessionStatistic();
851
852
  this.subscribeMessageRecord();
853
+ this.subscribeUserStatus();
852
854
  },
853
855
  errorCb: (_err, count) => {
854
856
  this.reConnention = count;
@@ -864,6 +866,16 @@ export default {
864
866
  });
865
867
  },
866
868
 
869
+ /* 订阅客服状态更新 */
870
+ subscribeUserStatus() {
871
+ this.stompClient.subscribe(`/topic/updateStatus/${this.serviceId}`, response => {
872
+ // let res = JSON.parse(response.body);
873
+ console.log('客服状态改变');
874
+ let refDom = this.$refs['scrollList-session'][0];
875
+ refDom?.getSessionList();
876
+ });
877
+ },
878
+
867
879
  /* 订阅排队列表人数及未读消息数 */
868
880
  subscribeQueueStatistic() {
869
881
  this.stompClient.subscribe(`/topic/queueStatistic/${this.queueKey}`, response => {
@@ -1089,6 +1101,15 @@ export default {
1089
1101
  // });
1090
1102
  });
1091
1103
  },
1104
+ // 江苏通app接通
1105
+ subscribeAcceptedJST(res) {
1106
+ this.setShowVideo(true);
1107
+ this.setShowAudio(false);
1108
+ this.setVideoData(res);
1109
+ this.$nextTick(() => {
1110
+ this.setRecordId(res.recordId);
1111
+ });
1112
+ },
1092
1113
  /**
1093
1114
  * 视频通话记录变更
1094
1115
  */
@@ -1280,6 +1301,14 @@ export default {
1280
1301
  }
1281
1302
  });
1282
1303
  },
1304
+ getRefuseParam() {
1305
+ const curScrollItemParams = JSON.parse(this.curScrollItem?.params)
1306
+ return {
1307
+ userId: curScrollItemParams.vaa01,
1308
+ orgId: curScrollItemParams.orgId,
1309
+ assemblyId: this.assemblyId
1310
+ }
1311
+ },
1283
1312
  // 获取视频sdk
1284
1313
  getSdkAppId() {
1285
1314
  fetch
@@ -1296,6 +1325,7 @@ export default {
1296
1325
  if (vendor == 3) {
1297
1326
  this.initUniRTC({
1298
1327
  ...data.obj,
1328
+ vueSelf: this,
1299
1329
  params: {
1300
1330
  assemblyId: this.assemblyId
1301
1331
  }
@@ -2,7 +2,7 @@ import { mapGetters, mapMutations, mapActions } from '../../store/helper';
2
2
 
3
3
  export default {
4
4
  computed: {
5
- ...mapGetters(['uniRTC', 'incoming', 'outing']),
5
+ ...mapGetters(['uniRTC', 'incoming', 'outing', 'sdkAppId']),
6
6
  },
7
7
  data() {
8
8
  return {
@@ -26,17 +26,19 @@ export default {
26
26
  let outings = [];
27
27
  for (let i = 0; i < targetList.length; i++) {
28
28
  const item = targetList[i];
29
- const outing = this.uniRTC.startCall(item.deviceToken, '腾讯', 'tencent', {
30
- sdkAppId: this.uniRTC.appId,
31
- userId: this.userId,
29
+ const outing = this.uniRTC.startCall(item.deviceToken, '腾讯视频', 'tencent', {
30
+ sdkAppId: Number(this.sdkAppId),
31
+ userId: this.isServer ? this.serviceId : this.clientId,
32
32
  userSig: this.videoData.token,
33
- roomId: this.videoData.roomId,
33
+ roomId: Number(this.videoData.roomId),
34
+ videoData: this.videoData
34
35
  // privateMapKey
35
36
  }, {
36
- sdkAppId: this.uniRTC.appId,
37
+ sdkAppId: Number(this.sdkAppId),
37
38
  userId: item.username,
38
39
  userSig: item.token,
39
- roomId: this.videoData.roomId,
40
+ roomId: Number(this.videoData.roomId),
41
+ videoData: this.videoData
40
42
  // privateMapKey
41
43
  });
42
44
  outings.push(outing);
@@ -47,6 +49,7 @@ export default {
47
49
  stopCall() {
48
50
  for (let i = 0; i < this.outing.length; i++) {
49
51
  const item = this.outing[i];
52
+ console.log('江苏省主动挂断', item);
50
53
  // 江苏省主动挂断
51
54
  this.uniRTC.stopCall(item);
52
55
  }
@@ -185,6 +185,7 @@ import fetch, { qs } from '@/utils/chatFetch';
185
185
  import { Button, Modal, Popover, Tooltip } from 'ant-design-vue';
186
186
  import SvgIcon from '@/component/svg/index.vue';
187
187
  import uniRTCAPI from './mixins/uniRTCAPI';
188
+ import { getClientDeviceToken } from '../utils/index';
188
189
 
189
190
  const videoStatus = {
190
191
  1: '未接听',
@@ -249,7 +250,10 @@ export default {
249
250
  'sessionId',
250
251
  'videoListChange',
251
252
  'videoData',
252
- 'videoMode'
253
+ 'videoMode',
254
+ 'curScrollItem',
255
+ 'clientId',
256
+ 'isServer'
253
257
  ]),
254
258
  serviceName() {
255
259
  return this.userInfo?.sysParams?.userName;
@@ -472,9 +476,17 @@ export default {
472
476
  // this.appendVideoMessage();
473
477
  // 江苏省
474
478
  if (this.uniRTC) {
475
- const targetList = data.map?.targetList || [];
476
- this.checkStatus(targetList);
477
- this.startCall(targetList);
479
+ console.log('this.curScrollItem', this.curScrollItem);
480
+ const curScrollItemParams = JSON.parse(this.curScrollItem?.params)
481
+ getClientDeviceToken(curScrollItemParams.customerId).then(tokenRes => {
482
+ const targetInfo = data.map?.targetList || [];
483
+ if (!tokenRes) {
484
+ return
485
+ }
486
+ const targetList = [{deviceToken: tokenRes.deviceToken, username: targetInfo[0].username, token: targetInfo[0].token}]
487
+ this.checkStatus(targetList);
488
+ this.startCall(targetList);
489
+ })
478
490
  }
479
491
  } else {
480
492
  data.resultMsg && this.$message.warning(data.resultMsg);
@@ -47,7 +47,8 @@ export default {
47
47
  'clientParams',
48
48
  'serviceId',
49
49
  'msgList',
50
- 'queueItem'
50
+ 'queueItem',
51
+ 'sdkInfo'
51
52
  ]),
52
53
  foldTheme() {
53
54
  return this.theme === 'fold';
@@ -823,7 +824,10 @@ export default {
823
824
  // if (item.type == 2) {
824
825
  // return item.toName;
825
826
  // }
826
- const name = JSON.parse(item.params || {})?.name || "";
827
+ let name = ''
828
+ if (item.params) {
829
+ name = JSON.parse(item.params || {})?.name || "";
830
+ }
827
831
  return item.titleSetting || item.name || name;
828
832
  },
829
833
  formatTime(item) {
@@ -910,8 +914,10 @@ export default {
910
914
  value: handleInfiniteOnLoad
911
915
  }
912
916
  ];
917
+ const _this = this
918
+ // 默认不显示在线状态,只有南通瑞慈显示
913
919
  function getAvatar(item) {
914
- return <Avatar className="avatar" src={item.portrait} name={item.name || item.toName || item.title || item.titleSetting} len={2} />;
920
+ return <Avatar className="avatar" src={item.portrait} name={item.name || item.toName || item.title || item.titleSetting} len={2} status={item.onlineStatus} isShowStatus={_this.currentTab === 'session' && _this.sdkInfo?.vendor == 3} />;
915
921
  }
916
922
  function getContent(item, filters, fold, classifyIcon) {
917
923
  const { formatName, formatCount } = filters;
@@ -25,6 +25,14 @@ export default {
25
25
  name: {
26
26
  type: String,
27
27
  default: ''
28
+ },
29
+ status: {
30
+ type: String,
31
+ default: ''
32
+ },
33
+ isShowStatus: {
34
+ type: Boolean,
35
+ default: false
28
36
  }
29
37
  },
30
38
  render(_h, { props }) {
@@ -32,45 +40,74 @@ export default {
32
40
  const size = props.size + 'px';
33
41
  const className = props.className;
34
42
  const customStyle = props.customStyle;
43
+ const isShowStatus = props.isShowStatus;
44
+ const onlineStatus = props.status === 'ON-LINE' ? 'online' : 'offline';
35
45
  let name = '';
36
46
  if (!src) {
37
47
  name = (props.name || '').slice(-1 * props.len);
38
48
  }
39
49
  return src ? (
40
- <img class={['avatar-logo', className]} src={src} style={`width:${size};height:${size};${customStyle}`}></img>
50
+ <div class="avatar-wrap">
51
+ <img class={['avatar-logo', className]} src={src} style={`width:${size};height:${size};${customStyle}`}></img>
52
+ {isShowStatus ? <span class={['user-status', onlineStatus]}></span> : ''}
53
+ </div>
41
54
  ) : (
42
- <div class={['avatar-logo', className]} style={`width:${size};${customStyle}`}>
43
- <div class="avatar-logo-content" data-name={name}></div>
55
+ <div class="avatar-wrap">
56
+ <div class={['avatar-logo', className]} style={`width:${size};${customStyle}`}>
57
+ <div class="avatar-logo-content" data-name={name}></div>
58
+ </div>
59
+ {isShowStatus ? <span class={['user-status', onlineStatus]}></span> : ''}
44
60
  </div>
45
61
  );
46
62
  }
47
63
  };
48
64
  </script>
49
65
  <style lang="less" scoped>
50
- .avatar-logo {
51
- width: 50px;
52
- border-radius: 50%;
53
- font-size: 18px;
54
- line-height: 1;
55
- overflow: hidden;
56
- display: inline-block;
57
- vertical-align: middle;
58
- &-content {
59
- width: 100%;
60
- padding-top: 100%;
61
- height: 0;
62
- text-align: center;
63
- position: relative;
64
- color: #fff;
65
- background-color: #5585f5;
66
- &::after {
67
- content: attr(data-name);
68
- position: absolute;
69
- left: 50%;
70
- top: 50%;
71
- transform: translate(-50%, -50%);
72
- white-space: nowrap;
66
+ .avatar-wrap {
67
+ position: relative;
68
+ .user-status {
69
+ display: inline-block;
70
+ width: 12px;
71
+ height: 12px;
72
+ border-radius: 50%;
73
+ border: 1px solid #fff;
74
+ position: absolute;
75
+ background-color: #ccc;
76
+ right: 22px;
77
+ bottom: 2px;
78
+ &.online {
79
+ background-color: rgb(12, 198, 133);
80
+ }
81
+ &.offline {
82
+ background-color: rgb(217, 0, 27);
83
+ }
84
+ }
85
+ .avatar-logo {
86
+ width: 50px;
87
+ border-radius: 50%;
88
+ font-size: 18px;
89
+ line-height: 1;
90
+ overflow: hidden;
91
+ display: inline-block;
92
+ vertical-align: middle;
93
+ &-content {
94
+ width: 100%;
95
+ padding-top: 100%;
96
+ height: 0;
97
+ text-align: center;
98
+ position: relative;
99
+ color: #fff;
100
+ background-color: #5585f5;
101
+ &::after {
102
+ content: attr(data-name);
103
+ position: absolute;
104
+ left: 50%;
105
+ top: 50%;
106
+ transform: translate(-50%, -50%);
107
+ white-space: nowrap;
108
+ }
73
109
  }
74
110
  }
75
111
  }
112
+
76
113
  </style>
@@ -22,6 +22,7 @@
22
22
  <p class="content" v-else-if="item.content.type === 2">
23
23
  <img style="width:16px;" src="../../img/video_consult.png" />
24
24
  {{ item.content.content }}
25
+ <img v-if="item.content.name" @click="openReplayVideo(item.content.name)" style="width: 20px;margin-left: 12px;cursor:pointer" src="../../img/replay.png" />
25
26
  </p>
26
27
  <p class="content" v-else-if="item.content.type === 6">
27
28
  <span v-for="(item, index) in item.content.content" :key="index" class="bot-message">{{ item }}</span>
@@ -66,6 +67,8 @@ import { chatAuthentication } from '../../utils/index';
66
67
  import fetch from '@/utils/chatFetch';
67
68
  import vexutils from '@/utils/vexutils';
68
69
  import { Icon, Spin } from 'ant-design-vue';
70
+ import VueXss from "vue-xss";
71
+ import Vue from 'vue'
69
72
 
70
73
  export default {
71
74
  name: 'c-chat-msg-record',
@@ -99,6 +102,9 @@ export default {
99
102
  }
100
103
  }
101
104
  },
105
+ beforeCreate() {
106
+ !this.$xss && Vue.use(VueXss);
107
+ },
102
108
  async created() {
103
109
  // 聊天安全整改 增加权限校验
104
110
  if (this.cid) {
@@ -107,6 +113,9 @@ export default {
107
113
  this.getMessageRecord();
108
114
  },
109
115
  methods: {
116
+ openReplayVideo(url) {
117
+ window.open(url)
118
+ },
110
119
  formatDate(date) {
111
120
  return vexutils.formatDate(date, true);
112
121
  },
@@ -373,15 +373,17 @@ export default {
373
373
  });
374
374
  },
375
375
  async initUniRTC({ commit, state }, obj) {
376
- const { uniAppId, uniSecretKey, params } = obj;
376
+ const { uniAppId, uniSecretKey, params, vueSelf } = obj;
377
377
  let uniRTC = null;
378
378
  const getLoginToken = async () => {
379
379
  let appSign;
380
380
  const paramsData = {
381
381
  clientType: '1',
382
382
  deviceToken: uniRTC.deviceToken,
383
- appId: uniAppId,
384
- secretKey: uniSecretKey
383
+ // appId: uniAppId,
384
+ // secretKey: uniSecretKey
385
+ appId: 'hangchuang', // 测试(9997)账号
386
+ secretKey: 'hangchuang' // // 测试(9997)秘钥
385
387
  };
386
388
  try {
387
389
  const { data } = await fetch.get('/chat/access/getMediaAuthSign', { params: paramsData });
@@ -394,7 +396,9 @@ export default {
394
396
  return;
395
397
  }
396
398
  };
397
- uniRTC = new UniRTCObject(uniAppId, getLoginToken);
399
+ // uniRTC = new UniRTCObject(uniAppId, getLoginToken);
400
+ uniRTC = new UniRTCObject('hangchuang', getLoginToken, vueSelf);
401
+ console.log('uniRTC', uniRTC);
398
402
  uniRTC.onCallComing = incoming => {
399
403
  commit("setIncoming", incoming);
400
404
  console.log('onCallComing->', incoming);
@@ -352,5 +352,8 @@ export default {
352
352
  },
353
353
  outing(state) {
354
354
  return state.outing;
355
+ },
356
+ callerStatus(state) {
357
+ return state.callerStatus;
355
358
  }
356
359
  };
@@ -277,5 +277,8 @@ export default {
277
277
  },
278
278
  setOuting(state, outing) {
279
279
  state.outing = outing;
280
+ },
281
+ setCallerStatus(state, callerStatus) {
282
+ state.callerStatus = callerStatus;
280
283
  }
281
284
  };
@@ -107,6 +107,7 @@ export default () => {
107
107
  userStatus: '',
108
108
  uniRTC: null,
109
109
  incoming: null,
110
- outing: []
110
+ outing: [],
111
+ callerStatus: '' // 呼叫人在线离线状态(江苏通)
111
112
  };
112
113
  };