From 69e184721c0d038ad5b11083b5ee505c5a0789d6 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Thu, 7 Aug 2025 19:12:48 +0800 Subject: [PATCH] =?UTF-8?q?v1.9=20=E5=91=98=E5=B7=A5=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/owner/addOwner.vue | 4 +- src/components/owner/editOwner.vue | 4 +- src/components/staff/editStaff.vue | 67 +++++++++++++++++------------ src/i18n/commonLang.js | 6 ++- src/views/org/orgList.vue | 2 +- src/views/staff/staffDetailList.vue | 6 +-- 6 files changed, 51 insertions(+), 38 deletions(-) diff --git a/src/components/owner/addOwner.vue b/src/components/owner/addOwner.vue index 7cd58ba38..27fe21014 100644 --- a/src/components/owner/addOwner.vue +++ b/src/components/owner/addOwner.vue @@ -197,10 +197,10 @@ export default { const isLt2M = file.size / 1024 / 1024 < 2 if (!isJPG) { - this.$message.error(this.$t('listOwner.upload.jpgOnly')) + this.$message.error(this.$t('common.jpgOnly')) } if (!isLt2M) { - this.$message.error(this.$t('listOwner.upload.sizeLimit')) + this.$message.error(this.$t('common.sizeLimit')) } return isJPG && isLt2M }, diff --git a/src/components/owner/editOwner.vue b/src/components/owner/editOwner.vue index 787c5f126..85a244e86 100644 --- a/src/components/owner/editOwner.vue +++ b/src/components/owner/editOwner.vue @@ -208,10 +208,10 @@ export default { const isLt2M = file.size / 1024 / 1024 < 2 if (!isJPG) { - this.$message.error(this.$t('listOwner.upload.jpgOnly')) + this.$message.error(this.$t('common.jpgOnly')) } if (!isLt2M) { - this.$message.error(this.$t('listOwner.upload.sizeLimit')) + this.$message.error(this.$t('common.sizeLimit')) } return isJPG && isLt2M }, diff --git a/src/components/staff/editStaff.vue b/src/components/staff/editStaff.vue index 24478000f..0663058bc 100644 --- a/src/components/staff/editStaff.vue +++ b/src/components/staff/editStaff.vue @@ -30,16 +30,13 @@ - -
- -
-
-
- - {{ $t('staff.uploadPhoto') }} - -
+ + + + {{ $t('common.upload') }} + +
@@ -53,6 +50,8 @@ diff --git a/src/i18n/commonLang.js b/src/i18n/commonLang.js index 4fadddf12..1971e741c 100644 --- a/src/i18n/commonLang.js +++ b/src/i18n/commonLang.js @@ -65,7 +65,8 @@ export const messages = { viewDetail:'View Detail', yuan:'yuan', process:'Process', - + jpgOnly:'Only JPG files are allowed', + sizeLimit:'File size must be less than 2MB', } }, zh: { @@ -134,7 +135,8 @@ export const messages = { viewDetail:'查看详情', yuan:'元', process:'处理', - + jpgOnly:'只允许上传JPG文件', + sizeLimit:'文件大小必须小于2MB', } } } \ No newline at end of file diff --git a/src/views/org/orgList.vue b/src/views/org/orgList.vue index 06340e043..07553c58c 100644 --- a/src/views/org/orgList.vue +++ b/src/views/org/orgList.vue @@ -29,7 +29,7 @@ diff --git a/src/views/staff/staffDetailList.vue b/src/views/staff/staffDetailList.vue index ff6055e64..1827cd1a9 100644 --- a/src/views/staff/staffDetailList.vue +++ b/src/views/staff/staffDetailList.vue @@ -12,7 +12,7 @@
- @@ -143,7 +143,7 @@ export default { this.$router.go(-1) }, errorLoadImg() { - this.staffDetailInfo.photo = "/img/noPhoto.jpg" + this.staffDetailInfo.photoUrl = "/img/noPhoto.jpg" }, async loadStaffDetail() { try { @@ -155,7 +155,7 @@ export default { const res = await getStaffDetail(params) if ( res.staffs.length > 0) { Object.assign(this.staffDetailInfo, res.staffs[0]) - this.staffDetailInfo.photo = res.staffs[0].faceUrl + this.staffDetailInfo.photoUrl = res.staffs[0].photoUrl } } catch (error) { this.$message.error(this.$t('staffDetailInfo.fetchError'))