askbot-dragon 1.7.22-beta → 1.7.24-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 (35) hide show
  1. package/package.json +14 -12
  2. package/public/index.html +8 -10
  3. package/src/assets/js/AliyunlssUtil.js +50 -26
  4. package/src/assets/js/hammer.js +13 -2
  5. package/src/assets/less/converSationContainer/common.less +7 -0
  6. package/src/components/ActionAlertIframe.vue +24 -1
  7. package/src/components/AiGuide.vue +121 -154
  8. package/src/components/AnswerDocknowledge.vue +108 -100
  9. package/src/components/ConversationContainer.vue +13 -220
  10. package/src/components/MyEditor.vue +2 -1
  11. package/src/components/actionSatisfaction.vue +3 -3
  12. package/src/components/answerRadio.vue +3 -3
  13. package/src/components/askVideo.vue +23 -0
  14. package/src/components/associationIntention.vue +11 -7
  15. package/src/components/formTemplate.vue +54 -50
  16. package/src/components/imgView.vue +32 -0
  17. package/src/components/intelligentSummary.vue +8 -4
  18. package/src/components/markDownText.vue +128 -0
  19. package/src/components/message/TextMessage.vue +15 -11
  20. package/src/components/message/swiper/ticketSwiper.vue +1 -1
  21. package/src/components/newPdfPosition.vue +878 -0
  22. package/src/components/pdfPosition.vue +217 -37
  23. package/src/components/popup.vue +2 -2
  24. package/src/components/previewDoc.vue +6 -2
  25. package/src/components/previewPdf.vue +159 -134
  26. package/src/components/senderMessagePlatform.vue +4 -4
  27. package/src/components/utils/ckeditor.js +1 -1
  28. package/src/components/welcomeKnowledgeFile.vue +6 -2
  29. package/src/components/welcomeLlmCard.vue +5 -1
  30. package/src/components/welcomeSuggest.vue +1 -1
  31. package/src/locales/cn.json +72 -0
  32. package/src/locales/en.json +73 -0
  33. package/src/locales/jp.json +73 -0
  34. package/src/main.js +18 -0
  35. package/src/components/QwFeedback.vue +0 -302
