cnhis-design-vue 0.2.18-beta → 0.2.22-beta

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 (127) hide show
  1. package/es/affix/index.js +8 -8
  2. package/es/age/index.js +10 -10
  3. package/es/alert/index.js +8 -8
  4. package/es/anchor/index.js +8 -8
  5. package/es/auto-complete/index.js +8 -8
  6. package/es/avatar/index.js +8 -8
  7. package/es/back-top/index.js +8 -8
  8. package/es/badge/index.js +8 -8
  9. package/es/base/index.js +8 -8
  10. package/es/big-table/index.js +446 -222
  11. package/es/big-table/style.css +1 -1
  12. package/es/breadcrumb/index.js +8 -8
  13. package/es/button/index.js +102 -65
  14. package/es/button/style.css +1 -1
  15. package/es/calendar/index.js +8 -8
  16. package/es/captcha/index.js +3 -3
  17. package/es/card/index.js +8 -8
  18. package/es/carousel/index.js +8 -8
  19. package/es/cascader/index.js +8 -8
  20. package/es/checkbox/index.js +9 -9
  21. package/es/col/index.js +8 -8
  22. package/es/collapse/index.js +8 -8
  23. package/es/color-picker/index.js +1 -1
  24. package/es/comment/index.js +8 -8
  25. package/es/config-provider/index.js +8 -8
  26. package/es/date-picker/index.js +8 -8
  27. package/es/descriptions/index.js +8 -8
  28. package/es/divider/index.js +8 -8
  29. package/es/drag-layout/index.js +3 -3
  30. package/es/drawer/index.js +8 -8
  31. package/es/dropdown/index.js +8 -8
  32. package/es/editor/index.js +1 -1
  33. package/es/empty/index.js +8 -8
  34. package/es/fabric-chart/index.js +9 -9
  35. package/es/form/index.js +8 -8
  36. package/es/form-model/index.js +8 -8
  37. package/es/index/index.js +2091 -1147
  38. package/es/index/style.css +1 -1
  39. package/es/input/index.js +9 -9
  40. package/es/input-number/index.js +8 -8
  41. package/es/layout/index.js +8 -8
  42. package/es/list/index.js +8 -8
  43. package/es/locale-provider/index.js +8 -8
  44. package/es/map/index.js +9 -9
  45. package/es/mentions/index.js +8 -8
  46. package/es/menu/index.js +8 -8
  47. package/es/message/index.js +8 -8
  48. package/es/multi-chat/index.js +650 -247
  49. package/es/multi-chat/style.css +1 -1
  50. package/es/multi-chat-client/index.js +564 -189
  51. package/es/multi-chat-client/style.css +1 -1
  52. package/es/multi-chat-history/index.js +4 -4
  53. package/es/multi-chat-record/index.js +14 -14
  54. package/es/multi-chat-setting/index.js +330 -79
  55. package/es/multi-chat-setting/style.css +1 -1
  56. package/es/multi-chat-sip/index.js +1 -1
  57. package/es/notification/index.js +8 -8
  58. package/es/page-header/index.js +8 -8
  59. package/es/pagination/index.js +8 -8
  60. package/es/popconfirm/index.js +8 -8
  61. package/es/popover/index.js +8 -8
  62. package/es/progress/index.js +8 -8
  63. package/es/radio/index.js +9 -9
  64. package/es/rate/index.js +8 -8
  65. package/es/result/index.js +8 -8
  66. package/es/row/index.js +8 -8
  67. package/es/scale-view/index.js +640 -339
  68. package/es/scale-view/style.css +1 -1
  69. package/es/select/index.js +11 -11
  70. package/es/select-label/index.js +661 -277
  71. package/es/select-label/style.css +1 -1
  72. package/es/select-person/index.js +2 -2
  73. package/es/skeleton/index.js +8 -8
  74. package/es/slider/index.js +8 -8
  75. package/es/space/index.js +8 -8
  76. package/es/spin/index.js +8 -8
  77. package/es/statistic/index.js +8 -8
  78. package/es/steps/index.js +8 -8
  79. package/es/switch/index.js +8 -8
  80. package/es/table-filter/index.js +266 -144
  81. package/es/table-filter/style.css +1 -1
  82. package/es/tabs/index.js +8 -8
  83. package/es/tag/index.js +9 -9
  84. package/es/time-picker/index.js +8 -8
  85. package/es/timeline/index.js +8 -8
  86. package/es/tooltip/index.js +8 -8
  87. package/es/transfer/index.js +8 -8
  88. package/es/tree/index.js +8 -8
  89. package/es/tree-select/index.js +8 -8
  90. package/es/upload/index.js +8 -8
  91. package/es/utils/UniRTCv2.js +586 -0
  92. package/es/verification-code/index.js +2 -2
  93. package/lib/cui.common.js +3071 -1561
  94. package/lib/cui.umd.js +3071 -1561
  95. package/lib/cui.umd.min.js +69 -69
  96. package/package.json +3 -3
  97. package/packages/big-table/src/BigTable.vue +72 -16
  98. package/packages/big-table/src/assets/style/table-base.less +10 -0
  99. package/packages/big-table/src/components/TextOverTooltip.vue +24 -11
  100. package/packages/big-table/src/utils/batchEditing.js +1 -1
  101. package/packages/big-table/src/utils/bigTableProps.js +2 -1
  102. package/packages/button/src/ButtonPrint/index.vue +49 -14
  103. package/packages/multi-chat/chat/audio.vue +22 -0
  104. package/packages/multi-chat/chat/calling.vue +6 -0
  105. package/packages/multi-chat/chat/chatFooter.vue +43 -3
  106. package/packages/multi-chat/chat/client/clientChat.vue +13 -1
  107. package/packages/multi-chat/chat/index.vue +17 -4
  108. package/packages/multi-chat/chat/mixins/uniRTCAPI.js +77 -0
  109. package/packages/multi-chat/chat/multiVideo.vue +14 -0
  110. package/packages/multi-chat/chat/scrollList.vue +7 -1
  111. package/packages/multi-chat/chat/video.vue +4 -0
  112. package/packages/multi-chat/components/user-status.vue +50 -45
  113. package/packages/multi-chat/setting/baseInfo/index.vue +3 -3
  114. package/packages/multi-chat/setting/configuration/index.vue +38 -1
  115. package/packages/multi-chat/store/actions.js +76 -0
  116. package/packages/multi-chat/store/getters.js +9 -0
  117. package/packages/multi-chat/store/mutation.js +9 -0
  118. package/packages/multi-chat/store/state.js +4 -1
  119. package/packages/scale-view/answerParse.vue +27 -14
  120. package/packages/scale-view/scaleView.vue +18 -8
  121. package/packages/select-label/label-classify.vue +129 -0
  122. package/packages/select-label/labelFormContent.vue +263 -130
  123. package/packages/select-label/select-label.vue +111 -18
  124. package/packages/table-filter/src/base-search-com/BaseSearch.vue +80 -8
  125. package/packages/table-filter/src/mixins/mixins.js +10 -2
  126. package/packages/table-filter/src/quick-search/QuickSearch.vue +47 -25
  127. package/src/utils/UniRTCv2.js +561 -0
