askbot-dragon 1.6.21-beta → 1.6.21

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 (72) hide show
  1. package/package.json +8 -11
  2. package/public/index.html +9 -8
  3. package/src/assets/image/default_avt_ui.png +0 -0
  4. package/src/assets/image/filtType/audio.png +0 -0
  5. package/src/assets/image/filtType/excel1.png +0 -0
  6. package/src/assets/image/filtType/general.png +0 -0
  7. package/src/assets/image/filtType/image1.png +0 -0
  8. package/src/assets/image/filtType/link.png +0 -0
  9. package/src/assets/image/filtType/md2.png +0 -0
  10. package/src/assets/image/filtType/mode.png +0 -0
  11. package/src/assets/image/filtType/news.png +0 -0
  12. package/src/assets/image/filtType/pdf1.png +0 -0
  13. package/src/assets/image/filtType/ppt1.png +0 -0
  14. package/src/assets/image/filtType/selfadd1.png +0 -0
  15. package/src/assets/image/filtType/txt1.png +0 -0
  16. package/src/assets/image/filtType/video.png +0 -0
  17. package/src/assets/image/filtType/wechat.png +0 -0
  18. package/src/assets/image/filtType/word1.png +0 -0
  19. package/src/assets/image/loading.gif +0 -0
  20. package/src/assets/js/AliyunlssUtil.js +35 -10
  21. package/src/assets/js/common.js +241 -0
  22. package/src/components/ActionAlertIframe.vue +1 -0
  23. package/src/components/AiGuide.vue +7 -4
  24. package/src/components/AnswerDocknowledge.vue +930 -389
  25. package/src/components/ConversationContainer.vue +7111 -1058
  26. package/src/components/MyEditor.vue +342 -0
  27. package/src/components/QwFeedback.vue +303 -0
  28. package/src/components/actionSatisfaction.vue +2 -2
  29. package/src/components/actionSendToBot.vue +2 -2
  30. package/src/components/answerRadio.vue +145 -64
  31. package/src/components/askVideo.vue +3 -6
  32. package/src/components/assetDetails.vue +14 -6
  33. package/src/components/assetMessage.vue +14 -13
  34. package/src/components/associationIntention.vue +31 -6
  35. package/src/components/fielListView.vue +1 -1
  36. package/src/components/file/AliyunOssComponents.vue +1 -1
  37. package/src/components/formTemplate.vue +1590 -1674
  38. package/src/components/imgView.vue +32 -0
  39. package/src/components/intelligentSummary.vue +231 -0
  40. package/src/components/markDownText.vue +198 -0
  41. package/src/components/myPopup.vue +14 -11
  42. package/src/components/pagination.vue +129 -0
  43. package/src/components/pdfPosition.vue +112 -90
  44. package/src/components/popup.vue +8 -7
  45. package/src/components/preview/docView.vue +114 -0
  46. package/src/components/preview/excelView.vue +187 -0
  47. package/src/components/preview/newPositionPreview.vue +370 -0
  48. package/src/components/preview/pdfView.vue +824 -0
  49. package/src/components/previewDoc.vue +6 -0
  50. package/src/components/previewPdf.vue +963 -200
  51. package/src/components/receiverMessagePlatform.vue +25 -21
  52. package/src/components/recommend.vue +2 -2
  53. package/src/components/senderMessagePlatform.vue +21 -13
  54. package/src/components/tree.vue +116 -103
  55. package/src/components/utils/AliyunIssUtil.js +35 -13
  56. package/src/components/utils/ckeditor.js +64 -56
  57. package/src/components/welcomeKnowledgeFile.vue +344 -0
  58. package/src/components/welcomeLlmCard.vue +141 -0
  59. package/src/components/welcomeSuggest.vue +98 -0
  60. package/src/locales/cn.json +62 -0
  61. package/src/locales/en.json +62 -0
  62. package/src/main.js +19 -3
  63. package/vue.config.js +0 -1
  64. package/src/assets/js/obsBrowser.js +0 -63
  65. package/src/components/utils/ckeditorImageUpload/command.js +0 -112
  66. package/src/components/utils/ckeditorImageUpload/editing.js +0 -12
  67. package/src/components/utils/ckeditorImageUpload/plugin-image.js +0 -12
  68. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +0 -41
  69. package/src/components/utils/ckeditorfileUpload/common.js +0 -175
  70. package/src/components/utils/ckeditorfileUpload/editing.js +0 -12
  71. package/src/components/utils/ckeditorfileUpload/plugin_file.js +0 -12
  72. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +0 -35
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div>
3
+ <el-image-viewer :zIndex="999999" :on-close="closeViewer" :url-list="urlList" />
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ import ElementUI from 'element-ui';
9
+ // import ElImageViewer from ElementUI.Image.components.ImageViewer;
10
+
11
+ export default {
12
+ name: "imgView",
13
+ components: {
14
+ ElImageViewer: ElementUI.Image.components.ImageViewer
15
+ },
16
+ data () {
17
+ return {};
18
+ },
19
+ props: ["urlList"],
20
+ methods: {
21
+ closeViewer () {
22
+ // 关闭组件后从父级dom销毁这个挂载
23
+ if (this.$el.parentNode) {
24
+ this.$el.parentNode.removeChild(this.$el);
25
+ }
26
+ this.$emit("closeViewer");
27
+ },
28
+ },
29
+ };
30
+ </script>
31
+
32
+ <style scoped></style>
@@ -0,0 +1,231 @@
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>{{ $t('dragonCommon.smartSummary') }}</span>
7
+ </div>
8
+ <div class="right">
9
+ <div class="regenerationBtn" @click="regeneration">
10
+ <template v-if="!isLoading">
11
+ {{ $t('dragonCommon.regenerate') }}
12
+ </template>
13
+ <template v-else>
14
+ <img
15
+ height="20px"
16
+ width="20px"
17
+ src="../assets/image/loading.gif"
18
+ alt
19
+ srcset
20
+ style="margin-right: 6px"
21
+ />
22
+ <span>{{ $t('dragonCommon.generating') }}</span>
23
+ </template>
24
+ </div>
25
+ <i class="iconfont guoran-tongyichicun-shouqi" @click="closeSummary"></i>
26
+ </div>
27
+ </div>
28
+ <div class="summaryContent">
29
+ <span>{{ typedContent }}</span>
30
+ </div>
31
+ <div class="intelligentBottom" v-if="recommendQuestions.length > 0">
32
+ <div class="intelligentQues"
33
+ v-for="(item, index) in recommendQuestions"
34
+ :key="index"
35
+ @click="recommendQues(item)"
36
+ >
37
+ {{ item }}
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </template>
42
+
43
+ <script>
44
+ export default {
45
+ name: "intelligentSummary",
46
+ data(){
47
+ return{
48
+ summary:"",
49
+ recommendQuestions:[],
50
+ isLoading:false,
51
+ typedContent:"",
52
+ typingSpeed:20
53
+ }
54
+ },
55
+ props:{
56
+ knowledgeId:{
57
+ type:String
58
+ },
59
+ tagIds:{
60
+ type:Array,
61
+ default() {
62
+ return []
63
+ }
64
+ }
65
+ },
66
+ methods:{
67
+ getKnowledgeSummary() {
68
+ let url = "/knowledge-api/knowledge/detail/" + this.knowledgeId;
69
+ this.typedContent = "";
70
+ this.summary = "";
71
+ this.$http.get(url).then(res => {
72
+ console.log('res',res)
73
+ if (res.data.data){
74
+ this.summary = res.data.data.summary;
75
+ this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions.splice(0,5) : [];
76
+ if (!this.summary){
77
+ this.regeneration();
78
+ } else {
79
+ this.typedContent = this.summary;
80
+ }
81
+ }
82
+ this.$nextTick(() => {
83
+ this.$emit('getSummarySuccess')
84
+ })
85
+ })
86
+ },
87
+ regeneration(){
88
+ let url = "/knowledge-api/knowledge/analyze/summary";
89
+ let obj = {
90
+ "mainId": sessionStorage.getItem('_mainId') || localStorage.getItem('_mainId'),
91
+ "userId": sessionStorage.getItem('_uid') || localStorage.getItem('_uid'),
92
+ "knowledgeId": this.knowledgeId,
93
+ "async": false
94
+ }
95
+ this.isLoading = true;
96
+ this.typedContent = "";
97
+ this.summary = "";
98
+ this.$http.post(url,obj).then(res => {
99
+ console.log('regeneration',res)
100
+ if (res.data.data){
101
+ this.summary = res.data.data.summary;
102
+ this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions.splice(0,5) : [];
103
+ this.startTypingEffect();
104
+ } else {
105
+ this.$nextTick(() => {
106
+ this.$emit('getSummarySuccess')
107
+ })
108
+ }
109
+ this.isLoading = false;
110
+ })
111
+ },
112
+ closeSummary(){
113
+ this.$emit('closeSummary')
114
+ },
115
+ recommendQues(item){
116
+ this.$emit('recommendQues',item,this.knowledgeId)
117
+ },
118
+ startTypingEffect() {
119
+ let i = 0;
120
+ const interval = setInterval(() => {
121
+ if (i < this.summary.length) {
122
+ this.typedContent += this.summary.charAt(i);
123
+ i++;
124
+ } else {
125
+ clearInterval(interval);
126
+ setTimeout(() => {
127
+ this.$emit('getSummarySuccess')
128
+ },240)
129
+ }
130
+ }, this.typingSpeed);
131
+ },
132
+ },
133
+ mounted() {
134
+ this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
135
+ this.getKnowledgeSummary();
136
+ }
137
+ };
138
+ </script>
139
+
140
+ <style scoped lang="less">
141
+ .intelligentSummary{
142
+ background-color: #ffffff;
143
+ border-radius: 20px;
144
+ border: 1px solid #366AFF;
145
+ margin-bottom: 20px;
146
+ .summaryHeader{
147
+ display: flex;
148
+ align-items: center;
149
+ justify-content: space-between;
150
+ padding: 14px 16px;
151
+ font-size: 14px;
152
+ .left{
153
+ //display: flex;
154
+ //align-items: center;
155
+ color: #366aff;
156
+ i{
157
+ padding-right: 6px;
158
+ }
159
+ }
160
+ .right{
161
+ display: flex;
162
+ align-items: center;
163
+ color: #366aff;
164
+ .regenerationBtn{
165
+ height: 26px;
166
+ background: #E9EFFF;
167
+ border-radius: 12px;
168
+ color: #366AFF;
169
+ display: flex;
170
+ align-items: center;
171
+ justify-content: center;
172
+ cursor: pointer;
173
+ padding: 0 10px;
174
+ margin-right: 10px;
175
+ font-size: 12px;
176
+ }
177
+ i{
178
+ cursor: pointer;
179
+ font-size: 14px;
180
+ }
181
+ }
182
+ }
183
+ .summaryContent{
184
+ line-height: 26px;
185
+ padding: 0 16px 16px 16px;
186
+ font-size: 14px;
187
+ text-align: left;
188
+ }
189
+ .intelligentBottom{
190
+ background: #F9FAFD;
191
+ padding: 0 20px;
192
+ border-bottom-left-radius: 20px;
193
+ border-bottom-right-radius: 20px;
194
+ display: flex;
195
+ align-items: center;
196
+ flex-wrap: wrap;
197
+ .intelligentQues{
198
+ height: 26px;
199
+ display: flex;
200
+ align-items: center;
201
+ justify-content: center;
202
+ padding: 0 8px;
203
+ background: #E5EBFF;
204
+ color: #366AFF;
205
+ border-radius: 10px;
206
+ margin-right: 5px;
207
+ margin-top: 5px;
208
+ margin-bottom: 5px;
209
+ font-size: 12px;
210
+ cursor: pointer;
211
+ white-space: nowrap;
212
+ }
213
+ }
214
+ ::-webkit-scrollbar{
215
+ background-color: transparent;
216
+ height: 6px;
217
+ }
218
+ }
219
+ .float_intelligentSummary {
220
+ position: absolute;
221
+ z-index: 999;
222
+ top: 60px;
223
+ left: 16px;
224
+ width: calc(100% - 32px);
225
+ box-shadow: 0 0 10px rgba(0,0,0,.12);
226
+ .summaryContent {
227
+ max-height: 30vh;
228
+ overflow-y: auto;
229
+ }
230
+ }
231
+ </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: 8px;
187
+ height: 38px;
188
+ min-width: 100px;
189
+ }
190
+
191
+ /deep/ td {
192
+ border: solid 1px #e0e6f7;
193
+ padding: 8px;
194
+ height: 28px;
195
+ min-width: 100px;
196
+ }
197
+ }
198
+ </style>
@@ -1,18 +1,18 @@
1
1
  <template>
