askbot-dragon 1.6.22-beta → 1.6.24-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 (90) 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 -59
  5. package/public/index.html +74 -74
  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 +75 -11
  13. package/src/assets/js/hammer.js +100 -89
  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 -192
  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 -154
  21. package/src/components/AiGuide.vue +466 -468
  22. package/src/components/AnswerDocknowledge.vue +597 -556
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +4969 -4820
  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 +132 -132
  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 +162 -142
  36. package/src/components/assetDetails.vue +370 -370
  37. package/src/components/assetMessage.vue +228 -228
  38. package/src/components/associationIntention.vue +355 -349
  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 +351 -351
  44. package/src/components/file/AliyunOssComponents.vue +108 -108
  45. package/src/components/formTemplate.vue +3576 -3581
  46. package/src/components/kkview.vue +1138 -1138
  47. package/src/components/loadingProcess.vue +164 -164
  48. package/src/components/message/ActionAlertIframe.vue +112 -112
  49. package/src/components/message/ShopMessage.vue +164 -164
  50. package/src/components/message/TextMessage.vue +924 -924
  51. package/src/components/message/TicketMessage.vue +201 -201
  52. package/src/components/message/swiper/index.js +4 -4
  53. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  54. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  55. package/src/components/msgLoading.vue +231 -231
  56. package/src/components/myPopup.vue +70 -70
  57. package/src/components/newPdfPosition.vue +878 -0
  58. package/src/components/pdfPosition.vue +1508 -1328
  59. package/src/components/popup.vue +227 -227
  60. package/src/components/previewDoc.vue +242 -242
  61. package/src/components/previewPdf.vue +319 -302
  62. package/src/components/receiverMessagePlatform.vue +65 -65
  63. package/src/components/recommend.vue +80 -80
  64. package/src/components/selector/hOption.vue +20 -20
  65. package/src/components/selector/hSelector.vue +199 -199
  66. package/src/components/selector/hWrapper.vue +216 -216
  67. package/src/components/senderMessagePlatform.vue +50 -50
  68. package/src/components/source/BotMessage.vue +24 -24
  69. package/src/components/source/CustomMessage.vue +24 -24
  70. package/src/components/test.vue +260 -260
  71. package/src/components/tree.vue +294 -294
  72. package/src/components/utils/AliyunIssUtil.js +81 -81
  73. package/src/components/utils/ckeditor.js +174 -177
  74. package/src/components/utils/ckeditorImageUpload/command.js +109 -111
  75. package/src/components/utils/ckeditorImageUpload/editing.js +11 -11
  76. package/src/components/utils/ckeditorImageUpload/plugin-image.js +11 -11
  77. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +40 -40
  78. package/src/components/utils/ckeditorfileUpload/common.js +181 -174
  79. package/src/components/utils/ckeditorfileUpload/editing.js +11 -11
  80. package/src/components/utils/ckeditorfileUpload/plugin_file.js +11 -11
  81. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +35 -35
  82. package/src/components/utils/format_date.js +25 -25
  83. package/src/components/utils/index.js +6 -6
  84. package/src/components/utils/math_utils.js +29 -29
  85. package/src/components/voiceComponent.vue +119 -119
  86. package/src/components/welcomeKnowledgeFile.vue +230 -0
  87. package/src/components/welcomeLlmCard.vue +139 -0
  88. package/src/main.js +60 -60
  89. package/vue.config.js +55 -55
  90. package/src/assets/js/obsBrowser.js +0 -63
