react_hsbc_teller 0.5.0 → 0.5.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react_hsbc_teller",
3
- "version": "0.5.0",
3
+ "version": "0.5.4",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
Binary file
@@ -219,7 +219,7 @@ function sendMessage(to, from, type, message) {
219
219
  // 转化为xml
220
220
  websocketsend(json2xml(temp));
221
221
  } else {
222
- alert('请先登录!');
222
+ console.log('请先登录!');
223
223
  }
224
224
  }
225
225
  // 加入群 from---加入群的人的jid,to--群名称
@@ -241,7 +241,7 @@ function joinRoom(from, to) {
241
241
  // 转化为xml
242
242
  websocketsend(json2xml(temp));
243
243
  } else {
244
- alert('请先登录!');
244
+ console.log('请先登录!');
245
245
  }
246
246
  }
247
247
  export {
@@ -11,7 +11,7 @@ import voiceImgOpen from '../../assets/img/icon_Mute.png'
11
11
  import voiceImgCloe from '../../assets/img/icon_MuteOne.png'
12
12
  import cameraImgOpen from '../../assets/img/icon_camera.png'
13
13
  import cameraImgCloe from '../../assets/img/icon_cameraOne.png'
14
- import Background from '../../assets/img/placeholder_bg.png'
14
+ import errorPng from '../../assets/img/tooltips2_fail.png'
15
15
  import { callNimIM } from '../../utils/cell.js'
16
16
  import Modal from "antd/lib/modal";
17
17
  import 'antd/lib/modal/style'
@@ -314,12 +314,12 @@ class Video extends Component {
314
314
  });
315
315
  console.log(result);
316
316
  if (result.code == 200) {
317
- message.success('人脸识别成功');
317
+ this.messageClick('人脸识别成功','success')
318
318
  this.setState({
319
319
  isModalVisibleFacial: false
320
320
  })
321
321
  } else {
322
- message.success('人脸识别失败')
322
+ this.messageClick('人脸识别失败','error')
323
323
  }
324
324
 
325
325
 
@@ -470,12 +470,28 @@ class Video extends Component {
470
470
  })
471
471
  }
472
472
  } else {
473
- message.success('当前暂无客户')
473
+ this.messageClick('当前暂无客户','error')
474
474
  }
475
475
  this.setState({
476
476
  customerList: list
477
477
  })
478
478
  }
479
+ messageClick=(value,valueOne)=>{
480
+ if(valueOne == 'error') {
481
+ message.error({
482
+ content: value,
483
+ icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
484
+ className: 'errorClassName'
485
+ })
486
+ } else if(valueOne == 'success') {
487
+ message.success({
488
+ content: value,
489
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
490
+ className: 'successClassName'
491
+ })
492
+ }
493
+
494
+ }
479
495
  // 人脸识别
