Browse Source

支持zxjm格式

main
buaixuexideshitongxue 3 weeks ago
parent
commit
fe4e8f1066
  1. 4
      src/components/file/upload.vue
  2. 4
      src/views/report/edit/controlPrice.vue

4
src/components/file/upload.vue

@ -73,13 +73,13 @@ watch(files, () => {
},{immediate:true}); },{immediate:true});
function beforeUpload(file) { function beforeUpload(file) {
const allowExt = ['doc', 'docx', 'pdf', 'xls', 'xlsx'] const allowExt = ['doc', 'docx', 'pdf', 'xls', 'xlsx', 'zjxm']
const name = (file?.name || '').toLowerCase() const name = (file?.name || '').toLowerCase()
const ext = name.includes('.') ? name.split('.').pop() : '' const ext = name.includes('.') ? name.split('.').pop() : ''
if (!allowExt.includes(ext)) { if (!allowExt.includes(ext)) {
feedback.msgWarning( feedback.msgWarning(
'只能上传 Word / PDF / Excel 文件(.doc .docx .pdf .xls .xlsx)' '只能上传 Word / PDF / Excel / ZJXM 文件(.doc .docx .pdf .xls .xlsx .zjxm)'
) )
return false return false
} }

4
src/views/report/edit/controlPrice.vue

@ -1408,7 +1408,7 @@ function hasAuditAttachment() {
<file-upload v-model:files="fileTable.fileData" :uploadDrag="true" ></file-upload> <file-upload v-model:files="fileTable.fileData" :uploadDrag="true" ></file-upload>
</el-col> </el-col>
</el-row> </el-row>
<p style="color: red;">说明附件上传仅支持 上传 Word / PDF / Excel 文件.doc .docx .pdf .xls .xlsx</p> <p style="color: red;">说明附件上传仅支持 上传 Word / PDF / Excel / ZJXM 文件.doc .docx .pdf .xls .xlsx .ZJXM</p>
<footer class="flex end"> <footer class="flex end">
<el-button size="default" :loading="addFileTableLoading" type="primary" @click="addFileSubmit">确认</el-button> <el-button size="default" :loading="addFileTableLoading" type="primary" @click="addFileSubmit">确认</el-button>
<el-button @click="addFileDialog = false" >关闭</el-button> <el-button @click="addFileDialog = false" >关闭</el-button>
@ -1448,7 +1448,7 @@ function hasAuditAttachment() {
<el-dialog v-model="upFileDialog" title="材料上传" destroy-on-close> <el-dialog v-model="upFileDialog" title="材料上传" destroy-on-close>
<file-upload v-model:files="formData.files[activeName][fileIndex].fileData" :uploadDrag="true" ></file-upload> <file-upload v-model:files="formData.files[activeName][fileIndex].fileData" :uploadDrag="true" ></file-upload>
<p style="color: red;">说明附件上传仅支持 上传 Word / PDF / Excel 文件.doc .docx .pdf .xls .xlsx</p> <p style="color: red;">说明附件上传仅支持 上传 Word / PDF / Excel / ZJXM 文件.doc .docx .pdf .xls .xlsx .ZJXM</p>
<footer class="flex end"> <footer class="flex end">
<el-button type="primary" @click="upFileDialog = false" size="large">确认</el-button> <el-button type="primary" @click="upFileDialog = false" size="large">确认</el-button>
<el-button @click="upFileDialog = false" size="large">关闭</el-button> <el-button @click="upFileDialog = false" size="large">关闭</el-button>

Loading…
Cancel
Save