askbot-dragon 88.0.43 → 88.1.2

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 (38) hide show
  1. package/npminstall-debug.log +208 -0
  2. package/package.json +14 -14
  3. package/public/index.html +2 -2
  4. package/src/assets/js/obsBrowser.js +3 -2
  5. package/src/components/ActionAlertIframe.vue +1 -0
  6. package/src/components/AiGuide.vue +1 -1
  7. package/src/components/AnswerDocknowledge.vue +167 -54
  8. package/src/components/ConversationContainer.vue +16 -9
  9. package/src/components/MyEditor.vue +1 -1
  10. package/src/components/QwFeedback.vue +2 -1
  11. package/src/components/actionSatisfaction.vue +2 -2
  12. package/src/components/answerRadio.vue +59 -4
  13. package/src/components/assetDetails.vue +1 -1
  14. package/src/components/assetMessage.vue +14 -13
  15. package/src/components/associationIntention.vue +2 -2
  16. package/src/components/fielListView.vue +1 -1
  17. package/src/components/formTemplate.vue +24 -3
  18. package/src/components/intelligentSummary.vue +15 -12
  19. package/src/components/kkview.vue +0 -10
  20. package/src/components/markDownText.vue +798 -55
  21. package/src/components/myPopup.vue +14 -11
  22. package/src/components/pagination.vue +129 -0
  23. package/src/components/pdfPosition.vue +67 -67
  24. package/src/components/popup.vue +8 -7
  25. package/src/components/preview/docView.vue +114 -0
  26. package/src/components/preview/excelView.vue +199 -0
  27. package/src/components/preview/newPositionPreview.vue +385 -0
  28. package/src/components/preview/pdfView.vue +824 -0
  29. package/src/components/previewDoc.vue +1 -0
  30. package/src/components/previewPdf.vue +346 -65
  31. package/src/components/receiverMessagePlatform.vue +24 -20
  32. package/src/components/senderMessagePlatform.vue +19 -11
  33. package/src/components/tree.vue +2 -2
  34. package/src/components/welcomeKnowledgeFile.vue +5 -2
  35. package/src/components/welcomeSuggest.vue +1 -1
  36. package/src/locales/cn.json +99 -0
  37. package/src/locales/en.json +99 -0
  38. package/src/main.js +19 -0
@@ -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>
@@ -1,29 +1,36 @@
1
1
  <template>
2
2
  <div class="pdf_view" id="pdf_view">
3
- <div class="change_scale" v-if="isPC">
4
- <section @click="changeScale('reduce')">
5
- <i class="el-icon-minus"></i>
6
- </section>
7
- <el-divider direction="vertical"></el-divider>
8
- <section @click="changeScale('zoom')">
9
- <i class="el-icon-plus"></i>
10
- </section>
11
- <el-select size="small" v-model="handScale" @change="changeScale" placeholder="请选择">
12
- <el-option v-for="item in scaleList" :key="item.value" :label="item.label" :value="item.value">
13
- </el-option>
14
- </el-select>
15
- </div>
16
- <div class="pdf_container_view" id="pdf_container_view" @scroll="pdfScroll" ref="pdfView"></div>
17
- <div class="btn_footer" v-if="tagIds.length > 1 && !isPC">
18
- <div class="prev" @click="prev">上一段</div>
19
- <div class="next" @click="next">下一段</div>
20
- </div>
21
- <div id="pagination" v-if="tagIds.length > 1 && isPC">
22
- <el-pagination :current-page="currentPage + 1" @current-change="currentChange" @prev-click="prev"
23
- @next-click="next" layout="slot, prev, pager, next" :page-size="1" :total="tagIds.length">
24
- <span class="total-class">答案由{{ tagIds.length }}段内容生成</span>
25
- </el-pagination>
26
- </div>
3
+ <div class="change_scale" v-if="isPC">
4
+ <section @click="changeScale('reduce')">
5
+ <i class="el-icon-minus"></i>
6
+ </section>
7
+ <el-divider direction="vertical"></el-divider>
8
+ <section @click="changeScale('zoom')">
9
+ <i class="el-icon-plus"></i>
10
+ </section>
11
+ <el-select size="small" v-model="handScale" @change="changeScale" :placeholder="$t('dragonCommon.selectScale')">
12
+ <el-option v-for="item in scaleList" :key="item.value" :label="item.label" :value="item.value">
13
+ </el-option>
14
+ </el-select>
15
+ </div>
16
+ <div class="pdf_container_view" id="pdf_container_view" @scroll="pdfScroll" ref="pdfView"></div>
17
+ <div class="btn_footer" v-if="tagIds.length > 1 && !isPC">
18
+ <div class="prev" @click="prev">{{ $t('dragonCommon.previous') }}</div>
19
+ <div class="next" @click="next">{{ $t('dragonCommon.next') }}</div>
20
+ </div>
21
+ <div id="pagination" v-if="tagIds.length > 1 && isPC">
22
+ <el-pagination
23
+ :current-page="currentPage + 1"
24
+ @current-change="currentChange"
25
+ @prev-click="prev"
26
+ @next-click="next"
27
+ layout="slot, prev, pager, next"
28
+ :page-size="1"
29
+ :total="tagIds.length"
30
+ >
31
+ <span class="total-class">{{ $t('dragonCommon.answersGeneratedByPre') }}{{tagIds.length}}{{ $t('dragonCommon.answersGeneratedByAfter') }}</span>
32
+ </el-pagination>
33
+ </div>
27
34
  </div>
