react_hsbc_teller 1.1.9 → 1.2.2

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.
@@ -19,10 +19,14 @@ import message from "antd/lib/message";
19
19
  import 'antd/lib/message/style'
20
20
  import Spin from "antd/lib/spin";
21
21
  import 'antd/lib/spin/style'
22
+ import Select from "antd/lib/select";
23
+ import 'antd/lib/select/style'
24
+
22
25
  import { Button } from '../../../node_modules/antd/lib/index';
23
26
  import CanvasDraw from "react-canvas-draw";
24
27
  import { FormattedMessage, injectIntl } from 'react-intl';
25
28
  import axios from 'axios';
29
+ const { Option } = Select;
26
30
  const LEAVE_TYPE = {
27
31
  TELLER_EXIT: 1, // 坐席退出
28
32
  ROOM_DESTROYED: -1, // 房间异常
@@ -141,6 +145,46 @@ class Video extends Component {
141
145
  noVideoEleven: false,
142
146
  noVideoTwelve: false,
143
147
  manualClose: false,
148
+ defaultValue: '1',
149
+ customOcrSid: '',
150
+ isPIBIntranet: [
151
+ {
152
+ type: false
153
+ },
154
+ {
155
+ type: false
156
+ },
157
+ {
158
+ type: false
159
+ },
160
+ {
161
+ type: false
162
+ },
163
+ {
164
+ type: false
165
+ },
166
+ {
167
+ type: false
168
+ },
169
+ {
170
+ type: false
171
+ },
172
+ {
173
+ type: false
174
+ },
175
+ {
176
+ type: false
177
+ },
178
+ {
179
+ type: false
180
+ },
181
+ {
182
+ type: false
183
+ },
184
+ {
185
+ type: false
186
+ }
187
+ ]
144
188
  };
145
189
  // eslint-disable-next-line no-undef
146
190
  test_controller = '';
@@ -164,6 +208,8 @@ class Video extends Component {
164
208
  let publish_config = {}
165
209
  publish_config.media_type = 1
166
210
  publish_config.publish_device = 1
211
+ publish_config.videoSource = this.state.cameraValue
212
+ publish_config.audioSource = this.state.microphoneValue
167
213
  publish_config.need_volume_analyser = true
168
214
  // publish_config.video_profile_type = 3
169
215
  publish_config.video_profile_type=100
@@ -246,8 +292,10 @@ class Video extends Component {
246
292
  // eslint-disable-next-line no-undef
247
293
  // initWebSocket('wss://im.uat.dsp.hsbcfts.com.cn:443/wealth/im/ws/')
248
294
  // initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + '15603' + '/ws/');
295
+ if(!this.state.imStatus){
296
+ initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + JSON.parse(window.sessionStorage.getItem('sigData')).webPort + '/ws/');
249
297
 
250
- initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + JSON.parse(window.sessionStorage.getItem('sigData')).webPort + '/ws/');
298
+ }
251
299
  const config_param = {};
252
300
  config_param.workspaceId = this.state.workSpaceId;
253
301
  config_param.uid = this.props.tellerAccount;
@@ -265,7 +313,6 @@ class Video extends Component {
265
313
  const config_param = {};
266
314
  config_param.auto_publish_subscribe = 4;
267
315
  config_param.media_type = 1;
268
- config_param.publish_device = 1;
269
316
  config_param.video_profile_type = '3';
270
317
  config_param.need_volume_analyser = true;
271
318
  config_param.initPublish = [
@@ -358,6 +405,106 @@ class Video extends Component {
358
405
  url: '' // ⽔印图⽚ HTTP 地址
359
406
  }
360
407
  ];
408
+ recordParam.tagPositions = [
409
+ {
410
+ tag: 'projectionWhiteboard',
411
+ xPosition: '0',
412
+ yPosition: '360',
413
+ width: '640',
414
+ height: '360'
415
+ },
416
+ {
417
+ tag: 'VIDEO_SOURCE_SCREEN',
418
+ xPosition: '0',
419
+ yPosition: '144',
420
+ width: '256',
421
+ height: '144'
422
+ },
423
+ {
424
+ tag: 'tag1',
425
+ xPosition: '0',
426
+ yPosition: '0',
427
+ width: '160',
428
+ height: '144'
429
+ },
430
+ {
431
+ tag: 'customer1',
432
+ xPosition: '160',
433
+ yPosition: '0',
434
+ width: '160',
435
+ height: '144'
436
+ },
437
+ {
438
+ tag: 'customer2',
439
+ xPosition: '320',
440
+ yPosition: '0',
441
+ width: '160',
442
+ height: '144'
443
+ },
444
+ {
445
+ tag: 'customer3',
446
+ xPosition: '480',
447
+ yPosition: '0',
448
+ width: '160',
449
+ height: '144'
450
+ },
451
+ {
452
+ tag: 'customer4',
453
+ xPosition: '640',
454
+ yPosition: '0',
455
+ width: '160',
456
+ height: '144'
457
+ },
458
+ {
459
+ tag: 'customer5',
460
+ xPosition: '800',
461
+ yPosition: '0',
462
+ width: '160',
463
+ height: '144'
464
+ },
465
+ {
466
+ tag: 'customer6',
467
+ xPosition: '960',
468
+ yPosition: '0',
469
+ width: '160',
470
+ height: '144'
471
+ },
472
+ {
473
+ tag: 'customer7',
474
+ xPosition: '1120',
475
+ yPosition: '0',
476
+ width: '160',
477
+ height: '144'
478
+ },
479
+ {
480
+ tag: 'customer8',
481
+ xPosition: '1120',
482
+ yPosition: '144',
483
+ width: '160',
484
+ height: '144'
485
+ },
486
+ {
487
+ tag: 'customer9',
488
+ xPosition: '1120',
489
+ yPosition: '288',
490
+ width: '160',
491
+ height: '144'
492
+ },
493
+ {
494
+ tag: 'customer10',
495
+ xPosition: '1120',
496
+ yPosition: '432',
497
+ width: '160',
498
+ height: '144'
499
+ },
500
+ {
501
+ tag: 'customer11',
502
+ xPosition: '1120',
503
+ yPosition: '576',
504
+ width: '160',
505
+ height: '144'
506
+ }
507
+ ]
361
508
  console.log('recordParam', recordParam);
362
509
  this.test_controller.StartRemoteRecord(filePath, recordParam, '')
363
510
 
@@ -406,11 +553,6 @@ class Video extends Component {
406
553
  console.log(result);
407
554
  if (this.state.faceCustomerType == 1) {
408
555
  this.contrastFaceVerify(result.data)
409
- } else if (this.state.faceCustomerType == 2) {
410
- // ocr
411
- this.setState({
412
- isModalVisibleFacial: false
413
- })
414
556
  }
415
557
 
416
558
  } catch (err) {
@@ -439,100 +581,208 @@ class Video extends Component {
439
581
  // 获取人员客户列表
440
582
  selectCustomer = (val) => {
441
583
  const list = []
442
- if (document.getElementById('video1').name) {
584
+ if (document.getElementById('video1').name && !this.state.isPIBIntranet[0].type) {
443
585
  console.log(this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText))
444
586
  // document.getElementById("feedId1").innerText
445
587
  list.push({
446
588
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).feedId,
447
589
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid,
448
- name: this.state.videoOneName,
590
+ name: this.state.videoOneName + '--OCR',
591
+ tourist: false
449
592
  })
593
+ if(this.state.videoOneName.indexOf("客户") == -1) {
594
+ list.push({
595
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).feedId,
596
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid,
597
+ name: this.state.videoOneName + '--查询客户',
598
+ tourist: true
599
+ })
600
+ }
450
601
  }
451
- if (document.getElementById('video2').name) {
602
+ if (document.getElementById('video2').name && !this.state.isPIBIntranet[1].type) {
452
603
  console.log(this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText))
453
604
  // document.getElementById("feedId1").innerText
454
605
  list.push({
455
606
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).feedId,
456
607
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid,
457
- name: this.state.videoTwoName
608
+ name: this.state.videoTwoName + '--OCR',
609
+ tourist: false
458
610
  })
611
+ if(this.state.videoTwoName.indexOf("客户") == -1) {
612
+ list.push({
613
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).feedId,
614
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid,
615
+ name: this.state.videoTwoName + '--查询客户',
616
+ tourist: true
617
+ })
618
+ }
459
619
  }
460
- if (document.getElementById('video3').name) {
620
+ if (document.getElementById('video3').name && !this.state.isPIBIntranet[2].type) {
461
621
  console.log(this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText))
462
622
  // document.getElementById("feedId1").innerText
463
623
  list.push({
464
624
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).feedId,
465
625
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid,
466
- name: this.state.videoThreeName
626
+ name: this.state.videoThreeName + '--OCR',
627
+ tourist: false
467
628
  })
629
+ if(this.state.videoThreeName.indexOf("客户") == -1) {
630
+ list.push({
631
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).feedId,
632
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid,
633
+ name: this.state.videoThreeName + '--查询客户',
634
+ tourist: true
635
+ })
636
+ }
468
637
  }
