diff --git a/.eslintignore b/.eslintignore index 9858f3e..e74db40 100644 --- a/.eslintignore +++ b/.eslintignore @@ -11,7 +11,7 @@ dist .husky .local /bin -.eslintrc.js +.eslintrc.cjs prettier.config.js src/assets tailwind.config.js diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 100% rename from .eslintrc.js rename to .eslintrc.cjs diff --git a/.prettierrc.cjs b/.prettierrc.cjs deleted file mode 100644 index 61d2d92..0000000 --- a/.prettierrc.cjs +++ /dev/null @@ -1,46 +0,0 @@ -/** - * 代码格式化配置 - */ -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' -}; diff --git a/package.json b/package.json index 1395590..a93f63a 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "RuoYi-Vue-Plus多租户管理系统", "author": "LionLi", "license": "MIT", + "type": "module", "scripts": { "dev": "vite serve --mode development", "build:prod": "vite build --mode production", @@ -22,13 +23,13 @@ "@vueup/vue-quill": "1.2.0", "@vueuse/core": "10.7.0", "animate.css": "4.1.1", - "await-to-js": "^3.0.0", - "axios": "^1.6.0", - "crypto-js": "^4.2.0", + "await-to-js": "3.0.0", + "axios": "1.6.0", + "crypto-js": "4.2.0", "echarts": "5.4.3", "element-plus": "2.4.4", "file-saver": "2.0.5", - "fuse.js": "6.6.2", + "fuse.js": "7.0.0", "js-cookie": "3.0.5", "jsencrypt": "3.3.2", "nprogress": "0.2.0", @@ -37,29 +38,28 @@ "pinia": "2.1.7", "screenfull": "6.0.0", "vform3-builds": "3.0.8", - "vue": "3.3.13", + "vue": "3.4.5", "vue-cropper": "1.1.1", - "vue-i18n": "9.2.2", + "vue-i18n": "9.8.0", "vue-router": "4.2.5", "vue-types": "5.1.1" }, "devDependencies": { - "@iconify/json": "^2.2.157", - "@intlify/unplugin-vue-i18n": "1.6.0", - "@types/crypto-js": "^4.2.0", + "@iconify/json": "2.2.167", + "@intlify/unplugin-vue-i18n": "2.0.0", + "@types/crypto-js": "4.2.0", "@types/file-saver": "2.0.5", "@types/js-cookie": "3.0.5", "@types/node": "18.14.2", "@types/nprogress": "0.2.0", - "@types/path-browserify": "^1.0.0", - "@typescript-eslint/eslint-plugin": "6.14.0", - "@typescript-eslint/parser": "6.14.0", - "@unocss/preset-attributify": "^0.58.0", - "@unocss/preset-icons": "^0.58.0", - "@unocss/preset-uno": "^0.58.0", - "@vue/compiler-sfc": "3.3.11", - "@vue/runtime-core": "3.3.11", - "@vitejs/plugin-vue": "4.5.2", + "@types/path-browserify": "1.0.0", + "@typescript-eslint/eslint-plugin": "6.17.0", + "@typescript-eslint/parser": "6.17.0", + "@unocss/preset-attributify": "0.58.3", + "@unocss/preset-icons": "0.58.3", + "@unocss/preset-uno": "0.58.3", + "@vue/compiler-sfc": "3.4.5", + "@vitejs/plugin-vue": "5.0.2", "autoprefixer": "10.4.14", "eslint": "8.55.0", "eslint-config-prettier": "9.1.0", @@ -69,22 +69,22 @@ "eslint-plugin-node": "11.1.0", "eslint-plugin-import": "2.29.0", "eslint-plugin-vue": "9.19.2", - "fast-glob": "^3.2.11", - "husky": "7.0.4", - "postcss": "^8.4.21", + "fast-glob": "3.3.2", + "husky": "8.0.3", + "postcss": "8.4.33", "prettier": "3.1.1", "sass": "1.69.5", "typescript": "5.3.3", - "unocss": "^0.58.0", + "unocss": "0.58.0", "unplugin-auto-import": "0.17.2", "unplugin-icons": "0.18.1", "unplugin-vue-components": "0.26.0", "unplugin-vue-setup-extend-plus": "1.0.0", "vite-plugin-compression": "0.5.1", "vite-plugin-svg-icons": "2.0.1", - "vitest": "^0.29.7", + "vitest": "1.1.3", "vue-eslint-parser": "9.3.2", - "vue-tsc": "0.35.0", - "vite": "5.0.5" + "vue-tsc": "1.8.27", + "vite": "5.0.10" } } diff --git a/src/App.vue b/src/App.vue index a93790a..66dbed6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,5 @@ @@ -10,7 +10,6 @@ import { handleThemeStyle } from '@/utils/theme'; import useAppStore from '@/store/modules/app'; const appStore = useAppStore(); -const size = computed(() => appStore.size); onMounted(() => { nextTick(() => { diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts index 77e9c32..3488e9f 100644 --- a/src/api/system/user/types.ts +++ b/src/api/system/user/types.ts @@ -1,4 +1,3 @@ -import { DeptVO } from './../dept/types'; import { RoleVO } from '@/api/system/role/types'; import { PostVO } from '@/api/system/post/types'; @@ -40,7 +39,7 @@ export interface UserVO extends BaseEntity { loginIp: string; loginDate: string; remark: string; - dept: DeptVO; + deptName: string; roles: RoleVO[]; roleIds: any; postIds: any; diff --git a/src/assets/icons/svg/topiam.svg b/src/assets/icons/svg/topiam.svg new file mode 100644 index 0000000..e7ea057 --- /dev/null +++ b/src/assets/icons/svg/topiam.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 05b574f..fc30c85 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -2,7 +2,6 @@
+ -
- -
+
+
+
@@ -57,6 +57,7 @@ const upload = reactive({ url: import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload' }); const quillEditorRef = ref(); +const uploadRef = ref(); const options = ref({ theme: 'snow', @@ -78,10 +79,10 @@ const options = ref({ ['link', 'image', 'video'] // 链接、图片、视频 ], handlers: { - image: function (value: any) { + image: (value: boolean) => { if (value) { // 调用element图片上传 - (document.querySelector('.editor-img-uploader>.el-upload') as HTMLDivElement)?.click(); + uploadRef.value.click(); } else { Quill.format('image', true); } @@ -107,7 +108,7 @@ const styles = computed(() => { const content = ref(''); watch( () => props.modelValue, - (v) => { + (v: string) => { if (v !== content.value) { content.value = v === undefined ? '

' : v; } @@ -129,7 +130,7 @@ const handleUploadSuccess = (res: any) => { quill.setSelection(length + 1); proxy?.$modal.closeLoading(); } else { - proxy?.$modal.loading(res.msg); + proxy?.$modal.msgError('图片插入失败'); proxy?.$modal.closeLoading(); } }; @@ -157,7 +158,6 @@ const handleBeforeUpload = (file: any) => { // 图片失败拦截 const handleUploadError = (err: any) => { - console.error(err); proxy?.$modal.msgError('上传文件失败'); }; diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 1cbf395..aaaa45c 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -35,7 +35,7 @@ {{ getFileName(file.name) }}
- 删除 + 删除
@@ -43,8 +43,8 @@