askbot-dragon 1.7.65-beta → 1.7.67-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 +57 -57
  5. package/public/index.html +73 -73
  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 -141
  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 +178 -178
  21. package/src/components/AiGuide.vue +434 -434
  22. package/src/components/AnswerDocknowledge.vue +1203 -1203
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +10764 -10764
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/MyEditor.vue +342 -342
  29. package/src/components/QwFeedback.vue +302 -302
  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 +259 -259
  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 -162
  38. package/src/components/assetDetails.vue +378 -378
  39. package/src/components/assetMessage.vue +229 -229
  40. package/src/components/associationIntention.vue +378 -378
  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 +3512 -3512
  48. package/src/components/imgView.vue +31 -31
  49. package/src/components/intelligentSummary.vue +234 -234
  50. package/src/components/kkview.vue +1138 -1138
  51. package/src/components/loadingProcess.vue +164 -164
  52. package/src/components/markDownText.vue +357 -357
  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 -928
  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 +73 -73
  62. package/src/components/newPdfPosition.vue +877 -877
  63. package/src/components/pagination.vue +128 -128
  64. package/src/components/pdfPosition.vue +1523 -1523
  65. package/src/components/popup.vue +228 -228
  66. package/src/components/preview/docView.vue +113 -113
  67. package/src/components/preview/excelView.vue +190 -190
  68. package/src/components/preview/newPositionPreview.vue +384 -369
  69. package/src/components/preview/pdfView.vue +824 -824
  70. package/src/components/previewDoc.vue +252 -252
  71. package/src/components/previewPdf.vue +1087 -1087
  72. package/src/components/receiverMessagePlatform.vue +69 -69
  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 +58 -58
  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 -103
  83. package/src/components/utils/ckeditor.js +185 -185
  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 +347 -347
  89. package/src/components/welcomeLlmCard.vue +144 -144
  90. package/src/components/welcomeSuggest.vue +97 -97
  91. package/src/locales/cn.json +95 -95
  92. package/src/locales/en.json +95 -95
  93. package/src/locales/jp.json +72 -72
  94. package/src/main.js +76 -76
  95. package/vue.config.js +54 -54
