修复小区背景颜色,巡检点顺序一致,投诉处理按钮

This commit is contained in:
Zy
2026-07-16 11:06:26 +08:00
parent 4efb535730
commit 725bdfa3fe
56 changed files with 1034 additions and 468 deletions

View File

@@ -113,6 +113,7 @@
:show-file-list="false"
:on-success="handleAvatarSuccess"
:on-exceed="handleExceed"
:before-upload="handleBeforeUpload"
:on-error="handleError"
:limit="1"
>
@@ -310,7 +311,15 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
const handleError: UploadProps['onError'] = (error: Error) => {
console.log(error);
};
const allowImgSuffix = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'heic'];
/** 检测文件大小和格式 */
const handleBeforeUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) => {
if (!allowImgSuffix.includes(rawFile.name.split('.')[1])) {
ElMessage.error('文件类型错误,请重新上传');
return false;
}
return true;
};
// ! 投诉 ====================================================================================================
// ! 签到 =======================================