28
35
  </template>
29
36
  <script>
@@ -97,37 +104,7 @@ export default {
97
104
  transformSalce: null,
98
105
  isPC: false,
99
106
  handScale: 'auto',
100
- scaleList: [
101
- {
102
- label: '自动缩放',
103
- value: 'auto'
104
- },
105
- {
106
- label: '实际比例',
107
- value: 'reality'
108
- },
109
- {
110
- label: '100%',
111
- value: 1
112
- },
113
- {
114
- label: '120%',
115
- value: 1.2
116
- },
117
- {
118
- label: '150%',
119
- value: 1.5
120
- },
121
- {
122
- label: '170%',
123
- value: 1.7
124
- }
125
- ,
126
- {
127
- label: '200%',
128
- value: 2
129
- }
130
- ],
107
+ scaleList: [],
131
108
  scrollTop: 0,
132
109
  scrollLeft: 0
133
110
  }
@@ -554,7 +531,7 @@ export default {
554
531
  this.currentPage = 0
555
532
  if (!this.isPC) {
556
533
  this.$toast({
557
- message: '当前已经是第一段了',
534
+ message: this.$t('dragonCommon.firstParagraph'),
558
535
  duration: 2000,
559
536
  })
560
537
  return
@@ -573,7 +550,7 @@ export default {
573
550
  this.currentPage = this.tagIds.length - 1
574
551
  if (!this.isPC) {
575
552
  this.$toast({
576
- message: '当前已经是最后一段了',
553
+ message: this.$t('dragonCommon.lastParagraph'),
577
554
  duration: 2000,
578
555
  })
579
556
  return
@@ -818,15 +795,6 @@ export default {
818
795
  // Math.hypot()计算参数的平方根
819
796
  return Math.hypot(stop.x - start.x, stop.y - start.y);
820
797
  },
821
- setupCanvas (canvas, width, height) {
822
- const dpr = 1;
823
- // const rect = canvas.getBoundingClientRect();
824
- canvas.width = width
825
- canvas.height = height
826
- const ctx = canvas.getContext('2d');
827
- ctx?.scale(dpr, dpr);
828
- return ctx;
829
- },
830
798
  changeScale (value) {
831
799
  if (value == 'zoom') {
832
800
  this.handScale = 'auto'
@@ -1089,7 +1057,7 @@ export default {
1089
1057
  }
1090
1058
  } else {
1091
1059
  let div = document.createElement('div')
1092
- div.innerText = '文件加载异常'
1060
+ div.innerText = this.$t('dragonCommon.fileloadException')
1093
1061
  this.contentView.appendChild(div)
1094
1062
  this.$refs.pdfView.appendChild(this.contentView)
1095
1063
  }
@@ -1101,6 +1069,38 @@ export default {
1101
1069
  }
1102
1070
  },
1103
1071
  mounted () {
1072
+ this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
1073
+ this.scaleList = [
1074
+ {
1075
+ label: this.$t('dragonCommon.scaleAuto'),
1076
+ value: 'auto'
1077
+ },
1078
+ {
1079
+ label: this.$t('dragonCommon.scaleReality'),
1080
+ value: 'reality'
1081
+ },
1082
+ {
1083
+ label: '100%',
1084
+ value: 1
1085
+ },
1086
+ {
1087
+ label: '120%',
1088
+ value: 1.2
1089
+ },
1090
+ {
1091
+ label: '150%',
1092
+ value: 1.5
1093
+ },
1094
+ {
1095
+ label: '170%',
1096
+ value: 1.7
1097
+ }
1098
+ ,
1099
+ {
1100
+ label: '200%',
1101
+ value: 2
1102
+ }
1103
+ ]
1104
1104
  if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
1105
1105
  this.isPC = false
1106
1106
  } else {
@@ -1,18 +1,18 @@
1
1
  <template>
2
2
  <div class="popUp">
3
3
  <div class="topBtn">
4
- <span class="cancel" @click="closeBtn">取消</span>
5
- <span class="sure" @click="sure">确定</span>
4
+ <span class="cancel" @click="closeBtn">{{ $t('dragonCommon.cancel') }}</span>
5
+ <span class="sure" @click="sure">{{ $t('dragonCommon.confirm') }}</span>
6
6
  </div>
7
7
  <slot name="popup-header" class="popup-header"></slot>
8
8
  <div class="popup-content">
9
9
  <div
10
- class="filter-item"
11
- v-for="(item,index) in options"
12
- :key="index"
13
- @click="checked(item,index)"
10
+ class="filter-item"
11
+ v-for="(item, index) in options"
12
+ :key="index"
13
+ @click="checked(item, index)"
14
14
  >
15
- <div :class="[checkIdList.includes(item[props.value]) && 'setColor', 'label']">{{item[props.label]}}</div>
15
+ <div :class="[checkIdList.includes(item[props.value]) && 'setColor', 'label']">{{ item[props.label] }}</div>
16
16
  </div>
17
17
  </div>
18
18
  <div class="popup-footer">
@@ -164,6 +164,7 @@ export default {
164
164
  },
165
165
  },
166
166
  mounted() {
167
+ this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
167
168
  console.debug('options',this.options)
168
169
 
169
170
  }
@@ -0,0 +1,114 @@
1
+ <template>
2
+ <div class="docView">
3
+ <div class="docHtml"
4
+ ref="docHtml"
5
+ v-html="html"
6
+ @click="selectDiv"
7
+ >
8
+ </div>
9
+ </div>
10
+ </template>
11
+
12
+ <script>
13
+ export default {
14
+ name: "docView",
15
+ data(){
16
+ return{
17
+ colors: ['#E3EBFF', '#FFF5DC', '#FFE8D8','#D6F3EA','#FFF1C3'],
18
+ html:"",
19
+ }
20
+ },
21
+ props:{
22
+ html_result:{
23
+ type:String,
24
+ default:""
25
+ },
26
+ split_paragraphs:{
27
+ type:Array,
28
+ default(){
29
+ return []
30
+ }
31
+ },
32
+ fileSuffix:{
33
+ type:String,
34
+ default:""
35
+ }
36
+ },
37
+ methods:{
38
+ selectDiv(e){
39
+ this.$emit('selectDiv',e)
40
+ },
41
+ getHtml(){
42
+ // let url = 'https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/123/2024/12/09/14/18/17/123/%E5%85%AC%E5%8F%B8%E5%91%98%E5%B7%A5%E6%89%8B%E5%86%8C_1733725097.html'
43
+ let url = this.html_result
44
+ this.$http.get(url).then(res => {
45
+ this.html = res.data;
46
+ let drawer = document.getElementById('drawer_content_pre')
47
+ if (drawer){
48
+ drawer.style.backgroundImage = 'none';
49
+ drawer.style.overflowX = 'hidden'
50
+ }
51
+ this.$nextTick(() => {
52
+ this.setColor()
53
+ })
54
+ })
55
+ },
56
+ setColor(){
57
+ this.split_paragraphs.forEach((item,index) => {
58
+ const colorIndex = index % this.colors.length;
59
+ if (item.original_paragraph){
60
+ item.original_paragraph.forEach(items => {
61
+ let dom = document.getElementById(items.paragraph_id);
62
+ if (this.fileSuffix === 'TXT'){
63
+ const paragraphs = this.$el.querySelectorAll(`[paragraph-id="${items.paragraph_id}"]`);
64
+ paragraphs.forEach(paragraph => {
65
+ paragraph.style.background = this.colors[colorIndex]
66
+ })
67
+ } else if (dom){
68
+ dom.style.background = this.colors[colorIndex];
69
+ }
70
+ })
71
+ let newOriginal = item.original_paragraph.filter(items => !items.type)
72
+ let dom = document.getElementById(newOriginal[newOriginal.length - 1].paragraph_id);
73
+ if (dom){
74
+ dom.style.marginBottom = '8px';
75
+ }
76
+ }
77
+ if (item.tableId){
78
+ let dom = document.getElementById(item.tableId);
79
+ if (dom){
80
+ dom.style.backgroundColor = this.colors[colorIndex]
81
+ }
82
+ }
83
+ })
84
+ setTimeout(() => {
85
+ this.$parent.scrollToParagraph('first')
86
+ },500)
87
+ },
88
+ },
89
+ watch:{
90
+ html_result:{
91
+ handler(){
92
+ if (this.html_result){
93
+ this.getHtml();
94
+ }
95
+ },
96
+ immediate:true
97
+ }
98
+ }
99
+ };
100
+ </script>
101
+
102
+ <style scoped lang="less">
103
+ .docView{
104
+ width: 100%;
105
+ flex: none;
106
+ box-sizing: border-box;
107
+ div{
108
+ position: relative;
109
+ }
110
+ /deep/img{
111
+ max-width: 100%;
112
+ }
113
+ }
114
+ </style>