style(attachment): 统一附件上传按钮位置及样式及提示文案格式

- 将站点所有附件上传按钮移至表格下方左侧,与批量下载按钮分开,布局统一
- 统一附件上传按钮旁提示文案格式,改为同一行按钮右侧显示,间距固定30px,文本左对齐
- 统一附件上传支持文件格式说明为“支持pdf、bmp、jpeg、png、jpg、doc、docx、ppt、pptx、xlsx、xls、eml、msg、zip的文件格式,单个文件不超过500M”
- 统一单个附件文件大小限制改为500M,涉及多页面文件修改
- 恢复vehicle-attachment-upload组件showTip属性门控,支持按需隐藏提示
- 修复master-order编辑页附件上传按钮与描述文字排列,改为单行且按钮左侧描述右侧排列
- 优化customer-archive客商材料上传按钮及提示的布局,按钮左、提示右,间距30px,超长文案省略
- 调整部分页面缩进与标签样式,提升视觉一致性
- 修改部分组件及页面的css样式,适配上述布局与样式调整
This commit is contained in:
2026-08-25 18:43:25 +08:00
parent 7c12163966
commit 3cb365253b
16 changed files with 553 additions and 176 deletions
@@ -75,6 +75,9 @@ import pdfWorkerSrc from 'pdfjs-dist/build/pdf.worker.mjs?url';
import { baseUrl } from '@/config/env';
import { getUploadHeaders } from '@/utils/upload';
const UNIFIED_ATTACHMENT_TIP =
'支持pdf、bmp、jpeg、png、jpg、doc、docx、ppt、pptx、xlsx、xls、eml、msg、zip的文件格式,单个文件不超过500M';
const MIME_MAP = {
jpg: 'image/jpeg',
jpeg: 'image/jpeg',
@@ -143,7 +146,7 @@ export default {
},
maxSize: {
type: Number,
default: 0,
default: 500,
},
readonly: {
type: Boolean,
@@ -212,10 +215,7 @@ export default {
return this.acceptedList.join(',');
},
tipText() {
if (this.tip) return this.tip;
const typeText = this.acceptText || '所有类型';
const sizeText = this.maxSize > 0 ? `,单文件不超过 ${this.maxSize}MB` : '';
return `支持上传 ${typeText}${sizeText}`;
return this.tip || UNIFIED_ATTACHMENT_TIP;
},
uploadingCount() {
return this.fileList.filter(file => ['ready', 'uploading'].includes(file.status)).length;
@@ -372,6 +372,27 @@ export default {
<style lang="scss" scoped>
.vehicle-attachment-upload {
width: 100%;
div{
display: flex;
flex-direction: row;
align-items: center;
}
:deep(.el-upload) {
display: flex;
align-items: center;
flex-wrap: nowrap;
}
:deep(.el-upload__tip) {
display: inline-block;
margin: 0 0 0 30px;
color: #909399;
font-size: 13px;
line-height: 1.4;
white-space: normal;
text-align: left;
}
:deep(.el-upload-list__item-name) {
cursor: pointer;