askbot-dragon 0.7.87 → 0.7.91

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 (67) hide show
  1. package/README.md +27 -27
  2. package/babel.config.js +5 -5
  3. package/dragon.iml +7 -7
  4. package/package.json +55 -55
  5. package/public/index.html +30 -30
  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/script.js +36 -36
  13. package/src/assets/less/common.css +6773 -6773
  14. package/src/assets/less/converSationContainer/common.less +191 -191
  15. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  16. package/src/assets/less/iconfont.css +37 -37
  17. package/src/assets/less/ticketMessage.less +211 -211
  18. package/src/components/ActionAlertIframe.vue +112 -112
  19. package/src/components/AiGuide.vue +467 -467
  20. package/src/components/AskIFrame.vue +15 -15
  21. package/src/components/ConversationContainer.vue +1318 -1318
  22. package/src/components/FileType.vue +86 -86
  23. package/src/components/Message.vue +27 -27
  24. package/src/components/actionSatisfaction.vue +107 -107
  25. package/src/components/actionSendToBot.vue +62 -62
  26. package/src/components/answerDissatisfaction.vue +62 -62
  27. package/src/components/answerRadio.vue +76 -76
  28. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  29. package/src/components/ask-components/Msgloading.vue +37 -37
  30. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  31. package/src/components/askVideo.vue +138 -138
  32. package/src/components/assetDetails.vue +370 -370
  33. package/src/components/assetMessage.vue +228 -228
  34. package/src/components/associationIntention.vue +229 -121
  35. package/src/components/botActionSatisfactor.vue +68 -68
  36. package/src/components/chatContent.vue +513 -513
  37. package/src/components/feedBack.vue +136 -136
  38. package/src/components/file/AliyunOssComponents.vue +108 -108
  39. package/src/components/formTemplate.vue +1974 -1969
  40. package/src/components/loadingProcess.vue +164 -164
  41. package/src/components/message/ActionAlertIframe.vue +112 -112
  42. package/src/components/message/ShopMessage.vue +164 -164
  43. package/src/components/message/TextMessage.vue +924 -924
  44. package/src/components/message/TicketMessage.vue +177 -177
  45. package/src/components/message/swiper/index.js +4 -4
  46. package/src/components/message/swiper/ticketSwiper.vue +502 -502
  47. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  48. package/src/components/msgLoading.vue +231 -231
  49. package/src/components/recommend.vue +89 -89
  50. package/src/components/selector/hOption.vue +20 -20
  51. package/src/components/selector/hSelector.vue +199 -199
  52. package/src/components/selector/hWrapper.vue +216 -216
  53. package/src/components/source/BotMessage.vue +24 -24
  54. package/src/components/source/CustomMessage.vue +24 -24
  55. package/src/components/test.vue +260 -260
  56. package/src/components/utils/AliyunIssUtil.js +72 -72
  57. package/src/components/utils/ckeditor.js +123 -123
  58. package/src/components/utils/command.js +68 -68
  59. package/src/components/utils/editing.js +11 -11
  60. package/src/components/utils/format_date.js +18 -18
  61. package/src/components/utils/index.js +6 -6
  62. package/src/components/utils/math_utils.js +15 -15
  63. package/src/components/utils/plugin-image.js +11 -11
  64. package/src/components/utils/toolbar-ui.js +41 -41
  65. package/src/components/voiceComponent.vue +119 -119
  66. package/src/main.js +45 -45
  67. package/vue.config.js +34 -34
