askbot-dragon 1.6.76-beta → 1.6.77-beta

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 (84) 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 +55 -55
  5. package/public/index.html +72 -72
  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 +252 -252
  13. package/src/assets/js/hammer.js +100 -100
  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 +199 -199
  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 +294 -294
  20. package/src/components/ActionAlertIframe.vue +177 -177
  21. package/src/components/AiGuide.vue +466 -466
  22. package/src/components/AnswerDocknowledge.vue +1059 -1059
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +4934 -4934
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/MyEditor.vue +351 -351
  29. package/src/components/actionSatisfaction.vue +107 -107
  30. package/src/components/actionSendToBot.vue +62 -62
  31. package/src/components/answerDissatisfaction.vue +62 -62
  32. package/src/components/answerRadio.vue +186 -186
  33. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  34. package/src/components/ask-components/Msgloading.vue +37 -37
  35. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  36. package/src/components/askVideo.vue +162 -162
  37. package/src/components/assetDetails.vue +378 -378
  38. package/src/components/assetMessage.vue +228 -228
  39. package/src/components/associationIntention.vue +355 -355
  40. package/src/components/attachmentPreview.vue +90 -90
  41. package/src/components/botActionSatisfactor.vue +68 -68
  42. package/src/components/chatContent.vue +513 -513
  43. package/src/components/feedBack.vue +136 -136
  44. package/src/components/fielListView.vue +351 -351
  45. package/src/components/file/AliyunOssComponents.vue +108 -108
  46. package/src/components/formTemplate.vue +3572 -3572
  47. package/src/components/intelligentSummary.vue +227 -227
  48. package/src/components/kkview.vue +1138 -1138
  49. package/src/components/loadingProcess.vue +164 -164
  50. package/src/components/message/ActionAlertIframe.vue +112 -112
  51. package/src/components/message/ShopMessage.vue +164 -164
  52. package/src/components/message/TextMessage.vue +924 -924
  53. package/src/components/message/TicketMessage.vue +201 -201
  54. package/src/components/message/swiper/index.js +4 -4
  55. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  56. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  57. package/src/components/msgLoading.vue +231 -231
  58. package/src/components/myPopup.vue +70 -70
  59. package/src/components/newPdfPosition.vue +877 -877
  60. package/src/components/pdfPosition.vue +1508 -1506
  61. package/src/components/popup.vue +227 -227
  62. package/src/components/previewDoc.vue +247 -247
  63. package/src/components/previewPdf.vue +788 -757
  64. package/src/components/receiverMessagePlatform.vue +65 -65
  65. package/src/components/recommend.vue +80 -80
  66. package/src/components/selector/hOption.vue +20 -20
  67. package/src/components/selector/hSelector.vue +199 -199
  68. package/src/components/selector/hWrapper.vue +216 -216
  69. package/src/components/senderMessagePlatform.vue +50 -50
  70. package/src/components/source/BotMessage.vue +24 -24
  71. package/src/components/source/CustomMessage.vue +24 -24
  72. package/src/components/test.vue +260 -260
  73. package/src/components/tree.vue +294 -294
  74. package/src/components/utils/AliyunIssUtil.js +81 -81
  75. package/src/components/utils/ckeditor.js +174 -174
  76. package/src/components/utils/format_date.js +25 -25
  77. package/src/components/utils/index.js +6 -6
  78. package/src/components/utils/math_utils.js +29 -29
  79. package/src/components/voiceComponent.vue +119 -119
  80. package/src/components/welcomeKnowledgeFile.vue +340 -340
  81. package/src/components/welcomeLlmCard.vue +140 -140
  82. package/src/components/welcomeSuggest.vue +97 -97
  83. package/src/main.js +57 -57
  84. package/vue.config.js +54 -54
