文件大小限制

ywj_dev
anthonywj 2 years ago
parent b4b5460ec9
commit 579ec615cf

@ -318,9 +318,9 @@ export default {
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)

@ -288,9 +288,9 @@ export default {
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)

@ -313,9 +313,9 @@ export default {
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)

@ -35,6 +35,17 @@
<el-table-column label="统一社会信用号" prop="creditNum" width="160"></el-table-column> <el-table-column label="统一社会信用号" prop="creditNum" width="160"></el-table-column>
<el-table-column label="所属地区" prop="area" width="180"></el-table-column> <el-table-column label="所属地区" prop="area" width="180"></el-table-column>
<el-table-column label="详细地址" prop="detailAddr" :show-overflow-tooltip="true" width="180"></el-table-column> <el-table-column label="详细地址" prop="detailAddr" :show-overflow-tooltip="true" width="180"></el-table-column>
<el-table-column label="审核状态" prop="auditStatus" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.auditStatus) | statusFilterType">
{{ checkFlag[scope.row.auditStatus] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="生产企业证书" prop="auditStatus" width="120"> <el-table-column label="生产企业证书" prop="auditStatus" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -61,18 +72,10 @@
<el-tag type="success" v-if="scope.row.productFailCout==0 && scope.row.prouctPassCout>0"> <el-tag type="success" v-if="scope.row.productFailCout==0 && scope.row.prouctPassCout>0">
已全部审核 已全部审核
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核状态" prop="auditStatus" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.auditStatus) | statusFilterType">
{{ checkFlag[scope.row.auditStatus] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -92,6 +95,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination

@ -783,9 +783,9 @@ export default {
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)

@ -675,9 +675,9 @@ export default {
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)

@ -851,9 +851,9 @@ export default {
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)

@ -426,9 +426,9 @@
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)

@ -245,9 +245,9 @@ export default {
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)

@ -651,9 +651,9 @@ export default {
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)

@ -590,9 +590,9 @@ export default {
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)
@ -629,9 +629,9 @@ export default {
return; return;
} }
// //
const isLt = file.size / 1024 / 1024 / 10 <= 1; const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) { if (!isLt) {
this.$message.error("上传文件大小不能超过 10MB"); this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) { if (fileList[i].uid === uid) {
fileList.splice(i, 1) fileList.splice(i, 1)

Loading…
Cancel
Save