@@ -1,37 +1,37 @@
1
- <template>
2
- <view class="media-body-loading">
3
- <view class="bot_loading">
4
- <span></span>
5
- <span></span>
6
- <span></span>
7
- <span></span>
8
- </view>
9
- </view>
10
- </template>
11
-
12
- <script>
13
- export default {
14
- data() {
15
- return {
16
- name: ''
17
- };
18
- }
19
- };
20
- </script>
21
-
22
- <style lang="less">
23
- .media-body-loading {
24
- background-color: #f4f8fc;
25
- border: 1px solid #f4f8fc;
26
- word-break: break-word;
27
- box-shadow: 0px 0px 5px 0px rgba(76, 97, 255, 0.38);
28
- flex: 1;
29
- min-height: 30px;
30
- line-height: 30px;
31
- border-radius: 32px;
32
- border-top-left-radius: 0px;
33
- padding: 8px 15px;
34
- text-align: left;
35
- margin-left: 5px;
36
- }
37
- </style>
1
+ <template>
2
+ <view class="media-body-loading">
3
+ <view class="bot_loading">
4
+ <span></span>
5
+ <span></span>
6
+ <span></span>
7
+ <span></span>
8
+ </view>
9
+ </view>
10
+ </template>
11
+
12
+ <script>
13
+ export default {
14
+ data() {
15
+ return {
16
+ name: ''
17
+ };
18
+ }
19
+ };
20
+ </script>
21
+
22
+ <style lang="less">
23
+ .media-body-loading {
24
+ background-color: #f4f8fc;
25
+ border: 1px solid #f4f8fc;
26
+ word-break: break-word;
27
+ box-shadow: 0px 0px 5px 0px rgba(76, 97, 255, 0.38);
28
+ flex: 1;
29
+ min-height: 30px;
30
+ line-height: 30px;
31
+ border-radius: 32px;
32
+ border-top-left-radius: 0px;
33
+ padding: 8px 15px;
34
+ text-align: left;
35
+ margin-left: 5px;
36
+ }
37
+ </style>
@@ -1,15 +1,15 @@
1
- <template>
2
- <view>
3
- <view v-html="message.content.input"></view>
4
- </view>
5
- </template>
6
- <script>
7
-
8
-
9
- export default {
10
- name:"SatisfactionV2",
11
- props:["message"],
12
- methods:{
13
- }
14
- }
15
- </script>
1
+ <template>
2
+ <view>
3
+ <view v-html="message.content.input"></view>
4
+ </view>
5
+ </template>
6
+ <script>
7
+
8
+
9
+ export default {
10
+ name:"SatisfactionV2",
11
+ props:["message"],
12
+ methods:{
13
+ }
14
+ }
15
+ </script>
@@ -1,162 +1,162 @@
1
- <template>
2
- <div
3
- v-loading="loading"
4
- :element-loading-text="showProgress"
5
- id="dragon-video"
6
- >
7
- <!-- <video-player
8
- class="video-player vjs-custom-skin"
9
- x5-video-player-type="h5"
10
- :options="videoOptions(msg.content,msg.type)"
11
- @pause="statechanged"
12
- /> -->
13
- <video
14
- controls="controls"
15
- :controlslist="nodownload&&'nodownload'"
16
- :raw-controls="true"
17
- x5-video-player-type="h5-page"
18
- style="object-fit: contain;width: calc(100vw - 139px);height: 160px;background-color: black;border-radius: 10px;max-width: 230px;padding-left: 10px"
19
- preload
20
- :poster="videoSrc+'?spm=qipa250&x-oss-process=video/snapshot,t_1000,f_jpg,w_0,h_0,m_fast'"
21
- class="video-player vjs-custom-skin"
22
- :id="msg.id+'key'">
23
- <source :src="videoSrc"/>
24
- </video>
25
- <div v-show="!nodownload" class="dragon-video-download">
26
- <a :href="msg.content.url" download><span class="el-icon-download"></span></a>
27
- </div>
28
- <div id="output"></div>
29
- </div>
30
- </template>
31
- <script>
32
- import {uploadImageByBase64} from "../assets/js/AliyunlssUtil";
33
-
34
- export default {
35
- name: "ask_video",
36
- props: ["msg", "url", "localUrl", "progress", "nodownload"],
37
- data() {
38
- return {
39
- videoSrc:'',
40
- poster:''
41
- }
42
- },
43
- watch: {
44
- },
45
- computed: {
46
- showProgress() {
47
- return parseInt(this.progress * 100);
48
- },
49
- loading() {
50
- return this.url == null || this.url === "";
51
- },
52
- src() {
53
- return this.url ? this.url : this.localUrl;
54
- }
55
- },
56
- mounted() {
57
- this.$nextTick(()=>{
58
- let videoSrc = this.url ? this.url : this.localUrl
59
- let newVideoSrc = videoSrc.replace("https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com","https://static.guoranbot.com")
60
- this.videoSrc = newVideoSrc
61
- console.debug('newVideoSrc',this.videoSrc,videoSrc)
62
- this.poster = this.videoSrc+'?spm=qipa250&x-oss-process=video/snapshot,t_1000,f_jpg,w_0,h_0,m_fast'
63
- console.debug('poster',this.poster)
64
- })
65
-
66
- },
67
- methods:{
68
- getImage(){
69
- let that = this
70
- var video,output;
71
- var scale = 0.8;
72
-
73
- var initialize = function() {
74
- let id = that.msg.keyId+'key'
75
- output = document.getElementById("output");
76
- video = document.getElementById(id);
77
- video.addEventListener('loadeddata',captureImage);
78
- };
79
-
80
- var captureImage = function() {
81
- var canvas = document.createElement("canvas");
82
- canvas.width = video.videoWidth * scale;
83
- canvas.height = video.videoHeight * scale;
84
- canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);
85
- /*var img = document.createElement("img");
86
- img.crossOrigin = 'anonymous'
87
- img.src = canvas.toDataURL("image/png");*/
88
- let reg = /\.(png|jpg|gif)$/
89
- console.debug('img.src',output)
90
- let base64 = canvas.toDataURL("image/png")
91
- let blob = that.dataURLtoFile(base64,'name')
92
- let promise = uploadImageByBase64(blob);
93
- promise.then((res)=>{
94
- console.debug("upload base64 reslut",res);
95
- if (res&&res.url){
96
- that.poster = res.url
97
- if (!reg.test(that.poster)){
98
- that.poster +='.png'
99
- }
100
- }
101
- console.debug('poster',that.poster)
102
- });
103
- };
104
-
105
- initialize();
106
- },
107
- dataURLtoFile(dataurl, filename) {
108
- var arr = dataurl.split(',');
109
- var mime = arr[0].match(/:(.*?);/)[1];
110
- var bstr = atob(arr[1]);
111
- var n = bstr.length;
112
- var u8arr = new Uint8Array(n);
113
- while(n--){
114
- u8arr[n] = bstr.charCodeAt(n);
115
- }
116
- //转换成file对象
117
- return new File([u8arr], filename, {type:mime});
118
- //转换成成blob对象
119
- /*return new Blob([u8arr],{type:'image/png'});*/
120
- }
121
- }
122
-
123
- }
124
- </script>
125
- <style scoped lang="less">
126
- video::-webkit-media-controls-mute-button { display: none !important;}
127
- #dragon-video{
128
- position: relative;
129
- width: calc(100vw - 109px);
130
- max-width: 260px;
131
- #outputVideo{
132
- position: absolute;
133
- top: 0px;
134
- /deep/img{
135
- width: calc(100vw - 139px);
136
- border-radius: 25px;
137
- max-width: 230px;
138
- height: 160px;
139
- }
140
-
141
- }
142
- .dragon-video-download{
143
- position: absolute;
144
- width: 40px;
145
- height: 26px;
146
- background-color: rgba(54, 106, 255, 0.5);
147
- border-radius: 13px;
148
- text-align: center;
149
- bottom: 2px;
150
- right: 6px;
151
- a {
152
- span {
153
- height: 26px;
154
- line-height: 26px;
155
- display: block;
156
- color: white;
157
- }
158
- }
159
- }
160
- }
161
-
162
- </style>
1
+ <template>
2
+ <div
3
+ v-loading="loading"
4
+ :element-loading-text="showProgress"
5
+ id="dragon-video"
6
+ >
7
+ <!-- <video-player
8
+ class="video-player vjs-custom-skin"
9
+ x5-video-player-type="h5"
10
+ :options="videoOptions(msg.content,msg.type)"
11
+ @pause="statechanged"
12
+ /> -->
13
+ <video
14
+ controls="controls"
15
+ :controlslist="nodownload&&'nodownload'"
16
+ :raw-controls="true"
17
+ x5-video-player-type="h5-page"
18
+ style="object-fit: contain;width: calc(100vw - 139px);height: 160px;background-color: black;border-radius: 10px;max-width: 230px;padding-left: 10px"
19
+ preload
20
+ :poster="videoSrc+'?spm=qipa250&x-oss-process=video/snapshot,t_1000,f_jpg,w_0,h_0,m_fast'"
21
+ class="video-player vjs-custom-skin"
22
+ :id="msg.id+'key'">
23
+ <source :src="videoSrc"/>
24
+ </video>
25
+ <div v-show="!nodownload" class="dragon-video-download">
26
+ <a :href="msg.content.url" download><span class="el-icon-download"></span></a>
27
+ </div>
28
+ <div id="output"></div>
29
+ </div>
30
+ </template>
31
+ <script>
32
+ import {uploadImageByBase64} from "../assets/js/AliyunlssUtil";
33
+
34
+ export default {
35
+ name: "ask_video",
36
+ props: ["msg", "url", "localUrl", "progress", "nodownload"],
37
+ data() {
38
+ return {
39
+ videoSrc:'',
40
+ poster:''
41
+ }
42
+ },
43
+ watch: {
44
+ },
45
+ computed: {
46
+ showProgress() {
47
+ return parseInt(this.progress * 100);
48
+ },
49
+ loading() {
50
+ return this.url == null || this.url === "";
51
+ },
52
+ src() {
53
+ return this.url ? this.url : this.localUrl;
54
+ }
55
+ },
56
+ mounted() {
57
+ this.$nextTick(()=>{
58
+ let videoSrc = this.url ? this.url : this.localUrl
59
+ let newVideoSrc = videoSrc.replace("https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com","https://static.guoranbot.com")
60
+ this.videoSrc = newVideoSrc
61
+ console.debug('newVideoSrc',this.videoSrc,videoSrc)
62
+ this.poster = this.videoSrc+'?spm=qipa250&x-oss-process=video/snapshot,t_1000,f_jpg,w_0,h_0,m_fast'
63
+ console.debug('poster',this.poster)
64
+ })
65
+
66
+ },
67
+ methods:{
68
+ getImage(){
69
+ let that = this
70
+ var video,output;
71
+ var scale = 0.8;
72
+
73
+ var initialize = function() {
74
+ let id = that.msg.keyId+'key'
75
+ output = document.getElementById("output");
76
+ video = document.getElementById(id);
77
+ video.addEventListener('loadeddata',captureImage);
78
+ };
79
+
80
+ var captureImage = function() {
81
+ var canvas = document.createElement("canvas");
82
+ canvas.width = video.videoWidth * scale;
83
+ canvas.height = video.videoHeight * scale;
84
+ canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);
85
+ /*var img = document.createElement("img");
86
+ img.crossOrigin = 'anonymous'
87
+ img.src = canvas.toDataURL("image/png");*/
88
+ let reg = /\.(png|jpg|gif)$/
89
+ console.debug('img.src',output)
90
+ let base64 = canvas.toDataURL("image/png")
91
+ let blob = that.dataURLtoFile(base64,'name')
92
+ let promise = uploadImageByBase64(blob);
93
+ promise.then((res)=>{
94
+ console.debug("upload base64 reslut",res);
95
+ if (res&&res.url){
96
+ that.poster = res.url
97
+ if (!reg.test(that.poster)){
98
+ that.poster +='.png'
99
+ }
100
+ }
101
+ console.debug('poster',that.poster)
102
+ });
103
+ };
104
+
105
+ initialize();
106
+ },
107
+ dataURLtoFile(dataurl, filename) {
108
+ var arr = dataurl.split(',');
109
+ var mime = arr[0].match(/:(.*?);/)[1];
110
+ var bstr = atob(arr[1]);
111
+ var n = bstr.length;
112
+ var u8arr = new Uint8Array(n);
113
+ while(n--){
114
+ u8arr[n] = bstr.charCodeAt(n);
115
+ }
116
+ //转换成file对象
117
+ return new File([u8arr], filename, {type:mime});
118
+ //转换成成blob对象
119
+ /*return new Blob([u8arr],{type:'image/png'});*/
120
+ }
121
+ }
122
+
123
+ }
124
+ </script>
125
+ <style scoped lang="less">
126
+ video::-webkit-media-controls-mute-button { display: none !important;}
127
+ #dragon-video{
128
+ position: relative;
129
+ width: calc(100vw - 109px);
130
+ max-width: 260px;
131
+ #outputVideo{
132
+ position: absolute;
133
+ top: 0px;
134
+ /deep/img{
135
+ width: calc(100vw - 139px);
136
+ border-radius: 25px;
137
+ max-width: 230px;
138
+ height: 160px;
139
+ }
140
+
141
+ }
142
+ .dragon-video-download{
143
+ position: absolute;
144
+ width: 40px;
145
+ height: 26px;
146
+ background-color: rgba(54, 106, 255, 0.5);
147
+ border-radius: 13px;
148
+ text-align: center;
149
+ bottom: 2px;
150
+ right: 6px;
151
+ a {
152
+ span {
153
+ height: 26px;
154
+ line-height: 26px;
155
+ display: block;
156
+ color: white;
157
+ }
158
+ }
159
+ }
160
+ }
161
+
162
+ </style>