mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-10-31 10:37:41 +08:00 
			
		
		
		
	fix: bugs
This commit is contained in:
		| @ -223,9 +223,9 @@ ps:核心功能已经实现,正在对接微信小程序中... | ||||
| |----------------------------------------------------------------------|:------------:|:------:| | ||||
| | [Vue](https://staging-cn.vuejs.org/)                                 |   Vue 框架    | 3.2.45 | | ||||
| | [Vite](https://cn.vitejs.dev//)                                      | 开发与构建工具  | 3.2.3  | | ||||
| | [Element Plus](https://element-plus.org/zh-CN/)                      | Element Plus | 2.2.23 | | ||||
| | [Element Plus](https://element-plus.org/zh-CN/)                      | Element Plus | 2.2.25 | | ||||
| | [TypeScript](https://www.typescriptlang.org/docs/)                   |  TypeScript  | 4.9.3  | | ||||
| | [pinia](https://pinia.vuejs.org/)                                    |    vuex5     | 2.0.26 | | ||||
| | [pinia](https://pinia.vuejs.org/)                                    |    vuex5     | 2.0.27 | | ||||
| | [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) |    国际化     | 9.2.2  | | ||||
| | [vxe-table](https://vxetable.cn/)                                    |  vue最强表单  | 4.5.6  | | ||||
|  | ||||
|  | ||||
| @ -60,7 +60,7 @@ | ||||
|         <minio.version>8.2.2</minio.version> | ||||
|         <aliyun-java-sdk-core.version>4.6.2</aliyun-java-sdk-core.version> | ||||
|         <aliyun-java-sdk-dysmsapi.version>2.2.1</aliyun-java-sdk-dysmsapi.version> | ||||
|         <tencentcloud-sdk-java.version>3.1.634</tencentcloud-sdk-java.version> | ||||
|         <tencentcloud-sdk-java.version>3.1.561</tencentcloud-sdk-java.version> | ||||
|         <justauth.version>1.4.0</justauth.version> | ||||
|         <jimureport.version>1.5.3</jimureport.version> | ||||
|         <xercesImpl.version>2.12.2</xercesImpl.version> | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "ruoyi-vue-pro-vue3", | ||||
|   "version": "1.6.4.1862", | ||||
|   "version": "1.6.4.1863", | ||||
|   "description": "基于vue3、vite3、element-plus、typesScript", | ||||
|   "author": "xingyu", | ||||
|   "private": false, | ||||
| @ -36,14 +36,14 @@ | ||||
|     "dayjs": "^1.11.6", | ||||
|     "echarts": "^5.4.0", | ||||
|     "echarts-wordcloud": "^2.1.0", | ||||
|     "element-plus": "2.2.23", | ||||
|     "element-plus": "2.2.25", | ||||
|     "intro.js": "^6.0.0", | ||||
|     "js-cookie": "^3.0.1", | ||||
|     "jsencrypt": "^3.3.1", | ||||
|     "lodash-es": "^4.17.21", | ||||
|     "mitt": "^3.0.0", | ||||
|     "nprogress": "^0.2.0", | ||||
|     "pinia": "^2.0.26", | ||||
|     "pinia": "^2.0.27", | ||||
|     "qrcode": "^1.5.1", | ||||
|     "qs": "^6.11.0", | ||||
|     "url": "^0.11.0", | ||||
| @ -59,7 +59,7 @@ | ||||
|   "devDependencies": { | ||||
|     "@commitlint/cli": "^17.3.0", | ||||
|     "@commitlint/config-conventional": "^17.3.0", | ||||
|     "@iconify/json": "^2.1.143", | ||||
|     "@iconify/json": "^2.1.144", | ||||
|     "@intlify/vite-plugin-vue-i18n": "^6.0.3", | ||||
|     "@purge-icons/generated": "^0.9.0", | ||||
|     "@types/intro.js": "^5.1.0", | ||||
| @ -82,10 +82,10 @@ | ||||
|     "plop": "^3.1.1", | ||||
|     "postcss": "^8.4.19", | ||||
|     "postcss-html": "^1.5.0", | ||||
|     "postcss-scss": "^4.0.5", | ||||
|     "postcss-scss": "^4.0.6", | ||||
|     "prettier": "^2.8.0", | ||||
|     "rimraf": "^3.0.2", | ||||
|     "rollup": "^3.4.0", | ||||
|     "rollup": "^3.5.0", | ||||
|     "sass": "^1.56.1", | ||||
|     "stylelint": "^14.15.0", | ||||
|     "stylelint-config-html": "^1.1.0", | ||||
|  | ||||
							
								
								
									
										96
									
								
								yudao-ui-admin-vue3/pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										96
									
								
								yudao-ui-admin-vue3/pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @ -4,7 +4,7 @@ specifiers: | ||||
|   '@commitlint/cli': ^17.3.0 | ||||
|   '@commitlint/config-conventional': ^17.3.0 | ||||
|   '@iconify/iconify': ^3.0.0 | ||||
|   '@iconify/json': ^2.1.143 | ||||
|   '@iconify/json': ^2.1.144 | ||||
|   '@intlify/vite-plugin-vue-i18n': ^6.0.3 | ||||
|   '@purge-icons/generated': ^0.9.0 | ||||
|   '@types/intro.js': ^5.1.0 | ||||
| @ -28,7 +28,7 @@ specifiers: | ||||
|   dayjs: ^1.11.6 | ||||
|   echarts: ^5.4.0 | ||||
|   echarts-wordcloud: ^2.1.0 | ||||
|   element-plus: 2.2.23 | ||||
|   element-plus: 2.2.25 | ||||
|   eslint: ^8.28.0 | ||||
|   eslint-config-prettier: ^8.5.0 | ||||
|   eslint-define-config: ^1.12.0 | ||||
| @ -41,16 +41,16 @@ specifiers: | ||||
|   lodash-es: ^4.17.21 | ||||
|   mitt: ^3.0.0 | ||||
|   nprogress: ^0.2.0 | ||||
|   pinia: ^2.0.26 | ||||
|   pinia: ^2.0.27 | ||||
|   plop: ^3.1.1 | ||||
|   postcss: ^8.4.19 | ||||
|   postcss-html: ^1.5.0 | ||||
|   postcss-scss: ^4.0.5 | ||||
|   postcss-scss: ^4.0.6 | ||||
|   prettier: ^2.8.0 | ||||
|   qrcode: ^1.5.1 | ||||
|   qs: ^6.11.0 | ||||
|   rimraf: ^3.0.2 | ||||
|   rollup: ^3.4.0 | ||||
|   rollup: ^3.5.0 | ||||
|   sass: ^1.56.1 | ||||
|   stylelint: ^14.15.0 | ||||
|   stylelint-config-html: ^1.1.0 | ||||
| @ -93,14 +93,14 @@ dependencies: | ||||
|   dayjs: registry.npmmirror.com/dayjs/1.11.6 | ||||
|   echarts: registry.npmmirror.com/echarts/5.4.0 | ||||
|   echarts-wordcloud: 2.1.0_echarts@5.4.0 | ||||
|   element-plus: 2.2.23_vue@3.2.45 | ||||
|   element-plus: 2.2.25_vue@3.2.45 | ||||
|   intro.js: registry.npmmirror.com/intro.js/6.0.0 | ||||
|   js-cookie: registry.npmmirror.com/js-cookie/3.0.1 | ||||
|   jsencrypt: registry.npmmirror.com/jsencrypt/3.3.1 | ||||
|   lodash-es: registry.npmmirror.com/lodash-es/4.17.21 | ||||
|   mitt: registry.npmmirror.com/mitt/3.0.0 | ||||
|   nprogress: registry.npmmirror.com/nprogress/0.2.0 | ||||
|   pinia: 2.0.26_mgnvym7yiazkylwwogi5r767ue | ||||
|   pinia: 2.0.27_mgnvym7yiazkylwwogi5r767ue | ||||
|   qrcode: registry.npmmirror.com/qrcode/1.5.1 | ||||
|   qs: registry.npmmirror.com/qs/6.11.0 | ||||
|   url: registry.npmmirror.com/url/0.11.0 | ||||
| @ -116,7 +116,7 @@ dependencies: | ||||
| devDependencies: | ||||
|   '@commitlint/cli': registry.npmmirror.com/@commitlint/cli/17.3.0 | ||||
|   '@commitlint/config-conventional': registry.npmmirror.com/@commitlint/config-conventional/17.3.0 | ||||
|   '@iconify/json': 2.1.143 | ||||
|   '@iconify/json': 2.1.144 | ||||
|   '@intlify/vite-plugin-vue-i18n': registry.npmmirror.com/@intlify/vite-plugin-vue-i18n/6.0.3_vite@3.2.4+vue-i18n@9.2.2 | ||||
|   '@purge-icons/generated': registry.npmmirror.com/@purge-icons/generated/0.9.0 | ||||
|   '@types/intro.js': registry.npmmirror.com/@types/intro.js/5.1.0 | ||||
| @ -139,10 +139,10 @@ devDependencies: | ||||
|   plop: registry.npmmirror.com/plop/3.1.1 | ||||
|   postcss: registry.npmmirror.com/postcss/8.4.19 | ||||
|   postcss-html: registry.npmmirror.com/postcss-html/1.5.0 | ||||
|   postcss-scss: registry.npmmirror.com/postcss-scss/4.0.5_postcss@8.4.19 | ||||
|   postcss-scss: 4.0.6_postcss@8.4.19 | ||||
|   prettier: registry.npmmirror.com/prettier/2.8.0 | ||||
|   rimraf: registry.npmmirror.com/rimraf/3.0.2 | ||||
|   rollup: registry.npmmirror.com/rollup/3.4.0 | ||||
|   rollup: 3.5.0 | ||||
|   sass: registry.npmmirror.com/sass/1.56.1 | ||||
|   stylelint: registry.npmmirror.com/stylelint/14.15.0 | ||||
|   stylelint-config-html: registry.npmmirror.com/stylelint-config-html/1.1.0_qendsqix7hqecpnpx4fjs6qry4 | ||||
| @ -207,8 +207,8 @@ packages: | ||||
|       '@floating-ui/core': 1.0.2 | ||||
|     dev: false | ||||
|  | ||||
|   /@iconify/json/2.1.143: | ||||
|     resolution: {integrity: sha512-atN7UAsuRgXkXE9MiOh59T2hIkN3ulE6GVbfZjKeYPYdyRpsAgFsLOAMjJ+u6jIzaiZn+rSVwx7m2gQG47sN0A==} | ||||
|   /@iconify/json/2.1.144: | ||||
|     resolution: {integrity: sha512-U4W9EHgDVKk/ll8fJ8J6atgtYj9MjPUiKtVlMlyz+SO90lI34QbgVJZOP/DEezLP/HcAIDLS2pgX+x+kFIkeWg==} | ||||
|     dependencies: | ||||
|       '@iconify/types': 2.0.0 | ||||
|       pathe: 0.3.9 | ||||
| @ -440,8 +440,8 @@ packages: | ||||
|       echarts: registry.npmmirror.com/echarts/5.4.0 | ||||
|     dev: false | ||||
|  | ||||
|   /element-plus/2.2.23_vue@3.2.45: | ||||
|     resolution: {integrity: sha512-/7BtebETiknsW2TpSwt5RIpXxFQ1sbYoRelJqeiB1K9LcL0MwyQJ1rZSuWHBCHduMvfpogNZ66dwp2Giv9lYbg==} | ||||
|   /element-plus/2.2.25_vue@3.2.45: | ||||
|     resolution: {integrity: sha512-HC8CWY31e6pPyBpgqI0QnWkBgs0vRzdYnEw3mpdM/NlKfp0PtNFX7NESQLomqoIulH5ftL09hjQmJNvZBQpthQ==} | ||||
|     peerDependencies: | ||||
|       vue: ^3.2.0 | ||||
|     dependencies: | ||||
| @ -780,6 +780,7 @@ packages: | ||||
|  | ||||
|   /graceful-fs/4.2.10: | ||||
|     resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} | ||||
|     requiresBuild: true | ||||
|     dev: true | ||||
|     optional: true | ||||
|  | ||||
| @ -1006,8 +1007,8 @@ packages: | ||||
|     hasBin: true | ||||
|     dev: true | ||||
|  | ||||
|   /pinia/2.0.26_mgnvym7yiazkylwwogi5r767ue: | ||||
|     resolution: {integrity: sha512-tSxZNUcMGxQOvKZRjPKXxd2+/2NZhRF/CoYVE/+K6uE/Z3v1Oi4fcQFpxu5nMB1dCchjXUZ+lz0tBxV5ntwmQQ==} | ||||
|   /pinia/2.0.27_mgnvym7yiazkylwwogi5r767ue: | ||||
|     resolution: {integrity: sha512-nOnXP0OFeL8R4WjAHsterU+11vptda643gH02xKNtSCDPiRzVfRYodOLihLDoa0gL1KKuQKV+KOzEgdt3YvqEw==} | ||||
|     peerDependencies: | ||||
|       '@vue/composition-api': ^1.4.0 | ||||
|       typescript: '>=4.4.4' | ||||
| @ -1024,6 +1025,15 @@ packages: | ||||
|       vue-demi: 0.13.11_vue@3.2.45 | ||||
|     dev: false | ||||
|  | ||||
|   /postcss-scss/4.0.6_postcss@8.4.19: | ||||
|     resolution: {integrity: sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==} | ||||
|     engines: {node: '>=12.0'} | ||||
|     peerDependencies: | ||||
|       postcss: ^8.4.19 | ||||
|     dependencies: | ||||
|       postcss: registry.npmmirror.com/postcss/8.4.19 | ||||
|     dev: true | ||||
|  | ||||
|   /postcss-selector-parser/6.0.10: | ||||
|     resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==} | ||||
|     engines: {node: '>=4'} | ||||
| @ -1044,6 +1054,22 @@ packages: | ||||
|     resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} | ||||
|     dev: true | ||||
|  | ||||
|   /rollup/2.79.1: | ||||
|     resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} | ||||
|     engines: {node: '>=10.0.0'} | ||||
|     hasBin: true | ||||
|     optionalDependencies: | ||||
|       fsevents: 2.3.2 | ||||
|     dev: true | ||||
|  | ||||
|   /rollup/3.5.0: | ||||
|     resolution: {integrity: sha512-TYu2L+TGhmNsXCtByont89u+ATQLcDy6A+++PwLXYunRtOm7XnaD+65s1pvewaOxMYR0eOkMXn9/i0saBxxpnQ==} | ||||
|     engines: {node: '>=14.18.0', npm: '>=8.0.0'} | ||||
|     hasBin: true | ||||
|     optionalDependencies: | ||||
|       fsevents: 2.3.2 | ||||
|     dev: true | ||||
|  | ||||
|   /rxjs/7.5.7: | ||||
|     resolution: {integrity: sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==} | ||||
|     dependencies: | ||||
| @ -7243,18 +7269,6 @@ packages: | ||||
|       postcss: registry.npmmirror.com/postcss/8.4.19 | ||||
|     dev: true | ||||
|  | ||||
|   registry.npmmirror.com/postcss-scss/4.0.5_postcss@8.4.19: | ||||
|     resolution: {integrity: sha512-F7xpB6TrXyqUh3GKdyB4Gkp3QL3DDW1+uI+gxx/oJnUt/qXI4trj5OGlp9rOKdoABGULuqtqeG+3HEVQk4DjmA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/postcss-scss/-/postcss-scss-4.0.5.tgz} | ||||
|     id: registry.npmmirror.com/postcss-scss/4.0.5 | ||||
|     name: postcss-scss | ||||
|     version: 4.0.5 | ||||
|     engines: {node: '>=12.0'} | ||||
|     peerDependencies: | ||||
|       postcss: ^8.3.3 | ||||
|     dependencies: | ||||
|       postcss: registry.npmmirror.com/postcss/8.4.19 | ||||
|     dev: true | ||||
|  | ||||
|   registry.npmmirror.com/postcss-selector-parser/6.0.10: | ||||
|     resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz} | ||||
|     name: postcss-selector-parser | ||||
| @ -7712,26 +7726,6 @@ packages: | ||||
|       - supports-color | ||||
|     dev: true | ||||
|  | ||||
|   registry.npmmirror.com/rollup/2.79.1: | ||||
|     resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup/-/rollup-2.79.1.tgz} | ||||
|     name: rollup | ||||
|     version: 2.79.1 | ||||
|     engines: {node: '>=10.0.0'} | ||||
|     hasBin: true | ||||
|     optionalDependencies: | ||||
|       fsevents: 2.3.2 | ||||
|     dev: true | ||||
|  | ||||
|   registry.npmmirror.com/rollup/3.4.0: | ||||
|     resolution: {integrity: sha512-4g8ZrEFK7UbDvy3JF+d5bLiC8UKkS3n/27/cnVeESwB1LVPl6MoPL32/6+SCQ1vHTp6Mvp2veIHtwELhi+uXEw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup/-/rollup-3.4.0.tgz} | ||||
|     name: rollup | ||||
|     version: 3.4.0 | ||||
|     engines: {node: '>=14.18.0', npm: '>=8.0.0'} | ||||
|     hasBin: true | ||||
|     optionalDependencies: | ||||
|       fsevents: 2.3.2 | ||||
|     dev: true | ||||
|  | ||||
|   registry.npmmirror.com/run-async/2.4.1: | ||||
|     resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/run-async/-/run-async-2.4.1.tgz} | ||||
|     name: run-async | ||||
| @ -8835,7 +8829,7 @@ packages: | ||||
|       '@rollup/pluginutils': registry.npmmirror.com/@rollup/pluginutils/4.2.1 | ||||
|       '@types/eslint': registry.npmmirror.com/@types/eslint/8.4.10 | ||||
|       eslint: registry.npmmirror.com/eslint/8.28.0 | ||||
|       rollup: registry.npmmirror.com/rollup/2.79.1 | ||||
|       rollup: 2.79.1 | ||||
|       vite: registry.npmmirror.com/vite/3.2.4_ajklay5k626t46b6fyghkbup3i | ||||
|     dev: true | ||||
|  | ||||
| @ -8996,7 +8990,7 @@ packages: | ||||
|       esbuild: registry.npmmirror.com/esbuild/0.15.14 | ||||
|       postcss: registry.npmmirror.com/postcss/8.4.19 | ||||
|       resolve: registry.npmmirror.com/resolve/1.22.1 | ||||
|       rollup: registry.npmmirror.com/rollup/2.79.1 | ||||
|       rollup: 2.79.1 | ||||
|       sass: registry.npmmirror.com/sass/1.56.1 | ||||
|     optionalDependencies: | ||||
|       fsevents: 2.3.2 | ||||
| @ -9253,7 +9247,7 @@ packages: | ||||
|     version: 0.3.2 | ||||
|     dependencies: | ||||
|       eslint-visitor-keys: 1.3.0 | ||||
|       lodash: registry.npmmirror.com/lodash/4.17.21 | ||||
|       lodash: 4.17.21 | ||||
|       yaml: 1.10.2 | ||||
|     dev: true | ||||
|  | ||||
|  | ||||
| @ -115,7 +115,9 @@ const toggleClick = () => { | ||||
|  | ||||
|             <template #default> | ||||
|               <slot v-if="item.dateFormat"> | ||||
|                 {{ dayjs(data[item.field]).format(item.dateFormat) }} | ||||
|                 {{ | ||||
|                   data[item.field] !== null ? dayjs(data[item.field]).format(item.dateFormat) : '' | ||||
|                 }} | ||||
|               </slot> | ||||
|               <slot v-else-if="item.dictType"> | ||||
|                 <DictTag :type="item.dictType" :value="data[item.field] + ''" /> | ||||
|  | ||||
| @ -22,6 +22,7 @@ export type VxeCrudSchema = { | ||||
|   actionTitle?: string // 操作栏标题 默认为操作 | ||||
|   actionWidth?: string // 操作栏插槽宽度,一般2个字带图标 text 类型按钮 50-70 | ||||
|   columns: VxeCrudColumns[] | ||||
|   searchSpan?: number | ||||
| } | ||||
| type VxeCrudColumns = Omit<VxeTableColumn, 'children'> & { | ||||
|   field: string // 字段名 | ||||
| @ -112,6 +113,8 @@ export const useVxeCrudSchemas = ( | ||||
| // 过滤 Search 结构 | ||||
| const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => { | ||||
|   const { t } = useI18n() | ||||
|   const span = crudSchema.searchSpan ? crudSchema.searchSpan : 6 | ||||
|   const spanLength = 24 / span | ||||
|   const searchSchema: VxeFormItemProps[] = [] | ||||
|   eachTree(crudSchema.columns, (schemaItem: VxeCrudColumns) => { | ||||
|     // 判断是否显示 | ||||
| @ -144,13 +147,14 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => { | ||||
|           props: { placeholder: t('common.selectText') } | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       const searchSchemaItem = { | ||||
|         // 默认为 input | ||||
|         folding: searchSchema.length > 3, | ||||
|         folding: searchSchema.length > spanLength, | ||||
|         itemRender: schemaItem.itemRender ? schemaItem.itemRender : itemRender, | ||||
|         field: schemaItem.field, | ||||
|         title: schemaItem.search?.title || schemaItem.title, | ||||
|         span: 6 | ||||
|         span: span | ||||
|       } | ||||
|  | ||||
|       searchSchema.push(searchSchemaItem) | ||||
| @ -161,7 +165,7 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => { | ||||
|     const buttons: VxeFormItemProps = { | ||||
|       span: 24, | ||||
|       align: 'center', | ||||
|       collapseNode: searchSchema.length > 4, | ||||
|       collapseNode: searchSchema.length > spanLength + 1, | ||||
|       itemRender: { | ||||
|         name: '$buttons', | ||||
|         children: [ | ||||
| @ -181,11 +185,13 @@ const filterTableSchema = (crudSchema: VxeCrudSchema): VxeGridPropTypes.Columns | ||||
|   const tableSchema: VxeGridPropTypes.Columns = [] | ||||
|   // 主键ID | ||||
|   if (crudSchema.primaryKey && crudSchema.primaryType) { | ||||
|     const primaryWidth = | ||||
|       (crudSchema.primaryTitle ? crudSchema.primaryTitle : t('common.index')).length * 20 + 'px' | ||||
|     const tableSchemaItem = { | ||||
|       title: crudSchema.primaryTitle ? crudSchema.primaryTitle : t('common.index'), | ||||
|       field: crudSchema.primaryKey, | ||||
|       type: crudSchema.primaryType ? crudSchema.primaryType : null, | ||||
|       width: '80px' | ||||
|       width: primaryWidth | ||||
|     } | ||||
|     tableSchema.push(tableSchemaItem) | ||||
|   } | ||||
|  | ||||
| @ -150,7 +150,11 @@ VXETable.setup({ | ||||
| VXETable.formats.mixin({ | ||||
|   // 格式日期,默认 yyyy-MM-dd HH:mm:ss | ||||
|   formatDate({ cellValue }, format) { | ||||
|     if (cellValue != null) { | ||||
|       return XEUtils.toDateString(cellValue, format || 'yyyy-MM-dd HH:mm:ss') | ||||
|     } else { | ||||
|       return '' | ||||
|     } | ||||
|   }, | ||||
|   // 四舍五入金额,每隔3位逗号分隔,默认2位数 | ||||
|   formatAmount({ cellValue }, digits = 2) { | ||||
|  | ||||
| @ -18,7 +18,7 @@ | ||||
|           preIcon="ep:view" | ||||
|           :title="t('action.preview')" | ||||
|           v-hasPermi="['infra:codegen:query']" | ||||
|           @click="handlePreview(row.id)" | ||||
|           @click="handlePreview(row)" | ||||
|         /> | ||||
|         <!-- 操作:编辑 --> | ||||
|         <XTextButton | ||||
| @ -39,14 +39,14 @@ | ||||
|           preIcon="ep:refresh" | ||||
|           :title="t('action.sync')" | ||||
|           v-hasPermi="['infra:codegen:update']" | ||||
|           @click="handleSynchDb(row.id)" | ||||
|           @click="handleSynchDb(row)" | ||||
|         /> | ||||
|         <!-- 操作:生成 --> | ||||
|         <XTextButton | ||||
|           preIcon="ep:download" | ||||
|           :title="t('action.generate')" | ||||
|           v-hasPermi="['infra:codegen:download']" | ||||
|           @click="handleGenTable(row.id)" | ||||
|           @click="handleGenTable(row)" | ||||
|         /> | ||||
|       </template> | ||||
|     </vxe-grid> | ||||
| @ -86,7 +86,6 @@ const openImportTable = () => { | ||||
|   importRef.value.show() | ||||
| } | ||||
| // 预览操作 | ||||
| // TODO 星语:点击后报错 | ||||
| const previewRef = ref() | ||||
| const handlePreview = (row: CodegenTableVO) => { | ||||
|   previewRef.value.show(row) | ||||
|  | ||||
| @ -85,7 +85,6 @@ import { useVxeGrid } from '@/hooks/web/useVxeGrid' | ||||
| import { VxeGridInstance } from 'vxe-table' | ||||
| import { ElUpload, ElImage, UploadInstance, UploadRawFile } from 'element-plus' | ||||
| // 业务相关的 import | ||||
| // TODO 星语:貌似这个界面打开 404 | ||||
| import { allSchemas } from './fileList.data' | ||||
| import * as FileApi from '@/api/infra/fileList' | ||||
| import { getAccessToken, getTenantId } from '@/utils/auth' | ||||
|  | ||||
| @ -12,8 +12,8 @@ export const rules = reactive({ | ||||
|   email: [required], | ||||
|   phone: [ | ||||
|     { | ||||
|       pattern: | ||||
|         /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/, // TODO @星语:前端只校验长度,格式交给后端;因为号码格式不断在变的 | ||||
|       min: 11, | ||||
|       max: 11, | ||||
|       trigger: 'blur', | ||||
|       message: '请输入正确的手机号码' | ||||
|     } | ||||
|  | ||||
| @ -17,6 +17,7 @@ export const crudSchemas = reactive<VxeCrudSchema>({ | ||||
|   primaryType: null, | ||||
|   action: true, | ||||
|   actionWidth: '140px', | ||||
|   searchSpan: 12, | ||||
|   columns: [ | ||||
|     { | ||||
|       title: '字典类型', | ||||
|  | ||||
| @ -7,8 +7,7 @@ const { t } = useI18n() // 国际化 | ||||
|  | ||||
| // 表单校验 | ||||
| export const dictTypeRules = reactive({ | ||||
|   name: [required], | ||||
|   type: [required] | ||||
|   name: [required] | ||||
| }) | ||||
| // 新增 + 修改 | ||||
| const crudSchemas = reactive<VxeCrudSchema>({ | ||||
| @ -16,6 +15,7 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||||
|   primaryType: null, | ||||
|   action: true, | ||||
|   actionWidth: '140px', | ||||
|   searchSpan: 12, | ||||
|   columns: [ | ||||
|     { | ||||
|       title: '字典名称', | ||||
|  | ||||
| @ -1,7 +1,6 @@ | ||||
| <template> | ||||
|   <div class="flex"> | ||||
|     <!-- ====== 字典分类 ====== --> | ||||
|     <!-- TODO 星语:筛选框很小 --> | ||||
|     <el-card class="w-1/2 dict" :gutter="12" shadow="always"> | ||||
|       <template #header> | ||||
|         <div class="card-header"> | ||||
| @ -94,7 +93,7 @@ | ||||
|         ref="typeFormRef" | ||||
|       > | ||||
|         <template #type> | ||||
|           <template v-if="dictTypeValue"> | ||||
|           <template v-if="actionType == 'typeUpdate'"> | ||||
|             <el-tag>{{ dictTypeValue }}</el-tag> | ||||
|           </template> | ||||
|           <template v-else><el-input v-model="dictTypeValue" /> </template> | ||||
| @ -232,7 +231,7 @@ const submitTypeForm = async () => { | ||||
|   const elForm = unref(typeFormRef)?.getElFormRef() | ||||
|   if (!elForm) return | ||||
|   elForm.validate(async (valid) => { | ||||
|     if (valid) { | ||||
|     if (valid && dictTypeValue.value != '') { | ||||
|       actionLoading.value = true | ||||
|       // 提交请求 | ||||
|       try { | ||||
|  | ||||
| @ -75,7 +75,18 @@ | ||||
|       v-if="actionType === 'detail'" | ||||
|       :schema="allSchemas.detailSchema" | ||||
|       :data="detailData" | ||||
|     /> | ||||
|     > | ||||
|       <template #tags="{ row }"> | ||||
|         <el-tag | ||||
|           :disable-transitions="true" | ||||
|           :key="index" | ||||
|           v-for="(tag, index) in row.tags" | ||||
|           :index="index" | ||||
|         > | ||||
|           {{ tag }} | ||||
|         </el-tag> | ||||
|       </template> | ||||
|     </Descriptions> | ||||
|     <!-- 操作按钮 --> | ||||
|     <template #footer> | ||||
|       <!-- 按钮:保存 --> | ||||
|  | ||||
| @ -15,7 +15,7 @@ export const rules = reactive({ | ||||
| const crudSchemas = reactive<VxeCrudSchema>({ | ||||
|   primaryKey: 'id', | ||||
|   primaryType: 'seq', | ||||
|   primaryTitle: '敏感词编号', // TODO 星语:如果长度超过 4 个字符,会导致表格列宽度不够,需要优化 | ||||
|   primaryTitle: '敏感词编号', | ||||
|   action: true, | ||||
|   columns: [ | ||||
|     { | ||||
| @ -25,7 +25,7 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||||
|     }, | ||||
|     { | ||||
|       title: '标签', | ||||
|       field: 'tags', // TODO 星语:如果是数组的话,是不是使用 el tag 展示呀? | ||||
|       field: 'tags', | ||||
|       table: { | ||||
|         slots: { | ||||
|           default: 'tags_default' | ||||
|  | ||||
| @ -122,7 +122,7 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||||
|     { | ||||
|       title: t('table.createTime'), | ||||
|       field: 'createTime', | ||||
|       formatter: 'formatDate', // TODO 星语:要不给 formatter = formatDate 的时候,设置一个它的默认宽度,避免缩进 | ||||
|       formatter: 'formatDate', | ||||
|       isForm: false | ||||
|     } | ||||
|   ] | ||||
|  | ||||
| @ -25,7 +25,7 @@ | ||||
|       ref="formRef" | ||||
|     > | ||||
|       <template #menuIds> | ||||
|         <el-card class="box-card"> | ||||
|         <el-card class="w-120"> | ||||
|           <template #header> | ||||
|             <div class="card-header"> | ||||
|               全选/全不选: | ||||
|  | ||||
| @ -36,7 +36,7 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||||
|     }, | ||||
|     { | ||||
|       title: '菜单权限', | ||||
|       field: 'menuIds', // TODO 星语:菜单权限,表单可以搞大点哇? | ||||
|       field: 'menuIds', | ||||
|       isTable: false | ||||
|     }, | ||||
|     { | ||||
|  | ||||
| @ -142,12 +142,15 @@ | ||||
|         <span>{{ row.dept?.name }}</span> | ||||
|       </template> | ||||
|       <template #postIds="{ row }"> | ||||
|         <template v-if="row.postIds !== ''"> | ||||
|           <el-tag v-for="(post, index) in row.postIds" :key="index" index=""> | ||||
|             <template v-for="postObj in postOptions"> | ||||
|               {{ post === postObj.id ? postObj.name : '' }} | ||||
|             </template> | ||||
|           </el-tag> | ||||
|         </template> | ||||
|         <template v-else> </template> | ||||
|       </template> | ||||
|     </Descriptions> | ||||
|     <!-- 操作按钮 --> | ||||
|     <template #footer> | ||||
| @ -379,7 +382,7 @@ const handleCreate = async () => { | ||||
|  | ||||
| // 修改操作 | ||||
| const handleUpdate = async (rowId: number) => { | ||||
|   setDialogTile('update') // TODO @星语:有警告 | ||||
|   setDialogTile('update') | ||||
|   await nextTick() | ||||
|   unref(formRef)?.delSchema('username') | ||||
|   unref(formRef)?.delSchema('password') | ||||
|  | ||||
| @ -13,8 +13,8 @@ export const rules = reactive({ | ||||
|   status: [required], | ||||
|   mobile: [ | ||||
|     { | ||||
|       pattern: | ||||
|         /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/, // TODO @星语:前端只校验长度,格式交给后端;因为号码格式不断在变的 | ||||
|       min: 11, | ||||
|       max: 11, | ||||
|       trigger: 'blur', | ||||
|       message: '请输入正确的手机号码' | ||||
|     } | ||||
| @ -57,12 +57,12 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||||
|     }, | ||||
|     { | ||||
|       title: '部门', | ||||
|       field: 'deptId', // TODO 星语:详情的部门没展示 | ||||
|       field: 'deptId', | ||||
|       isTable: false | ||||
|     }, | ||||
|     { | ||||
|       title: '岗位', | ||||
|       field: 'postIds', // TODO 星语:岗位为空的时候,要不要不展示 | ||||
|       field: 'postIds', | ||||
|       isTable: false | ||||
|     }, | ||||
|     { | ||||
| @ -75,7 +75,7 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||||
|     { | ||||
|       title: '最后登录时间', | ||||
|       field: 'loginDate', | ||||
|       formatter: 'formatDate', // TODO 星语:未登录的时候,不要展示 Invalid Date | ||||
|       formatter: 'formatDate', | ||||
|       isForm: false | ||||
|     }, | ||||
|     { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 xingyu
					xingyu