From 0d24db0aca0c88ee2ce8e4a10a35434dc2bc56bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Tue, 26 Dec 2023 16:17:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 91 +- src/App.vue | 10 +- src/api/auth.ts | 8 + src/components/table/header/index.vue | 153 ++ src/components/table/search/index.vue | 0 src/layouts/admin/index.vue | 132 +- src/utils/router.ts | 1 + src/utils/tableStore.ts | 1860 +------------------------ src/views/auth/menu/index.vue | 46 +- tsconfig.json | 2 +- 10 files changed, 307 insertions(+), 1996 deletions(-) create mode 100644 src/api/auth.ts delete mode 100644 src/components/table/search/index.vue diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f0f5c9d..7eea217 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - dependencies: '@element-plus/icons-vue': specifier: ^2.3.1 @@ -17,9 +13,6 @@ dependencies: crypto-js: specifier: ^4.2.0 version: 4.2.0 - default-passive-events: - specifier: ^2.0.0 - version: 2.0.0 echarts: specifier: ^5.4.3 version: 5.4.3 @@ -113,7 +106,7 @@ packages: dev: false /@esbuild/aix-ppc64@0.19.10: - resolution: {integrity: sha512-Q+mk96KJ+FZ30h9fsJl+67IjNJm3x2eX+GBWGmocAKgzp27cowCOOqSdscX80s0SpdFXZnIv/+1xD1EctFx96Q==, tarball: https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.10.tgz} + resolution: {integrity: sha512-Q+mk96KJ+FZ30h9fsJl+67IjNJm3x2eX+GBWGmocAKgzp27cowCOOqSdscX80s0SpdFXZnIv/+1xD1EctFx96Q==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] @@ -122,7 +115,7 @@ packages: optional: true /@esbuild/android-arm64@0.19.10: - resolution: {integrity: sha512-1X4CClKhDgC3by7k8aOWZeBXQX8dHT5QAMCAQDArCLaYfkppoARvh0fit3X2Qs+MXDngKcHv6XXyQCpY0hkK1Q==, tarball: https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.19.10.tgz} + resolution: {integrity: sha512-1X4CClKhDgC3by7k8aOWZeBXQX8dHT5QAMCAQDArCLaYfkppoARvh0fit3X2Qs+MXDngKcHv6XXyQCpY0hkK1Q==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -131,7 +124,7 @@ packages: optional: true /@esbuild/android-arm@0.19.10: - resolution: {integrity: sha512-7W0bK7qfkw1fc2viBfrtAEkDKHatYfHzr/jKAHNr9BvkYDXPcC6bodtm8AyLJNNuqClLNaeTLuwURt4PRT9d7w==, tarball: https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.19.10.tgz} + resolution: {integrity: sha512-7W0bK7qfkw1fc2viBfrtAEkDKHatYfHzr/jKAHNr9BvkYDXPcC6bodtm8AyLJNNuqClLNaeTLuwURt4PRT9d7w==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -140,7 +133,7 @@ packages: optional: true /@esbuild/android-x64@0.19.10: - resolution: {integrity: sha512-O/nO/g+/7NlitUxETkUv/IvADKuZXyH4BHf/g/7laqKC4i/7whLpB0gvpPc2zpF0q9Q6FXS3TS75QHac9MvVWw==, tarball: https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.19.10.tgz} + resolution: {integrity: sha512-O/nO/g+/7NlitUxETkUv/IvADKuZXyH4BHf/g/7laqKC4i/7whLpB0gvpPc2zpF0q9Q6FXS3TS75QHac9MvVWw==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -149,7 +142,7 @@ packages: optional: true /@esbuild/darwin-arm64@0.19.10: - resolution: {integrity: sha512-YSRRs2zOpwypck+6GL3wGXx2gNP7DXzetmo5pHXLrY/VIMsS59yKfjPizQ4lLt5vEI80M41gjm2BxrGZ5U+VMA==, tarball: https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.10.tgz} + resolution: {integrity: sha512-YSRRs2zOpwypck+6GL3wGXx2gNP7DXzetmo5pHXLrY/VIMsS59yKfjPizQ4lLt5vEI80M41gjm2BxrGZ5U+VMA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -158,7 +151,7 @@ packages: optional: true /@esbuild/darwin-x64@0.19.10: - resolution: {integrity: sha512-alfGtT+IEICKtNE54hbvPg13xGBe4GkVxyGWtzr+yHO7HIiRJppPDhOKq3zstTcVf8msXb/t4eavW3jCDpMSmA==, tarball: https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.19.10.tgz} + resolution: {integrity: sha512-alfGtT+IEICKtNE54hbvPg13xGBe4GkVxyGWtzr+yHO7HIiRJppPDhOKq3zstTcVf8msXb/t4eavW3jCDpMSmA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -167,7 +160,7 @@ packages: optional: true /@esbuild/freebsd-arm64@0.19.10: - resolution: {integrity: sha512-dMtk1wc7FSH8CCkE854GyGuNKCewlh+7heYP/sclpOG6Cectzk14qdUIY5CrKDbkA/OczXq9WesqnPl09mj5dg==, tarball: https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.10.tgz} + resolution: {integrity: sha512-dMtk1wc7FSH8CCkE854GyGuNKCewlh+7heYP/sclpOG6Cectzk14qdUIY5CrKDbkA/OczXq9WesqnPl09mj5dg==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -176,7 +169,7 @@ packages: optional: true /@esbuild/freebsd-x64@0.19.10: - resolution: {integrity: sha512-G5UPPspryHu1T3uX8WiOEUa6q6OlQh6gNl4CO4Iw5PS+Kg5bVggVFehzXBJY6X6RSOMS8iXDv2330VzaObm4Ag==, tarball: https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.10.tgz} + resolution: {integrity: sha512-G5UPPspryHu1T3uX8WiOEUa6q6OlQh6gNl4CO4Iw5PS+Kg5bVggVFehzXBJY6X6RSOMS8iXDv2330VzaObm4Ag==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -185,7 +178,7 @@ packages: optional: true /@esbuild/linux-arm64@0.19.10: - resolution: {integrity: sha512-QxaouHWZ+2KWEj7cGJmvTIHVALfhpGxo3WLmlYfJ+dA5fJB6lDEIg+oe/0//FuyVHuS3l79/wyBxbHr0NgtxJQ==, tarball: https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.19.10.tgz} + resolution: {integrity: sha512-QxaouHWZ+2KWEj7cGJmvTIHVALfhpGxo3WLmlYfJ+dA5fJB6lDEIg+oe/0//FuyVHuS3l79/wyBxbHr0NgtxJQ==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -194,7 +187,7 @@ packages: optional: true /@esbuild/linux-arm@0.19.10: - resolution: {integrity: sha512-j6gUW5aAaPgD416Hk9FHxn27On28H4eVI9rJ4az7oCGTFW48+LcgNDBN+9f8rKZz7EEowo889CPKyeaD0iw9Kg==, tarball: https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.19.10.tgz} + resolution: {integrity: sha512-j6gUW5aAaPgD416Hk9FHxn27On28H4eVI9rJ4az7oCGTFW48+LcgNDBN+9f8rKZz7EEowo889CPKyeaD0iw9Kg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -203,7 +196,7 @@ packages: optional: true /@esbuild/linux-ia32@0.19.10: - resolution: {integrity: sha512-4ub1YwXxYjj9h1UIZs2hYbnTZBtenPw5NfXCRgEkGb0b6OJ2gpkMvDqRDYIDRjRdWSe/TBiZltm3Y3Q8SN1xNg==, tarball: https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.19.10.tgz} + resolution: {integrity: sha512-4ub1YwXxYjj9h1UIZs2hYbnTZBtenPw5NfXCRgEkGb0b6OJ2gpkMvDqRDYIDRjRdWSe/TBiZltm3Y3Q8SN1xNg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -212,7 +205,7 @@ packages: optional: true /@esbuild/linux-loong64@0.19.10: - resolution: {integrity: sha512-lo3I9k+mbEKoxtoIbM0yC/MZ1i2wM0cIeOejlVdZ3D86LAcFXFRdeuZmh91QJvUTW51bOK5W2BznGNIl4+mDaA==, tarball: https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.19.10.tgz} + resolution: {integrity: sha512-lo3I9k+mbEKoxtoIbM0yC/MZ1i2wM0cIeOejlVdZ3D86LAcFXFRdeuZmh91QJvUTW51bOK5W2BznGNIl4+mDaA==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -221,7 +214,7 @@ packages: optional: true /@esbuild/linux-mips64el@0.19.10: - resolution: {integrity: sha512-J4gH3zhHNbdZN0Bcr1QUGVNkHTdpijgx5VMxeetSk6ntdt+vR1DqGmHxQYHRmNb77tP6GVvD+K0NyO4xjd7y4A==, tarball: https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.10.tgz} + resolution: {integrity: sha512-J4gH3zhHNbdZN0Bcr1QUGVNkHTdpijgx5VMxeetSk6ntdt+vR1DqGmHxQYHRmNb77tP6GVvD+K0NyO4xjd7y4A==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -230,7 +223,7 @@ packages: optional: true /@esbuild/linux-ppc64@0.19.10: - resolution: {integrity: sha512-tgT/7u+QhV6ge8wFMzaklOY7KqiyitgT1AUHMApau32ZlvTB/+efeCtMk4eXS+uEymYK249JsoiklZN64xt6oQ==, tarball: https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.10.tgz} + resolution: {integrity: sha512-tgT/7u+QhV6ge8wFMzaklOY7KqiyitgT1AUHMApau32ZlvTB/+efeCtMk4eXS+uEymYK249JsoiklZN64xt6oQ==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -239,7 +232,7 @@ packages: optional: true /@esbuild/linux-riscv64@0.19.10: - resolution: {integrity: sha512-0f/spw0PfBMZBNqtKe5FLzBDGo0SKZKvMl5PHYQr3+eiSscfJ96XEknCe+JoOayybWUFQbcJTrk946i3j9uYZA==, tarball: https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.10.tgz} + resolution: {integrity: sha512-0f/spw0PfBMZBNqtKe5FLzBDGo0SKZKvMl5PHYQr3+eiSscfJ96XEknCe+JoOayybWUFQbcJTrk946i3j9uYZA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -248,7 +241,7 @@ packages: optional: true /@esbuild/linux-s390x@0.19.10: - resolution: {integrity: sha512-pZFe0OeskMHzHa9U38g+z8Yx5FNCLFtUnJtQMpwhS+r4S566aK2ci3t4NCP4tjt6d5j5uo4h7tExZMjeKoehAA==, tarball: https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.19.10.tgz} + resolution: {integrity: sha512-pZFe0OeskMHzHa9U38g+z8Yx5FNCLFtUnJtQMpwhS+r4S566aK2ci3t4NCP4tjt6d5j5uo4h7tExZMjeKoehAA==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -257,7 +250,7 @@ packages: optional: true /@esbuild/linux-x64@0.19.10: - resolution: {integrity: sha512-SpYNEqg/6pZYoc+1zLCjVOYvxfZVZj6w0KROZ3Fje/QrM3nfvT2llI+wmKSrWuX6wmZeTapbarvuNNK/qepSgA==, tarball: https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.19.10.tgz} + resolution: {integrity: sha512-SpYNEqg/6pZYoc+1zLCjVOYvxfZVZj6w0KROZ3Fje/QrM3nfvT2llI+wmKSrWuX6wmZeTapbarvuNNK/qepSgA==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -266,7 +259,7 @@ packages: optional: true /@esbuild/netbsd-x64@0.19.10: - resolution: {integrity: sha512-ACbZ0vXy9zksNArWlk2c38NdKg25+L9pr/mVaj9SUq6lHZu/35nx2xnQVRGLrC1KKQqJKRIB0q8GspiHI3J80Q==, tarball: https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.10.tgz} + resolution: {integrity: sha512-ACbZ0vXy9zksNArWlk2c38NdKg25+L9pr/mVaj9SUq6lHZu/35nx2xnQVRGLrC1KKQqJKRIB0q8GspiHI3J80Q==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -275,7 +268,7 @@ packages: optional: true /@esbuild/openbsd-x64@0.19.10: - resolution: {integrity: sha512-PxcgvjdSjtgPMiPQrM3pwSaG4kGphP+bLSb+cihuP0LYdZv1epbAIecHVl5sD3npkfYBZ0ZnOjR878I7MdJDFg==, tarball: https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.10.tgz} + resolution: {integrity: sha512-PxcgvjdSjtgPMiPQrM3pwSaG4kGphP+bLSb+cihuP0LYdZv1epbAIecHVl5sD3npkfYBZ0ZnOjR878I7MdJDFg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -284,7 +277,7 @@ packages: optional: true /@esbuild/sunos-x64@0.19.10: - resolution: {integrity: sha512-ZkIOtrRL8SEJjr+VHjmW0znkPs+oJXhlJbNwfI37rvgeMtk3sxOQevXPXjmAPZPigVTncvFqLMd+uV0IBSEzqA==, tarball: https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.19.10.tgz} + resolution: {integrity: sha512-ZkIOtrRL8SEJjr+VHjmW0znkPs+oJXhlJbNwfI37rvgeMtk3sxOQevXPXjmAPZPigVTncvFqLMd+uV0IBSEzqA==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -293,7 +286,7 @@ packages: optional: true /@esbuild/win32-arm64@0.19.10: - resolution: {integrity: sha512-+Sa4oTDbpBfGpl3Hn3XiUe4f8TU2JF7aX8cOfqFYMMjXp6ma6NJDztl5FDG8Ezx0OjwGikIHw+iA54YLDNNVfw==, tarball: https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.19.10.tgz} + resolution: {integrity: sha512-+Sa4oTDbpBfGpl3Hn3XiUe4f8TU2JF7aX8cOfqFYMMjXp6ma6NJDztl5FDG8Ezx0OjwGikIHw+iA54YLDNNVfw==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -302,7 +295,7 @@ packages: optional: true /@esbuild/win32-ia32@0.19.10: - resolution: {integrity: sha512-EOGVLK1oWMBXgfttJdPHDTiivYSjX6jDNaATeNOaCOFEVcfMjtbx7WVQwPSE1eIfCp/CaSF2nSrDtzc4I9f8TQ==, tarball: https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.19.10.tgz} + resolution: {integrity: sha512-EOGVLK1oWMBXgfttJdPHDTiivYSjX6jDNaATeNOaCOFEVcfMjtbx7WVQwPSE1eIfCp/CaSF2nSrDtzc4I9f8TQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -311,7 +304,7 @@ packages: optional: true /@esbuild/win32-x64@0.19.10: - resolution: {integrity: sha512-whqLG6Sc70AbU73fFYvuYzaE4MNMBIlR1Y/IrUeOXFrWHxBEjjbZaQ3IXIQS8wJdAzue2GwYZCjOrgrU1oUHoA==, tarball: https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.19.10.tgz} + resolution: {integrity: sha512-whqLG6Sc70AbU73fFYvuYzaE4MNMBIlR1Y/IrUeOXFrWHxBEjjbZaQ3IXIQS8wJdAzue2GwYZCjOrgrU1oUHoA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -340,7 +333,7 @@ packages: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==, tarball: https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz} /@rollup/rollup-android-arm-eabi@4.9.1: - resolution: {integrity: sha512-6vMdBZqtq1dVQ4CWdhFwhKZL6E4L1dV6jUjuBvsavvNJSppzi6dLBbuV+3+IyUREaj9ZFvQefnQm28v4OCXlig==, tarball: https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.1.tgz} + resolution: {integrity: sha512-6vMdBZqtq1dVQ4CWdhFwhKZL6E4L1dV6jUjuBvsavvNJSppzi6dLBbuV+3+IyUREaj9ZFvQefnQm28v4OCXlig==} cpu: [arm] os: [android] requiresBuild: true @@ -348,7 +341,7 @@ packages: optional: true /@rollup/rollup-android-arm64@4.9.1: - resolution: {integrity: sha512-Jto9Fl3YQ9OLsTDWtLFPtaIMSL2kwGyGoVCmPC8Gxvym9TCZm4Sie+cVeblPO66YZsYH8MhBKDMGZ2NDxuk/XQ==, tarball: https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.1.tgz} + resolution: {integrity: sha512-Jto9Fl3YQ9OLsTDWtLFPtaIMSL2kwGyGoVCmPC8Gxvym9TCZm4Sie+cVeblPO66YZsYH8MhBKDMGZ2NDxuk/XQ==} cpu: [arm64] os: [android] requiresBuild: true @@ -356,7 +349,7 @@ packages: optional: true /@rollup/rollup-darwin-arm64@4.9.1: - resolution: {integrity: sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA==, tarball: https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.1.tgz} + resolution: {integrity: sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA==} cpu: [arm64] os: [darwin] requiresBuild: true @@ -364,7 +357,7 @@ packages: optional: true /@rollup/rollup-darwin-x64@4.9.1: - resolution: {integrity: sha512-KyP/byeXu9V+etKO6Lw3E4tW4QdcnzDG/ake031mg42lob5tN+5qfr+lkcT/SGZaH2PdW4Z1NX9GHEkZ8xV7og==, tarball: https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.1.tgz} + resolution: {integrity: sha512-KyP/byeXu9V+etKO6Lw3E4tW4QdcnzDG/ake031mg42lob5tN+5qfr+lkcT/SGZaH2PdW4Z1NX9GHEkZ8xV7og==} cpu: [x64] os: [darwin] requiresBuild: true @@ -372,7 +365,7 @@ packages: optional: true /@rollup/rollup-linux-arm-gnueabihf@4.9.1: - resolution: {integrity: sha512-Yqz/Doumf3QTKplwGNrCHe/B2p9xqDghBZSlAY0/hU6ikuDVQuOUIpDP/YcmoT+447tsZTmirmjgG3znvSCR0Q==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.1.tgz} + resolution: {integrity: sha512-Yqz/Doumf3QTKplwGNrCHe/B2p9xqDghBZSlAY0/hU6ikuDVQuOUIpDP/YcmoT+447tsZTmirmjgG3znvSCR0Q==} cpu: [arm] os: [linux] requiresBuild: true @@ -380,7 +373,7 @@ packages: optional: true /@rollup/rollup-linux-arm64-gnu@4.9.1: - resolution: {integrity: sha512-u3XkZVvxcvlAOlQJ3UsD1rFvLWqu4Ef/Ggl40WAVCuogf4S1nJPHh5RTgqYFpCOvuGJ7H5yGHabjFKEZGExk5Q==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.1.tgz} + resolution: {integrity: sha512-u3XkZVvxcvlAOlQJ3UsD1rFvLWqu4Ef/Ggl40WAVCuogf4S1nJPHh5RTgqYFpCOvuGJ7H5yGHabjFKEZGExk5Q==} cpu: [arm64] os: [linux] libc: [glibc] @@ -389,7 +382,7 @@ packages: optional: true /@rollup/rollup-linux-arm64-musl@4.9.1: - resolution: {integrity: sha512-0XSYN/rfWShW+i+qjZ0phc6vZ7UWI8XWNz4E/l+6edFt+FxoEghrJHjX1EY/kcUGCnZzYYRCl31SNdfOi450Aw==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.1.tgz} + resolution: {integrity: sha512-0XSYN/rfWShW+i+qjZ0phc6vZ7UWI8XWNz4E/l+6edFt+FxoEghrJHjX1EY/kcUGCnZzYYRCl31SNdfOi450Aw==} cpu: [arm64] os: [linux] libc: [musl] @@ -398,7 +391,7 @@ packages: optional: true /@rollup/rollup-linux-riscv64-gnu@4.9.1: - resolution: {integrity: sha512-LmYIO65oZVfFt9t6cpYkbC4d5lKHLYv5B4CSHRpnANq0VZUQXGcCPXHzbCXCz4RQnx7jvlYB1ISVNCE/omz5cw==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.1.tgz} + resolution: {integrity: sha512-LmYIO65oZVfFt9t6cpYkbC4d5lKHLYv5B4CSHRpnANq0VZUQXGcCPXHzbCXCz4RQnx7jvlYB1ISVNCE/omz5cw==} cpu: [riscv64] os: [linux] libc: [glibc] @@ -407,7 +400,7 @@ packages: optional: true /@rollup/rollup-linux-x64-gnu@4.9.1: - resolution: {integrity: sha512-kr8rEPQ6ns/Lmr/hiw8sEVj9aa07gh1/tQF2Y5HrNCCEPiCBGnBUt9tVusrcBBiJfIt1yNaXN6r1CCmpbFEDpg==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.1.tgz} + resolution: {integrity: sha512-kr8rEPQ6ns/Lmr/hiw8sEVj9aa07gh1/tQF2Y5HrNCCEPiCBGnBUt9tVusrcBBiJfIt1yNaXN6r1CCmpbFEDpg==} cpu: [x64] os: [linux] libc: [glibc] @@ -416,7 +409,7 @@ packages: optional: true /@rollup/rollup-linux-x64-musl@4.9.1: - resolution: {integrity: sha512-t4QSR7gN+OEZLG0MiCgPqMWZGwmeHhsM4AkegJ0Kiy6TnJ9vZ8dEIwHw1LcZKhbHxTY32hp9eVCMdR3/I8MGRw==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.1.tgz} + resolution: {integrity: sha512-t4QSR7gN+OEZLG0MiCgPqMWZGwmeHhsM4AkegJ0Kiy6TnJ9vZ8dEIwHw1LcZKhbHxTY32hp9eVCMdR3/I8MGRw==} cpu: [x64] os: [linux] libc: [musl] @@ -425,7 +418,7 @@ packages: optional: true /@rollup/rollup-win32-arm64-msvc@4.9.1: - resolution: {integrity: sha512-7XI4ZCBN34cb+BH557FJPmh0kmNz2c25SCQeT9OiFWEgf8+dL6ZwJ8f9RnUIit+j01u07Yvrsuu1rZGxJCc51g==, tarball: https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.1.tgz} + resolution: {integrity: sha512-7XI4ZCBN34cb+BH557FJPmh0kmNz2c25SCQeT9OiFWEgf8+dL6ZwJ8f9RnUIit+j01u07Yvrsuu1rZGxJCc51g==} cpu: [arm64] os: [win32] requiresBuild: true @@ -433,7 +426,7 @@ packages: optional: true /@rollup/rollup-win32-ia32-msvc@4.9.1: - resolution: {integrity: sha512-yE5c2j1lSWOH5jp+Q0qNL3Mdhr8WuqCNVjc6BxbVfS5cAS6zRmdiw7ktb8GNpDCEUJphILY6KACoFoRtKoqNQg==, tarball: https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.1.tgz} + resolution: {integrity: sha512-yE5c2j1lSWOH5jp+Q0qNL3Mdhr8WuqCNVjc6BxbVfS5cAS6zRmdiw7ktb8GNpDCEUJphILY6KACoFoRtKoqNQg==} cpu: [ia32] os: [win32] requiresBuild: true @@ -441,7 +434,7 @@ packages: optional: true /@rollup/rollup-win32-x64-msvc@4.9.1: - resolution: {integrity: sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA==, tarball: https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.1.tgz} + resolution: {integrity: sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA==} cpu: [x64] os: [win32] requiresBuild: true @@ -449,7 +442,7 @@ packages: optional: true /@sxzz/popperjs-es@2.11.7: - resolution: {integrity: sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==, tarball: https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz} + resolution: {integrity: sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==} dev: false /@types/lodash-es@4.17.12: @@ -740,10 +733,6 @@ packages: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==, tarball: https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz} dev: true - /default-passive-events@2.0.0: - resolution: {integrity: sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ==, tarball: https://registry.npmmirror.com/default-passive-events/-/default-passive-events-2.0.0.tgz} - dev: false - /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==, tarball: https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz} engines: {node: '>=0.4.0'} @@ -846,7 +835,7 @@ packages: dev: false /fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, tarball: https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz} + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -1208,3 +1197,7 @@ packages: dependencies: tslib: 2.3.0 dev: false + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/src/App.vue b/src/App.vue index 689160a..42bbe54 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,4 +1,10 @@ - + + diff --git a/src/api/auth.ts b/src/api/auth.ts new file mode 100644 index 0000000..4d9343c --- /dev/null +++ b/src/api/auth.ts @@ -0,0 +1,8 @@ +import createAxios from '@/utils/request' + +//登录获取token +export function getRouteMenu() { + return createAxios({ + url: '/user-boot/function/getRouteMenu' + }) +} diff --git a/src/components/table/header/index.vue b/src/components/table/header/index.vue index e69de29..b452d1c 100644 --- a/src/components/table/header/index.vue +++ b/src/components/table/header/index.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/src/components/table/search/index.vue b/src/components/table/search/index.vue deleted file mode 100644 index e69de29..0000000 diff --git a/src/layouts/admin/index.vue b/src/layouts/admin/index.vue index 46908f1..8cc8d29 100644 --- a/src/layouts/admin/index.vue +++ b/src/layouts/admin/index.vue @@ -19,6 +19,7 @@ import { useEventListener } from '@vueuse/core' import { isEmpty } from 'lodash-es' import { setNavTabsWidth } from '@/utils/layout' import { adminBaseRoutePath } from '@/router/static' +import { getRouteMenu } from '@/api/auth' defineOptions({ components: { Default, Classic, Streamline, Double } @@ -49,111 +50,38 @@ const init = () => { /** * 后台初始化请求,获取站点配置,动态路由等信息 */ - handleAdminRoute([ - { - id: 1, - pid: 0, - type: 'menu', - title: '控制台', - name: 'dashboard', - path: 'dashboard', - icon: 'fa fa-dashboard', - menu_type: 'tab', - url: '', - component: '/src/views/dashboard/index.vue', - keepalive: 'dashboard', - extend: 'none', - children: [ - { - id: 94, - pid: 1, - type: 'button', - title: '查看', - name: 'dashboard/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none' + getRouteMenu().then((res: any) => { + const handlerMenu = (data: any) => { + data.forEach((item: any) => { + item.path = item.routeName || item.title + item.name = item.routeName || item.title + item.component = '/src/views/dashboard/index.vue' + item.type = item.children && item.children.length > 0 ? 'menu_dir' : 'menu' + item.menu_type = item.children && item.children.length > 0 ? null : 'tab' + if (item.children) { + handlerMenu(item.children) } - ] - }, - { - id: 3, - pid: 0, - type: 'menu', - title: '测试1', - name: 'test', - path: 'test', - icon: 'fa fa-dashboard', - menu_type: 'tab', - url: '', - component: '/src/views/dashboard/test.vue', - keepalive: 'test', - extend: 'none' - }, - { - id: 2, - pid: 0, - type: 'menu_dir', - title: '权限管理', - name: 'auth', - path: 'auth', - icon: 'fa fa-group', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - children: [ - { - id: 3, - pid: 2, - type: 'menu', - title: '角色管理', - name: 'auth/role', - path: 'auth/role', - icon: 'fa fa-group', - menu_type: 'tab', - url: '', - component: '/src/views/auth/role.vue', - keepalive: 'auth/role', - extend: 'none', - children: [] - }, - { - id: 13, - pid: 2, - type: 'menu', - title: '菜单规则管理', - name: 'auth/menu', - path: 'auth/menu', - icon: 'el-icon-Grid', - menu_type: 'tab', - url: '', - component: '/src/views/auth/menu/index.vue', - keepalive: 'auth/menu', - extend: 'none', - children: [] - } - ] + }) } - ]) - // 预跳转到上次路径 - if (route.params.to) { - const lastRoute = JSON.parse(route.params.to as string) - if (lastRoute.path != adminBaseRoutePath) { - let query = !isEmpty(lastRoute.query) ? lastRoute.query : {} - routePush({ path: lastRoute.path, query: query }) - return - } - } + handlerMenu(res.data) + handleAdminRoute(res.data) - // 跳转到第一个菜单 - let firstRoute = getFirstRoute(navTabs.state.tabsViewRoutes) - if (firstRoute) routePush(firstRoute.path) + // 预跳转到上次路径 + if (route.params.to) { + const lastRoute = JSON.parse(route.params.to as string) + if (lastRoute.path != adminBaseRoutePath) { + let query = !isEmpty(lastRoute.query) ? lastRoute.query : {} + routePush({ path: lastRoute.path, query: query }) + return + } + } + + // 跳转到第一个菜单 + console.log(navTabs.state.tabsViewRoutes) + let firstRoute = getFirstRoute(navTabs.state.tabsViewRoutes) + console.log(firstRoute) + if (firstRoute) routePush(firstRoute.path) + }) } const onAdaptiveLayout = () => { diff --git a/src/utils/router.ts b/src/utils/router.ts index ada4af5..e242168 100644 --- a/src/utils/router.ts +++ b/src/utils/router.ts @@ -8,6 +8,7 @@ import { closeShade } from '@/utils/pageShade' import { adminBaseRoute } from '@/router/static' import { compact, isEmpty, reverse } from 'lodash-es' import { isAdminApp } from '@/utils/common' +import { log } from 'console' /** * 导航失败有错误消息的路由push diff --git a/src/utils/tableStore.ts b/src/utils/tableStore.ts index b8f5bc6..82ee28f 100644 --- a/src/utils/tableStore.ts +++ b/src/utils/tableStore.ts @@ -1,14 +1,20 @@ import { reactive } from 'vue' +import createAxios from '@/utils/request' +import { requestPayload } from '@/utils/request' +import { Method } from 'axios' interface TableStoreParams { url: string pk?: string column: TableColumn[] params?: anyObj + method?: Method } + export default class TableStore { public url public pk + public method: Method public table: CnTable = reactive({ ref: null, selection: [], @@ -25,1849 +31,27 @@ export default class TableStore { constructor(public options: TableStoreParams) { this.url = options.url this.pk = options.pk || 'id' + this.method = options.method || 'GET' this.table.column = options.column Object.assign(this.table.params, options.params) } + index() { - // 请求 - this.table.data = [ - { - id: 1, - pid: 0, - type: 'menu', - title: '控制台', - name: 'dashboard', - path: 'dashboard', - icon: 'fa fa-dashboard', - menu_type: 'tab', - url: '', - component: '/src/views/backend/dashboard.vue', - keepalive: 1, - extend: 'none', - remark: 'Remark lang', - weigh: 999, - status: '1', - update_time: 1651926966, - create_time: 1646889188, - children: [ - { - id: 94, - pid: 1, - type: 'button', - title: '查看', - name: 'dashboard/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 0, - status: '1', - update_time: 1694467750, - create_time: 1694467750 - } - ] - }, - { - id: 2, - pid: 0, - type: 'menu_dir', - title: '权限管理', - name: 'auth', - path: 'auth', - icon: 'fa fa-group', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 100, - status: '1', - update_time: 1648948034, - create_time: 1645876529, - children: [ - { - id: 3, - pid: 2, - type: 'menu', - title: '角色组管理', - name: 'auth/group', - path: 'auth/group', - icon: 'fa fa-group', - menu_type: 'tab', - url: '', - component: '/src/views/backend/auth/group/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 99, - status: '1', - update_time: 1648162157, - create_time: 1646927597, - children: [ - { - id: 4, - pid: 3, - type: 'button', - title: '查看', - name: 'auth/group/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 99, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 5, - pid: 3, - type: 'button', - title: '添加', - name: 'auth/group/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 99, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 6, - pid: 3, - type: 'button', - title: '编辑', - name: 'auth/group/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 99, - status: '1', - update_time: 1648065864, - create_time: 1647806129 - }, - { - id: 7, - pid: 3, - type: 'button', - title: '删除', - name: 'auth/group/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 99, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 8, - pid: 2, - type: 'menu', - title: '管理员管理', - name: 'auth/admin', - path: 'auth/admin', - icon: 'el-icon-UserFilled', - menu_type: 'tab', - url: '', - component: '/src/views/backend/auth/admin/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 98, - status: '1', - update_time: 1648067239, - create_time: 1647549566, - children: [ - { - id: 9, - pid: 8, - type: 'button', - title: '查看', - name: 'auth/admin/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 98, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 10, - pid: 8, - type: 'button', - title: '添加', - name: 'auth/admin/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 98, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 11, - pid: 8, - type: 'button', - title: '编辑', - name: 'auth/admin/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 98, - status: '1', - update_time: 1648065864, - create_time: 1647806129 - }, - { - id: 12, - pid: 8, - type: 'button', - title: '删除', - name: 'auth/admin/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 98, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 13, - pid: 2, - type: 'menu', - title: '菜单规则管理', - name: 'auth/rule', - path: 'auth/rule', - icon: 'el-icon-Grid', - menu_type: 'tab', - url: '', - component: '/src/views/backend/auth/rule/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 97, - status: '1', - update_time: 1648133759, - create_time: 1645876529, - children: [ - { - id: 14, - pid: 13, - type: 'button', - title: '查看', - name: 'auth/rule/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 97, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 15, - pid: 13, - type: 'button', - title: '添加', - name: 'auth/rule/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 97, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 16, - pid: 13, - type: 'button', - title: '编辑', - name: 'auth/rule/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 97, - status: '1', - update_time: 1648065864, - create_time: 1647806129 - }, - { - id: 17, - pid: 13, - type: 'button', - title: '删除', - name: 'auth/rule/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 97, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 18, - pid: 13, - type: 'button', - title: '快速排序', - name: 'auth/rule/sortable', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 97, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 19, - pid: 2, - type: 'menu', - title: '管理员日志管理', - name: 'auth/adminLog', - path: 'auth/adminLog', - icon: 'el-icon-List', - menu_type: 'tab', - url: '', - component: '/src/views/backend/auth/adminLog/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 96, - status: '1', - update_time: 1648067241, - create_time: 1647963918, - children: [ - { - id: 20, - pid: 19, - type: 'button', - title: '查看', - name: 'auth/adminLog/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 96, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - } - ] - }, - { - id: 21, - pid: 0, - type: 'menu_dir', - title: '会员管理', - name: 'user', - path: 'user', - icon: 'fa fa-drivers-license', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 95, - status: '1', - update_time: 1648947448, - create_time: 1648049553, - children: [ - { - id: 22, - pid: 21, - type: 'menu', - title: '会员管理', - name: 'user/user', - path: 'user/user', - icon: 'fa fa-user', - menu_type: 'tab', - url: '', - component: '/src/views/backend/user/user/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 94, - status: '1', - update_time: 1648255019, - create_time: 1648049712, - children: [ - { - id: 23, - pid: 22, - type: 'button', - title: '查看', - name: 'user/user/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 94, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 24, - pid: 22, - type: 'button', - title: '添加', - name: 'user/user/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 94, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 25, - pid: 22, - type: 'button', - title: '编辑', - name: 'user/user/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 94, - status: '1', - update_time: 1648065864, - create_time: 1647806129 - }, - { - id: 26, - pid: 22, - type: 'button', - title: '删除', - name: 'user/user/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 94, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 27, - pid: 21, - type: 'menu', - title: '会员分组管理', - name: 'user/group', - path: 'user/group', - icon: 'fa fa-group', - menu_type: 'tab', - url: '', - component: '/src/views/backend/user/group/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 93, - status: '1', - update_time: 1648067248, - create_time: 1648051141, - children: [ - { - id: 28, - pid: 27, - type: 'button', - title: '查看', - name: 'user/group/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 93, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 29, - pid: 27, - type: 'button', - title: '添加', - name: 'user/group/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 93, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 30, - pid: 27, - type: 'button', - title: '编辑', - name: 'user/group/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 93, - status: '1', - update_time: 1648065864, - create_time: 1647806129 - }, - { - id: 31, - pid: 27, - type: 'button', - title: '删除', - name: 'user/group/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 93, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 32, - pid: 21, - type: 'menu', - title: '会员规则管理', - name: 'user/rule', - path: 'user/rule', - icon: 'fa fa-th-list', - menu_type: 'tab', - url: '', - component: '/src/views/backend/user/rule/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 92, - status: '1', - update_time: 1648067247, - create_time: 1648051207, - children: [ - { - id: 33, - pid: 32, - type: 'button', - title: '查看', - name: 'user/rule/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 92, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 34, - pid: 32, - type: 'button', - title: '添加', - name: 'user/rule/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 92, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 35, - pid: 32, - type: 'button', - title: '编辑', - name: 'user/rule/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 92, - status: '1', - update_time: 1648065864, - create_time: 1647806129 - }, - { - id: 36, - pid: 32, - type: 'button', - title: '删除', - name: 'user/rule/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 92, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 37, - pid: 32, - type: 'button', - title: '快速排序', - name: 'user/rule/sortable', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 92, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 38, - pid: 21, - type: 'menu', - title: '会员余额管理', - name: 'user/moneyLog', - path: 'user/moneyLog', - icon: 'el-icon-Money', - menu_type: 'tab', - url: '', - component: '/src/views/backend/user/moneyLog/index.vue', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 91, - status: '1', - update_time: 1648437356, - create_time: 1648052587, - children: [ - { - id: 39, - pid: 38, - type: 'button', - title: '查看', - name: 'user/moneyLog/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 91, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 40, - pid: 38, - type: 'button', - title: '添加', - name: 'user/moneyLog/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 91, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 41, - pid: 21, - type: 'menu', - title: '会员积分管理', - name: 'user/scoreLog', - path: 'user/scoreLog', - icon: 'el-icon-Discount', - menu_type: 'tab', - url: '', - component: '/src/views/backend/user/scoreLog/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 90, - status: '1', - update_time: 1648067246, - create_time: 1648052689, - children: [ - { - id: 42, - pid: 41, - type: 'button', - title: '查看', - name: 'user/scoreLog/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 90, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 43, - pid: 41, - type: 'button', - title: '添加', - name: 'user/scoreLog/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 90, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - } - ] - }, - { - id: 44, - pid: 0, - type: 'menu_dir', - title: '常规管理', - name: 'routine', - path: 'routine', - icon: 'fa fa-cogs', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 89, - status: '1', - update_time: 1648133739, - create_time: 1645876529, - children: [ - { - id: 45, - pid: 44, - type: 'menu', - title: '系统配置', - name: 'routine/config', - path: 'routine/config', - icon: 'el-icon-Tools', - menu_type: 'tab', - url: '', - component: '/src/views/backend/routine/config/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 88, - status: '1', - update_time: 1648781089, - create_time: 1648053389, - children: [ - { - id: 46, - pid: 45, - type: 'button', - title: '查看', - name: 'routine/config/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 88, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 47, - pid: 45, - type: 'button', - title: '编辑', - name: 'routine/config/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 88, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 77, - pid: 45, - type: 'button', - title: '添加', - name: 'routine/config/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 88, - status: '1', - update_time: 1655375826, - create_time: 1655375812 - } - ] - }, - { - id: 48, - pid: 44, - type: 'menu', - title: '附件管理', - name: 'routine/attachment', - path: 'routine/attachment', - icon: 'fa fa-folder', - menu_type: 'tab', - url: '', - component: '/src/views/backend/routine/attachment/index.vue', - keepalive: 1, - extend: 'none', - remark: 'Remark lang', - weigh: 87, - status: '1', - update_time: 1648067228, - create_time: 1647105410, - children: [ - { - id: 49, - pid: 48, - type: 'button', - title: '查看', - name: 'routine/attachment/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 87, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 50, - pid: 48, - type: 'button', - title: '编辑', - name: 'routine/attachment/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 87, - status: '1', - update_time: 1648065864, - create_time: 1647806129 - }, - { - id: 51, - pid: 48, - type: 'button', - title: '删除', - name: 'routine/attachment/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 87, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 52, - pid: 44, - type: 'menu', - title: '个人资料', - name: 'routine/adminInfo', - path: 'routine/adminInfo', - icon: 'fa fa-user', - menu_type: 'tab', - url: '', - component: '/src/views/backend/routine/adminInfo.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 86, - status: '1', - update_time: 1648067229, - create_time: 1645876529, - children: [ - { - id: 53, - pid: 52, - type: 'button', - title: '查看', - name: 'routine/adminInfo/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 86, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 54, - pid: 52, - type: 'button', - title: '编辑', - name: 'routine/adminInfo/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 86, - status: '1', - update_time: 1648065864, - create_time: 1647806129 - } - ] - } - ] - }, - { - id: 78, - pid: 0, - type: 'menu', - title: '模块市场', - name: 'moduleStore/moduleStore', - path: 'moduleStore', - icon: 'el-icon-GoodsFilled', - menu_type: 'tab', - url: '', - component: '/src/views/backend/module/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 86, - status: '1', - update_time: 1661317584, - create_time: 1661317424, - children: [ - { - id: 83, - pid: 78, - type: 'button', - title: '更新', - name: 'moduleStore/moduleStore/update', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 5, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 82, - pid: 78, - type: 'button', - title: '卸载', - name: 'moduleStore/moduleStore/uninstall', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 4, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 81, - pid: 78, - type: 'button', - title: '调整状态', - name: 'moduleStore/moduleStore/changeState', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 3, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 80, - pid: 78, - type: 'button', - title: '安装', - name: 'moduleStore/moduleStore/install', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 2, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 79, - pid: 78, - type: 'button', - title: '查看', - name: 'moduleStore/moduleStore/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 1, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 55, - pid: 0, - type: 'menu_dir', - title: '数据安全管理', - name: 'security', - path: 'security', - icon: 'fa fa-shield', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 85, - status: '1', - update_time: 1649853629, - create_time: 1648948025, - children: [ - { - id: 56, - pid: 55, - type: 'menu', - title: '数据回收站', - name: 'security/dataRecycleLog', - path: 'security/dataRecycleLog', - icon: 'fa fa-database', - menu_type: 'tab', - url: '', - component: '/src/views/backend/security/dataRecycleLog/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 84, - status: '1', - update_time: 1651603319, - create_time: 1648948283, - children: [ - { - id: 57, - pid: 56, - type: 'button', - title: '查看', - name: 'security/dataRecycleLog/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 84, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 58, - pid: 56, - type: 'button', - title: '删除', - name: 'security/dataRecycleLog/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 84, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 59, - pid: 56, - type: 'button', - title: '还原', - name: 'security/dataRecycleLog/restore', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 84, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 60, - pid: 56, - type: 'button', - title: '查看详情', - name: 'security/dataRecycleLog/info', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 84, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 61, - pid: 55, - type: 'menu', - title: '敏感数据修改记录', - name: 'security/sensitiveDataLog', - path: 'security/sensitiveDataLog', - icon: 'fa fa-expeditedssl', - menu_type: 'tab', - url: '', - component: '/src/views/backend/security/sensitiveDataLog/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 83, - status: '1', - update_time: 1649112262, - create_time: 1649059604, - children: [ - { - id: 62, - pid: 61, - type: 'button', - title: '查看', - name: 'security/sensitiveDataLog/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 83, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 63, - pid: 61, - type: 'button', - title: '删除', - name: 'security/sensitiveDataLog/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 83, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 64, - pid: 61, - type: 'button', - title: '回滚', - name: 'security/sensitiveDataLog/rollback', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 83, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 65, - pid: 61, - type: 'button', - title: '查看详情', - name: 'security/sensitiveDataLog/info', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 83, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 66, - pid: 55, - type: 'menu', - title: '数据回收规则管理', - name: 'security/dataRecycle', - path: 'security/dataRecycle', - icon: 'fa fa-database', - menu_type: 'tab', - url: '', - component: '/src/views/backend/security/dataRecycle/index.vue', - keepalive: 1, - extend: 'none', - remark: '在此定义需要回收的数据,实现数据自动统一回收', - weigh: 82, - status: '1', - update_time: 1651603319, - create_time: 1648948215, - children: [ - { - id: 67, - pid: 66, - type: 'button', - title: '查看', - name: 'security/dataRecycle/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 82, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 68, - pid: 66, - type: 'button', - title: '添加', - name: 'security/dataRecycle/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 82, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 69, - pid: 66, - type: 'button', - title: '编辑', - name: 'security/dataRecycle/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 82, - status: '1', - update_time: 1648065864, - create_time: 1647806129 - }, - { - id: 70, - pid: 66, - type: 'button', - title: '删除', - name: 'security/dataRecycle/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 82, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - }, - { - id: 71, - pid: 55, - type: 'menu', - title: '敏感字段规则管理', - name: 'security/sensitiveData', - path: 'security/sensitiveData', - icon: 'fa fa-expeditedssl', - menu_type: 'tab', - url: '', - component: '/src/views/backend/security/sensitiveData/index.vue', - keepalive: 1, - extend: 'none', - remark: '在此定义需要保护的敏感字段,随后系统将自动监听该字段的修改操作,并提供了敏感字段的修改回滚功能', - weigh: 81, - status: '1', - update_time: 1649112263, - create_time: 1649005119, - children: [ - { - id: 72, - pid: 71, - type: 'button', - title: '查看', - name: 'security/sensitiveData/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 81, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 73, - pid: 71, - type: 'button', - title: '添加', - name: 'security/sensitiveData/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 81, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - }, - { - id: 74, - pid: 71, - type: 'button', - title: '编辑', - name: 'security/sensitiveData/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 81, - status: '1', - update_time: 1648065864, - create_time: 1647806129 - }, - { - id: 75, - pid: 71, - type: 'button', - title: '删除', - name: 'security/sensitiveData/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 81, - status: '1', - update_time: 1648065864, - create_time: 1647806112 - } - ] - } - ] - }, - { - id: 90, - pid: 0, - type: 'menu', - title: 'CRUD代码生成', - name: 'crud/crud', - path: 'crud/crud', - icon: 'fa fa-code', - menu_type: 'tab', - url: '', - component: '/src/views/backend/crud/index.vue', - keepalive: 1, - extend: 'none', - remark: '', - weigh: 80, - status: '1', - update_time: 1668848266, - create_time: 1668848266, - children: [] - }, - { - id: 76, - pid: 0, - type: 'menu', - title: 'BuildAdmin', - name: 'buildadmin', - path: 'buildadmin', - icon: 'local-logo', - menu_type: 'link', - url: 'https://doc.buildadmin.com', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 0, - status: '0', - update_time: 1651926977, - create_time: 1648947396, - children: [] - }, - { - id: 84, - pid: 0, - type: 'menu', - title: '知识库(可修改)', - name: 'testBuild', - path: 'testBuild', - icon: 'el-icon-Notebook', - menu_type: 'tab', - url: '', - component: '/src/views/backend/testBuild/index.vue', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 0, - status: '1', - update_time: 1663685642, - create_time: 1663685461, - children: [ - { - id: 91, - pid: 84, - type: 'button', - title: '查看', - name: 'crud/crud/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 3, - status: '1', - update_time: 1668848809, - create_time: 1668848770 - }, - { - id: 92, - pid: 84, - type: 'button', - title: '生成', - name: 'crud/crud/generate', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 2, - status: '1', - update_time: 1668848809, - create_time: 1668848770 - }, - { - id: 93, - pid: 84, - type: 'button', - title: '删除', - name: 'crud/crud/delete', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 1, - status: '1', - update_time: 1668848921, - create_time: 1668848921 - }, - { - id: 85, - pid: 84, - type: 'button', - title: '查看', - name: 'testBuild/index', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 0, - status: '1', - update_time: 1663685461, - create_time: 1663685461 - }, - { - id: 86, - pid: 84, - type: 'button', - title: '添加', - name: 'testBuild/add', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 0, - status: '1', - update_time: 1663685461, - create_time: 1663685461 - }, - { - id: 87, - pid: 84, - type: 'button', - title: '编辑', - name: 'testBuild/edit', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 0, - status: '1', - update_time: 1663685461, - create_time: 1663685461 - }, - { - id: 88, - pid: 84, - type: 'button', - title: '删除', - name: 'testBuild/del', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 0, - status: '1', - update_time: 1663685461, - create_time: 1663685461 - }, - { - id: 89, - pid: 84, - type: 'button', - title: '快速排序', - name: 'testBuild/sortable', - path: '', - icon: '', - menu_type: null, - url: '', - component: '', - keepalive: 0, - extend: 'none', - remark: '', - weigh: 0, - status: '1', - update_time: 1663685461, - create_time: 1663685461 - } - ] - } - ] - this.table.loading = false + createAxios( + Object.assign( + { + url: this.url, + method: this.method + }, + requestPayload(this.method, this.table.params) + ) + ).then((res: any) => { + this.table.data = res.data.records || res.data + this.table.total = res.data.total || res.data.length + this.table.loading = false + }) } + /** * 表格内的事件统一响应 * @param event 事件:selection-change=选中项改变,page-size-change=每页数量改变,current-page-change=翻页 diff --git a/src/views/auth/menu/index.vue b/src/views/auth/menu/index.vue index f54b060..3735de3 100644 --- a/src/views/auth/menu/index.vue +++ b/src/views/auth/menu/index.vue @@ -1,26 +1,64 @@