|
|
@@ -355,6 +355,12 @@
|
|
|
</div>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
+ <a-modal title=" " v-model:visible="fileVisible" :footer="false" fullscreen>
|
|
|
+ <!-- <docx previewSrc="http://192.168.20.116:1080/v1/document/get/405c3efa4d8c11ef97560242ac120006"></docx>-->
|
|
|
+ <docx v-if="documenttype == 'docx'" :previewSrc="previewSrc"></docx>
|
|
|
+ <excel v-if="documenttype == 'excel'" :previewSrc="previewSrc"></excel>
|
|
|
+ <txtPdf v-if="documenttype == 'txtPdf'" :previewSrc="previewSrc"></txtPdf>
|
|
|
+ </a-modal>
|
|
|
<a-modal
|
|
|
v-model:visible="visible"
|
|
|
title="修改名称"
|
|
|
@@ -383,7 +389,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
- import { useAppStore, useUserStore } from '@/store';
|
|
|
+import { useAppStore, userModelState, useUserStore } from "@/store";
|
|
|
import {
|
|
|
computed,
|
|
|
nextTick,
|
|
|
@@ -413,17 +419,20 @@
|
|
|
sessionListApi,
|
|
|
uploadWithoutKb,
|
|
|
} from '@/api/session';
|
|
|
- import { getAuthorization } from '@/utils/auth';
|
|
|
- import { queryCanvasList } from '@/api/Agent';
|
|
|
- import { getAgentSessionDetailsApi } from '@/api/agentSession';
|
|
|
- import useClipboard from 'vue-clipboard3';
|
|
|
- import pdfImg1 from '@/assets/session/PDF.png';
|
|
|
- import pdfImg2 from '@/assets/session/wps-write.png';
|
|
|
- import pdfImg3 from '@/assets/session/execl.png';
|
|
|
- import pdfImg4 from '@/assets/session/icon-txt.png';
|
|
|
- import pdfImg5 from '@/assets/session/txt.png';
|
|
|
- import tipImage from '@/assets/session/tip.png';
|
|
|
- import { number } from "@intlify/core-base";
|
|
|
+import { getAuthorization } from "@/utils/auth";
|
|
|
+import { queryCanvasList } from "@/api/Agent";
|
|
|
+import { getAgentSessionDetailsApi } from "@/api/agentSession";
|
|
|
+import useClipboard from "vue-clipboard3";
|
|
|
+import pdfImg1 from "@/assets/session/PDF.png";
|
|
|
+import pdfImg2 from "@/assets/session/wps-write.png";
|
|
|
+import pdfImg3 from "@/assets/session/execl.png";
|
|
|
+import pdfImg4 from "@/assets/session/icon-txt.png";
|
|
|
+import pdfImg5 from "@/assets/session/txt.png";
|
|
|
+import tipImage from "@/assets/session/tip.png";
|
|
|
+
|
|
|
+import docx from "@/views/dmx/knowledgeLib/components/docx.vue";
|
|
|
+import excel from "@/views/dmx/knowledgeLib/components/excel.vue";
|
|
|
+import txtPdf from "@/views/dmx/knowledgeLib/components/txtPdf.vue";
|
|
|
|
|
|
// const url = ref('../../assets/session/PDF.png');
|
|
|
|
|
|
@@ -467,7 +476,14 @@
|
|
|
const fileInput = ref(null);
|
|
|
const chatDataMeg = reactive({});
|
|
|
const visible = ref(false);
|
|
|
+ const fileVisible = ref(false);
|
|
|
let toStop = false;
|
|
|
+ let documenttype = ref('docx');
|
|
|
+ let previewSrc = ref('');
|
|
|
+
|
|
|
+
|
|
|
+const modelStore = userModelState();
|
|
|
+ const httpUrl = modelStore.hrefUrl;
|
|
|
|
|
|
const rules = {
|
|
|
name: [
|
|
|
@@ -540,13 +556,10 @@
|
|
|
return maxSimilarityContent;
|
|
|
};
|
|
|
|
|
|
- const clickHref = (item) => {
|
|
|
- // return Message.warning('暂无法查看');
|
|
|
- // window.open(`/api/v1/document/get/${item.doc_id}`, '_blank');
|
|
|
- downloadFile({
|
|
|
- url: `/api/v1/document/get/${item.doc_id}`,
|
|
|
- filename: item.doc_name,
|
|
|
- });
|
|
|
+ const clickHref = async (item) => {
|
|
|
+ documenttype.value = item.doc_name.split('.').pop();
|
|
|
+ previewSrc.value = httpUrl + `/api/v1/document/get/${item.doc_id}`;
|
|
|
+ fileVisible.value = true;
|
|
|
};
|
|
|
|
|
|
const downloadFile = ({
|