askbot-dragon 1.4.2 → 1.4.3

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 (85) hide show
  1. package/README.md +27 -27
  2. package/babel.config.js +6 -6
  3. package/dragon.iml +7 -7
  4. package/package.json +58 -58
  5. package/public/index.html +59 -59
  6. package/src/App.vue +31 -31
  7. package/src/api/index.js +1 -1
  8. package/src/api/mock.http +2 -2
  9. package/src/api/requestUrl.js +185 -185
  10. package/src/assets/js/AliyunlssUtil.js +92 -92
  11. package/src/assets/js/Base64Util.js +22 -22
  12. package/src/assets/js/common.js +11 -11
  13. package/src/assets/js/hammer.js +71 -71
  14. package/src/assets/js/script.js +36 -36
  15. package/src/assets/less/common.css +6773 -6773
  16. package/src/assets/less/converSationContainer/common.less +191 -191
  17. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  18. package/src/assets/less/iconfont.css +37 -37
  19. package/src/assets/less/ticketMessage.less +211 -211
  20. package/src/components/ActionAlertIframe.vue +112 -112
  21. package/src/components/AiGuide.vue +467 -467
  22. package/src/components/AnswerDocknowledge.vue +446 -446
  23. package/src/components/AnswerVoice.vue +285 -280
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +4029 -4028
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/actionSatisfaction.vue +107 -107
  29. package/src/components/actionSendToBot.vue +62 -62
  30. package/src/components/answerDissatisfaction.vue +62 -62
  31. package/src/components/answerRadio.vue +108 -108
  32. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  33. package/src/components/ask-components/Msgloading.vue +37 -37
  34. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  35. package/src/components/askVideo.vue +138 -138
  36. package/src/components/assetDetails.vue +370 -370
  37. package/src/components/assetMessage.vue +228 -228
  38. package/src/components/associationIntention.vue +331 -331
  39. package/src/components/attachmentPreview.vue +90 -90
  40. package/src/components/botActionSatisfactor.vue +68 -68
  41. package/src/components/chatContent.vue +513 -513
  42. package/src/components/feedBack.vue +136 -136
  43. package/src/components/fielListView.vue +349 -349
  44. package/src/components/file/AliyunOssComponents.vue +108 -108
  45. package/src/components/formTemplate.vue +3362 -3362
  46. package/src/components/loadingProcess.vue +164 -164
  47. package/src/components/message/ActionAlertIframe.vue +112 -112
  48. package/src/components/message/ShopMessage.vue +164 -164
  49. package/src/components/message/TextMessage.vue +924 -924
  50. package/src/components/message/TicketMessage.vue +177 -177
  51. package/src/components/message/swiper/index.js +4 -4
  52. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  53. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  54. package/src/components/msgLoading.vue +231 -231
  55. package/src/components/myPopup.vue +70 -70
  56. package/src/components/pdfPosition.vue +829 -829
  57. package/src/components/popup.vue +227 -227
  58. package/src/components/previewDoc.vue +228 -228
  59. package/src/components/previewPdf.vue +257 -257
  60. package/src/components/receiverMessagePlatform.vue +65 -65
  61. package/src/components/recommend.vue +89 -89
  62. package/src/components/selector/hOption.vue +20 -20
  63. package/src/components/selector/hSelector.vue +199 -199
  64. package/src/components/selector/hWrapper.vue +216 -216
  65. package/src/components/senderMessagePlatform.vue +50 -50
  66. package/src/components/source/BotMessage.vue +24 -24
  67. package/src/components/source/CustomMessage.vue +24 -24
  68. package/src/components/test.vue +260 -260
  69. package/src/components/tree.vue +294 -294
  70. package/src/components/utils/AliyunIssUtil.js +72 -72
  71. package/src/components/utils/ckeditor.js +155 -155
  72. package/src/components/utils/ckeditorImageUpload/command.js +109 -109
  73. package/src/components/utils/ckeditorImageUpload/editing.js +11 -11
  74. package/src/components/utils/ckeditorImageUpload/plugin-image.js +11 -11
  75. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +40 -40
  76. package/src/components/utils/ckeditorfileUpload/common.js +133 -133
  77. package/src/components/utils/ckeditorfileUpload/editing.js +11 -11
  78. package/src/components/utils/ckeditorfileUpload/plugin_file.js +11 -11
  79. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +34 -34
  80. package/src/components/utils/format_date.js +25 -25
  81. package/src/components/utils/index.js +6 -6
  82. package/src/components/utils/math_utils.js +29 -29
  83. package/src/components/voiceComponent.vue +119 -119
  84. package/src/main.js +60 -60
  85. package/vue.config.js +55 -55
