@aochuang/client-sdk 1.0.356 → 1.0.359

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 (159) hide show
  1. package/components/index.js +1 -6
  2. package/components/session-select/session-select-item.vue +9 -8
  3. package/components/wechat-chat-control/image/image.vue +8 -13
  4. package/components/wechat-chat-control/url/url-miniprogram.vue +5 -1
  5. package/components/wework-chat-control/channel-live/channel-live.vue +2 -7
  6. package/components/wework-chat-control/company-card/company-card.vue +1 -1
  7. package/components/wework-chat-control/custom-expression/custom-expression.vue +1 -2
  8. package/components/wework-chat-control/file-url/file-url.vue +16 -34
  9. package/components/wework-chat-control/image/image.vue +2 -137
  10. package/components/wework-chat-control/index.js +7 -10
  11. package/components/wework-chat-control/location/location.vue +3 -3
  12. package/components/wework-chat-control/text/text.vue +144 -24
  13. package/components/wework-chat-control/url/url-miniprogram.vue +7 -6
  14. package/components/wework-chat-control/url/url.vue +2 -26
  15. package/components/wework-chat-control/util.js +19 -22
  16. package/components/wework-chat-control/video/video.vue +2 -10
  17. package/components/wework-chat-control/voice/voice.vue +1 -1
  18. package/components/wework-chat-panel/chat-panel-controls/company-card/company-card.vue +35 -0
  19. package/components/wework-chat-panel/chat-panel-controls/expression/expression.vue +36 -0
  20. package/components/wework-chat-panel/chat-panel-controls/file-url/file-url.vue +35 -0
  21. package/components/wework-chat-panel/chat-panel-controls/image/image.vue +36 -0
  22. package/components/wework-chat-panel/chat-panel-controls/index.js +35 -0
  23. package/components/wework-chat-panel/chat-panel-controls/jx-sys-text/jx-sys-text.vue +28 -0
  24. package/components/wework-chat-panel/chat-panel-controls/link/link.vue +35 -0
  25. package/components/wework-chat-panel/chat-panel-controls/location/location.vue +35 -0
  26. package/components/wework-chat-panel/chat-panel-controls/text/text.vue +43 -0
  27. package/components/wework-chat-panel/chat-panel-controls/unkonw/unkonw.vue +39 -0
  28. package/components/wework-chat-panel/chat-panel-controls/video/video.vue +37 -0
  29. package/components/wework-chat-panel/chat-panel-controls/voice/voice.vue +35 -0
  30. package/components/wework-chat-panel/chat-panel-item.vue +28 -38
  31. package/components/wework-chat-panel/chat-panel.vue +13 -96
  32. package/package.json +3 -10
  33. package/services/client-chat/client-chat-wechat/client-chat-session.js +196 -92
  34. package/services/client-chat/client-chat-wechat/client-chat.js +20 -33
  35. package/services/client-chat/client-chat-wework/client-chat-concats.js +17 -81
  36. package/services/client-chat/client-chat-wework/client-chat-message.js +5 -45
  37. package/services/client-chat/client-chat-wework/client-chat-session.js +2 -50
  38. package/services/client-chat/client-chat-wework/client-chat-socket.js +1 -9
  39. package/services/client-chat/client-chat-wework/client-chat.js +11 -281
  40. package/services/client-chat/client-chat-wework/utils.js +5 -5
  41. package/uni-common/account-portray/account-portray.vue +51 -0
  42. package/uni-common/account-select/account-select-item.vue +172 -0
  43. package/uni-common/account-select/account-select.vue +252 -0
  44. package/uni-common/all-friend-avatar/all-friend-avatar.vue +49 -0
  45. package/uni-common/friend-avatar/default.svg +1 -0
  46. package/uni-common/friend-avatar/friend-avatar.vue +27 -0
  47. package/uni-common/friend-avatar/index.js +3 -0
  48. package/uni-common/friend-loader/friend-loader.vue +53 -0
  49. package/uni-common/friend-portray/friend-portray.vue +56 -0
  50. package/uni-common/group-avatar/default.svg +1 -0
  51. package/uni-common/group-avatar/group-avatar.vue +18 -0
  52. package/uni-common/group-avatar/index.js +3 -0
  53. package/uni-common/room-avatar/default.svg +6 -0
  54. package/uni-common/room-avatar/index.js +3 -0
  55. package/uni-common/room-avatar/room-avatar.vue +27 -0
  56. package/uni-common/room-loader/room-loader.vue +53 -0
  57. package/uni-common/room-portray/room-portray.vue +56 -0
  58. package/uni-components/chat-control/calling/calling.vue +91 -0
  59. package/uni-components/chat-control/calling/phone-fill.svg +1 -0
  60. package/uni-components/chat-control/calling/vidicon-fill.svg +1 -0
  61. package/uni-components/chat-control/channel-video/channel-video.vue +89 -0
  62. package/uni-components/chat-control/channel-video-card/channel-video-card.vue +105 -0
  63. package/uni-components/chat-control/channel-video-live/channel-video-live.vue +92 -0
  64. package/uni-components/chat-control/chat-control-config-item/chat-control-config-item.vue +20 -0
  65. package/uni-components/chat-control/chat-control-config-item/index.js +3 -0
  66. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-app.vue +25 -0
  67. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-h5.vue +21 -0
  68. package/{components/wework-chat-control/wework-chat-control-config.vue → uni-components/chat-control/chat-control-config.vue} +13 -16
  69. package/uni-components/chat-control/chat-control.vue +218 -0
  70. package/uni-components/chat-control/company-card/company-card.vue +123 -0
  71. package/uni-components/chat-control/const.js +28 -0
  72. package/uni-components/chat-control/expression/expression.vue +41 -0
  73. package/uni-components/chat-control/image/image.vue +68 -0
  74. package/uni-components/chat-control/index.js +89 -0
  75. package/uni-components/chat-control/location/location.vue +110 -0
  76. package/uni-components/chat-control/member-change/member-change.vue +32 -0
  77. package/uni-components/chat-control/quote-message/quote-message.vue +216 -0
  78. package/uni-components/chat-control/real-time-position/real-time-position.vue +62 -0
  79. package/uni-components/chat-control/redpacket/red-envelope.svg +1 -0
  80. package/uni-components/chat-control/redpacket/redpacket.vue +75 -0
  81. package/uni-components/chat-control/share-card/share-card.vue +101 -0
  82. package/uni-components/chat-control/system/system.vue +69 -0
  83. package/uni-components/chat-control/system-batch-message/system-batch-message.vue +30 -0
  84. package/uni-components/chat-control/system-text/system-text.vue +32 -0
  85. package/uni-components/chat-control/text/text.vue +67 -0
  86. package/uni-components/chat-control/text-with-at/text-with-at.vue +51 -0
  87. package/uni-components/chat-control/transfer/red-transfer.svg +1 -0
  88. package/uni-components/chat-control/transfer/transfer.vue +80 -0
  89. package/uni-components/chat-control/unkonw/unkonw.vue +37 -0
  90. package/uni-components/chat-control/url/icons/file-excel-line.svg +1 -0
  91. package/uni-components/chat-control/url/icons/file-info-line.svg +1 -0
  92. package/uni-components/chat-control/url/icons/file-music-line.svg +1 -0
  93. package/uni-components/chat-control/url/icons/file-pdf-line.svg +1 -0
  94. package/uni-components/chat-control/url/icons/file-ppt-line.svg +1 -0
  95. package/uni-components/chat-control/url/icons/file-settings-line.svg +1 -0
  96. package/uni-components/chat-control/url/icons/file-text-line.svg +1 -0
  97. package/uni-components/chat-control/url/icons/file-unknow-line.svg +1 -0
  98. package/uni-components/chat-control/url/icons/file-word-line.svg +1 -0
  99. package/uni-components/chat-control/url/icons/file-zip-line.svg +1 -0
  100. package/uni-components/chat-control/url/icons/index.js +24 -0
  101. package/uni-components/chat-control/url/miniprogram.svg +1 -0
  102. package/uni-components/chat-control/url/url-miniprogram.vue +116 -0
  103. package/uni-components/chat-control/url/url.vue +306 -0
  104. package/uni-components/chat-control/url-new/icons/file-excel-line.svg +1 -0
  105. package/uni-components/chat-control/url-new/icons/file-info-line.svg +1 -0
  106. package/uni-components/chat-control/url-new/icons/file-music-line.svg +1 -0
  107. package/uni-components/chat-control/url-new/icons/file-pdf-line.svg +1 -0
  108. package/uni-components/chat-control/url-new/icons/file-ppt-line.svg +1 -0
  109. package/uni-components/chat-control/url-new/icons/file-settings-line.svg +1 -0
  110. package/uni-components/chat-control/url-new/icons/file-text-line.svg +1 -0
  111. package/uni-components/chat-control/url-new/icons/file-unknow-line.svg +1 -0
  112. package/uni-components/chat-control/url-new/icons/file-word-line.svg +1 -0
  113. package/uni-components/chat-control/url-new/icons/file-zip-line.svg +1 -0
  114. package/uni-components/chat-control/url-new/icons/index.js +24 -0
  115. package/uni-components/chat-control/url-new/url-new.vue +110 -0
  116. package/uni-components/chat-control/utils.js +12 -0
  117. package/uni-components/chat-control/video/video.vue +156 -0
  118. package/uni-components/chat-control/voice/voice.vue +166 -0
  119. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-collect.vue +84 -0
  120. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-system.vue +28 -0
  121. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet.vue +85 -0
  122. package/uni-components/chat-editor/chat-editor-func/chat-editor-func.vue +157 -0
  123. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at-panel.vue +158 -0
  124. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at.vue +61 -0
  125. package/uni-components/chat-editor/chat-editor-func-button/chat-editor-func-button.vue +58 -0
  126. package/uni-components/chat-editor/chat-editor-func-file/chat-editor-func-file.vue +54 -0
  127. package/uni-components/chat-editor/chat-editor-func-image/chat-editor-func-image.vue +42 -0
  128. package/uni-components/chat-editor/chat-editor-func-video/chat-editor-func-video.vue +42 -0
  129. package/uni-components/chat-editor/chat-editor-func-voice/chat-editor-func-voice.vue +25 -0
  130. package/uni-components/chat-editor/chat-editor-message-send/chat-editor-message-send.vue +158 -0
  131. package/uni-components/chat-editor/chat-editor-quote/chat-editor-quote.vue +75 -0
  132. package/uni-components/chat-editor/chat-editor.vue +257 -0
  133. package/uni-components/chat-editor/index.js +10 -0
  134. package/uni-components/chat-editor/util.js +65 -0
  135. package/uni-components/chat-panel/chat-panel-chats-box.vue +238 -0
  136. package/uni-components/chat-panel/chat-panel-chats-forward/chat-panel-chats-forward.vue +273 -0
  137. package/uni-components/chat-panel/chat-panel-chats-item.vue +578 -0
  138. package/uni-components/chat-panel/chat-panel-chats-status/chat-panel-chats-status.vue +71 -0
  139. package/uni-components/chat-panel/chat-panel-chats.vue +368 -0
  140. package/uni-components/chat-panel/chat-panel.vue +227 -0
  141. package/uni-components/contacts-group-select/contacts-group-select-item.vue +85 -0
  142. package/uni-components/contacts-group-select/contacts-group-select-panel.vue +119 -0
  143. package/uni-components/contacts-group-select/contacts-group-select.vue +150 -0
  144. package/components/wechat-chat-control/.DS_Store +0 -0
  145. package/components/wechat-chat-control/transfer/.DS_Store +0 -0
  146. package/components/wechat-chat-control/url/.DS_Store +0 -0
  147. package/components/wechat-chat-control/voice/.DS_Store +0 -0
  148. package/components/wework-chat-control/channel-card/channel-card.vue +0 -144
  149. package/components/wework-chat-control/link/.DS_Store +0 -0
  150. package/components/wework-chat-control/metting/enterprise-wechat.png +0 -0
  151. package/components/wework-chat-control/metting/meeting-video.svg +0 -4
  152. package/components/wework-chat-control/metting/metting.vue +0 -181
  153. package/components/wework-chat-control/text/text-default.vue +0 -99
  154. package/components/wework-chat-control/text/text-quote.vue +0 -105
  155. package/components/wework-chat-control/url/url-channel-live.vue +0 -53
  156. package/components/wework-chat-control/video/.DS_Store +0 -0
  157. package/components/wework-chat-control/wework-chat-control-config-item.vue +0 -24
  158. package/components/wework-chat-control/wework-chat-control-config-msg.vue +0 -25
  159. package/components/wework-chat-panel/chat-panel-chat-status/chat-panel-chat-status.vue +0 -73
