多体系建设信息化条统-前端
祖安之光
2026-02-03 87a051e76ee4b760c48d14972db1a548cfe07562
src/views/build/conpanyFunctionConsult/digitalFileDep/project/projectFileNew/components/dataDialog.vue
@@ -13,18 +13,17 @@
      <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" >
        <el-form-item label="文件:" prop="projectDocuments">
          <el-upload
              accept=".doc,.docx,.pdf,.png,.jpg,.jpeg"
              accept=".doc,.docx,.pdf,.xlsx,.xls,.png,.jpg,.jpeg"
              :action="state.uploadUrl"
              :headers="state.header"
              method="post"
              :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)"
              :on-exceed="showTip"
              v-model:file-list="state.fileList"
              :before-upload="picSize"
              :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
            <el-button type="primary">点击上传</el-button>
            <template #tip>
              <div class="el-upload__tip">支持上传.doc、.docx、.pdf、图片格式文档,尺寸小于5M</div>
              <div class="el-upload__tip">支持上传.doc、.docx、.pdf、.xlsx、.xls、图片格式文档</div>
            </template>
          </el-upload>
        </el-form-item>
@@ -166,10 +165,10 @@
  });
}
const picSize = async (rawFile) => {
  if(rawFile.size / 1024 / 1024 > 5){
  if(rawFile.size / 1024 / 1024 > 30){
    ElMessage({
      type: 'warning',
      message: '文件大小不能超过5M'
      message: '文件大小不能超过30M'
    });
    return false
  }