askbot-dragon 1.1.28 → 1.2.0

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 (82) 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 +56 -56
  5. package/public/index.html +43 -43
  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 +12 -0
  13. package/src/assets/js/script.js +36 -36
  14. package/src/assets/less/common.css +6773 -6773
  15. package/src/assets/less/converSationContainer/common.less +191 -191
  16. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  17. package/src/assets/less/iconfont.css +37 -37
  18. package/src/assets/less/ticketMessage.less +211 -211
  19. package/src/components/ActionAlertIframe.vue +112 -112
  20. package/src/components/AiGuide.vue +467 -467
  21. package/src/components/AnswerDocknowledge.vue +362 -351
  22. package/src/components/AskIFrame.vue +15 -15
  23. package/src/components/ConversationContainer.vue +4011 -4011
  24. package/src/components/FileType.vue +86 -86
  25. package/src/components/Message.vue +27 -27
  26. package/src/components/actionSatisfaction.vue +107 -107
  27. package/src/components/actionSendToBot.vue +62 -62
  28. package/src/components/answerDissatisfaction.vue +62 -62
  29. package/src/components/answerRadio.vue +76 -76
  30. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  31. package/src/components/ask-components/Msgloading.vue +37 -37
  32. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  33. package/src/components/askVideo.vue +138 -138
  34. package/src/components/assetDetails.vue +370 -370
  35. package/src/components/assetMessage.vue +228 -228
  36. package/src/components/associationIntention.vue +300 -300
  37. package/src/components/attachmentPreview.vue +90 -90
  38. package/src/components/botActionSatisfactor.vue +68 -68
  39. package/src/components/chatContent.vue +513 -513
  40. package/src/components/feedBack.vue +136 -136
  41. package/src/components/fielListView.vue +326 -326
  42. package/src/components/file/AliyunOssComponents.vue +108 -108
  43. package/src/components/formTemplate.vue +3359 -3361
  44. package/src/components/loadingProcess.vue +164 -164
  45. package/src/components/message/ActionAlertIframe.vue +112 -112
  46. package/src/components/message/ShopMessage.vue +164 -164
  47. package/src/components/message/TextMessage.vue +924 -924
  48. package/src/components/message/TicketMessage.vue +177 -177
  49. package/src/components/message/swiper/index.js +4 -4
  50. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  51. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  52. package/src/components/msgLoading.vue +231 -231
  53. package/src/components/myPopup.vue +70 -70
  54. package/src/components/popup.vue +227 -227
  55. package/src/components/previewDoc.vue +108 -108
  56. package/src/components/previewPdf.vue +195 -127
  57. package/src/components/receiverMessagePlatform.vue +65 -65
  58. package/src/components/recommend.vue +89 -89
  59. package/src/components/selector/hOption.vue +20 -20
  60. package/src/components/selector/hSelector.vue +199 -199
  61. package/src/components/selector/hWrapper.vue +216 -216
  62. package/src/components/senderMessagePlatform.vue +50 -50
  63. package/src/components/source/BotMessage.vue +24 -24
  64. package/src/components/source/CustomMessage.vue +24 -24
  65. package/src/components/test.vue +260 -260
  66. package/src/components/tree.vue +294 -294
  67. package/src/components/utils/AliyunIssUtil.js +72 -72
  68. package/src/components/utils/ckeditor.js +155 -155
  69. package/src/components/utils/ckeditorImageUpload/command.js +109 -109
  70. package/src/components/utils/ckeditorImageUpload/editing.js +11 -11
  71. package/src/components/utils/ckeditorImageUpload/plugin-image.js +11 -11
  72. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +40 -40
  73. package/src/components/utils/ckeditorfileUpload/common.js +111 -111
  74. package/src/components/utils/ckeditorfileUpload/editing.js +11 -11
  75. package/src/components/utils/ckeditorfileUpload/plugin_file.js +11 -11
  76. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +34 -34
  77. package/src/components/utils/format_date.js +25 -25
  78. package/src/components/utils/index.js +6 -6
  79. package/src/components/utils/math_utils.js +29 -29
  80. package/src/components/voiceComponent.vue +119 -119
  81. package/src/main.js +60 -60
  82. package/vue.config.js +55 -55