469
- if (document.getElementById('video4').name) {
638
+ if (document.getElementById('video4').name && !this.state.isPIBIntranet[3].type) {
470
639
  console.log(this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText))
471
640
  // document.getElementById("feedId1").innerText
472
641
  list.push({
473
642
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).feedId,
474
643
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid,
475
- name: this.state.videoFourName
644
+ name: this.state.videoFourName + '--OCR',
645
+ tourist: false
476
646
  })
647
+ if(this.state.videoFourName.indexOf("客户") == -1) {
648
+ list.push({
649
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).feedId,
650
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid,
651
+ name: this.state.videoFourName + '--查询客户',
652
+ tourist: true
653
+ })
654
+ }
477
655
  }
478
- if (document.getElementById('video5').name) {
656
+ if (document.getElementById('video5').name && !this.state.isPIBIntranet[4].type) {
479
657
  console.log(this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText))
480
658
  // document.getElementById("feedId1").innerText
481
659
  list.push({
482
660
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).feedId,
483
661
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid,
484
- name: this.state.videoFiveName
662
+ name: this.state.videoFiveName + '--OCR',
663
+ tourist: false
485
664
  })
665
+ if(this.state.videoFiveName.indexOf("客户") == -1) {
666
+ list.push({
667
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).feedId,
668
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid,
669
+ name: this.state.videoFiveName + '--查询客户',
670
+ tourist: true
671
+ })
672
+ }
486
673
  }