@@ -34,9 +34,11 @@ import fetch, { qs } from '@/utils/chatFetch';
34
34
  import vexutils from '@/utils/vexutils';
35
35
  import SvgIcon from '@/component/svg/index.vue';
36
36
  import { checkTalkingEnv } from '../../utils/index';
37
+ import uniRTCAPI from '../mixins/uniRTCAPI';
37
38
 
38
39
  export default {
39
40
  inject: ['store', 'dispatchEvent', 'i18nText'],
41
+ mixins: [uniRTCAPI],
40
42
  data() {
41
43
  this.stompClient = null;
42
44
  return {
@@ -183,7 +185,8 @@ export default {
183
185
  ]),
184
186
  ...mapActions({
185
187
  getHistoryMsg: 'setMsgList',
186
- setChatTimer: 'setChatTimer'
188
+ setChatTimer: 'setChatTimer',
189
+ initUniRTC: 'initUniRTC'
187
190
  }),
188
191
  // 获取视频sdk
189
192
  getSdkAppId() {
@@ -197,6 +200,15 @@ export default {
197
200
  if (data.result === 'SUCCESS') {
198
201
  const { sdkAppId, host, vendor } = data.obj;
199
202
  this.setSdkInfo({ sdkAppId, host, vendor });
203
+ // 江苏省
204
+ if (vendor == 3) {
205
+ this.initUniRTC({
206
+ ...data.obj,
207
+ params: {
208
+ assemblyId: this.assemblyId,
209
+ }
210
+ });
211
+ }
200
212
  }
201
213
  });
202
214
  },
@@ -131,7 +131,7 @@
131
131
  </a-tabs>
132
132
  <div v-if="isNormalStyle" class="footer-operate">
133
133
  <!-- 状态切换 -->
134
- <UserStatus v-if="hideHeader" type="left-bottom" />
134
+ <UserStatus v-if="hideHeader" placement="topCenter" />
135
135
  <div class="footer-operate-right">
136
136
  <span v-if="showSetting" class="setting-span">
137
137
  <svg-icon icon-class="a-xitongtubiaoliaotianshezhi" @click="handleSetting" />
@@ -177,7 +177,7 @@
177
177
  </div>
178
178
  </a-popover>
179
179
  <!-- 状态切换 -->
180
- <UserStatus v-if="hideHeader" type="left-bottom" style="margin: -10px 0 8px; width: 100px;text-align: center;" />
180
+ <UserStatus v-if="hideHeader" placement="topCenter" />
181
181
  </template>
182
182
  </a-layout-sider>
183
183
  <a-row style="width: 100%;height: 100%;overflow: hidden;">
@@ -337,10 +337,11 @@ import ClassifyTabs from '../components/classify-tabs';
337
337
  import ChatTabsHeader from '../components/chat-tabs-header';
338
338
  import UserStatus from '../components/user-status';
339
339
  import { checkTalkingEnv } from '../utils/index';
340
+ import uniRTCAPI from './mixins/uniRTCAPI';
340
341
 
341
342
  export default {
342
343
  name: 'c-chat-server',
343
- mixins: [baseMix],
344
+ mixins: [baseMix, uniRTCAPI],
344
345
  data() {
345
346
  this.stompClient = null;
346
347
  this.videoGroupSubscribe = null;
@@ -636,7 +637,7 @@ export default {
636
637
  'setCurScrollItem',
637
638
  'setSessionType',
638
639
  ]),
639
- ...mapActions(['setChatTimer', 'getVideoHistoryList']),
640
+ ...mapActions(['setChatTimer', 'getVideoHistoryList', 'initUniRTC']),
640
641
  ...mapActions({
641
642
  getMsgList: 'setMsgList'
642
643
  }),
@@ -1279,6 +1280,15 @@ export default {
1279
1280
  if (data.result === 'SUCCESS') {
1280
1281
  const { sdkAppId, host, vendor } = data.obj;
1281
1282
  this.setSdkInfo({ sdkAppId, host, vendor });
1283
+ // 江苏省
1284
+ if (vendor == 3) {
1285
+ this.initUniRTC({
1286
+ ...data.obj,
1287
+ params: {
1288
+ assemblyId: this.assemblyId,
1289
+ }
1290
+ });
1291
+ }
1282
1292
  }
1283
1293
  });
1284
1294
  },
