1、调整合同

2、调整项目
3、调整客商
This commit is contained in:
2026-08-26 15:56:35 +08:00
parent dc5a2235eb
commit 70ebe31103
5 changed files with 183 additions and 66 deletions
+19 -4
View File
@@ -660,8 +660,17 @@
top="4vh"
class="project-apply-form__attachment-viewer-dialog"
>
<pdf-preview
v-if="
attachmentDocumentPreviewVisible &&
attachmentPreviewFile.url &&
attachmentPreviewFile.isPdf
"
:source="attachmentPreviewFile.url"
@error="handleAttachmentPreviewError"
/>
<open-file-viewer
v-if="attachmentDocumentPreviewVisible && attachmentPreviewFile.url"
v-else-if="attachmentDocumentPreviewVisible && attachmentPreviewFile.url"
:file="attachmentPreviewFile.url"
:file-name="attachmentPreviewFile.name"
:mime-type="attachmentPreviewFile.mimeType"
@@ -748,11 +757,11 @@ import { getToken } from '@/utils/auth';
import { downloadFileByUrl, downloadXls } from '@/utils/util';
import { ElImageViewer } from 'element-plus';
import { OpenFileViewer } from '@open-file-viewer/vue';
import PdfPreview from '@/components/pdf-preview/main.vue';
import {
fallbackPlugin,
imagePlugin,
officePlugin,
pdfPlugin,
textPlugin,
} from '@open-file-viewer/core';
import '@open-file-viewer/core/style.css';
@@ -821,7 +830,6 @@ const changeTypeOptions = [
const attachmentViewerPlugins = [
imagePlugin(),
pdfPlugin({ workerSrc: pdfWorkerSrc, useFetchData: true }),
officePlugin({ pdf: { workerSrc: pdfWorkerSrc, useFetchData: true } }),
textPlugin(),
fallbackPlugin(),
@@ -854,6 +862,7 @@ export default {
components: {
ElImageViewer,
OpenFileViewer,
PdfPreview,
},
data() {
const validateAmount = (rule, value, callback) => {
@@ -1982,6 +1991,10 @@ export default {
this.attachmentExtension(row)
);
},
isAttachmentPdf(row) {
const mimeType = String(row.mimeType || row.contentType || '').toLowerCase();
return mimeType.includes('application/pdf') || this.attachmentExtension(row) === 'pdf';
},
previewAttachment(row) {
const url = this.attachmentUrl(row);
if (!url) {
@@ -1999,10 +2012,12 @@ export default {
this.attachmentImagePreviewVisible = true;
return;
}
const isPdf = this.isAttachmentPdf(row);
this.attachmentPreviewFile = {
name: this.attachmentName(row),
url,
mimeType: row.mimeType || row.contentType || '',
mimeType: isPdf ? 'application/pdf' : row.mimeType || row.contentType || '',
isPdf,
};
this.attachmentDocumentPreviewVisible = true;
},