askbot-dragon 1.6.78-beta → 1.6.78
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 +9 -6
- package/public/index.html +8 -5
- package/public/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/78-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/78-V.bcmap +0 -0
- package/public/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/public/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/public/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/public/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/public/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/public/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/public/pdfjs/cmaps/LICENSE +36 -0
- package/public/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/public/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/public/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Roman.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/V.bcmap +0 -0
- package/public/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/public/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSans.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSansBold.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSansBoldItalic.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSansItalic.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/public/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/public/pdfjs/standard_fonts/LICENSE_LIBERATION +102 -0
- package/public/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/public/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/public/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/public/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/src/assets/image/default_avt_ui.png +0 -0
- package/src/assets/image/filtType/audio.png +0 -0
- package/src/assets/image/filtType/excel1.png +0 -0
- package/src/assets/image/filtType/general.png +0 -0
- package/src/assets/image/filtType/html.png +0 -0
- package/src/assets/image/filtType/image1.png +0 -0
- package/src/assets/image/filtType/link.png +0 -0
- package/src/assets/image/filtType/md2.png +0 -0
- package/src/assets/image/filtType/mode.png +0 -0
- package/src/assets/image/filtType/news.png +0 -0
- package/src/assets/image/filtType/pdf1.png +0 -0
- package/src/assets/image/filtType/ppt1.png +0 -0
- package/src/assets/image/filtType/selfadd1.png +0 -0
- package/src/assets/image/filtType/txt1.png +0 -0
- package/src/assets/image/filtType/video.png +0 -0
- package/src/assets/image/filtType/wechat.png +0 -0
- package/src/assets/image/filtType/word1.png +0 -0
- package/src/assets/image/loading.gif +0 -0
- package/src/assets/js/AliyunlssUtil.js +35 -10
- package/src/assets/js/common.js +44 -9
- package/src/assets/js/hammer.js +2 -13
- package/src/assets/less/converSationContainer/common.less +0 -7
- package/src/assets/less/converSationContainer/converSatonContainer.less +44 -51
- package/src/assets/less/variables.less +122 -0
- package/src/components/ActionAlertIframe.vue +5 -27
- package/src/components/AiGuide.vue +33 -26
- package/src/components/AnswerDocknowledge.vue +331 -183
- package/src/components/AnswerVoice.vue +8 -7
- package/src/components/ConversationContainer.vue +7046 -1100
- package/src/components/MyEditor.vue +17 -25
- package/src/components/QwFeedback.vue +304 -0
- package/src/components/actionSatisfaction.vue +9 -7
- package/src/components/actionSendToBot.vue +6 -4
- package/src/components/answerDissatisfaction.vue +5 -3
- package/src/components/answerRadio.vue +96 -21
- package/src/components/ask-components/DissatisfactionOptions.vue +4 -3
- package/src/components/ask-components/Msgloading.vue +3 -2
- package/src/components/askVideo.vue +78 -26
- package/src/components/assetDetails.vue +18 -17
- package/src/components/assetMessage.vue +29 -26
- package/src/components/associationIntention.vue +85 -26
- package/src/components/attachmentPreview.vue +7 -5
- package/src/components/botActionSatisfactor.vue +5 -3
- package/src/components/chatContent.vue +21 -20
- package/src/components/feedBack.vue +6 -4
- package/src/components/fielListView.vue +8 -7
- package/src/components/file/AliyunOssComponents.vue +1 -1
- package/src/components/formTemplate.vue +1593 -1648
- package/src/components/imgView.vue +32 -0
- package/src/components/intelligentSummary.vue +24 -19
- package/src/components/interruptComponents/imageSelectionAnswer.vue +203 -0
- package/src/components/interruptComponents/multipleChoiceAnswer.vue +134 -0
- package/src/components/interruptComponents/singleChoiceAnswer.vue +82 -0
- package/src/components/kkview.vue +20 -28
- package/src/components/markDownText.vue +961 -0
- package/src/components/message/TextMessage.vue +8 -6
- package/src/components/message/swiper/ticketSwiper.vue +1 -1
- package/src/components/myPopup.vue +18 -13
- package/src/components/outputComponents/outputCom.vue +149 -0
- package/src/components/pagination.vue +130 -0
- package/src/components/pdfPosition.vue +96 -267
- package/src/components/popup.vue +15 -12
- package/src/components/preview/docView.vue +263 -0
- package/src/components/preview/excelView.vue +260 -0
- package/src/components/preview/markDownView.vue +70 -0
- package/src/components/preview/newPositionPreview.vue +601 -0
- package/src/components/preview/pdfView.vue +976 -0
- package/src/components/previewDoc.vue +12 -3
- package/src/components/previewPdf.vue +521 -203
- package/src/components/previewWisdom.vue +255 -0
- package/src/components/receiverMessagePlatform.vue +28 -22
- package/src/components/recommend.vue +9 -7
- package/src/components/senderMessagePlatform.vue +24 -14
- package/src/components/tree.vue +120 -105
- package/src/components/utils/AliyunIssUtil.js +35 -13
- package/src/components/utils/ckeditor.js +59 -48
- package/src/components/voiceComponent.vue +9 -6
- package/src/components/welcomeKnowledgeFile.vue +19 -13
- package/src/components/welcomeLlmCard.vue +11 -9
- package/src/components/welcomeSuggest.vue +6 -4
- package/src/locales/cn.json +100 -0
- package/src/locales/en.json +99 -0
- package/src/main.js +19 -0
- package/src/components/newPdfPosition.vue +0 -878
|
@@ -5,34 +5,43 @@
|
|
|
5
5
|
另外增加了在知识项目中预览当前文件的一些功能
|
|
6
6
|
-->
|
|
7
7
|
<template>
|
|
8
|
-
<el-drawer title="
|
|
9
|
-
:modal="false" :direction="
|
|
8
|
+
<el-drawer title="" :visible.sync="drawer" :with-header="false" :append-to-body="true" :destroy-on-close="true"
|
|
9
|
+
:modal="false" :direction="!isPc ? 'btt' : 'rtl'" :size="!isPc ? '90%' : '65%'"
|
|
10
10
|
custom-class="pdf-preview-drawer" v-if="drawer">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
<div class="drawer-header" :class="(isDownload || (isHasChat && fileType != 'IMAGE')) && isLiBang ? 'has_btn_libang_head' : (isLiBang ? 'libang_head' : (isDownload || (isHasChat && fileType != 'IMAGE') ? 'has_btn_head' : ''))" v-if="!isPc">
|
|
12
|
+
<div class="header_title">
|
|
13
|
+
<template v-if="isDownload || (isHasChat && fileType != 'IMAGE')">
|
|
14
|
+
<div class="top-header">
|
|
15
|
+
<div class="header-btn">
|
|
16
|
+
<div class="onload_btn" v-if="isDownload" @click="downLoad">
|
|
17
|
+
{{ $t('dragonCommon.download') }}
|
|
18
|
+
</div>
|
|
19
|
+
<div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun" v-if="isHasChat && fileType != 'IMAGE'">
|
|
20
|
+
<i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
|
|
21
|
+
<span>{{ $t('dragonCommon.smartSummary') }}</span>
|
|
22
|
+
</div>
|
|
23
|
+
<template v-if="isHasChat && fileType != 'IMAGE'">
|
|
24
|
+
<div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
|
|
25
|
+
<i class="iconfont guoran-wendapingjia"></i>
|
|
26
|
+
{{ $t('dragonCommon.chat') }}
|
|
27
|
+
</div>
|
|
28
|
+
<div class="chat chat_active" @click="previewToDialog(false)" v-else>
|
|
29
|
+
<i class="iconfont guoran-wendapingjia"></i>
|
|
30
|
+
{{ $t('dragonCommon.chat') }}
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
</div>
|
|
34
|
+
<section @click="close">
|
|
35
|
+
<i class="iconfont guoran-shanchu"></i>
|
|
36
|
+
</section>
|
|
29
37
|
</div>
|
|
38
|
+
<span class="title_left">
|
|
39
|
+
{{ title ? title : $t('dragonCommon.viewDetails') }}
|
|
40
|
+
</span>
|
|
30
41
|
</template>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<span>
|
|
35
|
-
{{ title ? title : "查看详情" }}
|
|
42
|
+
<div class="header_close" v-else>
|
|
43
|
+
<span class="title_left">
|
|
44
|
+
{{ title ? title : $t('dragonCommon.viewDetails') }}
|
|
36
45
|
</span>
|
|
37
46
|
<section @click="close">
|
|
38
47
|
<i class="iconfont guoran-shanchu"></i>
|
|
@@ -48,26 +57,26 @@
|
|
|
48
57
|
<div class="drawer-header" :class="isLiBang && folderName ? 'libang_head' : ''" v-else>
|
|
49
58
|
<div class="header_title">
|
|
50
59
|
<div :class="isLiBang && folderName ? 'header_close' : 'header_top'">
|
|
51
|
-
<span>
|
|
52
|
-
{{ title ? title :
|
|
60
|
+
<span class="title_left">
|
|
61
|
+
{{ title ? title : $t('dragonCommon.viewDetails') }}
|
|
53
62
|
</span>
|
|
54
63
|
<div class="header-btn">
|
|
55
|
-
<div class="onload_btn" v-if="isDownload
|
|
56
|
-
|
|
64
|
+
<div class="onload_btn" v-if="isDownload" @click="downLoad">
|
|
65
|
+
{{ $t('dragonCommon.download') }}
|
|
57
66
|
</div>
|
|
58
67
|
<div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
|
|
59
|
-
v-if="isHasChat
|
|
68
|
+
v-if="isHasChat && fileType != 'IMAGE'">
|
|
60
69
|
<i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
|
|
61
|
-
<span
|
|
70
|
+
<span>{{ $t('dragonCommon.smartSummary') }}</span>
|
|
62
71
|
</div>
|
|
63
|
-
<template v-if="isHasChat
|
|
72
|
+
<template v-if="isHasChat && fileType != 'IMAGE'">
|
|
64
73
|
<div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
|
|
65
74
|
<i class="iconfont guoran-wendapingjia"></i>
|
|
66
|
-
|
|
75
|
+
{{ $t('dragonCommon.chat') }}
|
|
67
76
|
</div>
|
|
68
77
|
<div class="chat chat_active" @click="previewToDialog(false)" v-else>
|
|
69
78
|
<i class="iconfont guoran-wendapingjia"></i>
|
|
70
|
-
|
|
79
|
+
{{ $t('dragonCommon.chat') }}
|
|
71
80
|
</div>
|
|
72
81
|
</template>
|
|
73
82
|
<section @click="close">
|
|
@@ -82,21 +91,30 @@
|
|
|
82
91
|
</p>
|
|
83
92
|
</div>
|
|
84
93
|
</div>
|
|
85
|
-
<div id="drawer_content_pre" :class="isLiBang && folderName ? 'libang_content_pre' : ''">
|
|
86
|
-
|
|
87
|
-
<intelligent-summary v-show="showSummary && (isHasChat || formKnowledgeManagement)" :tagIds="tagIds" :knowledgeId="knowledgeId"
|
|
94
|
+
<div id="drawer_content_pre" :class="(isDownload || (isHasChat && fileType != 'IMAGE')) && !isPc && isLiBang && folderName ? 'has_btn_libang_content_pre' : (isLiBang && folderName ? 'libang_content_pre' : '')">
|
|
95
|
+
<intelligent-summary v-show="showSummary && (isHasChat && fileType != 'IMAGE')" :tagIds="tagIds" :knowledgeId="knowledgeId"
|
|
88
96
|
@closeSummary="closeSummary" @recommendQues="recommendQues"
|
|
89
97
|
@getSummarySuccess="getSummarySuccess"></intelligent-summary>
|
|
90
|
-
<div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer">
|
|
98
|
+
<div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer && newVersion === false && newFileType !== 'PPT' && newFileType !== 'PPTX' && newFileType !== 'IMAGE'">
|
|
91
99
|
<pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :textWatermarkStr="textWatermarkStr">
|
|
92
100
|
</pdfPosition>
|
|
93
101
|
</div>
|
|
102
|
+
<new-position-preview
|
|
103
|
+
ref="newPositionPreview"
|
|
104
|
+
v-else-if="tagIds && tagIds.length!= 0 && newVersion && newFileType !== 'PPT' && newFileType !== 'PPTX' && newFileType !== 'IMAGE'"
|
|
105
|
+
:knowledgeId="knowledgeId"
|
|
106
|
+
:tagIds="tagIds"
|
|
107
|
+
:url="previewHref"
|
|
108
|
+
:textWatermarkStr="textWatermarkStr"
|
|
109
|
+
:previewOssPath="previewOssPath"
|
|
110
|
+
:isLining="isLining"
|
|
111
|
+
></new-position-preview>
|
|
94
112
|
<template v-else>
|
|
95
113
|
<div v-if="fileType == 'VIDEO'" style="width: 100%;">
|
|
96
114
|
<video :src="url" controls width="100%;" height="98%"></video>
|
|
97
115
|
</div>
|
|
98
116
|
<div v-else-if="fileType == 'HTML'" style="width: 100%;">
|
|
99
|
-
<div class="preview_iframe_html" style="text-
|
|
117
|
+
<div class="preview_iframe_html" style="text-align:left" v-html="fileText"></div>
|
|
100
118
|
</div>
|
|
101
119
|
<template v-else-if="url.includes('https://www') || url.includes('http://www')">
|
|
102
120
|
<iframe class="preview_iframe" :src="url" width="100%" height="100%" scrolling="100%" frameborder="no"
|
|
@@ -105,11 +123,20 @@
|
|
|
105
123
|
<template v-else>
|
|
106
124
|
<iframe class="preview_iframe_kk" :src="previewUrl" style="border:none;"
|
|
107
125
|
:style="{ height: iframeHeight }"></iframe>
|
|
126
|
+
<template v-if="!loading && ((newFileType === 'PPT' || newFileType === 'PPTX') && pageChunkData.length > 1)">
|
|
127
|
+
<div class="btn_footer" v-if="!isPc">
|
|
128
|
+
<div class="prev" @click="prev">{{$t('dragonCommon.previous')}}</div>
|
|
129
|
+
<div class="next" @click="next">{{$t('dragonCommon.next')}}</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div id="pagination" v-if="isPc">
|
|
132
|
+
<el-pagination :current-page="currentPage + 1" @current-change="currentChange" @prev-click="prev"
|
|
133
|
+
@next-click="next" layout="slot, prev, pager, next" :page-size="1" :total="pageChunkData.length">
|
|
134
|
+
<span class="total-class">{{$t('dragonCommon.answersGeneratedByPre')}} {{ pageChunkData.length }} {{$t('dragonCommon.answersGeneratedByAfter')}}</span>
|
|
135
|
+
</el-pagination>
|
|
136
|
+
</div>
|
|
137
|
+
</template>
|
|
108
138
|
</template>
|
|
109
139
|
</template>
|
|
110
|
-
<!-- <div class="mobile_onload_btn" v-if="isDownload && !isPc" @click="downLoad">
|
|
111
|
-
下载
|
|
112
|
-
</div> -->
|
|
113
140
|
</div>
|
|
114
141
|
<div class="loading_img" v-show="loading">
|
|
115
142
|
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
|
|
@@ -126,63 +153,71 @@ import { zoomElement } from '../assets/js/hammer'
|
|
|
126
153
|
import IntelligentSummary from "./intelligentSummary";
|
|
127
154
|
import { isMobile } from "../assets/js/common";
|
|
128
155
|
import { Toast } from 'vant';
|
|
156
|
+
import NewPositionPreview from "./preview/newPositionPreview";
|
|
129
157
|
export default {
|
|
130
158
|
data () {
|
|
131
159
|
return {
|
|
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
|
-
|
|
160
|
+
previewShowPopup: false,
|
|
161
|
+
fileText: '',
|
|
162
|
+
fileType: "",
|
|
163
|
+
isPc: false,
|
|
164
|
+
drawer: false,
|
|
165
|
+
tagIds: [],
|
|
166
|
+
// '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
|
|
167
|
+
loading: true,
|
|
168
|
+
previewKnowledgeId: "",
|
|
169
|
+
showSummary: false,
|
|
170
|
+
iframeHeight: "100%",
|
|
171
|
+
isDownload: false,
|
|
172
|
+
textWatermarkStr: "",
|
|
173
|
+
copy:'',
|
|
174
|
+
newVersion:'',
|
|
175
|
+
previewHref:"",
|
|
176
|
+
newFileType:"",
|
|
177
|
+
numberPage:0,
|
|
178
|
+
pageChunkData:[],
|
|
179
|
+
currentPage:0
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
mounted () {
|
|
183
|
+
this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
|
|
184
|
+
window.addEventListener('message', this.handleIframeMessage, false);
|
|
185
|
+
this.isPcFun();
|
|
186
|
+
},
|
|
187
|
+
props: {
|
|
188
|
+
url: {
|
|
189
|
+
type: String,
|
|
190
|
+
required: true,
|
|
191
|
+
},
|
|
192
|
+
officePreviewType: {
|
|
193
|
+
type: String,
|
|
194
|
+
default: ''
|
|
195
|
+
},
|
|
196
|
+
isMessageRecord: {
|
|
197
|
+
type: Boolean,
|
|
198
|
+
default: false,
|
|
199
|
+
},
|
|
200
|
+
sourceFileType: {
|
|
201
|
+
type: String,
|
|
202
|
+
default: '',
|
|
203
|
+
},
|
|
204
|
+
title: {
|
|
205
|
+
type: String,
|
|
206
|
+
default: ''
|
|
207
|
+
},
|
|
208
|
+
isHasChat: {
|
|
209
|
+
type: Boolean,
|
|
210
|
+
default: false
|
|
211
|
+
},
|
|
212
|
+
knowledgeId: {
|
|
213
|
+
type: String,
|
|
214
|
+
default: '',
|
|
215
|
+
},
|
|
216
|
+
previewOssPath: {
|
|
217
|
+
type: String,
|
|
218
|
+
default: '',
|
|
219
|
+
},
|
|
220
|
+
folderName: {
|
|
186
221
|
type: String,
|
|
187
222
|
default: '',
|
|
188
223
|
},
|
|
@@ -194,12 +229,21 @@ export default {
|
|
|
194
229
|
type: Boolean,
|
|
195
230
|
default: false
|
|
196
231
|
},
|
|
197
|
-
|
|
232
|
+
isLining:{
|
|
233
|
+
type: Boolean,
|
|
234
|
+
default: false
|
|
235
|
+
},
|
|
236
|
+
processEnvUrl:{
|
|
237
|
+
type: String,
|
|
238
|
+
default: ''
|
|
239
|
+
},
|
|
240
|
+
isProduction:{
|
|
198
241
|
type: Boolean,
|
|
199
242
|
default: false
|
|
200
243
|
}
|
|
201
244
|
},
|
|
202
245
|
components: {
|
|
246
|
+
NewPositionPreview,
|
|
203
247
|
IntelligentSummary,
|
|
204
248
|
pdfPosition
|
|
205
249
|
},
|
|
@@ -208,76 +252,80 @@ export default {
|
|
|
208
252
|
if (value) {
|
|
209
253
|
this.$emit('open')
|
|
210
254
|
this.$nextTick(() => {
|
|
211
|
-
|
|
212
|
-
zoomElement(document.getElementById('pdf_container_view'))
|
|
213
|
-
}
|
|
214
|
-
})
|
|
215
|
-
} else {
|
|
216
|
-
this.$emit('close')
|
|
217
|
-
}
|
|
218
|
-
setTimeout(() => {
|
|
219
|
-
let previewIframe = document.getElementsByClassName('preview_iframe')
|
|
220
|
-
Array.from(previewIframe).forEach(item =>{
|
|
221
|
-
item.onload = () =>{
|
|
222
|
-
console.debug('previewIframe 106',previewIframe,this.drawer)
|
|
223
|
-
item.style.backgroundImage = 'none'
|
|
224
|
-
}
|
|
225
|
-
})
|
|
255
|
+
zoomElement(document.getElementById('drawer_content_pre'))
|
|
226
256
|
})
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
257
|
+
} else {
|
|
258
|
+
this.$emit('close')
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
showSummary: {
|
|
262
|
+
handler (val) {
|
|
263
|
+
// if (!val){
|
|
264
|
+
// this.$nextTick(() => {
|
|
265
|
+
// let preCon = document.querySelector('.pdf_view');
|
|
266
|
+
// if (preCon){
|
|
267
|
+
// preCon.style.height = 'calc(100% - ' + 50 + 'px)'
|
|
268
|
+
// }
|
|
269
|
+
// })
|
|
270
|
+
// } else {
|
|
271
|
+
// this.getSummarySuccess();
|
|
272
|
+
// }
|
|
273
|
+
if (val) {
|
|
274
|
+
this.getSummarySuccess();
|
|
243
275
|
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
knowledgeId: {
|
|
279
|
+
handler (val) {
|
|
280
|
+
if (val) {
|
|
281
|
+
this.getTextWatermark();
|
|
250
282
|
}
|
|
251
283
|
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
computed: {
|
|
287
|
+
pdfStyle () {
|
|
288
|
+
return {
|
|
289
|
+
paddingTop: this.isPc ? '30px' : '0', // 30px 是 加上外层的 20 流出 50的上边距展示 放大缩小操作栏
|
|
290
|
+
paddingBottom: this.tagIds > 1 ? '60px' : '0',
|
|
291
|
+
height: '100%'
|
|
292
|
+
}
|
|
252
293
|
},
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
294
|
+
previewUrl () {
|
|
295
|
+
let url = ""
|
|
296
|
+
if (process.env.VUE_APP_ENV == 'production'){
|
|
297
|
+
url = "https://kkfileview.askbot.cn/onlinePreview?url="
|
|
298
|
+
} else {
|
|
299
|
+
url = "https://test.open.askbot.cn/kkfileview/onlinePreview?url="
|
|
300
|
+
}
|
|
301
|
+
if (this.processEnvUrl){
|
|
302
|
+
url = this.processEnvUrl
|
|
303
|
+
}
|
|
304
|
+
if(process.env.VUE_APP_SOURCE == 'lining_test') {
|
|
305
|
+
url = 'https://wxgw.lining.com/askbot/kkfileview/onlinePreview?url='
|
|
306
|
+
}
|
|
307
|
+
if(process.env.VUE_APP_SOURCE == 'lining_production') {
|
|
308
|
+
url = 'https://wxgw.lining.com/askbot-prd/kkfileview/onlinePreview?url='
|
|
309
|
+
}
|
|
310
|
+
console.debug('VUE_APP_ENV', process.env.VUE_APP_ENV,process.env.VUE_APP_SOURCE,url)
|
|
311
|
+
// if(this.url != '') {
|
|
312
|
+
// if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
|
|
313
|
+
// url += btoa(encodeURIComponent(this.url))
|
|
314
|
+
// } else {
|
|
315
|
+
// url += btoa(this.url)
|
|
316
|
+
// }
|
|
317
|
+
// }
|
|
318
|
+
url = url + this.url
|
|
319
|
+
if (this.sourceFileType == '.ppt' || this.sourceFileType == '.pptx' || this.sourceFileType == '.pdf') {
|
|
320
|
+
url += '&officePreviewType=pdf'
|
|
276
321
|
}
|
|
277
322
|
console.log('textWatermarkStr 216', this.textWatermarkStr)
|
|
278
323
|
if (this.textWatermarkStr) {
|
|
279
324
|
url += '&textWatermarkValue=' + this.textWatermarkStr
|
|
280
325
|
}
|
|
326
|
+
if (this.isLining){
|
|
327
|
+
url += '&isLining=true'
|
|
328
|
+
}
|
|
281
329
|
return url
|
|
282
330
|
},
|
|
283
331
|
// fileType() {
|
|
@@ -301,7 +349,7 @@ export default {
|
|
|
301
349
|
},
|
|
302
350
|
loadIframe () {
|
|
303
351
|
|
|
304
|
-
if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
|
|
352
|
+
if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0 && this.newFileType !== 'PPT' && this.newFileType !== 'PPTX' && this.newFileType !== 'IMAGE')) {
|
|
305
353
|
this.loading = false
|
|
306
354
|
} else {
|
|
307
355
|
let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
|
|
@@ -342,13 +390,23 @@ export default {
|
|
|
342
390
|
this.$emit('recommendQues', item, knowledgeId)
|
|
343
391
|
},
|
|
344
392
|
handleIframeMessage (res) {
|
|
345
|
-
console.log('handleIframeMessage', res)
|
|
346
393
|
if (res.data.type == 'getViewerHeight') {
|
|
347
394
|
let iframeHeight = this.iframeHeight.replace('px', '')
|
|
348
395
|
if (res.data.data && iframeHeight != (res.data.data + 50)) {
|
|
349
396
|
this.iframeHeight = res.data.data + 50 + 'px'
|
|
350
397
|
}
|
|
351
398
|
}
|
|
399
|
+
if (res.data.type == 'getViewPage' && res.data.data){
|
|
400
|
+
this.numberPage = Number(res.data.data);
|
|
401
|
+
if (this.pageChunkData.length > 0){
|
|
402
|
+
this.scrollPPTPage(this.pageChunkData[0])
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
if (res.data.type == 'getViewerHeight' || res.data.type == 'getViewPage'){
|
|
406
|
+
if (this.pageChunkData.length > 0){
|
|
407
|
+
this.scrollPPTPage(this.pageChunkData[0])
|
|
408
|
+
}
|
|
409
|
+
}
|
|
352
410
|
},
|
|
353
411
|
summaryFun () {
|
|
354
412
|
this.showSummary = !this.showSummary;
|
|
@@ -402,7 +460,7 @@ export default {
|
|
|
402
460
|
}
|
|
403
461
|
}).then(res => {
|
|
404
462
|
console.log('downLoad 341', res)
|
|
405
|
-
if (res.data|| res.bodyText) {
|
|
463
|
+
if (res.data || res.bodyText) {
|
|
406
464
|
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
|
|
407
465
|
this.copy = res.data
|
|
408
466
|
if (isMobile()) {
|
|
@@ -415,7 +473,7 @@ export default {
|
|
|
415
473
|
selection.addRange(range);
|
|
416
474
|
document.execCommand('copy');
|
|
417
475
|
selection.removeAllRanges()
|
|
418
|
-
Toast('
|
|
476
|
+
Toast(this.$t('dragonCommon.Safaridownload'));
|
|
419
477
|
this.close()
|
|
420
478
|
},100)
|
|
421
479
|
} else {
|
|
@@ -431,17 +489,16 @@ export default {
|
|
|
431
489
|
// }, 2000)
|
|
432
490
|
// window.open(res.data,'下载', 'noopener')
|
|
433
491
|
if (isMobile()) {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
iframe.setAttribute("src", res.data );
|
|
492
|
+
const iframe = document.createElement("iframe");
|
|
493
|
+
iframe.setAttribute("hidden", "hidden");
|
|
494
|
+
iframe.onload = () => {
|
|
495
|
+
if (iframe) {
|
|
496
|
+
console.log("iframe onload....")
|
|
497
|
+
iframe.setAttribute('src', 'about:blank');
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
document.body.insertBefore(iframe, null);
|
|
501
|
+
iframe.setAttribute("src", res.data);
|
|
445
502
|
} else {
|
|
446
503
|
let a = document.createElement('a')
|
|
447
504
|
a.href = res.data
|
|
@@ -449,7 +506,7 @@ export default {
|
|
|
449
506
|
a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
|
|
450
507
|
}
|
|
451
508
|
this.close()
|
|
452
|
-
}
|
|
509
|
+
}
|
|
453
510
|
}
|
|
454
511
|
})
|
|
455
512
|
},
|
|
@@ -457,13 +514,123 @@ export default {
|
|
|
457
514
|
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
|
|
458
515
|
this.isPc = false
|
|
459
516
|
} else {
|
|
460
|
-
|
|
517
|
+
let documentWidth = document.documentElement.clientWidth;
|
|
518
|
+
if(documentWidth < 750) {
|
|
519
|
+
this.isPc = false
|
|
520
|
+
} else {
|
|
521
|
+
this.isPc = true
|
|
522
|
+
}
|
|
461
523
|
}
|
|
462
524
|
},
|
|
463
525
|
clickFloder() {
|
|
464
526
|
this.$emit('previewClickFloder')
|
|
527
|
+
},
|
|
528
|
+
getOssPath(url){
|
|
529
|
+
let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate';
|
|
530
|
+
let type = this.getFileType(url)
|
|
531
|
+
this.newFileType = type;
|
|
532
|
+
console.log('type',type)
|
|
533
|
+
if (type === 'VIDEO' || type === 'PDF' || type === 'EXCEL' || type === 'TXT' || type === 'DOC' || type === 'MD') {
|
|
534
|
+
httpUrl += '?needEncrypt=false'
|
|
535
|
+
} else {
|
|
536
|
+
httpUrl += '?needEncrypt=true'
|
|
537
|
+
}
|
|
538
|
+
this.$http.post(httpUrl, {
|
|
539
|
+
"fileInOssPath": url
|
|
540
|
+
}).then(res => {
|
|
541
|
+
console.log('getOssPath',res)
|
|
542
|
+
if (res.data.code == '0'){
|
|
543
|
+
this.previewHref = res.data.data;
|
|
544
|
+
}
|
|
545
|
+
})
|
|
546
|
+
},
|
|
547
|
+
getFileType(url){
|
|
548
|
+
let index = url.lastIndexOf('?')
|
|
549
|
+
let newFileInOssPath = url.substring(0, url.indexOf("?"))
|
|
550
|
+
if (index == -1){
|
|
551
|
+
newFileInOssPath = url
|
|
552
|
+
}
|
|
553
|
+
const fileType = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'));
|
|
554
|
+
if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc') {
|
|
555
|
+
return 'VIDEO'
|
|
556
|
+
} else if (fileType === '.html') {
|
|
557
|
+
return 'HTML'
|
|
558
|
+
} else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg' || fileType === '.PNG' || fileType === '.JPG' || fileType === '.JPEG') {
|
|
559
|
+
return 'IMAGE'
|
|
560
|
+
} else if (fileType === '.docx' || fileType === '.doc'){
|
|
561
|
+
return 'DOC'
|
|
562
|
+
} else if (fileType === '.ppt' || fileType === '.pptx'){
|
|
563
|
+
return 'PPT'
|
|
564
|
+
} else if (fileType === '.pdf'){
|
|
565
|
+
return 'PDF'
|
|
566
|
+
} else if (fileType === '.txt'){
|
|
567
|
+
return 'TXT'
|
|
568
|
+
} else if (fileType === '.md'){
|
|
569
|
+
return 'MD'
|
|
570
|
+
} else {
|
|
571
|
+
return 'OTHER'
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
//判断是否使用新定位组件
|
|
575
|
+
getLocationInfo(){
|
|
576
|
+
this.newVersion = "";
|
|
577
|
+
this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + this.tagIds.join(',')).then(res => {
|
|
578
|
+
console.log('getLocationInfo',res)
|
|
579
|
+
this.pageChunkData = [];
|
|
580
|
+
if (res.data.code == 0){
|
|
581
|
+
if (res.data.data && res.data.data.length > 0 && res.data.data[0].extractVersion == 'v3'){
|
|
582
|
+
this.newVersion = true;
|
|
583
|
+
if (this.newFileType !== 'PPT' && this.newFileType !== 'PPTX' && this.newFileType !== 'IMAGE'){
|
|
584
|
+
this.loading = false;
|
|
585
|
+
}
|
|
586
|
+
for (let i=0;i<res.data.data.length;i++){
|
|
587
|
+
if (res.data.data[i].paragraphChunkInfo && res.data.data[i].paragraphChunkInfo.pageChunkData){
|
|
588
|
+
this.pageChunkData.push(res.data.data[i].paragraphChunkInfo.pageChunkData.page_number)
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
if (this.pageChunkData.length > 1){
|
|
592
|
+
let iframe = document.getElementsByClassName('preview_iframe_kk')
|
|
593
|
+
if (iframe && iframe.length > 0){
|
|
594
|
+
iframe[0].style.paddingBottom = '50px'
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
} else {
|
|
598
|
+
this.newVersion = false;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
})
|
|
602
|
+
},
|
|
603
|
+
currentChange (value) {
|
|
604
|
+
this.currentPage = value - 1;
|
|
605
|
+
this.scrollPPTPage()
|
|
606
|
+
},
|
|
607
|
+
prev(){
|
|
608
|
+
if (this.currentPage == 0){
|
|
609
|
+
return
|
|
610
|
+
}
|
|
611
|
+
this.currentPage--;
|
|
612
|
+
this.scrollPPTPage()
|
|
613
|
+
},
|
|
614
|
+
next(){
|
|
615
|
+
if (this.currentPage === (this.pageChunkData.length - 1)){
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
this.currentPage++;
|
|
619
|
+
this.scrollPPTPage()
|
|
620
|
+
},
|
|
621
|
+
scrollPPTPage(){
|
|
622
|
+
if (this.numberPage > 0){
|
|
623
|
+
let pageNumber = this.pageChunkData[this.currentPage];
|
|
624
|
+
let height = Math.floor(Number(this.iframeHeight.replace('px',"")));
|
|
625
|
+
let pageHeight = Math.floor(height / this.numberPage);
|
|
626
|
+
let scrollHeight = (pageNumber - 1) * pageHeight;
|
|
627
|
+
let dom = document.getElementById('drawer_content_pre');
|
|
628
|
+
if (dom){
|
|
629
|
+
dom.scrollTo(0,scrollHeight)
|
|
630
|
+
}
|
|
631
|
+
}
|
|
465
632
|
}
|
|
466
|
-
|
|
633
|
+
},
|
|
467
634
|
beforeDestroy () {
|
|
468
635
|
window.removeEventListener('message', this.handleIframeMessage);
|
|
469
636
|
}
|
|
@@ -471,6 +638,8 @@ export default {
|
|
|
471
638
|
</script>
|
|
472
639
|
|
|
473
640
|
<style lang="less" scoped>
|
|
641
|
+
@import "../assets/less/variables.less";
|
|
642
|
+
|
|
474
643
|
#drawer_content_pre {
|
|
475
644
|
padding: 20px;
|
|
476
645
|
scroll-behavior: smooth;
|
|
@@ -487,9 +656,9 @@ export default {
|
|
|
487
656
|
cursor: pointer;
|
|
488
657
|
border-top-left-radius: 10px;
|
|
489
658
|
border-bottom-left-radius: 10px;
|
|
490
|
-
color:
|
|
491
|
-
background:
|
|
492
|
-
border: 1px solid
|
|
659
|
+
color: @font-primary-accent-color;
|
|
660
|
+
background: @background-color-light;
|
|
661
|
+
border: 1px solid @border-color-copy;
|
|
493
662
|
font-size: 12px;
|
|
494
663
|
border-right: none;
|
|
495
664
|
text-align: center;
|
|
@@ -510,9 +679,9 @@ export default {
|
|
|
510
679
|
cursor: pointer;
|
|
511
680
|
margin-right: 10px;
|
|
512
681
|
border-radius: 15px;
|
|
513
|
-
color:
|
|
514
|
-
background:
|
|
515
|
-
border: 1px solid
|
|
682
|
+
color: @font-primary-accent-color;
|
|
683
|
+
background: @background-color-light;
|
|
684
|
+
border: 1px solid @border-color-copy;
|
|
516
685
|
box-sizing: border-box;
|
|
517
686
|
}
|
|
518
687
|
|
|
@@ -530,8 +699,133 @@ export default {
|
|
|
530
699
|
width: 100%;
|
|
531
700
|
height: 100%;
|
|
532
701
|
}
|
|
702
|
+
.btn_footer {
|
|
703
|
+
width: 100%;
|
|
704
|
+
height: 60px;
|
|
705
|
+
display: flex;
|
|
706
|
+
align-items: center;
|
|
707
|
+
justify-content: space-around;
|
|
708
|
+
position: absolute;
|
|
709
|
+
bottom: 0px;
|
|
710
|
+
left: 0;
|
|
711
|
+
z-index: 999;
|
|
712
|
+
background: @background-color-light;
|
|
713
|
+
|
|
714
|
+
.prev,
|
|
715
|
+
.next {
|
|
716
|
+
width: 35%;
|
|
717
|
+
height: 40px;
|
|
718
|
+
display: flex;
|
|
719
|
+
align-items: center;
|
|
720
|
+
justify-content: center;
|
|
721
|
+
border-radius: 50px;
|
|
722
|
+
cursor: pointer;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
.prev {
|
|
726
|
+
background: @background-color-prev;
|
|
727
|
+
color: @font-primary-color;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
.next {
|
|
731
|
+
background: @primary-color;
|
|
732
|
+
color: @font-primary-light-color;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
#pagination {
|
|
736
|
+
.total-class {
|
|
737
|
+
margin-right: 13px;
|
|
738
|
+
font-weight: 400;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
position: absolute;
|
|
742
|
+
bottom: 0px;
|
|
743
|
+
right: 0;
|
|
744
|
+
width: 100%;
|
|
745
|
+
display: flex;
|
|
746
|
+
align-items: center;
|
|
747
|
+
justify-content: center;
|
|
748
|
+
height: 50px;
|
|
749
|
+
background-color: @background-color-light;
|
|
750
|
+
box-shadow: 0px 0px 18px 0px rgba(29, 55, 129, 0.07);
|
|
751
|
+
border-radius: 5px;
|
|
752
|
+
z-index: 1000;
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
/deep/.el-pagination {
|
|
757
|
+
margin-right: 110px;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/deep/.el-pager {
|
|
761
|
+
background: @background-color-pagination;
|
|
762
|
+
border-radius: 15px;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/deep/.el-pagination.is-background .btn-next {
|
|
766
|
+
width: 30px;
|
|
767
|
+
height: 30px;
|
|
768
|
+
background: @background-color-pagination;
|
|
769
|
+
border-radius: 50%;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
/deep/.el-pagination .btn-next {
|
|
773
|
+
width: 30px;
|
|
774
|
+
height: 30px;
|
|
775
|
+
background: @background-color-pagination;
|
|
776
|
+
border-radius: 50%;
|
|
777
|
+
padding-left: 0;
|
|
778
|
+
margin-left: 5px;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
/deep/.el-pagination .btn-prev {
|
|
782
|
+
width: 30px;
|
|
783
|
+
height: 30px;
|
|
784
|
+
background: @background-color-pagination;
|
|
785
|
+
border-radius: 50%;
|
|
786
|
+
padding-right: 0;
|
|
787
|
+
margin-right: 5px;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
/deep/.el-pagination button {
|
|
791
|
+
padding: 0;
|
|
792
|
+
min-width: 30px;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
/deep/.el-pager li {
|
|
796
|
+
background: @background-color-pagination;
|
|
797
|
+
height: 30px;
|
|
798
|
+
min-width: 30px;
|
|
799
|
+
line-height: 30px;
|
|
800
|
+
font-size: 12px;
|
|
801
|
+
color: @font-pagination-color;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/deep/.el-pager li:first-child {
|
|
805
|
+
border-bottom-left-radius: 15px !important;
|
|
806
|
+
border-top-left-radius: 15px !important;
|
|
807
|
+
}
|
|
533
808
|
|
|
809
|
+
/deep/.el-pager li:last-child {
|
|
810
|
+
border-top-right-radius: 15px !important;
|
|
811
|
+
border-bottom-right-radius: 15px !important;
|
|
812
|
+
}
|
|
534
813
|
|
|
814
|
+
/deep/.el-pager li.active {
|
|
815
|
+
width: 30px;
|
|
816
|
+
height: 30px;
|
|
817
|
+
min-width: 30px;
|
|
818
|
+
background: @primary-color;
|
|
819
|
+
border: 3px solid @border-color-copy;
|
|
820
|
+
border-radius: 50%;
|
|
821
|
+
line-height: 24px;
|
|
822
|
+
color: @font-primary-light-color;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
/deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
|
|
826
|
+
background: @primary-color;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
535
829
|
.preview_iframe_html {
|
|
536
830
|
width: 100%;
|
|
537
831
|
height: 100%;
|
|
@@ -583,7 +877,7 @@ export default {
|
|
|
583
877
|
justify-content: space-between;
|
|
584
878
|
cursor: pointer;
|
|
585
879
|
padding: 0 20px;
|
|
586
|
-
border-bottom: 1px solid
|
|
880
|
+
border-bottom: 1px solid @border-color-r5;
|
|
587
881
|
}
|
|
588
882
|
|
|
589
883
|
.loading_img {
|
|
@@ -595,7 +889,7 @@ export default {
|
|
|
595
889
|
position: absolute;
|
|
596
890
|
top: 0;
|
|
597
891
|
left: 0;
|
|
598
|
-
background:
|
|
892
|
+
background: @background-color-light;
|
|
599
893
|
|
|
600
894
|
img {
|
|
601
895
|
width: 50px;
|
|
@@ -606,13 +900,18 @@ export default {
|
|
|
606
900
|
.libang_head {
|
|
607
901
|
height: 64px !important;
|
|
608
902
|
}
|
|
609
|
-
|
|
903
|
+
.has_btn_libang_head{
|
|
904
|
+
height: 85px!important;
|
|
905
|
+
}
|
|
906
|
+
.has_btn_head{
|
|
907
|
+
height: 60px!important;
|
|
908
|
+
}
|
|
610
909
|
.drawer-header {
|
|
611
910
|
width: 100%;
|
|
612
911
|
height: 50px;
|
|
613
912
|
cursor: pointer;
|
|
614
913
|
padding: 6px 20px;
|
|
615
|
-
border-bottom: 1px solid
|
|
914
|
+
border-bottom: 1px solid @border-color-r5;
|
|
616
915
|
.btn_position {
|
|
617
916
|
position: absolute;
|
|
618
917
|
top: -34px;
|
|
@@ -623,25 +922,24 @@ export default {
|
|
|
623
922
|
display: flex;
|
|
624
923
|
align-items: center;
|
|
625
924
|
justify-content: space-between;
|
|
626
|
-
|
|
925
|
+
flex: none;
|
|
627
926
|
.header-right {
|
|
628
927
|
display: flex;
|
|
629
928
|
}
|
|
630
|
-
|
|
631
929
|
.summaryBtn {
|
|
632
930
|
flex: none;
|
|
633
931
|
//width: 95px;
|
|
634
932
|
height: 26px;
|
|
635
933
|
padding: 0 8px;
|
|
636
|
-
background:
|
|
934
|
+
background: @background-color-light;
|
|
637
935
|
display: flex;
|
|
638
936
|
align-items: center;
|
|
639
937
|
justify-content: center;
|
|
640
938
|
box-sizing: border-box;
|
|
641
|
-
border: 1px solid
|
|
939
|
+
border: 1px solid @border-color-copy;
|
|
642
940
|
border-radius: 15px;
|
|
643
941
|
cursor: pointer;
|
|
644
|
-
color:
|
|
942
|
+
color: @font-primary-accent-color;
|
|
645
943
|
margin-right: 10px;
|
|
646
944
|
font-size: 14px;
|
|
647
945
|
|
|
@@ -652,23 +950,23 @@ export default {
|
|
|
652
950
|
}
|
|
653
951
|
|
|
654
952
|
.summaryActiveBtn {
|
|
655
|
-
background:
|
|
656
|
-
color:
|
|
953
|
+
background: @primary-color !important;
|
|
954
|
+
color: @font-primary-light-color !important;
|
|
657
955
|
}
|
|
658
956
|
|
|
659
957
|
.chat {
|
|
660
958
|
flex: none;
|
|
661
959
|
height: 26px;
|
|
662
960
|
padding: 0 8px;
|
|
663
|
-
background:
|
|
961
|
+
background: @background-color-light;
|
|
664
962
|
display: flex;
|
|
665
963
|
align-items: center;
|
|
666
964
|
justify-content: center;
|
|
667
965
|
box-sizing: border-box;
|
|
668
|
-
border: 1px solid
|
|
966
|
+
border: 1px solid @border-color-copy;
|
|
669
967
|
border-radius: 15px 0px 15px 15px;
|
|
670
968
|
cursor: pointer;
|
|
671
|
-
color:
|
|
969
|
+
color: @font-primary-accent-color;
|
|
672
970
|
margin-right: 10px;
|
|
673
971
|
font-size: 14px;
|
|
674
972
|
|
|
@@ -680,8 +978,8 @@ export default {
|
|
|
680
978
|
}
|
|
681
979
|
|
|
682
980
|
.chat_active {
|
|
683
|
-
background:
|
|
684
|
-
color:
|
|
981
|
+
background: @primary-color !important;
|
|
982
|
+
color: @font-primary-light-color !important;
|
|
685
983
|
}
|
|
686
984
|
}
|
|
687
985
|
|
|
@@ -694,13 +992,27 @@ export default {
|
|
|
694
992
|
justify-content: space-between;
|
|
695
993
|
line-height: 26px;
|
|
696
994
|
}
|
|
995
|
+
.title_left {
|
|
996
|
+
white-space: nowrap; /* 确保文本不会换行 */
|
|
997
|
+
overflow: hidden; /* 隐藏超出容器的文本 */
|
|
998
|
+
text-overflow: ellipsis; /* 当文本超出容器时显示省略号 */
|
|
999
|
+
margin-right: 8px;
|
|
1000
|
+
text-align: left;
|
|
1001
|
+
}
|
|
1002
|
+
.top-header{
|
|
1003
|
+
display: flex;
|
|
1004
|
+
align-items: center;
|
|
1005
|
+
justify-content: flex-end;
|
|
1006
|
+
margin-bottom: 6px;
|
|
1007
|
+
}
|
|
697
1008
|
.header_floder {
|
|
698
1009
|
display: flex;
|
|
699
1010
|
align-items: center;
|
|
700
1011
|
line-height: 26px;
|
|
1012
|
+
text-align: left;
|
|
701
1013
|
i {
|
|
702
1014
|
margin: 0 5px;
|
|
703
|
-
color:
|
|
1015
|
+
color: @font-primary-accent-color;
|
|
704
1016
|
}
|
|
705
1017
|
}
|
|
706
1018
|
.header_top {
|
|
@@ -711,7 +1023,9 @@ export default {
|
|
|
711
1023
|
}
|
|
712
1024
|
}
|
|
713
1025
|
}
|
|
714
|
-
|
|
1026
|
+
.has_btn_libang_content_pre{
|
|
1027
|
+
height: calc(100% - 85px) !important;
|
|
1028
|
+
}
|
|
715
1029
|
@media screen and (max-width: 767px) {
|
|
716
1030
|
|
|
717
1031
|
/* 这里是针对移动设备的css样式设置 */
|
|
@@ -722,7 +1036,11 @@ export default {
|
|
|
722
1036
|
#drawer_content_pre {
|
|
723
1037
|
overflow: auto;
|
|
724
1038
|
height: calc(100% - 50px);
|
|
725
|
-
background:
|
|
1039
|
+
background: @background-color-light;
|
|
1040
|
+
background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
|
|
1041
|
+
background-position: center;
|
|
1042
|
+
background-size: 50px;
|
|
1043
|
+
background-repeat: no-repeat;
|
|
726
1044
|
}
|
|
727
1045
|
|
|
728
1046
|
.libang_content_pre {
|
|
@@ -740,7 +1058,7 @@ export default {
|
|
|
740
1058
|
#drawer_content_pre {
|
|
741
1059
|
overflow: auto;
|
|
742
1060
|
height: calc(100% - 50px);
|
|
743
|
-
background:
|
|
1061
|
+
background: @background-color-light;
|
|
744
1062
|
}
|
|
745
1063
|
|
|
746
1064
|
.libang_content_pre {
|
|
@@ -768,7 +1086,7 @@ export default {
|
|
|
768
1086
|
#drawer_content_pre {
|
|
769
1087
|
overflow: auto;
|
|
770
1088
|
height: calc(100% - 50px);
|
|
771
|
-
background:
|
|
1089
|
+
background: @background-color-light;
|
|
772
1090
|
}
|
|
773
1091
|
|
|
774
1092
|
.libang_content_pre {
|
|
@@ -788,4 +1106,4 @@ export default {
|
|
|
788
1106
|
top: 74px !important;
|
|
789
1107
|
}
|
|
790
1108
|
}
|
|
791
|
-
</style>
|
|
1109
|
+
</style>
|