装备上传图片大小调整

This commit is contained in:
BianLzhaoMin 2024-12-13 17:25:12 +08:00
parent c9cfa1abab
commit 228eebbb75
2 changed files with 17 additions and 12 deletions

View File

@ -3,6 +3,7 @@ import test from './module/test'
import myInfo from './module/myInfo'
import { mainStore } from 'store/main'
import { el } from 'element-plus/es/locale'
@ -720,15 +721,19 @@ const router = createRouter({
})
const white = ['/qr-code']
// 使页面跳转后滚动条恢复至顶部
router.beforeEach((to, from, next) => {
const store = mainStore()
if (to.meta.isLogin && !to.meta.AuthFlag) {
if (store.token) {
next()
} else {
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`)
if (white.includes(to.path)) {
next()
} else {
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`)
}
}
} else {
next()

View File

@ -753,9 +753,9 @@ const beforeUpload = (file: any) => {
if (file.size / 1024 / 1024 > 2) {
ElMessage({
type: 'error',
message: '上传文件大小不能超过2M!',
message: '上传文件大小不能超过5M!',
})
// this.$message.error({ message: `2M!`,});
// this.$message.error({ message: `5M!`,});
return false
}
}
@ -1468,7 +1468,7 @@ const options = ref<any>([])
<el-row :gutter="20" v-if="!isViewForm">
<el-col :span="24">
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
支持格式.jpg.png 单个文件大小不能超过2M
支持格式.jpg.png 单个文件大小不能超过5M
<div class="tipBox">
*:图片排序为平台展示顺序不得少于1张不得多于6张建议使用图片比例1:1
</div>
@ -1499,7 +1499,7 @@ const options = ref<any>([])
</div>
<UploadComponentNew
v-if="!isViewForm"
:maxSize="2"
:maxSize="5"
:max-limit="6"
width="100px"
height="100px"
@ -1521,7 +1521,7 @@ const options = ref<any>([])
<el-row :gutter="20" v-if="!isViewForm">
<el-col :span="24">
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
支持格式.jpg.png 单个文件大小不能超过2M
支持格式.jpg.png 单个文件大小不能超过5M
<div class="tipBox">
*:图片排序为平台展示顺序不得少于1张不得多于6张建议使用图片比例16:9
</div>
@ -1554,7 +1554,7 @@ const options = ref<any>([])
</div>
<UploadComponentNew
v-if="!isViewForm"
:maxSize="2"
:maxSize="5"
:max-limit="6"
width="100px"
height="100px"
@ -1599,7 +1599,7 @@ const options = ref<any>([])
<el-row :gutter="20" v-if="!isViewForm">
<el-col :span="24">
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
支持格式.jpg.png 单个文件大小不能超过2M
支持格式.jpg.png 单个文件大小不能超过5M
</el-form-item>
</el-col>
</el-row>
@ -1630,7 +1630,7 @@ const options = ref<any>([])
<UploadComponentNew
v-if="!isViewForm"
:actionUrl="uploadUrl"
:maxSize="2"
:maxSize="5"
:max-limit="4"
width="100px"
height="100px"
@ -1652,7 +1652,7 @@ const options = ref<any>([])
<el-row :gutter="20" v-if="!isViewForm">
<el-col :span="24">
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
支持格式.jpg.png 单个文件大小不能超过2M,
支持格式.jpg.png 单个文件大小不能超过5M,
</el-form-item>
</el-col>
</el-row>
@ -1690,7 +1690,7 @@ const options = ref<any>([])
<UploadComponentNew
v-if="!isViewForm"
:actionUrl="uploadUrl"
:maxSize="2"
:maxSize="5"
:max-limit="4"
width="100px"
height="100px"