@@ -1,248 +1,248 @@
1
- <!-- preview-document
2
- 组件主要负责 富文本中配置的链接,图片 及上传附件下的附件列表中的单纯预览
3
- 走的是kkview项目预览或者iframe直接打开文件地址,不对预览文件解析不包含其他功能开发
4
- -->
5
- <template>
6
-
7
- <div class="previewDoc">
8
- <div class="footer">
9
- <span>查看详情</span>
10
- <section @click="close">
11
- <i class="iconfont guoran-shanchu"></i>
12
- </section>
13
- </div>
14
- <!-- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
15
- <video :src="url" controls width="100%;" height="98%"></video>
16
- </div>
17
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
18
- <iframe class="preview_iframe"
19
- :src="url"
20
- width="100%"
21
- height="100%"
22
- scrolling="100%"
23
- frameborder="no"
24
- border="0"></iframe>
25
- </template>
26
- <template v-else>
27
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
28
- </template> -->
29
- <div v-show="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
30
- <video :src="url" controls width="100%;" height="98%"></video>
31
- </div>
32
- <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www'))">
33
- <iframe class="preview_iframe"
34
- :src="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www')) ? url : ''"
35
- width="100%"
36
- height="100%"
37
- scrolling="100%"
38
- frameborder="no"
39
- border="0"></iframe>
40
- </div>
41
- <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType == 'OTHER' && !url.includes('https://www') && !url.includes('http://www')">
42
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
43
- </div>
44
- <div class="onload_btn" @click="downLoad">
45
- 下载
46
- </div>
47
- <div id="text">
48
- {{ copy }}
49
- </div>
50
- </div>
51
- </template>
52
-
53
- <script>
54
- import { Toast } from 'vant';
55
- import { isMobile } from "../assets/js/common";
56
-
57
- export default {
58
- data () {
59
- return {
60
- previewShowPopup: false,
61
- title:'工单附件',
62
- copy:''
63
- }
64
- },
65
- props: {
66
- url: {
67
- type: String,
68
- required: true,
69
- },
70
- officePreviewType: {
71
- type: String,
72
- default: ''
73
- }
74
- },
75
- computed: {
76
- previewUrl () {
77
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
78
- if (this.url != '') {
79
- // if (/[\u4E00-\u9FA5]+/g.test(this.url)) {
80
- // url += btoa(encodeURIComponent(this.url))
81
- // } else {
82
- // url += btoa(this.url)
83
- // }
84
- // url += '&encodeURIComponent=true'
85
- if(decodeURIComponent(this.url) == this.url) {
86
- url += btoa(encodeURIComponent(this.url))
87
- url += '&encodeURIComponent=true'
88
- } else {
89
- url += btoa(encodeURIComponent(decodeURIComponent(this.url)))
90
- url += '&encodeURIComponent=true'
91
- }
92
- }
93
- return url
94
- },
95
- fileType () {
96
- const fileType = this.url.substring(this.url.lastIndexOf('.'));
97
- if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
98
- return 'VIDEO'
99
- } else if(fileType === '.html' || fileType === '.HTML') {
100
- return 'HTML'
101
- } else {
102
- return 'OTHER'
103
- }
104
-
105
- }
106
- },
107
- methods: {
108
- close () {
109
- this.$emit('close')
110
- },
111
- loadIframe (item) {
112
- let iframe = document.getElementsByClassName('preview_iframe')[0]
113
- iframe.onload(() => {
114
- iframe.contentWindow.postMessage({
115
- type: "positionText",
116
- data: item.text,
117
- page: item.page
118
- }, '*')
119
- })
120
- // if(preview) {
121
- // preview.postMessage({
122
- // type: "positionText",
123
- // data: ``
124
- // }, '*')
125
- // }
126
- },
127
- downLoad () {
128
- let url = this.url
129
- if (decodeURIComponent(url) != url) {
130
- url = decodeURIComponent(url)
131
- }
132
- const fileType = url.substring(url.lastIndexOf('.'));
133
- this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
134
- headers:{
135
- "Content-Type": "application/json",
136
- }
137
- }).then(res => {
138
- if (res.data) {
139
- if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
140
- this.copy = res.data
141
- if(isMobile()) {
142
- setTimeout(() =>{
143
- const range = document.createRange();
144
- range.selectNode(document.getElementById('text'));
145
- const selection = window.getSelection();
146
- //移除之前选中内容
147
- if (selection.rangeCount > 0) selection.removeAllRanges();
148
- selection.addRange(range);
149
- document.execCommand('copy');
150
- selection.removeAllRanges()
151
- Toast('下载地址已复制,请前往Safari浏览器访问下载');
152
- this.close()
153
- },100)
154
- } else {
155
- navigator.clipboard.writeText(res.data)
156
- this.$message.success({
157
- message:'下载地址已复制,请前往Safari浏览器访问下载',
158
- })
159
- }
160
- return
161
- } else {
162
- // setTimeout(() =>{
163
- // window.open(res.data,'下载', 'noopener')
164
- // }, 2000)
165
- // window.open(res.data,'下载', 'noopener')
166
- if(isMobile()) {
167
- const iframe = document.createElement("iframe");
168
- iframe.setAttribute("hidden", "hidden");
169
- iframe.onload = () => {
170
- if (iframe) {
171
- console.log("iframe onload....")
172
- iframe.setAttribute('src', 'about:blank');
173
- }
174
- };
175
- document.body.insertBefore(iframe, null);
176
- iframe.setAttribute("src", res.data);
177
- } else {
178
- let a = document.createElement('a')
179
- a.href = res.data
180
- a.download = (this.title) + fileType
181
- a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
182
- }
183
- this.close()
184
- }
185
- }
186
- })
187
- }
188
- },
189
- mounted() {
190
- setTimeout(() =>{
191
- let previewIframe = document.getElementsByClassName('preview_iframe')
192
- Array.from(previewIframe).forEach(item =>{
193
- item.onload = () =>{
194
- item.style.backgroundImage = `url('')`
195
- }
196
- })
197
- })
198
- }
199
- }
200
- </script>
201
-
202
- <style lang="less" scoped>
203
- .previewDoc{
204
- height: 100%;
205
- position: relative;
206
- }
207
- .preview_iframe {
208
- width: 100%;
209
- height: calc(100% - 65px);
210
- overflow-y: scroll;
211
- background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
212
- background-position: center;
213
- background-size: 50px;
214
- background-repeat: no-repeat;
215
- }
216
- .footer {
217
- width: calc(100% - 40px);
218
- height: 50px;
219
- display: flex;
220
- align-items: center;
221
- justify-content: space-between;
222
- cursor: pointer;
223
- padding: 0 20px;
224
- border-bottom: 1px solid #cccccc;
225
- }
226
- /deep/.el-drawer__body{
227
- height: 100%;
228
- }
229
- .onload_btn {
230
- position: absolute;
231
- left: 50%;
232
- transform: translateX(-50%);
233
- bottom: 40px;
234
- width: 200px;
235
- background-color: #366AFF;
236
- color: white;
237
- height: 48px;
238
- display: flex;
239
- align-items: center;
240
- justify-content: center;
241
- border-radius: 28px;
242
- cursor: pointer;
243
- z-index: 9999;
244
- i{
245
- margin-right: 8px;
246
- }
247
- }
1
+ <!-- preview-document
2
+ 组件主要负责 富文本中配置的链接,图片 及上传附件下的附件列表中的单纯预览
3
+ 走的是kkview项目预览或者iframe直接打开文件地址,不对预览文件解析不包含其他功能开发
4
+ -->
5
+ <template>
6
+
7
+ <div class="previewDoc">
8
+ <div class="footer">
9
+ <span>查看详情</span>
10
+ <section @click="close">
11
+ <i class="iconfont guoran-shanchu"></i>
12
+ </section>
13
+ </div>
14
+ <!-- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
15
+ <video :src="url" controls width="100%;" height="98%"></video>
16
+ </div>
17
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
18
+ <iframe class="preview_iframe"
19
+ :src="url"
20
+ width="100%"
21
+ height="100%"
22
+ scrolling="100%"
23
+ frameborder="no"
24
+ border="0"></iframe>
25
+ </template>
26
+ <template v-else>
27
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
28
+ </template> -->
29
+ <div v-show="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
30
+ <video :src="url" controls width="100%;" height="98%"></video>
31
+ </div>
32
+ <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www'))">
33
+ <iframe class="preview_iframe"
34
+ :src="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www')) ? url : ''"
35
+ width="100%"
36
+ height="100%"
37
+ scrolling="100%"
38
+ frameborder="no"
39
+ border="0"></iframe>
40
+ </div>
41
+ <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType == 'OTHER' && !url.includes('https://www') && !url.includes('http://www')">
42
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
43
+ </div>
44
+ <div class="onload_btn" @click="downLoad">
45
+ 下载
46
+ </div>
47
+ <div id="text">
48
+ {{ copy }}
49
+ </div>
50
+ </div>
51
+ </template>
52
+
53
+ <script>
54
+ import { Toast } from 'vant';
55
+ import { isMobile } from "../assets/js/common";
56
+
57
+ export default {
58
+ data () {
59
+ return {
60
+ previewShowPopup: false,
61
+ title:'工单附件',
62
+ copy:''
63
+ }
64
+ },
65
+ props: {
66
+ url: {
67
+ type: String,
68
+ required: true,
69
+ },
70
+ officePreviewType: {
71
+ type: String,
72
+ default: ''
73
+ }
74
+ },
75
+ computed: {
76
+ previewUrl () {
77
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
78
+ if (this.url != '') {
79
+ // if (/[\u4E00-\u9FA5]+/g.test(this.url)) {
80
+ // url += btoa(encodeURIComponent(this.url))
81
+ // } else {
82
+ // url += btoa(this.url)
83
+ // }
84
+ // url += '&encodeURIComponent=true'
85
+ if(decodeURIComponent(this.url) == this.url) {
86
+ url += btoa(encodeURIComponent(this.url))
87
+ url += '&encodeURIComponent=true'
88
+ } else {
89
+ url += btoa(encodeURIComponent(decodeURIComponent(this.url)))
90
+ url += '&encodeURIComponent=true'
91
+ }
92
+ }
93
+ return url
94
+ },
95
+ fileType () {
96
+ const fileType = this.url.substring(this.url.lastIndexOf('.'));
97
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
98
+ return 'VIDEO'
99
+ } else if(fileType === '.html' || fileType === '.HTML') {
100
+ return 'HTML'
101
+ } else {
102
+ return 'OTHER'
103
+ }
104
+
105
+ }
106
+ },
107
+ methods: {
108
+ close () {
109
+ this.$emit('close')
110
+ },
111
+ loadIframe (item) {
112
+ let iframe = document.getElementsByClassName('preview_iframe')[0]
113
+ iframe.onload(() => {
114
+ iframe.contentWindow.postMessage({
115
+ type: "positionText",
116
+ data: item.text,
117
+ page: item.page
118
+ }, '*')
119
+ })
120
+ // if(preview) {
121
+ // preview.postMessage({
122
+ // type: "positionText",
123
+ // data: ``
124
+ // }, '*')
125
+ // }
126
+ },
127
+ downLoad () {
128
+ let url = this.url
129
+ if (decodeURIComponent(url) != url) {
130
+ url = decodeURIComponent(url)
131
+ }
132
+ const fileType = url.substring(url.lastIndexOf('.'));
133
+ this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
134
+ headers:{
135
+ "Content-Type": "application/json",
136
+ }
137
+ }).then(res => {
138
+ if (res.data) {
139
+ if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
140
+ this.copy = res.data
141
+ if(isMobile()) {
142
+ setTimeout(() =>{
143
+ const range = document.createRange();
144
+ range.selectNode(document.getElementById('text'));
145
+ const selection = window.getSelection();
146
+ //移除之前选中内容
147
+ if (selection.rangeCount > 0) selection.removeAllRanges();
148
+ selection.addRange(range);
149
+ document.execCommand('copy');
150
+ selection.removeAllRanges()
151
+ Toast('下载地址已复制,请前往Safari浏览器访问下载');
152
+ this.close()
153
+ },100)
154
+ } else {
155
+ navigator.clipboard.writeText(res.data)
156
+ this.$message.success({
157
+ message:'下载地址已复制,请前往Safari浏览器访问下载',
158
+ })
159
+ }
160
+ return
161
+ } else {
162
+ // setTimeout(() =>{
163
+ // window.open(res.data,'下载', 'noopener')
164
+ // }, 2000)
165
+ // window.open(res.data,'下载', 'noopener')
166
+ if(isMobile()) {
167
+ const iframe = document.createElement("iframe");
168
+ iframe.setAttribute("hidden", "hidden");
169
+ iframe.onload = () => {
170
+ if (iframe) {
171
+ console.log("iframe onload....")
172
+ iframe.setAttribute('src', 'about:blank');
173
+ }
174
+ };
175
+ document.body.insertBefore(iframe, null);
176
+ iframe.setAttribute("src", res.data);
177
+ } else {
178
+ let a = document.createElement('a')
179
+ a.href = res.data
180
+ a.download = (this.title) + fileType
181
+ a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
182
+ }
183
+ this.close()
184
+ }
185
+ }
186
+ })
187
+ }
188
+ },
189
+ mounted() {
190
+ setTimeout(() =>{
191
+ let previewIframe = document.getElementsByClassName('preview_iframe')
192
+ Array.from(previewIframe).forEach(item =>{
193
+ item.onload = () =>{
194
+ item.style.backgroundImage = `url('')`
195
+ }
196
+ })
197
+ })
198
+ }
199
+ }
200
+ </script>
201
+
202
+ <style lang="less" scoped>
203
+ .previewDoc{
204
+ height: 100%;
205
+ position: relative;
206
+ }
207
+ .preview_iframe {
208
+ width: 100%;
209
+ height: calc(100% - 65px);
210
+ overflow-y: scroll;
211
+ background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
212
+ background-position: center;
213
+ background-size: 50px;
214
+ background-repeat: no-repeat;
215
+ }
216
+ .footer {
217
+ width: calc(100% - 40px);
218
+ height: 50px;
219
+ display: flex;
220
+ align-items: center;
221
+ justify-content: space-between;
222
+ cursor: pointer;
223
+ padding: 0 20px;
224
+ border-bottom: 1px solid #cccccc;
225
+ }
226
+ /deep/.el-drawer__body{
227
+ height: 100%;
228
+ }
229
+ .onload_btn {
230
+ position: absolute;
231
+ left: 50%;
232
+ transform: translateX(-50%);
233
+ bottom: 40px;
234
+ width: 200px;
235
+ background-color: #366AFF;
236
+ color: white;
237
+ height: 48px;
238
+ display: flex;
239
+ align-items: center;
240
+ justify-content: center;
241
+ border-radius: 28px;
242
+ cursor: pointer;
243
+ z-index: 9999;
244
+ i{
245
+ margin-right: 8px;
246
+ }
247
+ }
248
248
  </style>