2
2
  <div class="container">
3
3
  <div class="top-container">
4
- <div class="close">取消</div>
5
- <div class="sure">确定</div>
4
+ <div class="close" @click="handleClose">{{ $t('dragonCommon.cancel') }}</div>
5
+ <div class="sure" @click="handleConfirm">{{ $t('dragonCommon.confirm') }}</div>
6
6
  </div>
7
- <van-list v-model="loading" :finished="finished" finished-text="没有更多了" :offset="1" @load="onload" class="list-container">
7
+ <van-list
8
+ v-model="loading"
9
+ :finished="finished"
10
+ :finished-text="$t('dragonCommon.noMore')"
11
+ :offset="1"
12
+ @load="onLoad"
13
+ class="list-container"
14
+ >
8
15
  <van-cell v-for="item in list" :key="item.id" :title="item.name" />
9
- <!-- <van-cell title="123" />
10
- <van-cell title="asdasd" />
11
- <van-cell title="adszx" />
12
- <van-cell title="zxc zc" />
13
- <van-cell title="asdasd" />
14
- <van-cell title="wqeqweqwe" />
15
- <van-cell title="icvbncvbn" /> -->
16
16
  </van-list>
17
17
  </div>
18
18
  </template>
@@ -40,7 +40,10 @@ export default {
40
40
  onload() {
41
41
  this.$emit('onload')
42
42
  }
43
- }
43
+ },
44
+ mounted() {
45
+ this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
46
+ },
44
47
  }