@@ -0,0 +1,578 @@
1
+ <template>
2
+ <chat-control-config-msg
3
+ :msgData="data"
4
+ >
5
+ <template slot-scope="{ configData }">
6
+ <view class="bi-chat-panel-chats-item">
7
+ <template v-if="data.msgType !== '_EMPTY_'">
8
+ <slot name="chat-prefix" :data="data"></slot>
9
+ </template>
10
+ <template v-if="'_EMPTY_' === data.msgType">
11
+ <view class="bi-chat-panel-chats-item__empty">{{ data.content }}</view>
12
+ </template>
13
+ <template v-else-if="MESSAGE_TYPE.TEXT === data.msgType">
14
+ <chat-panel-chats-box
15
+ :type="type"
16
+ :data="data"
17
+ :fetch-user-method="fetchUserMethod"
18
+ @more-action-click="handleMoreActionClick"
19
+ >
20
+ <chat-control-text
21
+ v-bind="configData"
22
+ :type="type"
23
+ :dir="dir"
24
+ :data="msgContent"
25
+ ></chat-control-text>
26
+ <template slot="append">
27
+ <slot name="chat-append" :data="data"></slot>
28
+ </template>
29
+ </chat-panel-chats-box>
30
+ </template>
31
+ <template v-else-if="MESSAGE_TYPE.IMAGE === data.msgType">
32
+ <chat-panel-chats-box
33
+ :type="type"
34
+ :data="data"
35
+ :fetch-user-method="fetchUserMethod"
36
+ @more-action-click="handleMoreActionClick"
37
+ >
38
+ <chat-control-image
39
+ v-bind="configData"
40
+ :type="type"
41
+ :dir="dir"
42
+ :data="msgContent"
43
+ ></chat-control-image>
44
+ <template slot="append">
45
+ <slot name="chat-append" :data="data"></slot>
46
+ </template>
47
+ </chat-panel-chats-box>
48
+ </template>
49
+ <template v-else-if="MESSAGE_TYPE.URLNew === data.msgType">
50
+ <chat-panel-chats-box
51
+ :type="type"
52
+ :data="data"
53
+ :fetch-user-method="fetchUserMethod"
54
+ @more-action-click="handleMoreActionClick"
55
+ >
56
+ <chat-control-url-new
57
+ v-bind="configData"
58
+ :type="type"
59
+ :dir="dir"
60
+ :data="msgContent"
61
+ ></chat-control-url-new>
62
+ <template slot="append">
63
+ <slot name="chat-append" :data="data"></slot>
64
+ </template>
65
+ </chat-panel-chats-box>
66
+ </template>
67
+ <template v-else-if="MESSAGE_TYPE.READ_ENVELOPES === data.msgType">
68
+ <chat-panel-chats-box
69
+ :type="type"
70
+ :data="data"
71
+ :fetch-user-method="fetchUserMethod"
72
+ @more-action-click="handleMoreActionClick"
73
+ >
74
+ <chat-control-redpacket
75
+ v-bind="configData"
76
+ :type="type"
77
+ :dir="dir"
78
+ :data="msgContent"
79
+ ></chat-control-redpacket>
80
+ <template slot="append">
81
+ <slot name="chat-append" :data="data"></slot>
82
+ </template>
83
+ </chat-panel-chats-box>
84
+ </template>
85
+ <template v-else-if="MESSAGE_TYPE.ACCOUNT_TRANSFER === data.msgType">
86
+ <chat-panel-chats-box
87
+ :type="type"
88
+ :data="data"
89
+ :fetch-user-method="fetchUserMethod"
90
+ @more-action-click="handleMoreActionClick"
91
+ >
92
+ <chat-control-transfer
93
+ v-bind="configData"
94
+ :type="type"
95
+ :dir="dir"
96
+ :data="msgContent"
97
+ ></chat-control-transfer>
98
+ <template slot="append">
99
+ <slot name="chat-append" :data="data"></slot>
100
+ </template>
101
+ </chat-panel-chats-box>
102
+ </template>
103
+ <template v-else-if="MESSAGE_TYPE.URL === data.msgType">
104
+ <chat-panel-chats-box
105
+ :type="type"
106
+ :data="data"
107
+ :fetch-user-method="fetchUserMethod"
108
+ @more-action-click="handleMoreActionClick"
109
+ >
110
+ <chat-control-url
111
+ v-bind="configData"
112
+ :type="type"
113
+ :dir="dir"
114
+ :data="msgContent"
115
+ ></chat-control-url>
116
+ <template slot="append">
117
+ <slot name="chat-append" :data="data"></slot>
118
+ </template>
119
+ </chat-panel-chats-box>
120
+ </template>
121
+ <template v-else-if="MESSAGE_TYPE.CUSTOM_EXPRESSION === data.msgType">
122
+ <chat-panel-chats-box
123
+ :type="type"
124
+ :data="data"
125
+ :fetch-user-method="fetchUserMethod"
126
+ @more-action-click="handleMoreActionClick"
127
+ >
128
+ <chat-control-expression
129
+ v-bind="configData"
130
+ :type="type"
131
+ :dir="dir"
132
+ :data="msgContent"
133
+ ></chat-control-expression>
134
+ <template slot="append">
135
+ <slot name="chat-append" :data="data"></slot>
136
+ </template>
137
+ </chat-panel-chats-box>
138
+ </template>
139
+ <template v-else-if="MESSAGE_TYPE.CHANNEL_VIDEO_LIVE === data.msgType">
140
+ <chat-panel-chats-box
141
+ :type="type"
142
+ :data="data"
143
+ :fetch-user-method="fetchUserMethod"
144
+ @more-action-click="handleMoreActionClick"
145
+ >
146
+ <chat-control-channel-video-live
147
+ v-bind="configData"
148
+ :type="type"
149
+ :dir="dir"
150
+ :data="msgContent"
151
+ ></chat-control-channel-video-live>
152
+ <template slot="append">
153
+ <slot name="chat-append" :data="data"></slot>
154
+ </template>
155
+ </chat-panel-chats-box>
156
+ </template>
157
+ <template v-else-if="MESSAGE_TYPE.CHANNEL_VIDEO_CARD === data.msgType">
158
+ <chat-panel-chats-box
159
+ :type="type"
160
+ :data="data"
161
+ :fetch-user-method="fetchUserMethod"
162
+ @more-action-click="handleMoreActionClick"
163
+ >
164
+ <chat-control-channel-video-card
165
+ v-bind="configData"
166
+ :type="type"
167
+ :dir="dir"
168
+ :data="msgContent"
169
+ ></chat-control-channel-video-card>
170
+ <template slot="append">
171
+ <slot name="chat-append" :data="data"></slot>
172
+ </template>
173
+ </chat-panel-chats-box>
174
+ </template>
175
+ <template v-else-if="MESSAGE_TYPE.CHANNEL_VIDEO === data.msgType">
176
+ <chat-panel-chats-box
177
+ :type="type"
178
+ :data="data"
179
+ :fetch-user-method="fetchUserMethod"
180
+ @more-action-click="handleMoreActionClick"
181
+ >
182
+ <chat-control-channel-video
183
+ v-bind="configData"
184
+ :type="type"
185
+ :dir="dir"
186
+ :data="msgContent"
187
+ ></chat-control-channel-video>
188
+ <template slot="append">
189
+ <slot name="chat-append" :data="data"></slot>
190
+ </template>
191
+ </chat-panel-chats-box>
192
+ </template>
193
+ <template v-else-if="MESSAGE_TYPE.VIDEO === data.msgType">
194
+ <chat-panel-chats-box
195
+ :type="type"
196
+ :data="data"
197
+ :fetch-user-method="fetchUserMethod"
198
+ @more-action-click="handleMoreActionClick"
199
+ >
200
+ <chat-control-video
201
+ v-bind="configData"
202
+ :type="type"
203
+ :dir="dir"
204
+ :data="msgContent"
205
+ :download-method="handleDownloadVideoMethod"
206
+ ></chat-control-video>
207
+ <template slot="append">
208
+ <slot name="chat-append" :data="data"></slot>
209
+ </template>
210
+ </chat-panel-chats-box>
211
+ </template>
212
+ <template v-else-if="MESSAGE_TYPE.SHARE_CARD === data.msgType">
213
+ <chat-panel-chats-box
214
+ :type="type"
215
+ :data="data"
216
+ :fetch-user-method="fetchUserMethod"
217
+ @more-action-click="handleMoreActionClick"
218
+ >
219
+ <chat-control-share-card
220
+ v-bind="configData"
221
+ :type="type"
222
+ :dir="dir"
223
+ :data="msgContent"
224
+ ></chat-control-share-card>
225
+ <template slot="append">
226
+ <slot name="chat-append" :data="data"></slot>
227
+ </template>
228
+ </chat-panel-chats-box>
229
+ </template>
230
+ <template v-else-if="MESSAGE_TYPE.COMPANY_CARD === data.msgType">
231
+ <chat-panel-chats-box
232
+ :type="type"
233
+ :data="data"
234
+ :fetch-user-method="fetchUserMethod"
235
+ @more-action-click="handleMoreActionClick"
236
+ >
237
+ <chat-control-company-card
238
+ v-bind="configData"
239
+ :type="type"
240
+ :dir="dir"
241
+ :data="msgContent"
242
+ ></chat-control-company-card>
243
+ <template slot="append">
244
+ <slot name="chat-append" :data="data"></slot>
245
+ </template>
246
+ </chat-panel-chats-box>
247
+ </template>
248
+ <template v-else-if="MESSAGE_TYPE.LOCATION === data.msgType">
249
+ <chat-panel-chats-box
250
+ :type="type"
251
+ :data="data"
252
+ :fetch-user-method="fetchUserMethod"
253
+ @more-action-click="handleMoreActionClick"
254
+ >
255
+ <chat-control-location
256
+ v-bind="configData"
257
+ :type="type"
258
+ :dir="dir"
259
+ :data="msgContent"
260
+ ></chat-control-location>
261
+ <template slot="append">
262
+ <slot name="chat-append" :data="data"></slot>
263
+ </template>
264
+ </chat-panel-chats-box>
265
+ </template>
266
+ <template v-else-if="MESSAGE_TYPE.CALLING === data.msgType">
267
+ <chat-panel-chats-box
268
+ :type="type"
269
+ :data="data"
270
+ :fetch-user-method="fetchUserMethod"
271
+ @more-action-click="handleMoreActionClick"
272
+ >
273
+ <chat-control-calling
274
+ v-bind="configData"
275
+ :type="type"
276
+ :dir="dir"
277
+ :data="msgContent"
278
+ ></chat-control-calling>
279
+ <template slot="append">
280
+ <slot name="chat-append" :data="data"></slot>
281
+ </template>
282
+ </chat-panel-chats-box>
283
+ </template>
284
+ <template v-else-if="MESSAGE_TYPE.VOICE === data.msgType">
285
+ <chat-panel-chats-box
286
+ color="transparent"
287
+ :type="type"
288
+ :data="data"
289
+ :fetch-user-method="fetchUserMethod"
290
+ @more-action-click="handleMoreActionClick"
291
+ >
292
+ <chat-control-voice
293
+ v-bind="configData"
294
+ :type="type"
295
+ :dir="dir"
296
+ :data="msgContent"
297
+ :convert-status="convertStatus"
298
+ ></chat-control-voice>
299
+ <template slot="append">
300
+ <slot name="chat-append" :data="data"></slot>
301
+ </template>
302
+ </chat-panel-chats-box>
303
+ </template>
304
+ <template v-else-if="MESSAGE_TYPE.REAL_TIME_POSITION === data.msgType">
305
+ <chat-panel-chats-box
306
+ :type="type"
307
+ :data="data"
308
+ :fetch-user-method="fetchUserMethod"
309
+ @more-action-click="handleMoreActionClick"
310
+ >
311
+ <chat-control-real-time-position
312
+ v-bind="configData"
313
+ :type="type"
314
+ :dir="dir"
315
+ :data="msgContent"
316
+ :convert-status="convertStatus"
317
+ ></chat-control-real-time-position>
318
+ <template slot="append">
319
+ <slot name="chat-append" :data="data"></slot>
320
+ </template>
321
+ </chat-panel-chats-box>
322
+ </template>
323
+ <template v-else-if="MESSAGE_TYPE.TEXT_WITH_AT === data.msgType">
324
+ <chat-panel-chats-box
325
+ :type="type"
326
+ :data="data"
327
+ :fetch-user-method="fetchUserMethod"
328
+ @more-action-click="handleMoreActionClick"
329
+ >
330
+ <chat-control-text-with-at
331
+ v-bind="configData"
332
+ :type="type"
333
+ :dir="dir"
334
+ :data="msgContent"
335
+ ></chat-control-text-with-at>
336
+ <template slot="append">
337
+ <slot name="chat-append" :data="data"></slot>
338
+ </template>
339
+ </chat-panel-chats-box>
340
+ </template>
341
+ <template v-else-if="MESSAGE_TYPE.QUOTE_MESSAGE === data.msgType">
342
+ <chat-panel-chats-box
343
+ color="transparent"
344
+ :type="type"
345
+ :data="data"
346
+ :fetch-user-method="fetchUserMethod"
347
+ :show-more-action="showMoreAction"
348
+ @more-action-click="handleMoreActionClick"
349
+ >
350
+ <chat-control-quote-message
351
+ v-bind="configData"
352
+ :type="type"
353
+ :dir="dir"
354
+ :data="msgContent"
355
+ :quotable="quotable"
356
+ :wechat-account-id="data.wechatAccountId"
357
+ :wechat-friend-id="data.wechatFriendId"
358
+ :wechat-chatroom-id="data.wechatChatroomId"
359
+ @load="handleQuoteMessageLoad"
360
+ >
361
+ <template slot="sub-message" slot-scope="{ data }">
362
+ <bi-chat-control :msg-type="data.msgType" :content="data.content" :quotable="false"></bi-chat-control>
363
+ </template>
364
+ </chat-control-quote-message>
365
+ <template slot="append">
366
+ <slot name="chat-append" :data="data"></slot>
367
+ </template>
368
+ </chat-panel-chats-box>
369
+ </template>
370
+ <template v-else-if="MESSAGE_TYPE.MEMBER_CHANGE === data.msgType">
371
+ <chat-control-member-change
372
+ v-bind="configData"
373
+ :dir="dir"
374
+ :data="msgContent"
375
+ ></chat-control-member-change>
376
+ </template>
377
+ <template v-else-if="MESSAGE_TYPE.SYSTEM === data.msgType">
378
+ <chat-control-system
379
+ v-bind="configData"
380
+ :dir="dir"
381
+ :data="msgContent"
382
+ ></chat-control-system>
383
+ </template>
384
+ <template v-else-if="MESSAGE_TYPE.SYSTEM_BATCH_MESSAGE === data.msgType">
385
+ <chat-control-system-batch-message
386
+ v-bind="configData"
387
+ :dir="dir"
388
+ :data="msgContent"
389
+ ></chat-control-system-batch-message>
390
+ </template>
391
+ <template v-else-if="MESSAGE_TYPE.JX_SYS_TEXT === data.msgType">
392
+ <chat-control-system-text
393
+ v-bind="configData"
394
+ :dir="dir"
395
+ :data="msgContent"
396
+ ></chat-control-system-text>
397
+ </template>
398
+ <template v-else>
399
+ <chat-panel-chats-box
400
+ :data="data"
401
+ :fetch-user-method="fetchUserMethod"
402
+ @more-action-click="handleMoreActionClick"
403
+ >
404
+ <chat-control-unkonw
405
+ :data="msgContent"
406
+ :type="data.msgType"
407
+ ></chat-control-unkonw>
408
+ </chat-panel-chats-box>
409
+ </template>
410
+ </view>
411
+ </template>
412
+ </chat-control-config-msg>
413
+ </template>
414
+
415
+ <script>
416
+ import {
417
+ MESSAGE_TYPE
418
+ } from '../chat-control/index.js'
419
+ // #ifdef H5
420
+ import ChatControlConfigMsg from '../chat-control/chat-control-config-msg/chat-control-config-msg-h5.vue'
421
+ // #endif
422
+ // #ifdef APP
423
+ import ChatControlConfigMsg from '../chat-control/chat-control-config-msg/chat-control-config-msg-app.vue'
424
+ // #endif
425
+ import ChatControlText from '../chat-control/text/text.vue'
426
+ import ChatControlSystemText from '../chat-control/system-text/system-text.vue'
427
+ import ChatControlSystemBatchMessage from '../chat-control/system-batch-message/system-batch-message.vue'
428
+ import ChatControlUnkonw from '../chat-control/unkonw/unkonw.vue'
429
+ import ChatControlImage from '../chat-control/image/image.vue'
430
+ import ChatControlUrlNew from '../chat-control/url-new/url-new.vue'
431
+ import ChatControlRedpacket from '../chat-control/redpacket/redpacket.vue'
432
+ import ChatControlTransfer from '../chat-control/transfer/transfer.vue'
433
+ import ChatControlUrl from '../chat-control/url/url.vue'
434
+ import ChatControlExpression from '../chat-control/expression/expression.vue'
435
+ import ChatControlMemberChange from '../chat-control/member-change/member-change.vue'
436
+ import ChatControlVideo from '../chat-control/video/video.vue'
437
+ import ChatControlChannelVideoLive from '../chat-control/channel-video-live/channel-video-live.vue'
438
+ import ChatControlChannelVideoCard from '../chat-control/channel-video-card/channel-video-card.vue'
439
+ import ChatControlChannelVideo from '../chat-control/channel-video/channel-video.vue'
440
+ import ChatControlShareCard from '../chat-control/share-card/share-card.vue'
441
+ import ChatControlSystem from '../chat-control/system/system.vue'
442
+ import ChatControlCompanyCard from '../chat-control/company-card/company-card.vue'
443
+ import ChatControlLocation from '../chat-control/location/location.vue'
444
+ import ChatControlCalling from '../chat-control/calling/calling.vue'
445
+ import ChatControlVoice from '../chat-control/voice/voice.vue'
446
+ import ChatControlRealTimePosition from '../chat-control/real-time-position/real-time-position.vue'
447
+ import ChatControlTextWithAt from '../chat-control/text-with-at/text-with-at.vue'
448
+ import ChatControlQuoteMessage from '../chat-control/quote-message/quote-message.vue'
449
+ import ChatPanelChatsBox from './chat-panel-chats-box.vue'
450
+ import BiChatControl from '../chat-control/chat-control.vue'
451
+
452
+ export default {
453
+ name: 'BiChatPanelChatsItem',
454
+ components: {
455
+ BiChatControl,
456
+ ChatControlConfigMsg,
457
+ ChatPanelChatsBox,
458
+ ChatControlSystemText,
459
+ ChatControlUnkonw,
460
+ ChatControlText,
461
+ ChatControlImage,
462
+ ChatControlUrl,
463
+ ChatControlUrlNew,
464
+ ChatControlRedpacket,
465
+ ChatControlTransfer,
466
+ ChatControlExpression,
467
+ ChatControlMemberChange,
468
+ ChatControlVideo,
469
+ ChatControlChannelVideo,
470
+ ChatControlChannelVideoLive,
471
+ ChatControlChannelVideoCard,
472
+ ChatControlShareCard,
473
+ ChatControlSystem,
474
+ ChatControlSystemBatchMessage,
475
+ ChatControlLocation,
476
+ ChatControlCalling,
477
+ ChatControlVoice,
478
+ ChatControlTextWithAt,
479
+ ChatControlCompanyCard,
480
+ ChatControlRealTimePosition,
481
+ ChatControlQuoteMessage
482
+ },
483
+ props: {
484
+ type: {
485
+ type: String,
486
+ default: 'default',
487
+ validator (value) {
488
+ return ['default', 'simple'].includes(value)
489
+ }
490
+ },
491
+ quotable: {
492
+ type: Boolean,
493
+ default: false
494
+ },
495
+ data: {
496
+ type: Object,
497
+ required: true
498
+ },
499
+ /**
500
+ * {
501
+ * avatar: null,
502
+ * name: null
503
+ * }
504
+ */
505
+ fetchUserMethod: {
506
+ type: Function,
507
+ required: true
508
+ }
509
+ },
510
+ data () {
511
+ return {
512
+ MESSAGE_TYPE,
513
+ showMoreAction: !this.quotable, // 引用消息里面的消息要先不展示更多操作按钮
514
+ userData: null
515
+ }
516
+ },
517
+ computed: {
518
+ dir () {
519
+ return this.data.isSend ? 'right' : 'left'
520
+ },
521
+ msgContent () {
522
+ return this.data.content
523
+ },
524
+ convertStatus () {
525
+ const ConvertStatusEnum = {
526
+ NORMAL: -1, // 没有转换
527
+ ERROR: 2, // 转换失败
528
+ CONVERTING: 1, // 转换中
529
+ COMPLETE: 0 // 转换成功
530
+ }
531
+ if (!this.data.asrResult) {
532
+ return ConvertStatusEnum.NORMAL
533
+ }
534
+ if (this.data.asrResult.status === 0) {
535
+ return ConvertStatusEnum.NORMAL
536
+ }
537
+ if (this.data.asrResult.status === 1) {
538
+ return ConvertStatusEnum.CONVERTING
539
+ }
540
+ if (this.data.asrResult.status === 2) {
541
+ return ConvertStatusEnum.COMPLETE
542
+ }
543
+ if (this.data.asrResult.status === 3) {
544
+ return ConvertStatusEnum.ERROR
545
+ }
546
+ return ConvertStatusEnum.NORMAL
547
+ }
548
+ },
549
+ methods: {
550
+ handleQuoteMessageLoad () {
551
+ this.showMoreAction = true
552
+ },
553
+ handleDownloadVideoMethod ({ data }) {
554
+ return this.$clientChat.socket.sendDownloadVideo({
555
+ wechatAccountId: this.data.wechatAccountId,
556
+ friendMessageId: this.data.wechatFriendId ? this.data.id : null,
557
+ chatroomMessageId: !this.data.wechatFriendId ? this.data.id : null,
558
+ tencentUrl: data.tencentUrl,
559
+ wechatTime: this.data.wechatTime
560
+ })
561
+ },
562
+ handleMoreActionClick () {
563
+ this.$emit('more-action-click', {
564
+ data: this.data
565
+ })
566
+ }
567
+ }
568
+ }
569
+ </script>
570
+
571
+ <style lang="less">
572
+ .bi-chat-panel-chats-item__empty{
573
+ font-size: 12px;
574
+ color: #999;
575
+ text-align: center;
576
+ padding: 6px;
577
+ }
578
+ </style>
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <view class="sdk-wechat-panel-chats-status" v-if="[1, 2, 3].includes(data.sendStatus) || data.recalled">
3
+ <!-- sendStatus:0成功,1发送中,2失败,3超时 -->
4
+ <template v-if="data.sendStatus === 1">
5
+ <ui-loading size="mini"></ui-loading>
6
+ </template>
7
+ <template v-else-if="data.sendStatus === 2">
8
+ <view class="sdk-wechat-panel-chats-status__error" @click="handleSendErrorClick">
9
+ <ui-icon name="close-circle-fill"></ui-icon>
10
+ </view>
11
+ </template>
12
+ <template v-else-if="data.sendStatus === 3">
13
+ <view class="sdk-wechat-panel-chats-status__error" @click="handleSendTimeoutClick">
14
+ <ui-icon name="time-fill"></ui-icon>
15
+ </view>
16
+ </template>
17
+ <template v-if="data.recalled">
18
+ <view class="sdk-wechat-panel-chats-status__error" style="opacity: .6;" @click="handleSendRecalledClick">
19
+ <ui-icon name="reply-fill1"></ui-icon>
20
+ </view>
21
+ </template>
22
+ </view>
23
+ </template>
24
+ <script>
25
+ import UiIcon from '@aochuang/common/uni-components/icon/icon.vue'
26
+ import UiLoading from '@aochuang/common/uni-components/loading/loading.vue'
27
+ import { warning, error } from '@aochuang/common/uni-components/message/message.js'
28
+
29
+ export default {
30
+ name: 'SdkChatPanelChatsStatus',
31
+ components: {
32
+ UiIcon,
33
+ UiLoading
34
+ },
35
+ props: {
36
+ data: {
37
+ type: Object,
38
+ required: true
39
+ }
40
+ },
41
+ methods: {
42
+ handleSendErrorClick () {
43
+ error(this.data.resultMsg || '发送失败')
44
+ },
45
+ handleSendTimeoutClick () {
46
+ error(this.data.resultMsg || '发送超时')
47
+ },
48
+ handleSendRecalledClick () {
49
+ warning('消息已撤回')
50
+ }
51
+ }
52
+ }
53
+ </script>
54
+ <style lang="less">
55
+ .sdk-wechat-panel-chats-status__error{
56
+ display: flex;
57
+ flex-direction: row;
58
+ align-items: center;
59
+ font-size: 12px;
60
+ color: #c00;
61
+ width: 16px;
62
+ height: 16px;
63
+ svg {
64
+ width: 100%;
65
+ height: 100%;
66
+ }
67
+ }
68
+ .sdk-wechat-panel-chats-status{
69
+ margin: 0 6px;
70
+ }
71
+ </style>