react_hsbc_teller 2.0.94 → 2.0.95

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": "2.0.94",
3
+ "version": "2.0.95",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -737,6 +737,25 @@ class API extends Server{
737
737
  throw err;
738
738
  }
739
739
  }
740
+ async oneClickCopy(params = {}){
741
+ try{
742
+ let result = await this.axios('post', '/hsbc/oneClickCopy/callback', params);
743
+ if (result && (result.data instanceof Object) && result.code === 200){
744
+ return result.data||[];
745
+ } else{
746
+ let err = {
747
+ tip: '服务异常',
748
+ response: result,
749
+ data: params,
750
+ // url: 'https://api.cangdu.org/shopro/data/products',
751
+ }
752
+ throw err;
753
+ }
754
+ }catch(err){
755
+ throw err;
756
+ }
757
+ }
758
+
740
759
  // /**
741
760
  // * 用途:获取记录数据
742
761
  // * @url https://api.cangdu.org/shopro/data/record
@@ -4,6 +4,7 @@ import Pdf from './pdf.js'
4
4
 
5
5
  class Demo extends Component {
6
6
  state = {
7
+ isTagFilter: true,
7
8
  shareMask: false,
8
9
  mtoken
9
10
  :
@@ -19,6 +20,7 @@ sessionId
19
20
  // imRoomId: '',
20
21
  // sessionId: '',
21
22
  pdfRendering: false,
23
+ zeroVolAlert: false,
22
24
  isVideo: false,
23
25
  tellerAccount: '20250528',
24
26
  // callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
@@ -214,6 +216,9 @@ userExit =(val)=>{
214
216
  console.log('componentDidCatch')
215
217
  console.error(error, info)
216
218
  }
219
+ onOneClickCopyResult(val) {
220
+ console.log('onOneClickCopyResult', val)
221
+ }
217
222
  render() {
218
223
  return (
219
224
  <div className="test">
@@ -269,6 +274,7 @@ userExit =(val)=>{
269
274
  staffPermission={this.staffPermission}
270
275
  onRoomAttendanceList={this.onRoomAttendanceList}
271
276
  onNewJoinerIn={this.onNewJoinerIn}
277
+ onOneClickCopyResult={this.onOneClickCopyResult}
272
278
  >
273
279
 
274
280
  <Pdf></Pdf>
@@ -0,0 +1,259 @@
1
+ import React, { Component } from "react"
2
+ import "./transcription.less"
3
+ import API from "@/api/api"
4
+ import { FormattedMessage, injectIntl } from "react-intl";
5
+ import Modal from "antd/lib/modal";
6
+ import 'antd/lib/modal/style'
7
+ import { Button } from '../../../../../node_modules/antd/lib/index';
8
+ import { message } from 'antd';
9
+ @injectIntl
10
+ class Transcription extends Component {
11
+ state = {
12
+ data: {
13
+ "roomId": "7742532490251215",
14
+ "sessionId": "46694435",
15
+ "appAccount": "20250528",
16
+ "appointmentId": "1072390549",
17
+ "step": "customer-risk",
18
+ "callbackUrl": "https://aag.wealth-platform.prod.ali.cloud.cn.hsbc/nosaml/api/meeting/wealth/api/v1/meeting/oneClickCopy/callback",
19
+ "list": [{
20
+ "title": "风险承受程度和语句确认",
21
+ "productName": ["汇丰代客境外理财计划-富达基金 - 环球科技基金 - 美元-累计"],
22
+ "productCode": "IPFD1234/IPFD2234/IPFD3334",
23
+ "transactionNumber": "20260316152044056919",
24
+ "file": [{
25
+ "transactionNumber": "20260316152044056919",
26
+ "docId": "ff9fd0cc-854a-456d-bc17-3b9e9e8901fa",
27
+ "docType": "QDII-UT-DOC7",
28
+ "appointmentId": "1072390549",
29
+ "step": "copy-risk",
30
+ "previewContent": "根据您在我行最新风险承受能力问卷评估的结果,您的风险承受程度为 5级--“激进型”。 如您的风险承受能力发生变化,请重新进行评估。请在以下抄录框中,填写您的风险承受程度“激进型“",
31
+ "reminderContent": "为保障您的投资权益请输入以上风险承受程度",
32
+ "copyContent": "激进型"
33
+ },
34
+ {
35
+ "transactionNumber": "20260316152044056919",
36
+ "docId": "ff9fd0cc-854a-456d-bc17-3b9e9e8901fa",
37
+ "docType": "QDII-UT-DOC7",
38
+ "appointmentId": "1072390549",
39
+ "step": "copy-statement",
40
+ "previewContent": "本人已经阅读相关风险提示,充分了解并清楚知晓本产品的风险,愿意承担相关投资风险。",
41
+ "reminderContent": "为保障您的投资权益请输入以上风险提示语句",
42
+ "copyContent": "本人已经阅读相关风险提示,充分了解并清楚知晓本产品的风险,愿意承担相关投资风险。"
43
+ }]
44
+ },
45
+ {
46
+ "title": "风险承受程度和语句确认-English",
47
+ "productName": ["汇丰代客境外理财计划-富达基金 - 环球科技基金 - 美元-累计"],
48
+ "productCode": "IPFD1234/IPFD2234/IPFD3334",
49
+ "transactionNumber": "20260316152044056919",
50
+ "file": [{
51
+ "transactionNumber": "20260316152044056919",
52
+ "docId": "ff9fd0cc-854a-456d-bc17-3b9e9e8901fa",
53
+ "docType": "QDII-UT-DOC7",
54
+ "appointmentId": "1072390549",
55
+ "step": "copy-risk",
56
+ "previewContent": "According to your latest risk profile questionnaire result in our bank, your risk tolerance level is Level 0 – “Conservative”. Whenever any factor(s) affecting your risk tolerance level changes, you should reassess your risk profile.Please state your risk tolerance level as “{rpqName}” in this section.",
57
+ "reminderContent": "为保障您的投资权益请输入以上风险承受程度",
58
+ "copyContent": "“Conservative”"
59
+ },
60
+ {
61
+ "transactionNumber": "20260316152044056919",
62
+ "docId": "ff9fd0cc-854a-456d-bc17-3b9e9e8901fa",
63
+ "docType": "QDII-UT-DOC7",
64
+ "appointmentId": "1072390549",
65
+ "step": "copy-statement",
66
+ "previewContent": "I/We have read the relevant risk disclosure, obtained sufficient knowledge and understood clearly the product risk, and will undertake the relevant risk.",
67
+ "reminderContent": "为保障您的投资权益请输入以上风险提示语句",
68
+ "copyContent": "I/We have read the relevant risk disclosure, obtained sufficient knowledge and understood clearly the product risk, and will undertake the relevant risk."
69
+ }]
70
+ },
71
+ {
72
+ "title": "风险语句确认",
73
+ "productName": ["汇丰代客境外理财计划-贝莱德基金 - 环球科技基金 - 美元-累计"],
74
+ "productCode": "IPFD1234/IPFD2234/IPFD3334",
75
+ "transactionNumber": "20260316152044056920",
76
+ "file": [{
77
+ "productCode": "IPFD5678",
78
+ "transactionNumber": "20260316152044056920",
79
+ "docId": "ff9fd0cc-854a-456d-bc17-3b9e9e8901fa",
80
+ "docType": "QDII-UT-DOC7",
81
+ "appointmentId": "1072390549",
82
+ "step": "copy-statement",
83
+ "previewContent": "本人(等)已经阅读风险揭示,愿意承担投资风险。",
84
+ "reminderContent": "为保障您的投资权益请输入以上风险提示语句",
85
+ "copyContent": "本人(等)已经阅读风险揭示,愿意承担投资风险。"
86
+ }]
87
+ }]
88
+ },
89
+ formData: {},
90
+ index: 0,
91
+ isModalVisibleEnd: false,
92
+ isModalVisibleSubmitError: false,
93
+ }
94
+ componentWillMount() {
95
+ // 初始化数据
96
+ let data = this.props.data || this.state.data;
97
+ this.setState({
98
+ data: data,
99
+ formData: data.list && data.list.length > 0 ? data.list[this.state.index] : {}
100
+ });
101
+ }
102
+ copy(index, item) {
103
+ let list = [...this.state.formData.file];
104
+ list[index].copy = item;
105
+ this.setState({
106
+ formData: { ...this.state.formData, file: list },
107
+ });
108
+ }
109
+ // 检查是否所有 copy 都有值
110
+ isAllCopied() {
111
+ if (!this.state.formData.file || this.state.formData.file.length === 0) {
112
+ return false;
113
+ }
114
+ return this.state.formData.file.every(item => item.copy && item.copy.trim() !== '');
115
+ }
116
+ next() {
117
+ if (this.state.index == this.state.data.list.length - 1) {
118
+ console.log('完成')
119
+ this.finishClick()
120
+ } else {
121
+ this.setState({
122
+ index: this.state.index + 1,
123
+ formData: this.state.data.list[this.state.index + 1] || {}
124
+ });
125
+ }
126
+ }
127
+ sendMessage = () => {
128
+ this.props.sendMessage({
129
+ 'typeId': 952702,
130
+ 'sessionId': window.imRoom.sessionId,
131
+ })
132
+ }
133
+ finishClick = async () => {
134
+ try {
135
+ let result = await API.oneClickCopy({
136
+ ...this.props.data
137
+ });
138
+ console.log(result)
139
+
140
+ if (result.code == 200) {
141
+ this.sendMessage()
142
+ this.props.finish()
143
+ } else {
144
+ this.setState({
145
+ isModalVisibleSubmitError: true
146
+ })
147
+ }
148
+ } catch (err) {
149
+ this.setState({
150
+ isModalVisibleSubmitError: true
151
+ })
152
+ console.log('pdfCallback', err)
153
+ }
154
+ }
155
+ handleSubmit = () => {
156
+ this.setState({
157
+ isModalVisibleSubmitError: false
158
+ })
159
+ }
160
+ exit = () => {
161
+ this.setState({
162
+ isModalVisibleEnd: true
163
+ })
164
+ }
165
+ handleCancelEnd = () => {
166
+ this.setState({
167
+ isModalVisibleEnd: false
168
+ })
169
+ }
170
+ handleOkEnd = () => {
171
+ this.setState({
172
+ isModalVisibleEnd: false
173
+ })
174
+ // 异常退出
175
+ this.props.handleReceiveMsg({
176
+ 'typeId': 952701,
177
+ 'sessionId': window.imRoom.sessionId,
178
+ })
179
+ this.props.finish();
180
+
181
+ }
182
+ render() {
183
+ return (
184
+ <div className="transcription">
185
+ <div className="thehead">
186
+ <div className="title">
187
+ <div className="title-color"></div>
188
+ <div className="title-text">{this.state.formData.title}</div>
189
+ </div>
190
+ <div className='btns'>
191
+ <div className="reset" onClick={() => this.exit()}><FormattedMessage id="exit" /></div>
192
+ </div>
193
+ </div>
194
+ <div className="prompt">
195
+ 交易流水号:{this.state.formData.transactionNumber}
196
+ </div>
197
+ <div className="prompt">产品:{this.state.formData.productCode}</div>
198
+ {
199
+ this.state.formData.file && this.state.formData.file.map((item, index) => {
200
+ return (
201
+ <div className="item" key={index}>
202
+ <div className="item-content">{item.previewContent}</div>
203
+ <div className="item-button">
204
+ <div className="item-button-title">请输入抄写内容</div>
205
+ <button className="item-button-copy" onClick={() => this.copy(index, item.copyContent)}>一键抄录</button>
206
+ </div>
207
+ <div >
208
+ <div className="item-input">{item.copy}</div>
209
+ </div>
210
+ </div>
211
+ )
212
+ })
213
+ }
214
+ <div className="submit">
215
+ <button
216
+ className="item-button-copy"
217
+ onClick={() => this.next()}
218
+ disabled={!this.isAllCopied()}
219
+ style={!this.isAllCopied() ? {
220
+ background: '#CCCCCC',
221
+ borderColor: '#CCCCCC',
222
+ color: '#999999',
223
+ cursor: 'not-allowed'
224
+ } : {}}
225
+ >确认</button>
226
+
227
+ </div>
228
+ <Modal transitionName="" maskTransitionName="" getContainer={document.getElementById('multiModule')} destroyOnClose={true} closable={false} centered={true} visible={this.state.isModalVisibleEnd} footer={[<div key='end'>
229
+ <Button className="modelButtonCancel" onClick={this.handleCancelEnd}><FormattedMessage id="cancel" /></Button>
230
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkEnd}><FormattedMessage id="ok" /></Button>
231
+ </div>
232
+ ]}>
233
+ <div className='endModal'>
234
+ <div className='modalEndTitle'>
235
+ <FormattedMessage id="whether" />
236
+ </div>
237
+ <div className='modalEnd'>
238
+ <FormattedMessage id="progress" />
239
+ </div>
240
+ </div>
241
+ </Modal>
242
+ <Modal transitionName="" maskTransitionName="" destroyOnClose={true} closable={false} centered={true} visible={this.state.isModalVisibleSubmitError} footer={[<div key='end'>
243
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleSubmit}><FormattedMessage id="ok" /></Button>
244
+ </div>
245
+ ]}>
246
+ <div className='endModal'>
247
+ <div className='modalEndTitle'>
248
+ <FormattedMessage id="message" />
249
+ </div>
250
+ <div className='modalEnd'>
251
+ <FormattedMessage id="submission" />
252
+ </div>
253
+ </div>
254
+ </Modal>
255
+ </div>
256
+ )
257
+ }
258
+ }
259
+ export default Transcription;
@@ -0,0 +1,105 @@
1
+ .transcription{
2
+ height: 100%;
3
+ background: #fff;
4
+ position: relative;
5
+ display: flex;
6
+ flex-direction: column;
7
+ .thehead{
8
+ display: flex;
9
+ justify-content: space-between;
10
+ padding: 14px 24px 0;
11
+ .title{
12
+ display: flex;
13
+ .title-color{
14
+ width: 2px;
15
+ height: 1.5rem;
16
+ background: #00847F;
17
+ margin-top: 0.25rem;
18
+ }
19
+ .title-text{
20
+ font-size: 1.5rem;
21
+ color: #323232;
22
+ margin-left: 8px;
23
+ font-weight: 500;
24
+ }
25
+
26
+ }
27
+ .btns{
28
+ display: flex;
29
+ }
30
+ .qianshu{
31
+ width: 96px;
32
+ height: 2rem;
33
+ background: #F9F2F3;
34
+ border-radius: 2px;
35
+ border: 1px solid #E5B2B5;
36
+ font-size: 14px;
37
+ color: #DB0011;
38
+ line-height: 2rem;
39
+ text-align: center;
40
+ }
41
+ .reset{
42
+ width: 96px;
43
+ height: 2rem;
44
+ background: white;
45
+ border-radius: 2px;
46
+ border: 1px solid #DCDCDC;
47
+ font-size: 14px;
48
+ color: #646464;
49
+ line-height: 2rem;
50
+ text-align: center;
51
+ margin-right: 8px;
52
+ }
53
+ }
54
+ .prompt{
55
+ padding: 14px 24px ;
56
+ font-size: 1rem;
57
+ }
58
+ .item{
59
+ padding: 14px 24px ;
60
+ .item-content{
61
+ border: 1px #666666 solid;
62
+ padding: 14px 24px;
63
+ min-height: 50px;
64
+ }
65
+ .item-button{
66
+ display: flex;
67
+ justify-content: space-between;
68
+ padding: 14px 0;
69
+ }
70
+ .item-button-title{
71
+ font-size: 1rem;
72
+ color: #323232;
73
+ margin-left: 8px;
74
+ font-weight: 500;
75
+ }
76
+
77
+ .item-input{
78
+ border: 1px #666666 solid;
79
+ padding: 14px 24px;
80
+ min-height: 50px;
81
+ }
82
+ }
83
+ .submit {
84
+ text-align: center;
85
+ }
86
+ .item-button-copy{
87
+ width: 96px;
88
+ height: 2rem;
89
+ background: #F9F2F3;
90
+ border-radius: 2px;
91
+ border: 1px solid #E5B2B5;
92
+ font-size: 14px;
93
+ color: #DB0011;
94
+ line-height: 2rem;
95
+ text-align: center;
96
+ cursor: pointer;
97
+
98
+ &:disabled {
99
+ background: #CCCCCC;
100
+ border-color: #CCCCCC;
101
+ color: #999999;
102
+ cursor: not-allowed;
103
+ }
104
+ }
105
+ }
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
2
2
  import './multiModule.less'
3
3
  import Copy from "./components/copy/copylist" //抄录
4
4
  import Subscribe from "./components/subscribe/subscribe" //签署
5
+ import Transcription from "./components/transcription/transcription" // 一建抄录
5
6
  class multiModule extends Component {
6
7
  state = {
7
8
  };
@@ -17,6 +18,7 @@ class multiModule extends Component {
17
18
  {/* <Subscribe /> */}
18
19
  {this.props.moduleName=='copy'?<Copy data={this.props.data} handleReceiveMsg={this.handleReceiveMsg} finish={this.finish}/>:null}
19
20
  {this.props.moduleName=='subscribe'?<Subscribe data={this.props.data} handleReceiveMsg={this.handleReceiveMsg} finish={this.finish}/>:null}
21
+ {this.props.moduleName=='transcription'?<Transcription data={this.props.data} handleReceiveMsg={this.handleReceiveMsg} finish={this.finish}></Transcription>:null}
20
22
  </div>
21
23
  );
22
24
  }
@@ -66,7 +66,7 @@ import axios from 'axios';
66
66
  import CryptoJS from "crypto-js";
67
67
 
68
68
 
69
- const SDK_VERISON = '2.0.94'
69
+ const SDK_VERISON = '2.0.95'
70
70
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
71
71
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
72
72
  const { Option } = Select;
@@ -727,7 +727,7 @@ class Video extends Component {
727
727
  height: (420 * SCALE)
728
728
  })
729
729
  // 开启业务录制的时候type传值,在后面加标识,全局的不加
730
- const filePath = 'recordId_' + this.props.tellerAccount + new Date().valueOf() + type;
730
+ const filePath = 'recordId_' + this.props.tellerAccount + new Date().valueOf() + '_' + type;
731
731
  const recordParam = {};
732
732
  recordParam.width = 1280 * SCALE;
733
733
  recordParam.height = 720 * SCALE;
@@ -761,7 +761,11 @@ class Video extends Component {
761
761
  },
762
762
  ];
763
763
  recordParam.tagPositions = list
764
- // recordParam.tagFilter = 'tag' //之前是为了透出小蜜的,现在注释掉是因为客户需要放开
764
+ // 新加参数 isTagFilter true 的时候是开启只录制tag的,false是关闭录制全部的
765
+ if(this.props.isTagFilter) {
766
+ recordParam.tagFilter = 'tag' //之前是为了透出小蜜的,现在注释掉是因为客户需要放开
767
+ }
768
+
765
769
  console.log('recordParam', recordParam);
766
770
  // 开启音频录制,如果有业务id用,没用sessionid 用于在成功回调里去区分是音频还是正常
767
771
  that.test_controller.StartRemoteRecord(filePath, recordParam, record_business_id ? record_business_id + '_' + type : this.state.sessionId + '_' + type)
@@ -2235,6 +2239,31 @@ class Video extends Component {
2235
2239
  if(this.state.sessionId == Mival.data.sessionId ) {
2236
2240
  this.messageClick('客户端音量过低', 'error')
2237
2241
  }
2242
+ } else if (Mival.typeId == 9527) {
2243
+ // 一建抄录
2244
+ if(this.state.sessionId == Mival.sessionId) {
2245
+ this.setState({
2246
+ moduleData: Mival,
2247
+ isBackdrop: false
2248
+ }, ()=>{
2249
+ this.showModal('transcription')
2250
+ })
2251
+ }
2252
+ } else if (Mival.typeId == 952701) {
2253
+ if(this.state.sessionId == Mival.sessionId) {
2254
+ // 一建抄录--异常退出
2255
+ this.props.onOneClickCopyResult ({
2256
+ state: '0'
2257
+ })
2258
+ }
2259
+
2260
+ } else if (Mival.typeId == 952702) {
2261
+ if(this.state.sessionId == Mival.sessionId) {
2262
+ // 一建抄录--正常退出
2263
+ this.props.onOneClickCopyResult ({
2264
+ state: '1'
2265
+ })
2266
+ }
2238
2267
  }
2239
2268
  }
2240
2269
  getUserTitle = (userId) => {
@@ -8368,6 +8397,7 @@ Video.defaultProps = {
8368
8397
  needPreSale: true, // 是否开启音频录制 默认true--只控制售前full
8369
8398
  signalDisconnectedTime: 20, // 网络异常断开多久后异常弹窗提示
8370
8399
  zeroVolAlert: true, // true 开启音量持续提示,,false不开启
8400
+ isTagFilter: true, // 默认true 的时候是开启只录制标签是tag的(剔除掉小蜜的声音的),false是关闭录制全部的
8371
8401
  logUrl: 'http://hsbc.cn-shanghai.log.aliyuncs.com/logstores/hsbc/track?APIVersion=0.6.0&app=meeting-ui',
8372
8402
  internalUrl: 'https://wp-staff-gateway.wealth-platform.uat.ali.cloud.cn.hsbc/meeting-ui/OHB/CN/HSBC?chnlID=OHB&locale=zh_CN&chnlCC=CN&chnlGMC=HSBC&targetFunc=supervisorMeeting&sourceFunc=rmMeeting'
8373
8403
  }
File without changes