@@ -1,109 +1,109 @@
1
- <template>
2
- <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}">
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
- </van-popup>
25
- </template>
26
-
27
- <script>
28
- export default {
29
- data () {
30
- return {
31
- previewShowPopup: false
32
- }
33
- },
34
- props:{
35
- url:{
36
- type: String,
37
- required: true,
38
- },
39
- officePreviewType:{
40
- type: String,
41
- default: ''
42
- }
43
- },
44
- computed:{
45
- previewUrl() {
46
- console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
47
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
48
- if(this.url != '') {
49
- if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
50
- url += btoa(encodeURIComponent(this.url))
51
- } else {
52
- url += btoa(this.url)
53
- }
54
- }
55
- if(this.officePreviewType !== '') {
56
- url += '&officePreviewType=pdf'
57
- }
58
- return url
59
- },
60
- fileType() {
61
- const fileType = this.url.substring(this.url.lastIndexOf('.'));
62
- if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
63
- return 'VIDEO'
64
- } else {
65
- return 'OTHER'
66
- }
67
-
68
- }
69
- },
70
- methods :{
71
- close() {
72
- this.previewShowPopup = false
73
- },
74
- loadIframe(item) {
75
- let iframe = document.getElementsByClassName('preview_iframe')[0]
76
- iframe.onload(() =>{
77
- iframe.contentWindow.postMessage({
78
- type: "positionText",
79
- data: item.text,
80
- page: item.page
81
- }, '*')
82
- })
83
- // if(preview) {
84
- // preview.postMessage({
85
- // type: "positionText",
86
- // data: ``
87
- // }, '*')
88
- // }
89
- }
90
- }
91
- }
92
- </script>
93
-
94
- <style lang="less" scoped>
95
- .preview_iframe {
96
- width: 100%;
97
- height: calc(100% - 52px);
98
- }
99
- .footer {
100
- width: calc(100% - 40px);
101
- height: 50px;
102
- display: flex;
103
- align-items: center;
104
- justify-content: space-between;
105
- cursor: pointer;
106
- padding: 0 20px;
107
- border-bottom: 1px solid #cccccc;
108
- }
1
+ <template>
2
+ <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}">
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
+ </van-popup>
25
+ </template>
26
+
27
+ <script>
28
+ export default {
29
+ data () {
30
+ return {
31
+ previewShowPopup: false
32
+ }
33
+ },
34
+ props:{
35
+ url:{
36
+ type: String,
37
+ required: true,
38
+ },
39
+ officePreviewType:{
40
+ type: String,
41
+ default: ''
42
+ }
43
+ },
44
+ computed:{
45
+ previewUrl() {
46
+ console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
47
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
48
+ if(this.url != '') {
49
+ if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
50
+ url += btoa(encodeURIComponent(this.url))
51
+ } else {
52
+ url += btoa(this.url)
53
+ }
54
+ }
55
+ if(this.officePreviewType !== '') {
56
+ url += '&officePreviewType=pdf'
57
+ }
58
+ return url
59
+ },
60
+ fileType() {
61
+ const fileType = this.url.substring(this.url.lastIndexOf('.'));
62
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
63
+ return 'VIDEO'
64
+ } else {
65
+ return 'OTHER'
66
+ }
67
+
68
+ }
69
+ },
70
+ methods :{
71
+ close() {
72
+ this.previewShowPopup = false
73
+ },
74
+ loadIframe(item) {
75
+ let iframe = document.getElementsByClassName('preview_iframe')[0]
76
+ iframe.onload(() =>{
77
+ iframe.contentWindow.postMessage({
78
+ type: "positionText",
79
+ data: item.text,
80
+ page: item.page
81
+ }, '*')
82
+ })
83
+ // if(preview) {
84
+ // preview.postMessage({
85
+ // type: "positionText",
86
+ // data: ``
87
+ // }, '*')
88
+ // }
89
+ }
90
+ }
91
+ }
92
+ </script>
93
+
94
+ <style lang="less" scoped>
95
+ .preview_iframe {
96
+ width: 100%;
97
+ height: calc(100% - 52px);
98
+ }
99
+ .footer {
100
+ width: calc(100% - 40px);
101
+ height: 50px;
102
+ display: flex;
103
+ align-items: center;
104
+ justify-content: space-between;
105
+ cursor: pointer;
106
+ padding: 0 20px;
107
+ border-bottom: 1px solid #cccccc;
108
+ }
109
109
  </style>