@@ -1,120 +1,120 @@
1
- <template>
2
- <div id="voice-component">
3
- <div id="voice-component-container">
4
- <div id="voice-component-c">
5
- <div class="voice-btn">
6
- <i class="iconfont arsenalchess-pawn-solid"></i>
7
- </div>
8
- </div>
9
- <div class="close-voice" @click="closeVoice">
10
- <div class="voice-style">
11
- <i class="arsenal_icon arsenalcuo1"></i>
12
- </div>
13
- </div>
14
- <div class="voice-tip">
15
- <slot name="voiceTip"></slot>
16
- </div>
17
- </div>
18
-
19
- </div>
20
- </template>
21
-
22
- <script>
23
- export default {
24
- name: "voice_component",
25
- data(){
26
- return{
27
-
28
- }
29
- },
30
- methods:{
31
- closeVoice(){
32
- this.$emit('closeVoice')
33
- }
34
- }
35
- }
36
- </script>
37
-
38
- <style scoped lang="less">
39
- #voice-component{
40
- position: fixed;
41
- bottom: 0;
42
- width: 100%;
43
- z-index: 9999;
44
- left: 0;
45
- #voice-component-container{
46
- position: relative;
47
- /* .half-top-ovals{
48
- width: 130%;
49
- position: relative;
50
- left: -15%;
51
- height: 80px;
52
- padding-bottom: 40px;
53
- padding-right: 20px;
54
- padding-left: 20px;
55
- !* width: 200px;*!
56
- background: lightcoral;
57
- border-radius: 50% 50% 0 0;
58
- }*/
59
- #voice-component-c{
60
- height: 200px;
61
- width: 130%;
62
- position: relative;
63
- left: -15%;
64
- bottom: -80px;
65
- background: linear-gradient(180deg, #EEF1F7, #FFFFFF);
66
- border: 2px solid white;
67
- border-radius: 100% 100% 0 0;
68
- border-bottom: none;
69
- display: flex;
70
- align-items: center;
71
- justify-content: center;
72
- .voice-btn{
73
- display: flex;
74
- align-items: center;
75
- justify-content: center;
76
- position: absolute;
77
- top: 50px;
78
- i{
79
- color: #366aff;
80
- font-size: 30px;
81
- }
82
- }
83
- }
84
- .voice-tip{
85
- width: 100%;
86
- position: absolute;
87
- top: -40px;
88
- display: flex;
89
- align-items: center;
90
- justify-content: center;
91
- color: #FFFFFF;
92
- font-size: 13px;
93
- }
94
- .close-voice{
95
- width: 100%;
96
- position: absolute;
97
- top: -35px;
98
- display: flex;
99
- align-items: center;
100
- justify-content: center;
101
- .voice-style{
102
- width: 60px;
103
- height: 60px;
104
- background: #EEF1F7;
105
- border-radius: 50%;
106
- display: flex;
107
- align-items: center;
108
- justify-content: center;
109
- transition: all 0.3s;
110
- i{
111
- font-size: 24px;
112
- color: #999999;
113
- transition: all 0.3s;
114
- }
115
- }
116
- }
117
- }
118
-
119
- }
1
+ <template>
2
+ <div id="voice-component">
3
+ <div id="voice-component-container">
4
+ <div id="voice-component-c">
5
+ <div class="voice-btn">
6
+ <i class="iconfont arsenalchess-pawn-solid"></i>
7
+ </div>
8
+ </div>
9
+ <div class="close-voice" @click="closeVoice">
10
+ <div class="voice-style">
11
+ <i class="arsenal_icon arsenalcuo1"></i>
12
+ </div>
13
+ </div>
14
+ <div class="voice-tip">
15
+ <slot name="voiceTip"></slot>
16
+ </div>
17
+ </div>
18
+
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+ export default {
24
+ name: "voice_component",
25
+ data(){
26
+ return{
27
+
28
+ }
29
+ },
30
+ methods:{
31
+ closeVoice(){
32
+ this.$emit('closeVoice')
33
+ }
34
+ }
35
+ }
36
+ </script>
37
+
38
+ <style scoped lang="less">
39
+ #voice-component{
40
+ position: fixed;
41
+ bottom: 0;
42
+ width: 100%;
43
+ z-index: 9999;
44
+ left: 0;
45
+ #voice-component-container{
46
+ position: relative;
47
+ /* .half-top-ovals{
48
+ width: 130%;
49
+ position: relative;
50
+ left: -15%;
51
+ height: 80px;
52
+ padding-bottom: 40px;
53
+ padding-right: 20px;
54
+ padding-left: 20px;
55
+ !* width: 200px;*!
56
+ background: lightcoral;
57
+ border-radius: 50% 50% 0 0;
58
+ }*/
59
+ #voice-component-c{
60
+ height: 200px;
61
+ width: 130%;
62
+ position: relative;
63
+ left: -15%;
64
+ bottom: -80px;
65
+ background: linear-gradient(180deg, #EEF1F7, #FFFFFF);
66
+ border: 2px solid white;
67
+ border-radius: 100% 100% 0 0;
68
+ border-bottom: none;
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ .voice-btn{
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ position: absolute;
77
+ top: 50px;
78
+ i{
79
+ color: #366aff;
80
+ font-size: 30px;
81
+ }
82
+ }
83
+ }
84
+ .voice-tip{
85
+ width: 100%;
86
+ position: absolute;
87
+ top: -40px;
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ color: #FFFFFF;
92
+ font-size: 13px;
93
+ }
94
+ .close-voice{
95
+ width: 100%;
96
+ position: absolute;
97
+ top: -35px;
98
+ display: flex;
99
+ align-items: center;
100
+ justify-content: center;
101
+ .voice-style{
102
+ width: 60px;
103
+ height: 60px;
104
+ background: #EEF1F7;
105
+ border-radius: 50%;
106
+ display: flex;
107
+ align-items: center;
108
+ justify-content: center;
109
+ transition: all 0.3s;
110
+ i{
111
+ font-size: 24px;
112
+ color: #999999;
113
+ transition: all 0.3s;
114
+ }
115
+ }
116
+ }
117
+ }
118
+
119
+ }
120
120
  </style>
