diff --git a/continew-admin-ui/.eslintrc.js b/continew-admin-ui/.eslintrc.js index 739d8186..5cd80405 100644 --- a/continew-admin-ui/.eslintrc.js +++ b/continew-admin-ui/.eslintrc.js @@ -36,6 +36,7 @@ module.exports = { }, }, rules: { + 'import/prefer-default-export': 'off', 'prettier/prettier': 1, // Vue: Recommended rules to be closed or modify 'vue/require-default-prop': 0, diff --git a/continew-admin-ui/package.json b/continew-admin-ui/package.json index aeba0330..1f8b4485 100644 --- a/continew-admin-ui/package.json +++ b/continew-admin-ui/package.json @@ -48,6 +48,7 @@ "pinia": "^2.1.7", "query-string": "^8.1.0", "sortablejs": "^1.15.0", + "v-viewer": "^1.6.4", "vue": "^3.3.7", "vue-codemirror": "^6.1.1", "vue-cropper": "^1.1.1", @@ -55,7 +56,8 @@ "vue-i18n": "^9.6.5", "vue-json-pretty": "^2.2.4", "vue-router": "^4.2.5", - "vue3-colorpicker": "^2.2.2" + "vue3-colorpicker": "^2.2.2", + "xgplayer": "^3.0.11" }, "devDependencies": { "@arco-plugins/vite-vue": "^1.4.5", @@ -87,6 +89,7 @@ "prettier": "^3.0.3", "rollup": "^4.3.0", "rollup-plugin-visualizer": "^5.9.2", + "sass": "^1.69.5", "stylelint": "^15.11.0", "stylelint-config-prettier": "^9.0.5", "stylelint-config-rational-order": "^0.1.2", diff --git a/continew-admin-ui/pnpm-lock.yaml b/continew-admin-ui/pnpm-lock.yaml index 9ff8933d..778a1ba7 100644 --- a/continew-admin-ui/pnpm-lock.yaml +++ b/continew-admin-ui/pnpm-lock.yaml @@ -59,6 +59,9 @@ dependencies: sortablejs: specifier: ^1.15.0 version: 1.15.0 + v-viewer: + specifier: ^1.6.4 + version: 1.6.4 vue: specifier: ^3.3.7 version: 3.3.7(typescript@5.2.2) @@ -83,6 +86,9 @@ dependencies: vue3-colorpicker: specifier: ^2.2.2 version: 2.2.2(@aesoper/normal-utils@0.1.5)(@popperjs/core@2.11.8)(@vueuse/core@10.5.0)(gradient-parser@1.0.2)(lodash-es@4.17.21)(tinycolor2@1.6.0)(vue-types@4.2.1)(vue@3.3.7) + xgplayer: + specifier: ^3.0.11 + version: 3.0.11(core-js@3.34.0) devDependencies: '@arco-plugins/vite-vue': @@ -172,6 +178,9 @@ devDependencies: rollup-plugin-visualizer: specifier: ^5.9.2 version: 5.9.2(rollup@4.3.0) + sass: + specifier: ^1.69.5 + version: 1.69.5 stylelint: specifier: ^15.11.0 version: 15.11.0(typescript@5.2.2) @@ -198,7 +207,7 @@ devDependencies: version: 0.25.2(rollup@4.3.0)(vue@3.3.7) vite: specifier: ^4.5.0 - version: 4.5.0(@types/node@18.15.10)(less@4.2.0) + version: 4.5.0(@types/node@18.15.10)(less@4.2.0)(sass@1.69.5) vite-plugin-compression: specifier: ^0.5.1 version: 0.5.1(vite@4.5.0) @@ -1929,7 +1938,7 @@ packages: '@babel/core': 7.23.2 '@babel/plugin-transform-typescript': 7.22.15(@babel/core@7.23.2) '@vue/babel-plugin-jsx': 1.1.5(@babel/core@7.23.2) - vite: 4.5.0(@types/node@18.15.10)(less@4.2.0) + vite: 4.5.0(@types/node@18.15.10)(less@4.2.0)(sass@1.69.5) vue: 3.3.7(typescript@5.2.2) transitivePeerDependencies: - supports-color @@ -1942,7 +1951,7 @@ packages: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 4.5.0(@types/node@18.15.10)(less@4.2.0) + vite: 4.5.0(@types/node@18.15.10)(less@4.2.0)(sass@1.69.5) vue: 3.3.7(typescript@5.2.2) dev: true @@ -2230,7 +2239,7 @@ packages: dev: true /anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==, tarball: https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz} engines: {node: '>= 8'} dependencies: normalize-path: 3.0.0 @@ -2501,7 +2510,7 @@ packages: dev: true /binary-extensions@2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==, tarball: https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz} engines: {node: '>=8'} dev: true @@ -2540,7 +2549,7 @@ packages: dev: true /braces@2.3.2: - resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} + resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==, tarball: https://registry.npmmirror.com/braces/-/braces-2.3.2.tgz} engines: {node: '>=0.10.0'} dependencies: arr-flatten: 1.1.0 @@ -2805,7 +2814,7 @@ packages: dev: true /chokidar@3.5.3: - resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==, tarball: https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz} engines: {node: '>= 8.10.0'} dependencies: anymatch: 3.1.3 @@ -3059,6 +3068,11 @@ packages: toggle-selection: 1.0.6 dev: false + /core-js@3.34.0: + resolution: {integrity: sha512-aDdvlDder8QmY91H88GzNi9EtQi2TjvQhpCX6B1v/dAZHU1AuLgHvRh54RiOerpEhEW46Tkf+vgAViB/CWC0ag==, tarball: https://registry.npmmirror.com/core-js/-/core-js-3.34.0.tgz} + requiresBuild: true + dev: false + /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true @@ -3718,6 +3732,13 @@ packages: d3-zoom: 3.0.0 dev: false + /d@1.0.1: + resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==, tarball: https://registry.npmmirror.com/d/-/d-1.0.1.tgz} + dependencies: + es5-ext: 0.10.62 + type: 1.2.0 + dev: false + /dagre-d3@0.6.4: resolution: {integrity: sha512-e/6jXeCP7/ptlAM48clmX4xTZc5Ek6T6kagS7Oz2HrYSdqcLZFLqpAfh7ldbZRFfxCZVyh61NEPR08UQRVxJzQ==} dependencies: @@ -3734,6 +3755,12 @@ packages: lodash: 4.17.21 dev: false + /danmu.js@1.1.13: + resolution: {integrity: sha512-knFd0/cB2HA4FFWiA7eB2suc5vCvoHdqio33FyyCSfP7C+1A+zQcTvnvwfxaZhrxsGj4qaQI2I8XiTqedRaVmg==, tarball: https://registry.npmmirror.com/danmu.js/-/danmu.js-1.1.13.tgz} + dependencies: + event-emitter: 0.3.5 + dev: false + /dargs@7.0.0: resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==} engines: {node: '>=8'} @@ -3946,6 +3973,10 @@ packages: robust-predicates: 3.0.2 dev: false + /delegate@3.2.0: + resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==, tarball: https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz} + dev: false + /dir-glob@2.2.2: resolution: {integrity: sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==} engines: {node: '>=4'} @@ -4093,6 +4124,10 @@ packages: pify: 3.0.0 dev: true + /downloadjs@1.4.7: + resolution: {integrity: sha512-LN1gO7+u9xjU5oEScGFKvXhYf7Y/empUIIEAGBs1LzUq/rg5duiDrkuH5A2lQGd5jfMOb9X9usDa2oVXwJ0U/Q==, tarball: https://registry.npmmirror.com/downloadjs/-/downloadjs-1.4.7.tgz} + dev: false + /duplexer3@0.1.5: resolution: {integrity: sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==} dev: true @@ -4287,6 +4322,31 @@ packages: is-symbol: 1.0.4 dev: true + /es5-ext@0.10.62: + resolution: {integrity: sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==, tarball: https://registry.npmmirror.com/es5-ext/-/es5-ext-0.10.62.tgz} + engines: {node: '>=0.10'} + requiresBuild: true + dependencies: + es6-iterator: 2.0.3 + es6-symbol: 3.1.3 + next-tick: 1.1.0 + dev: false + + /es6-iterator@2.0.3: + resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==, tarball: https://registry.npmmirror.com/es6-iterator/-/es6-iterator-2.0.3.tgz} + dependencies: + d: 1.0.1 + es5-ext: 0.10.62 + es6-symbol: 3.1.3 + dev: false + + /es6-symbol@3.1.3: + resolution: {integrity: sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==, tarball: https://registry.npmmirror.com/es6-symbol/-/es6-symbol-3.1.3.tgz} + dependencies: + d: 1.0.1 + ext: 1.7.0 + dev: false + /esbuild-android-64@0.14.54: resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==, tarball: https://registry.npmmirror.com/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz} engines: {node: '>=12'} @@ -4811,6 +4871,17 @@ packages: engines: {node: '>= 0.6'} dev: true + /event-emitter@0.3.5: + resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==, tarball: https://registry.npmmirror.com/event-emitter/-/event-emitter-0.3.5.tgz} + dependencies: + d: 1.0.1 + es5-ext: 0.10.62 + dev: false + + /eventemitter3@4.0.7: + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==, tarball: https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz} + dev: false + /eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} dev: true @@ -4955,6 +5026,12 @@ packages: sort-keys-length: 1.0.1 dev: true + /ext@1.7.0: + resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==, tarball: https://registry.npmmirror.com/ext/-/ext-1.7.0.tgz} + dependencies: + type: 2.7.2 + dev: false + /extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} @@ -5466,7 +5543,7 @@ packages: dev: true /glob-parent@3.1.0: - resolution: {integrity: sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==} + resolution: {integrity: sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==, tarball: https://registry.npmmirror.com/glob-parent/-/glob-parent-3.1.0.tgz} dependencies: is-glob: 3.1.0 path-dirname: 1.0.2 @@ -5970,6 +6047,10 @@ packages: replace-ext: 1.0.1 dev: true + /immutable@4.3.4: + resolution: {integrity: sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==, tarball: https://registry.npmmirror.com/immutable/-/immutable-4.3.4.tgz} + dev: true + /import-fresh@2.0.0: resolution: {integrity: sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==} engines: {node: '>=4'} @@ -6117,7 +6198,7 @@ packages: dev: true /is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==, tarball: https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz} engines: {node: '>=8'} dependencies: binary-extensions: 2.2.0 @@ -6260,7 +6341,7 @@ packages: dev: true /is-glob@3.1.0: - resolution: {integrity: sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==} + resolution: {integrity: sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==, tarball: https://registry.npmmirror.com/is-glob/-/is-glob-3.1.0.tgz} engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 @@ -7428,6 +7509,10 @@ packages: dev: true optional: true + /next-tick@1.1.0: + resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==, tarball: https://registry.npmmirror.com/next-tick/-/next-tick-1.1.0.tgz} + dev: false + /nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} dev: true @@ -8459,7 +8544,7 @@ packages: dev: true /readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==, tarball: https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz} engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 @@ -8807,6 +8892,16 @@ packages: /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + /sass@1.69.5: + resolution: {integrity: sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==, tarball: https://registry.npmmirror.com/sass/-/sass-1.69.5.tgz} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + chokidar: 3.5.3 + immutable: 4.3.4 + source-map-js: 1.0.2 + dev: true + /sax@1.2.4: resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==} requiresBuild: true @@ -9023,7 +9118,7 @@ packages: dev: false /source-map-js@1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==, tarball: https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz} engines: {node: '>=0.10.0'} /source-map-resolve@0.5.3: @@ -9723,6 +9818,11 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /throttle-debounce@2.3.0: + resolution: {integrity: sha512-H7oLPV0P7+jgvrk+6mwwwBDmxTaxnu9HMXmloNLXwnNO0ZxZ31Orah2n8lU1eMPvsaowP2CX+USCgyovXfdOFQ==, tarball: https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-2.3.0.tgz} + engines: {node: '>=8'} + dev: false + /through2@4.0.2: resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} dependencies: @@ -9909,6 +10009,14 @@ packages: engines: {node: '>=10'} dev: true + /type@1.2.0: + resolution: {integrity: sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==, tarball: https://registry.npmmirror.com/type/-/type-1.2.0.tgz} + dev: false + + /type@2.7.2: + resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==, tarball: https://registry.npmmirror.com/type/-/type-2.7.2.tgz} + dev: false + /typed-array-buffer@1.0.0: resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} engines: {node: '>= 0.4'} @@ -10173,6 +10281,14 @@ packages: hasBin: true dev: true + /v-viewer@1.6.4: + resolution: {integrity: sha512-LVkiUHpmsbsZXebeNXnu8krRCi5i2n07FeLFxoIVGhw8lVvTBO0ffpbDC6mLEuacCjrIh09HjIqpciwUtWE8lQ==, tarball: https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz} + engines: {node: '>=4', npm: '>=3'} + dependencies: + throttle-debounce: 2.3.0 + viewerjs: 1.11.6 + dev: false + /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: @@ -10222,6 +10338,10 @@ packages: vfile-message: 1.1.1 dev: true + /viewerjs@1.11.6: + resolution: {integrity: sha512-TlhdSp2oEOLFXvEp4psKaeTjR5zBjTRcM/sHUN8PkV1UWuY8HKC8n7GaVdW5Xqnwdr/F1OmzLik1QwDjI4w/nw==, tarball: https://registry.npmmirror.com/viewerjs/-/viewerjs-1.11.6.tgz} + dev: false + /vite-plugin-compression@0.5.1(vite@4.5.0): resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==} peerDependencies: @@ -10230,7 +10350,7 @@ packages: chalk: 4.1.2 debug: 4.3.4 fs-extra: 10.1.0 - vite: 4.5.0(@types/node@18.15.10)(less@4.2.0) + vite: 4.5.0(@types/node@18.15.10)(less@4.2.0)(sass@1.69.5) transitivePeerDependencies: - supports-color dev: true @@ -10245,7 +10365,7 @@ packages: '@types/eslint': 8.21.3 eslint: 8.53.0 rollup: 2.79.1 - vite: 4.5.0(@types/node@18.15.10)(less@4.2.0) + vite: 4.5.0(@types/node@18.15.10)(less@4.2.0)(sass@1.69.5) dev: true /vite-plugin-imagemin@0.6.1(vite@4.5.0): @@ -10276,7 +10396,7 @@ packages: imagemin-webp: 6.1.0 jpegtran-bin: 6.0.1 pathe: 0.2.0 - vite: 4.5.0(@types/node@18.15.10)(less@4.2.0) + vite: 4.5.0(@types/node@18.15.10)(less@4.2.0)(sass@1.69.5) transitivePeerDependencies: - supports-color dev: true @@ -10294,7 +10414,7 @@ packages: pathe: 0.2.0 svg-baker: 1.7.0 svgo: 2.8.0 - vite: 4.5.0(@types/node@18.15.10)(less@4.2.0) + vite: 4.5.0(@types/node@18.15.10)(less@4.2.0)(sass@1.69.5) transitivePeerDependencies: - supports-color dev: true @@ -10306,7 +10426,7 @@ packages: svgo: 3.0.2 dev: true - /vite@4.5.0(@types/node@18.15.10)(less@4.2.0): + /vite@4.5.0(@types/node@18.15.10)(less@4.2.0)(sass@1.69.5): resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -10339,6 +10459,7 @@ packages: less: 4.2.0 postcss: 8.4.31 rollup: 3.29.4 + sass: 1.69.5 optionalDependencies: fsevents: 2.3.2 dev: true @@ -10630,6 +10751,28 @@ packages: resolution: {integrity: sha512-GojqklwG8gpzOVEVki5KudKNoq7MbbjYZCbyWzEz7tyPA7eleiE0+ePwOWQQRb5fm86rD3S8Tc0tSFf3AOv50w==} dev: true + /xgplayer-subtitles@3.0.11(core-js@3.34.0): + resolution: {integrity: sha512-m/fk9TeeLuwqnryHTqo5SVVS3w9A27hHe7R1HxWQlk5ZZ5H2CxAXn4dv/PU+gI61DWG3sNkjftlq5duHJtdz2g==, tarball: https://registry.npmmirror.com/xgplayer-subtitles/-/xgplayer-subtitles-3.0.11.tgz} + peerDependencies: + core-js: '>=3.12.1' + dependencies: + core-js: 3.34.0 + eventemitter3: 4.0.7 + dev: false + + /xgplayer@3.0.11(core-js@3.34.0): + resolution: {integrity: sha512-n7qpUG46IVjcYWCFq9WLe4OQpIZvtT67lObu6RPgxbMm8IMGCscTVdbWQjRbgrlsvTVfes3zTfjyaymuS5g17g==, tarball: https://registry.npmmirror.com/xgplayer/-/xgplayer-3.0.11.tgz} + peerDependencies: + core-js: '>=3.12.1' + dependencies: + core-js: 3.34.0 + danmu.js: 1.1.13 + delegate: 3.2.0 + downloadjs: 1.4.7 + eventemitter3: 4.0.7 + xgplayer-subtitles: 3.0.11(core-js@3.34.0) + dev: false + /xml-name-validator@4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} diff --git a/continew-admin-ui/src/api/system/file.ts b/continew-admin-ui/src/api/system/file.ts new file mode 100644 index 00000000..9d9b41b8 --- /dev/null +++ b/continew-admin-ui/src/api/system/file.ts @@ -0,0 +1,24 @@ +import axios from 'axios'; + +const BASE_URL = '/system/file'; + +export interface FileItem { + id: string + type: string + name: string + extendName: string + src: string | null + updateTime: string + isDir: boolean + filePath: string + [propName: string]: any // 一个 interface 中任意属性只能有一个 +} + +interface PageRes { + records: T; + total: number; +} + +export function getFileList() { + return axios.get>(`${BASE_URL}/file`); +} diff --git a/continew-admin-ui/src/assets/icons/svg/file-audio.svg b/continew-admin-ui/src/assets/icons/svg/file-audio-a.svg similarity index 100% rename from continew-admin-ui/src/assets/icons/svg/file-audio.svg rename to continew-admin-ui/src/assets/icons/svg/file-audio-a.svg diff --git a/continew-admin-ui/src/assets/icons/svg/file-css.svg b/continew-admin-ui/src/assets/icons/svg/file-css.svg new file mode 100644 index 00000000..1aabe7c8 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-css.svg @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-dir.svg b/continew-admin-ui/src/assets/icons/svg/file-dir.svg new file mode 100644 index 00000000..04daada7 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-dir.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-excel.svg b/continew-admin-ui/src/assets/icons/svg/file-excel.svg new file mode 100644 index 00000000..f53b51fa --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-excel.svg @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-exe.svg b/continew-admin-ui/src/assets/icons/svg/file-exe.svg new file mode 100644 index 00000000..4111d06f --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-exe.svg @@ -0,0 +1,20 @@ + + + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-html.svg b/continew-admin-ui/src/assets/icons/svg/file-html.svg new file mode 100644 index 00000000..9b704e92 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-html.svg @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-image-a.svg b/continew-admin-ui/src/assets/icons/svg/file-image-a.svg new file mode 100644 index 00000000..31ed403c --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-image-a.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-image.svg b/continew-admin-ui/src/assets/icons/svg/file-image.svg index 31ed403c..e4989db5 100644 --- a/continew-admin-ui/src/assets/icons/svg/file-image.svg +++ b/continew-admin-ui/src/assets/icons/svg/file-image.svg @@ -1 +1,11 @@ - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-js.svg b/continew-admin-ui/src/assets/icons/svg/file-js.svg new file mode 100644 index 00000000..b38ef349 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-js.svg @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-json.svg b/continew-admin-ui/src/assets/icons/svg/file-json.svg new file mode 100644 index 00000000..e7cd332a --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-json.svg @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-music.svg b/continew-admin-ui/src/assets/icons/svg/file-music.svg new file mode 100644 index 00000000..77581161 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-music.svg @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-other.svg b/continew-admin-ui/src/assets/icons/svg/file-other.svg new file mode 100644 index 00000000..4215a134 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-other.svg @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-pdf-a.svg b/continew-admin-ui/src/assets/icons/svg/file-pdf-a.svg new file mode 100644 index 00000000..ad9a37ce --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-pdf-a.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-pdf.svg b/continew-admin-ui/src/assets/icons/svg/file-pdf.svg index ad9a37ce..9bf682b2 100644 --- a/continew-admin-ui/src/assets/icons/svg/file-pdf.svg +++ b/continew-admin-ui/src/assets/icons/svg/file-pdf.svg @@ -1 +1,11 @@ - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-ppt.svg b/continew-admin-ui/src/assets/icons/svg/file-ppt.svg new file mode 100644 index 00000000..72bac64c --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-ppt.svg @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-rar.svg b/continew-admin-ui/src/assets/icons/svg/file-rar.svg new file mode 100644 index 00000000..8cc3ee23 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-rar.svg @@ -0,0 +1,16 @@ + + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-txt.svg b/continew-admin-ui/src/assets/icons/svg/file-txt.svg new file mode 100644 index 00000000..833e12ac --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-txt.svg @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-video-a.svg b/continew-admin-ui/src/assets/icons/svg/file-video-a.svg new file mode 100644 index 00000000..64580805 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-video-a.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-video.svg b/continew-admin-ui/src/assets/icons/svg/file-video.svg index 64580805..720ee9f9 100644 --- a/continew-admin-ui/src/assets/icons/svg/file-video.svg +++ b/continew-admin-ui/src/assets/icons/svg/file-video.svg @@ -1 +1,14 @@ - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-wps.svg b/continew-admin-ui/src/assets/icons/svg/file-wps.svg new file mode 100644 index 00000000..210fd333 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-wps.svg @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/file-zip.svg b/continew-admin-ui/src/assets/icons/svg/file-zip.svg new file mode 100644 index 00000000..51fde6fa --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/file-zip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-file.svg b/continew-admin-ui/src/assets/icons/svg/menu-file.svg new file mode 100644 index 00000000..d2a1c8a0 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/constant/file.ts b/continew-admin-ui/src/constant/file.ts new file mode 100644 index 00000000..cd35602a --- /dev/null +++ b/continew-admin-ui/src/constant/file.ts @@ -0,0 +1,47 @@ +/** @desc 文件模块-映射 */ + +export interface fileTypeListItem { + name: string + value: number + menuIcon: string + icon: string +} + +// 文件分类 +export const fileTypeList: fileTypeListItem[] = [ + { name: '全部', value: 0, menuIcon: 'menu-file', icon: 'icon-stamp' }, + { name: '图片', value: 1, menuIcon: 'file-image', icon: 'icon-file-image' }, + { name: '文档', value: 2, menuIcon: 'file-txt', icon: 'icon-file' }, + { name: '视频', value: 3, menuIcon: 'file-video', icon: 'icon-video-camera' }, + { name: '音频', value: 4, menuIcon: 'file-music', icon: 'icon-file-audio' }, + { name: '其他', value: 5, menuIcon: 'file-other', icon: 'icon-bulb' } +] + +export interface FileExtendNameIconMap { + [key: string]: string +} + +// 文件类型图标 Map 映射 +export const fileExtendNameIconMap: FileExtendNameIconMap = { + mp3: 'file-music', + mp4: 'file-video', + dir: 'file-dir', + ppt: 'file-ppt', + doc: 'file-wps', + docx: 'file-wps', + xls: 'file-excel', + xlsx: 'file-excel', + txt: 'file-txt', + rar: 'file-rar', + zip: 'file-zip', + html: 'file-html', + css: 'file-css', + js: 'file-js', + other: 'file-other' // 未知文件 +} + +// 图片类型 +export const imageTypeList = ['jpg', 'png', 'gif', 'jpeg'] + +// WPS、Office文件类型 +export const officeFileType = ['ppt', 'pptx', 'doc', 'docx', 'xls', 'xlsx'] diff --git a/continew-admin-ui/src/locale/en-US.ts b/continew-admin-ui/src/locale/en-US.ts index d567496c..de93531d 100644 --- a/continew-admin-ui/src/locale/en-US.ts +++ b/continew-admin-ui/src/locale/en-US.ts @@ -8,6 +8,7 @@ import localeAnnouncement from '@/views/system/announcement/locale/en-US'; import localeMessage from '@/views/system/message/locale/en-US'; import localeDict from '@/views/system/dict/locale/en-US'; import localeConfig from '@/views/system/config/locale/en-US'; +import localeFile from '@/views/system/file/locale/en-US'; import localeGenerator from '@/views/tool/generator/locale/en-US'; @@ -66,6 +67,7 @@ export default { ...localeMessage, ...localeDict, ...localeConfig, + ...localeFile, ...localeGenerator, diff --git a/continew-admin-ui/src/locale/zh-CN.ts b/continew-admin-ui/src/locale/zh-CN.ts index c9b14c31..2aa1f31c 100644 --- a/continew-admin-ui/src/locale/zh-CN.ts +++ b/continew-admin-ui/src/locale/zh-CN.ts @@ -8,6 +8,7 @@ import localeAnnouncement from '@/views/system/announcement/locale/zh-CN'; import localeMessage from '@/views/system/message/locale/zh-CN'; import localeDict from '@/views/system/dict/locale/zh-CN'; import localeConfig from '@/views/system/config/locale/zh-CN'; +import localeFile from '@/views/system/file/locale/zh-CN'; import localeGenerator from '@/views/tool/generator/locale/zh-CN'; @@ -66,6 +67,7 @@ export default { ...localeMessage, ...localeDict, ...localeConfig, + ...localeFile, ...localeGenerator, diff --git a/continew-admin-ui/src/router/routes/modules/system.ts b/continew-admin-ui/src/router/routes/modules/system.ts index 3d07e34f..cc4b609b 100644 --- a/continew-admin-ui/src/router/routes/modules/system.ts +++ b/continew-admin-ui/src/router/routes/modules/system.ts @@ -84,6 +84,15 @@ const System: AppRouteRecordRaw = { requiresAuth: true, }, }, + { + name: 'File', + path: '/system/file', + component: () => import('@/views/system/file/index.vue'), + meta: { + locale: 'menu.system.file.list', + requiresAuth: true, + }, + }, ], }; diff --git a/continew-admin-ui/src/store/modules/file.ts b/continew-admin-ui/src/store/modules/file.ts new file mode 100644 index 00000000..747eb7b2 --- /dev/null +++ b/continew-admin-ui/src/store/modules/file.ts @@ -0,0 +1,42 @@ +import { defineStore } from 'pinia'; +import { ref, computed } from 'vue'; +import type { FileItem } from '@/api/system/file'; + +type TViewMode = 'grid' | 'list'; + +const storeSetup = () => { + const viewMode = ref('grid'); // 视图: grid宫格模式 list列表模式 + const isBatchMode = ref(false); // 是否批量操作 + const selectedFileList = ref([]); + const selectedFileIds = computed(() => + selectedFileList.value.map((i) => i.id), + ); + + // 改变视图模式 + const changeViewMode = () => { + viewMode.value = viewMode.value === 'grid' ? 'list' : 'grid'; + }; + + // 添加选中的文件到文件勾选列表 + const addSelectedFileItem = (item: FileItem) => { + if (selectedFileIds.value.includes(item.id)) { + const index = selectedFileList.value.findIndex((i) => i.id === item.id); + selectedFileList.value.splice(index, 1); + } else { + selectedFileList.value.push(item); + } + }; + + return { + viewMode, + isBatchMode, + selectedFileList, + selectedFileIds, + changeViewMode, + addSelectedFileItem, + }; +}; + +export const useFileStore = defineStore('file', storeSetup, { + // persist: { storage: localStorage, paths: ['viewMode', 'selectedFileList'] }, +}); diff --git a/continew-admin-ui/src/views/system/file/components/FileMoveModal/index.vue b/continew-admin-ui/src/views/system/file/components/FileMoveModal/index.vue new file mode 100644 index 00000000..fbdd56ae --- /dev/null +++ b/continew-admin-ui/src/views/system/file/components/FileMoveModal/index.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/continew-admin-ui/src/views/system/file/components/FileRenameModal/index.vue b/continew-admin-ui/src/views/system/file/components/FileRenameModal/index.vue new file mode 100644 index 00000000..571897b0 --- /dev/null +++ b/continew-admin-ui/src/views/system/file/components/FileRenameModal/index.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/continew-admin-ui/src/views/system/file/components/PreviewAudioModal/index.vue b/continew-admin-ui/src/views/system/file/components/PreviewAudioModal/index.vue new file mode 100644 index 00000000..809a11a8 --- /dev/null +++ b/continew-admin-ui/src/views/system/file/components/PreviewAudioModal/index.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/continew-admin-ui/src/views/system/file/components/PreviewVideoModal/index.vue b/continew-admin-ui/src/views/system/file/components/PreviewVideoModal/index.vue new file mode 100644 index 00000000..1184479e --- /dev/null +++ b/continew-admin-ui/src/views/system/file/components/PreviewVideoModal/index.vue @@ -0,0 +1,45 @@ + + + diff --git a/continew-admin-ui/src/views/system/file/components/index.ts b/continew-admin-ui/src/views/system/file/components/index.ts new file mode 100644 index 00000000..00335538 --- /dev/null +++ b/continew-admin-ui/src/views/system/file/components/index.ts @@ -0,0 +1,68 @@ +import type { Component } from 'vue'; +import { createApp } from 'vue'; +import ArcoVueIcon from '@arco-design/web-vue/es/icon'; +import ArcoVue from '@arco-design/web-vue'; +import { FileItem } from '@/api/system/file'; + +import FileMoveModal from './FileMoveModal/index.vue'; +import FileRenameModal from './FileRenameModal/index.vue'; +import PreviewVideoModal from './PreviewVideoModal/index.vue'; +import PreviewAudioModal from './PreviewAudioModal/index.vue'; + +function createModal void }>( + component: Component, + options?: T, +) { + // 创建一个挂载容器 + const el: HTMLElement = document.createElement('div'); + // 挂载组件 + document.body.appendChild(el); + + // 实例化组件, createApp 第二个参数是 props + const instance = createApp(component, { + ...options, + onClose: () => { + setTimeout(() => { + instance.unmount(); + document.body.removeChild(el); + // options?.callback && options?.callback(); + }, 350); + }, + }); + + instance.use(ArcoVue); + instance.use(ArcoVueIcon); + instance.mount(el); +} + +type TFileOptions = { fileInfo: FileItem; callback?: () => void }; + +/** 打开 文件移动 弹窗 */ +export function openFileMoveModal(fileItem: FileItem) { + return createModal(FileMoveModal, { fileInfo: fileItem }); +} + +/** 打开 文件重命名 弹窗 */ +export function openFileRenameModal(fileItem: FileItem) { + return createModal(FileRenameModal, { fileInfo: fileItem }); +} + +/** 预览 视频文件 弹窗 */ +export function previewFileVideoModal(fileItem: FileItem) { + return createModal(PreviewVideoModal, { fileInfo: fileItem }); +} + +/** 预览 音频文件 弹窗 */ +let fileAudioId = ''; +export function previewFileAudioModal(fileItem: FileItem) { + if (fileAudioId) return; // 防止重复打开 + fileAudioId = fileItem.id; + // eslint-disable-next-line consistent-return + return createModal(PreviewAudioModal, { + fileInfo: fileItem, + // 关闭的回调 + callback: () => { + fileAudioId = ''; + }, + }); +} diff --git a/continew-admin-ui/src/views/system/file/detail/index.vue b/continew-admin-ui/src/views/system/file/detail/index.vue new file mode 100644 index 00000000..6c2cdce5 --- /dev/null +++ b/continew-admin-ui/src/views/system/file/detail/index.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/continew-admin-ui/src/views/system/file/index.vue b/continew-admin-ui/src/views/system/file/index.vue new file mode 100644 index 00000000..20ac5add --- /dev/null +++ b/continew-admin-ui/src/views/system/file/index.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/continew-admin-ui/src/views/system/file/locale/en-US.ts b/continew-admin-ui/src/views/system/file/locale/en-US.ts new file mode 100644 index 00000000..605b7282 --- /dev/null +++ b/continew-admin-ui/src/views/system/file/locale/en-US.ts @@ -0,0 +1,3 @@ +export default { + 'menu.system.file.list': 'File management', +}; diff --git a/continew-admin-ui/src/views/system/file/locale/zh-CN.ts b/continew-admin-ui/src/views/system/file/locale/zh-CN.ts new file mode 100644 index 00000000..2c8c9233 --- /dev/null +++ b/continew-admin-ui/src/views/system/file/locale/zh-CN.ts @@ -0,0 +1,3 @@ +export default { + 'menu.system.file.list': '文件管理(尚在开发)', +}; diff --git a/continew-admin-ui/src/views/system/file/main/FileAside.vue b/continew-admin-ui/src/views/system/file/main/FileAside.vue new file mode 100644 index 00000000..dbe8ed0a --- /dev/null +++ b/continew-admin-ui/src/views/system/file/main/FileAside.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/continew-admin-ui/src/views/system/file/main/FileMain/FileGrid.vue b/continew-admin-ui/src/views/system/file/main/FileMain/FileGrid.vue new file mode 100644 index 00000000..d18a4744 --- /dev/null +++ b/continew-admin-ui/src/views/system/file/main/FileMain/FileGrid.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/continew-admin-ui/src/views/system/file/main/FileMain/FileImg.vue b/continew-admin-ui/src/views/system/file/main/FileMain/FileImg.vue new file mode 100644 index 00000000..05f56dbf --- /dev/null +++ b/continew-admin-ui/src/views/system/file/main/FileMain/FileImg.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/continew-admin-ui/src/views/system/file/main/FileMain/FileList.vue b/continew-admin-ui/src/views/system/file/main/FileMain/FileList.vue new file mode 100644 index 00000000..cea3ac07 --- /dev/null +++ b/continew-admin-ui/src/views/system/file/main/FileMain/FileList.vue @@ -0,0 +1,138 @@ + + + + + + + diff --git a/continew-admin-ui/src/views/system/file/main/FileMain/FileRightMenu.vue b/continew-admin-ui/src/views/system/file/main/FileMain/FileRightMenu.vue new file mode 100644 index 00000000..3369d33b --- /dev/null +++ b/continew-admin-ui/src/views/system/file/main/FileMain/FileRightMenu.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/continew-admin-ui/src/views/system/file/main/FileMain/index.vue b/continew-admin-ui/src/views/system/file/main/FileMain/index.vue new file mode 100644 index 00000000..997ff443 --- /dev/null +++ b/continew-admin-ui/src/views/system/file/main/FileMain/index.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/continew-admin-webapi/src/main/resources/db/changelog/db.changelog-master.yaml b/continew-admin-webapi/src/main/resources/db/changelog/db.changelog-master.yaml index ed254bb1..0cae68e8 100644 --- a/continew-admin-webapi/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/continew-admin-webapi/src/main/resources/db/changelog/db.changelog-master.yaml @@ -23,3 +23,9 @@ databaseChangeLog: file: db/changelog/v1.3.0/continew-admin_column.sql - include: file: db/changelog/v1.3.0/continew-admin_data.sql + - include: + file: db/changelog/v2.2.0/continew-admin_table.sql + - include: + file: db/changelog/v2.2.0/continew-admin_column.sql + - include: + file: db/changelog/v2.2.0/continew-admin_data.sql \ No newline at end of file diff --git a/continew-admin-webapi/src/main/resources/db/changelog/v2.2.0/continew-admin_column.sql b/continew-admin-webapi/src/main/resources/db/changelog/v2.2.0/continew-admin_column.sql new file mode 100644 index 00000000..874085b8 --- /dev/null +++ b/continew-admin-webapi/src/main/resources/db/changelog/v2.2.0/continew-admin_column.sql @@ -0,0 +1,2 @@ +-- liquibase formatted sql + diff --git a/continew-admin-webapi/src/main/resources/db/changelog/v2.2.0/continew-admin_data.sql b/continew-admin-webapi/src/main/resources/db/changelog/v2.2.0/continew-admin_data.sql new file mode 100644 index 00000000..e3c9c437 --- /dev/null +++ b/continew-admin-webapi/src/main/resources/db/changelog/v2.2.0/continew-admin_data.sql @@ -0,0 +1,17 @@ +-- liquibase formatted sql + +-- changeset Charles7c:1 +-- 初始化默认菜单 +INSERT IGNORE INTO `sys_menu` +(`id`, `title`, `parent_id`, `type`, `path`, `name`, `component`, `icon`, `is_external`, `is_cache`, `is_hidden`, `permission`, `sort`, `status`, `create_user`, `create_time`, `update_user`, `update_time`) +VALUES +(1090, '文件管理', 1000, 2, '/system/file', 'File', 'system/file/index', 'file', b'0', b'0', b'0', 'system:file:list', 9, 1, 1, NOW(), NULL, NULL), +(1091, '文件上传', 1090, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:file:upload', 1, 1, 1, NOW(), NULL, NULL), +(1092, '文件修改', 1090, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:file:update', 2, 1, 1, NOW(), NULL, NULL), +(1093, '文件删除', 1090, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:file:delete', 3, 1, 1, NOW(), NULL, NULL), +(1094, '文件下载', 1090, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:file:download', 4, 1, 1, NOW(), NULL, NULL), +(1100, '存储管理', 1000, 2, '/system/storage', 'Storage', 'system/storage/index', 'storage', b'0', b'0', b'1', 'system:storage:list', 10, 1, 1, NOW(), NULL, NULL), +(1101, '存储新增', 1100, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:storage:add', 1, 1, 1, NOW(), NULL, NULL), +(1102, '存储修改', 1100, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:storage:update', 2, 1, 1, NOW(), NULL, NULL), +(1103, '存储删除', 1100, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:storage:delete', 3, 1, 1, NOW(), NULL, NULL), +(1104, '存储导出', 1100, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:storage:export', 4, 1, 1, NOW(), NULL, NULL); diff --git a/continew-admin-webapi/src/main/resources/db/changelog/v2.2.0/continew-admin_table.sql b/continew-admin-webapi/src/main/resources/db/changelog/v2.2.0/continew-admin_table.sql new file mode 100644 index 00000000..07c70d14 --- /dev/null +++ b/continew-admin-webapi/src/main/resources/db/changelog/v2.2.0/continew-admin_table.sql @@ -0,0 +1,44 @@ +-- liquibase formatted sql + +-- changeset Charles7c:1 +CREATE TABLE IF NOT EXISTS `sys_file` ( + `id` bigint(20) NOT NULL COMMENT 'ID', + `name` varchar(255) NOT NULL COMMENT '名称', + `size` bigint(20) NOT NULL COMMENT '大小(字节)', + `url` varchar(512) NOT NULL COMMENT 'URL', + `extension` varchar(100) DEFAULT NULL COMMENT '扩展名', + `mime_type` varchar(100) DEFAULT NULL COMMENT 'MIME类型', + `category` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '类型(1:其他;2:图片;3:文档;4:视频;5:音频)', + `storage_id` bigint(20) NOT NULL COMMENT '存储库ID', + `create_user` bigint(20) NOT NULL COMMENT '创建人', + `create_time` datetime NOT NULL COMMENT '创建时间', + `update_user` bigint(20) DEFAULT NULL COMMENT '修改人', + `update_time` datetime DEFAULT NULL COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `idx_category`(`category`) USING BTREE, + INDEX `idx_create_user`(`create_user`) USING BTREE, + INDEX `idx_update_user`(`update_user`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件表'; + +CREATE TABLE IF NOT EXISTS `sys_storage` ( + `id` bigint(20) AUTO_INCREMENT COMMENT 'ID', + `name` varchar(100) NOT NULL COMMENT '名称', + `code` varchar(30) NOT NULL COMMENT '编码', + `access_key` varchar(255) DEFAULT NULL COMMENT 'Access Key(访问密钥)', + `secret_key` varchar(255) DEFAULT NULL COMMENT 'Secret Key(私有访问密钥)', + `endpoint` varchar(255) DEFAULT NULL COMMENT 'Endpoint(终端节点)', + `bucket_name` varchar(255) DEFAULT NULL COMMENT '桶名称', + `domain` varchar(255) DEFAULT NULL COMMENT '自定义域名', + `description` varchar(200) DEFAULT NULL COMMENT '描述', + `is_default` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否为默认存储', + `sort` int NOT NULL DEFAULT 999 COMMENT '排序', + `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(1:启用;2:禁用)', + `create_user` bigint(20) NOT NULL COMMENT '创建人', + `create_time` datetime NOT NULL COMMENT '创建时间', + `update_user` bigint(20) DEFAULT NULL COMMENT '修改人', + `update_time` datetime DEFAULT NULL COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `uk_code`(`code`) USING BTREE, + INDEX `idx_create_user`(`create_user`) USING BTREE, + INDEX `idx_update_user`(`update_user`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='存储库表'; \ No newline at end of file