diff --git a/client/dist/pdfjs-3.5.141-dist/web/viewer.html b/client/dist/pdfjs-3.5.141-dist/web/viewer.html index e3dcf04..3346d4e 100644 --- a/client/dist/pdfjs-3.5.141-dist/web/viewer.html +++ b/client/dist/pdfjs-3.5.141-dist/web/viewer.html @@ -36,7 +36,7 @@ See https://github.com/adobe-type-tools/cmap-resources - +
@@ -265,11 +265,11 @@ See https://github.com/adobe-type-tools/cmap-resources Open - - diff --git a/client/src/views/informatiomCollect/qualiChange.vue b/client/src/views/informatiomCollect/qualiChange.vue index 96c4738..3d09792 100644 --- a/client/src/views/informatiomCollect/qualiChange.vue +++ b/client/src/views/informatiomCollect/qualiChange.vue @@ -123,6 +123,7 @@ :on-success="handleUpSuccess" :on-remove="handleRemove" :on-preview="handlePreview" + :before-upload="beforeUpload" :headers="upHeaders" :file-list="fileList" :limit="1" @@ -161,7 +162,7 @@ const defaultContent = { scope: "", number: "", cie_path: "", - change_date:"", + change_date: null, change_reason:"" }; @@ -179,7 +180,7 @@ export default { scope: "", number: "", cie_path: "", - change_date:"", + change_date: null, change_reason:"" }, upHeaders: upHeaders(), @@ -345,6 +346,13 @@ export default { this.$refs["Form"].clearValidate(); }); }, + beforeUpload(file) { + const isLt10M = file.size / 1024 / 1024 < 10; + if (!isLt10M) { + this.$message.error("上传文件大小不能超过 10MB!"); + } + return isLt10M; + }, handleDelete(scope) { this.$confirm("确认删除?", "警告", { confirmButtonText: "确认", diff --git a/client/src/views/informatiomCollect/qualificInfo.vue b/client/src/views/informatiomCollect/qualificInfo.vue index aea6c6a..4c1d436 100644 --- a/client/src/views/informatiomCollect/qualificInfo.vue +++ b/client/src/views/informatiomCollect/qualificInfo.vue @@ -125,6 +125,7 @@ :on-success="handleUpSuccess" :on-remove="handleRemove" :on-preview="handlePreview" + :before-upload="beforeUpload" :headers="upHeaders" :file-list="fileList" :limit="1" @@ -146,7 +147,6 @@ import checkPermission from "@/utils/permission"; import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; -import { getDictList, getDictTypeList } from "@/api/dict"; import { getAllQi, getQi, updateQi, createQi, delQi} from "@/api/qualificationInfo"; import { upUrl, upHeaders } from "@/api/file"; import { saveAs } from 'file-saver'; @@ -180,7 +180,7 @@ export default { scope: "", number: "", cie_path: "", - change_date:"" + change_date: null }, upHeaders: upHeaders(), upUrl: upUrl(), @@ -300,7 +300,13 @@ export default { handleUpSuccess(res, file, filelist) { this.Content.cie_path = res.data.path; this.Content.file = res.data.id; - + }, + beforeUpload(file) { + const isLt10M = file.size / 1024 / 1024 < 10; + if (!isLt10M) { + this.$message.error("上传文件大小不能超过 10MB!"); + } + return isLt2M; }, handleRemove(file, filelist) { this.Content.file = null;