askbot-dragon 1.7.34-beta → 1.7.35-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 (95) 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 -54
  5. package/public/index.html +73 -75
  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 +141 -94
  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 -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 +438 -471
  22. package/src/components/AnswerDocknowledge.vue +1111 -1068
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +10764 -10960
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/MyEditor.vue +342 -350
  29. package/src/components/QwFeedback.vue +301 -301
  30. package/src/components/actionSatisfaction.vue +107 -107
  31. package/src/components/actionSendToBot.vue +62 -62
  32. package/src/components/answerDissatisfaction.vue +62 -62
  33. package/src/components/answerRadio.vue +204 -204
  34. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  35. package/src/components/ask-components/Msgloading.vue +37 -37
  36. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  37. package/src/components/askVideo.vue +162 -139
  38. package/src/components/assetDetails.vue +378 -378
  39. package/src/components/assetMessage.vue +228 -228
  40. package/src/components/associationIntention.vue +378 -374
  41. package/src/components/attachmentPreview.vue +90 -90
  42. package/src/components/botActionSatisfactor.vue +68 -68
  43. package/src/components/chatContent.vue +513 -513
  44. package/src/components/feedBack.vue +136 -136
  45. package/src/components/fielListView.vue +351 -351
  46. package/src/components/file/AliyunOssComponents.vue +108 -108
  47. package/src/components/formTemplate.vue +3501 -3507
  48. package/src/components/imgView.vue +32 -0
  49. package/src/components/intelligentSummary.vue +231 -227
  50. package/src/components/kkview.vue +1138 -1138
  51. package/src/components/loadingProcess.vue +164 -164
  52. package/src/components/markDownText.vue +198 -0
  53. package/src/components/message/ActionAlertIframe.vue +112 -112
  54. package/src/components/message/ShopMessage.vue +164 -164
  55. package/src/components/message/TextMessage.vue +928 -924
  56. package/src/components/message/TicketMessage.vue +201 -201
  57. package/src/components/message/swiper/index.js +4 -4
  58. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  59. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  60. package/src/components/msgLoading.vue +231 -231
  61. package/src/components/myPopup.vue +70 -70
  62. package/src/components/newPdfPosition.vue +878 -0
  63. package/src/components/pagination.vue +129 -0
  64. package/src/components/pdfPosition.vue +1514 -1334
  65. package/src/components/popup.vue +227 -227
  66. package/src/components/preview/docView.vue +107 -0
  67. package/src/components/preview/excelView.vue +160 -0
  68. package/src/components/preview/newPositionPreview.vue +285 -0
  69. package/src/components/preview/pdfView.vue +737 -0
  70. package/src/components/previewDoc.vue +251 -247
  71. package/src/components/previewPdf.vue +822 -779
  72. package/src/components/receiverMessagePlatform.vue +65 -65
  73. package/src/components/recommend.vue +80 -80
  74. package/src/components/selector/hOption.vue +20 -20
  75. package/src/components/selector/hSelector.vue +199 -199
  76. package/src/components/selector/hWrapper.vue +216 -216
  77. package/src/components/senderMessagePlatform.vue +50 -50
  78. package/src/components/source/BotMessage.vue +24 -24
  79. package/src/components/source/CustomMessage.vue +24 -24
  80. package/src/components/test.vue +260 -260
  81. package/src/components/tree.vue +307 -307
  82. package/src/components/utils/AliyunIssUtil.js +103 -82
  83. package/src/components/utils/ckeditor.js +185 -174
  84. package/src/components/utils/format_date.js +25 -25
  85. package/src/components/utils/index.js +6 -6
  86. package/src/components/utils/math_utils.js +29 -29
  87. package/src/components/voiceComponent.vue +119 -119
  88. package/src/components/welcomeKnowledgeFile.vue +344 -340
  89. package/src/components/welcomeLlmCard.vue +144 -140
  90. package/src/components/welcomeSuggest.vue +97 -97
  91. package/src/locales/cn.json +72 -0
  92. package/src/locales/en.json +73 -0
  93. package/src/locales/jp.json +73 -0
  94. package/src/main.js +75 -57
  95. package/vue.config.js +54 -54
