askbot-dragon 1.3.88 → 1.3.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.
- package/package.json +1 -1
- package/public/index.html +1 -1
- package/src/components/AnswerDocknowledge.vue +23 -8
- package/src/components/ConversationContainer.vue +51 -96
- package/src/components/pdfPosition.vue +33 -11
- package/src/components/previewPdf.vue +13 -25
- package/src/components/utils/ckeditor.js +13 -13
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf.min.js" integrity="sha512-1VjCQ9oENTPqqDCs6xQAk6ETB/jbCPvaOPI2z3Q+bWxTudBP7aTJZI3eB+mSbVvth0W2LQL1jePGkAWa79zr5Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
37
37
|
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf.worker.min.js" integrity="sha512-14hvtl/LxmtX9F2tsqmOUveDlKql0bm7lR5ua+J+ddLuhoXCrOfG8aD/WJejCtLLvnjcEhX/XCuOyoTZv4Xq4A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
38
38
|
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer.js" integrity="sha512-/Kuwn901frjpfp2NMgB9S/LEtm+ilDzwVy/iS8MlY0BeIwkvtjGTxnjY8u+fn8QyDxS23OLJ+M2g++W/zsb0nw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
39
|
-
<link rel="stylesheet" href="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/
|
|
39
|
+
<link rel="stylesheet" href="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer_01.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
40
40
|
<!-- hammer.js -->
|
|
41
41
|
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js" integrity="sha512-UXumZrZNiOwnTcZSHLOfcTs0aos2MzBWHXOHOuB0J/R44QB0dwY5JgfbvljXcklVf65Gc4El6RjZ+lnwd2az2g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> -->
|
|
42
42
|
<style>
|
|
@@ -134,6 +134,21 @@ export default {
|
|
|
134
134
|
props: ['msg','isAskLightning'],
|
|
135
135
|
beforeMounted() {
|
|
136
136
|
|
|
137
|
+
},
|
|
138
|
+
watch:{
|
|
139
|
+
msg:{
|
|
140
|
+
handler(n){
|
|
141
|
+
n.content.list.forEach(element => {
|
|
142
|
+
console.log(this.imageObj[element.format],1111);
|
|
143
|
+
element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
|
|
144
|
+
if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
|
|
145
|
+
element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/wechat.png';
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
deep:true,
|
|
150
|
+
immediate:true
|
|
151
|
+
}
|
|
137
152
|
},
|
|
138
153
|
created() {
|
|
139
154
|
var system = {};
|
|
@@ -145,12 +160,13 @@ export default {
|
|
|
145
160
|
//手机
|
|
146
161
|
this.isPC = false;
|
|
147
162
|
}
|
|
148
|
-
this.msg.content.list.forEach(element => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
163
|
+
// this.msg.content.list.forEach(element => {
|
|
164
|
+
// console.log(this.imageObj[element.format],1111);
|
|
165
|
+
// element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
|
|
166
|
+
// if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
|
|
167
|
+
// element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/wechat.png';
|
|
168
|
+
// }
|
|
169
|
+
// });
|
|
154
170
|
},
|
|
155
171
|
mounted() {
|
|
156
172
|
|
|
@@ -209,9 +225,8 @@ export default {
|
|
|
209
225
|
this.$nextTick(() =>{
|
|
210
226
|
if(item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
|
|
211
227
|
this.$refs.previewPdf.getBolb(item)
|
|
212
|
-
} else {
|
|
213
|
-
this.$refs.previewPdf.loadIframe(item)
|
|
214
228
|
}
|
|
229
|
+
this.$refs.previewPdf.loadIframe(item)
|
|
215
230
|
})
|
|
216
231
|
}
|
|
217
232
|
})
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
</div> -->
|
|
15
15
|
|
|
16
|
-
<form-template
|
|
16
|
+
<!-- <form-template
|
|
17
17
|
:formList="formList2"
|
|
18
18
|
@submitClick="submitClick"
|
|
19
|
-
></form-template>
|
|
20
|
-
<answer-docknowledge :isAskLightning="
|
|
19
|
+
></form-template> -->
|
|
20
|
+
<answer-docknowledge :isAskLightning="2" :msg="answerDocknowledge"></answer-docknowledge>
|
|
21
21
|
<!-- <voice-component @closeVoice="closeVoice">
|
|
22
22
|
<div slot="voiceTip">
|
|
23
23
|
松开发送
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
<answer-dissatisfaction :msg="answerDiss"></answer-dissatisfaction>
|
|
42
42
|
<feed-back :feedBack="feedBack"></feed-back>
|
|
43
43
|
<voice-compontent></voice-compontent> -->
|
|
44
|
-
<ai-guide :aiGuide="ActionAiGuideObj"></ai-guide>
|
|
44
|
+
<!-- <ai-guide :aiGuide="ActionAiGuideObj"></ai-guide> -->
|
|
45
45
|
<!-- <answer-voice @stopOtherAudio="stopOtherAudio" ref="audioTagCell" :msg="answerVoiceObj"></answer-voice>
|
|
46
46
|
<answer-voice @stopOtherAudio="stopOtherAudio" ref="audioTagCell" :msg="answerVoiceObj1"></answer-voice> -->
|
|
47
47
|
|
|
48
48
|
<!-- <FileType :urls="urls" :color="black"></FileType>-->
|
|
49
49
|
<!-- <FileType :urls="urls" :color="black"></FileType>
|
|
50
50
|
<chat-content :messageList="messageList"></chat-content> -->
|
|
51
|
-
<div v-for="(item,index) in processAction" :key="index">
|
|
51
|
+
<!-- <div v-for="(item,index) in processAction" :key="index">
|
|
52
52
|
<association-intention :msg="item" :msgType="item.type" :isOpen="isOpen"></association-intention>
|
|
53
|
-
</div>
|
|
53
|
+
</div> -->
|
|
54
54
|
</div>
|
|
55
55
|
</template>
|
|
56
56
|
<script>
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
/*import FormTemplate from "@/components/formTemplate";
|
|
60
60
|
import TextMessage from "@/components/message/TextMessage";*/
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
// import FormTemplate from '@/components/formTemplate'
|
|
63
63
|
// import AnswerRadio from './answerRadio'
|
|
64
64
|
// import TicketMessage from './message/TicketMessage'
|
|
65
65
|
/*import VoiceComponent from "./voiceComponent";*/
|
|
66
|
-
import AssociationIntention from './associationIntention'
|
|
66
|
+
// import AssociationIntention from './associationIntention'
|
|
67
67
|
// import ActionSatisfaction from './actionSatisfaction'
|
|
68
68
|
// import MsgLoading from './msgLoading'
|
|
69
69
|
// import LoadingProcess from './loadingProcess'
|
|
@@ -79,7 +79,7 @@ import FeedBack from "@/components/feedBack";*/
|
|
|
79
79
|
// iframe 弹窗组件测试
|
|
80
80
|
/*import ActionAlert from "@/components/message/ActionAlertIframe";*/
|
|
81
81
|
// 智能引导组件
|
|
82
|
-
import AiGuide from "@/components/AiGuide";
|
|
82
|
+
// import AiGuide from "@/components/AiGuide";
|
|
83
83
|
// import AnswerVoice from "@/components/AnswerVoice";
|
|
84
84
|
// import FileType from "@/components/FileType";
|
|
85
85
|
// import ChatContent from "./chatContent";
|
|
@@ -95,7 +95,7 @@ export default {
|
|
|
95
95
|
// LoadingProcess,
|
|
96
96
|
// MsgLoading,
|
|
97
97
|
// ActionSatisfaction,
|
|
98
|
-
|
|
98
|
+
// AssociationIntention,
|
|
99
99
|
/* VoiceComponent,*/
|
|
100
100
|
// TicketMessage,
|
|
101
101
|
// AsserDeatils,
|
|
@@ -104,9 +104,9 @@ export default {
|
|
|
104
104
|
// TextMessage,
|
|
105
105
|
// FeedBack,
|
|
106
106
|
// VoiceCompontent,
|
|
107
|
-
AiGuide,
|
|
107
|
+
// AiGuide,
|
|
108
108
|
// AnswerVoice,
|
|
109
|
-
|
|
109
|
+
// FormTemplate,
|
|
110
110
|
// FormTemplate,
|
|
111
111
|
// FileType,
|
|
112
112
|
// ChatContent,
|
|
@@ -165,92 +165,47 @@ export default {
|
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
answerDocknowledge: {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
"knowledgePartId": "DuYm_IcBh77-s6lwYqu_" ,
|
|
187
|
-
"from": "居安思危" ,
|
|
188
|
-
"introduction": "家来说则更是如此。居安思危是一种超前的危机意识和忧患意识,人的一生当中不可能始终是一帆风顺,总会有曲折与风雨相伴,坎坷与逆境相随。所以,面对任何事情,人们都应当做到未雨绸缪,这样在遇到突发情况时才不至于手忙脚乱。在和平时期,要有居安思危的应变措施,在做好物质准备的同时,思想上还要常守不虞之戒,牢记失戒的教训,只有做到居安思危,才能有备无患,防患于未然。"
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
"tagIds": [
|
|
192
|
-
],
|
|
193
|
-
"format": "mp4" ,
|
|
194
|
-
"srcContentId": "2c69c253d6a45ecbe1f2bfd23bd7e6e2" ,
|
|
195
|
-
"updateTime": "2023-05-09 00:23:47" ,
|
|
196
|
-
"source": "CORP_LOCAL_FILE" ,
|
|
197
|
-
"srcContent": "测试视频1111" ,
|
|
198
|
-
"url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/137e3903781f45cb8f6d5c4a1e17ac9c/2023/05/09/00/23/609499bd2c58724938b2893deb5c2d83/测试视频1111.mp4" ,
|
|
199
|
-
"knowledgeId": "6459220aa3222a26557e17fe" ,
|
|
200
|
-
"knowledgePartId": "ruYt_IcBh77-s6lwHavr" ,
|
|
201
|
-
"from": "测试视频1111" ,
|
|
202
|
-
"introduction": "测试视频1111"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"tagIds": [
|
|
206
|
-
],
|
|
207
|
-
"format": "png" ,
|
|
208
|
-
"srcContentId": "1490543591955fe8d053651f0dea5b2d" ,
|
|
209
|
-
"updateTime": "2023-04-24 16:28:04" ,
|
|
210
|
-
"source": "LOCAL_FILE" ,
|
|
211
|
-
"srcContent": "一图读懂-《SHOP-C03007 分店关于周大福会员运营相关流程》.png" ,
|
|
212
|
-
"url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/ed5c360e9acb4e99ac3f700e51345f68/2023/04/24/16/28/760f748f010efce9783e7520dd37506b/一图读懂-《SHOP-C03007 分店关于周大福会员运营相关流程》.png" ,
|
|
213
|
-
"knowledgeId": "64463d8f6536035e3be5c406" ,
|
|
214
|
-
"knowledgePartId": "hS1gsocBWM9clVECig2o" ,
|
|
215
|
-
"from": "一图读懂-《SHOP-C03007 分店关于周大福会员运营相关流程》.png" ,
|
|
216
|
-
"introduction": "一图读懂-《SHOP-C03007 分店关于周大福会员运营相关流程》.png"
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
"knowledgeId": "642b9bbb81c8a21e5731b4f1",
|
|
220
|
-
"format": "doc",
|
|
221
|
-
"knowledgePartId": "SSn0SocBEQNDH10eWtys",
|
|
222
|
-
"srcContentId": "cef70fde2c4ffad46935b890b8a17210",
|
|
223
|
-
"from": "(完整版)金蝶EAS财务系统操作手册.doc",
|
|
224
|
-
"updateTime": "2023-04-04 14:29:00",
|
|
225
|
-
"source": "LOCAL_FILE",
|
|
226
|
-
"introduction": "核算项目组合,",
|
|
227
|
-
"srcContent": "核算项目组合,",
|
|
228
|
-
"url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/7a33258fdc184b0784952ef06b5840e8/2023/04/04/11/38/7858d9346132c8ea1dd91d345723f77b/(完整版)金蝶EAS财务系统操作手册.doc"
|
|
229
|
-
},
|
|
230
|
-
{ "knowledgeId": "642b8cf6c032845e0e392b60",
|
|
231
|
-
"format": "html",
|
|
232
|
-
"knowledgePartId": "8CxXSocBWM9clVECdbQc",
|
|
233
|
-
"srcContentId": "28ec24dbd8d41e4850b2a86f87c00489",
|
|
234
|
-
"from": "基础设置",
|
|
235
|
-
"updateTime": "2023-04-04 11:37:38",
|
|
236
|
-
"source": "CREATED_BY_ONESELF",
|
|
237
|
-
"introduction": "写点什么吗,输入/或者、使用AI生存内容",
|
|
238
|
-
"srcContent": "写点什么吗,输入/或者、使用AI生存内容",
|
|
239
|
-
"url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/7a33258fdc184b0784952ef06b5840e8/2023/04/04/11/37/c27858d9346132c8ea1dd91d345723f7/1680579454619.html"
|
|
168
|
+
"content":{
|
|
169
|
+
"actionType":"answer_doc_knowledge",
|
|
170
|
+
"text":"中国的省份名称有湖北省、广西壮族自治区等。",
|
|
171
|
+
"list":[
|
|
172
|
+
{
|
|
173
|
+
"tagIds":[
|
|
174
|
+
|
|
175
|
+
],
|
|
176
|
+
"format":"docx",
|
|
177
|
+
"srcContentId":"131b774c169daa30b5f4c97c0e6f4045",
|
|
178
|
+
"updateTime":"2023-04-06 14:29:27",
|
|
179
|
+
"source":"LOCAL_FILE",
|
|
180
|
+
"srcContent":"................................................... 236 BOS 操作手册一.基础建档1.1. 地点信息1.1.1. 基础国家:新增国家,可供维护省份时选择国家。例如:中国。省份:新增省份,可供维护城市和店仓档案等其他资料时选择省份,增加查询表报的纬度。例如:湖北省。",
|
|
181
|
+
"url":"https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/31623ccfe9dd4957bbd59c5823878bbe/2023/04/06/14/21/c2c6e0f510a3cc5253eb752ea3b94eef/伯俊BOS操作手册 - 副本 (2).docx",
|
|
182
|
+
"knowledgeId":"642e6519102edb5f85363117",
|
|
183
|
+
"knowledgePartId":"MSxBVYcBWM9clVECfL3x",
|
|
184
|
+
"from":"伯俊BOS操作手册 - 副本 (2)",
|
|
185
|
+
"introduction":"................................................... 236 BOS 操作手册一.基础建档1.1. 地点信息1.1.1. 基础国家:新增国家,可供维护省份时选择国家。例如:中国。省份:新增省份,可供维护城市和店仓档案等其他资料时选择省份,增加查询表报的纬度。例如:湖北省。"
|
|
240
186
|
},
|
|
241
|
-
{
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
187
|
+
{
|
|
188
|
+
"tagId":"645911d803766c2d9762d261",
|
|
189
|
+
"tagIds":[
|
|
190
|
+
"645911d803766c2d9762d261",
|
|
191
|
+
"645911d803766c2d9762d266"
|
|
192
|
+
],
|
|
193
|
+
"format":"docx",
|
|
194
|
+
"srcContentId":"3d3268031542566df38ea9b428d28cd5",
|
|
195
|
+
"updateTime":"2023-05-08 23:14:56",
|
|
196
|
+
"source":"CORP_LOCAL_FILE",
|
|
197
|
+
"srcContent":":4. 广西壮族自治区,中华人民共和国省级行政区,通称广r西,简称“ 桂”,首府南宁市。地处中国南方沿海,位于r东经 104°26'—112°04',北纬 20°54'—26°24'之间r北回归线横贯全区中部。东连广东省,南临北部湾并与r海南省隔海相望,西与云南省毗邻,东北接湖南省,西r北靠贵州省,西南与越南社会主义共和国接壤。 ",
|
|
198
|
+
"url":"https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/null/2023/05/08/23/13/b178fe67386cbfd6297053654a82b37a/自治区.docx",
|
|
199
|
+
"knowledgeId":"6459118e31a2cd64a7e8218d",
|
|
200
|
+
"knowledgePartId":"25Lu-4cBD3jzLtPbFI6P",
|
|
201
|
+
"from":"自治区",
|
|
202
|
+
"introduction":":4. 广西壮族自治区,中华人民共和国省级行政区,通称广r西,简称“ 桂”,首府南宁市。地处中国南方沿海,位于r东经 104°26'—112°04',北纬 20°54'—26°24'之间r北回归线横贯全区中部。东连广东省,南临北部湾并与r海南省隔海相望,西与云南省毗邻,东北接湖南省,西r北靠贵州省,西南与越南社会主义共和国接壤。 "
|
|
251
203
|
}
|
|
252
|
-
|
|
253
|
-
|
|
204
|
+
],
|
|
205
|
+
"renderType":0,
|
|
206
|
+
"type":0
|
|
207
|
+
},
|
|
208
|
+
"type":"answer_doc_knowledge"
|
|
254
209
|
},
|
|
255
210
|
ActionAiGuideObj: {
|
|
256
211
|
// 智能引导
|
|
@@ -71,7 +71,8 @@ export default {
|
|
|
71
71
|
pageY2:0,
|
|
72
72
|
originScale:1,
|
|
73
73
|
},
|
|
74
|
-
isTouchMoved: false
|
|
74
|
+
isTouchMoved: false,
|
|
75
|
+
transformSalce: null,
|
|
75
76
|
}
|
|
76
77
|
},
|
|
77
78
|
methods: {
|
|
@@ -174,10 +175,18 @@ export default {
|
|
|
174
175
|
}
|
|
175
176
|
this.pageSize = pageSize
|
|
176
177
|
// 创建内容绘制区,并设置大小
|
|
177
|
-
this.
|
|
178
|
-
|
|
178
|
+
if(this.$refs.pdfView.clientWidth / this.pageSize.width >= 1) {
|
|
179
|
+
this.contentView.style.width = `${pageSize.width }px`;
|
|
180
|
+
this.contentView.style.height = `${(this.totalPageCount * (pageSize.height + this.PAGE_INTVERVAL)) + this.PAGE_INTVERVAL}px`;
|
|
181
|
+
} else {
|
|
182
|
+
this.transformSalce = this.$refs.pdfView.clientWidth / this.pageSize.width
|
|
183
|
+
this.contentView.style.width = `${pageSize.width * this.transformSalce}px`;
|
|
184
|
+
this.contentView.style.height = `${(this.totalPageCount * (pageSize.height * (this.transformSalce) + this.PAGE_INTVERVAL)) + this.PAGE_INTVERVAL}px`;
|
|
185
|
+
}
|
|
179
186
|
this.contentView.style.margin = '0 auto 0'
|
|
187
|
+
console.log(this.transformSalce);
|
|
180
188
|
this.contentView.style.position = 'relative'
|
|
189
|
+
this.contentView.style.paddingBottom = '60px'
|
|
181
190
|
// contentView.style.overflowY = 'auto'
|
|
182
191
|
this.$refs.pdfView.appendChild(this.contentView);
|
|
183
192
|
this.renderPages(pageIndex)
|
|
@@ -243,8 +252,8 @@ export default {
|
|
|
243
252
|
let div = document.createElement('div')
|
|
244
253
|
div.style.position = 'absolute';
|
|
245
254
|
div.style.left = postionArr[0] * this.scale + 'px',
|
|
246
|
-
|
|
247
|
-
|
|
255
|
+
// 后端返回的坐标有基线对齐的问题,top 值是后端算好(基线top - 文字高度),在此加上文字高度的 1/9 (大致比例)为实际展示出文字的top值
|
|
256
|
+
div.style.top = (postionArr[1] + postionArr[3] / 9) * this.scale + 'px'
|
|
248
257
|
div.style.height = postionArr[3] * this.scale + 'px';
|
|
249
258
|
div.style.width = postionArr[2] * this.scale + 'px'
|
|
250
259
|
div.style.backgroundColor = 'rgba(54, 106, 255, 0.3)'
|
|
@@ -263,8 +272,9 @@ export default {
|
|
|
263
272
|
pageDom.appendChild(textLayer.textLayerDiv);
|
|
264
273
|
page.dom = pageDom;
|
|
265
274
|
this.contentView.appendChild(pageDom);
|
|
266
|
-
|
|
267
|
-
|
|
275
|
+
if(this.transformSalce !== null) {
|
|
276
|
+
this.contentView.style.transform = `scale(${this.transformSalce}, ${this.transformSalce})`
|
|
277
|
+
}
|
|
268
278
|
if (this.changetoolbar) {
|
|
269
279
|
setTimeout(() => {
|
|
270
280
|
this.renderHighlights()
|
|
@@ -281,10 +291,18 @@ export default {
|
|
|
281
291
|
} else {
|
|
282
292
|
this.renderHighlights()
|
|
283
293
|
}
|
|
284
|
-
if
|
|
285
|
-
this.
|
|
294
|
+
if(this.transformSalce !== null) {
|
|
295
|
+
if (this.$refs.pdfView.scrollTop == Math.floor((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL)) * this.transformSalce ) {
|
|
296
|
+
this.fisrtLoad = false
|
|
297
|
+
} else {
|
|
298
|
+
this.$refs.pdfView.scrollTop = `${((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce)}`
|
|
299
|
+
}
|
|
286
300
|
} else {
|
|
287
|
-
this.$refs.pdfView.scrollTop
|
|
301
|
+
if (this.$refs.pdfView.scrollTop == Math.floor((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL))) {
|
|
302
|
+
this.fisrtLoad = false
|
|
303
|
+
} else {
|
|
304
|
+
this.$refs.pdfView.scrollTop = `${((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL))}`
|
|
305
|
+
}
|
|
288
306
|
}
|
|
289
307
|
// zoomElement(this.contentView)
|
|
290
308
|
}, 100)
|
|
@@ -460,7 +478,11 @@ export default {
|
|
|
460
478
|
this.$nextTick(() => {
|
|
461
479
|
this.renderHighlights()
|
|
462
480
|
})
|
|
463
|
-
this
|
|
481
|
+
if(this.transformSalce !== null) {
|
|
482
|
+
this.$refs.pdfView.scrollTop = `${((pdfResloute.page - 1) * (this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce)}`
|
|
483
|
+
} else {
|
|
484
|
+
this.$refs.pdfView.scrollTop = `${((pdfResloute.page - 1) * (this.pageSize.height + this.PAGE_INTVERVAL))}`
|
|
485
|
+
}
|
|
464
486
|
},
|
|
465
487
|
scrollToExcalTop(currentPage) {
|
|
466
488
|
for (let index = 0; index < this.allTr.length; index++) {
|
|
@@ -94,17 +94,7 @@ export default {
|
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
mounted() {
|
|
97
|
-
|
|
98
|
-
if(iframe) {
|
|
99
|
-
// this.loading = true
|
|
100
|
-
console.log('1111111');
|
|
101
|
-
iframe.onload = () =>{
|
|
102
|
-
this.loading = false
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
if(this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
|
|
106
|
-
this.loading = false
|
|
107
|
-
}
|
|
97
|
+
|
|
108
98
|
},
|
|
109
99
|
props:{
|
|
110
100
|
url:{
|
|
@@ -151,21 +141,19 @@ export default {
|
|
|
151
141
|
this.previewShowPopup = false;
|
|
152
142
|
this.drawer = false;
|
|
153
143
|
},
|
|
154
|
-
loadIframe(
|
|
144
|
+
loadIframe() {
|
|
155
145
|
let iframe = document.getElementsByClassName('preview_iframe')[0]
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
// }, '*')
|
|
168
|
-
// }
|
|
146
|
+
console.log(iframe,'iframeiframe');
|
|
147
|
+
if(iframe) {
|
|
148
|
+
// this.loading = true
|
|
149
|
+
iframe.onload = () =>{
|
|
150
|
+
console.log('1111111');
|
|
151
|
+
this.loading = false
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if(this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
|
|
155
|
+
this.loading = false
|
|
156
|
+
}
|
|
169
157
|
},
|
|
170
158
|
getBolb() {
|
|
171
159
|
this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false',{
|
|
@@ -54,19 +54,19 @@ class MyUploadAdapter {
|
|
|
54
54
|
);
|
|
55
55
|
res.then(resp=>{
|
|
56
56
|
imgInfo.url = ossFileUrl(ossConfig, resp.name)
|
|
57
|
-
let root = this.editor.model.document.getRoot()
|
|
58
|
-
let children = root.getChildren()
|
|
59
|
-
for(let child of children){
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
57
|
+
// let root = this.editor.model.document.getRoot()
|
|
58
|
+
// let children = root.getChildren()
|
|
59
|
+
// for(let child of children){
|
|
60
|
+
// for (let index = 0; index < child._children._nodes.length; index++) {
|
|
61
|
+
// if(child._children._nodes[index].name == 'askComponentPlaceholderContainer'){
|
|
62
|
+
// if(child._children._nodes[index]._children._nodes[0]) {
|
|
63
|
+
// this.editor.model.change(writer => {
|
|
64
|
+
// writer.remove(child._children._nodes[index]._children._nodes[0]);
|
|
65
|
+
// });
|
|
66
|
+
// }
|
|
67
|
+
// }
|
|
68
|
+
// }
|
|
69
|
+
// }
|
|
70
70
|
let command = this.editor.commands.get("insertAskComponent");
|
|
71
71
|
command.execute({
|
|
72
72
|
tag: "img",
|