diff --git a/.env.front b/.env.front new file mode 100644 index 00000000..2641417d --- /dev/null +++ b/.env.front @@ -0,0 +1,19 @@ +# 本地开发环境 +NODE_ENV=development + +VITE_DEV=true + +# 请求路径 +VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn' + +# 上传路径 +VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload' + +# 接口前缀 +VITE_API_BASEPATH=/dev-api + +# 接口地址 +VITE_API_URL=/admin-api + +# 打包路径 +VITE_BASE_PATH=/ diff --git a/.env.static b/.env.static new file mode 100644 index 00000000..034a7f4d --- /dev/null +++ b/.env.static @@ -0,0 +1,31 @@ +# 开发环境 +NODE_ENV=production + +VITE_DEV=false + +# 请求路径 +VITE_BASE_URL='http://localhost:48080' + +# 上传路径 +VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload' + +# 接口前缀 +VITE_API_BASEPATH= + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH=/admin-ui-vue3/ + +# 输出路径 +VITE_OUT_DIR=dist-dev diff --git a/.prettierignore b/.prettierignore index 21dcc7fb..f68ea869 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,5 +5,7 @@ /docs/* /vite.config.ts /src/types/env.d.ts +/src/types/auto-components.d.ts +/src/types/auto-imports.d.ts /docs/**/* CHANGELOG diff --git a/README.md b/README.md index a5e1d395..b3e9cc78 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,9 @@ **芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。 -基于 [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) 实现,使用 Element Plus 免费开源的中后台模版,具备如下特性: +* 采用 [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) +* 改换saas,自动引入等功能 [vue-element-plus-admin](https://gitee.com/yudaocode/vue-element-plus-admin) +* 使用 Element Plus 免费开源的中后台模版,具备如下特性: ![首页](preview/home.png) @@ -34,16 +36,16 @@ | 框架 | 说明 | 版本 | |----------------------------------------------------------------------|------------------|--------| | [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.2.47 | -| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.1.1 | -| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.2.29 | +| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.1.4 | +| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.2.34 | | [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 4.9.5 | -| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.0.30 | -| [vueuse](https://vueuse.org/) | 常用工具集 | 9.12.0 | -| [vxe-table](https://vxetable.cn/) | Vue 最强表单 | 4.3.9 | +| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.0.33 | +| [vueuse](https://vueuse.org/) | 常用工具集 | 9.13.0 | +| [vxe-table](https://vxetable.cn/) | Vue 最强表单 | 4.3.10 | | [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.2.2 | | [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.1.6 | | [windicss](https://cn.windicss.org/) | 下一代工具优先的 CSS 框架 | 3.5.6 | -| [iconify](https://icon-sets.iconify.design/) | 在线图标库 | 3.0.1 | +| [iconify](https://icon-sets.iconify.design/) | 在线图标库 | 3.1.0 | | [wangeditor](https://www.wangeditor.com/) | 富文本编辑器 | 5.1.23 | ## 开发工具 diff --git a/build/vite/index.ts b/build/vite/index.ts index 454be623..41bbc040 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -30,7 +30,7 @@ export function createVitePlugins(VITE_APP_TITLE: string) { progress(), PurgeIcons(), vueSetupExtend(), - ElementPlus(), + ElementPlus({}), AutoImport({ include: [ /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx diff --git a/build/vite/optimize.ts b/build/vite/optimize.ts index f9108a7f..a4bff7b9 100644 --- a/build/vite/optimize.ts +++ b/build/vite/optimize.ts @@ -16,10 +16,12 @@ const include = [ 'crypto-js', 'cropperjs', 'lodash-es', - 'vxe-table', 'nprogress', 'animate.css', + 'vxe-table', 'vxe-table/es/style', + 'vxe-table/lib/locale/lang/zh-CN', + 'vxe-table/lib/locale/lang/en-US', 'web-storage-cache', '@iconify/iconify', '@vueuse/core', @@ -35,6 +37,7 @@ const include = [ 'element-plus/es', 'element-plus/es/locale/lang/zh-cn', 'element-plus/es/locale/lang/en', + 'element-plus/es/components/backtop/style/index', 'element-plus/es/components/form/style/index', 'element-plus/es/components/radio-group/style/index', 'element-plus/es/components/radio/style/index', @@ -60,7 +63,11 @@ const include = [ 'element-plus/es/components/menu/style/index', 'element-plus/es/components/sub-menu/style/index', 'element-plus/es/components/menu-item/style/index', - 'element-plus/es/components/option/style/index' + 'element-plus/es/components/option/style/index', + 'element-plus/es/components/dropdown/style/index', + 'element-plus/es/components/dropdown-menu/style/index', + 'element-plus/es/components/dropdown-item/style/index', + 'element-plus/es/components/skeleton/style/index' ] const exclude = ['@iconify/json'] diff --git a/package.json b/package.json index 3d269ba3..d067560f 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,18 @@ { "name": "yudao-ui-admin-vue3", - "version": "1.7.0-snapshot.1922", + "version": "1.7.1-snapshot.1941", "description": "基于vue3、vite4、element-plus、typesScript", "author": "xingyu", "private": false, "scripts": { "i": "pnpm install", - "dev": "DEBUG=vite:plugin:mkcert vite --mode base --force", + "dev": "vite --mode base", + "front": "vite --mode front", "ts:check": "vue-tsc --noEmit", - "build:pro": "vite build --mode pro", - "build:dev": "vite build --mode dev", - "build:test": "npm run ts:check && vite build --mode test", + "build:pro": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode pro", + "build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev", + "build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test", + "build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static", "serve:pro": "vite preview --mode pro", "serve:dev": "vite preview --mode dev", "serve:test": "vite preview --mode test", @@ -27,12 +29,12 @@ "@form-create/designer": "^3.1.0", "@form-create/element-ui": "^3.1.17", "@iconify/iconify": "^3.1.0", - "@vueuse/core": "^9.12.0", + "@vueuse/core": "^9.13.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^2.2.1", "animate.css": "^4.1.1", - "axios": "^1.3.2", + "axios": "^1.3.4", "bpmn-js-token-simulation": "^0.10.0", "camunda-bpmn-moddle": "^7.0.1", "cropperjs": "^1.5.13", @@ -41,47 +43,44 @@ "diagram-js": "^11.6.0", "echarts": "^5.4.1", "echarts-wordcloud": "^2.1.0", - "element-plus": "2.2.29", - "fast-xml-parser": "^4.0.13", + "element-plus": "2.2.34", + "fast-xml-parser": "^4.1.3", "highlight.js": "^11.7.0", "intro.js": "^6.0.0", - "jsencrypt": "^3.3.1", + "jsencrypt": "^3.3.2", "lodash-es": "^4.17.21", "min-dash": "^4.0.0", "mitt": "^3.0.0", "nprogress": "^0.2.0", - "pinia": "^2.0.30", + "pinia": "^2.0.33", "qrcode": "^1.5.1", - "qs": "^6.11.0", + "qs": "^6.11.1", "steady-xml": "^0.1.0", "url": "^0.11.0", - "vite-plugin-mkcert": "^1.13.0", - "vite-plugin-optimize-persist": "^0.1.2", - "vite-plugin-package-config": "^0.1.1", "vue": "3.2.47", "vue-i18n": "9.2.2", "vue-router": "^4.1.6", "vue-types": "^5.0.2", "vuedraggable": "^4.1.0", - "vxe-table": "^4.3.9", + "vxe-table": "^4.3.10", "web-storage-cache": "^1.1.1", "xe-utils": "^3.5.7", "xml-js": "^1.6.11" }, "devDependencies": { - "@commitlint/cli": "^17.4.2", - "@commitlint/config-conventional": "^17.4.2", - "@iconify/json": "^2.2.19", + "@commitlint/cli": "^17.4.4", + "@commitlint/config-conventional": "^17.4.4", + "@iconify/json": "^2.2.31", "@intlify/unplugin-vue-i18n": "^0.8.2", "@purge-icons/generated": "^0.9.0", - "@types/intro.js": "^5.1.0", + "@types/intro.js": "^5.1.1", "@types/lodash-es": "^4.17.6", - "@types/node": "^18.13.0", + "@types/node": "^18.14.6", "@types/nprogress": "^0.2.0", "@types/qrcode": "^1.5.0", "@types/qs": "^6.9.7", - "@typescript-eslint/eslint-plugin": "^5.51.0", - "@typescript-eslint/parser": "^5.51.0", + "@typescript-eslint/eslint-plugin": "^5.54.1", + "@typescript-eslint/parser": "^5.54.1", "@vitejs/plugin-legacy": "^4.0.1", "@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue-jsx": "^3.0.0", @@ -89,31 +88,31 @@ "bpmn-js": "^8.9.0", "bpmn-js-properties-panel": "^0.46.0", "consola": "^2.15.3", - "eslint": "^8.33.0", - "eslint-config-prettier": "^8.6.0", + "eslint": "^8.35.0", + "eslint-config-prettier": "^8.7.0", "eslint-define-config": "^1.15.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-vue": "^9.9.0", - "lint-staged": "^13.1.1", + "lint-staged": "^13.1.2", "postcss": "^8.4.21", "postcss-html": "^1.5.0", "postcss-scss": "^4.0.6", "prettier": "^2.8.4", - "rimraf": "^4.1.2", - "rollup": "^3.14.0", - "sass": "^1.58.0", - "stylelint": "^14.16.1", + "rimraf": "^4.3.1", + "rollup": "^3.18.0", + "sass": "^1.58.3", + "stylelint": "^15.2.0", "stylelint-config-html": "^1.1.0", - "stylelint-config-prettier": "^9.0.4", - "stylelint-config-recommended": "^9.0.0", - "stylelint-config-standard": "^29.0.0", - "stylelint-order": "^6.0.1", - "terser": "^5.16.3", + "stylelint-config-prettier": "^9.0.5", + "stylelint-config-recommended": "^10.0.1", + "stylelint-config-standard": "^30.0.1", + "stylelint-order": "^6.0.2", + "terser": "^5.16.5", "typescript": "4.9.5", - "unplugin-auto-import": "^0.14.2", - "unplugin-element-plus": "^0.6.0", - "unplugin-vue-components": "^0.23.0", - "vite": "4.1.1", + "unplugin-auto-import": "^0.15.1", + "unplugin-element-plus": "^0.7.0", + "unplugin-vue-components": "^0.24.1", + "vite": "4.1.4", "vite-plugin-compression": "^0.5.1", "vite-plugin-ejs": "^1.6.4", "vite-plugin-eslint": "^1.8.1", @@ -122,7 +121,7 @@ "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-vue-setup-extend": "^0.4.0", "vite-plugin-windicss": "^1.8.10", - "vue-tsc": "^1.0.24", + "vue-tsc": "^1.2.0", "windicss": "^3.5.6" }, "engines": { @@ -131,10 +130,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+https://gitee.com/zhijiantianya/ruoyi-vue-pro" + "url": "git+https://gitee.com/yudaocode/yudao-ui-admin-vue3" }, "bugs": { - "url": "https://gitee.com/zhijiantianya/ruoyi-vue-pro/issues" + "url": "https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues" }, - "homepage": "https://gitee.com/zhijiantianya/ruoyi-vue-pro" + "homepage": "https://gitee.com/yudaocode/yudao-ui-admin-vue3" } diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index d6cea87a..fca37000 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -109,7 +109,13 @@ const toggleClick = () => { v-bind="getBindItemValue(item)" > + + diff --git a/src/main.ts b/src/main.ts index 4aba7d93..b3a9da16 100644 --- a/src/main.ts +++ b/src/main.ts @@ -55,7 +55,7 @@ import 'highlight.js/styles/github.css' //导入代码高亮样式 新版 import Logger from '@/utils/Logger' // 本地开发模式 全局引入 element-plus 样式,加快第一次进入速度 -if (isDevMode() == true) { +if (isDevMode()) { import('element-plus/dist/index.css') } diff --git a/src/store/modules/tagsView.ts b/src/store/modules/tagsView.ts index e9fbf371..a60d0e45 100644 --- a/src/store/modules/tagsView.ts +++ b/src/store/modules/tagsView.ts @@ -58,7 +58,7 @@ export const useTagsViewStore = defineStore('tagsView', { // 删除某个 delView(view: RouteLocationNormalizedLoaded) { this.delVisitedView(view) - this.addCachedView() + this.delCachedView() }, // 删除tag delVisitedView(view: RouteLocationNormalizedLoaded) { @@ -80,7 +80,7 @@ export const useTagsViewStore = defineStore('tagsView', { // 删除所有缓存和tag delAllViews() { this.delAllVisitedViews() - this.addCachedView() + this.delCachedView() }, // 删除所有tag delAllVisitedViews() { diff --git a/src/styles/index.scss b/src/styles/index.scss index d53c2a6c..39c4c4da 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -6,6 +6,11 @@ margin-left: 2px !important; } +// 解决抽屉弹出时,body宽度变化的问题 +.el-popup-parent--hidden { + width: 100% !important; +} + /* nprogress 适配 element-plus 的主题色 */ #nprogress { & .bar { diff --git a/src/types/auto-components.d.ts b/src/types/auto-components.d.ts index d4adc459..5f1509a1 100644 --- a/src/types/auto-components.d.ts +++ b/src/types/auto-components.d.ts @@ -1,5 +1,7 @@ -// generated by unplugin-vue-components -// We suggest you to commit this file into source control +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 import '@vue/runtime-core' @@ -50,6 +52,7 @@ declare module '@vue/runtime-core' { ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] + ElImage: typeof import('element-plus/es')['ElImage'] ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] @@ -71,6 +74,8 @@ declare module '@vue/runtime-core' { ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] + ElTimeline: typeof import('element-plus/es')['ElTimeline'] + ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTransfer: typeof import('element-plus/es')['ElTransfer'] ElTree: typeof import('element-plus/es')['ElTree'] diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 714d6be2..7c9f5ff1 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -1,4 +1,7 @@ -// Generated by 'unplugin-auto-import' +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-auto-import export {} declare global { const DICT_TYPE: typeof import('@/utils/dict')['DICT_TYPE'] @@ -67,5 +70,5 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue' } diff --git a/src/utils/env.ts b/src/utils/env.ts index 4a45f622..ea271813 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -1,6 +1,6 @@ export const isDevMode = () => { const dev = import.meta.env.VITE_DEV - if (dev && dev === true) { + if (dev && dev === 'true') { return true } else { return false diff --git a/src/utils/routerHelper.ts b/src/utils/routerHelper.ts index 0ae8e1e2..af6a9c3c 100644 --- a/src/utils/routerHelper.ts +++ b/src/utils/routerHelper.ts @@ -212,9 +212,11 @@ const addToChildren = ( } } const toCamelCase = (str: string, upperCaseFirst: boolean) => { - str = (str || '').toLowerCase().replace(/-(.)/g, function (group1: string) { - return group1.toUpperCase() - }) + str = (str || '') + .replace(/-(.)/g, function (group1: string) { + return group1.toUpperCase() + }) + .replaceAll('-', '') if (upperCaseFirst && str) { str = str.charAt(0).toUpperCase() + str.slice(1) diff --git a/src/views/bpm/definition/definition.data.ts b/src/views/bpm/definition/definition.data.ts index 919cbd9c..14a0c319 100644 --- a/src/views/bpm/definition/definition.data.ts +++ b/src/views/bpm/definition/definition.data.ts @@ -17,23 +17,29 @@ const crudSchemas = reactive({ title: '定义名称', field: 'name', table: { - width: 120, + // width: 120, slots: { default: 'name_default' } } }, { - title: '流程分类', + title: '定义分类', field: 'category', - dictType: DICT_TYPE.BPM_MODEL_CATEGORY, - dictClass: 'number' + // dictType: DICT_TYPE.BPM_MODEL_CATEGORY, + // dictClass: 'number', + table: { + // width: 120, + slots: { + default: 'category_default' + } + } }, { title: '表单信息', field: 'formId', table: { - width: 120, + // width: 200, slots: { default: 'formId_default' } @@ -43,7 +49,7 @@ const crudSchemas = reactive({ title: '流程版本', field: 'version', table: { - width: 80, + // width: 80, slots: { default: 'version_default' } @@ -53,7 +59,7 @@ const crudSchemas = reactive({ title: '激活状态', field: 'suspensionState', table: { - width: 80, + // width: 80, slots: { default: 'suspensionState_default' } @@ -63,10 +69,10 @@ const crudSchemas = reactive({ title: '部署时间', field: 'deploymentTime', isForm: false, - formatter: 'formatDate', - table: { - width: 180 - } + formatter: 'formatDate' + // table: { + // width: 180 + // } } ] }) diff --git a/src/views/bpm/definition/index.vue b/src/views/bpm/definition/index.vue index 19a7cf06..f2ef640c 100644 --- a/src/views/bpm/definition/index.vue +++ b/src/views/bpm/definition/index.vue @@ -6,6 +6,10 @@ + + diff --git a/src/views/bpm/taskAssignRule/taskAssignRule.data.ts b/src/views/bpm/taskAssignRule/taskAssignRule.data.ts index 1ced3425..cad74325 100644 --- a/src/views/bpm/taskAssignRule/taskAssignRule.data.ts +++ b/src/views/bpm/taskAssignRule/taskAssignRule.data.ts @@ -43,4 +43,12 @@ const crudSchemas = reactive({ } ] }) + +export const idShowActionClick = (modelId?: any) => { + if (modelId) { + return true + } else { + return false + } +} export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/server/index.vue b/src/views/infra/server/index.vue index 8e748b26..cc7590d6 100644 --- a/src/views/infra/server/index.vue +++ b/src/views/infra/server/index.vue @@ -3,7 +3,7 @@