cnhis-design-vue 2.1.29 → 2.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -16
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +68 -68
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +22 -22
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +21 -30
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +94 -92
- package/es/form-table/style.css +1 -1
- package/es/index/index.js +1247 -1008
- package/es/index/style.css +1 -1
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +772 -559
- package/es/multi-chat/style.css +1 -1
- package/es/multi-chat-client/index.js +368 -220
- package/es/multi-chat-client/style.css +1 -1
- package/es/multi-chat-history/index.js +292 -39
- package/es/multi-chat-history/style.css +1 -1
- package/es/multi-chat-record/index.js +114 -40
- package/es/multi-chat-record/style.css +1 -1
- package/es/multi-chat-setting/index.js +132 -57
- package/es/multi-chat-setting/style.css +1 -1
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-view/index.js +24 -24
- package/es/select/index.js +11 -11
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +36 -28
- package/es/select-person/style.css +1 -1
- package/es/shortcut-setter/index.js +10 -10
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +47 -47
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/utils/UniRTCv2.js +89 -13
- package/es/utils/trtc.js +19025 -0
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +26238 -6114
- package/lib/cui.umd.js +26238 -6114
- package/lib/cui.umd.min.js +150 -148
- package/package.json +2 -2
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +3 -11
- package/packages/form-table/src/FormTable.vue +4 -1
- package/packages/multi-chat/chat/audio.vue +22 -6
- package/packages/multi-chat/chat/chatHeader.vue +4 -1
- package/packages/multi-chat/chat/chatHistory.vue +16 -2
- package/packages/multi-chat/chat/chatMain.vue +5 -0
- package/packages/multi-chat/chat/index.vue +31 -1
- package/packages/multi-chat/chat/mixins/uniRTCAPI.js +10 -7
- package/packages/multi-chat/chat/multiVideo.vue +16 -4
- package/packages/multi-chat/chat/scrollList.vue +9 -3
- package/packages/multi-chat/components/avatar.vue +63 -26
- package/packages/multi-chat/img/replay.png +0 -0
- package/packages/multi-chat/setting/sessionList/messageRecord.vue +9 -0
- package/packages/multi-chat/store/actions.js +8 -4
- package/packages/multi-chat/store/getters.js +3 -0
- package/packages/multi-chat/store/mutation.js +3 -0
- package/packages/multi-chat/store/state.js +2 -1
- package/packages/multi-chat/utils/index.js +25 -0
- package/packages/multi-chat/utils/rtc-client.js +23 -3
- package/packages/select-person/select-person.vue +9 -4
- package/src/utils/UniRTCv2.js +53 -15
- package/src/utils/trtc.js +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { message } from 'ant-design-vue';
|
|
2
2
|
import { getCacheSIP, setCacheSip, openSipDialog } from '@/utils/sip-device';
|
|
3
3
|
import fetch from '@/utils/chatFetch';
|
|
4
|
+
import axios from 'axios'
|
|
4
5
|
let chatUid = 0;
|
|
5
6
|
let chatUids = [];
|
|
6
7
|
const chatUidUp = () => {
|
|
@@ -8,6 +9,30 @@ const chatUidUp = () => {
|
|
|
8
9
|
chatUid++;
|
|
9
10
|
};
|
|
10
11
|
|
|
12
|
+
export const getClientDeviceToken = (params) => {
|
|
13
|
+
return axios({
|
|
14
|
+
method: "get",
|
|
15
|
+
baseURL: "",
|
|
16
|
+
url: "/ihcrm/rest/callEsb/util/get",
|
|
17
|
+
params: {
|
|
18
|
+
customerId: params,
|
|
19
|
+
interface: 'getDeviceTokenByCustomerId'
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
.then(({ data }) => {
|
|
23
|
+
if (data.status === "success" || data.code === "00000") {
|
|
24
|
+
const result = JSON.parse(data.result);
|
|
25
|
+
if (result.data) {
|
|
26
|
+
return result.data
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
return false
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
.catch((error) => {
|
|
33
|
+
console.error(error)
|
|
34
|
+
});
|
|
35
|
+
};
|
|
11
36
|
/**
|
|
12
37
|
* 获取撤回文案
|
|
13
38
|
* @param ctx Vue
|
|
@@ -24,7 +24,19 @@ export default class RtcClient {
|
|
|
24
24
|
this.localStream_ = null;
|
|
25
25
|
this.remoteStreams_ = [];
|
|
26
26
|
this.options = options;
|
|
27
|
-
|
|
27
|
+
function getSDKJS () {
|
|
28
|
+
if (options.vendor == 2) {
|
|
29
|
+
return require('@/utils/kty-sdk');
|
|
30
|
+
} else if (options.vendor == 3) {
|
|
31
|
+
// 对接江苏省sdk
|
|
32
|
+
return { default: require('@/utils/trtc')}
|
|
33
|
+
// return { default: require('trtc-js-sdk')}
|
|
34
|
+
} else {
|
|
35
|
+
return { default: require('trtc-js-sdk') }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const sdkjs = Promise.resolve(getSDKJS());
|
|
39
|
+
console.log('sdkjs', sdkjs);
|
|
28
40
|
sdkjs.then(res => {
|
|
29
41
|
TRTC = res.default;
|
|
30
42
|
// check if browser is compatible with TRTC
|
|
@@ -94,6 +106,8 @@ export default class RtcClient {
|
|
|
94
106
|
},
|
|
95
107
|
this.client_
|
|
96
108
|
);
|
|
109
|
+
console.log('单人this.userId_', this.userId_);
|
|
110
|
+
console.log('单人创建本地流:', this.localStream_);
|
|
97
111
|
// 设置视频分辨率帧率和码率
|
|
98
112
|
// console.log,暂时注释
|
|
99
113
|
this.localStream_.setVideoProfile(this.screen ? '1080p' : '720p');
|
|
@@ -127,6 +141,7 @@ export default class RtcClient {
|
|
|
127
141
|
}
|
|
128
142
|
|
|
129
143
|
async leave() {
|
|
144
|
+
console.log('单人leave: 离开房间');
|
|
130
145
|
if (!this.isJoined_) {
|
|
131
146
|
console.warn('leave() - leave without join()d observed');
|
|
132
147
|
return;
|
|
@@ -193,8 +208,13 @@ export default class RtcClient {
|
|
|
193
208
|
if (this.isSip) {
|
|
194
209
|
this.dropSip();
|
|
195
210
|
} else {
|
|
196
|
-
|
|
197
|
-
|
|
211
|
+
console.log('单人unpublish: 释放本地流:', this.localStream_);
|
|
212
|
+
if (this.options.vendor === 3) {
|
|
213
|
+
this.localStream_.close();
|
|
214
|
+
} else {
|
|
215
|
+
// 停止发布本地流
|
|
216
|
+
await this.client_.unpublish(this.localStream_);
|
|
217
|
+
}
|
|
198
218
|
}
|
|
199
219
|
this.isPublished_ = false;
|
|
200
220
|
} catch (error) {
|
|
@@ -217,6 +217,10 @@ export default create({
|
|
|
217
217
|
type: Boolean,
|
|
218
218
|
default: true
|
|
219
219
|
},
|
|
220
|
+
filterChildren: {
|
|
221
|
+
type: Boolean,
|
|
222
|
+
default: false
|
|
223
|
+
},
|
|
220
224
|
queryMainTreeData: Function, // 主树请求
|
|
221
225
|
queryLoadChildData: Function, // 懒加载请求
|
|
222
226
|
queryTreeSearch: Function // 检索请求
|
|
@@ -1283,20 +1287,21 @@ export default create({
|
|
|
1283
1287
|
}
|
|
1284
1288
|
let copyData = JSON.parse(JSON.stringify(this.treeData[key]));
|
|
1285
1289
|
// 增加visible属性 true展示 false不展示
|
|
1286
|
-
filterTree({ value: this.title, data: copyData, prop: 'title' });
|
|
1290
|
+
filterTree({ value: this.title, data: copyData, prop: 'title', filterChildren: this.filterChildren });
|
|
1287
1291
|
// 过滤visible属性 为true的数据
|
|
1288
1292
|
copyData = copyData.filter(item => item.visible);
|
|
1289
1293
|
const expandedKeys = [];
|
|
1290
1294
|
vexutils.searchTree(copyData, item => {
|
|
1291
|
-
if (item.visible) {
|
|
1292
|
-
|
|
1295
|
+
if (item.visible && item.title.indexOf(this.title) !== -1) {
|
|
1296
|
+
const allParentIds = getAllParentId(copyData, item.key).filter(Boolean);
|
|
1297
|
+
expandedKeys.push(...allParentIds);
|
|
1293
1298
|
}
|
|
1294
1299
|
if (item.children && item.children.length) {
|
|
1295
1300
|
item.children = item.children.filter(child => child.visible);
|
|
1296
1301
|
}
|
|
1297
1302
|
});
|
|
1298
1303
|
this.$set(this.treeData, 'temp', copyData);
|
|
1299
|
-
this.expandedKeys = expandedKeys;
|
|
1304
|
+
this.expandedKeys = [...new Set(expandedKeys)];
|
|
1300
1305
|
},
|
|
1301
1306
|
getStaticSearchParentKey(treeData, expandedKeys, orgId) {
|
|
1302
1307
|
const keyword = this.title;
|
package/src/utils/UniRTCv2.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import io from 'socket.io-client';
|
|
2
|
+
import fetch, { qs } from './chatFetch';
|
|
2
3
|
|
|
3
|
-
function UniRTCObject(appId, tokenProvider) {
|
|
4
|
+
function UniRTCObject(appId, tokenProvider, vueSelf) {
|
|
4
5
|
|
|
5
6
|
if (appId == null || appId == '') {
|
|
6
7
|
console.error('参数appId必填');
|
|
@@ -29,6 +30,7 @@ function UniRTCObject(appId, tokenProvider) {
|
|
|
29
30
|
this.clientType = '1';
|
|
30
31
|
this.client = null;
|
|
31
32
|
this.localStream = null;
|
|
33
|
+
this.vueSelf = vueSelf;
|
|
32
34
|
// ***********************API*********************//
|
|
33
35
|
|
|
34
36
|
// 我方接听API
|
|
@@ -130,6 +132,7 @@ function UniRTCObject(appId, tokenProvider) {
|
|
|
130
132
|
msg.targetDeviceToken = targetDeviceToken;
|
|
131
133
|
msg.brand = brand;
|
|
132
134
|
msg.message = message;
|
|
135
|
+
console.log('发送videoHangUp事件');
|
|
133
136
|
_socket.emit('videoHangUp', JSON.stringify(msg));
|
|
134
137
|
console.log('进行挂断[' + JSON.stringify(msg) + ']');
|
|
135
138
|
}
|
|
@@ -138,57 +141,66 @@ function UniRTCObject(appId, tokenProvider) {
|
|
|
138
141
|
|
|
139
142
|
// 登录成功callback
|
|
140
143
|
this.onLogined = function() {
|
|
141
|
-
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
// 呼入进来callback
|
|
145
147
|
this.onCallComing = function(incoming) {
|
|
146
|
-
|
|
148
|
+
console.log('呼入进来callback', incoming);
|
|
147
149
|
};
|
|
148
150
|
|
|
149
151
|
// 通话就绪callback
|
|
150
152
|
this.onCallReady = function(incoming) {
|
|
151
|
-
|
|
153
|
+
console.log('通话就绪callback', incoming);
|
|
152
154
|
};
|
|
153
155
|
|
|
154
156
|
// 开始呼叫callback
|
|
155
157
|
this.onCallStarted = function(outing) {
|
|
156
|
-
|
|
158
|
+
console.log('开始呼叫callback', outing);
|
|
157
159
|
};
|
|
158
160
|
|
|
159
161
|
// 停止呼叫callback
|
|
160
162
|
this.onCallStoped = function(outing) {
|
|
161
|
-
|
|
163
|
+
console.log('停止呼叫callback', outing);
|
|
162
164
|
};
|
|
163
165
|
|
|
164
166
|
// 呼出反馈callback
|
|
165
167
|
this.onCallReplied = function(outing) {
|
|
166
|
-
|
|
168
|
+
console.log('呼出反馈callback', outing);
|
|
167
169
|
};
|
|
168
170
|
|
|
169
171
|
// 呼出被接callback
|
|
170
172
|
this.onCallAccepted = function(outing) {
|
|
171
|
-
|
|
173
|
+
console.log('呼出被接callback', outing);
|
|
174
|
+
let videoData = {
|
|
175
|
+
...outing.guestConfig.videoData,
|
|
176
|
+
inviteResult: 1
|
|
177
|
+
}
|
|
178
|
+
this.vueSelf.subscribeAcceptedJST(videoData)
|
|
172
179
|
};
|
|
173
180
|
|
|
174
181
|
// 呼出被拒callback
|
|
175
182
|
this.onCallRefused = function(outing) {
|
|
176
|
-
|
|
183
|
+
console.log('呼出被拒callback', outing);
|
|
177
184
|
};
|
|
178
185
|
|
|
179
186
|
// 呼出超时callback
|
|
180
187
|
this.onCallTimeout = function(outing) {
|
|
181
|
-
|
|
188
|
+
console.log('呼出超时callback', outing);
|
|
182
189
|
};
|
|
183
190
|
|
|
184
191
|
// 设备状态检查
|
|
185
192
|
this.onStatusChecked = function(stat) {
|
|
186
|
-
|
|
193
|
+
console.log('设备状态检查', stat);
|
|
194
|
+
if (stat[0].status == '0') {
|
|
195
|
+
_this.vueSelf.setCallerStatus('在线')
|
|
196
|
+
} else {
|
|
197
|
+
_this.vueSelf.setCallerStatus('离线')
|
|
198
|
+
}
|
|
187
199
|
}
|
|
188
200
|
|
|
189
201
|
// 会议挂断callback
|
|
190
202
|
this.onHangup = function() {
|
|
191
|
-
|
|
203
|
+
console.log('会议挂断callback');
|
|
192
204
|
}
|
|
193
205
|
|
|
194
206
|
this.reconnect = function() {
|
|
@@ -210,7 +222,8 @@ function UniRTCObject(appId, tokenProvider) {
|
|
|
210
222
|
|
|
211
223
|
function _connect() {
|
|
212
224
|
// 创建链接
|
|
213
|
-
_socket = io.connect('https://video.jsehealth.com:9999');
|
|
225
|
+
// _socket = io.connect('https://video.jsehealth.com:9999'); // 生产环境
|
|
226
|
+
_socket = io.connect('https://t.jsehealth.com:9997'); // 测试环境
|
|
214
227
|
// _socket = io.connect('http://127.0.0.1:9090');
|
|
215
228
|
// _socket = io.connect("https://dli.xikang.com:9999");
|
|
216
229
|
|
|
@@ -218,7 +231,7 @@ function UniRTCObject(appId, tokenProvider) {
|
|
|
218
231
|
_socket.on('connect', function() {
|
|
219
232
|
_onDeviceConnected();
|
|
220
233
|
_socket.on('registerReturn', _onDeviceRegistered);
|
|
221
|
-
_socket.on('deviceLoginReturn', _onDeviceLogined);
|
|
234
|
+
_socket.on('deviceLoginReturn', _onDeviceLogined);
|
|
222
235
|
_socket.on('videoCallNotification', _onCallComing);
|
|
223
236
|
_socket.on('videoCallReturn', _onCallReplied);
|
|
224
237
|
_socket.on('videoInfoNotification', _onCallReady);
|
|
@@ -303,7 +316,25 @@ function UniRTCObject(appId, tokenProvider) {
|
|
|
303
316
|
// alert('设备登录失败\n' + msg);
|
|
304
317
|
}
|
|
305
318
|
}
|
|
306
|
-
|
|
319
|
+
// 对方拒绝接听回调
|
|
320
|
+
function customerRefuse(vuePage) {
|
|
321
|
+
let curScrollParam = vuePage.getRefuseParam();
|
|
322
|
+
const videoData = vuePage.videoData;
|
|
323
|
+
const params = {
|
|
324
|
+
assemblyId: curScrollParam.assemblyId,
|
|
325
|
+
orgId: curScrollParam.orgId,
|
|
326
|
+
userId: curScrollParam.userId,
|
|
327
|
+
sessionId: videoData.sessionId,
|
|
328
|
+
recordId: videoData.recordId,
|
|
329
|
+
inviteResult: 0,
|
|
330
|
+
isExpire: ''
|
|
331
|
+
};
|
|
332
|
+
fetch.post('/chat/access/videoInviteEnter', qs.stringify(params)).then(({ data }) => {
|
|
333
|
+
if (data.result === 'SUCCESS') {
|
|
334
|
+
vuePage.$message.info('对方拒绝接听');
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}
|
|
307
338
|
// 呼出反馈handler
|
|
308
339
|
function _onCallReplied(msg) {
|
|
309
340
|
console.log('对方反馈[' + msg + ']');
|
|
@@ -330,6 +361,13 @@ function UniRTCObject(appId, tokenProvider) {
|
|
|
330
361
|
} else if (data.code.substring(0, 1) == '1') {
|
|
331
362
|
console.error(msg);
|
|
332
363
|
// alert(data.msg);
|
|
364
|
+
} else if (data.code === '3001') {
|
|
365
|
+
console.log('错误号:'+data.code+'====>错误编码:'+data.msg);
|
|
366
|
+
customerRefuse(_this.vueSelf);
|
|
367
|
+
target = data.deviceToken;
|
|
368
|
+
outing = _outing.get(target);
|
|
369
|
+
_this.stopCall(outing);
|
|
370
|
+
_this.onCallRefused(outing);
|
|
333
371
|
} else {
|
|
334
372
|
console.log('错误号:'+data.code+'====>错误编码:'+data.msg);
|
|
335
373
|
target = data.deviceToken;
|