askbot-dragon 1.5.78-beta → 1.5.78

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 (46) hide show
  1. package/package.json +1 -4
  2. package/public/index.html +1 -3
  3. package/src/assets/image/default_avt_ui.png +0 -0
  4. package/src/assets/image/filtType/audio.png +0 -0
  5. package/src/assets/image/filtType/excel1.png +0 -0
  6. package/src/assets/image/filtType/general.png +0 -0
  7. package/src/assets/image/filtType/image1.png +0 -0
  8. package/src/assets/image/filtType/link.png +0 -0
  9. package/src/assets/image/filtType/md2.png +0 -0
  10. package/src/assets/image/filtType/mode.png +0 -0
  11. package/src/assets/image/filtType/news.png +0 -0
  12. package/src/assets/image/filtType/pdf1.png +0 -0
  13. package/src/assets/image/filtType/ppt1.png +0 -0
  14. package/src/assets/image/filtType/selfadd1.png +0 -0
  15. package/src/assets/image/filtType/txt1.png +0 -0
  16. package/src/assets/image/filtType/video.png +0 -0
  17. package/src/assets/image/filtType/wechat.png +0 -0
  18. package/src/assets/image/filtType/word1.png +0 -0
  19. package/src/assets/image/loading.gif +0 -0
  20. package/src/assets/js/common.js +241 -0
  21. package/src/components/ActionAlertIframe.vue +43 -1
  22. package/src/components/AnswerDocknowledge.vue +849 -275
  23. package/src/components/ConversationContainer.vue +354 -27
  24. package/src/components/MyEditor.vue +351 -0
  25. package/src/components/answerRadio.vue +115 -61
  26. package/src/components/assetDetails.vue +13 -5
  27. package/src/components/associationIntention.vue +2 -2
  28. package/src/components/chatContent.vue +1 -1
  29. package/src/components/formTemplate.vue +77 -111
  30. package/src/components/intelligentSummary.vue +228 -0
  31. package/src/components/pdfPosition.vue +23 -12
  32. package/src/components/previewDoc.vue +5 -0
  33. package/src/components/previewPdf.vue +675 -199
  34. package/src/components/welcomeKnowledgeFile.vue +341 -0
  35. package/src/components/welcomeLlmCard.vue +141 -0
  36. package/src/components/welcomeSuggest.vue +98 -0
  37. package/src/main.js +0 -3
  38. package/vue.config.js +0 -1
  39. package/src/components/utils/ckeditorImageUpload/command.js +0 -110
  40. package/src/components/utils/ckeditorImageUpload/editing.js +0 -12
  41. package/src/components/utils/ckeditorImageUpload/plugin-image.js +0 -12
  42. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +0 -41
  43. package/src/components/utils/ckeditorfileUpload/common.js +0 -182
  44. package/src/components/utils/ckeditorfileUpload/editing.js +0 -12
  45. package/src/components/utils/ckeditorfileUpload/plugin_file.js +0 -12
  46. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +0 -34