@@ -1,165 +1,165 @@
1
- <template>
2
- <div id="loading-process">
3
- <div class="bg-color"></div>
4
- <ul class="display-container" >
5
- <li class="note-display" :data-note="dataNodes">
6
- <div class="circle">
7
- <svg width="30" height="30" class="circle__svg" viewBox="0 0 90 90">
8
- <circle cx="41" cy="41" r="38" class="circle__progress circle__progress--path"></circle>
9
- <circle cx="41" cy="41" r="38" class="circle__progress circle__progress--fill"></circle>
10
- </svg>
11
- </div>
12
- </li>
13
- </ul>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- const transitionDuration = 1000
19
- export default {
20
- name: "loadingProcess",
21
- data(){
22
- return{
23
- timer:null,
24
- dataNodes:0
25
- }
26
- },
27
- props:['dataNote','finished'],
28
- methods:{
29
- strokeTransition(display, note) {
30
- let progress = display.querySelector('.circle__progress--fill');
31
- let radius = progress.r.baseVal.value;
32
- let circumference = 2 * Math.PI * radius;
33
- let offset = circumference * (10 - note) / 10;
34
- progress.style.setProperty('--initialStroke', circumference);
35
- progress.style.setProperty('--transitionDuration', `${transitionDuration}ms`);
36
-
37
- setTimeout(() => progress.style.strokeDashoffset = offset, 100);
38
- },
39
- increaseNumber(display, number, className) {
40
- let element = display.querySelector(`.percent__${className}`),
41
- decPoint = className === 'int' ? '' : '',
42
- interval = transitionDuration / number,
43
- counter = 0;
44
- console.debug('element',element,counter,decPoint)
45
- let increaseInterval = setInterval(() => {
46
- if (counter === number) { window.clearInterval(increaseInterval); }
47
- /*
48
- element.textContent = counter + decPoint;*/
49
- counter++;
50
- }, interval);
51
- }
52
- },
53
- mounted() {
54
- this.timer = setInterval(()=>{
55
- const displays = document.querySelectorAll('.note-display');
56
- displays.forEach(display => {
57
- let note = parseFloat(display.dataset.note);
58
- let [int, dec] = display.dataset.note.split('.');
59
- [int, dec] = [Number(int), Number(dec)];
60
- this.strokeTransition(display, note);
61
- this.increaseNumber(display, this.dataNote, 'int');
62
- /* this.increaseNumber(display, dec, 'dec');*/
63
- })
64
- },1000)
65
- },
66
- watch:{
67
- dataNote:{
68
- handler(val){
69
- this.dataNodes = val
70
- console.debug('this.dataNodes',val,this.dataNodes)
71
- },
72
- immediate:true,
73
- deep:true
74
- },
75
- finished:{
76
- handler(val){
77
- if (val){
78
- setTimeout(()=>{
79
- clearInterval(this.timer)
80
- },1000)
81
- }
82
- },
83
- immediate:true
84
- }
85
- }
86
- }
87
- </script>
88
-
89
- <style scoped lang="less">
90
- /*@import url('https://fonts.googleapis.com/css?family=Nixie+One|Raleway:200');*/
91
- #loading-process{
92
- height: 100px;
93
- width: 100px;
94
- .bg-color{
95
- background-color:#000000 ;
96
- opacity: 0.4;
97
- width: 100%;
98
- height: 100%;
99
- }
100
- .display-container{
101
- position: absolute;
102
- top: calc(50% - 15px);
103
- left: 10px;
104
- }
105
- }
106
- * {
107
- padding: 0;
108
- margin: 0;
109
- box-sizing: border-box;
110
- }
111
- /*
112
- body {
113
- height: 100vh;
114
- color: #fff;
115
- display: flex;
116
- background: #3E423A;
117
- font-family: 'Nixie One', cursive;
118
- }
119
- */
120
-
121
- .display-container {
122
- margin: auto;
123
- display: flex;
124
- .note-display {
125
- display: flex;
126
- flex-direction: column;
127
- align-items: center;
128
- margin: 0 25px;
129
- }
130
- }
131
- .circle__progress {
132
- fill: none;
133
- stroke-width: 5;
134
- stroke-opacity: 0.3;
135
- stroke-linecap: round;
136
- }
137
- .note-display:nth-child(1) .circle__progress--fill{
138
- stroke: #FFFFFF!important;
139
- stroke-opacity: 1;
140
- }
141
- .circle__progress--path{
142
- stroke: #EFEFEF!important;
143
- stroke-opacity: 0.5;
144
- }
145
- .note-display:nth-child(1) .circle__progress { stroke: #AAFF00; }
146
- .note-display:nth-child(2) .circle__progress { stroke: #FF00AA; }
147
- .note-display:nth-child(3) .circle__progress { stroke: #AA00FF; }
148
- .note-display:nth-child(4) .circle__progress { stroke: #00AAFF; }
149
- .circle {
150
- position: relative;
151
- }
152
-
153
- .percent {
154
- width: 100%;
155
- top: 50%;
156
- left: 50%;
157
- position: absolute;
158
- font-weight: bold;
159
- text-align: center;
160
- /* line-height: 28px;*/
161
- transform: translate(-50%, -50%);
162
- font-size: 12px;
163
- }
164
-
1
+ <template>
2
+ <div id="loading-process">
3
+ <div class="bg-color"></div>
4
+ <ul class="display-container" >
5
+ <li class="note-display" :data-note="dataNodes">
6
+ <div class="circle">
7
+ <svg width="30" height="30" class="circle__svg" viewBox="0 0 90 90">
8
+ <circle cx="41" cy="41" r="38" class="circle__progress circle__progress--path"></circle>
9
+ <circle cx="41" cy="41" r="38" class="circle__progress circle__progress--fill"></circle>
10
+ </svg>
11
+ </div>
12
+ </li>
13
+ </ul>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ const transitionDuration = 1000
19
+ export default {
20
+ name: "loadingProcess",
21
+ data(){
22
+ return{
23
+ timer:null,
24
+ dataNodes:0
25
+ }
26
+ },
27
+ props:['dataNote','finished'],
28
+ methods:{
29
+ strokeTransition(display, note) {
30
+ let progress = display.querySelector('.circle__progress--fill');
31
+ let radius = progress.r.baseVal.value;
32
+ let circumference = 2 * Math.PI * radius;
33
+ let offset = circumference * (10 - note) / 10;
34
+ progress.style.setProperty('--initialStroke', circumference);
35
+ progress.style.setProperty('--transitionDuration', `${transitionDuration}ms`);
36
+
37
+ setTimeout(() => progress.style.strokeDashoffset = offset, 100);
38
+ },
39
+ increaseNumber(display, number, className) {
40
+ let element = display.querySelector(`.percent__${className}`),
41
+ decPoint = className === 'int' ? '' : '',
42
+ interval = transitionDuration / number,
43
+ counter = 0;
44
+ console.debug('element',element,counter,decPoint)
45
+ let increaseInterval = setInterval(() => {
46
+ if (counter === number) { window.clearInterval(increaseInterval); }
47
+ /*
48
+ element.textContent = counter + decPoint;*/
49
+ counter++;
50
+ }, interval);
51
+ }
52
+ },
53
+ mounted() {
54
+ this.timer = setInterval(()=>{
55
+ const displays = document.querySelectorAll('.note-display');
56
+ displays.forEach(display => {
57
+ let note = parseFloat(display.dataset.note);
58
+ let [int, dec] = display.dataset.note.split('.');
59
+ [int, dec] = [Number(int), Number(dec)];
60
+ this.strokeTransition(display, note);
61
+ this.increaseNumber(display, this.dataNote, 'int');
62
+ /* this.increaseNumber(display, dec, 'dec');*/
63
+ })
64
+ },1000)
65
+ },
66
+ watch:{
67
+ dataNote:{
68
+ handler(val){
69
+ this.dataNodes = val
70
+ console.debug('this.dataNodes',val,this.dataNodes)
71
+ },
72
+ immediate:true,
73
+ deep:true
74
+ },
75
+ finished:{
76
+ handler(val){
77
+ if (val){
78
+ setTimeout(()=>{
79
+ clearInterval(this.timer)
80
+ },1000)
81
+ }
82
+ },
83
+ immediate:true
84
+ }
85
+ }
86
+ }
87
+ </script>
88
+
89
+ <style scoped lang="less">
90
+ /*@import url('https://fonts.googleapis.com/css?family=Nixie+One|Raleway:200');*/
91
+ #loading-process{
92
+ height: 100px;
93
+ width: 100px;
94
+ .bg-color{
95
+ background-color:#000000 ;
96
+ opacity: 0.4;
97
+ width: 100%;
98
+ height: 100%;
99
+ }
100
+ .display-container{
101
+ position: absolute;
102
+ top: calc(50% - 15px);
103
+ left: 10px;
104
+ }
105
+ }
106
+ * {
107
+ padding: 0;
108
+ margin: 0;
109
+ box-sizing: border-box;
110
+ }
111
+ /*
112
+ body {
113
+ height: 100vh;
114
+ color: #fff;
115
+ display: flex;
116
+ background: #3E423A;
117
+ font-family: 'Nixie One', cursive;
118
+ }
119
+ */
120
+
121
+ .display-container {
122
+ margin: auto;
123
+ display: flex;
124
+ .note-display {
125
+ display: flex;
126
+ flex-direction: column;
127
+ align-items: center;
128
+ margin: 0 25px;
129
+ }
130
+ }
131
+ .circle__progress {
132
+ fill: none;
133
+ stroke-width: 5;
134
+ stroke-opacity: 0.3;
135
+ stroke-linecap: round;
136
+ }
137
+ .note-display:nth-child(1) .circle__progress--fill{
138
+ stroke: #FFFFFF!important;
139
+ stroke-opacity: 1;
140
+ }
141
+ .circle__progress--path{
142
+ stroke: #EFEFEF!important;
143
+ stroke-opacity: 0.5;
144
+ }
145
+ .note-display:nth-child(1) .circle__progress { stroke: #AAFF00; }
146
+ .note-display:nth-child(2) .circle__progress { stroke: #FF00AA; }
147
+ .note-display:nth-child(3) .circle__progress { stroke: #AA00FF; }
148
+ .note-display:nth-child(4) .circle__progress { stroke: #00AAFF; }
149
+ .circle {
150
+ position: relative;
151
+ }
152
+
153
+ .percent {
154
+ width: 100%;
155
+ top: 50%;
156
+ left: 50%;
157
+ position: absolute;
158
+ font-weight: bold;
159
+ text-align: center;
160
+ /* line-height: 28px;*/
161
+ transform: translate(-50%, -50%);
162
+ font-size: 12px;
163
+ }
164
+
165
165
  </style>
@@ -0,0 +1,198 @@
1
+ <template>
2
+ <div @click="lookImage">
3
+ <vue-markdown class="mark_down" :source="typedContent" :ref="'markdown' + msgId">
4
+ </vue-markdown>
5
+ <div v-if="showPreview">
6
+ <img-view :url-list="imgList" @closeViewer="closeViewer"></img-view>
7
+ </div>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ import VueMarkdown from "vue-markdown";
13
+ import ImgView from "./imgView.vue";
14
+
15
+ export default {
16
+ name: "markDownText",
17
+ data() {
18
+ return {
19
+ typedContent: "",
20
+ typingSpeed: 15,
21
+ showPreview: false,
22
+ imgList: [],
23
+ };
24
+ },
25
+ props: {
26
+ chainValues: {
27
+ type: String,
28
+ default: "",
29
+ },
30
+ msgId: {
31
+ type: String,
32
+ default: "",
33
+ },
34
+ isHistory: {
35
+ type: Boolean,
36
+ default: false,
37
+ },
38
+ },
39
+ components: {
40
+ ImgView,
41
+ VueMarkdown,
42
+ },
43
+ mounted() {
44
+ this.$nextTick(() => {
45
+ // let ref = 'markdown' + this.msgId
46
+ // const el = this.$refs[ref].$el;
47
+ // if (this.isHistory){
48
+ // el.innerHTML = this.chainValues;
49
+ // } else {
50
+ // new Typed(el, {
51
+ // strings: [this.chainValues],
52
+ // typeSpeed: 30,
53
+ // showCursor: false
54
+ // })
55
+ // }
56
+ this.typedContent = this.chainValues;
57
+ // if (this.isHistory) {
58
+ // this.typedContent = this.chainValues;
59
+ // } else {
60
+ // this.startTypingEffect();
61
+ // }
62
+ });
63
+ },
64
+ methods: {
65
+ startTypingEffect() {
66
+ let i = 0;
67
+ const interval = setInterval(() => {
68
+ if (i < this.chainValues.length) {
69
+ this.typedContent += this.chainValues.charAt(i);
70
+ i++;
71
+ } else {
72
+ clearInterval(interval);
73
+ }
74
+ }, this.typingSpeed);
75
+ },
76
+ lookImage(e) {
77
+ let previewImageUrl = "";
78
+ console.log("e.target", e.target);
79
+ if (e.target.localName == "img") {
80
+ previewImageUrl = e.target.currentSrc;
81
+ this.showPreview = true;
82
+ }
83
+ let richtext = JSON.parse(JSON.stringify(this.typedContent));
84
+ this.imgList = [];
85
+ richtext.replace(
86
+ /<img [^>]*src=['"]([^'"]+)[^>]*>/g,
87
+ (match, capture) => {
88
+ this.imgList.push(capture);
89
+ }
90
+ );
91
+ /*当前点击的图片作为第一个图片*/
92
+ let index = this.imgList.indexOf(previewImageUrl);
93
+ this.imgList.splice(index, 1);
94
+ this.imgList.unshift(previewImageUrl);
95
+ },
96
+ closeViewer() {
97
+ this.showPreview = false;
98
+ },
99
+ },
100
+ };
101
+ </script>
102
+
103
+ <style scoped lang="less">
104
+ .mark_down {
105
+ line-height: 24px;
106
+ overflow-x: auto;
107
+ /deep/p {
108
+ margin-bottom: 14px;
109
+ font-size: 16px;
110
+ }
111
+
112
+ /deep/p:only-child {
113
+ margin: 0 !important;
114
+ }
115
+
116
+ /deep/p:last-child {
117
+ margin-bottom: 0 !important;
118
+ }
119
+
120
+ /deep/ul {
121
+ margin-bottom: 16px;
122
+ list-style: disc;
123
+ padding-left: 16px;
124
+
125
+ li {
126
+ margin: 7px 0 !important;
127
+ font-size: 16px;
128
+ // padding-left: 40px;
129
+
130
+ }
131
+ }
132
+
133
+ /deep/ ol {
134
+ list-style: auto;
135
+ padding-left: 16px;
136
+
137
+ li {
138
+ margin: 7px 0 !important;
139
+ font-size: 16px;
140
+ // padding-left: 40px;
141
+ }
142
+ }
143
+
144
+ /deep/img {
145
+ max-width: 400px;
146
+ }
147
+
148
+ /deep/h3,
149
+ /deep/h2,
150
+ /deep/h1,
151
+ /deep/h4,
152
+ /deep/h5,
153
+ /deep/h6 {
154
+ color: #000000;
155
+ font-weight: 500;
156
+ line-height: 26px;
157
+ }
158
+
159
+ /deep/h3 {
160
+ font-size: 20px;
161
+ }
162
+
163
+ /deep/h2 {
164
+ font-size: 22px;
165
+ }
166
+
167
+ /deep/h1 {
168
+ font-size: 24px;
169
+ }
170
+
171
+ /deep/h3 {
172
+ font-size: 20px;
173
+ }
174
+
175
+ /deep/ table {
176
+ border-spacing: 0;
177
+ // border-radius: 8px;
178
+ // overflow: hidden;
179
+ border: solid 1px #e0e6f7;
180
+ min-width: 800px;
181
+ overflow-x: auto;
182
+ }
183
+ /deep/ th {
184
+ background: #EEF1FF;
185
+ border: solid 1px #e0e6f7;
186
+ padding: 10px;
187
+ height: 60px;
188
+ min-width: 100px;
189
+ }
190
+
191
+ /deep/ td {
192
+ border: solid 1px #e0e6f7;
193
+ padding: 10px;
194
+ height: 48px;
195
+ min-width: 100px;
196
+ }
197
+ }
198
+ </style>