askbot-dragon 1.6.75-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 -833
  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,228 +1,228 @@
1
- <template>
2
- <div class="intelligentSummary" :class="tagIds.length != 0 ? 'float_intelligentSummary' : ''" id="intelligentSummary">
3
- <div class="summaryHeader">
4
- <div class="left">
5
- <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
6
- <span>智能摘要</span>
7
- </div>
8
- <div class="right">
9
- <div class="regenerationBtn" @click="regeneration">
10
- <template v-if="!isLoading">重新生成</template>
11
- <template v-else>
12
- <img
13
- height="20px"
14
- width="20px"
15
- src="https://static.guoranbot.com/loading.gif"
16
- alt
17
- srcset
18
- style="margin-right: 6px"
19
- />
20
- <span>生成中</span>
21
- </template>
22
- </div>
23
- <i class="iconfont guoran-tongyichicun-shouqi" @click="closeSummary"></i>
24
- </div>
25
- </div>
26
- <div class="summaryContent">
27
- <span>{{ typedContent }}</span>
28
- </div>
29
- <div class="intelligentBottom" v-if="recommendQuestions.length > 0">
30
- <div class="intelligentQues"
31
- v-for="(item,index) in recommendQuestions"
32
- :key="index"
33
- @click="recommendQues(item)"
34
- >
35
- {{ item }}
36
- </div>
37
- </div>
38
- </div>
39
- </template>
40
-
41
- <script>
42
- export default {
43
- name: "intelligentSummary",
44
- data(){
45
- return{
46
- summary:"",
47
- recommendQuestions:[],
48
- isLoading:false,
49
- typedContent:"",
50
- typingSpeed:20
51
- }
52
- },
53
- props:{
54
- knowledgeId:{
55
- type:String
56
- },
57
- tagIds:{
58
- type:Array,
59
- default() {
60
- return []
61
- }
62
- }
63
- },
64
- methods:{
65
- getKnowledgeSummary() {
66
- let url = "/knowledge-api/knowledge/detail/" + this.knowledgeId;
67
- this.typedContent = "";
68
- this.summary = "";
69
- this.$http.get(url).then(res => {
70
- console.log('res',res)
71
- if (res.data.data){
72
- this.summary = res.data.data.summary;
73
- this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions.splice(0,5) : [];
74
- if (!this.summary){
75
- this.regeneration();
76
- } else {
77
- this.typedContent = this.summary;
78
- }
79
- }
80
- this.$nextTick(() => {
81
- this.$emit('getSummarySuccess')
82
- })
83
- })
84
- },
85
- regeneration(){
86
- let url = "/knowledge-api/knowledge/analyze/summary";
87
- let obj = {
88
- "mainId": sessionStorage.getItem('_mainId') || localStorage.getItem('_mainId'),
89
- "userId": sessionStorage.getItem('_uid') || localStorage.getItem('_uid'),
90
- "knowledgeId": this.knowledgeId,
91
- "async": false
92
- }
93
- this.isLoading = true;
94
- this.typedContent = "";
95
- this.summary = "";
96
- this.$http.post(url,obj).then(res => {
97
- console.log('regeneration',res)
98
- if (res.data.data){
99
- this.summary = res.data.data.summary;
100
- this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions.splice(0,5) : [];
101
- this.startTypingEffect();
102
- } else {
103
- this.$nextTick(() => {
104
- this.$emit('getSummarySuccess')
105
- })
106
- }
107
- this.isLoading = false;
108
- })
109
- },
110
- closeSummary(){
111
- this.$emit('closeSummary')
112
- },
113
- recommendQues(item){
114
- this.$emit('recommendQues',item,this.knowledgeId)
115
- },
116
- startTypingEffect() {
117
- let i = 0;
118
- const interval = setInterval(() => {
119
- if (i < this.summary.length) {
120
- this.typedContent += this.summary.charAt(i);
121
- i++;
122
- } else {
123
- clearInterval(interval);
124
- setTimeout(() => {
125
- this.$emit('getSummarySuccess')
126
- },240)
127
- }
128
- }, this.typingSpeed);
129
- },
130
- },
131
- mounted() {
132
- this.getKnowledgeSummary();
133
- }
134
- };
135
- </script>
136
-
137
- <style scoped lang="less">
138
- .intelligentSummary{
139
- background-color: #ffffff;
140
- border-radius: 20px;
141
- border: 1px solid #366AFF;
142
- margin-bottom: 20px;
143
- .summaryHeader{
144
- display: flex;
145
- align-items: center;
146
- justify-content: space-between;
147
- padding: 14px 16px;
148
- font-size: 14px;
149
- .left{
150
- //display: flex;
151
- //align-items: center;
152
- color: #366aff;
153
- i{
154
- padding-right: 6px;
155
- }
156
- }
157
- .right{
158
- display: flex;
159
- align-items: center;
160
- color: #366aff;
161
- .regenerationBtn{
162
- height: 26px;
163
- background: #E9EFFF;
164
- border-radius: 12px;
165
- color: #366AFF;
166
- display: flex;
167
- align-items: center;
168
- justify-content: center;
169
- cursor: pointer;
170
- padding: 0 10px;
171
- margin-right: 10px;
172
- font-size: 12px;
173
- }
174
- i{
175
- cursor: pointer;
176
- font-size: 14px;
177
- }
178
- }
179
- }
180
- .summaryContent{
181
- line-height: 26px;
182
- padding: 0 16px 16px 16px;
183
- font-size: 14px;
184
- text-align: left;
185
- }
186
- .intelligentBottom{
187
- background: #F9FAFD;
188
- padding: 0 20px;
189
- border-bottom-left-radius: 20px;
190
- border-bottom-right-radius: 20px;
191
- display: flex;
192
- align-items: center;
193
- flex-wrap: wrap;
194
- .intelligentQues{
195
- height: 26px;
196
- display: flex;
197
- align-items: center;
198
- justify-content: center;
199
- padding: 0 8px;
200
- background: #E5EBFF;
201
- color: #366AFF;
202
- border-radius: 10px;
203
- margin-right: 5px;
204
- margin-top: 5px;
205
- margin-bottom: 5px;
206
- font-size: 12px;
207
- cursor: pointer;
208
- white-space: nowrap;
209
- }
210
- }
211
- ::-webkit-scrollbar{
212
- background-color: transparent;
213
- height: 6px;
214
- }
215
- }
216
- .float_intelligentSummary {
217
- position: absolute;
218
- z-index: 999;
219
- top: 60px;
220
- left: 16px;
221
- width: calc(100% - 32px);
222
- box-shadow: 0 0 10px rgba(0,0,0,.12);
223
- .summaryContent {
224
- max-height: 30vh;
225
- overflow-y: auto;
226
- }
227
- }
1
+ <template>
2
+ <div class="intelligentSummary" :class="tagIds.length != 0 ? 'float_intelligentSummary' : ''" id="intelligentSummary">
3
+ <div class="summaryHeader">
4
+ <div class="left">
5
+ <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
6
+ <span>智能摘要</span>
7
+ </div>
8
+ <div class="right">
9
+ <div class="regenerationBtn" @click="regeneration">
10
+ <template v-if="!isLoading">重新生成</template>
11
+ <template v-else>
12
+ <img
13
+ height="20px"
14
+ width="20px"
15
+ src="https://static.guoranbot.com/loading.gif"
16
+ alt
17
+ srcset
18
+ style="margin-right: 6px"
19
+ />
20
+ <span>生成中</span>
21
+ </template>
22
+ </div>
23
+ <i class="iconfont guoran-tongyichicun-shouqi" @click="closeSummary"></i>
24
+ </div>
25
+ </div>
26
+ <div class="summaryContent">
27
+ <span>{{ typedContent }}</span>
28
+ </div>
29
+ <div class="intelligentBottom" v-if="recommendQuestions.length > 0">
30
+ <div class="intelligentQues"
31
+ v-for="(item,index) in recommendQuestions"
32
+ :key="index"
33
+ @click="recommendQues(item)"
34
+ >
35
+ {{ item }}
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </template>
40
+
41
+ <script>
42
+ export default {
43
+ name: "intelligentSummary",
44
+ data(){
45
+ return{
46
+ summary:"",
47
+ recommendQuestions:[],
48
+ isLoading:false,
49
+ typedContent:"",
50
+ typingSpeed:20
51
+ }
52
+ },
53
+ props:{
54
+ knowledgeId:{
55
+ type:String
56
+ },
57
+ tagIds:{
58
+ type:Array,
59
+ default() {
60
+ return []
61
+ }
62
+ }
63
+ },
64
+ methods:{
65
+ getKnowledgeSummary() {
66
+ let url = "/knowledge-api/knowledge/detail/" + this.knowledgeId;
67
+ this.typedContent = "";
68
+ this.summary = "";
69
+ this.$http.get(url).then(res => {
70
+ console.log('res',res)
71
+ if (res.data.data){
72
+ this.summary = res.data.data.summary;
73
+ this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions.splice(0,5) : [];
74
+ if (!this.summary){
75
+ this.regeneration();
76
+ } else {
77
+ this.typedContent = this.summary;
78
+ }
79
+ }
80
+ this.$nextTick(() => {
81
+ this.$emit('getSummarySuccess')
82
+ })
83
+ })
84
+ },
85
+ regeneration(){
86
+ let url = "/knowledge-api/knowledge/analyze/summary";
87
+ let obj = {
88
+ "mainId": sessionStorage.getItem('_mainId') || localStorage.getItem('_mainId'),
89
+ "userId": sessionStorage.getItem('_uid') || localStorage.getItem('_uid'),
90
+ "knowledgeId": this.knowledgeId,
91
+ "async": false
92
+ }
93
+ this.isLoading = true;
94
+ this.typedContent = "";
95
+ this.summary = "";
96
+ this.$http.post(url,obj).then(res => {
97
+ console.log('regeneration',res)
98
+ if (res.data.data){
99
+ this.summary = res.data.data.summary;
100
+ this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions.splice(0,5) : [];
101
+ this.startTypingEffect();
102
+ } else {
103
+ this.$nextTick(() => {
104
+ this.$emit('getSummarySuccess')
105
+ })
106
+ }
107
+ this.isLoading = false;
108
+ })
109
+ },
110
+ closeSummary(){
111
+ this.$emit('closeSummary')
112
+ },
113
+ recommendQues(item){
114
+ this.$emit('recommendQues',item,this.knowledgeId)
115
+ },
116
+ startTypingEffect() {
117
+ let i = 0;
118
+ const interval = setInterval(() => {
119
+ if (i < this.summary.length) {
120
+ this.typedContent += this.summary.charAt(i);
121
+ i++;
122
+ } else {
123
+ clearInterval(interval);
124
+ setTimeout(() => {
125
+ this.$emit('getSummarySuccess')
126
+ },240)
127
+ }
128
+ }, this.typingSpeed);
129
+ },
130
+ },
131
+ mounted() {
132
+ this.getKnowledgeSummary();
133
+ }
134
+ };
135
+ </script>
136
+
137
+ <style scoped lang="less">
138
+ .intelligentSummary{
139
+ background-color: #ffffff;
140
+ border-radius: 20px;
141
+ border: 1px solid #366AFF;
142
+ margin-bottom: 20px;
143
+ .summaryHeader{
144
+ display: flex;
145
+ align-items: center;
146
+ justify-content: space-between;
147
+ padding: 14px 16px;
148
+ font-size: 14px;
149
+ .left{
150
+ //display: flex;
151
+ //align-items: center;
152
+ color: #366aff;
153
+ i{
154
+ padding-right: 6px;
155
+ }
156
+ }
157
+ .right{
158
+ display: flex;
159
+ align-items: center;
160
+ color: #366aff;
161
+ .regenerationBtn{
162
+ height: 26px;
163
+ background: #E9EFFF;
164
+ border-radius: 12px;
165
+ color: #366AFF;
166
+ display: flex;
167
+ align-items: center;
168
+ justify-content: center;
169
+ cursor: pointer;
170
+ padding: 0 10px;
171
+ margin-right: 10px;
172
+ font-size: 12px;
173
+ }
174
+ i{
175
+ cursor: pointer;
176
+ font-size: 14px;
177
+ }
178
+ }
179
+ }
180
+ .summaryContent{
181
+ line-height: 26px;
182
+ padding: 0 16px 16px 16px;
183
+ font-size: 14px;
184
+ text-align: left;
185
+ }
186
+ .intelligentBottom{
187
+ background: #F9FAFD;
188
+ padding: 0 20px;
189
+ border-bottom-left-radius: 20px;
190
+ border-bottom-right-radius: 20px;
191
+ display: flex;
192
+ align-items: center;
193
+ flex-wrap: wrap;
194
+ .intelligentQues{
195
+ height: 26px;
196
+ display: flex;
197
+ align-items: center;
198
+ justify-content: center;
199
+ padding: 0 8px;
200
+ background: #E5EBFF;
201
+ color: #366AFF;
202
+ border-radius: 10px;
203
+ margin-right: 5px;
204
+ margin-top: 5px;
205
+ margin-bottom: 5px;
206
+ font-size: 12px;
207
+ cursor: pointer;
208
+ white-space: nowrap;
209
+ }
210
+ }
211
+ ::-webkit-scrollbar{
212
+ background-color: transparent;
213
+ height: 6px;
214
+ }
215
+ }
216
+ .float_intelligentSummary {
217
+ position: absolute;
218
+ z-index: 999;
219
+ top: 60px;
220
+ left: 16px;
221
+ width: calc(100% - 32px);
222
+ box-shadow: 0 0 10px rgba(0,0,0,.12);
223
+ .summaryContent {
224
+ max-height: 30vh;
225
+ overflow-y: auto;
226
+ }
227
+ }
228
228
  </style>