@@ -0,0 +1,341 @@
1
+ <template>
2
+ <div class="message_list_welcome_knowledge_file">
3
+ <div class="mlwm-title" v-if="msgContent.enableTitle">{{ msgContent.title }}</div>
4
+ <div class="mlwm-des" v-if="msgContent.enableDescription">
5
+ <span class="mlwm-des-pre">{{ msgContent.description }}</span>
6
+ </div>
7
+ <div class="mlwm-msg-type">
8
+ <div
9
+ v-for="(item, itemIndex) in msgContent.knowledgeFileInfos"
10
+ :key="item.id"
11
+ :class="['mmt-cell', 'mmt-cell-' + itemIndex]"
12
+ @click="clickFun(item)"
13
+ >
14
+ <div class="mmt-cell-img">
15
+ <img :src="fileIcon(item.type)" alt srcset />
16
+ </div>
17
+ <div class="mmt-cell-des">
18
+ <span class="mmt-cell-des-title">{{item.name}}</span>
19
+ <span class="mmt-cell-des-detail">
20
+ <div class="mmt-cell-avatar">
21
+ <img v-if="item.creatorAvatar" :src="item.creatorAvatar" alt srcset />
22
+ <img v-else src="../assets/image/default_avt_ui.png" alt srcset />
23
+ </div>
24
+ <div class="mmt-creator-name">{{ item.creatorName }}</div>
25
+ <div class="mmt-border"></div>
26
+ <div class="mmt-update-time">{{ new Date(item.updateTime).Format('yyyy-MM-dd hh:mm') }}</div>
27
+ </span>
28
+ </div>
29
+ </div>
30
+ <div v-if="msgContent.knowledgeFileInfos.length % 2 != 0" class="mmt-cell booth_elements"></div>
31
+ <!-- v-if="msgContent.totalCount > msgContent.knowledgeFileInfos.length" -->
32
+
33
+ <div class="load_moreKnowledge" v-if="page < msgContent.totalPages" @click="loadMore">
34
+ <span>查看更多</span>
35
+ </div>
36
+ </div>
37
+ <previewPdf ref="previewPdf"
38
+ :url="previewHref"
39
+ :previewOssPath="previewOssPath"
40
+ :sourceFileType="sourceFileType"
41
+ officePreviewType="pdf"
42
+ @previewToDialog="previewToDialog"
43
+ @recommendQues="recommendQues"
44
+ @close="close"
45
+ @open="open"
46
+ :isHasChat="isHasChat"
47
+ :knowledgeId="previewKnowledgeId"
48
+ ></previewPdf>
49
+ </div>
50
+ </template>
51
+
52
+ <script>
53
+ import { imageTypeObj, isMobile } from "../assets/js/common";
54
+ import previewPdf from "./previewPdf";
55
+ export default {
56
+ name: "welcomeKnowledgeFile",
57
+ props: {
58
+ msgContent: {
59
+ type: Object,
60
+ default () {
61
+ return {}
62
+ }
63
+ },
64
+ mainId: {
65
+ type: String,
66
+ default: ''
67
+ },
68
+ corpId: {
69
+ type: String,
70
+ default: ''
71
+ },
72
+ userId: {
73
+ type: String,
74
+ default: ''
75
+ },
76
+ externalPreview: {
77
+ type: Boolean,
78
+ default: false
79
+ },
80
+ isHasChat:{
81
+ type: Boolean,
82
+ default: false
83
+ },
84
+ askKnowledgeId:{
85
+ type: String,
86
+ default: ''
87
+ },
88
+ activeKnowledgeId:{
89
+ type: String,
90
+ default: ''
91
+ },
92
+ bindCode:{
93
+ type: String,
94
+ default: ''
95
+ }
96
+ },
97
+ data () {
98
+ return {
99
+ previewHref: "",
100
+ sourceFileType: '',
101
+ page: 1,
102
+ previewKnowledgeId:"",
103
+ previewKnowledge:{},
104
+ previewOssPath:""
105
+ }
106
+ },
107
+ components: {
108
+ previewPdf
109
+ },
110
+ methods: {
111
+ fileIcon (type) {
112
+ return require('../assets/image/filtType/' + imageTypeObj[type] + '.png')
113
+ },
114
+ clickFun (item) {
115
+ if(this.externalPreview) {
116
+ this.$emit('knowledgeClickFun', item);
117
+ return
118
+ }
119
+ this.previewKnowledge = item;
120
+ this.previewKnowledgeId = item.knowledgeId
121
+ this.$refs.previewPdf.previewShowPopup = false;
122
+ this.$refs.previewPdf.drawer = false;
123
+ this.previewOssPath = item.url;
124
+ let index = item.url.lastIndexOf('?')
125
+ let type = ''
126
+ let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
127
+ if (index !== -1) {
128
+ item.url = item.url.substring(0, index)
129
+ type = this.fileType(item.url)
130
+ } else {
131
+ type = this.fileType(item.url)
132
+ }
133
+ if (type === '' || type === 'OTHER') {
134
+ httpUrl = httpUrl += '?needEncrypt=true'
135
+ } else {
136
+ httpUrl = httpUrl += '?needEncrypt=false'
137
+ }
138
+ this.$http.post(httpUrl, {
139
+ "fileInOssPath": item.url
140
+ }).then(res => {
141
+ if (res.data.code == '0') {
142
+ this.previewHref = res.data.data;
143
+ this.sourceFileType = item.url.substring(item.url.lastIndexOf('.'))
144
+ let isOhmPc = sessionStorage.getItem('isOhmPc')
145
+ if (isMobile() || isOhmPc == 'true') {
146
+ this.$refs.previewPdf.drawer = true;
147
+ this.$refs.previewPdf.previewShowPopup = true;
148
+ } else {
149
+ this.$refs.previewPdf.previewShowPopup = false;
150
+ this.$refs.previewPdf.drawer = true;
151
+ }
152
+ //聊一聊按钮的选中状态
153
+ if (this.activeKnowledgeId == item.knowledgeId){
154
+ this.$refs.previewPdf.previewKnowledgeId = this.activeKnowledgeId
155
+ } else {
156
+ this.$refs.previewPdf.previewKnowledgeId = ""
157
+ }
158
+ this.$refs.previewPdf.fileType = type
159
+ this.$refs.previewPdf.tagIds = item.tagIds
160
+ this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false
161
+ if (item.tagIds && item.tagIds.length != 0) {
162
+ this.$refs.previewPdf.loading = false
163
+ return
164
+ }
165
+ this.$nextTick(() => {
166
+ if (item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
167
+ this.$refs.previewPdf.getBolb(item)
168
+ }
169
+ this.$refs.previewPdf.loadIframe(item)
170
+ this.$refs.previewPdf.showSummary = true;
171
+ })
172
+ }
173
+ })
174
+ },
175
+ fileType (url) {
176
+ const fileType = url.substring(url.lastIndexOf('.'));
177
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc' || fileType === '.mav' || fileType === '.MAV' || fileType == '.mp3' || fileType == '.MP3' || fileType === '.wav') {
178
+ return 'VIDEO'
179
+ } else if (fileType === '.html') {
180
+ return 'HTML'
181
+ } else {
182
+ return 'OTHER'
183
+ }
184
+ },
185
+ loadMore () {
186
+ this.page = this.page + 1
187
+ let params = {
188
+ mainId: this.mainId,
189
+ corpId: this.corpId,
190
+ userId: this.userId,
191
+ page: this.page,
192
+ lastDays: this.msgContent.lastDays,
193
+ pageSize: this.msgContent.pageSize,
194
+ limitCount: this.msgContent.limitCount,
195
+ bindCode:this.bindCode
196
+ }
197
+ this.$http.post('/knowledge-api/knowledge/search/page', params).then(res => {
198
+ if (res.data && res.data.list && res.data.list.length != 0) {
199
+ this.msgContent.knowledgeFileInfos = this.msgContent.knowledgeFileInfos.concat(res.data.list)
200
+ }
201
+ })
202
+ },
203
+ previewToDialog(flag){
204
+ if (!flag){
205
+ this.$refs.previewPdf.previewKnowledgeId = ""
206
+ } else {
207
+ this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
208
+ }
209
+ this.$emit('previewToDialog',flag,this.previewKnowledgeId,this.previewKnowledge)
210
+ },
211
+ clearKnowledgeId(){
212
+ this.previewKnowledgeId = "";
213
+ },
214
+ recommendQues(item,knowledgeId){
215
+ this.$emit('recommendQues',item,knowledgeId)
216
+ },
217
+ open() {
218
+ this.$emit('openPreviewDialog')
219
+ },
220
+ close() {
221
+ this.$emit('closePreviewDialog')
222
+ },
223
+ }
224
+ };
225
+ </script>
226
+
227
+ <style scoped lang="less">
228
+ .message_list_welcome_knowledge_file {
229
+ .mlwm-title {
230
+ font-size: 18px;
231
+ font-weight: 600;
232
+ color: #333333;
233
+ }
234
+ .mlwm-des {
235
+ color: #666666;
236
+ margin-top: 9px;
237
+ font-size: 14px;
238
+ font-weight: 500;
239
+ .mlwm-des-after {
240
+ display: flex;
241
+ align-items: center;
242
+ height: 28px;
243
+ line-height: 28px;
244
+ .mlwm-des-after-cir {
245
+ flex: none;
246
+ width: 6px;
247
+ height: 6px;
248
+ background: #366aff;
249
+ border-radius: 50%;
250
+ margin-right: 6px;
251
+ }
252
+ }
253
+ }
254
+
255
+ .mlwm-msg-type {
256
+ margin-top: 9px;
257
+ .mmt-cell {
258
+ flex: 1;
259
+ padding: 10px;
260
+ background: #f0f4ff;
261
+ border-radius: 8px;
262
+ margin: 8px 0;
263
+ display: flex;
264
+ justify-content: space-between;
265
+ align-items: center;
266
+ cursor: pointer;
267
+ .mmt-cell-img {
268
+ flex: none;
269
+ width: 20px;
270
+ margin-right: 8px;
271
+ img {
272
+ height: 20px;
273
+ width: 20px;
274
+ }
275
+ }
276
+ .mmt-cell-des {
277
+ flex: auto;
278
+ text-align: left;
279
+ display: flex;
280
+ flex-direction: column;
281
+ padding-right: 12px;
282
+ .mmt-cell-des-title {
283
+ font-size: 14px;
284
+ color: #333333;
285
+ font-weight: 600;
286
+ margin-bottom: 6px;
287
+ }
288
+ .mmt-cell-des-detail {
289
+ font-size: 12px;
290
+ display: flex;
291
+ align-items: center;
292
+ .mmt-cell-avatar {
293
+ flex: none;
294
+ width: 16px;
295
+ margin-right: 8px;
296
+ display: flex;
297
+ align-items: center;
298
+ img {
299
+ height: 16px;
300
+ width: 16px;
301
+ border-radius: 50%;
302
+ }
303
+ }
304
+ .mmt-creator-name {
305
+ padding-right: 6px;
306
+ color: #666666;
307
+ }
308
+ .mmt-update-time {
309
+ color: #666666;
310
+ padding-left: 6px;
311
+ }
312
+ .mmt-border {
313
+ height: 12px;
314
+ width: 1px;
315
+ background-color: #666666;
316
+ }
317
+ }
318
+ }
319
+ }
320
+ .booth_elements {
321
+ padding: 0 10px;
322
+ margin-top: 0px;
323
+ margin-bottom: 0px;
324
+ background: #FFFFFF;
325
+ cursor: default !important;
326
+ }
327
+ .load_moreKnowledge {
328
+ width: 100%;
329
+ height: 40px;
330
+ display: flex;
331
+ align-items: center;
332
+ justify-content: center;
333
+ // background: #FFFFFF;
334
+ color: #366aff;
335
+ font-size: 14px;
336
+ margin-top: 8px;
337
+ cursor: pointer;
338
+ }
339
+ }
340
+ }
341
+ </style>
@@ -0,0 +1,141 @@
1
+ <template>
2
+ <div class="message_list-welcome-m">
3
+ <div class="mlwm-title" v-if="msgContent.enableTitle">{{ msgContent.title }}</div>
4
+ <div class="mlwm-des" v-if="msgContent.enableDescription">
5
+ <span class="mlwm-des-pre">{{ msgContent.description }}</span>
6
+ </div>
7
+ <div class="mlwm-msg-type" v-if="msgContent.enableRadioBtn">
8
+ <div
9
+ v-for="(item, itemIndex) in msgContent.items"
10
+ :key="item.id"
11
+ :class="['mmt-cell', 'mmt-cell-' + itemIndex]"
12
+ @click="clickFun(item)"
13
+ >
14
+ <div class="mmt-cell-img" v-if="msgContent.enableRadioIcon && item.icon">
15
+ <img :src="item.icon" alt srcset />
16
+ </div>
17
+ <div class="mmt-cell-des">
18
+ <span class="mmt-cell-des-title" v-if="msgContent.enableRadioTitle">{{item.title}}</span>
19
+ <span class="mmt-cell-des-detail" v-if="msgContent.enableRadioDesc">{{item.description}}</span>
20
+ </div>
21
+ </div>
22
+ <div v-if="msgContent.items.length % 2 != 0" class="mmt-cell booth_elements"></div>
23
+ </div>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ export default {
29
+ name: "welcomeLlmCard",
30
+ props: {
31
+ msgContent: {
32
+ type: Object,
33
+ default () {
34
+ return {}
35
+ }
36
+ }
37
+ },
38
+ methods: {
39
+ clickFun (item) {
40
+ this.$emit('llmCardClickFun', item)
41
+ }
42
+ }
43
+ };
44
+ </script>
45
+
46
+ <style scoped lang="less">
47
+ .message_list-welcome-m {
48
+ .mlwm-title {
49
+ font-size: 18px;
50
+ font-weight: 600;
51
+ color: #333333;
52
+ }
53
+ .mlwm-des {
54
+ color: #666666;
55
+ margin-top: 9px;
56
+ font-size: 14px;
57
+ font-weight: 500;
58
+ .mlwm-des-after {
59
+ display: flex;
60
+ align-items: center;
61
+ height: 28px;
62
+ line-height: 28px;
63
+ .mlwm-des-after-cir {
64
+ flex: none;
65
+ width: 6px;
66
+ height: 6px;
67
+ background: #366aff;
68
+ border-radius: 50%;
69
+ margin-right: 6px;
70
+ }
71
+ }
72
+ }
73
+
74
+ .mlwm-msg-type {
75
+ margin-top: 9px;
76
+ .mmt-cell {
77
+ flex: 1;
78
+ padding: 10px;
79
+ background: #f0f4ff;
80
+ border-radius: 8px;
81
+ margin: 8px 0;
82
+ display: flex;
83
+ justify-content: space-between;
84
+ align-items: center;
85
+ cursor: pointer;
86
+ .mmt-cell-img {
87
+ flex: none;
88
+ width: 46px;
89
+ margin-right: 8px;
90
+ img {
91
+ height: 46px;
92
+ width: 46px;
93
+ }
94
+ }
95
+ .mmt-cell-des {
96
+ flex: auto;
97
+ text-align: left;
98
+ display: flex;
99
+ flex-direction: column;
100
+ padding-right: 12px;
101
+ .mmt-cell-des-title {
102
+ font-size: 14px;
103
+ color: #000000;
104
+ font-weight: 600;
105
+ margin-bottom: 6px;
106
+ }
107
+ .mmt-cell-des-detail {
108
+ font-size: 12px;
109
+ display: flex;
110
+ align-items: center;
111
+ .mmt-cell-avatar {
112
+ flex: none;
113
+ width: 20px;
114
+ margin-right: 8px;
115
+ display: flex;
116
+ align-items: center;
117
+ img {
118
+ height: 20px;
119
+ width: 20px;
120
+ border-radius: 50%;
121
+ }
122
+ }
123
+ .mmt-creator-name {
124
+ padding-right: 6px;
125
+ border-right: 1px solid #666666;
126
+ color: #666666;
127
+ }
128
+ .mmt-update-time {
129
+ color: #666666;
130
+ padding-left: 6px;
131
+ }
132
+ }
133
+ }
134
+ }
135
+ .booth_elements {
136
+ background: #FFFFFF;
137
+ cursor: default !important;
138
+ }
139
+ }
140
+ }
141
+ </style>
@@ -0,0 +1,98 @@
1
+ <template>
2
+ <div class="welcome_suggest">
3
+ <div class="title">
4
+ <div class="title_desc">{{ msg.content.problemRecommendationDesc }}</div>
5
+ <div class="title_change_batch" v-if="msg.content.page && msg.content.problemRecommendationValue.length > msg.content.pageCount" @click="changeBatch">
6
+ <i class="iconfont guoran-tongyichicun-huanyipi"></i>
7
+ <span>换一批</span>
8
+ </div>
9
+ </div>
10
+ <div class="content">
11
+ <div
12
+ class="welcome_item"
13
+ v-for="(item,index) in suggestList"
14
+ :key="index"
15
+ @click="handleWelcome(item)"
16
+ >{{ item }}</div>
17
+ </div>
18
+ <div class></div>
19
+ </div>
20
+ </template>
21
+ <script>
22
+ export default {
23
+ props: ["msg"],
24
+ data () {
25
+ return {
26
+ pageCount: 1,
27
+ suggestList: []
28
+ }
29
+ },
30
+ mounted () {
31
+ if(this.msg.content.page) {
32
+ this.changeBatch()
33
+ } else {
34
+ this.suggestList = this.msg.content.problemRecommendationValue
35
+ }
36
+ },
37
+ methods: {
38
+ changeBatch () {
39
+ let msgSuggestList = JSON.parse(JSON.stringify(this.msg.content.problemRecommendationValue))
40
+ this.suggestList = msgSuggestList.splice((this.pageCount - 1) * this.msg.content.pageCount, this.msg.content.pageCount)
41
+ if (this.pageCount == Math.ceil(this.msg.content.problemRecommendationValue.length / this.msg.content.pageCount)) {
42
+ this.pageCount = 1
43
+ } else {
44
+ this.pageCount = this.pageCount + 1
45
+ }
46
+ },
47
+ handleWelcome (item) {
48
+ this.$emit('handleWelcome', item)
49
+ }
50
+ }
51
+ }
52
+ </script>
53
+ <style lang="less" scoped>
54
+ .welcome_suggest {
55
+ width: 100%;
56
+ height: auto;
57
+ .title {
58
+ width: 100%;
59
+ height: 28px;
60
+ display: flex;
61
+ align-items: center;
62
+ justify-content: space-between;
63
+ .title_desc {
64
+ flex: 1 0;
65
+ overflow: hidden;
66
+ text-overflow: ellipsis;
67
+ white-space: nowrap;
68
+ }
69
+ .title_change_batch {
70
+ cursor: pointer;
71
+ color: #366aff;
72
+ height: 28px;
73
+ width: 70px;
74
+ display: flex;
75
+ align-items: center;
76
+ font-size: 14px;
77
+ i {
78
+ margin-right: 5px;
79
+ }
80
+ }
81
+ }
82
+ .content {
83
+ display: flex;
84
+ align-items: center;
85
+ flex-wrap: wrap;
86
+ margin-top: 8px;
87
+ .welcome_item {
88
+ padding: 3px 8px;
89
+ background: #EEF1FF;
90
+ color: #366aff;
91
+ margin-right: 5px;
92
+ margin-bottom: 5px;
93
+ border-radius: 28px;
94
+ cursor: pointer;
95
+ }
96
+ }
97
+ }
98
+ </style>
package/src/main.js CHANGED
@@ -10,9 +10,6 @@ import 'video.js/dist/video-js.css'
10
10
  import Vant from 'vant';
11
11
  import 'vant/lib/index.css';
12
12
 
13
- import CKEditor from '@ckeditor/ckeditor5-vue2';
14
- Vue.use(CKEditor);
15
-
16
13
  /*import VConsole from 'vconsole'
17
14
  const vConsole = new VConsole();
18
15
  Vue.use(vConsole);*/
package/vue.config.js CHANGED
@@ -49,7 +49,6 @@ module.exports = {
49
49
  // 不去 node_modules 中找,而是去找 全局变量 ELEMENT
50
50
  // 'element-ui': 'ELEMENT',
51
51
  // 'vant': 'Vant',
52
- 'ckeditor': 'ClassicEditor',
53
52
  },
54
53
  },
55
54