diff --git a/.eslintrc.js b/.eslintrc.js index b6b10a6..a1b32e3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,7 +30,7 @@ module.exports = { extendDefaults: true, types: { '{}': false, - 'Function': false + Function: false } } ] diff --git a/.prettierrc.cjs b/.prettierrc.cjs index 2b49e6f..61d2d92 100644 --- a/.prettierrc.cjs +++ b/.prettierrc.cjs @@ -2,45 +2,45 @@ * 代码格式化配置 */ module.exports = { - // 一行最多多少个字符 - printWidth: 150, - // 指定每个缩进级别的空格数 - tabWidth: 2, - // 使用制表符而不是空格缩进行 - useTabs: false, - // 在语句末尾是否需要分号 - semi: true, - // 是否使用单引号 - singleQuote: true, - // 更改引用对象属性的时间 可选值"" - quoteProps: 'as-needed', - // 在JSX中使用单引号而不是双引号 - jsxSingleQuote: false, - // 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"",默认none - trailingComma: 'none', - // 在对象文字中的括号之间打印空格 - bracketSpacing: true, - // jsx 标签的反尖括号需要换行 - jsxBracketSameLine: false, - embeddedLanguageFormatting: 'off', - // 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x - arrowParens: 'always', - // 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码 - rangeStart: 0, - rangeEnd: Infinity, - // 指定要使用的解析器,不需要写文件开头的 @prettier - requirePragma: false, - // 不需要自动在文件开头插入 @prettier - insertPragma: false, - // 使用默认的折行标准 always\never\preserve - proseWrap: 'preserve', - // 指定HTML文件的全局空格敏感度 css\strict\ignore - htmlWhitespaceSensitivity: 'css', - // Vue文件脚本和样式标签缩进 - vueIndentScriptAndStyle: false, - // 在 windows 操作系统中换行符通常是回车 (CR) 加换行分隔符 (LF),也就是回车换行(CRLF), - // 然而在 Linux 和 Unix 中只使用简单的换行分隔符 (LF)。 - // 对应的控制字符为 "\n" (LF) 和 "\r\n"(CRLF)。auto意为保持现有的行尾 - // 换行符使用 lf 结尾是 可选值"" - endOfLine: 'auto' + // 一行最多多少个字符 + printWidth: 150, + // 指定每个缩进级别的空格数 + tabWidth: 2, + // 使用制表符而不是空格缩进行 + useTabs: false, + // 在语句末尾是否需要分号 + semi: true, + // 是否使用单引号 + singleQuote: true, + // 更改引用对象属性的时间 可选值"" + quoteProps: 'as-needed', + // 在JSX中使用单引号而不是双引号 + jsxSingleQuote: false, + // 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"",默认none + trailingComma: 'none', + // 在对象文字中的括号之间打印空格 + bracketSpacing: true, + // jsx 标签的反尖括号需要换行 + jsxBracketSameLine: false, + embeddedLanguageFormatting: 'off', + // 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x + arrowParens: 'always', + // 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码 + rangeStart: 0, + rangeEnd: Infinity, + // 指定要使用的解析器,不需要写文件开头的 @prettier + requirePragma: false, + // 不需要自动在文件开头插入 @prettier + insertPragma: false, + // 使用默认的折行标准 always\never\preserve + proseWrap: 'preserve', + // 指定HTML文件的全局空格敏感度 css\strict\ignore + htmlWhitespaceSensitivity: 'css', + // Vue文件脚本和样式标签缩进 + vueIndentScriptAndStyle: false, + // 在 windows 操作系统中换行符通常是回车 (CR) 加换行分隔符 (LF),也就是回车换行(CRLF), + // 然而在 Linux 和 Unix 中只使用简单的换行分隔符 (LF)。 + // 对应的控制字符为 "\n" (LF) 和 "\r\n"(CRLF)。auto意为保持现有的行尾 + // 换行符使用 lf 结尾是 可选值"" + endOfLine: 'auto' }; diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..32b3071 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2019 RuoYi-Vue-Plus + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/package.json b/package.json index 039083c..2d76393 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "vite": "4.3.1", "vite-plugin-compression": "0.5.1", "vite-plugin-svg-icons": "2.0.1", - "vite-plugin-vue-setup-extend": "^0.4.0", + "unplugin-vue-setup-extend-plus": "0.4.9", "vitest": "^0.29.7", "vue-eslint-parser": "9.1.0", "vue-tsc": "0.35.0" diff --git a/src/api/login.ts b/src/api/login.ts index 9efc86d..7419fb3 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -32,7 +32,8 @@ export function register(data: any) { return request({ url: '/auth/register', headers: { - isToken: false + isToken: false, + isEncrypt: true }, method: 'post', data: data diff --git a/src/api/system/client/types.ts b/src/api/system/client/types.ts index e67f95f..d7cb926 100644 --- a/src/api/system/client/types.ts +++ b/src/api/system/client/types.ts @@ -43,7 +43,6 @@ export interface ClientVO { * 状态(0正常 1停用) */ status: string; - } export interface ClientForm extends BaseEntity { @@ -91,7 +90,6 @@ export interface ClientForm extends BaseEntity { * 状态(0正常 1停用) */ status?: string; - } export interface ClientQuery extends PageQuery { @@ -134,5 +132,4 @@ export interface ClientQuery extends PageQuery { * 状态(0正常 1停用) */ status?: string; - } diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts index 28ec66e..4531a0a 100644 --- a/src/api/system/tenant/index.ts +++ b/src/api/system/tenant/index.ts @@ -24,6 +24,9 @@ export function addTenant(data: TenantForm) { return request({ url: '/system/tenant', method: 'post', + headers: { + isEncrypt: true + }, data: data }); } diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index f00a0e3..cb448f5 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -74,6 +74,9 @@ export const resetUserPwd = (userId: string | number, password: string) => { return request({ url: '/system/user/resetPwd', method: 'put', + headers: { + isEncrypt: true + }, data: data }); }; @@ -130,6 +133,9 @@ export const updateUserPwd = (oldPassword: string, newPassword: string) => { return request({ url: '/system/user/profile/updatePwd', method: 'put', + headers: { + isEncrypt: true + }, params: data }); }; @@ -175,8 +181,8 @@ export const updateAuthRole = (data: { userId: string; roleIds: string }) => { */ export const listUserByDeptId = (deptId: string | number): AxiosPromise => { return request({ - url: "/system/user/list/dept/" + deptId, - method: "get" + url: '/system/user/list/dept/' + deptId, + method: 'get' }); }; diff --git a/src/api/tool/gen/index.ts b/src/api/tool/gen/index.ts index 1aaa7b2..b91df6a 100644 --- a/src/api/tool/gen/index.ts +++ b/src/api/tool/gen/index.ts @@ -37,7 +37,7 @@ export const updateGenTable = (data: DbTableForm) => { }; // 导入表 -export const importTable = (data: { tables: string, dataName: string }) => { +export const importTable = (data: { tables: string; dataName: string }) => { return request({ url: '/tool/gen/importTable', method: 'post', @@ -83,4 +83,4 @@ export const getDataNames = () => { url: '/tool/gen/getDataNames', method: 'get' }); -}; \ No newline at end of file +}; diff --git a/src/assets/styles/element-ui.scss b/src/assets/styles/element-ui.scss index bf6cdf7..43c093c 100644 --- a/src/assets/styles/element-ui.scss +++ b/src/assets/styles/element-ui.scss @@ -78,8 +78,6 @@ overflow-x: hidden; } - - // refine element ui upload .upload-container { .el-upload { @@ -109,10 +107,10 @@ box-sizing: content-box; } -.el-menu--collapse>div>.el-submenu>.el-submenu__title .el-submenu__icon-arrow { +.el-menu--collapse > div > .el-submenu > .el-submenu__title .el-submenu__icon-arrow { display: none; } .el-dropdown .el-dropdown-link { color: var(--el-color-primary) !important; -} \ No newline at end of file +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index e31ea97..48865fb 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -26,7 +26,8 @@ html { box-sizing: border-box; } -html.dark .svg-icon, html.dark svg { +html.dark .svg-icon, +html.dark svg { fill: var(--el-text-color-regular); } diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 06bf057..e695bc6 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -81,10 +81,16 @@ } // menu hover + .theme-dark .sub-menu-title-noDropdown, + .theme-dark .el-sub-menu__title { + &:hover { + background-color: $base-sub-menu-title-hover !important; + } + } .sub-menu-title-noDropdown, .el-sub-menu__title { &:hover { - background-color: $base-sub-menu-title-hover !important; + background-color: rgba(0, 0, 0, 0.05) !important; } } @@ -95,12 +101,12 @@ & .nest-menu .el-sub-menu > .el-sub-menu__title, & .el-sub-menu .el-menu-item { min-width: $base-sidebar-width !important; - &:hover { - background-color: rgba(0, 0, 0, 0.06) !important; + background-color: rgba(0, 0, 0, 0.1) !important; } } + & .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title, & .theme-dark .el-sub-menu .el-menu-item { background-color: $base-sub-menu-background !important; @@ -109,6 +115,21 @@ background-color: $base-sub-menu-hover !important; } } + + & .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title, + & .theme-dark .el-menu-item { + &:hover { + // you can use $sub-menuHover + background-color: $base-menu-hover !important; + } + } + & .nest-menu .el-sub-menu > .el-sub-menu__title, + & .el-menu-item { + &:hover { + // you can use $sub-menuHover + background-color: rgba(0, 0, 0, 0.04) !important; + } + } } .hideSidebar { @@ -207,14 +228,6 @@ } } - .nest-menu .el-sub-menu > .el-sub-menu__title, - .el-menu-item { - &:hover { - // you can use $sub-menuHover - background-color: $base-menu-hover !important; - } - } - // the scroll bar appears when the sub-menu is too long > .el-menu--popup { max-height: 100vh; diff --git a/src/components/BuildCode/render.vue b/src/components/BuildCode/render.vue index 5693ed8..62f3d86 100644 --- a/src/components/BuildCode/render.vue +++ b/src/components/BuildCode/render.vue @@ -4,11 +4,11 @@ const props = defineProps({ formJson: { type: [String, Object], - default: {} + default: "" }, formData: { type: [String, Object], - default: {} + default: "" }, isView: { type: Boolean, diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue index 08aef21..1057b3f 100644 --- a/src/components/DictTag/index.vue +++ b/src/components/DictTag/index.vue @@ -2,7 +2,8 @@