@@ -1424,6 +1434,9 @@ export default {
1424
1434
  this.$message.warning(data.resultMsg);
1425
1435
  return;
1426
1436
  }
1437
+ // 江苏省接听
1438
+ console.log('江苏省接听->videoInviteEnter', this.incoming);
1439
+ this.uniRTC && this.acceptCall();
1427
1440
  let { recordId, mode, type } = res;
1428
1441
  this.delCalling(id);
1429
1442
  if (type == 1) {
@@ -0,0 +1,77 @@
1
+ import { mapGetters, mapMutations, mapActions } from '../../store/helper';
2
+
3
+ export default {
4
+ computed: {
5
+ ...mapGetters(['uniRTC', 'incoming', 'outing']),
6
+ },
7
+ data() {
8
+ return {
9
+ // outing: [],
10
+ };
11
+ },
12
+ methods: {
13
+ ...mapMutations([
14
+ 'setIncoming',
15
+ 'setOuting',
16
+ ]),
17
+ checkStatus(targetList) {
18
+ const deviceTokens = targetList.map(v => v.deviceToken);
19
+ this.uniRTC.checkStatus(deviceTokens);
20
+ },
21
+ startCall(targetList) {
22
+ // 江苏省
23
+ setTimeout(() => {
24
+ // this.outing = [];
25
+ this.setOuting([]);
26
+ let outings = [];
27
+ for (let i = 0; i < targetList.length; i++) {
28
+ const item = targetList[i];
29
+ const outing = this.uniRTC.startCall(item.deviceToken, '腾讯', 'tencent', {
30
+ sdkAppId: this.uniRTC.appId,
31
+ userId: this.userId,
32
+ userSig: this.videoData.token,
33
+ roomId: this.videoData.roomId,
34
+ // privateMapKey
35
+ }, {
36
+ sdkAppId: this.uniRTC.appId,
37
+ userId: item.username,
38
+ userSig: item.token,
39
+ roomId: this.videoData.roomId,
40
+ // privateMapKey
41
+ });
42
+ outings.push(outing);
43
+ }
44
+ this.setOuting(outings);
45
+ }, 500);
46
+ },
47
+ stopCall() {
48
+ for (let i = 0; i < this.outing.length; i++) {
49
+ const item = this.outing[i];
50
+ // 江苏省主动挂断
51
+ this.uniRTC.stopCall(item);
52
+ }
53
+ this.setOuting([]);
54
+ },
55
+ hangUp() {
56
+ console.log('江苏省会议挂断', this.outing, this.incoming);
57
+ if (this.incoming) {
58
+ this.uniRTC.hangUp(this.incoming.target, 'tencent', '腾讯:挂断并结束视频');
59
+ } else {
60
+ for (let i = 0; i < this.outing.length; i++) {
61
+ const item = this.outing[i];
62
+ // 江苏省会议挂断
63
+ this.uniRTC.hangUp(item.target, 'tencent', '腾讯:挂断并结束视频');
64
+ }
65
+ }
66
+ this.setIncoming(null);
67
+ this.setOuting([]);
68
+ },
69
+ refuseCall() {
70
+ this.incoming && this.uniRTC.refuseCall(this.incoming);
71
+ this.incoming && this.setIncoming(null);
72
+ },
73
+ acceptCall() {
74
+ this.incoming && this.uniRTC.acceptCall(this.incoming);
75
+ }
76
+ }
77
+ };
@@ -184,6 +184,7 @@ import { getSipUserId } from '@/utils/sip-device';
184
184
  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
+ import uniRTCAPI from './mixins/uniRTCAPI';
187
188
 
188
189
  const videoStatus = {
189
190
  1: '未接听',
@@ -195,6 +196,7 @@ const videoStatus = {
195
196
 
196
197
  export default {
197
198
  inject: ['store'],
199
+ mixins: [uniRTCAPI],
198
200
  components: {
199
201
  [Button.name]: Button,
200
202
  [Popover.name]: Popover,
@@ -468,6 +470,12 @@ export default {
468
470
  this.setRecordId(recordId);
469
471
  this.setVideoData(data.map);
470
472
  // this.appendVideoMessage();
473
+ // 江苏省
474
+ if (this.uniRTC) {
475
+ const targetList = data.map?.targetList || [];
476
+ this.checkStatus(targetList);
477
+ this.startCall(targetList);
478
+ }
471
479
  } else {
472
480
  data.resultMsg && this.$message.warning(data.resultMsg);
473
481
  }
@@ -850,6 +858,8 @@ export default {
850
858
  fetch.post('/chat/access/videoHangUp', qs.stringify(data)).then(({ data }) => {
851
859
  if (data.result === 'SUCCESS') {
852
860
  this.handleLeaveRoom();
861
+ // 江苏省主动挂断
862
+ this.uniRTC && this.hangUp();
853
863
  }
854
864
  });
855
865
  },
@@ -886,8 +896,12 @@ export default {
886
896
  if (accept == 0) {
887
897
  this.setMultiVideoShow(false);
888
898
  this.setVideoData({});
899
+ // 江苏省拒接
900
+ this.uniRTC && this.refuseCall();
889
901
  return;
890
902
  }
903
+ // 江苏省接听
904
+ this.uniRTC && this.acceptCall();
891
905
  let res = data.obj || data.map;
892
906
  let { token: userSig, roomId, recordId, caller, mode, type } = res;
893
907
  this.setCurrentSip(sip);
@@ -989,7 +989,7 @@ export default {
989
989
  ) : null}
990
990
 
991
991
  {isNoData && ((isEnd && !infiniteMsgShow) || !isEnd) ? (
992
- <div class="no-data">
992
+ <div class={[theme, 'no-data']}>
993
993
  <img src={require('../img/no-data2.png')} />
994
994
  <span>{this.i18nText('1.1.6.11')}</span>
995
995
  </div>
@@ -1010,10 +1010,16 @@ export default {
1010
1010
  & > img {
1011
1011
  width: 160px;
1012
1012
  }
1013
+ &.fold > img {
1014
+ width: 80%;
1015
+ }
1013
1016
  span {
1014
1017
  display: inline-block;
1015
1018
  font-size: 14px;
1016
1019
  }
1020
+ &.fold span {
1021
+ font-size: 12px;
1022
+ }
1017
1023
  }
1018
1024
  .chat-scroll-container {
1019
1025
  height: 100%;
@@ -54,9 +54,11 @@ import RtcClient from '../utils/rtc-client';
54
54
  import fetch, { qs } from '@/utils/chatFetch';
55
55
  import { Icon, Popconfirm, Tooltip } from 'ant-design-vue';
56
56
  import SvgIcon from '@/component/svg/index.vue';
57
+ import uniRTCAPI from './mixins/uniRTCAPI';
57
58
 
58
59
  export default {
59
60
  inject: ['store', 'i18nText'],
61
+ mixins: [uniRTCAPI],
60
62
  components: {
61
63
  [Popconfirm.name]: Popconfirm,
62
64
  [Tooltip.name]: Tooltip,
@@ -230,6 +232,8 @@ export default {
230
232
  this.setShowVideo(false);
231
233
  this.setVideoData({});
232
234
  }
235
+ // 江苏省会议挂断
236
+ this.uniRTC && this.hangUp();
233
237
  } else {
234
238
  this.$message.warning(data.resultMsg);
235
239
  }
@@ -1,20 +1,25 @@
1
1
  <template>
2
2
  <div>
3
3
  <a-dropdown
4
- v-if="type === 'right-top'"
5
- placement="bottomCenter"
4
+ :placement="placement"
6
5
  :getPopupContainer="
7
6
  triggerNode => {
8
7
  return triggerNode.parentNode || document.body;
9
8
  }
10
9
  "
11
10
  >
12
- <a-button>
11
+ <a-button v-if="placement === 'bottomCenter'">
13
12
  <svg-icon v-if="statusIcon" :icon-class="statusIcon" style="font-size: 16px"></svg-icon>
14
13
  <img v-else :src="getImg(status)" height="16" />
15
14
  {{ statusDesc }}
16
15
  <a-icon type="down" />
17
16
  </a-button>
17
+ <div v-else class="status-btn">
18
+ <svg-icon v-if="statusIcon" :icon-class="statusIcon" style="font-size: 16px"></svg-icon>
19
+ <img v-else :src="getImg(status)" height="16" />
20
+ {{ statusDesc }}
21
+ <a-icon type="up" />
22
+ </div>
18
23
  <a-menu slot="overlay">
19
24
  <a-menu-item v-for="{ title, status, description, icon } in statusList" :key="status" @click="handleStatusChange(status)">
20
25
  <template v-if="description">
@@ -41,7 +46,7 @@
41
46
  </a-menu-item>
42
47
  </a-menu>
43
48
  </a-dropdown>
44
- <template v-else>
49
+ <!-- <template v-else>
45
50
  <div class="status-btn">
46
51
  <svg-icon v-if="statusIcon" :icon-class="statusIcon" style="font-size: 16px"></svg-icon>
47
52
  <img v-else :src="getImg(status)" height="16" />
@@ -73,7 +78,7 @@
73
78
  </li>
74
79
  </ul>
75
80
  </div>
76
- </template>
81
+ </template> -->
77
82
  </div>
78
83
  </template>
79
84
  <script>
@@ -93,9 +98,9 @@ export default {
93
98
  SvgIcon
94
99
  },
95
100
  props: {
96
- type: {
101
+ placement: {
97
102
  type: String,
98
- default: 'right-top'
103
+ default: 'bottomCenter'
99
104
  },
100
105
  },
101
106
  computed: {
@@ -150,44 +155,44 @@ export default {
150
155
  <style lang="less" scoped>
151
156
  .status-btn {
152
157
  position: relative;
153
- padding-right: 10px;
154
- height: 26px;
155
- line-height: 26px;
158
+ // padding-right: 10px;
159
+ height: 28px;
160
+ line-height: 28px;
156
161
  cursor: pointer;
157
- .status-list {
158
- position: absolute;
159
- right: -85px;
160
- bottom: 8px;
161
- z-index: 2;
162
- display: none;
163
- padding: 4px 0;
164
- outline: none;
165
- list-style-type: none;
166
- border-radius: 4px;
167
- box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
168
- background-color: #fff;
169
- transition: all .5s;
170
- li {
171
- height: 32px;
172
- line-height: 32px;
173
- padding: 0 16px;
174
- display: flex;
175
- align-items: center;
176
- cursor: pointer;
177
- background: #fff;
178
- a {
179
- padding-right: 8px;
180
- color: rgba(0, 0, 0, 0.65);
181
- }
182
- &:hover {
183
- background: #f2f2f2;
184
- }
185
- }
186
- }
187
- &:hover {
188
- .status-list {
189
- display: block;
190
- }
191
- }
162
+ // .status-list {
163
+ // position: absolute;
164
+ // right: -85px;
165
+ // bottom: 8px;
166
+ // z-index: 2;
167
+ // display: none;
168
+ // padding: 4px 0;
169
+ // outline: none;
170
+ // list-style-type: none;
171
+ // border-radius: 4px;
172
+ // box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
173
+ // background-color: #fff;
174
+ // transition: all .5s;
175
+ // li {
176
+ // height: 32px;
177
+ // line-height: 32px;
178
+ // padding: 0 16px;
179
+ // display: flex;
180
+ // align-items: center;
181
+ // cursor: pointer;
182
+ // background: #fff;
183
+ // a {
184
+ // padding-right: 8px;
185
+ // color: rgba(0, 0, 0, 0.65);
186
+ // }
187
+ // &:hover {
188
+ // background: #f2f2f2;
189
+ // }
190
+ // }
191
+ // }
192
+ // &:hover {
193
+ // .status-list {
194
+ // display: block;
195
+ // }
196
+ // }
192
197
  }
193
198
  </style>
@@ -186,9 +186,9 @@
186
186
  <div class="functional-module" v-if="!isConference && !isStaff">
187
187
  <span class="title" style="display: inline-block;margin-bottom: 10px;">
188
188
  {{ i18nText('1.9.427') }}
189
- <a-checkbox @change="handleBotSettingShow" :checked="showBotSetting"></a-checkbox>
189
+ <!-- <a-checkbox @change="handleBotSettingShow" :checked="showBotSetting"></a-checkbox> -->
190
190
  </span>
191
- <a-row class="bot-setting" v-if="showBotSetting">
191
+ <!-- <a-row class="bot-setting" v-if="showBotSetting">
192
192
  <a-col :span="4">
193
193
  <a-form-item label="secretId">
194
194
  <a-input v-decorator="['secretId']" style="width: 150px;"></a-input>
@@ -205,7 +205,7 @@
205
205
  <a-form-item label="botId">
206
206
  <a-input v-decorator="['botId']" style="width: 150px;"></a-input>
207
207
  </a-form-item>
208
- </a-row>
208
+ </a-row> -->
209
209
  <a-row class="bot-setting">
210
210
  <a-form-item label="选择机器人">
211
211
  <a-select v-decorator="['robotId']" :placeholder="'选择机器人'" style="width: 200px;" allowClear showSearch :filterOption="filterOption">
@@ -39,7 +39,7 @@
39
39
  </a-row>
40
40
  </a-form-model>
41
41
 
42
- <div key="txy" v-if="obj.vendor == 1">
42
+ <div key="txy" v-if="obj.vendor == 1 || obj.vendor == 3">
43
43
  <div class="page-title">
44
44
  腾讯云API密钥
45
45
  <a-tooltip
@@ -105,6 +105,43 @@
105
105
  </a-row>
106
106
  </a-form-model>
107
107
  </div>
108
+ <div key="txy" v-if="obj.vendor == 3">
109
+ <div class="page-title">
110
+ 江苏省统一平台密钥
111
+ <a-tooltip
112
+ :arrowPointAtCenter="true"
113
+ placement="bottomRight"
114
+ :overlayStyle="{
115
+ width: '360px',
116
+ 'max-width': '360px'
117
+ }"
118
+ >
119
+ <template slot="title">
120
+ <div>
121
+ <div>江苏省统一平台密钥</div>
122
+ <p style="margin: 10px 0">
123
+ 江苏省统一平台。
124
+ </p>
125
+ </div>
126
+ </template>
127
+ <svg-icon class="icon" icon-class="xitongtubiaodaohangtubiaowenti" />
128
+ </a-tooltip>
129
+ </div>
130
+ <a-form-model :colon="false">
131
+ <a-row>
132
+ <a-col :span="col.lSpan">
133
+ <a-form-model-item label="appId">
134
+ <a-input v-model="obj.uniAppId"></a-input>
135
+ </a-form-model-item>
136
+ </a-col>
137
+ <a-col :span="col.rSpan" :offset="col.rOffset">
138
+ <a-form-model-item label="secretKey">
139
+ <a-input v-model="obj.uniSecretKey" type="password"></a-input>
140
+ </a-form-model-item>
141
+ </a-col>
142
+ </a-row>
143
+ </a-form-model>
144
+ </div>
108
145
  </div>
109
146
  <div class="footer-submit">
110
147
  <a-button type="primary" @click="handleSubmit">
@@ -2,6 +2,27 @@ import fetch, { qs } from '@/utils/chatFetch';
2
2
  import Vue from 'vue';
3
3
  import vexutils from '@/utils/vexutils';
4
4
  import { fmtRobotMessage } from '../utils';
5
+ import UniRTCObject from "@/utils/UniRTCv2";
6
+
7
+ const deepClone = source => {
8
+ let target;
9
+ if (typeof source === "object" && source) {
10
+ target = Array.isArray(source) ? [] : {};
11
+ for (let key in source) {
12
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
13
+ // if (source.hasOwnProperty(key)) {
14
+ if (typeof source[key] !== "object") {
15
+ target[key] = source[key];
16
+ } else {
17
+ target[key] = deepClone(source[key]);
18
+ }
19
+ }
20
+ }
21
+ } else {
22
+ target = source;
23
+ }
24
+ return target;
25
+ };
5
26
 
6
27
  export default {
7
28
  /* 更新聊天记录 */
@@ -347,5 +368,60 @@ export default {
347
368
  commit('setVideoVoiceList', list);
348
369
  }
349
370
  });
371
+ },
372
+ async initUniRTC({ commit, state }, obj) {
373
+ const { uniAppId, uniSecretKey, params } = obj;
374
+ let uniRTC = null;
375
+ const getLoginToken = async () => {
376
+ let appSign;
377
+ const paramsData = {
378
+ clientType: '1',
379
+ deviceToken: uniRTC.deviceToken,
380
+ appId: uniAppId,
381
+ secretKey: uniSecretKey
382
+ };
383
+ try {
384
+ const { data } = await fetch.get('/chat/access/getMediaAuthSign', { params: paramsData });
385
+ if (data.result == 'SUCCESS') {
386
+ appSign = data.obj;
387
+ return appSign;
388
+ }
389
+ } catch (error) {
390
+ console.log('获取签名失败:', error);
391
+ return;
392
+ }
393
+ };
394
+ uniRTC = new UniRTCObject(uniAppId, getLoginToken);
395
+ uniRTC.onCallComing = incoming => {
396
+ commit("setIncoming", incoming);
397
+ console.log('onCallComing->', incoming);
398
+ };
399
+ uniRTC.onHangup = () => {
400
+ commit("setIncoming", null);
401
+ commit("setOuting", []);
402
+ };
403
+ // uniRTC.onCallTimeout = () => {
404
+ // commit("setIncoming", null);
405
+ // commit("setOuting", []);
406
+ // };
407
+ uniRTC.onCallRefused = outing => {
408
+ const index = state.outing.findIndex(v => v.target === outing.target);
409
+ if (index > -1) {
410
+ let cloneOuting = deepClone(state.outing);
411
+ cloneOuting.splice(index, 1);
412
+ commit("setOuting", cloneOuting);
413
+ }
414
+ };
415
+ commit("setUniRTC", uniRTC);
416
+ setTimeout(async () => {
417
+ console.log('本机设备token->', uniRTC.deviceToken);
418
+ const res = await fetch.post('/chat/service/registerDeviceToken', qs.stringify({
419
+ ...params,
420
+ deviceToken: uniRTC.deviceToken,
421
+ }));
422
+ if (res.data?.result !== 'SUCCESS') {
423
+ console.log(res.data.resultMsg);
424
+ }
425
+ }, 1500);
350
426
  }
351
427
  };
@@ -340,5 +340,14 @@ export default {
340
340
  },
341
341
  userStatus(state) {
342
342
  return state.userStatus;
343
+ },
344
+ uniRTC(state) {
345
+ return state.uniRTC;
346
+ },
347
+ incoming(state) {
348
+ return state.incoming;
349
+ },
350
+ outing(state) {
351
+ return state.outing;
343
352
  }
344
353
  };
@@ -266,4 +266,13 @@ export default {
266
266
  setUserStatus(state, userStatus) {
267
267
  state.userStatus = userStatus;
268
268
  },
269
+ setUniRTC(state, uniRTC) {
270
+ state.uniRTC = uniRTC;
271
+ },
272
+ setIncoming(state, incoming) {
273
+ state.incoming = incoming;
274
+ },
275
+ setOuting(state, outing) {
276
+ state.outing = outing;
277
+ }
269
278
  };
@@ -103,6 +103,9 @@ export default () => {
103
103
  isQuickReply: false,
104
104
  isRecorderVoice: false,
105
105
  msgRecordCache: {}, // 消息已读记录缓存
106
- userStatus: ''
106
+ userStatus: '',
107
+ uniRTC: null,
108
+ incoming: null,
109
+ outing: []
107
110
  };
108
111
  };
@@ -1,8 +1,11 @@
1
1
  <template>
2
2
  <div class="answerParse" :class="{ 'answerParse-success': answerSuccess }">
3
- <div class="answer-res">
4
- <svg-icon :iconClass="answerIcon"></svg-icon>
5
- {{ answerResText }}
3
+ <div class="answer-res-wrap">
4
+ <div class="answer-res">
5
+ <svg-icon :iconClass="answerIcon"></svg-icon>
6
+ {{ answerResText }}
7
+ </div>
8
+ <div v-if="answerSuccess"> 本题得分:{{ questionScore }}分 </div>
6
9
  </div>
7
10
  <div class="correct-answer" v-if="correctAnswer">
8
11
  <p>正确答案:</p>
@@ -62,19 +65,29 @@ export default {
62
65
  background: rgba(253, 246, 246, 0.6);
63
66
  margin-top: 6px;
64
67
  margin-bottom: 12px;
65
- .answer-res {
66
- display: inline-flex;
68
+ .answer-res-wrap {
69
+ display: flex;
70
+ justify-content: space-between;
67
71
  align-items: center;
68
- padding: 0 18px;
69
- line-height: 36px;
70
- color: #fff;
71
- background: #f06f64;
72
- border-radius: 18px;
73
72
  margin-bottom: 16px;
74
- font-weight: 700;
75
- svg {
76
- margin-right: 8px;
77
- font-size: 16px;
73
+ .answer-res {
74
+ display: inline-flex;
75
+ align-items: center;
76
+ padding: 0 18px;
77
+ line-height: 36px;
78
+ color: #fff;
79
+ background: #f06f64;
80
+ border-radius: 18px;
81
+ font-weight: 700;
82
+ svg {
83
+ margin-right: 8px;
84
+ font-size: 16px;
85
+ }
86
+ }
87
+ .answer-score {
88
+ font-size: 14px;
89
+ font-weight: 600;
90
+ color: #2e2e2e;
78
91
  }
79
92
  }
80
93
  .correct-answer {