提交
This commit is contained in:
1 parent
a5210a6a9e
commit
5fcdb03da1
29 files changed
+584650
-10462
No files matched your search
@@ -257,7 +257,7 @@
|
||||
<el-table-column v-if="isColumnVisible('renewalCount')" label="续签次数" align="center" prop="renewalCount" min-width="100" />
|
||||
<el-table-column v-if="isColumnVisible('attachmentFiles')" label="合同附件" align="center" prop="attachmentFiles" min-width="220">
|
||||
<template #default="scope">
|
||||
<div v-if="getAttachmentCount(scope.row) > 0" class="attachment-list-cell">
|
||||
<div class="attachment-list-cell">
|
||||
<div
|
||||
v-for="(file, index) in getAttachmentList(scope.row)"
|
||||
:key="file.ossId || index"
|
||||
@@ -290,8 +290,14 @@
|
||||
</div>
|
||||
<span class="attachment-category-label">{{ getAttachmentCategoryLabel(file.category) }}</span>
|
||||
</div>
|
||||
<div
|
||||
class="attachment-upload-trigger"
|
||||
title="上传扫描件"
|
||||
@click.stop="handleUpload(scope.row)"
|
||||
>
|
||||
<el-icon><Upload /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<span v-else class="text-muted">-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -783,13 +789,6 @@ const parseListAttachments = (fileStr: string): Array<{ ossId: string; category?
|
||||
.map((ossId) => ({ ossId, category: 'other' }));
|
||||
};
|
||||
|
||||
/** 获取附件数量 */
|
||||
const getAttachmentCount = (row: ContractVO): number => {
|
||||
if (!row.attachmentFiles) return 0;
|
||||
const attachments = parseListAttachments(row.attachmentFiles);
|
||||
return attachments.length;
|
||||
};
|
||||
|
||||
// 附件信息缓存(ossId -> fileInfo)
|
||||
const attachmentInfoCache = ref<Map<string, { name: string; url?: string }>>(new Map());
|
||||
|
||||
@@ -1464,6 +1463,32 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-upload-trigger {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
margin-top: 11px;
|
||||
border: 1px dashed #a7f3d0;
|
||||
border-radius: 4px;
|
||||
background: var(--mint-primary-bg, #ecfdf5);
|
||||
color: var(--mint-primary-dark, #059669);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
|
||||
.el-icon {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-color: var(--mint-primary, #10b981);
|
||||
background: #d1fae5;
|
||||
color: var(--mint-primary-dark, #059669);
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-category-label {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
Reference in new issue
Block a user