@@ -1,128 +1,196 @@
1
- <template>
2
- <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}">
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
- <div v-else-if="fileType == 'HTML'" style="width: 100%;height: calc(100% - 70px)">
13
- <div class="preview_iframe" style="text-algin:left" v-html="fileText"></div>
14
- </div>
15
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
16
- <iframe class="preview_iframe"
17
- :src="url"
18
- width="100%"
19
- height="100%"
20
- scrolling="100%"
21
- frameborder="no"
22
- border="0"></iframe>
23
- </template>
24
- <template v-else>
25
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
26
- </template>
27
- </van-popup>
28
- </template>
29
-
30
- <script>
31
- export default {
32
- data () {
33
- return {
34
- previewShowPopup: false,
35
- fileText:''
36
- }
37
- },
38
- props:{
39
- url:{
40
- type: String,
41
- required: true,
42
- },
43
- officePreviewType:{
44
- type: String,
45
- default: ''
46
- },
47
- fileType :{
48
- type: String,
49
- default: ''
50
- }
51
- },
52
- computed:{
53
- previewUrl() {
54
- console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
55
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
56
- // if(this.url != '') {
57
- // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
58
- // url += btoa(encodeURIComponent(this.url))
59
- // } else {
60
- // url += btoa(this.url)
61
- // }
62
- // }
63
- url = url + this.url
64
- if(this.officePreviewType !== '') {
65
- url += '&officePreviewType=pdf'
66
- }
67
- return url
68
- },
69
- // fileType() {
70
- // const fileType = this.url.substring(this.url.lastIndexOf('.'));
71
- // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
72
- // return 'VIDEO'
73
- // } else {
74
- // return 'OTHER'
75
- // }
76
-
77
- // }
78
- },
79
- methods :{
80
- close() {
81
- this.previewShowPopup = false
82
- },
83
- loadIframe(item) {
84
- let iframe = document.getElementsByClassName('preview_iframe')[0]
85
- iframe.onload(() =>{
86
- let type = item.srcContent ? 'positionText' : 'positionNumber'
87
- iframe.contentWindow.postMessage({
88
- type: type,
89
- data: item.srcContent,
90
- }, '*')
91
- })
92
- // if(preview) {
93
- // preview.postMessage({
94
- // type: "positionText",
95
- // data: ``
96
- // }, '*')
97
- // }
98
- },
99
- getBolb() {
100
- this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false',{
101
- fileInOssPath: this.url,
102
- templateId: ''
103
- }).then(res =>{
104
- if (res.data.code == 0) {
105
- this.fileText = res.data.data
106
- }
107
- })
108
- },
109
- }
110
- }
111
- </script>
112
-
113
- <style lang="less" scoped>
114
- .preview_iframe {
115
- width: 100%;
116
- height: calc(100% - 52px);
117
- }
118
- .footer {
119
- width: calc(100% - 40px);
120
- height: 50px;
121
- display: flex;
122
- align-items: center;
123
- justify-content: space-between;
124
- cursor: pointer;
125
- padding: 0 20px;
126
- border-bottom: 1px solid #cccccc;
127
- }
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
+ <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
+ <div v-else-if="fileType == 'HTML'" style="width: 100%;height: calc(100% - 70px)">
13
+ <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
14
+ </div>
15
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
16
+ <iframe class="preview_iframe"
17
+ :src="url"
18
+ width="100%"
19
+ height="100%"
20
+ scrolling="100%"
21
+ frameborder="no"
22
+ border="0"></iframe>
23
+ </template>
24
+ <template v-else>
25
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
26
+ </template>
27
+ </van-popup>
28
+ <el-drawer
29
+ title="我是标题"
30
+ :visible.sync="drawer"
31
+ v-else
32
+ :with-header="false"
33
+ size="60%"
34
+ >
35
+ <div class="drawer-footer">
36
+ <span>查看详情</span>
37
+ <section @click="close">
38
+ <i class="iconfont guoran-shanchu"></i>
39
+ </section>
40
+ </div>
41
+ <div v-if="fileType == 'VIDEO'" style="width: 100%;height: 100%">
42
+ <video :src="url" controls width="100%;" height="98%"></video>
43
+ </div>
44
+ <div v-else-if="fileType == 'HTML'" style="width: 100%;height: 100%">
45
+ <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
46
+ </div>
47
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
48
+ <iframe class="preview_iframe"
49
+ :src="url"
50
+ width="100%"
51
+ height="100%"
52
+ scrolling="100%"
53
+ frameborder="no"
54
+ border="0"></iframe>
55
+ </template>
56
+ <template v-else>
57
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
58
+ </template>
59
+ </el-drawer>
60
+ </template>
61
+
62
+ <script>
63
+ export default {
64
+ data () {
65
+ return {
66
+ previewShowPopup: false,
67
+ fileText:'',
68
+ fileType:"",
69
+ isPc:true,
70
+ drawer:false
71
+ }
72
+ },
73
+ props:{
74
+ url:{
75
+ type: String,
76
+ required: true,
77
+ },
78
+ officePreviewType:{
79
+ type: String,
80
+ default: ''
81
+ }
82
+ },
83
+ computed:{
84
+ previewUrl() {
85
+ console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
86
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
87
+ // if(this.url != '') {
88
+ // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
89
+ // url += btoa(encodeURIComponent(this.url))
90
+ // } else {
91
+ // url += btoa(this.url)
92
+ // }
93
+ // }
94
+ url = url + this.url
95
+ if(this.officePreviewType !== '') {
96
+ url += '&officePreviewType=pdf'
97
+ }
98
+ return url
99
+ },
100
+ // fileType() {
101
+ // const fileType = this.url.substring(this.url.lastIndexOf('.'));
102
+ // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
103
+ // return 'VIDEO'
104
+ // } else {
105
+ // return 'OTHER'
106
+ // }
107
+
108
+ // }
109
+ },
110
+ methods :{
111
+ close() {
112
+ this.previewShowPopup = false;
113
+ this.drawer = false;
114
+ },
115
+ loadIframe(item) {
116
+ let iframe = document.getElementsByClassName('preview_iframe')[0]
117
+ iframe.onload(() =>{
118
+ let type = item.srcContent ? 'positionText' : 'positionNumber'
119
+ iframe.contentWindow.postMessage({
120
+ type: type,
121
+ data: item.srcContent,
122
+ }, '*')
123
+ })
124
+ // if(preview) {
125
+ // preview.postMessage({
126
+ // type: "positionText",
127
+ // data: ``
128
+ // }, '*')
129
+ // }
130
+ },
131
+ getBolb() {
132
+ this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false',{
133
+ fileInOssPath: this.url,
134
+ templateId: ''
135
+ }).then(res =>{
136
+ if (res.data.code == 0) {
137
+ this.fileText = res.data.data
138
+ }
139
+ })
140
+ },
141
+ }
142
+ }
143
+ </script>
144
+
145
+ <style lang="less" scoped>
146
+ .preview_iframe {
147
+ width: 100%;
148
+ height: calc(100% - 52px);
149
+ }
150
+ .preview_iframe_html{
151
+ width: 100%;
152
+ height: calc(100% - 52px);
153
+ overflow-y: scroll;
154
+ text-align: left;
155
+ box-sizing: border-box;
156
+ padding: 16px;
157
+ /deep/.lake-content{
158
+ margin-left: 10px;
159
+ }
160
+ /deep/a:active, a:hover, a:link, a:visited{
161
+ color: #366aff;
162
+ }
163
+ /deep/li:not(.rich-text-li), ol:not(.list-paddingleft-2), ul:not(.list-paddingleft-2){
164
+ list-style-type: auto;
165
+ }
166
+ /deep/img{
167
+ width: 100%;
168
+ }
169
+ /deep/.ne-table{
170
+ width: 100% !important;
171
+ }
172
+ }
173
+ .footer {
174
+ width: calc(100% - 40px);
175
+ height: 50px;
176
+ display: flex;
177
+ align-items: center;
178
+ justify-content: space-between;
179
+ cursor: pointer;
180
+ padding: 0 20px;
181
+ border-bottom: 1px solid #cccccc;
182
+ }
183
+ .drawer-footer{
184
+ width:100%;
185
+ height: 50px;
186
+ display: flex;
187
+ align-items: center;
188
+ justify-content: space-between;
189
+ cursor: pointer;
190
+ padding: 0 20px;
191
+ border-bottom: 1px solid #cccccc;
192
+ }
193
+ /deep/.el-drawer__body{
194
+ height: 100%;
195
+ }
128
196
  </style>