优化评查详情提示框的提示条件
This commit is contained in:
@@ -9,6 +9,7 @@ import { getDocumentTypes } from "~/api/document-types/document-types";
|
||||
import { FileTag } from "~/components/ui/FileTag";
|
||||
import { toastService } from "~/components/ui/Toast";
|
||||
import { Document, Page , pdfjs } from "react-pdf";
|
||||
import { DOCUMENT_URL } from "~/api/client";
|
||||
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = '/pdf.worker.js';
|
||||
|
||||
@@ -302,7 +303,7 @@ export default function DocumentEdit() {
|
||||
return (
|
||||
<div className="preview-content relative overflow-y-auto max-h-[1000px]">
|
||||
<Document
|
||||
file={'http://172.18.0.100:9000/docauditai/'+document.path}
|
||||
file={DOCUMENT_URL + document.path}
|
||||
onLoadSuccess={onDocumentLoadSuccess}
|
||||
onLoadError={(error) => {
|
||||
console.error("PDF加载错误:", error);
|
||||
@@ -394,8 +395,7 @@ export default function DocumentEdit() {
|
||||
|
||||
// 在新窗口打开文档预览
|
||||
const openPreview = () => {
|
||||
const urlBefore = 'http://172.18.0.100:9000/docauditai/'
|
||||
const previewUrl = `${urlBefore}${document.path}`;
|
||||
const previewUrl = `${DOCUMENT_URL}${document.path}`;
|
||||
window.open(previewUrl, '_blank');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user