@@ -1,122 +1,230 @@
1
- <template>
2
- <div class="association-intention">
3
- <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && !(msg.recommend&& msg.recommend.status)">
4
- <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)"></p>
5
- </div>
6
- <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && (msg.recommend&& msg.recommend.status)">
7
- <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
8
- <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
9
- </div>
10
- <div v-if="msg.type === 'answer_rich_text' && !(msg.content.recommend && msg.content.recommend.status)">
11
- <p v-html="$options.filters.imageStyle(msg.content.html)"></p>
12
- </div>
13
- <div v-else-if="msg.type == 'answer_rich_text' && (msg.content.recommend && msg.content.recommend.status)">
14
- <p v-html="$options.filters.imageStyle(msg.content.html)" class="answer-rich-text"></p>
15
- <Recommend :msg="msg.content" @onRadioClickReco="onRadioClickReco"></Recommend>
16
- </div>
17
- <div v-else-if="msgType === 'answer_image'" >
18
- <div
19
- class="association-img"
20
- v-if="msg.content.url"
21
- >
22
- <!-- LPY 原生宽度适配有bug,弃用 -->
23
- <img
24
- :src="msg.content.url"
25
- style="height: auto; width: calc(100vw - 137px);border-radius: 25px;max-width: 230px"
26
- @click="onImageClick(msg.content.url)"
27
- class="img-class"
28
- />
29
- </div>
30
- <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
31
- </div>
32
- <div v-else-if="msgType === 'answer_video' || msgType === 'user_video' || msgType === 'VIDEO'">
33
- <div class="association-img" v-if="msg.content.url">
34
- <ask-video :msg="msg" :url="msg.content.url" :local-url="msg.content.localUrl"
35
- :progress="msg.content.progress"></ask-video>
36
- </div>
37
- <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
38
- </div>
39
- </div>
40
- </template>
41
-
42
- <script>
43
- import askVideo from "./askVideo";
44
- import Recommend from "./recommend";
45
- export default {
46
- name: "associationIntention",
47
- components: {Recommend, askVideo},
48
- props: ["msg",'msgType','isOpen'],
49
- filters: {
50
- imageStyle: function (html) {
51
- //富文本内图片自适应高度宽度
52
- const regex = new RegExp("<img", "gi");
53
- return html.replace(
54
- regex,
55
- "<img style='max-width: 230px;border-radius: 25px;' onclick='imageOnClick(this)'"
56
- );
57
- },
58
- },
59
- mounted() {
60
- },
61
- methods:{
62
- // 将匹配结果替换表情图片
63
- emotion (res) {
64
- let word = res.replace(/\/#|\/;/gi,'')
65
- const list = ['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴', '睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过', '酷', '冷汗', '抓狂', '吐', '偷笑', '可爱', '白眼', '傲慢', '饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂', '疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见', '擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠', '鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀', '西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰', '凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀', '足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强', '弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你', '不', '可以', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈', '磕头', '回头', '跳绳', '挥手', '激动', '街舞', '献吻', '左太极', '右太极']
66
- let index = list.indexOf(word)
67
- return `<img height="20px" src="https://guoranim.oss-cn-beijing.aliyuncs.com/emoji/${index+1}.png" align="middle">`
68
- },
69
- onRadioClickReco(id, name, apikey) {
70
- this.$emit("onRadioClick", id, name, apikey);
71
- },
72
- onImageClick(url){
73
- this.$emit('onImageClick',url)
74
- },
75
- },
76
- watch:{
77
- isOpen:{
78
- handler(value){
79
- if (value){
80
- let reg = this.msg.content.html
81
- if (reg){
82
- reg = reg.replace('<a',"<span class='isReplace'")
83
- reg = reg.replace('</a>','</span>')
84
- console.debug('reg',reg)
85
- this.msg.content.html = reg
86
- }
87
-
88
- }
89
- else {
90
- let reg = this.msg.content.html
91
- console.debug('reg',reg)
92
- if (reg){
93
- reg = reg.replace("<span class='isReplace'","<a download")
94
- let reg2 = reg
95
- reg2 = reg2.replace('</span>','</a>')
96
- this.msg.content.html = reg2
97
- console.debug('reg',reg2)
98
- }
99
- }
100
- }
101
- }
102
- }
103
- }
104
- </script>
105
-
106
-
107
- <style scoped lang="less">
108
- @import "../assets/less/converSationContainer/common";
109
- .association-intention{
110
- .association-img{
111
- /*display: flex;
112
- align-items: center;
113
- justify-content: center;*/
114
-
115
- }
116
- .answer-rich-text{
117
- /*padding-bottom: 10px;
118
- border-bottom: 1px solid #EEEEEE;*/
119
- }
120
- }
121
-
1
+ <template>
2
+ <div class="association-intention">
3
+ <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && !(msg.recommend&& msg.recommend.status)">
4
+ <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)"></p>
5
+ </div>
6
+ <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && (msg.recommend&& msg.recommend.status)">
7
+ <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
8
+ <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
9
+ </div>
10
+ <div v-if="msg.type === 'answer_rich_text' && !(msg.content.recommend && msg.content.recommend.status)">
11
+ <p v-html="$options.filters.imageStyle(msg.content.html)"></p>
12
+ </div>
13
+ <div v-else-if="msg.type == 'answer_rich_text' && (msg.content.recommend && msg.content.recommend.status)">
14
+ <p v-html="$options.filters.imageStyle(msg.content.html)" class="answer-rich-text"></p>
15
+ <Recommend :msg="msg.content" @onRadioClickReco="onRadioClickReco"></Recommend>
16
+ </div>
17
+ <div v-else-if="msgType === 'answer_image'" >
18
+ <div
19
+ class="association-img"
20
+ v-if="msg.content.url"
21
+ >
22
+ <!-- LPY 原生宽度适配有bug,弃用 -->
23
+ <img
24
+ :src="msg.content.url"
25
+ style="height: auto; width: calc(100vw - 137px);border-radius: 25px;max-width: 230px"
26
+ @click="onImageClick(msg.content.url)"
27
+ class="img-class"
28
+ />
29
+ </div>
30
+ <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
31
+ </div>
32
+ <div v-else-if="msgType === 'answer_video' || msgType === 'user_video' || msgType === 'VIDEO'">
33
+ <div class="association-img" v-if="msg.content.url">
34
+ <ask-video :msg="msg" :url="msg.content.url" :local-url="msg.content.localUrl"
35
+ :progress="msg.content.progress"></ask-video>
36
+ </div>
37
+ <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
38
+ </div>
39
+ </div>
40
+ </template>
41
+
42
+ <script>
43
+ import askVideo from "./askVideo";
44
+ import Recommend from "./recommend";
45
+ export default {
46
+ name: "associationIntention",
47
+ components: {Recommend, askVideo},
48
+ props: ["msg",'msgType','isOpen'],
49
+ filters: {
50
+ imageStyle: function (html) {
51
+ //富文本内图片自适应高度宽度
52
+ const regex = new RegExp("<img", "gi");
53
+ return html.replace(
54
+ regex,
55
+ "<img style='max-width: 230px;border-radius: 25px;' onclick='imageOnClick(this)'"
56
+ );
57
+ },
58
+ },
59
+ mounted() {
60
+ },
61
+ methods:{
62
+ // 将匹配结果替换表情图片
63
+ emotion(res) {
64
+ let word = res.replace(/#|;/gi, "");
65
+ const list = [
66
+ "微笑",
67
+ "撇嘴",
68
+ "色",
69
+ "发呆",
70
+ "得意",
71
+ "流泪",
72
+ "害羞",
73
+ "闭嘴",
74
+ "睡",
75
+ "大哭",
76
+ "尴尬",
77
+ "发怒",
78
+ "调皮",
79
+ "呲牙",
80
+ "惊讶",
81
+ "难过",
82
+ "",
83
+ "冷汗",
84
+ "抓狂",
85
+ "吐",
86
+ "偷笑",
87
+ "可爱",
88
+ "白眼",
89
+ "傲慢",
90
+ "饥饿",
91
+ "困",
92
+ "惊恐",
93
+ "流汗",
94
+ "憨笑",
95
+ "大兵",
96
+ "奋斗",
97
+ "咒骂",
98
+ "疑问",
99
+ "嘘",
100
+ "晕",
101
+ "折磨",
102
+ "衰",
103
+ "骷髅",
104
+ "敲打",
105
+ "再见",
106
+ "擦汗",
107
+ "抠鼻",
108
+ "鼓掌",
109
+ "糗大了",
110
+ "坏笑",
111
+ "左哼哼",
112
+ "右哼哼",
113
+ "哈欠",
114
+ "鄙视",
115
+ "委屈",
116
+ "快哭了",
117
+ "阴险",
118
+ "亲亲",
119
+ "吓",
120
+ "可怜",
121
+ "菜刀",
122
+ "西瓜",
123
+ "啤酒",
124
+ "篮球",
125
+ "乒乓",
126
+ "咖啡",
127
+ "饭",
128
+ "猪头",
129
+ "玫瑰",
130
+ "凋谢",
131
+ "示爱",
132
+ "爱心",
133
+ "心碎",
134
+ "蛋糕",
135
+ "闪电",
136
+ "炸弹",
137
+ "刀",
138
+ "足球",
139
+ "瓢虫",
140
+ "便便",
141
+ "月亮",
142
+ "太阳",
143
+ "礼物",
144
+ "拥抱",
145
+ "强",
146
+ "弱",
147
+ "握手",
148
+ "胜利",
149
+ "抱拳",
150
+ "勾引",
151
+ "拳头",
152
+ "差劲",
153
+ "爱你",
154
+ "不",
155
+ "可以",
156
+ "爱情",
157
+ "飞吻",
158
+ "跳跳",
159
+ "发抖",
160
+ "怄火",
161
+ "转圈",
162
+ "磕头",
163
+ "回头",
164
+ "跳绳",
165
+ "挥手",
166
+ "激动",
167
+ "街舞",
168
+ "献吻",
169
+ "左太极",
170
+ "右太极",
171
+ ];
172
+ let index = list.indexOf(word);
173
+ return `<img height="20px" src="https://guoranim.oss-cn-beijing.aliyuncs.com/emoji/${
174
+ index + 1
175
+ }.png" align="middle">`;
176
+ },
177
+ onRadioClickReco(id, name, apikey) {
178
+ this.$emit("onRadioClick", id, name, apikey);
179
+ },
180
+ onImageClick(url){
181
+ this.$emit('onImageClick',url)
182
+ },
183
+ },
184
+ watch:{
185
+ isOpen:{
186
+ handler(value){
187
+ if (value){
188
+ let reg = this.msg.content.html
189
+ if (reg){
190
+ reg = reg.replace('<a',"<span class='isReplace'")
191
+ reg = reg.replace('</a>','</span>')
192
+ console.debug('reg',reg)
193
+ this.msg.content.html = reg
194
+ }
195
+
196
+ }
197
+ else {
198
+ let reg = this.msg.content.html
199
+ console.debug('reg',reg)
200
+ if (reg){
201
+ reg = reg.replace("<span class='isReplace'","<a download")
202
+ let reg2 = reg
203
+ reg2 = reg2.replace('</span>','</a>')
204
+ this.msg.content.html = reg2
205
+ console.debug('reg',reg2)
206
+ }
207
+ }
208
+ }
209
+ }
210
+ }
211
+ }
212
+ </script>
213
+
214
+
215
+ <style scoped lang="less">
216
+ @import "../assets/less/converSationContainer/common";
217
+ .association-intention{
218
+ .association-img{
219
+ /*display: flex;
220
+ align-items: center;
221
+ justify-content: center;*/
222
+
223
+ }
224
+ .answer-rich-text{
225
+ /*padding-bottom: 10px;
226
+ border-bottom: 1px solid #EEEEEE;*/
227
+ }
228
+ }
229
+
122
230
  </style>
@@ -1,69 +1,69 @@
1
- <template>
2
- <div class="bot-action-satisfator">
3
- <div class="replay">
4
- <p class="reply-text" v-html="msg.content.reply_text"></p>
5
- <div v-if="
6
- msg.content.reply_options != null &&
7
- msg.content.reply_options.length > 0
8
- ">
9
- <p
10
-
11
- v-for="(option, index) in msg.content.reply_options"
12
- class="statisfaction-item"
13
- :key="index"
14
- @click="
15
- onSatisfactionClick(
16
- 'user_action_to_unsatisfactory',
17
- option.name,
18
- option.answer, null,msg.apiKey
19
- )
20
- "
21
- >
22
- {{ option.name }}<i class="arsenal_icon arsenalangle-right-solid"></i>
23
- </p>
24
- </div>
25
-
26
- </div>
27
- </div>
28
- </template>
29
-
30
- <script>
31
- export default {
32
- name: "botActionSatisfactor",
33
- props:['msg'],
34
- methods:{
35
- onSatisfactionClick(type, choose, answer, answerRadio,answerApiKey) {
36
- this.$emit("onSatisfactionClick", type, choose, answer, answerRadio,answerApiKey);
37
- },
38
- }
39
- }
40
- </script>
41
-
42
- <style scoped lang="less">
43
- @import "../assets/less/converSationContainer/common";
44
- .bot-action-satisfator{
45
- .reply-text{
46
- word-wrap: break-word;
47
- word-break: break-all;
48
- overflow: hidden;
49
- padding: 8px 0 10px 0;
50
- height: auto;
51
- border-bottom: 1px solid #EEEEEE;
52
- }
53
- .statisfaction-item{
54
- padding: 8px 0;
55
- height: 25px;
56
- line-height: 25px;
57
- background-color: #ffffff;
58
- color: #366aff;
59
- cursor:pointer;
60
- display: flex;
61
- align-items: center;
62
- justify-content: space-between;
63
- }
64
- .end{
65
- border-bottom-left-radius: 25px !important;
66
- border-bottom-right-radius: 25px !important;
67
- }
68
- }
1
+ <template>
2
+ <div class="bot-action-satisfator">
3
+ <div class="replay">
4
+ <p class="reply-text" v-html="msg.content.reply_text"></p>
5
+ <div v-if="
6
+ msg.content.reply_options != null &&
7
+ msg.content.reply_options.length > 0
8
+ ">
9
+ <p
10
+
11
+ v-for="(option, index) in msg.content.reply_options"
12
+ class="statisfaction-item"
13
+ :key="index"
14
+ @click="
15
+ onSatisfactionClick(
16
+ 'user_action_to_unsatisfactory',
17
+ option.name,
18
+ option.answer, null,msg.apiKey
19
+ )
20
+ "
21
+ >
22
+ {{ option.name }}<i class="arsenal_icon arsenalangle-right-solid"></i>
23
+ </p>
24
+ </div>
25
+
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <script>
31
+ export default {
32
+ name: "botActionSatisfactor",
33
+ props:['msg'],
34
+ methods:{
35
+ onSatisfactionClick(type, choose, answer, answerRadio,answerApiKey) {
36
+ this.$emit("onSatisfactionClick", type, choose, answer, answerRadio,answerApiKey);
37
+ },
38
+ }
39
+ }
40
+ </script>
41
+
42
+ <style scoped lang="less">
43
+ @import "../assets/less/converSationContainer/common";
44
+ .bot-action-satisfator{
45
+ .reply-text{
46
+ word-wrap: break-word;
47
+ word-break: break-all;
48
+ overflow: hidden;
49
+ padding: 8px 0 10px 0;
50
+ height: auto;
51
+ border-bottom: 1px solid #EEEEEE;
52
+ }
53
+ .statisfaction-item{
54
+ padding: 8px 0;
55
+ height: 25px;
56
+ line-height: 25px;
57
+ background-color: #ffffff;
58
+ color: #366aff;
59
+ cursor:pointer;
60
+ display: flex;
61
+ align-items: center;
62
+ justify-content: space-between;
63
+ }
64
+ .end{
65
+ border-bottom-left-radius: 25px !important;
66
+ border-bottom-right-radius: 25px !important;
67
+ }
68
+ }
69
69
  </style>