487
- if (document.getElementById('video6').name) {
674
+ if (document.getElementById('video6').name && !this.state.isPIBIntranet[5].type) {
488
675
  console.log(this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText))
489
676
  list.push({
490
677
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).feedId,
491
678
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid,
492
- name: this.state.videoSixName
679
+ name: this.state.videoSixName + '--OCR',
680
+ tourist: false
493
681
  })
682
+ if(this.state.videoSixName.indexOf("客户") == -1) {
683
+ list.push({
684
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).feedId,
685
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid,
686
+ name: this.state.videoSixName + '--查询客户',
687
+ tourist: true
688
+ })
689
+ }
494
690
  }
495
- if (document.getElementById('video7').name) {
691
+ if (document.getElementById('video7').name && !this.state.isPIBIntranet[6].type) {
496
692
  list.push({
497
693
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).feedId,
498
694
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid,
499
- name: this.state.videoSevenName
695
+ name: this.state.videoSevenName + '--OCR',
696
+ tourist: false
500
697
  })
698
+ if(this.state.videoSevenName.indexOf("客户") == -1) {
699
+ list.push({
700
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).feedId,
701
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid,
702
+ name: this.state.videoSevenName + '--查询客户',
703
+ tourist: true
704
+ })
705
+ }
501
706
  }
502
- if (document.getElementById('video8').name) {
707
+ if (document.getElementById('video8').name && !this.state.isPIBIntranet[7].type) {
503
708
  list.push({
504
709
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).feedId,
505
710
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid,
506
- name: this.state.videoEightName
711
+ name: this.state.videoEightName + '--OCR',
712
+ tourist: false
507
713
  })
714
+ if(this.state.videoEightName.indexOf("客户") == -1) {
715
+ list.push({
716
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).feedId,
717
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid,
718
+ name: this.state.videoEightName + '--查询客户',
719
+ tourist: true
720
+ })
721
+ }
508
722
  }
509
- if (document.getElementById('video9').name) {
723
+ if (document.getElementById('video9').name && !this.state.isPIBIntranet[8].type) {
510
724
  list.push({
511
725
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).feedId,
512
726
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid,
513
- name: this.state.videoNineName
727
+ name: this.state.videoNineName + '--OCR',
728
+ tourist: false
514
729
  })
730
+ if(this.state.videoNineName.indexOf("客户") == -1) {
731
+ list.push({
732
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).feedId,
733
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid,
734
+ name: this.state.videoNineName + '--查询客户',
735
+ tourist: true
736
+ })
737
+ }
515
738
  }