@@ -1,258 +1,258 @@
1
- <template>
2
- <!-- <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}" v-if="previewShowPopup">
3
- <div class="footer">
4
- <span>查看详情</span>
5
- <section @click="close">
6
- <i class="iconfont guoran-shanchu"></i>
7
- </section>
8
- </div>
9
- <template v-if="tagIds && tagIds.length != 0 && previewShowPopup">
10
- <pdfPosition :tagIds="tagIds" ></pdfPosition>
11
- </template>
12
- <template v-else>
13
- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 60px)">
14
- <video :src="url" controls width="100%;" height="98%"></video>
15
- </div>
16
- <div v-else-if="fileType == 'HTML'" style="width: 100%;height: calc(100% - 60px)">
17
- <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
18
- </div>
19
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
20
- <iframe class="preview_iframe"
21
- :src="url"
22
- width="100%"
23
- height="100%"
24
- scrolling="100%"
25
- frameborder="no"
26
- border="0"></iframe>
27
- </template>
28
- <template v-else>
29
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
30
- </template>
31
- </template>
32
- <div class="loading_img" v-show="loading">
33
- <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
34
- </div>
35
- </van-popup> -->
36
- <el-drawer
37
- title="我是标题"
38
- :visible.sync="drawer"
39
- :with-header="false"
40
- :append-to-body="true"
41
- :destroy-on-close="true"
42
- :direction="previewShowPopup ? 'btt' : 'rtl'"
43
- :size="previewShowPopup ? '90%' : '65%'"
44
- custom-class="pdf-preview-drawer"
45
- >
46
- <!-- v-else-if="drawer" -->
47
- <div class="drawer-footer">
48
- <span>查看详情</span>
49
- <section @click="close">
50
- <i class="iconfont guoran-shanchu"></i>
51
- </section>
52
- </div>
53
- <template v-if="tagIds && tagIds.length != 0 && drawer">
54
- <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord"></pdfPosition>
55
- </template>
56
- <template v-else>
57
- <div v-if="fileType == 'VIDEO'" style="width: 100%;height:calc(100% - 60px)">
58
- <video :src="url" controls width="100%;" height="98%"></video>
59
- </div>
60
- <div v-else-if="fileType == 'HTML'" style="width: 100%;height:calc(100% - 60px)">
61
- <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
62
- </div>
63
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
64
- <iframe class="preview_iframe"
65
- :src="url"
66
- width="100%"
67
- height="100%"
68
- scrolling="100%"
69
- frameborder="no"
70
- border="0"></iframe>
71
- </template>
72
- <template v-else>
73
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
74
- </template>
75
- </template>
76
- <div class="loading_img" v-show="loading">
77
- <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
78
- </div>
79
- </el-drawer>
80
- </template>
81
-
82
- <script>
83
- import pdfPosition from './pdfPosition.vue'
84
- export default {
85
- data () {
86
- return {
87
- previewShowPopup: false,
88
- fileText:'',
89
- fileType:"",
90
- isPc:true,
91
- drawer:false,
92
- tagIds: [],
93
- // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
94
- loading:true,
95
- }
96
- },
97
- mounted() {
98
-
99
- },
100
- props:{
101
- url:{
102
- type: String,
103
- required: true,
104
- },
105
- officePreviewType:{
106
- type: String,
107
- default: ''
108
- },
109
- isMessageRecord:{
110
- type: Boolean,
111
- default:false,
112
- }
113
- },
114
- components:{
115
- pdfPosition
116
- },
117
- computed:{
118
- previewUrl() {
119
- console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
120
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
121
- // if(this.url != '') {
122
- // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
123
- // url += btoa(encodeURIComponent(this.url))
124
- // } else {
125
- // url += btoa(this.url)
126
- // }
127
- // }
128
- url = url + this.url
129
- // if(this.officePreviewType !== '') {
130
- // url += '&officePreviewType=pdf'
131
- // }
132
- return url
133
- },
134
- // fileType() {
135
- // const fileType = this.url.substring(this.url.lastIndexOf('.'));
136
- // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
137
- // return 'VIDEO'
138
- // } else {
139
- // return 'OTHER'
140
- // }
141
-
142
- // }
143
- },
144
- methods :{
145
- close() {
146
- setTimeout(() =>{
147
- this.previewShowPopup = false;
148
- this.fileType = ''
149
- }, 300)
150
- this.drawer = false;
151
- },
152
- loadIframe() {
153
-
154
- if(this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
155
- this.loading = false
156
- } else {
157
- let time = setInterval(() =>{
158
- let iframe = document.getElementsByClassName('preview_iframe')[0]
159
- if(iframe) {
160
- this.loading = false
161
- clearInterval(time)
162
- }
163
- }, 500)
164
- }
165
- },
166
- getBolb() {
167
- this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false',{
168
- fileInOssPath: this.url,
169
- templateId: ''
170
- }).then(res =>{
171
- if (res.data.code == 0) {
172
- this.fileText = res.data.data
173
- this.loading = false
174
- }
175
- })
176
- },
177
- }
178
- }
179
- </script>
180
-
181
- <style lang="less" scoped>
182
- .preview_iframe {
183
- width: 100%;
184
- height: calc(100% - 60px);
185
- box-sizing: border-box;
186
- }
187
- .preview_iframe_html{
188
- width: 100%;
189
- height: 100%;
190
- overflow-y: scroll;
191
- text-align: left;
192
- box-sizing: border-box;
193
- padding: 16px;
194
- /deep/.lake-content{
195
- margin-left: 10px;
196
- }
197
- /deep/a:link {
198
- color: #0000ee!important;
199
- }
200
- /deep/a:visited {
201
- color: #0000ee!important;
202
- }
203
- /deep/a:hover {
204
- color: #0000ee!important;
205
- }
206
- /deep/a:active {
207
- color: #0000ee!important;
208
- }
209
- /deep/li:not(.rich-text-li), ol:not(.list-paddingleft-2), ul:not(.list-paddingleft-2){
210
- list-style-type: auto!important;
211
- }
212
- /deep/img{
213
- width: 100%;
214
- }
215
- /deep/.ne-table{
216
- width: 100% !important;
217
- }
218
- }
219
- .footer {
220
- width: calc(100% - 40px);
221
- height: 50px;
222
- display: flex;
223
- align-items: center;
224
- justify-content: space-between;
225
- cursor: pointer;
226
- padding: 0 20px;
227
- border-bottom: 1px solid #cccccc;
228
- }
229
- .loading_img {
230
- display: flex;
231
- align-items: center;
232
- justify-content: center;
233
- width: 100%;
234
- height: 100%;
235
- position: absolute;
236
- top: 0;
237
- left: 0;
238
- background: #FFF;
239
- img {
240
- width: 50px;
241
- height: 50px;
242
- }
243
- }
244
-
245
- .drawer-footer{
246
- width:100%;
247
- height: 50px;
248
- display: flex;
249
- align-items: center;
250
- justify-content: space-between;
251
- cursor: pointer;
252
- padding: 0 20px;
253
- border-bottom: 1px solid #cccccc;
254
- }
255
- /deep/.el-drawer__body{
256
- height: 100%;
257
- }
1
+ <template>
2
+ <!-- <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}" v-if="previewShowPopup">
3
+ <div class="footer">
4
+ <span>查看详情</span>
5
+ <section @click="close">
6
+ <i class="iconfont guoran-shanchu"></i>
7
+ </section>
8
+ </div>
9
+ <template v-if="tagIds && tagIds.length != 0 && previewShowPopup">
10
+ <pdfPosition :tagIds="tagIds" ></pdfPosition>
11
+ </template>
12
+ <template v-else>
13
+ <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 60px)">
14
+ <video :src="url" controls width="100%;" height="98%"></video>
15
+ </div>
16
+ <div v-else-if="fileType == 'HTML'" style="width: 100%;height: calc(100% - 60px)">
17
+ <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
18
+ </div>
19
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
20
+ <iframe class="preview_iframe"
21
+ :src="url"
22
+ width="100%"
23
+ height="100%"
24
+ scrolling="100%"
25
+ frameborder="no"
26
+ border="0"></iframe>
27
+ </template>
28
+ <template v-else>
29
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
30
+ </template>
31
+ </template>
32
+ <div class="loading_img" v-show="loading">
33
+ <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
34
+ </div>
35
+ </van-popup> -->
36
+ <el-drawer
37
+ title="我是标题"
38
+ :visible.sync="drawer"
39
+ :with-header="false"
40
+ :append-to-body="true"
41
+ :destroy-on-close="true"
42
+ :direction="previewShowPopup ? 'btt' : 'rtl'"
43
+ :size="previewShowPopup ? '90%' : '65%'"
44
+ custom-class="pdf-preview-drawer"
45
+ >
46
+ <!-- v-else-if="drawer" -->
47
+ <div class="drawer-footer">
48
+ <span>查看详情</span>
49
+ <section @click="close">
50
+ <i class="iconfont guoran-shanchu"></i>
51
+ </section>
52
+ </div>
53
+ <template v-if="tagIds && tagIds.length != 0 && drawer">
54
+ <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord"></pdfPosition>
55
+ </template>
56
+ <template v-else>
57
+ <div v-if="fileType == 'VIDEO'" style="width: 100%;height:calc(100% - 60px)">
58
+ <video :src="url" controls width="100%;" height="98%"></video>
59
+ </div>
60
+ <div v-else-if="fileType == 'HTML'" style="width: 100%;height:calc(100% - 60px)">
61
+ <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
62
+ </div>
63
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
64
+ <iframe class="preview_iframe"
65
+ :src="url"
66
+ width="100%"
67
+ height="100%"
68
+ scrolling="100%"
69
+ frameborder="no"
70
+ border="0"></iframe>
71
+ </template>
72
+ <template v-else>
73
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
74
+ </template>
75
+ </template>
76
+ <div class="loading_img" v-show="loading">
77
+ <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
78
+ </div>
79
+ </el-drawer>
80
+ </template>
81
+
82
+ <script>
83
+ import pdfPosition from './pdfPosition.vue'
84
+ export default {
85
+ data () {
86
+ return {
87
+ previewShowPopup: false,
88
+ fileText:'',
89
+ fileType:"",
90
+ isPc:true,
91
+ drawer:false,
92
+ tagIds: [],
93
+ // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
94
+ loading:true,
95
+ }
96
+ },
97
+ mounted() {
98
+
99
+ },
100
+ props:{
101
+ url:{
102
+ type: String,
103
+ required: true,
104
+ },
105
+ officePreviewType:{
106
+ type: String,
107
+ default: ''
108
+ },
109
+ isMessageRecord:{
110
+ type: Boolean,
111
+ default:false,
112
+ }
113
+ },
114
+ components:{
115
+ pdfPosition
116
+ },
117
+ computed:{
118
+ previewUrl() {
119
+ console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
120
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
121
+ // if(this.url != '') {
122
+ // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
123
+ // url += btoa(encodeURIComponent(this.url))
124
+ // } else {
125
+ // url += btoa(this.url)
126
+ // }
127
+ // }
128
+ url = url + this.url
129
+ // if(this.officePreviewType !== '') {
130
+ // url += '&officePreviewType=pdf'
131
+ // }
132
+ return url
133
+ },
134
+ // fileType() {
135
+ // const fileType = this.url.substring(this.url.lastIndexOf('.'));
136
+ // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
137
+ // return 'VIDEO'
138
+ // } else {
139
+ // return 'OTHER'
140
+ // }
141
+
142
+ // }
143
+ },
144
+ methods :{
145
+ close() {
146
+ setTimeout(() =>{
147
+ this.previewShowPopup = false;
148
+ this.fileType = ''
149
+ }, 300)
150
+ this.drawer = false;
151
+ },
152
+ loadIframe() {
153
+
154
+ if(this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
155
+ this.loading = false
156
+ } else {
157
+ let time = setInterval(() =>{
158
+ let iframe = document.getElementsByClassName('preview_iframe')[0]
159
+ if(iframe) {
160
+ this.loading = false
161
+ clearInterval(time)
162
+ }
163
+ }, 500)
164
+ }
165
+ },
166
+ getBolb() {
167
+ this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false',{
168
+ fileInOssPath: this.url,
169
+ templateId: ''
170
+ }).then(res =>{
171
+ if (res.data.code == 0) {
172
+ this.fileText = res.data.data
173
+ this.loading = false
174
+ }
175
+ })
176
+ },
177
+ }
178
+ }
179
+ </script>
180
+
181
+ <style lang="less" scoped>
182
+ .preview_iframe {
183
+ width: 100%;
184
+ height: calc(100% - 60px);
185
+ box-sizing: border-box;
186
+ }
187
+ .preview_iframe_html{
188
+ width: 100%;
189
+ height: 100%;
190
+ overflow-y: scroll;
191
+ text-align: left;
192
+ box-sizing: border-box;
193
+ padding: 16px;
194
+ /deep/.lake-content{
195
+ margin-left: 10px;
196
+ }
197
+ /deep/a:link {
198
+ color: #0000ee!important;
199
+ }
200
+ /deep/a:visited {
201
+ color: #0000ee!important;
202
+ }
203
+ /deep/a:hover {
204
+ color: #0000ee!important;
205
+ }
206
+ /deep/a:active {
207
+ color: #0000ee!important;
208
+ }
209
+ /deep/li:not(.rich-text-li), ol:not(.list-paddingleft-2), ul:not(.list-paddingleft-2){
210
+ list-style-type: auto!important;
211
+ }
212
+ /deep/img{
213
+ width: 100%;
214
+ }
215
+ /deep/.ne-table{
216
+ width: 100% !important;
217
+ }
218
+ }
219
+ .footer {
220
+ width: calc(100% - 40px);
221
+ height: 50px;
222
+ display: flex;
223
+ align-items: center;
224
+ justify-content: space-between;
225
+ cursor: pointer;
226
+ padding: 0 20px;
227
+ border-bottom: 1px solid #cccccc;
228
+ }
229
+ .loading_img {
230
+ display: flex;
231
+ align-items: center;
232
+ justify-content: center;
233
+ width: 100%;
234
+ height: 100%;
235
+ position: absolute;
236
+ top: 0;
237
+ left: 0;
238
+ background: #FFF;
239
+ img {
240
+ width: 50px;
241
+ height: 50px;
242
+ }
243
+ }
244
+
245
+ .drawer-footer{
246
+ width:100%;
247
+ height: 50px;
248
+ display: flex;
249
+ align-items: center;
250
+ justify-content: space-between;
251
+ cursor: pointer;
252
+ padding: 0 20px;
253
+ border-bottom: 1px solid #cccccc;
254
+ }
255
+ /deep/.el-drawer__body{
256
+ height: 100%;
257
+ }
258
258
  </style>
