askbot-dragon 1.3.85 → 1.3.87

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 +428 -428
  23. package/src/components/AnswerVoice.vue +280 -280
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +4106 -4106
  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 +76 -76
  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 -3363
  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 +783 -783
  57. package/src/components/popup.vue +227 -227
  58. package/src/components/previewDoc.vue +228 -228
  59. package/src/components/previewPdf.vue +260 -260
  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 -111
  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,261 +1,261 @@
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
- >
45
- <!-- v-else-if="drawer" -->
46
- <div class="drawer-footer">
47
- <span>查看详情</span>
48
- <section @click="close">
49
- <i class="iconfont guoran-shanchu"></i>
50
- </section>
51
- </div>
52
- <template v-if="tagIds && tagIds.length != 0 && drawer">
53
- <pdfPosition :tagIds="tagIds"></pdfPosition>
54
- </template>
55
- <template v-else>
56
- <div v-if="fileType == 'VIDEO'" style="width: 100%;height:calc(100% - 60px)">
57
- <video :src="url" controls width="100%;" height="98%"></video>
58
- </div>
59
- <div v-else-if="fileType == 'HTML'" style="width: 100%;height:calc(100% - 60px)">
60
- <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
61
- </div>
62
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
63
- <iframe class="preview_iframe"
64
- :src="url"
65
- width="100%"
66
- height="100%"
67
- scrolling="100%"
68
- frameborder="no"
69
- border="0"></iframe>
70
- </template>
71
- <template v-else>
72
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
73
- </template>
74
- </template>
75
- <div class="loading_img" v-show="loading">
76
- <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
77
- </div>
78
- </el-drawer>
79
- </template>
80
-
81
- <script>
82
- import pdfPosition from './pdfPosition.vue'
83
- export default {
84
- data () {
85
- return {
86
- previewShowPopup: false,
87
- fileText:'',
88
- fileType:"",
89
- isPc:true,
90
- drawer:false,
91
- tagIds: [],
92
- // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
93
- loading:true,
94
- }
95
- },
96
- mounted() {
97
- let iframe = document.getElementsByClassName('preview_iframe')[0]
98
- if(iframe) {
99
- // this.loading = true
100
- console.log('1111111');
101
- iframe.onload = () =>{
102
- this.loading = false
103
- }
104
- }
105
- if(this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
106
- this.loading = false
107
- }
108
- },
109
- props:{
110
- url:{
111
- type: String,
112
- required: true,
113
- },
114
- officePreviewType:{
115
- type: String,
116
- default: ''
117
- }
118
- },
119
- components:{
120
- pdfPosition
121
- },
122
- computed:{
123
- previewUrl() {
124
- console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
125
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
126
- // if(this.url != '') {
127
- // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
128
- // url += btoa(encodeURIComponent(this.url))
129
- // } else {
130
- // url += btoa(this.url)
131
- // }
132
- // }
133
- url = url + this.url
134
- // if(this.officePreviewType !== '') {
135
- // url += '&officePreviewType=pdf'
136
- // }
137
- return url
138
- },
139
- // fileType() {
140
- // const fileType = this.url.substring(this.url.lastIndexOf('.'));
141
- // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
142
- // return 'VIDEO'
143
- // } else {
144
- // return 'OTHER'
145
- // }
146
-
147
- // }
148
- },
149
- methods :{
150
- close() {
151
- this.previewShowPopup = false;
152
- this.drawer = false;
153
- },
154
- loadIframe(item) {
155
- let iframe = document.getElementsByClassName('preview_iframe')[0]
156
- iframe.onload(() =>{
157
- let type = item.srcContent ? 'positionText' : 'positionNumber'
158
- iframe.contentWindow.postMessage({
159
- type: type,
160
- data: item.srcContent,
161
- }, '*')
162
- })
163
- // if(preview) {
164
- // preview.postMessage({
165
- // type: "positionText",
166
- // data: ``
167
- // }, '*')
168
- // }
169
- },
170
- getBolb() {
171
- this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false',{
172
- fileInOssPath: this.url,
173
- templateId: ''
174
- }).then(res =>{
175
- if (res.data.code == 0) {
176
- this.fileText = res.data.data
177
- }
178
- })
179
- },
180
- }
181
- }
182
- </script>
183
-
184
- <style lang="less" scoped>
185
- .preview_iframe {
186
- width: 100%;
187
- height: calc(100% - 60px);
188
- box-sizing: border-box;
189
- }
190
- .preview_iframe_html{
191
- width: 100%;
192
- height: 100%;
193
- overflow-y: scroll;
194
- text-align: left;
195
- box-sizing: border-box;
196
- padding: 16px;
197
- /deep/.lake-content{
198
- margin-left: 10px;
199
- }
200
- /deep/a:link {
201
- color: #0000ee!important;
202
- }
203
- /deep/a:visited {
204
- color: #0000ee!important;
205
- }
206
- /deep/a:hover {
207
- color: #0000ee!important;
208
- }
209
- /deep/a:active {
210
- color: #0000ee!important;
211
- }
212
- /deep/li:not(.rich-text-li), ol:not(.list-paddingleft-2), ul:not(.list-paddingleft-2){
213
- list-style-type: auto!important;
214
- }
215
- /deep/img{
216
- width: 100%;
217
- }
218
- /deep/.ne-table{
219
- width: 100% !important;
220
- }
221
- }
222
- .footer {
223
- width: calc(100% - 40px);
224
- height: 50px;
225
- display: flex;
226
- align-items: center;
227
- justify-content: space-between;
228
- cursor: pointer;
229
- padding: 0 20px;
230
- border-bottom: 1px solid #cccccc;
231
- }
232
- .loading_img {
233
- display: flex;
234
- align-items: center;
235
- justify-content: center;
236
- width: 100%;
237
- height: 100%;
238
- position: absolute;
239
- top: 0;
240
- left: 0;
241
- background: #FFF;
242
- img {
243
- width: 50px;
244
- height: 50px;
245
- }
246
- }
247
-
248
- .drawer-footer{
249
- width:100%;
250
- height: 50px;
251
- display: flex;
252
- align-items: center;
253
- justify-content: space-between;
254
- cursor: pointer;
255
- padding: 0 20px;
256
- border-bottom: 1px solid #cccccc;
257
- }
258
- /deep/.el-drawer__body{
259
- height: 100%;
260
- }
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
+ >
45
+ <!-- v-else-if="drawer" -->
46
+ <div class="drawer-footer">
47
+ <span>查看详情</span>
48
+ <section @click="close">
49
+ <i class="iconfont guoran-shanchu"></i>
50
+ </section>
51
+ </div>
52
+ <template v-if="tagIds && tagIds.length != 0 && drawer">
53
+ <pdfPosition :tagIds="tagIds"></pdfPosition>
54
+ </template>
55
+ <template v-else>
56
+ <div v-if="fileType == 'VIDEO'" style="width: 100%;height:calc(100% - 60px)">
57
+ <video :src="url" controls width="100%;" height="98%"></video>
58
+ </div>
59
+ <div v-else-if="fileType == 'HTML'" style="width: 100%;height:calc(100% - 60px)">
60
+ <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
61
+ </div>
62
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
63
+ <iframe class="preview_iframe"
64
+ :src="url"
65
+ width="100%"
66
+ height="100%"
67
+ scrolling="100%"
68
+ frameborder="no"
69
+ border="0"></iframe>
70
+ </template>
71
+ <template v-else>
72
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
73
+ </template>
74
+ </template>
75
+ <div class="loading_img" v-show="loading">
76
+ <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
77
+ </div>
78
+ </el-drawer>
79
+ </template>
80
+
81
+ <script>
82
+ import pdfPosition from './pdfPosition.vue'
83
+ export default {
84
+ data () {
85
+ return {
86
+ previewShowPopup: false,
87
+ fileText:'',
88
+ fileType:"",
89
+ isPc:true,
90
+ drawer:false,
91
+ tagIds: [],
92
+ // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
93
+ loading:true,
94
+ }
95
+ },
96
+ mounted() {
97
+ let iframe = document.getElementsByClassName('preview_iframe')[0]
98
+ if(iframe) {
99
+ // this.loading = true
100
+ console.log('1111111');
101
+ iframe.onload = () =>{
102
+ this.loading = false
103
+ }
104
+ }
105
+ if(this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
106
+ this.loading = false
107
+ }
108
+ },
109
+ props:{
110
+ url:{
111
+ type: String,
112
+ required: true,
113
+ },
114
+ officePreviewType:{
115
+ type: String,
116
+ default: ''
117
+ }
118
+ },
119
+ components:{
120
+ pdfPosition
121
+ },
122
+ computed:{
123
+ previewUrl() {
124
+ console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
125
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
126
+ // if(this.url != '') {
127
+ // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
128
+ // url += btoa(encodeURIComponent(this.url))
129
+ // } else {
130
+ // url += btoa(this.url)
131
+ // }
132
+ // }
133
+ url = url + this.url
134
+ // if(this.officePreviewType !== '') {
135
+ // url += '&officePreviewType=pdf'
136
+ // }
137
+ return url
138
+ },
139
+ // fileType() {
140
+ // const fileType = this.url.substring(this.url.lastIndexOf('.'));
141
+ // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
142
+ // return 'VIDEO'
143
+ // } else {
144
+ // return 'OTHER'
145
+ // }
146
+
147
+ // }
148
+ },
149
+ methods :{
150
+ close() {
151
+ this.previewShowPopup = false;
152
+ this.drawer = false;
153
+ },
154
+ loadIframe(item) {
155
+ let iframe = document.getElementsByClassName('preview_iframe')[0]
156
+ iframe.onload(() =>{
157
+ let type = item.srcContent ? 'positionText' : 'positionNumber'
158
+ iframe.contentWindow.postMessage({
159
+ type: type,
160
+ data: item.srcContent,
161
+ }, '*')
162
+ })
163
+ // if(preview) {
164
+ // preview.postMessage({
165
+ // type: "positionText",
166
+ // data: ``
167
+ // }, '*')
168
+ // }
169
+ },
170
+ getBolb() {
171
+ this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false',{
172
+ fileInOssPath: this.url,
173
+ templateId: ''
174
+ }).then(res =>{
175
+ if (res.data.code == 0) {
176
+ this.fileText = res.data.data
177
+ }
178
+ })
179
+ },
180
+ }
181
+ }
182
+ </script>
183
+
184
+ <style lang="less" scoped>
185
+ .preview_iframe {
186
+ width: 100%;
187
+ height: calc(100% - 60px);
188
+ box-sizing: border-box;
189
+ }
190
+ .preview_iframe_html{
191
+ width: 100%;
192
+ height: 100%;
193
+ overflow-y: scroll;
194
+ text-align: left;
195
+ box-sizing: border-box;
196
+ padding: 16px;
197
+ /deep/.lake-content{
198
+ margin-left: 10px;
199
+ }
200
+ /deep/a:link {
201
+ color: #0000ee!important;
202
+ }
203
+ /deep/a:visited {
204
+ color: #0000ee!important;
205
+ }
206
+ /deep/a:hover {
207
+ color: #0000ee!important;
208
+ }
209
+ /deep/a:active {
210
+ color: #0000ee!important;
211
+ }
212
+ /deep/li:not(.rich-text-li), ol:not(.list-paddingleft-2), ul:not(.list-paddingleft-2){
213
+ list-style-type: auto!important;
214
+ }
215
+ /deep/img{
216
+ width: 100%;
217
+ }
218
+ /deep/.ne-table{
219
+ width: 100% !important;
220
+ }
221
+ }
222
+ .footer {
223
+ width: calc(100% - 40px);
224
+ height: 50px;
225
+ display: flex;
226
+ align-items: center;
227
+ justify-content: space-between;
228
+ cursor: pointer;
229
+ padding: 0 20px;
230
+ border-bottom: 1px solid #cccccc;
231
+ }
232
+ .loading_img {
233
+ display: flex;
234
+ align-items: center;
235
+ justify-content: center;
236
+ width: 100%;
237
+ height: 100%;
238
+ position: absolute;
239
+ top: 0;
240
+ left: 0;
241
+ background: #FFF;
242
+ img {
243
+ width: 50px;
244
+ height: 50px;
245
+ }
246
+ }
247
+
248
+ .drawer-footer{
249
+ width:100%;
250
+ height: 50px;
251
+ display: flex;
252
+ align-items: center;
253
+ justify-content: space-between;
254
+ cursor: pointer;
255
+ padding: 0 20px;
256
+ border-bottom: 1px solid #cccccc;
257
+ }
258
+ /deep/.el-drawer__body{
259
+ height: 100%;
260
+ }
261
261
  </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>