45
48
  </script>
46
49
 
@@ -0,0 +1,129 @@
1
+ <template>
2
+ <div id="pagination">
3
+ <el-pagination
4
+ @size-change="handleSizeChange"
5
+ @current-change="currentChange"
6
+ :current-page.sync="currentPages"
7
+ :page-size="pageSize"
8
+ layout="slot, prev, pager, next"
9
+ :total="total">
10
+ <span class="total-class">共 {{total}} 条数据</span>
11
+ </el-pagination>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: "paginationPage",
18
+ data(){
19
+ return{
20
+ currentPages:1
21
+ }
22
+ },
23
+ props:['pageSize','currentPage','total',"isReportForm"],
24
+ watch:{
25
+ currentPage: {
26
+ handler(val){
27
+ this.currentPages = val
28
+ },
29
+ },
30
+
31
+ },
32
+ mounted() {
33
+ this.currentPages = this.currentPage
34
+ },
35
+ methods:{
36
+ handleSizeChange(value){
37
+ this.$emit('handleSizeChange',value)
38
+ },
39
+ currentChange(value){
40
+ this.$emit('currentChange',value)
41
+ },
42
+ }
43
+ }
44
+ </script>
45
+
46
+ <style scoped lang="less">
47
+ #pagination{
48
+ .total-class{
49
+ margin-right: 13px;
50
+ font-weight: 400;
51
+ }
52
+ position: absolute;
53
+ bottom: 0px;
54
+ right: 0;
55
+ width: 100%;
56
+ display: flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ height: 50px;
60
+ background-color: white;
61
+ box-shadow: 0px 0px 18px 0px rgba(29, 55, 129, 0.07);
62
+ border-radius: 5px;
63
+ /deep/.el-pager{
64
+ background: #EDF0F6;
65
+ border-radius: 15px;
66
+ }
67
+ /deep/.el-pagination.is-background .btn-next{
68
+ width: 30px;
69
+ height: 30px;
70
+ background: #EDF0F6;
71
+ border-radius: 50%;
72
+ }
73
+ /deep/.el-pagination .btn-next{
74
+ width: 30px;
75
+ height: 30px;
76
+ background: #EDF0F6;
77
+ border-radius: 50%;
78
+ padding-left: 0;
79
+ margin-left:5px ;
80
+ }
81
+ /deep/.el-pagination .btn-prev{
82
+ width: 30px;
83
+ height: 30px;
84
+ background: #EDF0F6;
85
+ border-radius: 50%;
86
+ padding-right: 0;
87
+ margin-right:5px ;
88
+ }
89
+ /deep/.el-pagination button{
90
+ padding: 0;
91
+ min-width: 30px;
92
+ }
93
+ /deep/.el-pager li{
94
+ background: #EDF0F6;
95
+ height: 30px;
96
+ min-width: 30px;
97
+ line-height: 30px;
98
+ font-size: 12px;
99
+ color: #717b90;
100
+ }
101
+ /deep/.el-pager li:first-child{
102
+ border-bottom-left-radius: 15px!important;
103
+ border-top-left-radius: 15px!important;
104
+ }
105
+ /deep/.el-pager li:last-child{
106
+ border-top-right-radius: 15px!important;
107
+ border-bottom-right-radius: 15px!important;
108
+ }
109
+ /deep/.el-pager li.active{
110
+ width: 30px;
111
+ height: 30px;
112
+ min-width: 30px;
113
+ background: #366AFF;
114
+ border: 3px solid #A1B9FF;
115
+ border-radius: 50%;
116
+ line-height: 24px;
117
+ color: white;
118
+ }
119
+ /deep/.el-pagination.is-background .el-pager li:not(.disabled).active{
120
+ background: #366AFF;
121
+
122
+ }
123
+ /deep/.el-pagination button:disabled{
124
+ i{
125
+ cursor: no-drop;
126
+ }
127
+ }
128
+ }
129
+ </style>