@@ -0,0 +1,230 @@
1
+ <template>
2
+ <div class="message_list_welcome_knowledge_file">
3
+ <div class="mlwm-title">{{ msgContent.title }}</div>
4
+ <div class="mlwm-des">
5
+ <span class="mlwm-des-pre">{{ msgContent.description }}</span>
6
+ </div>
7
+ <div class="mlwm-msg-type">
8
+ <div v-for="(item, itemIndex) in msgContent.knowledgeFileInfos"
9
+ :key="item.id"
10
+ :class="['mmt-cell', 'mmt-cell-' + itemIndex]"
11
+ @click="clickFun(item)"
12
+ >
13
+ <div class="mmt-cell-img">
14
+ <img :src="fileIcon(item.type)" alt="" srcset="">
15
+ </div>
16
+ <div class="mmt-cell-des">
17
+ <span class="mmt-cell-des-title">{{item.name}}</span>
18
+ <span class="mmt-cell-des-detail">
19
+ <div class="mmt-cell-avatar">
20
+ <img :src="item.creatorAvatar" alt="" srcset="">
21
+ </div>
22
+ <div class="mmt-creator-name">{{ item.creatorName }}</div>
23
+ <div class="mmt-border"></div>
24
+ <div class="mmt-update-time">{{ new Date(item.updateTime).Format('yyyy-MM-dd hh:mm') }}</div>
25
+ </span>
26
+ </div>
27
+ </div>
28
+ <div class="load_moreKnowledge" v-if="msgContent.totalCount - (msgContent.pageSize * msgContent.page) > 0">
29
+ <span>查看更多</span>
30
+ </div>
31
+ </div>
32
+ <previewPdf ref="previewPdf" :url="previewHref" :sourceFileType="sourceFileType" officePreviewType="pdf"></previewPdf>
33
+ </div>
34
+ </template>
35
+
36
+ <script>
37
+ import { imageTypeObj, isMobile } from "../assets/js/common";
38
+ import previewPdf from "./previewPdf";
39
+ export default {
40
+ name: "welcomeKnowledgeFile",
41
+ props:{
42
+ msgContent:{
43
+ type:Object,
44
+ default(){
45
+ return {}
46
+ }
47
+ }
48
+ },
49
+ data(){
50
+ return{
51
+ previewHref: "",
52
+ sourceFileType:'',
53
+ }
54
+ },
55
+ components:{
56
+ previewPdf
57
+ },
58
+ methods:{
59
+ fileIcon(type){
60
+ return 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + imageTypeObj[type] + '.png'
61
+ },
62
+ clickFun(item){
63
+ this.$emit('knowledgeClickFun',item);
64
+ this.$refs.previewPdf.previewShowPopup = false;
65
+ this.$refs.previewPdf.drawer = false;
66
+ let index = item.url.lastIndexOf('?')
67
+ let type = ''
68
+ let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
69
+ if (index !== -1) {
70
+ item.url = item.url.substring(0, index)
71
+ type = this.fileType(item.url)
72
+ } else {
73
+ type = this.fileType(item.url)
74
+ }
75
+ if (type === '' || type === 'OTHER') {
76
+ httpUrl = httpUrl += '?needEncrypt=true'
77
+ } else {
78
+ httpUrl = httpUrl += '?needEncrypt=false'
79
+ }
80
+ this.$http.post(httpUrl, {
81
+ "fileInOssPath":item.url
82
+ }).then(res =>{
83
+ if(res.data.code == '0') {
84
+ this.previewHref = res.data.data;
85
+ this.sourceFileType = item.url.substring(item.url.lastIndexOf('.'))
86
+ let isOhmPc = sessionStorage.getItem('isOhmPc')
87
+ if (isMobile() || isOhmPc == 'true'){
88
+ this.$refs.previewPdf.drawer = true;
89
+ this.$refs.previewPdf.previewShowPopup = true;
90
+ } else {
91
+ this.$refs.previewPdf.previewShowPopup = false;
92
+ this.$refs.previewPdf.drawer = true;
93
+ }
94
+ this.$refs.previewPdf.fileType = type
95
+ this.$refs.previewPdf.tagIds = item.tagIds
96
+ this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false
97
+ if(item.tagIds && item.tagIds.length != 0) {
98
+ this.$refs.previewPdf.loading = false
99
+ return
100
+ }
101
+ this.$nextTick(() =>{
102
+ if(item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
103
+ this.$refs.previewPdf.getBolb(item)
104
+ }
105
+ this.$refs.previewPdf.loadIframe(item)
106
+ })
107
+ }
108
+ })
109
+ },
110
+ fileType (url) {
111
+ const fileType = url.substring(url.lastIndexOf('.'));
112
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc' || fileType === '.mav' || fileType === '.MAV' || fileType == '.mp3' || fileType == '.MP3' || fileType === '.wav') {
113
+ return 'VIDEO'
114
+ } else if (fileType === '.html') {
115
+ return 'HTML'
116
+ } else {
117
+ return 'OTHER'
118
+ }
119
+ },
120
+ }
121
+ };
122
+ </script>
123
+
124
+ <style scoped lang="less">
125
+ .message_list_welcome_knowledge_file{
126
+ .mlwm-title {
127
+ font-size: 18px;
128
+ font-weight: 600;
129
+ color: #333333;
130
+ }
131
+ .mlwm-des{
132
+ color: #666666;
133
+ margin-top: 9px;
134
+ font-size: 14px;
135
+ font-weight: 500;
136
+ .mlwm-des-after {
137
+ display: flex;
138
+ align-items: center;
139
+ height: 28px;
140
+ line-height: 28px;
141
+ .mlwm-des-after-cir {
142
+ flex: none;
143
+ width: 6px;
144
+ height: 6px;
145
+ background: #366AFF;
146
+ border-radius: 50%;
147
+ margin-right: 6px;
148
+ }
149
+ }
150
+ }
151
+
152
+ .mlwm-msg-type{
153
+ margin-top: 9px;
154
+ .mmt-cell{
155
+ flex: 1;
156
+ padding: 10px;
157
+ background: #F0F4FF;
158
+ border-radius: 8px;
159
+ margin: 8px 0;
160
+ display: flex;
161
+ justify-content: space-between;
162
+ align-items: center;
163
+ cursor: pointer;
164
+ .mmt-cell-img{
165
+ flex: none;
166
+ width: 20px;
167
+ margin-right: 8px;
168
+ img {
169
+ height: 20px;
170
+ width: 20px;
171
+ }
172
+ }
173
+ .mmt-cell-des{
174
+ flex: auto;
175
+ text-align: left;
176
+ display: flex;
177
+ flex-direction: column;
178
+ padding-right: 12px;
179
+ .mmt-cell-des-title {
180
+ font-size: 14px;
181
+ color: #333333;
182
+ font-weight: 600;
183
+ margin-bottom: 6px;
184
+ }
185
+ .mmt-cell-des-detail{
186
+ font-size: 12px;
187
+ display: flex;
188
+ align-items: center;
189
+ .mmt-cell-avatar{
190
+ flex: none;
191
+ width: 16px;
192
+ margin-right: 8px;
193
+ display: flex;
194
+ align-items: center;
195
+ img {
196
+ height: 16px;
197
+ width: 16px;
198
+ border-radius: 50%;
199
+ }
200
+ }
201
+ .mmt-creator-name{
202
+ padding-right: 6px;
203
+ color: #666666;
204
+ }
205
+ .mmt-update-time{
206
+ color: #666666;
207
+ padding-left: 6px;
208
+ }
209
+ .mmt-border{
210
+ height: 12px;
211
+ width: 1px;
212
+ background-color: #666666;
213
+ }
214
+ }
215
+ }
216
+ }
217
+ .load_moreKnowledge{
218
+ display: flex;
219
+ align-items: center;
220
+ justify-content: center;
221
+ height: 60px;
222
+ background: #F0F4FF;
223
+ color: #000000;
224
+ font-size: 14px;
225
+ cursor: pointer;
226
+ margin: 8px 0;
227
+ }
228
+ }
229
+ }
230
+ </style>
@@ -0,0 +1,139 @@
1
+ <template>
2
+ <div class="message_list-welcome-m">
3
+ <div class="mlwm-title">{{ msgContent.title }}</div>
4
+ <div class="mlwm-des">
5
+ <span class="mlwm-des-pre">{{ msgContent.description }}</span>
6
+ <div class="mlwm-des-after" v-if="false">
7
+ <span class="mlwm-des-after-cir"></span>
8
+ <span class="mlwm-des-after-text">可以试着这样问我:</span>
9
+ </div>
10
+ </div>
11
+ <div class="mlwm-msg-type">
12
+ <div v-for="(item, itemIndex) in msgContent.items"
13
+ :key="item.id"
14
+ :class="['mmt-cell', 'mmt-cell-' + itemIndex]"
15
+ @click="clickFun(item)"
16
+ >
17
+ <div class="mmt-cell-img">
18
+ <img :src="item.icon" alt="" srcset="">
19
+ </div>
20
+ <div class="mmt-cell-des">
21
+ <span class="mmt-cell-des-title">{{item.title}}</span>
22
+ <span class="mmt-cell-des-detail">{{item.description}}</span>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </template>
28
+
29
+ <script>
30
+ export default {
31
+ name: "welcomeLlmCard",
32
+ props:{
33
+ msgContent:{
34
+ type:Object,
35
+ default(){
36
+ return {}
37
+ }
38
+ }
39
+ },
40
+ methods:{
41
+ clickFun(item){
42
+ this.$emit('llmCardClickFun',item)
43
+ }
44
+ }
45
+ };
46
+ </script>
47
+
48
+ <style scoped lang="less">
49
+ .message_list-welcome-m{
50
+ .mlwm-title {
51
+ font-size: 18px;
52
+ font-weight: 600;
53
+ color: #333333;
54
+ }
55
+ .mlwm-des{
56
+ color: #666666;
57
+ margin-top: 9px;
58
+ font-size: 14px;
59
+ font-weight: 500;
60
+ .mlwm-des-after {
61
+ display: flex;
62
+ align-items: center;
63
+ height: 28px;
64
+ line-height: 28px;
65
+ .mlwm-des-after-cir {
66
+ flex: none;
67
+ width: 6px;
68
+ height: 6px;
69
+ background: #366AFF;
70
+ border-radius: 50%;
71
+ margin-right: 6px;
72
+ }
73
+ }
74
+ }
75
+
76
+ .mlwm-msg-type{
77
+ margin-top: 9px;
78
+ .mmt-cell{
79
+ flex: 1;
80
+ padding: 10px;
81
+ background: #F0F4FF;
82
+ border-radius: 8px;
83
+ margin: 8px 0;
84
+ display: flex;
85
+ justify-content: space-between;
86
+ align-items: center;
87
+ cursor: pointer;
88
+ .mmt-cell-img{
89
+ flex: none;
90
+ width: 46px;
91
+ margin-right: 8px;
92
+ img {
93
+ height: 46px;
94
+ width: 46px;
95
+ }
96
+ }
97
+ .mmt-cell-des{
98
+ flex: auto;
99
+ text-align: left;
100
+ display: flex;
101
+ flex-direction: column;
102
+ padding-right: 12px;
103
+ .mmt-cell-des-title {
104
+ font-size: 14px;
105
+ color: #000000;
106
+ font-weight: 600;
107
+ margin-bottom: 6px;
108
+ }
109
+ .mmt-cell-des-detail{
110
+ font-size: 12px;
111
+ display: flex;
112
+ align-items: center;
113
+ .mmt-cell-avatar{
114
+ flex: none;
115
+ width: 20px;
116
+ margin-right: 8px;
117
+ display: flex;
118
+ align-items: center;
119
+ img {
120
+ height: 20px;
121
+ width: 20px;
122
+ border-radius: 50%;
123
+ }
124
+ }
125
+ .mmt-creator-name{
126
+ padding-right: 6px;
127
+ border-right: 1px solid #666666;
128
+ color: #666666;
129
+ }
130
+ .mmt-update-time{
131
+ color: #666666;
132
+ padding-left: 6px;
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ }
139
+ </style>