480
496
  facialRecognition = () => {
481
497
  if (this.isFileSuccuse()) {
@@ -1069,7 +1085,7 @@ class Video extends Component {
1069
1085
  // 获取设备失败
1070
1086
  this.test_controller.OnGetDevicesFailed = (code, msg) => {
1071
1087
  console.log('获取设备失败', code, msg)
1072
- message.success('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头')
1088
+ this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头','error')
1073
1089
  this.roomCallBack(2, '获取失败失败')
1074
1090
  };
1075
1091
  // 建立连接成功
@@ -1839,7 +1855,7 @@ class Video extends Component {
1839
1855
  // 切流成功通知
1840
1856
  this.test_controller.OnChangeMediaStreamSuccess = (sid) => {
1841
1857
  console.log('切流成功通知', sid);
1842
- message.success('切换摄像头或麦克风成功');
1858
+ this.messageClick('切换摄像头或麦克风成功','success')
1843
1859
  this.setState({
1844
1860
  isModalVisibleInspection: false
1845
1861
  })
@@ -1851,7 +1867,7 @@ class Video extends Component {
1851
1867
  msg
1852
1868
  ) => {
1853
1869
  console.log('切流失败通知', sid, code, msg)
1854
- message.success('切换摄像头或麦克风失败,请先检查设备');
1870
+ this.messageClick('切换摄像头或麦克风失败,请先检查设备','error')
1855
1871
  };
1856
1872
  // 服务端录制初始化成功
1857
1873
  this.test_controller.OnInitRemoteRecordSucc = (
@@ -1970,12 +1986,12 @@ class Video extends Component {
1970
1986
  });
1971
1987
  console.log(result);
1972
1988
  if (result.code == 200) {
1973
- message.success('人脸识别成功');
1989
+ this.messageClick('人脸识别成功','success')
1974
1990
  this.setState({
1975
1991
  isModalVisibleFacial: false
1976
1992
  })
1977
1993
  } else {
1978
- message.success('人脸识别失败')
1994
+ this.messageClick('人脸识别失败','error')
1979
1995
  }
1980
1996
 
1981
1997
 
@@ -2014,14 +2030,14 @@ class Video extends Component {
2014
2030
  if (result.code == 200 && result.data.roomStatus == 1) {
2015
2031
  this.addToScript()
2016
2032
  } else {
2017
- message.success('当前房间状态异常')
2033
+ this.messageClick('当前房间状态异常','error')
2018
2034
  this.props.onLeaveRoom({
2019
2035
  code: LEAVE_TYPE.ROOM_DESTROYED,
2020
2036
  errMsg: '当前房间状态异常'
2021
2037
  })
2022
2038
  }
2023
2039
  } catch (err) {
2024
- message.success('当前房间状态异常')
2040
+ this.messageClick('当前房间状态异常','error')
2025
2041
  this.props.onLeaveRoom({
2026
2042
  code: LEAVE_TYPE.ROOM_DESTROYED,
2027
2043
  errMsg: '当前房间状态异常'
@@ -2164,7 +2180,7 @@ class Video extends Component {
2164
2180
  };
2165
2181
  isFileSuccuse = () => {
2166
2182
  if (!this.state.sessionId || this.state.isSuspend) {
2167
- message.success(this.props.prohibitPrompt)
2183
+ this.messageClick(this.props.prohibitPrompt,'error')
2168
2184
  return false
2169
2185
  } else {
2170
2186
  return true
@@ -2420,12 +2436,12 @@ class Video extends Component {
2420
2436
  userId: this.state.employeeNumber
2421
2437
  });
2422
2438
  if (result.code == 200) {
2423
- message.success('发送成功')
2439
+ this.messageClick('发送成功','success')
2424
2440
  this.setState({
2425
2441
  isModalVisibleInvitation: false
2426
2442
  })
2427
2443
  } else {
2428
- message.success('发送失败')
2444
+ this.messageClick('发送失败','error')
2429
2445
  }
2430
2446
  } catch (err) {
2431
2447
 
@@ -2490,27 +2506,6 @@ class Video extends Component {
2490
2506
  console.log(sid)
2491
2507
  let userId = ''
2492
2508
  let index
2493
- // this.state.videoList.map((item,index)=>{
2494
- // let name = 'video' + item.videoIndex
2495
- // if(document.getElementById(name).name == sid){
2496
- // userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById(("feedId" + item.videoIndex)).innerText).uid
2497
- // index = index
2498
- // }
2499
- // })
2500
- // try {
2501
- // let result = await API.appGetUsername({
2502
- // userId: userId
2503
- // });
2504
- // console.log(result)
2505
- // if (result.code == 200) {
2506
- // let data = result.data.userInfo ? result.data.userInfo.userName ? result.data.userInfo.userName : '' : ''
2507
- // this.state.videoList[index].videoOneName = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById(("feedId" + item.videoIndex)).innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户' + item.videoIndex
2508
- // } else {
2509
- // message.success('查询失败')
2510
- // }
2511
- // } catch (err) {
2512
-
2513
- // }
2514
2509
  if (document.getElementById('video1').name == sid) {
2515
2510
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid
2516
2511
  }
@@ -2553,7 +2548,7 @@ class Video extends Component {
2553
2548
  if (result.code == 200) {
2554
2549
  data = result.data.userInfo ? result.data.userInfo.userName ? result.data.userInfo.userName : '' : ''
2555
2550
  } else {
2556
- message.success('查询失败')
2551
+ this.messageClick('查询失败','error')
2557
2552
  }
2558
2553
  if (document.getElementById('video1').name == sid) {
2559
2554
 
@@ -2622,7 +2617,7 @@ class Video extends Component {
2622
2617
  employeeName: result.data.username
2623
2618
  })
2624
2619
  } else {
2625
- message.success('查询失败')
2620
+ this.messageClick('查询失败','error')
2626
2621
  }
2627
2622
  } catch (err) {
2628
2623
 
@@ -2636,12 +2631,12 @@ class Video extends Component {
2636
2631
  });
2637
2632
  console.log(result)
2638
2633
  if (result.code == 200) {
2639
- message.success('签字成功')
2634
+ this.messageClick('签字成功','success')
2640
2635
  this.setState({
2641
2636
  isModalVisibleSign: false,
2642
2637
  })
2643
2638
  } else {
2644
- message.success('签字失败')
2639
+ this.messageClick('签字失败','error')
2645
2640
  }
2646
2641
  } catch (err) {
2647
2642
 
@@ -2683,7 +2678,8 @@ class Video extends Component {
2683
2678
  this.test_controller.Publish(publish_config)
2684
2679
  }
2685
2680
  } else {
2686
- message.success('当前已经切换RM白板')
2681
+ this.messageClick('当前已经切换RM白板','success')
2682
+
2687
2683
  }
2688
2684
 
2689
2685
 
@@ -3299,21 +3295,30 @@ class Video extends Component {
3299
3295
  ]}>
3300
3296
  <div className='endModal'>确定是否结束会话?</div>
3301
3297
  </Modal>
3302
- <Modal title={this.state.titleModal} cancelText="取消" okText="确定" visible={this.state.isModalVisibleFacial}
3298
+ <Modal title={this.state.titleModal} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
3299
+ <Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>,
3300
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkFacial}>确定</Button>
3301
+ ]}>
3302
+ <div className="faceBody">
3303
+ <img className="faceImg" src={this.state.facialImg} alt=""></img>
3304
+ </div>
3305
+ </Modal>
3306
+ {/* <Modal title={this.state.titleModal} cancelText="取消" okText="确定" visible={this.state.isModalVisibleFacial}
3303
3307
  onOk={this.handleOkFacial} onCancel={this.handleCancelFacial}>
3304
3308
  <div className="faceBody">
3305
3309
  <img className="faceImg" src={this.state.facialImg} alt=""></img>
3306
3310
  </div>
3307
3311
 
3308
- </Modal>
3312
+ </Modal> */}
3309
3313
  <Modal className="modelClass" title="新增预约" closable={false} centered={true} visible={this.state.isModalVisibleInvitation} footer={[
3310
3314
  <Button className="modelButtonCancel" onClick={this.handleCancelInvitation}>取消</Button>,
3311
3315
  <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkInvitation}>确定</Button>
3312
3316
  ]}>
3313
3317
  <div>
3314
3318
  <div className="invitationDiv">
3315
- <span class="modalSpan">员工号:</span><input className="inputClick" placeholder="请输入员工号" value={this.state.employeeNumber} onChange={e => this.handleChange(e)}></input>
3316
- <span className="invitationSpan" onClick={this.queryStaff}>查 询</span>
3319
+ <span class="modalSpan">员工号:</span><input type="number"className="inputClick" placeholder="请输入员工号" value={this.state.employeeNumber} onChange={e => this.handleChange(e)}></input>
3320
+ {/* <span className="invitationSpan" onClick={this.queryStaff}>查 询</span> */}
3321
+ <Button className="invitationSpan" type="primary" danger onClick={this.queryStaff}>查 询</Button>
3317
3322
  </div>
3318
3323
  <div className="invitationDiv">
3319
3324
  <span class="modalSpan">&nbsp;&nbsp;&nbsp;姓名:</span><span>{this.state.employeeName}</span>
@@ -3361,7 +3366,7 @@ Video.defaultProps = {
3361
3366
  callbackUrl: 'http://47.102.126.132:8720/hsbc/callback',
3362
3367
  roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
3363
3368
  resourcePath: 'https://counter-web.leimondata.cn:7199',
3364
- prohibitPrompt: '当前无客户',
3369
+ prohbiitPrompt: '当前无客户',
3365
3370
  voiceColor: '#0AE544',
3366
3371
  titleBackground: 'rgba(0,0,0,0.65)',
3367
3372
  titleColor: '#fff',
@@ -98,13 +98,15 @@
98
98
  border-radius: 6px;
99
99
  }
100
100
  .invitationSpan{
101
- padding: 10px 20px;
102
- height: 44px;
103
- width: 100px;
104
- font-size: 16px;
105
- background: #3E505D;
106
- color: #fff;
107
- margin-left: 20px;
101
+ margin-top: 5px;
102
+ margin-right: 15px;
103
+ float: right;
104
+ height: 37px !important;
105
+ width: 80px !important;
106
+ font-size: 16px !important;
107
+ border: 1px #3E505D solid!important;
108
+ background: #3E505D !important;
109
+ color: #fff!important;
108
110
  }
109
111
  .inputClick{
110
112
  width: 65%;
@@ -122,7 +124,12 @@
122
124
  }
123
125
  .invitationDiv{
124
126
  margin-left: 40px;
125
- margin-bottom: 15px
127
+ margin-bottom: 15px;
128
+ input::-webkit-inner-spin-button {
129
+ -webkit-appearance: none;
130
+ appearance: none;
131
+ margin: 0;
132
+ }
126
133
  }
127
134
  .faceImg{
128
135
  width: 200px;
@@ -308,10 +315,50 @@
308
315
  }
309
316
  .endModal{
310
317
  font-size: 16px;
311
- padding: 56px 30px 18px 30px;
318
+ padding: 56px 30px 0px 30px;
312
319
  color: #333333;
313
320
  }
314
321
  .inspection{
315
322
  font-size: 16px;
316
323
  margin: 20px 50px;
324
+ }
325
+ .errorClassName{
326
+ .ant-message-notice-content{
327
+ min-width: 500px;
328
+ height: 44px;
329
+ background: #F9F2F3;
330
+ border: 1px #E5B2B5 solid;
331
+ font-size: 16px;
332
+ color: #252525;
333
+ text-align: center;
334
+ padding: 7px;
335
+ }
336
+
337
+ img{
338
+ margin-right: 8px;
339
+ width: 16px;
340
+ height: 16px;
341
+ margin-bottom: 3px;
342
+ }
343
+
344
+ }
345
+ .successClassName{
346
+ .ant-message-notice-content{
347
+ min-width: 500px;
348
+ height: 44px;
349
+ background: #E5F2F2;
350
+ border: 1px #99CECC solid;
351
+ font-size: 16px;
352
+ color: #252525;
353
+ text-align: center;
354
+ padding: 7px;
355
+ }
356
+
357
+ img{
358
+ margin-right: 8px;
359
+ width: 16px;
360
+ height: 16px;
361
+ margin-bottom: 3px;
362
+ }
363
+
317
364
  }