@@ -0,0 +1,128 @@
1
+ <template>
2
+ <div @click="lookImage">
3
+ <vue-markdown
4
+ class="mark_down"
5
+ :source="typedContent"
6
+ :ref="'markdown' + msgId"
7
+ >
8
+ </vue-markdown>
9
+ <div v-if="showPreview">
10
+ <img-view :url-list="imgList" @closeViewer="closeViewer"></img-view>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ import VueMarkdown from "vue-markdown";
17
+ import ImgView from "./imgView.vue";
18
+
19
+ export default {
20
+ name: "markDownText",
21
+ data() {
22
+ return {
23
+ typedContent: "",
24
+ typingSpeed: 15,
25
+ showPreview: false,
26
+ imgList: [],
27
+ };
28
+ },
29
+ props: {
30
+ chainValues: {
31
+ type: String,
32
+ default: "",
33
+ },
34
+ msgId: {
35
+ type: String,
36
+ default: "",
37
+ },
38
+ isHistory: {
39
+ type: Boolean,
40
+ default: false,
41
+ },
42
+ },
43
+ components: {
44
+ ImgView,
45
+ VueMarkdown,
46
+ },
47
+ mounted() {
48
+ this.$nextTick(() => {
49
+ // let ref = 'markdown' + this.msgId
50
+ // const el = this.$refs[ref].$el;
51
+ // if (this.isHistory){
52
+ // el.innerHTML = this.chainValues;
53
+ // } else {
54
+ // new Typed(el, {
55
+ // strings: [this.chainValues],
56
+ // typeSpeed: 30,
57
+ // showCursor: false
58
+ // })
59
+ // }
60
+ if (this.isHistory) {
61
+ this.typedContent = this.chainValues;
62
+ } else {
63
+ this.startTypingEffect();
64
+ }
65
+ });
66
+ },
67
+ methods: {
68
+ startTypingEffect() {
69
+ let i = 0;
70
+ const interval = setInterval(() => {
71
+ if (i < this.chainValues.length) {
72
+ this.typedContent += this.chainValues.charAt(i);
73
+ i++;
74
+ } else {
75
+ clearInterval(interval);
76
+ }
77
+ }, this.typingSpeed);
78
+ },
79
+ lookImage(e) {
80
+ let previewImageUrl = "";
81
+ console.log("e.target", e.target);
82
+ if (e.target.localName == "img") {
83
+ previewImageUrl = e.target.currentSrc;
84
+ this.showPreview = true;
85
+ }
86
+ let richtext = JSON.parse(JSON.stringify(this.typedContent));
87
+ this.imgList = [];
88
+ richtext.replace(
89
+ /<img [^>]*src=['"]([^'"]+)[^>]*>/g,
90
+ (match, capture) => {
91
+ this.imgList.push(capture);
92
+ }
93
+ );
94
+ /*当前点击的图片作为第一个图片*/
95
+ let index = this.imgList.indexOf(previewImageUrl);
96
+ this.imgList.splice(index, 1);
97
+ this.imgList.unshift(previewImageUrl);
98
+ },
99
+ closeViewer() {
100
+ this.showPreview = false;
101
+ },
102
+ },
103
+ };
104
+ </script>
105
+
106
+ <style scoped lang="less">
107
+ .mark_down {
108
+ line-height: 25px;
109
+ /deep/p {
110
+ margin-bottom: 14px;
111
+ }
112
+ /deep/p:only-child {
113
+ margin: 0 !important;
114
+ }
115
+ /deep/p:last-child {
116
+ margin-bottom: 0 !important;
117
+ }
118
+ /deep/ol,
119
+ ul {
120
+ li {
121
+ margin: 14px 0 !important;
122
+ }
123
+ }
124
+ /deep/img {
125
+ max-width: 400px;
126
+ }
127
+ }
128
+ </style>
@@ -12,14 +12,14 @@
12
12
  </div>
13
13
  <div v-if="isCompany">
14
14
  <div v-if="single === true" class="editMessage">
15
- <el-input v-model="input" placeholder="请输入内容" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
15
+ <el-input v-model="input" :placeholder="$t('common.inputPlaceholder')" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
16
16
  <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
17
17
  --> </div>
18
18
  <div v-if="date" class="editMessage">
19
19
  <el-date-picker
20
20
  v-model="dateValue"
21
21
  type="date"
22
- placeholder="选择日期"
22
+ :placeholder="$t('common.selectDate')"
23
23
  style="width: 100%;margin: 10px 0 10px 0"
24
24
  :clearable=false
25
25
  @change="dataclick"
@@ -31,7 +31,7 @@
31
31
  <div v-if="time" class="editMessage">
32
32
  <el-time-picker
33
33
  v-model="timeValue"
34
- placeholder="任意时间点"
34
+ :placeholder="$t('common.selectTime')"
35
35
  style="margin: 10px 0 10px 0;width: 100%"
36
36
  :clearable=false
37
37
  @change="dataclick"
@@ -43,7 +43,7 @@
43
43
  <el-date-picker
44
44
  v-model="dateTimeValue"
45
45
  type="datetime"
46
- placeholder="选择日期时间"
46
+ :placeholder="$t('common.selectDateTime')"
47
47
  style="width: 100%;margin: 10px 0 10px 0"
48
48
  @change="dataclick"
49
49
  >
@@ -92,7 +92,7 @@
92
92
  </div>
93
93
  <div v-if="isPhone">
94
94
  <div v-if="single" class="editMessage">
95
- <el-input v-model="input" placeholder="请输入内容" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
95
+ <el-input v-model="input" :placeholder="$t('common.inputPlaceholder')" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
96
96
  <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
97
97
  --> </div>
98
98
  <div v-if="date">
@@ -113,7 +113,7 @@
113
113
  <van-datetime-picker
114
114
  v-model="timeValue"
115
115
  type="datetime"
116
- title="选择时间"
116
+ :title="$t('common.selectTime')"
117
117
  :min-date="minDate"
118
118
  :formatter="formatter"
119
119
  @cancel="showTimePicker = false"
@@ -134,7 +134,7 @@
134
134
  <van-datetime-picker
135
135
  v-model="dateTimeValue"
136
136
  type="datetime"
137
- title="选择日期时间"
137
+ :title="$t('common.selectDateTime')"
138
138
  :min-date="minDate"
139
139
  :formatter="formatter"
140
140
  @cancel="showDateTimePicker = false"
@@ -301,7 +301,11 @@ export default {
301
301
  },
302
302
  type:String,
303
303
  disable:Boolean,
304
- submit:Boolean
304
+ submit:Boolean,
305
+ language:{
306
+ type:String,
307
+ default:"cn"
308
+ }
305
309
  },
306
310
  mounted() {
307
311
  this.isMobile()
@@ -367,11 +371,11 @@ export default {
367
371
  }
368
372
  if(this.submit===true)
369
373
  {
370
- this.submitValue='已确认'
374
+ this.submitValue=this.$t('common.confirmed')
371
375
  }
372
376
  else
373
377
  {
374
- this.submitValue='确认'
378
+ this.submitValue=this.$t('common.confirm')
375
379
  }
376
380
  },
377
381
  methods:{
@@ -612,7 +616,7 @@ export default {
612
616
  infomation['template']=innerhtml.querySelector('#html').innerHTML
613
617
  infomation['apiKey']=this.text.apiKey
614
618
  this.$emit('submitClick',infomation,this.text.apiKey)
615
- this.submitValue='已确认'
619
+ this.submitValue=this.$t('common.confirmed')
616
620
  this.disableds=true
617
621
  },
618
622
  addZero(i){
@@ -9,7 +9,7 @@
9
9
  >
10
10
  <slot></slot>
11
11
  </div>
12
- <div v-if="device==='PC'&&content.multiple===true" class="clickBtn">
12
+ <div v-if="device==='PC'&&content.multiple===true && content.cards && content.cards.length > 1" class="clickBtn">
13
13
  <div class="preBtn" @click="preClick" style="display: flex">
14
14
  <i class="el-icon-arrow-left" style="font-size: 18px;font-weight:800;align-self: center;margin: auto"></i>
15
15
  </div>