@@ -1,66 +1,66 @@
1
- <template>
2
- <div class="">
3
- <span v-if="messagePlateform == 'IM'">
4
-
5
- <span :class="payload.newSession.receiverId == userId ? '':'text_color'">
6
- {{payload.newSession.receiverId == userId ? '您': payload.newSession.receiverDisplayInfo.name}}
7
- </span>
8
- 建立对话
9
- </span>
10
- <span v-if="messagePlateform == 'BOT'">
11
- 与机器人【
12
- <span class="text_color">{{payload.newSession.receiverDisplayInfo.name}}</span>
13
- 】建立对话
14
- </span>
15
- <span v-if="messagePlateform == 'oldTransfer'">
16
- 您将会话转接给&nbsp;&nbsp;<span class="text_color">{{payload.newSession.receiverDisplayInfo.name}}</span>
17
- </span>
18
- <span v-if="messagePlateform == 'newTransfer'">
19
- <span class="text_color">{{payload.oldSession.receiverDisplayInfo.name}}</span>&nbsp;&nbsp;将会话转接给您
20
- </span>
21
- </div>
22
- </template>
23
-
24
- <script>
25
- // 客服 的接入消息展示
26
- export default {
27
- data() {
28
- return {
29
-
30
- }
31
- },
32
- props:['source','payload','userId'],
33
- computed: {
34
- messagePlateform() {
35
- if(this.payload) {
36
- if((this.payload.newSession.receiverMessagePlatform == 'CUSTOMER_SERVICE_SYSTEM' ||
37
- this.payload.newSession.receiverMessagePlatform == 'AIMER_SERVER') &&
38
- this.payload.oldSession.receiverMessagePlatform == 'GUORAN_BOT') {
39
- return 'IM'
40
- } else if((this.payload.oldSession.receiverMessagePlatform == 'CUSTOMER_SERVICE_SYSTEM' ||
41
- this.payload.oldSession.receiverMessagePlatform == 'AIMER_SERVER') &&
42
- this.payload.newSession.receiverMessagePlatform == 'GUORAN_BOT') {
43
- return 'BOT'
44
- } else if((this.payload.oldSession.receiverMessagePlatform == 'CUSTOMER_SERVICE_SYSTEM' ||
45
- this.payload.oldSession.receiverMessagePlatform == 'AIMER_SERVER') &&
46
- (this.payload.newSession.receiverMessagePlatform == 'CUSTOMER_SERVICE_SYSTEM' ||
47
- this.payload.newSession.receiverMessagePlatform == 'AIMER_SERVER')) {
48
- if(this.payload.oldSession.receiverId == this.userId) {
49
- return 'oldTransfer'
50
- }
51
- if(this.payload.newSession.receiverId == this.userId) {
52
- return 'newTransfer'
53
- }
54
-
55
- }
56
- }
57
- }
58
- }
59
- }
60
- </script>
61
-
62
- <style lang="less" scoped>
63
- .text_color {
64
- color: #366aff;
65
- }
1
+ <template>
2
+ <div class="">
3
+ <span v-if="messagePlateform == 'IM'">
4
+
5
+ <span :class="payload.newSession.receiverId == userId ? '':'text_color'">
6
+ {{payload.newSession.receiverId == userId ? '您': payload.newSession.receiverDisplayInfo.name}}
7
+ </span>
8
+ 建立对话
9
+ </span>
10
+ <span v-if="messagePlateform == 'BOT'">
11
+ 与机器人【
12
+ <span class="text_color">{{payload.newSession.receiverDisplayInfo.name}}</span>
13
+ 】建立对话
14
+ </span>
15
+ <span v-if="messagePlateform == 'oldTransfer'">
16
+ 您将会话转接给&nbsp;&nbsp;<span class="text_color">{{payload.newSession.receiverDisplayInfo.name}}</span>
17
+ </span>
18
+ <span v-if="messagePlateform == 'newTransfer'">
19
+ <span class="text_color">{{payload.oldSession.receiverDisplayInfo.name}}</span>&nbsp;&nbsp;将会话转接给您
20
+ </span>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ // 客服 的接入消息展示
26
+ export default {
27
+ data() {
28
+ return {
29
+
30
+ }
31
+ },
32
+ props:['source','payload','userId'],
33
+ computed: {
34
+ messagePlateform() {
35
+ if(this.payload) {
36
+ if((this.payload.newSession.receiverMessagePlatform == 'CUSTOMER_SERVICE_SYSTEM' ||
37
+ this.payload.newSession.receiverMessagePlatform == 'AIMER_SERVER') &&
38
+ this.payload.oldSession.receiverMessagePlatform == 'GUORAN_BOT') {
39
+ return 'IM'
40
+ } else if((this.payload.oldSession.receiverMessagePlatform == 'CUSTOMER_SERVICE_SYSTEM' ||
41
+ this.payload.oldSession.receiverMessagePlatform == 'AIMER_SERVER') &&
42
+ this.payload.newSession.receiverMessagePlatform == 'GUORAN_BOT') {
43
+ return 'BOT'
44
+ } else if((this.payload.oldSession.receiverMessagePlatform == 'CUSTOMER_SERVICE_SYSTEM' ||
45
+ this.payload.oldSession.receiverMessagePlatform == 'AIMER_SERVER') &&
46
+ (this.payload.newSession.receiverMessagePlatform == 'CUSTOMER_SERVICE_SYSTEM' ||
47
+ this.payload.newSession.receiverMessagePlatform == 'AIMER_SERVER')) {
48
+ if(this.payload.oldSession.receiverId == this.userId) {
49
+ return 'oldTransfer'
50
+ }
51
+ if(this.payload.newSession.receiverId == this.userId) {
52
+ return 'newTransfer'
53
+ }
54
+
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ </script>
61
+
62
+ <style lang="less" scoped>
63
+ .text_color {
64
+ color: #366aff;
65
+ }
66
66
  </style>