askbot-dragon 1.7.84-beta → 1.7.86-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.
- package/README.md +27 -27
- package/babel.config.js +6 -6
- package/dragon.iml +7 -7
- package/package.json +60 -58
- package/public/index.html +73 -76
- package/src/App.vue +31 -31
- package/src/api/index.js +1 -1
- package/src/api/mock.http +2 -2
- package/src/api/requestUrl.js +185 -185
- package/src/assets/js/AliyunlssUtil.js +141 -117
- package/src/assets/js/Base64Util.js +22 -22
- package/src/assets/js/common.js +261 -261
- package/src/assets/js/hammer.js +100 -89
- package/src/assets/js/script.js +36 -36
- package/src/assets/less/common.css +6773 -6773
- package/src/assets/less/converSationContainer/common.less +199 -192
- package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
- package/src/assets/less/iconfont.css +37 -37
- package/src/assets/less/ticketMessage.less +294 -294
- package/src/components/ActionAlertIframe.vue +178 -155
- package/src/components/AiGuide.vue +434 -471
- package/src/components/AnswerDocknowledge.vue +1203 -1203
- package/src/components/AnswerVoice.vue +285 -285
- package/src/components/AskIFrame.vue +15 -15
- package/src/components/ConversationContainer.vue +10684 -10880
- package/src/components/FileType.vue +86 -86
- package/src/components/Message.vue +27 -27
- package/src/components/MyEditor.vue +342 -341
- package/src/components/QwFeedback.vue +302 -302
- package/src/components/actionSatisfaction.vue +107 -107
- package/src/components/actionSendToBot.vue +62 -62
- package/src/components/answerDissatisfaction.vue +62 -62
- package/src/components/answerRadio.vue +259 -259
- package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
- package/src/components/ask-components/Msgloading.vue +37 -37
- package/src/components/ask-components/SatisfactionV2.vue +15 -15
- package/src/components/askVideo.vue +162 -139
- package/src/components/assetDetails.vue +378 -378
- package/src/components/assetMessage.vue +229 -229
- package/src/components/associationIntention.vue +378 -374
- package/src/components/attachmentPreview.vue +90 -90
- package/src/components/botActionSatisfactor.vue +68 -68
- package/src/components/chatContent.vue +513 -513
- package/src/components/feedBack.vue +136 -136
- package/src/components/fielListView.vue +351 -351
- package/src/components/file/AliyunOssComponents.vue +108 -108
- package/src/components/formTemplate.vue +3522 -3518
- package/src/components/imgView.vue +31 -31
- package/src/components/intelligentSummary.vue +234 -230
- package/src/components/kkview.vue +1128 -1128
- package/src/components/loadingProcess.vue +164 -164
- package/src/components/markDownText.vue +959 -960
- package/src/components/message/ActionAlertIframe.vue +112 -112
- package/src/components/message/ShopMessage.vue +164 -164
- package/src/components/message/TextMessage.vue +928 -924
- package/src/components/message/TicketMessage.vue +201 -201
- package/src/components/message/swiper/index.js +4 -4
- package/src/components/message/swiper/ticketSwiper.vue +503 -503
- package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
- package/src/components/msgLoading.vue +231 -231
- package/src/components/myPopup.vue +73 -73
- package/src/components/newPdfPosition.vue +878 -0
- package/src/components/pagination.vue +128 -128
- package/src/components/pdfPosition.vue +1514 -1336
- package/src/components/popup.vue +228 -228
- package/src/components/preview/docView.vue +123 -113
- package/src/components/preview/excelView.vue +210 -198
- package/src/components/preview/newPositionPreview.vue +390 -388
- package/src/components/preview/pdfView.vue +831 -831
- package/src/components/previewDoc.vue +252 -248
- package/src/components/previewPdf.vue +1119 -1119
- package/src/components/receiverMessagePlatform.vue +69 -69
- package/src/components/recommend.vue +80 -80
- package/src/components/selector/hOption.vue +20 -20
- package/src/components/selector/hSelector.vue +199 -199
- package/src/components/selector/hWrapper.vue +216 -216
- package/src/components/senderMessagePlatform.vue +58 -58
- package/src/components/source/BotMessage.vue +24 -24
- package/src/components/source/CustomMessage.vue +24 -24
- package/src/components/test.vue +260 -260
- package/src/components/tree.vue +307 -307
- package/src/components/utils/AliyunIssUtil.js +103 -103
- package/src/components/utils/ckeditor.js +185 -185
- package/src/components/utils/format_date.js +25 -25
- package/src/components/utils/index.js +6 -6
- package/src/components/utils/math_utils.js +29 -29
- package/src/components/voiceComponent.vue +119 -119
- package/src/components/welcomeKnowledgeFile.vue +347 -343
- package/src/components/welcomeLlmCard.vue +144 -140
- package/src/components/welcomeSuggest.vue +97 -97
- package/src/locales/cn.json +98 -98
- package/src/locales/en.json +98 -98
- package/src/locales/jp.json +73 -0
- package/src/main.js +76 -76
- package/vue.config.js +54 -54
|
@@ -1,114 +1,124 @@
|
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="docView" id="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
|
+
import { newInitWaterMark } from "../../assets/js/common";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: "docView",
|
|
17
|
+
data(){
|
|
18
|
+
return{
|
|
19
|
+
colors: ['#E3EBFF', '#FFF5DC', '#FFE8D8','#D6F3EA','#FFF1C3'],
|
|
20
|
+
html:"",
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
props:{
|
|
24
|
+
html_result:{
|
|
25
|
+
type:String,
|
|
26
|
+
default:""
|
|
27
|
+
},
|
|
28
|
+
split_paragraphs:{
|
|
29
|
+
type:Array,
|
|
30
|
+
default(){
|
|
31
|
+
return []
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
fileSuffix:{
|
|
35
|
+
type:String,
|
|
36
|
+
default:""
|
|
37
|
+
},
|
|
38
|
+
textWatermarkStr:{
|
|
39
|
+
type:String,
|
|
40
|
+
default:""
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
methods:{
|
|
44
|
+
selectDiv(e){
|
|
45
|
+
this.$emit('selectDiv',e)
|
|
46
|
+
},
|
|
47
|
+
getHtml(){
|
|
48
|
+
// 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'
|
|
49
|
+
let url = this.html_result
|
|
50
|
+
this.$http.get(url).then(res => {
|
|
51
|
+
this.html = res.data;
|
|
52
|
+
let drawer = document.getElementById('drawer_content_pre')
|
|
53
|
+
if (drawer){
|
|
54
|
+
drawer.style.backgroundImage = 'none';
|
|
55
|
+
drawer.style.overflowX = 'hidden';
|
|
56
|
+
drawer.style.position ='relative'
|
|
57
|
+
}
|
|
58
|
+
this.$nextTick(() => {
|
|
59
|
+
this.setColor();
|
|
60
|
+
if (this.textWatermarkStr){
|
|
61
|
+
newInitWaterMark('drawer_content_pre',this.textWatermarkStr)
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
},
|
|
66
|
+
setColor(){
|
|
67
|
+
this.split_paragraphs.forEach((item,index) => {
|
|
68
|
+
const colorIndex = index % this.colors.length;
|
|
69
|
+
if (item.original_paragraph){
|
|
70
|
+
item.original_paragraph.forEach(items => {
|
|
71
|
+
let dom = document.getElementById(items.paragraph_id);
|
|
72
|
+
if (this.fileSuffix === 'TXT'){
|
|
73
|
+
const paragraphs = this.$el.querySelectorAll(`[paragraph-id="${items.paragraph_id}"]`);
|
|
74
|
+
paragraphs.forEach(paragraph => {
|
|
75
|
+
paragraph.style.background = this.colors[colorIndex]
|
|
76
|
+
})
|
|
77
|
+
} else if (dom){
|
|
78
|
+
dom.style.background = this.colors[colorIndex];
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
let newOriginal = item.original_paragraph.filter(items => !items.type)
|
|
82
|
+
let dom = document.getElementById(newOriginal[newOriginal.length - 1].paragraph_id);
|
|
83
|
+
if (dom){
|
|
84
|
+
dom.style.marginBottom = '8px';
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (item.tableId){
|
|
88
|
+
let dom = document.getElementById(item.tableId);
|
|
89
|
+
if (dom){
|
|
90
|
+
dom.style.backgroundColor = this.colors[colorIndex]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
setTimeout(() => {
|
|
95
|
+
this.$parent.scrollToParagraph('first')
|
|
96
|
+
},500)
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
watch:{
|
|
100
|
+
html_result:{
|
|
101
|
+
handler(){
|
|
102
|
+
if (this.html_result){
|
|
103
|
+
this.getHtml();
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
immediate:true
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<style scoped lang="less">
|
|
113
|
+
.docView{
|
|
114
|
+
width: 100%;
|
|
115
|
+
flex: none;
|
|
116
|
+
box-sizing: border-box;
|
|
117
|
+
div{
|
|
118
|
+
position: relative;
|
|
119
|
+
}
|
|
120
|
+
/deep/img{
|
|
121
|
+
max-width: 100%;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
114
124
|
</style>
|
|
@@ -1,199 +1,211 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="excelView">
|
|
3
|
-
<table border="1" v-if="false">
|
|
4
|
-
<thead>
|
|
5
|
-
<tr>
|
|
6
|
-
<th v-for="(person2,index2) in headerArray" :key="index2">{{person2}}</th>
|
|
7
|
-
</tr>
|
|
8
|
-
</thead>
|
|
9
|
-
<tbody>
|
|
10
|
-
<tr v-for="(person, index) in rowDataList" :key="index" :id="person.id">
|
|
11
|
-
<td v-for="(person2,index2) in headerArray" :key="index2">
|
|
12
|
-
{{person[person2]}}
|
|
13
|
-
</td>
|
|
14
|
-
</tr>
|
|
15
|
-
</tbody>
|
|
16
|
-
</table>
|
|
17
|
-
<el-table
|
|
18
|
-
:data="pagedData"
|
|
19
|
-
border
|
|
20
|
-
ref="table"
|
|
21
|
-
:row-key="getRowKey"
|
|
22
|
-
:row-class-name="tableRowClassName"
|
|
23
|
-
height="100%"
|
|
24
|
-
style="width: 100%">
|
|
25
|
-
<template v-for="(item,index) in headerArray">
|
|
26
|
-
<el-table-column
|
|
27
|
-
:label="item"
|
|
28
|
-
:key="index"
|
|
29
|
-
min-width="100">
|
|
30
|
-
<template slot-scope="scope">
|
|
31
|
-
{{scope.row[item]}}
|
|
32
|
-
</template>
|
|
33
|
-
</el-table-column>
|
|
34
|
-
</template>
|
|
35
|
-
</el-table>
|
|
36
|
-
<pagination-page :pageSize="pageSize" :currentPage="currentPage" :total="rowDataList.length" @currentChange="handleCurrentChange"></pagination-page>
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
<script>
|
|
41
|
-
|
|
42
|
-
import PaginationPage from "../pagination";
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="excelView" id="excelView">
|
|
3
|
+
<table border="1" v-if="false">
|
|
4
|
+
<thead>
|
|
5
|
+
<tr>
|
|
6
|
+
<th v-for="(person2,index2) in headerArray" :key="index2">{{person2}}</th>
|
|
7
|
+
</tr>
|
|
8
|
+
</thead>
|
|
9
|
+
<tbody>
|
|
10
|
+
<tr v-for="(person, index) in rowDataList" :key="index" :id="person.id">
|
|
11
|
+
<td v-for="(person2,index2) in headerArray" :key="index2">
|
|
12
|
+
{{person[person2]}}
|
|
13
|
+
</td>
|
|
14
|
+
</tr>
|
|
15
|
+
</tbody>
|
|
16
|
+
</table>
|
|
17
|
+
<el-table
|
|
18
|
+
:data="pagedData"
|
|
19
|
+
border
|
|
20
|
+
ref="table"
|
|
21
|
+
:row-key="getRowKey"
|
|
22
|
+
:row-class-name="tableRowClassName"
|
|
23
|
+
height="100%"
|
|
24
|
+
style="width: 100%">
|
|
25
|
+
<template v-for="(item,index) in headerArray">
|
|
26
|
+
<el-table-column
|
|
27
|
+
:label="item"
|
|
28
|
+
:key="index"
|
|
29
|
+
min-width="100">
|
|
30
|
+
<template slot-scope="scope">
|
|
31
|
+
{{scope.row[item]}}
|
|
32
|
+
</template>
|
|
33
|
+
</el-table-column>
|
|
34
|
+
</template>
|
|
35
|
+
</el-table>
|
|
36
|
+
<pagination-page :pageSize="pageSize" :currentPage="currentPage" :total="rowDataList.length" @currentChange="handleCurrentChange"></pagination-page>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script>
|
|
41
|
+
|
|
42
|
+
import PaginationPage from "../pagination";
|
|
43
|
+
import { newInitWaterMark } from "../../assets/js/common";
|
|
44
|
+
export default {
|
|
45
|
+
name: "excelView",
|
|
46
|
+
components: { PaginationPage },
|
|
47
|
+
data(){
|
|
48
|
+
return{
|
|
49
|
+
rowData:[
|
|
50
|
+
{
|
|
51
|
+
"row_id": "659164be-19bd-4fd7-a47d-b04c3dbbfa6f",
|
|
52
|
+
"row_data_md": "| 王明宇 | 27 | 189 |",
|
|
53
|
+
"row_number": 2,
|
|
54
|
+
"table_html": "<table border='1' style='border-collapse:collapse;'><thead><tr><th>姓名1</th><th>年龄</th><th>身高</th></tr></thead><tbody><tr><td>王明宇</td><td>27</td><td>189</td></tr></tbody></table>"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"row_id": "fac98d6a-2580-4f62-8f50-61521debeeef",
|
|
58
|
+
"row_data_md": "| 老王 | 38 | 178 |",
|
|
59
|
+
"row_number": 3,
|
|
60
|
+
"table_html": "<table border='1' style='border-collapse:collapse;'><thead><tr><th>姓名1</th><th>年龄</th><th>身高</th></tr></thead><tbody><tr><td>老王</td><td>38</td><td>178</td></tr></tbody></table>"
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
rowDataList:[],
|
|
64
|
+
headerArray:[],
|
|
65
|
+
currentPage:1,
|
|
66
|
+
pageSize:20,
|
|
67
|
+
colors: ['#E3EBFF', '#FFF5DC', '#FFE8D8','#D6F3EA','#FFF1C3'],
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
props:{
|
|
71
|
+
headerData:{
|
|
72
|
+
type:String,
|
|
73
|
+
default:""
|
|
74
|
+
},
|
|
75
|
+
excelRowList:{
|
|
76
|
+
type:Array,
|
|
77
|
+
default(){
|
|
78
|
+
return []
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
tableChunkData:{
|
|
82
|
+
type:Array,
|
|
83
|
+
default(){
|
|
84
|
+
return [{
|
|
85
|
+
"sheet_name": null,
|
|
86
|
+
"table_md": null,
|
|
87
|
+
"tableChunkText": "| 序号 | 电子色片 | 旧色号 | 颜色名称 | R68-Y32 17w77b06c L32-1 | 新 | 色卡页码 | -ICN色号 | R | G | B | C | M | Y | | 154 | 22 | B99-G01 81w11b08c L88-4 | OW060-4 | | 雪蓝 | 蓝色系 | 210 | 218 | 223 | 5.5761039841401502E-2 | 2.08606534553369E-2 | 0 | 0.12603452469972801 |",
|
|
88
|
+
"tableChunkId": "5e80ff30-ea7e-4c47-878b-59d9b1c833ce",
|
|
89
|
+
"tableId": null
|
|
90
|
+
}]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
textWatermarkStr:{
|
|
94
|
+
type:String,
|
|
95
|
+
default:""
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
computed:{
|
|
99
|
+
pagedData() {
|
|
100
|
+
const start = (this.currentPage - 1) * this.pageSize;
|
|
101
|
+
const end = start + this.pageSize;
|
|
102
|
+
return this.rowDataList.slice(start, end);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
methods:{
|
|
106
|
+
tableRowData(){
|
|
107
|
+
const headerString = this.headerData.trim().replace(/^\||\|$/g, '');
|
|
108
|
+
|
|
109
|
+
// 使用竖线作为分隔符来分割字符串
|
|
110
|
+
const headerArray = headerString.split('|').map(item => item.trim());
|
|
111
|
+
this.headerArray = headerArray
|
|
112
|
+
for (let i =0;i<this.excelRowList.length;i++){
|
|
113
|
+
// 去除字符串两端的竖线(如果它们存在的话)
|
|
114
|
+
const trimmedString = this.excelRowList[i].row_data_md.trim().replace(/^\||\|$/g, '');
|
|
115
|
+
|
|
116
|
+
// 使用竖线作为分隔符来分割字符串
|
|
117
|
+
const resultArray = trimmedString.split('|').map(item => item.trim());
|
|
118
|
+
let obj = {}
|
|
119
|
+
for (let j=0;j<headerArray.length;j++){
|
|
120
|
+
this.$set(obj,headerArray[j],resultArray[j])
|
|
121
|
+
this.$set(obj,'id',this.excelRowList[i].row_id)
|
|
122
|
+
}
|
|
123
|
+
this.rowDataList.push(obj);
|
|
124
|
+
}
|
|
125
|
+
this.$nextTick(() => {
|
|
126
|
+
this.setRowColor('first');
|
|
127
|
+
})
|
|
128
|
+
},
|
|
129
|
+
getRowKey(row){
|
|
130
|
+
return row.id
|
|
131
|
+
},
|
|
132
|
+
setRowColor(type){
|
|
133
|
+
this.tableChunkData.forEach((item,index) => {
|
|
134
|
+
const colorIndex = index % this.colors.length;
|
|
135
|
+
let id = item.tableChunkId;
|
|
136
|
+
let dom = document.getElementsByClassName('setBgClass' + id);
|
|
137
|
+
if (dom && dom.length > 0){
|
|
138
|
+
let newDom = Array.from(dom)
|
|
139
|
+
newDom.forEach(doms => {
|
|
140
|
+
doms.style.backgroundColor = this.colors[colorIndex];
|
|
141
|
+
})
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
this.$nextTick(() => {
|
|
145
|
+
if (this.tableChunkData.length > 0 && type === 'first'){
|
|
146
|
+
this.scrollToRow(this.tableChunkData[0].tableChunkId)
|
|
147
|
+
let drawer = document.getElementById('drawer_content_pre')
|
|
148
|
+
if (drawer){
|
|
149
|
+
drawer.style.position ='relative'
|
|
150
|
+
}
|
|
151
|
+
if (this.textWatermarkStr){
|
|
152
|
+
newInitWaterMark('drawer_content_pre',this.textWatermarkStr)
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
},
|
|
157
|
+
tableRowClassName({ row }){
|
|
158
|
+
let id = this.tableChunkData.filter(item => item.tableChunkId == row.id);
|
|
159
|
+
if (id && id.length > 0){
|
|
160
|
+
return 'setBgClass' + id[0].tableChunkId
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
scrollToRow(rowId) {
|
|
164
|
+
this.$nextTick(() => {
|
|
165
|
+
// const row = this.rowDataList.find(row => row.id === rowId);
|
|
166
|
+
const rowIndex = this.rowDataList.findIndex(row => row.id === rowId);
|
|
167
|
+
let index = Math.ceil(rowIndex / 20)
|
|
168
|
+
if (index > 0){
|
|
169
|
+
this.currentPage = index;
|
|
170
|
+
}
|
|
171
|
+
setTimeout(() => {
|
|
172
|
+
let dom = document.getElementsByClassName('setBgClass' + rowId);
|
|
173
|
+
if (dom && dom.length > 0){
|
|
174
|
+
let newDom = Array.from(dom)
|
|
175
|
+
newDom.forEach(doms => {
|
|
176
|
+
doms.style.backgroundColor = this.colors[0];
|
|
177
|
+
})
|
|
178
|
+
const bodyWrapper = this.$refs.table.$el.querySelector('.el-table__body-wrapper');
|
|
179
|
+
const targetRow = this.$refs.table.$el.querySelector('.setBgClass' + rowId); // 获取目标行元素
|
|
180
|
+
const targetHeight = targetRow.offsetTop; // 目标行的高度(从上到下的距离)
|
|
181
|
+
bodyWrapper.scroll({
|
|
182
|
+
top:targetHeight,
|
|
183
|
+
behavior:"smooth"
|
|
184
|
+
}); // 滚动到目标行位置
|
|
185
|
+
|
|
186
|
+
// newDom[0].scrollIntoView({ behavior: "smooth"})
|
|
187
|
+
}
|
|
188
|
+
},800)
|
|
189
|
+
});
|
|
190
|
+
},
|
|
191
|
+
handleCurrentChange(val){
|
|
192
|
+
this.currentPage = val;
|
|
193
|
+
this.$nextTick(() => {
|
|
194
|
+
this.setRowColor();
|
|
195
|
+
})
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
mounted() {
|
|
199
|
+
this.tableRowData();
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
</script>
|
|
203
|
+
|
|
204
|
+
<style scoped lang="less">
|
|
205
|
+
.excelView{
|
|
206
|
+
height: 100%;
|
|
207
|
+
/deep/.setBgClass{
|
|
208
|
+
background-color: #E3EBFF!important;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
199
211
|
</style>
|