From 6af68085ff6615e1ec3a5dd18c761250800d6fca Mon Sep 17 00:00:00 2001 From: LiuHao Date: Tue, 6 Jun 2023 22:23:43 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=20=E5=8E=BB=E9=99=A4ele=E7=9A=84=E5=BC=95?= =?UTF-8?q?=E5=85=A5=E4=BB=A5=E5=8F=8Avue=E7=9A=84=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Pagination/index.vue | 53 +-- src/views/demo/demo/index.vue | 22 +- src/views/demo/tree/index.vue | 18 +- src/views/error/401.vue | 1 - src/views/login.vue | 3 +- src/views/monitor/cache/index.vue | 1 - src/views/monitor/logininfor/index.vue | 14 +- src/views/monitor/online/index.vue | 39 ++- src/views/monitor/operlog/index.vue | 142 ++++---- src/views/register.vue | 3 +- src/views/system/config/index.vue | 146 +++++---- src/views/system/dept/index.vue | 46 +-- src/views/system/dict/data.vue | 16 +- src/views/system/dict/index.vue | 12 +- src/views/system/menu/index.vue | 20 +- src/views/system/notice/index.vue | 16 +- src/views/system/oss/config.vue | 12 +- src/views/system/oss/index.vue | 10 +- src/views/system/post/index.vue | 15 +- src/views/system/role/authUser.vue | 20 +- src/views/system/role/index.vue | 94 +++--- src/views/system/role/selectUser.vue | 11 +- src/views/system/tenant/index.vue | 18 +- src/views/system/tenantPackage/index.vue | 321 ++++++++++--------- src/views/system/user/authRole.vue | 78 ++--- src/views/system/user/index.vue | 57 ++-- src/views/system/user/profile/index.vue | 2 +- src/views/system/user/profile/resetPwd.vue | 56 ++-- src/views/system/user/profile/userAvatar.vue | 120 +++---- src/views/system/user/profile/userInfo.vue | 46 +-- src/views/tool/gen/basicInfoForm.vue | 9 +- src/views/tool/gen/editTable.vue | 9 +- src/views/tool/gen/genInfoForm.vue | 14 +- src/views/tool/gen/importTable.vue | 21 +- src/views/tool/gen/index.vue | 12 +- 35 files changed, 704 insertions(+), 773 deletions(-) diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index c3eb9b2..df73ceb 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -22,52 +22,23 @@ export default { diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue index 51665e1..70a2bd7 100644 --- a/src/views/monitor/operlog/index.vue +++ b/src/views/monitor/operlog/index.vue @@ -134,7 +134,7 @@ {{ form.method }} - {{form.operParam}} + {{ form.operParam }} {{ form.jsonResult }} @@ -167,12 +167,10 @@ diff --git a/src/views/register.vue b/src/views/register.vue index b80ce5d..5ff6abd 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -58,7 +58,6 @@ diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 4e7750d..7daac8b 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -132,9 +132,7 @@ diff --git a/src/views/system/user/authRole.vue b/src/views/system/user/authRole.vue index 0e8eba2..e55a8d8 100644 --- a/src/views/system/user/authRole.vue +++ b/src/views/system/user/authRole.vue @@ -55,11 +55,10 @@ diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 66de09d..7fd53cb 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -297,30 +297,19 @@ diff --git a/src/views/system/user/profile/userAvatar.vue b/src/views/system/user/profile/userAvatar.vue index 0af8b28..0796765 100644 --- a/src/views/system/user/profile/userAvatar.vue +++ b/src/views/system/user/profile/userAvatar.vue @@ -29,7 +29,9 @@ 选择 - + + + @@ -58,18 +60,17 @@ import "vue-cropper/dist/index.css"; import { VueCropper } from "vue-cropper"; import { uploadAvatar } from "@/api/system/user"; import useUserStore from "@/store/modules/user"; -import { ComponentInternalInstance } from "vue"; interface Options { - img: string | ArrayBuffer | null // 裁剪图片的地址 - autoCrop: boolean // 是否默认生成截图框 - autoCropWidth: number // 默认生成截图框宽度 - autoCropHeight: number // 默认生成截图框高度 - fixedBox: boolean // 固定截图框大小 不允许改变 - fileName: string - previews: any // 预览数据 - outputType: string - visible: boolean + img: string | ArrayBuffer | null; // 裁剪图片的地址 + autoCrop: boolean; // 是否默认生成截图框 + autoCropWidth: number; // 默认生成截图框宽度 + autoCropHeight: number; // 默认生成截图框高度 + fixedBox: boolean; // 固定截图框大小 不允许改变 + fileName: string; + previews: any; // 预览数据 + outputType: string; + visible: boolean; } @@ -83,75 +84,76 @@ const title = ref("修改头像"); const cropper = ref({}); //图片裁剪数据 const options = reactive({ - img: userStore.avatar, - autoCrop: true, - autoCropWidth: 200, - autoCropHeight: 200, - fixedBox: true, - outputType: "png", - fileName: '', - previews: {}, - visible: false + img: userStore.avatar, + autoCrop: true, + autoCropWidth: 200, + autoCropHeight: 200, + fixedBox: true, + outputType: "png", + fileName: "", + previews: {}, + visible: false }); /** 编辑头像 */ const editCropper = () => { - open.value = true; -} + open.value = true; +}; /** 打开弹出层结束时的回调 */ const modalOpened = () => { - visible.value = true; -} + visible.value = true; +}; /** 覆盖默认上传行为 */ -const requestUpload = (): any => {} +const requestUpload = (): any => { +}; /** 向左旋转 */ const rotateLeft = () => { - cropper.value.rotateLeft(); -} + cropper.value.rotateLeft(); +}; /** 向右旋转 */ const rotateRight = () => { - cropper.value.rotateRight(); -} + cropper.value.rotateRight(); +}; /** 图片缩放 */ const changeScale = (num: number) => { - num = num || 1; - cropper.value.changeScale(num); -} + num = num || 1; + cropper.value.changeScale(num); +}; /** 上传预处理 */ const beforeUpload = (file: any) => { - if (file.type.indexOf("image/") == -1) { - proxy?.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"); - } else { - const reader = new FileReader(); - reader.readAsDataURL(file); - reader.onload = () => { - options.img = reader.result; - options.fileName = file.name; - }; - } -} + if (file.type.indexOf("image/") == -1) { + proxy?.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"); + } else { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => { + options.img = reader.result; + options.fileName = file.name; + }; + } +}; /** 上传图片 */ const uploadImg = async () => { - cropper.value.getCropBlob(async (data: any) => { - let formData = new FormData(); - formData.append("avatarfile", data, options.fileName); - const res = await uploadAvatar(formData); - open.value = false; - options.img = res.data.imgUrl; - userStore.avatar = options.img as string; - proxy?.$modal.msgSuccess("修改成功"); - visible.value = false; - }); -} + cropper.value.getCropBlob(async (data: any) => { + let formData = new FormData(); + formData.append("avatarfile", data, options.fileName); + const res = await uploadAvatar(formData); + open.value = false; + options.img = res.data.imgUrl; + userStore.avatar = options.img as string + proxy?.$modal.msgSuccess("修改成功"); + visible.value = false; + }); +}; /** 实时预览 */ const realTime = (data: any) => { - options.previews = data; -} + options.previews = data; +}; /** 关闭窗口 */ const closeDialog = () => { - options.img = userStore.avatar; - options.visible = false; -} + options.img = userStore.avatar; + options.visible = false; +};