From 7f15f0e15aab3de0a5b8881ff7b06233dbfb7f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 15 May 2025 14:52:31 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E6=89=A7?= =?UTF-8?q?=E8=A1=8Ceslint:fix=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/dept/index.ts | 2 +- src/api/system/user/index.ts | 2 +- src/components/Breadcrumb/index.vue | 2 +- src/components/Editor/index.vue | 6 +- src/components/FileUpload/index.vue | 2 +- src/components/ImagePreview/index.vue | 6 +- src/components/ImageUpload/index.vue | 4 +- src/components/TopNav/index.vue | 8 +- src/layout/components/AppMain.vue | 10 +-- src/layout/components/IframeToggle/index.vue | 2 +- src/layout/components/Navbar.vue | 2 +- src/layout/components/Sidebar/SidebarItem.vue | 2 +- .../components/SocialCallback/index.vue | 4 +- src/layout/components/TopBar/search.vue | 2 +- src/permission.ts | 4 +- src/store/index.ts | 2 +- src/store/modules/permission.ts | 4 +- src/store/modules/settings.ts | 1 - src/types/module.d.ts | 1 - src/utils/ruoyi.ts | 4 +- src/views/error/401.vue | 2 +- src/views/error/404.vue | 2 +- src/views/register.vue | 1 - src/views/system/client/index.vue | 2 +- src/views/system/oss/config.vue | 10 +-- src/views/system/oss/index.vue | 8 +- src/views/system/role/index.vue | 18 ++-- src/views/system/tenant/index.vue | 4 +- src/views/system/tenantPackage/index.vue | 10 +-- src/views/system/user/authRole.vue | 2 +- src/views/system/user/index.vue | 2 +- src/views/system/user/profile/userAvatar.vue | 2 +- src/views/tool/gen/index.vue | 4 +- src/views/workflow/category/index.vue | 82 +++++++++---------- src/views/workflow/leave/index.vue | 2 +- .../workflow/processDefinition/design.vue | 6 +- .../workflow/processDefinition/index.vue | 8 +- src/views/workflow/processInstance/index.vue | 4 +- src/views/workflow/task/myDocument.vue | 2 +- 39 files changed, 117 insertions(+), 124 deletions(-) diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index f16cb2c..6177506 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import {DeptForm, DeptQuery, DeptTreeVO, DeptVO} from './types'; +import { DeptForm, DeptQuery, DeptTreeVO, DeptVO } from './types'; // 查询部门列表 export const listDept = (query?: DeptQuery) => { diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 0867c48..a61ad14 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -1,4 +1,4 @@ -import {DeptTreeVO, DeptVO} from './../dept/types'; +import { DeptTreeVO, DeptVO } from './../dept/types'; import { RoleVO } from '@/api/system/role/types'; import request from '@/utils/request'; import { AxiosPromise } from 'axios'; diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index fd91abc..a9cdef4 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -44,7 +44,7 @@ const findPathNum = (str, char = '/') => { return str.split(char).length - 1; }; const getMatched = (pathList, routeList, matched) => { - let data = routeList.find((item) => item.path == pathList[0] || (item.name += '').toLowerCase() == pathList[0]); + const data = routeList.find((item) => item.path == pathList[0] || (item.name += '').toLowerCase() == pathList[0]); if (data) { matched.push(data); if (data.children && pathList.length) { diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index ba70fbb..67394aa 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -95,7 +95,7 @@ const options = ref({ }); const styles = computed(() => { - let style: any = {}; + const style: any = {}; if (props.minHeight) { style.minHeight = `${props.minHeight}px`; } @@ -121,9 +121,9 @@ const handleUploadSuccess = (res: any) => { // 如果上传成功 if (res.code === 200) { // 获取富文本实例 - let quill = toRaw(quillEditorRef.value).getQuill(); + const quill = toRaw(quillEditorRef.value).getQuill(); // 获取光标位置 - let length = quill.selection.savedRange.index; + const length = quill.selection.savedRange.index; // 插入图片,res为服务器返回的图片链接地址 quill.insertEmbed(length, 'image', res.data.url); // 调整光标到最后 diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 7256585..1767b1b 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -176,7 +176,7 @@ const handleUploadSuccess = (res: any, file: UploadFile) => { // 删除文件 const handleDelete = (index: number) => { - let ossId = fileList.value[index].ossId; + const ossId = fileList.value[index].ossId; delOss(ossId); fileList.value.splice(index, 1); emit('update:modelValue', listToString(fileList.value)); diff --git a/src/components/ImagePreview/index.vue b/src/components/ImagePreview/index.vue index 98e6479..afe02c7 100644 --- a/src/components/ImagePreview/index.vue +++ b/src/components/ImagePreview/index.vue @@ -27,7 +27,7 @@ const realSrc = computed(() => { if (!props.src) { return; } - let real_src = props.src.split(',')[0]; + const real_src = props.src.split(',')[0]; return real_src; }); @@ -35,8 +35,8 @@ const realSrcList = computed(() => { if (!props.src) { return []; } - let real_src_list = props.src.split(','); - let srcList: string[] = []; + const real_src_list = props.src.split(','); + const srcList: string[] = []; real_src_list.forEach((item: string) => { if (item.trim() === '') { return; diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 2e53dcb..f81e4bc 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -189,7 +189,7 @@ const handleUploadSuccess = (res: any, file: UploadFile) => { const handleDelete = (file: UploadFile): boolean => { const findex = fileList.value.map((f) => f.name).indexOf(file.name); if (findex > -1 && uploadList.value.length === number.value) { - let ossId = fileList.value[findex].ossId; + const ossId = fileList.value[findex].ossId; delOss(ossId); fileList.value.splice(findex, 1); emit('update:modelValue', listToString(fileList.value)); @@ -225,7 +225,7 @@ const handlePictureCardPreview = (file: any) => { const listToString = (list: any[], separator?: string) => { let strs = ''; separator = separator || ','; - for (let i in list) { + for (const i in list) { if (undefined !== list[i].ossId && list[i].url.indexOf('blob:') !== 0) { strs += list[i].ossId + separator; } diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index 75a9322..a7345fe 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -47,7 +47,7 @@ const routers = computed(() => permissionStore.getTopbarRoutes()); // 顶部显示菜单 const topMenus = computed(() => { - let topMenus: RouteRecordRaw[] = []; + const topMenus: RouteRecordRaw[] = []; routers.value.map((menu) => { if (menu.hidden !== true) { // 兼容顶部栏一级菜单内部跳转 @@ -63,7 +63,7 @@ const topMenus = computed(() => { // 设置子路由 const childrenMenus = computed(() => { - let childrenMenus: RouteRecordRaw[] = []; + const childrenMenus: RouteRecordRaw[] = []; routers.value.map((router) => { router.children?.forEach((item) => { if (item.parentPath === undefined) { @@ -118,7 +118,7 @@ const handleSelect = (key: string) => { // 没有子路由路径内部打开 const routeMenu = childrenMenus.value.find((item) => item.path === key); if (routeMenu && routeMenu.query) { - let query = JSON.parse(routeMenu.query); + const query = JSON.parse(routeMenu.query); router.push({ path: key, query: query }); } else { router.push({ path: key }); @@ -132,7 +132,7 @@ const handleSelect = (key: string) => { }; const activeRoutes = (key: string) => { - let routes: RouteRecordRaw[] = []; + const routes: RouteRecordRaw[] = []; if (childrenMenus.value && childrenMenus.value.length > 0) { childrenMenus.value.map((item) => { if (key == item.parentPath || (key == 'index' && '' == item.path)) { diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 8a55509..85e5324 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -40,16 +40,16 @@ watch( ); onMounted(() => { - addIframe() -}) + addIframe(); +}); watchEffect(() => { - addIframe() -}) + addIframe(); +}); function addIframe() { if (route.meta.link) { - useTagsViewStore().addIframeView(route) + useTagsViewStore().addIframeView(route); } } diff --git a/src/layout/components/IframeToggle/index.vue b/src/layout/components/IframeToggle/index.vue index e1b93b0..62a834b 100644 --- a/src/layout/components/IframeToggle/index.vue +++ b/src/layout/components/IframeToggle/index.vue @@ -18,7 +18,7 @@ const tagsViewStore = useTagsViewStore(); function iframeUrl(url: string | undefined, query: any) { if (Object.keys(query).length > 0) { - let params = Object.keys(query) + const params = Object.keys(query) .map((key) => key + '=' + query[key]) .join('&'); return url + '?' + params; diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index af63dbf..efb1ae3 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -98,7 +98,7 @@ import { dynamicClear, dynamicTenant } from '@/api/system/tenant'; import { TenantVO } from '@/api/types'; import notice from './notice/index.vue'; import router from '@/router'; -import {ElMessageBoxOptions} from "element-plus/es/components/message-box/src/message-box.type"; +import { ElMessageBoxOptions } from 'element-plus/es/components/message-box/src/message-box.type'; const appStore = useAppStore(); const userStore = useUserStore(); diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 5e82ea3..a11159b 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -86,7 +86,7 @@ const resolvePath = (routePath: string, routeQuery?: string): any => { return props.basePath; } if (routeQuery) { - let query = JSON.parse(routeQuery); + const query = JSON.parse(routeQuery); return { path: getNormalPath(props.basePath + '/' + routePath), query: query }; } return getNormalPath(props.basePath + '/' + routePath); diff --git a/src/layout/components/SocialCallback/index.vue b/src/layout/components/SocialCallback/index.vue index 746de20..a5cd768 100644 --- a/src/layout/components/SocialCallback/index.vue +++ b/src/layout/components/SocialCallback/index.vue @@ -63,9 +63,9 @@ const loginByCode = async (data: LoginData) => { const init = async () => { // 如果域名不相等 则重定向处理 - let host = window.location.host; + const host = window.location.host; if (domain !== host) { - let urlFull = new URL(window.location.href); + const urlFull = new URL(window.location.href); urlFull.host = domain; window.location.href = urlFull.toString(); return; diff --git a/src/layout/components/TopBar/search.vue b/src/layout/components/TopBar/search.vue index c50bb3c..9cb36db 100644 --- a/src/layout/components/TopBar/search.vue +++ b/src/layout/components/TopBar/search.vue @@ -67,7 +67,7 @@ const closeSearch = () => { }; // 菜单搜索数据过滤 const menuSearch = (queryString: string, cb: (options: any[]) => void) => { - let options = state.menuList.filter((item) => { + const options = state.menuList.filter((item) => { return item.title.indexOf(queryString) > -1; }); cb(options); diff --git a/src/permission.ts b/src/permission.ts index 353adb5..fb60b07 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -14,8 +14,8 @@ NProgress.configure({ showSpinner: false }); const whiteList = ['/login', '/register', '/social-callback', '/register*', '/register/*']; const isWhiteList = (path: string) => { - return whiteList.some(pattern => isPathMatch(pattern, path)) -} + return whiteList.some((pattern) => isPathMatch(pattern, path)); +}; router.beforeEach(async (to, from, next) => { NProgress.start(); diff --git a/src/store/index.ts b/src/store/index.ts index e32948c..02ae96a 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,4 +1,4 @@ -import { createPinia } from "pinia"; +import { createPinia } from 'pinia'; const store = createPinia(); diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index 4dacdfe..1169cc8 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -99,14 +99,14 @@ export const usePermissionStore = defineStore('permission', () => { }; const filterChildren = (childrenMap: RouteRecordRaw[], lastRouter?: RouteRecordRaw): RouteRecordRaw[] => { let children: RouteRecordRaw[] = []; - childrenMap.forEach(el => { + childrenMap.forEach((el) => { el.path = lastRouter ? lastRouter.path + '/' + el.path : el.path; if (el.children && el.children.length && el.component?.toString() === 'ParentView') { children = children.concat(filterChildren(el.children, el)); } else { children.push(el); } - }) + }); return children; }; return { diff --git a/src/store/modules/settings.ts b/src/store/modules/settings.ts index c26024c..bcd237a 100644 --- a/src/store/modules/settings.ts +++ b/src/store/modules/settings.ts @@ -5,7 +5,6 @@ import { useStorage } from '@vueuse/core'; import { ref } from 'vue'; export const useSettingsStore = defineStore('setting', () => { - // @ts-ignore const storageSetting = useStorage('layout-setting', { topNav: defaultSettings.topNav, tagsView: defaultSettings.tagsView, diff --git a/src/types/module.d.ts b/src/types/module.d.ts index 2fc273a..3b2f378 100644 --- a/src/types/module.d.ts +++ b/src/types/module.d.ts @@ -48,4 +48,3 @@ export type ObjKeysToUnion = T extends object [K in keyof T]: ObjKeysToUnion; }[keyof T] : P; - diff --git a/src/utils/ruoyi.ts b/src/utils/ruoyi.ts index 79f5547..8cb9f97 100644 --- a/src/utils/ruoyi.ts +++ b/src/utils/ruoyi.ts @@ -178,11 +178,11 @@ export const handleTree = (data: any[], id?: string, parentId?: string, child for (const d of data) { const parentId = d[config.parentId]; - const parentObj = childrenListMap[parentId] + const parentObj = childrenListMap[parentId]; if (!parentObj) { tree.push(d); } else { - parentObj[config.childrenList].push(d) + parentObj[config.childrenList].push(d); } } return tree; diff --git a/src/views/error/401.vue b/src/views/error/401.vue index 968550c..f90f50b 100644 --- a/src/views/error/401.vue +++ b/src/views/error/401.vue @@ -22,7 +22,7 @@ diff --git a/src/views/register.vue b/src/views/register.vue index 447443c..8b3d6dc 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -203,7 +203,6 @@ onMounted(() => { line-height: 0; color: #7483a3; } - } .register-form { diff --git a/src/views/system/client/index.vue b/src/views/system/client/index.vue index 1f14b4c..81739df 100644 --- a/src/views/system/client/index.vue +++ b/src/views/system/client/index.vue @@ -300,7 +300,7 @@ const handleExport = () => { /** 状态修改 */ const handleStatusChange = async (row: ClientVO) => { - let text = row.status === '0' ? '启用' : '停用'; + const text = row.status === '0' ? '启用' : '停用'; try { await proxy?.$modal.confirm('确认要"' + text + '"吗?'); await changeStatus(row.clientId, row.status); diff --git a/src/views/system/oss/config.vue b/src/views/system/oss/config.vue index db9d68f..5d73bc8 100644 --- a/src/views/system/oss/config.vue +++ b/src/views/system/oss/config.vue @@ -87,16 +87,16 @@ - + - + @@ -316,7 +316,7 @@ const submitForm = () => { }; /** 状态修改 */ const handleStatusChange = async (row: OssConfigVO) => { - let text = row.status === '0' ? '启用' : '停用'; + const text = row.status === '0' ? '启用' : '停用'; try { await proxy?.$modal.confirm('确认要"' + text + '""' + row.configKey + '"配置吗?'); await changeOssConfigStatus(row.ossConfigId, row.status, row.configKey); diff --git a/src/views/system/oss/index.vue b/src/views/system/oss/index.vue index f76dbab..1c1d608 100644 --- a/src/views/system/oss/index.vue +++ b/src/views/system/oss/index.vue @@ -255,9 +255,9 @@ const handleHeaderCLick = (column: any) => { handleOrderChange(column.property, column.multiOrder); }; const handleOrderChange = (prop: string, order: string) => { - let orderByArr = queryParams.value.orderByColumn ? queryParams.value.orderByColumn.split(',') : []; - let isAscArr = queryParams.value.isAsc ? queryParams.value.isAsc.split(',') : []; - let propIndex = orderByArr.indexOf(prop); + const orderByArr = queryParams.value.orderByColumn ? queryParams.value.orderByColumn.split(',') : []; + const isAscArr = queryParams.value.isAsc ? queryParams.value.isAsc.split(',') : []; + const propIndex = orderByArr.indexOf(prop); if (propIndex !== -1) { if (order) { //排序里已存在 只修改排序 @@ -306,7 +306,7 @@ const handleDownload = (row: OssVO) => { }; /** 预览开关按钮 */ const handlePreviewListResource = async (preview: boolean) => { - let text = preview ? '启用' : '停用'; + const text = preview ? '启用' : '停用'; try { await proxy?.$modal.confirm('确认要"' + text + '""预览列表图片"配置吗?'); await proxy?.updateConfigByKey('sys.oss.previewListResource', preview); diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 9f0ea11..9f1bc89 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -323,7 +323,7 @@ const handleSelectionChange = (selection: RoleVO[]) => { /** 角色状态修改 */ const handleStatusChange = async (row: RoleVO) => { - let text = row.status === '0' ? '启用' : '停用'; + const text = row.status === '0' ? '启用' : '停用'; try { await proxy?.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?'); await changeRoleStatus(row.roleId, row.status); @@ -346,11 +346,11 @@ const getMenuTreeselect = async () => { /** 所有部门节点数据 */ const getDeptAllCheckedKeys = (): any => { // 目前被选中的部门节点 - let checkedKeys = deptRef.value?.getCheckedKeys(); + const checkedKeys = deptRef.value?.getCheckedKeys(); // 半选中的部门节点 - let halfCheckedKeys = deptRef.value?.getHalfCheckedKeys(); + const halfCheckedKeys = deptRef.value?.getHalfCheckedKeys(); if (halfCheckedKeys) { - checkedKeys?.unshift.apply(checkedKeys, halfCheckedKeys); + checkedKeys?.unshift(...halfCheckedKeys); } return checkedKeys; }; @@ -404,14 +404,14 @@ const getRoleDeptTreeSelect = async (roleId: string | number) => { /** 树权限(展开/折叠)*/ const handleCheckedTreeExpand = (value: boolean, type: string) => { if (type == 'menu') { - let treeList = menuOptions.value; + const treeList = menuOptions.value; for (let i = 0; i < treeList.length; i++) { if (menuRef.value) { menuRef.value.store.nodesMap[treeList[i].id].expanded = value; } } } else if (type == 'dept') { - let treeList = deptOptions.value; + const treeList = deptOptions.value; for (let i = 0; i < treeList.length; i++) { if (deptRef.value) { deptRef.value.store.nodesMap[treeList[i].id].expanded = value; @@ -438,11 +438,11 @@ const handleCheckedTreeConnect = (value: any, type: string) => { /** 所有菜单节点数据 */ const getMenuAllCheckedKeys = (): any => { // 目前被选中的菜单节点 - let checkedKeys = menuRef.value?.getCheckedKeys(); + const checkedKeys = menuRef.value?.getCheckedKeys(); // 半选中的菜单节点 - let halfCheckedKeys = menuRef.value?.getHalfCheckedKeys(); + const halfCheckedKeys = menuRef.value?.getHalfCheckedKeys(); if (halfCheckedKeys) { - checkedKeys?.unshift.apply(checkedKeys, halfCheckedKeys); + checkedKeys?.unshift(...halfCheckedKeys); } return checkedKeys; }; diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index 1e3ff81..82b2795 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -245,7 +245,7 @@ const getList = async () => { // 租户套餐状态修改 const handleStatusChange = async (row: TenantVO) => { - let text = row.status === '0' ? '启用' : '停用'; + const text = row.status === '0' ? '启用' : '停用'; try { await proxy?.$modal.confirm('确认要"' + text + '""' + row.companyName + '"租户吗?'); await changeTenantStatus(row.id, row.tenantId, row.status); @@ -361,7 +361,7 @@ const handleExport = () => { /**同步租户字典*/ const handleSyncTenantDict = async () => { await proxy?.$modal.confirm('确认要同步所有租户字典吗?'); - let res = await syncTenantDict(); + const res = await syncTenantDict(); proxy?.$modal.msgSuccess(res.msg); }; diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue index 1609b6d..8959da4 100644 --- a/src/views/system/tenantPackage/index.vue +++ b/src/views/system/tenantPackage/index.vue @@ -167,11 +167,11 @@ const getMenuTreeselect = async () => { // 所有菜单节点数据 const getMenuAllCheckedKeys = (): any => { // 目前被选中的菜单节点 - let checkedKeys = menuTreeRef.value?.getCheckedKeys(); + const checkedKeys = menuTreeRef.value?.getCheckedKeys(); // 半选中的菜单节点 - let halfCheckedKeys = menuTreeRef.value?.getHalfCheckedKeys(); + const halfCheckedKeys = menuTreeRef.value?.getHalfCheckedKeys(); if (halfCheckedKeys) { - checkedKeys?.unshift.apply(checkedKeys, halfCheckedKeys); + checkedKeys?.unshift(...halfCheckedKeys); } return checkedKeys; }; @@ -194,7 +194,7 @@ const getList = async () => { // 租户套餐状态修改 const handleStatusChange = async (row: TenantPkgVO) => { - let text = row.status === '0' ? '启用' : '停用'; + const text = row.status === '0' ? '启用' : '停用'; const [err] = await to(proxy?.$modal.confirm('确认要"' + text + '""' + row.packageName + '"套餐吗?') as Promise); if (err) { row.status = row.status === '0' ? '1' : '0'; @@ -241,7 +241,7 @@ const handleSelectionChange = (selection: TenantPkgVO[]) => { // 树权限(展开/折叠) const handleCheckedTreeExpand = (value: CheckboxValueType, type: string) => { if (type == 'menu') { - let treeList = menuOptions.value; + const treeList = menuOptions.value; for (let i = 0; i < treeList.length; i++) { if (menuTreeRef.value) { menuTreeRef.value.store.nodesMap[treeList[i].id].expanded = value as boolean; diff --git a/src/views/system/user/authRole.vue b/src/views/system/user/authRole.vue index ec7bc23..93ca5b7 100644 --- a/src/views/system/user/authRole.vue +++ b/src/views/system/user/authRole.vue @@ -95,7 +95,7 @@ const getRowKey = (row: RoleVO): string => { }; /** 检查角色状态 */ const checkSelectable = (row: RoleVO): boolean => { - return row.status === "0"; + return row.status === '0'; }; /** 关闭按钮 */ const close = () => { diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index fdc5018..7d0e2cd 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -498,7 +498,7 @@ const handleDelete = async (row?: UserVO) => { /** 用户状态修改 */ const handleStatusChange = async (row: UserVO) => { - let text = row.status === '0' ? '启用' : '停用'; + const text = row.status === '0' ? '启用' : '停用'; try { await proxy?.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?'); await api.changeUserStatus(row.userId, row.status); diff --git a/src/views/system/user/profile/userAvatar.vue b/src/views/system/user/profile/userAvatar.vue index a417791..8709289 100644 --- a/src/views/system/user/profile/userAvatar.vue +++ b/src/views/system/user/profile/userAvatar.vue @@ -134,7 +134,7 @@ const beforeUpload = (file: UploadRawFile): any => { /** 上传图片 */ const uploadImg = async () => { cropper.value.getCropBlob(async (data: any) => { - let formData = new FormData(); + const formData = new FormData(); formData.append('avatarfile', data, options.fileName); const res = await uploadAvatar(formData); open.value = false; diff --git a/src/views/tool/gen/index.vue b/src/views/tool/gen/index.vue index b4df31b..451895d 100644 --- a/src/views/tool/gen/index.vue +++ b/src/views/tool/gen/index.vue @@ -113,8 +113,8 @@