516
- if (document.getElementById('video10').name) {
739
+ if (document.getElementById('video10').name && !this.state.isPIBIntranet[9].type) {
517
740
  list.push({
518
741
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).feedId,
519
742
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid,
520
- name: this.state.videoTenName
743
+ name: this.state.videoTenName + '--OCR',
744
+ tourist: false
521
745
  })
746
+ if(this.state.videoTenName.indexOf("客户") == -1) {
747
+ list.push({
748
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).feedId,
749
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid,
750
+ name: this.state.videoTenName + '--查询客户',
751
+ tourist: true
752
+ })
753
+ }
522
754
  }
523
- if (document.getElementById('video11').name) {
755
+ if (document.getElementById('video11').name && !this.state.isPIBIntranet[10].type) {
524
756
  list.push({
525
757
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).feedId,
526
758
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid,
527
- name: this.state.videoElevenName
759
+ name: this.state.videoElevenName + '--OCR',
760
+ tourist: false
528
761
  })
762
+ if(this.state.videoElevenName.indexOf("客户") == -1) {
763
+ list.push({
764
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).feedId,
765
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid,
766
+ name: this.state.videoElevenName + '--查询客户',
767
+ tourist: true
768
+ })
769
+ }
529
770
  }
530
- if (document.getElementById('video12').name) {
771
+ if (document.getElementById('video12').name && !this.state.isPIBIntranet[11].type) {
531
772
  list.push({
532
773
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).feedId,
533
774
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid,
534
- name: this.state.videoTwelveName
775
+ name: this.state.videoTwelveName + '--OCR',
776
+ tourist: false
535
777
  })
778
+ if(this.state.videoTwelveName.indexOf("客户") == -1) {
779
+ list.push({
780
+ feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).feedId,
781
+ customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid,
782
+ name: this.state.videoTwelveName + '--查询客户',
783
+ tourist: true
784
+ })
785
+ }
536
786
  }
537
787
  if (list.length > 0) {
538
788
  if (val == 'ocr') {
@@ -557,14 +807,16 @@ class Video extends Component {
557
807
  content: value,
558
808
  icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
559
809
  className: 'errorClassName',
560
- top: 200
810
+ top: 200,
811
+ duration: 10
561
812
  })
562
813
  } else if(valueOne == 'success') {
563
814
  message.success({
564
815
  content: value,
565
816
  icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
566
817
  className: 'successClassName',
567
- top: 200
818
+ top: 200,
819
+ duration: 10
568
820
  })
569
821
  }
570
822
 
@@ -1489,8 +1741,14 @@ class Video extends Component {
1489
1741
  })
