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,229 +1,229 @@
1
- <template>
2
- <div class="previewDoc">
3
- <div class="footer">
4
- <span>查看详情</span>
5
- <section @click="close">
6
- <i class="iconfont guoran-shanchu"></i>
7
- </section>
8
- </div>
9
- <!-- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
10
- <video :src="url" controls width="100%;" height="98%"></video>
11
- </div>
12
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
13
- <iframe class="preview_iframe"
14
- :src="url"
15
- width="100%"
16
- height="100%"
17
- scrolling="100%"
18
- frameborder="no"
19
- border="0"></iframe>
20
- </template>
21
- <template v-else>
22
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
23
- </template> -->
24
- <div v-show="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
25
- <video :src="url" controls width="100%;" height="98%"></video>
26
- </div>
27
- <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www'))">
28
- <iframe class="preview_iframe"
29
- :src="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www')) ? url : ''"
30
- width="100%"
31
- height="100%"
32
- scrolling="100%"
33
- frameborder="no"
34
- border="0"></iframe>
35
- </div>
36
- <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType == 'OTHER' && !url.includes('https://www') && !url.includes('http://www')">
37
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
38
- </div>
39
- <div class="onload_btn" @click="downLoad">
40
- 下载
41
- </div>
42
- <div id="text">
43
- {{ copy }}
44
- </div>
45
- </div>
46
- </template>
47
-
48
- <script>
49
- import { Toast } from 'vant';
50
- import { isMobile } from "../assets/js/common";
51
-
52
- export default {
53
- data () {
54
- return {
55
- previewShowPopup: false,
56
- title:'工单附件',
57
- copy:''
58
- }
59
- },
60
- props: {
61
- url: {
62
- type: String,
63
- required: true,
64
- },
65
- officePreviewType: {
66
- type: String,
67
- default: ''
68
- }
69
- },
70
- computed: {
71
- previewUrl () {
72
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
73
- if (this.url != '') {
74
- // if (/[\u4E00-\u9FA5]+/g.test(this.url)) {
75
- // url += btoa(encodeURIComponent(this.url))
76
- // } else {
77
- // url += btoa(this.url)
78
- // }
79
- // url += '&encodeURIComponent=true'
80
- if(decodeURIComponent(this.url) == this.url) {
81
- url += btoa(encodeURIComponent(this.url))
82
- url += '&encodeURIComponent=true'
83
- } else {
84
- url += btoa(encodeURIComponent(decodeURIComponent(this.url)))
85
- url += '&encodeURIComponent=true'
86
- }
87
- }
88
- return url
89
- },
90
- fileType () {
91
- const fileType = this.url.substring(this.url.lastIndexOf('.'));
92
- if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
93
- return 'VIDEO'
94
- } else if(fileType === '.html' || fileType === '.HTML') {
95
- return 'HTML'
96
- } else {
97
- return 'OTHER'
98
- }
99
-
100
- }
101
- },
102
- methods: {
103
- close () {
104
- this.$emit('close')
105
- },
106
- loadIframe (item) {
107
- let iframe = document.getElementsByClassName('preview_iframe')[0]
108
- iframe.onload(() => {
109
- iframe.contentWindow.postMessage({
110
- type: "positionText",
111
- data: item.text,
112
- page: item.page
113
- }, '*')
114
- })
115
- // if(preview) {
116
- // preview.postMessage({
117
- // type: "positionText",
118
- // data: ``
119
- // }, '*')
120
- // }
121
- },
122
- downLoad () {
123
- let url = this.url
124
- if (decodeURIComponent(url) != url) {
125
- url = decodeURIComponent(url)
126
- }
127
- const fileType = url.substring(url.lastIndexOf('.'));
128
- this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
129
- headers:{
130
- "Content-Type": "application/json",
131
- }
132
- }).then(res => {
133
- if (res.data) {
134
- if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
135
- this.copy = res.data
136
- if(isMobile()) {
137
- setTimeout(() =>{
138
- const range = document.createRange();
139
- range.selectNode(document.getElementById('text'));
140
- const selection = window.getSelection();
141
- //移除之前选中内容
142
- if (selection.rangeCount > 0) selection.removeAllRanges();
143
- selection.addRange(range);
144
- document.execCommand('copy');
145
- selection.removeAllRanges()
146
- Toast('下载地址已复制,请前往Safari浏览器访问下载');
147
- this.close()
148
- },100)
149
- } else {
150
- navigator.clipboard.writeText(res.data)
151
- this.$message.success({
152
- message:'下载地址已复制,请前往Safari浏览器访问下载',
153
- })
154
- }
155
- return
156
- } else {
157
- // setTimeout(() =>{
158
- // window.open(res.data,'下载', 'noopener')
159
- // }, 2000)
160
- // window.open(res.data,'下载', 'noopener')
161
- if(isMobile()) {
162
- const iframe = document.createElement("iframe");
163
- iframe.setAttribute("hidden", "hidden");
164
- iframe.onload = () => {
165
- if (iframe) {
166
- console.log("iframe onload....")
167
- iframe.setAttribute('src', 'about:blank');
168
- }
169
- };
170
- document.body.insertBefore(iframe, null);
171
- iframe.setAttribute("src", res.data);
172
- } else {
173
- let a = document.createElement('a')
174
- a.href = res.data
175
- a.download = (this.title) + fileType
176
- a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
177
- }
178
- this.close()
179
- }
180
- }
181
- })
182
- }
183
- }
184
- }
185
- </script>
186
-
187
- <style lang="less" scoped>
188
- .previewDoc{
189
- height: 100%;
190
- position: relative;
191
- }
192
- .preview_iframe {
193
- width: 100%;
194
- height: calc(100% - 65px);
195
- overflow-y: scroll;
196
- }
197
- .footer {
198
- width: calc(100% - 40px);
199
- height: 50px;
200
- display: flex;
201
- align-items: center;
202
- justify-content: space-between;
203
- cursor: pointer;
204
- padding: 0 20px;
205
- border-bottom: 1px solid #cccccc;
206
- }
207
- /deep/.el-drawer__body{
208
- height: 100%;
209
- }
210
- .onload_btn {
211
- position: absolute;
212
- left: 50%;
213
- transform: translateX(-50%);
214
- bottom: 40px;
215
- width: 200px;
216
- background-color: #366AFF;
217
- color: white;
218
- height: 48px;
219
- display: flex;
220
- align-items: center;
221
- justify-content: center;
222
- border-radius: 28px;
223
- cursor: pointer;
224
- z-index: 9999;
225
- i{
226
- margin-right: 8px;
227
- }
228
- }
1
+ <template>
2
+ <div class="previewDoc">
3
+ <div class="footer">
4
+ <span>查看详情</span>
5
+ <section @click="close">
6
+ <i class="iconfont guoran-shanchu"></i>
7
+ </section>
8
+ </div>
9
+ <!-- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
10
+ <video :src="url" controls width="100%;" height="98%"></video>
11
+ </div>
12
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
13
+ <iframe class="preview_iframe"
14
+ :src="url"
15
+ width="100%"
16
+ height="100%"
17
+ scrolling="100%"
18
+ frameborder="no"
19
+ border="0"></iframe>
20
+ </template>
21
+ <template v-else>
22
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
23
+ </template> -->
24
+ <div v-show="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
25
+ <video :src="url" controls width="100%;" height="98%"></video>
26
+ </div>
27
+ <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www'))">
28
+ <iframe class="preview_iframe"
29
+ :src="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www')) ? url : ''"
30
+ width="100%"
31
+ height="100%"
32
+ scrolling="100%"
33
+ frameborder="no"
34
+ border="0"></iframe>
35
+ </div>
36
+ <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType == 'OTHER' && !url.includes('https://www') && !url.includes('http://www')">
37
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
38
+ </div>
39
+ <div class="onload_btn" @click="downLoad">
40
+ 下载
41
+ </div>
42
+ <div id="text">
43
+ {{ copy }}
44
+ </div>
45
+ </div>
46
+ </template>
47
+
48
+ <script>
49
+ import { Toast } from 'vant';
50
+ import { isMobile } from "../assets/js/common";
51
+
52
+ export default {
53
+ data () {
54
+ return {
55
+ previewShowPopup: false,
56
+ title:'工单附件',
57
+ copy:''
58
+ }
59
+ },
60
+ props: {
61
+ url: {
62
+ type: String,
63
+ required: true,
64
+ },
65
+ officePreviewType: {
66
+ type: String,
67
+ default: ''
68
+ }
69
+ },
70
+ computed: {
71
+ previewUrl () {
72
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
73
+ if (this.url != '') {
74
+ // if (/[\u4E00-\u9FA5]+/g.test(this.url)) {
75
+ // url += btoa(encodeURIComponent(this.url))
76
+ // } else {
77
+ // url += btoa(this.url)
78
+ // }
79
+ // url += '&encodeURIComponent=true'
80
+ if(decodeURIComponent(this.url) == this.url) {
81
+ url += btoa(encodeURIComponent(this.url))
82
+ url += '&encodeURIComponent=true'
83
+ } else {
84
+ url += btoa(encodeURIComponent(decodeURIComponent(this.url)))
85
+ url += '&encodeURIComponent=true'
86
+ }
87
+ }
88
+ return url
89
+ },
90
+ fileType () {
91
+ const fileType = this.url.substring(this.url.lastIndexOf('.'));
92
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
93
+ return 'VIDEO'
94
+ } else if(fileType === '.html' || fileType === '.HTML') {
95
+ return 'HTML'
96
+ } else {
97
+ return 'OTHER'
98
+ }
99
+
100
+ }
101
+ },
102
+ methods: {
103
+ close () {
104
+ this.$emit('close')
105
+ },
106
+ loadIframe (item) {
107
+ let iframe = document.getElementsByClassName('preview_iframe')[0]
108
+ iframe.onload(() => {
109
+ iframe.contentWindow.postMessage({
110
+ type: "positionText",
111
+ data: item.text,
112
+ page: item.page
113
+ }, '*')
114
+ })
115
+ // if(preview) {
116
+ // preview.postMessage({
117
+ // type: "positionText",
118
+ // data: ``
119
+ // }, '*')
120
+ // }
121
+ },
122
+ downLoad () {
123
+ let url = this.url
124
+ if (decodeURIComponent(url) != url) {
125
+ url = decodeURIComponent(url)
126
+ }
127
+ const fileType = url.substring(url.lastIndexOf('.'));
128
+ this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
129
+ headers:{
130
+ "Content-Type": "application/json",
131
+ }
132
+ }).then(res => {
133
+ if (res.data) {
134
+ if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
135
+ this.copy = res.data
136
+ if(isMobile()) {
137
+ setTimeout(() =>{
138
+ const range = document.createRange();
139
+ range.selectNode(document.getElementById('text'));
140
+ const selection = window.getSelection();
141
+ //移除之前选中内容
142
+ if (selection.rangeCount > 0) selection.removeAllRanges();
143
+ selection.addRange(range);
144
+ document.execCommand('copy');
145
+ selection.removeAllRanges()
146
+ Toast('下载地址已复制,请前往Safari浏览器访问下载');
147
+ this.close()
148
+ },100)
149
+ } else {
150
+ navigator.clipboard.writeText(res.data)
151
+ this.$message.success({
152
+ message:'下载地址已复制,请前往Safari浏览器访问下载',
153
+ })
154
+ }
155
+ return
156
+ } else {
157
+ // setTimeout(() =>{
158
+ // window.open(res.data,'下载', 'noopener')
159
+ // }, 2000)
160
+ // window.open(res.data,'下载', 'noopener')
161
+ if(isMobile()) {
162
+ const iframe = document.createElement("iframe");
163
+ iframe.setAttribute("hidden", "hidden");
164
+ iframe.onload = () => {
165
+ if (iframe) {
166
+ console.log("iframe onload....")
167
+ iframe.setAttribute('src', 'about:blank');
168
+ }
169
+ };
170
+ document.body.insertBefore(iframe, null);
171
+ iframe.setAttribute("src", res.data);
172
+ } else {
173
+ let a = document.createElement('a')
174
+ a.href = res.data
175
+ a.download = (this.title) + fileType
176
+ a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
177
+ }
178
+ this.close()
179
+ }
180
+ }
181
+ })
182
+ }
183
+ }
184
+ }
185
+ </script>
186
+
187
+ <style lang="less" scoped>
188
+ .previewDoc{
189
+ height: 100%;
190
+ position: relative;
191
+ }
192
+ .preview_iframe {
193
+ width: 100%;
194
+ height: calc(100% - 65px);
195
+ overflow-y: scroll;
196
+ }
197
+ .footer {
198
+ width: calc(100% - 40px);
199
+ height: 50px;
200
+ display: flex;
201
+ align-items: center;
202
+ justify-content: space-between;
203
+ cursor: pointer;
204
+ padding: 0 20px;
205
+ border-bottom: 1px solid #cccccc;
206
+ }
207
+ /deep/.el-drawer__body{
208
+ height: 100%;
209
+ }
210
+ .onload_btn {
211
+ position: absolute;
212
+ left: 50%;
213
+ transform: translateX(-50%);
214
+ bottom: 40px;
215
+ width: 200px;
216
+ background-color: #366AFF;
217
+ color: white;
218
+ height: 48px;
219
+ display: flex;
220
+ align-items: center;
221
+ justify-content: center;
222
+ border-radius: 28px;
223
+ cursor: pointer;
224
+ z-index: 9999;
225
+ i{
226
+ margin-right: 8px;
227
+ }
228
+ }
229
229
  </style>