1490
1742
  if (!this.state.appId && !this.state.sessionType) {
1491
1743
  this.mpaasSig(data);
1744
+ let indexId = 0
1745
+ obj.map((item,index)=>{
1746
+ if(item.actionname.indexOf('Integrated Camera' != -1)) {
1747
+ indexId = index
1748
+ }
1749
+ })
1492
1750
  this.setState({
1493
- cameraValue: obj[0].actionid,
1751
+ cameraValue: obj[indexId].actionid,
1494
1752
  microphoneValue: obj1[0].actionid
1495
1753
  })
1496
1754
  } else {
@@ -1583,6 +1841,8 @@ class Video extends Component {
1583
1841
  publish_config.media_type = 1
1584
1842
  publish_config.publish_device = 1
1585
1843
  publish_config.need_volume_analyser = true
1844
+ publish_config.videoSource = this.state.cameraValue
1845
+ publish_config.audioSource = this.state.microphoneValue
1586
1846
  // publish_config.video_profile_type = 3
1587
1847
  publish_config.video_profile_type=100
1588
1848
  publish_config.video_profile_diy={width:640, height:360, frameRate:15, bitrate:400}
@@ -1604,7 +1864,6 @@ class Video extends Component {
1604
1864
  this.state.rtoken = '',
1605
1865
  this.state.sessionId = '',
1606
1866
  this.state.imRoomId = ''
1607
-
1608
1867
  this.test_controller.Disconnect()
1609
1868
  let data = {
1610
1869
  account: this.props.tellerAccount,
@@ -1838,6 +2097,9 @@ class Video extends Component {
1838
2097
  this.test_controller.OnNewJoinerIn = (participant) => {
1839
2098
  console.log('新加⼊房间者', participant);
1840
2099
  this.state.isCustomer= true
2100
+ // let audio = document.createElement('audio') //生成一个audio元素
2101
+ // audio.src = 'http://mp3.9ku.com/hot/2005/05-19/65937.mp3' //音乐的路径
2102
+ // audio.play()
1841
2103
  };
1842
2104
  // 推送“有新发布”给与会者
1843
2105
  this.test_controller.OnNewPublish = (feed) => {
@@ -2090,6 +2352,7 @@ class Video extends Component {
2090
2352
  }
2091
2353
  })
2092
2354
  if (!document.getElementById("video1").name) {
2355
+ this.state.isPIBIntranet[0].type = false
2093
2356
  this.setState({
2094
2357
  videoOneName: '',
2095
2358
  voiceVideoOne: false,
@@ -2097,6 +2360,7 @@ class Video extends Component {
2097
2360
  })
2098
2361
  }
2099
2362
  if (!document.getElementById("video2").name) {
2363
+ this.state.isPIBIntranet[1].type = false
2100
2364
  this.setState({
2101
2365
  videoTwoName: '',
2102
2366
  voiceVideoTwo: false,
@@ -2104,6 +2368,7 @@ class Video extends Component {
2104
2368
  })
2105
2369
  }
2106
2370
  if (!document.getElementById("video3").name) {
2371
+ this.state.isPIBIntranet[2].type = false
2107
2372
  this.setState({
2108
2373
  videoThreeName: '',
2109
2374
  voiceVideoThree: false,
@@ -2111,6 +2376,7 @@ class Video extends Component {
2111
2376
  })
2112
2377
  }
2113
2378
  if (!document.getElementById("video4").name) {
2379
+ this.state.isPIBIntranet[3].type = false
2114
2380
  this.setState({
2115
2381
  videoFourName: '',
2116
2382
  voiceVideoFour: false,
@@ -2118,6 +2384,7 @@ class Video extends Component {
2118
2384
  })
2119
2385
  }
2120
2386
  if (!document.getElementById("video5").name) {
2387
+ this.state.isPIBIntranet[4].type = false
2121
2388
  this.setState({
2122
2389
  videoFiveName: '',
2123
2390
  voiceVideoFive: false,
@@ -2125,6 +2392,7 @@ class Video extends Component {
2125
2392
  })
2126
2393
  }
2127
2394
  if (!document.getElementById("video6").name) {
2395
+ this.state.isPIBIntranet[5].type = false
2128
2396
  this.setState({
2129
2397
  videoSixName: '',
2130
2398
  voiceVideoSix: false,
@@ -2133,6 +2401,7 @@ class Video extends Component {
2133
2401
  }
2134
2402
 
2135
2403
  if (!document.getElementById("video7").name) {
2404
+ this.state.isPIBIntranet[6].type = false
2136
2405
  this.setState({
2137
2406
  videoSevenName: '',
2138
2407
  voiceVideoSeven: false,
@@ -2140,6 +2409,7 @@ class Video extends Component {
2140
2409
  })
2141
2410
  }
2142
2411
  if (!document.getElementById("video8").name) {
2412
+ this.state.isPIBIntranet[7].type = false
2143
2413
  this.setState({
2144
2414
  videoEightName: '',
2145
2415
  voiceVideoEight: false,
@@ -2147,6 +2417,7 @@ class Video extends Component {
2147
2417
  })
2148
2418
  }
2149
2419
  if (!document.getElementById("video9").name) {
2420
+ this.state.isPIBIntranet[8].type = false
2150
2421
  this.setState({
2151
2422
  videoNineName: '',
2152
2423
  voiceVideoNine: false,
@@ -2154,6 +2425,7 @@ class Video extends Component {
2154
2425
  })
2155
2426
  }
2156
2427
  if (!document.getElementById("video10").name) {
2428
+ this.state.isPIBIntranet[9].type = false
2157
2429
  this.setState({
2158
2430
  videoTenName: '',
2159
2431
  voiceVideoTen: false,
@@ -2161,6 +2433,7 @@ class Video extends Component {
2161
2433
  })
2162
2434
  }
2163
2435
  if (!document.getElementById("video11").name) {
2436
+ this.state.isPIBIntranet[10].type = false
2164
2437
  this.setState({
2165
2438
  videoElevenName: '',
2166
2439
  voiceVideoEleven: false,
@@ -2168,6 +2441,7 @@ class Video extends Component {
2168
2441
  })
2169
2442
  }
2170
2443
  if (!document.getElementById("video12").name) {
2444
+ this.state.isPIBIntranet[11].type = false
2171
2445
  this.setState({
2172
2446
  videoTwelveName: '',
2173
2447
  voiceVideoTwelve: false,
@@ -2208,7 +2482,15 @@ class Video extends Component {
2208
2482
  exitType
2209
2483
  ) => {
2210
2484
  console.log('退出房间者', participant, exitType)
2211
- this.messageClick(this.props.customLeaveRoom,'error')
2485
+ this.appGetUsernameClick(participant).then((res)=>{
2486
+ console.log('退出房间者',res)
2487
+ let data = res? res : '客户'
2488
+ this.messageClick(( data + '已退出会议'),'error')
2489
+ // let audio = document.createElement('audio') //生成一个audio元素
2490
+ // audio.src = 'http://mp3.9ku.com/hot/2005/05-19/65937.mp3' //音乐的路径
2491
+ // audio.play()
2492
+ })
2493
+
2212
2494
  };
2213
2495
  // 弱网回调
2214
2496
  this.test_controller.OnNetworkWeak = (bpsSend, bpsRecv, sid) => {
@@ -2493,7 +2775,7 @@ class Video extends Component {
2493
2775
  }
2494
2776
 
2495
2777
  for (var i = 0; i < 40; i++) {
2496
- let energy = (dataArray[step * i] / 256.0) * 100;
2778
+ let energy = (dataArray[step * i] / 256.0) * 80;
2497
2779
  ctx.beginPath();
2498
2780
  ctx.fillStyle = this.props.voiceColor;
2499
2781
  const { x1, y1, x2, y2 } = drawArea
@@ -2503,7 +2785,7 @@ class Video extends Component {
2503
2785
  let startY = y1 - height // 绘制起始点y
2504
2786
  ctx.fillRect(startX, startY, width, height)
2505
2787
  if(document.getElementById('publish_video1').name == sid) {
2506
- this.state.analyserHeight.set(sid,energy/25)
2788
+ this.state.analyserHeight.set(sid,dataArray[step * 20] / 256.0)
2507
2789
  this.state.analyserHeight = this.state.analyserHeight
2508
2790
  }
2509
2791
 
@@ -2534,9 +2816,9 @@ class Video extends Component {
2534
2816
  // this.setState({
2535
2817
  // isPDF: true,
2536
2818
  // })
2537
- // } else {
2819
+ // } else {
2538
2820
  document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
2539
- // }
2821
+ // }
2540
2822
  this.state.isSharedScreen = false
2541
2823
  this.state.isScreenSwitching = false
2542
2824
  this.setState({
@@ -2549,11 +2831,11 @@ class Video extends Component {
2549
2831
  }
2550
2832
  // if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
2551
2833
  // this.sharedScreen()
2552
- // }
2834
+ // }
2553
2835
  }
2554
2836
 
2555
2837
 
2556
- }
2838
+ };
2557
2839
  }
2558
2840
  enterRoom = async () =>{
2559
2841
  try {
@@ -3083,12 +3365,41 @@ class Video extends Component {
3083
3365
  isModalVisibleEnd: false
3084
3366
  })
3085
3367
  };
3368
+ ocrCallback= async () => {
3369
+ try {
3370
+ let result = await API.ocrCallback({
3371
+ sessionId: this.state.sessionId,
3372
+ staffId: this.props.tellerAccount,
3373
+ activityId: this.props.businessNumber,
3374
+ appAccount: this.state.faceCustomerUid,
3375
+ fileBase64: this.state.facialImg.replace(/^data:image\/\w+;base64,/,""),
3376
+ type: this.state.defaultValue
3377
+ });
3378
+ if (result.code == 200) {
3379
+ this.messageClick('识别成功','success')
3380
+ this.setState({
3381
+ isModalVisibleFacial: false
3382
+ })
3383
+ } else {
3384
+ this.messageClick('识别失败','error')
3385
+ }
3386
+ } catch (err) {
3387
+ this.messageClick('识别失败','error')
3388
+ }
3389
+ }
3086
3390
  handleOkFacial = () => {
3087
- const frontIdcard = new File([this.dataURLtoFile(this.state.facialImg, 'image/jpeg')], new Date() + '.png'); // 重命名了
3391
+ if (this.state.faceCustomerType == 2) {
3392
+ // ocr
3393
+ this.ocrCallback()
3394
+
3395
+ } else {
3396
+ const frontIdcard = new File([this.dataURLtoFile(this.state.facialImg, 'image/jpeg')], new Date() + '.png'); // 重命名了
3088
3397
  const formData = new FormData();
3089
3398
  formData.append('file', frontIdcard);
3090
3399
  formData.append('sessionId', this.state.sessionId);
3091
3400
  this.uploadImg(formData)
3401
+ }
3402
+
3092
3403
  };
3093
3404
  handleCancelFacial = () => {
3094
3405
  this.setState({
@@ -3144,8 +3455,34 @@ class Video extends Component {
3144
3455
  employeeNumber: event.target.value
3145
3456
  })
3146
3457
  }
3458
+ retrieveCustomerInfoByActivityId = async (value) =>{
3459
+ try {
3460
+ let result = await API.retrieveCustomerInfoByActivityId({
3461
+ activityId: this.props.businessNumber,
3462
+ sessionId: this.state.sessionId,
3463
+ appAccount: value
3464
+ });
3465
+ console.log(result)
3466
+
3467
+ if (result.code == 200) {
3468
+ this.messageClick('查询客户信息成功','success')
3469
+ } else {
3470
+ this.messageClick('查询客户信息失败','error')
3471
+ }
3472
+ }catch (err) {
3473
+ this.messageClick('查询客户信息失败','error')
3474
+ }
3475
+ this.setState({
3476
+ clickedFacial: false,
3477
+ clickedOcr: false,
3478
+
3479
+ })
3480
+ }
3147
3481
  customerFaceClick = (item) => {
3148
3482
  console.log(item)
3483
+ if(item.tourist) {
3484
+ this.retrieveCustomerInfoByActivityId(item.customId)
3485
+ } else {
3149
3486
  var sid
3150
3487
  if (item.feedId == document.getElementById("feedId1").innerText) {
3151
3488
  sid = document.getElementById('video1').name;
@@ -3173,6 +3510,7 @@ class Video extends Component {
3173
3510
  sid = document.getElementById('video12').name;
3174
3511
  }
3175
3512
  console.log(sid)
3513
+ this.state.customOcrSid = sid
3176
3514
  this.state.faceCustomerUid = item.customId,
3177
3515
  this.setState({
3178
3516
  clickedFacial: false,
@@ -3182,12 +3520,37 @@ class Video extends Component {
3182
3520
  facialImg: this.test_controller.TakePicture(1, undefined, undefined, sid, 'png')
3183
3521
  })
3184
3522
  }
3523
+ }
3524
+ handleChangeOcr =(val)=> {
3525
+ console.log(val)
3526
+ this.setState({
3527
+ defaultValue: val,
3528
+ facialImg: this.test_controller.TakePicture(1, undefined, undefined, this.state.customOcrSid, 'png')
3529
+ })
3530
+ }
3185
3531
  componentWillReceiveProps(props) {
3186
3532
  this.state.channelId = props.roomId,
3187
3533
  this.state.rtoken = props.mtoken,
3188
3534
  this.state.sessionId = props.sessionId,
3189
3535
  this.state.imRoomId = props.imRoomId
3190
3536
  }
3537
+ appGetUsernameClick = async(userId) =>{
3538
+ let data = ''
3539
+ try {
3540
+ let result = await API.appGetUsername({
3541
+ userId: userId,
3542
+ sessionId: this.state.sessionId
3543
+ });
3544
+ console.log(result)
3545
+
3546
+ if (result.code == 200) {
3547
+ data = result.data.username ? result.data.username : ''
3548
+ }
3549
+ return data
3550
+ }catch (err) {
3551
+ return data
3552
+ }
3553
+ }
3191
3554
  appGetUsername = async (sid) => {
3192
3555
  console.log(sid)
3193
3556
  let userId = ''
@@ -3235,8 +3598,10 @@ class Video extends Component {
3235
3598
  });
3236
3599
  console.log(result)
3237
3600
  let data
3601
+ let typeIntranet
3238
3602
  if (result.code == 200) {
3239
3603
  data = result.data.username ? result.data.username : ''
3604
+ typeIntranet = result.data.userType ? result.data.userType : ''
3240
3605
  } else {
3241
3606
  this.messageClick('查询失败','error')
3242
3607
  }
@@ -3246,53 +3611,88 @@ class Video extends Component {
3246
3611
  })
3247
3612
  }
3248
3613
  if (document.getElementById('video1').name == sid) {
3249
-
3614
+ if(typeIntranet && typeIntranet == 2) {
3615
+ this.state.isPIBIntranet[0].type = true
3616
+ }
3250
3617
  this.setState({
3251
3618
  videoOneName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户1'
3252
3619
  })
3253
3620
  }
3254
3621
  if (document.getElementById('video2').name == sid) {
3622
+ if(typeIntranet && typeIntranet == 2) {
3623
+ this.state.isPIBIntranet[1].type = true
3624
+ }
3255
3625
  this.setState({
3256
3626
  videoTwoName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户2'
3257
3627
  })
3258
3628
  } if (document.getElementById('video3').name == sid) {
3629
+ if(typeIntranet && typeIntranet == 2) {
3630
+ this.state.isPIBIntranet[2].type = true
3631
+ }
3259
3632
  this.setState({
3260
3633
  videoThreeName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户3'
3261
3634
  })
3262
3635
  } if (document.getElementById('video4').name == sid) {
3636
+ if(typeIntranet && typeIntranet == 2) {
3637
+ this.state.isPIBIntranet[3].type = true
3638
+ }
3263
3639
  this.setState({
3264
3640
  videoFourName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户4'
3265
3641
  })
3266
3642
  } if (document.getElementById('video5').name == sid) {
3643
+ if(typeIntranet && typeIntranet == 2) {
3644
+ this.state.isPIBIntranet[4].type = true
3645
+ }
3267
3646
  this.setState({
3268
3647
  videoFiveName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户5'
3269
3648
  })
3270
3649
  } if (document.getElementById('video6').name == sid) {
3650
+ if(typeIntranet && typeIntranet == 2) {
3651
+ this.state.isPIBIntranet[5].type = true
3652
+ }
3271
3653
  this.setState({
3272
3654
  videoSixName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户6'
3273
3655
  })
3274
3656
  }
3275
3657
  if (document.getElementById('video7').name == sid) {
3658
+ if(typeIntranet && typeIntranet == 2) {
3659
+ this.state.isPIBIntranet[6].type = true
3660
+ }
3276
3661
  this.setState({
3277
3662
  videoSevenName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户7'
3278
3663
  })
3279
3664
  } if (document.getElementById('video8').name == sid) {
3665
+ if(typeIntranet && typeIntranet == 2) {
3666
+ this.state.isPIBIntranet[7].type = true
3667
+ }
3280
3668
  this.setState({
3281
3669
  videoEightName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户8'
3282
3670
  })
3283
3671
  } if (document.getElementById('video9').name == sid) {
3672
+ if(typeIntranet && typeIntranet == 2) {
3673
+ this.state.isPIBIntranet[8].type = true
3674
+ }
3284
3675
  this.setState({
3285
3676
  videoNineName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户9'
3286
3677
  })
3287
3678
  } if (document.getElementById('video10').name == sid) {
3679
+ if(typeIntranet && typeIntranet == 2) {
3680
+ this.state.isPIBIntranet[9].type = true
3681
+ }
3288
3682
  this.setState({
3289
3683
  videoTenName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户10'
3290
3684
  })
3291
3685
  } if (document.getElementById('video11').name == sid) {
3686
+ if(typeIntranet && typeIntranet == 2) {
3687
+ this.state.isPIBIntranet[10].type = true
3688
+ }
3292
3689
  this.setState({
3293
3690
  videoElevenName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户11'
3294
3691
  })
3295
3692
  } if (document.getElementById('video12').name == sid) {
3693
+ if(typeIntranet && typeIntranet == 2) {
3694
+ this.state.isPIBIntranet[11].type = true
3695
+ }
3296
3696
  this.setState({
3297
3697
  videoTwelveName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户12'
3298
3698
  })
@@ -3523,6 +3923,7 @@ class Video extends Component {
3523
3923
  console.log('whiteboardDIV', this.state.whiteboardHeight,box.clientHeight,this.state.whiteboardWidth)
3524
3924
  }
3525
3925
  }
3926
+
3526
3927
  render() {
3527
3928
  const { meetingInfo,isTranscribing } = this.props
3528
3929
  var pdfChildren
@@ -4131,7 +4532,16 @@ class Video extends Component {
4131
4532
  </div>
4132
4533
  ]}>
4133
4534
  <div className="faceBody">
4134
- <img className="faceImg" src={this.state.facialImg} alt=""></img>
4535
+ {this.state.faceCustomerType == 2 &&
4536
+ <Select defaultValue={this.state.defaultValue} style={{ width: 120,marginBottom: '20px' }} onChange={this.handleChangeOcr}>
4537
+ <Option value="1">正面</Option>
4538
+ <Option value="2">反面</Option>
4539
+ </Select>
4540
+ }
4541
+ <div>
4542
+ <img className="faceImg" src={this.state.facialImg} alt=""></img>
4543
+ </div>
4544
+
4135
4545
  </div>
4136
4546
  </Modal>
4137
4547
  {/* <Modal title={this.state.titleModal} cancelText="取消" okText="确定" visible={this.state.isModalVisibleFacial}