Browse Source

前后台合并

dev
donghaolin 5 months ago
parent
commit
6c2dff5cc6
  1. 2
      README.md
  2. 299
      package-lock.json
  3. 1
      package.json
  4. 1
      src/assets/logo.svg
  5. 5
      src/main.js
  6. 6
      src/router/index.js
  7. 131
      src/views/FrontView.vue
  8. 390
      src/views/backindex.vue

2
README.md

@ -27,3 +27,5 @@ npm run dev
```sh ```sh
npm run build npm run build
``` ```
npm install element-plus --save 下载 element-plus 组件

299
package-lock.json

@ -10,6 +10,7 @@
"dependencies": { "dependencies": {
"axios": "^1.7.9", "axios": "^1.7.9",
"element-plus": "^2.9.1", "element-plus": "^2.9.1",
"moment": "^2.30.1",
"pinia": "^2.2.6", "pinia": "^2.2.6",
"vue": "^3.5.13", "vue": "^3.5.13",
"vue-router": "^4.4.5" "vue-router": "^4.4.5"
@ -489,24 +490,6 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@ctrl/tinycolor": {
"version": "3.6.1",
"resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz",
"integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==",
"license": "MIT",
"engines": {
"node": ">=10"
}
},
"node_modules/@element-plus/icons-vue": {
"version": "2.3.1",
"resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz",
"integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==",
"license": "MIT",
"peerDependencies": {
"vue": "^3.2.0"
}
},
"node_modules/@esbuild/aix-ppc64": { "node_modules/@esbuild/aix-ppc64": {
"version": "0.24.0", "version": "0.24.0",
"resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz",
@ -915,31 +898,6 @@
"node": ">=18" "node": ">=18"
} }
}, },
"node_modules/@floating-ui/core": {
"version": "1.6.8",
"resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.8.tgz",
"integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==",
"license": "MIT",
"dependencies": {
"@floating-ui/utils": "^0.2.8"
}
},
"node_modules/@floating-ui/dom": {
"version": "1.6.12",
"resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.6.12.tgz",
"integrity": "sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w==",
"license": "MIT",
"dependencies": {
"@floating-ui/core": "^1.6.0",
"@floating-ui/utils": "^0.2.8"
}
},
"node_modules/@floating-ui/utils": {
"version": "0.2.8",
"resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.8.tgz",
"integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==",
"license": "MIT"
},
"node_modules/@jridgewell/gen-mapping": { "node_modules/@jridgewell/gen-mapping": {
"version": "0.3.8", "version": "0.3.8",
"resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
@ -999,17 +957,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@popperjs/core": {
"name": "@sxzz/popperjs-es",
"version": "2.11.7",
"resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==",
"license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/@rollup/pluginutils": { "node_modules/@rollup/pluginutils": {
"version": "5.1.4", "version": "5.1.4",
"resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.1.4.tgz", "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.1.4.tgz",
@ -1326,27 +1273,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/lodash": {
"version": "4.17.13",
"resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.13.tgz",
"integrity": "sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==",
"license": "MIT"
},
"node_modules/@types/lodash-es": {
"version": "4.17.12",
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
"license": "MIT",
"dependencies": {
"@types/lodash": "*"
}
},
"node_modules/@types/web-bluetooth": {
"version": "0.0.16",
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==",
"license": "MIT"
},
"node_modules/@vitejs/plugin-vue": { "node_modules/@vitejs/plugin-vue": {
"version": "5.2.1", "version": "5.2.1",
"resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-5.2.1.tgz", "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-5.2.1.tgz",
@ -1581,65 +1507,6 @@
"integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==", "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@vueuse/core": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz",
"integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==",
"license": "MIT",
"dependencies": {
"@types/web-bluetooth": "^0.0.16",
"@vueuse/metadata": "9.13.0",
"@vueuse/shared": "9.13.0",
"vue-demi": "*"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/metadata": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.13.0.tgz",
"integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/shared": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.13.0.tgz",
"integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==",
"license": "MIT",
"dependencies": {
"vue-demi": "*"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/async-validator": {
"version": "4.2.5",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz",
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==",
"license": "MIT"
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
"node_modules/axios": {
"version": "1.7.9",
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.7.9.tgz",
"integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/birpc": { "node_modules/birpc": {
"version": "0.2.19", "version": "0.2.19",
"resolved": "https://registry.npmmirror.com/birpc/-/birpc-0.2.19.tgz", "resolved": "https://registry.npmmirror.com/birpc/-/birpc-0.2.19.tgz",
@ -1720,18 +1587,6 @@
], ],
"license": "CC-BY-4.0" "license": "CC-BY-4.0"
}, },
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"license": "MIT",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/convert-source-map": { "node_modules/convert-source-map": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz",
@ -1776,12 +1631,6 @@
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
"license": "MIT"
},
"node_modules/debug": { "node_modules/debug": {
"version": "4.4.0", "version": "4.4.0",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.0.tgz", "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.0.tgz",
@ -1843,15 +1692,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"license": "MIT",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.75", "version": "1.5.75",
"resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.75.tgz", "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.75.tgz",
@ -1859,32 +1699,6 @@
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/element-plus": {
"version": "2.9.1",
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.9.1.tgz",
"integrity": "sha512-9Agqf/jt4Ugk7EZ6C5LME71sgkvauPCsnvJN12Xid2XVobjufxMGpRE4L7pS4luJMOmFAH3J0NgYEGZT5r+NDg==",
"license": "MIT",
"dependencies": {
"@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^2.3.1",
"@floating-ui/dom": "^1.0.1",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
"@types/lodash": "^4.14.182",
"@types/lodash-es": "^4.17.6",
"@vueuse/core": "^9.1.0",
"async-validator": "^4.2.5",
"dayjs": "^1.11.13",
"escape-html": "^1.0.3",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"lodash-unified": "^1.0.2",
"memoize-one": "^6.0.0",
"normalize-wheel-es": "^1.2.0"
},
"peerDependencies": {
"vue": "^3.2.0"
}
},
"node_modules/entities": { "node_modules/entities": {
"version": "4.5.0", "version": "4.5.0",
"resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz",
@ -1957,12 +1771,6 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
"license": "MIT"
},
"node_modules/estree-walker": { "node_modules/estree-walker": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
@ -2012,40 +1820,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/follow-redirects": {
"version": "1.15.9",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.9.tgz",
"integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"license": "MIT",
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/form-data": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.1.tgz",
"integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/fs-extra": { "node_modules/fs-extra": {
"version": "11.2.0", "version": "11.2.0",
"resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.2.0.tgz", "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.2.0.tgz",
@ -2313,29 +2087,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"license": "MIT"
},
"node_modules/lodash-es": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
"license": "MIT"
},
"node_modules/lodash-unified": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/lodash-unified/-/lodash-unified-1.0.3.tgz",
"integrity": "sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==",
"license": "MIT",
"peerDependencies": {
"@types/lodash-es": "*",
"lodash": "*",
"lodash-es": "*"
}
},
"node_modules/lru-cache": { "node_modules/lru-cache": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz",
@ -2355,33 +2106,6 @@
"@jridgewell/sourcemap-codec": "^1.5.0" "@jridgewell/sourcemap-codec": "^1.5.0"
} }
}, },
"node_modules/memoize-one": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz",
"integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==",
"license": "MIT"
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"license": "MIT",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mitt": { "node_modules/mitt": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmmirror.com/mitt/-/mitt-3.0.1.tgz", "resolved": "https://registry.npmmirror.com/mitt/-/mitt-3.0.1.tgz",
@ -2389,6 +2113,15 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/moment": {
"version": "2.30.1",
"resolved": "https://mirrors.huaweicloud.com/repository/npm/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
"license": "MIT",
"engines": {
"node": "*"
}
},
"node_modules/mrmime": { "node_modules/mrmime": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-2.0.0.tgz",
@ -2431,12 +2164,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/normalize-wheel-es": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
"integrity": "sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw==",
"license": "BSD-3-Clause"
},
"node_modules/npm-run-path": { "node_modules/npm-run-path": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-6.0.0.tgz", "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-6.0.0.tgz",
@ -2608,12 +2335,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"license": "MIT"
},
"node_modules/rfdc": { "node_modules/rfdc": {
"version": "1.4.1", "version": "1.4.1",
"resolved": "https://registry.npmmirror.com/rfdc/-/rfdc-1.4.1.tgz", "resolved": "https://registry.npmmirror.com/rfdc/-/rfdc-1.4.1.tgz",

1
package.json

@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"axios": "^1.7.9", "axios": "^1.7.9",
"element-plus": "^2.9.1", "element-plus": "^2.9.1",
"moment": "^2.30.1",
"pinia": "^2.2.6", "pinia": "^2.2.6",
"vue": "^3.5.13", "vue": "^3.5.13",
"vue-router": "^4.4.5" "vue-router": "^4.4.5"

1
src/assets/logo.svg

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>

5
src/main.js

@ -1,7 +1,9 @@
import './assets/main.css'
import { createApp } from 'vue' import { createApp } from 'vue'
import { createPinia } from 'pinia' import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
@ -9,6 +11,7 @@ import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css' import 'element-plus/dist/index.css'
const app = createApp(App) const app = createApp(App)
app.use(ElementPlus)
app.use(createPinia()) app.use(createPinia())
app.use(router) app.use(router)
app.use(ElementPlus) app.use(ElementPlus)

6
src/router/index.js

@ -1,13 +1,13 @@
import { createRouter, createWebHistory } from 'vue-router' import { createRouter, createWebHistory } from 'vue-router'
import FrontView from '../views/FrontView.vue'
import Backindex from '@/views/backindex.vue'
const router = createRouter({ const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL), history: createWebHistory(import.meta.env.BASE_URL),
routes: [ routes: [
{ {
path: '/',
path: '/1',
name: 'home', name: 'home',
component: FrontView,
component: Backindex,
}, },
], ],

131
src/views/FrontView.vue

@ -1,138 +1,9 @@
<script setup> <script setup>
import ShowApi from '@/axios/ShowApi';
import { ref } from 'vue';
//
const participants = ref([]);
//
const activity = ref();
const percent = ref()
function loadParticipants() {
// participants.value = [
// {
// id: 1,
// jwcode: "498498",
// },
// {
// id: 2,
// jwcode: "498498",
// },
// {
// id: 3,
// jwcode: "498498",
// },
// {
// id: 4,
// jwcode: "498498",
// },
// {
// id: 5,
// jwcode: "498498",
// },
// {
// id: 5,
// jwcode: "498498",
// },
// {
// id: 5,
// jwcode: "498498",
// },
// {
// id: 5,
// jwcode: "498498",
// },
// {
// id: 5,
// jwcode: "498498",
// },
// {
// id: 5,
// jwcode: "498498",
// },
// {
// id: 5,
// jwcode: "498498",
// },
// {
// id: 5,
// jwcode: "498498",
// },
// {
// id: 5,
// jwcode: "498498",
// }
// ]
ShowApi.showPage().then(result =>{
console.log("后端数据:",result.data)
activity.value = result.data;
// participants.value = result.data.participantList;
percent.value = result.data.nowNumber/result.data.targetNumber*100
console.log("活动数据",activity.value)
})
}
loadParticipants();
</script> </script>
<template> <template>
<div class="container">
<!-- 标题 -->
<div class="header">
<div class="title" :title="activity.title">
关于{{activity.title}}众筹
</div>
<div class="minge" :target="activity.targetNumber">
只需要{{activity.targetNumber}}个名额
</div>
<!-- 众筹状态 -->
<div class="state">
<span class="doing">众筹状态</span>
<span class="finished" v-if="activity.status==1">众筹中</span>
<span class="finished" v-else>已完成</span>
</div>
<!-- 进度 -->
<div class="jindu">
<!-- 当前进度 -->
<span class="current" :current="activity.nowNumber">
当前进度:{{activity.nowNumber}}
</span>
<!-- 目标 -->
<span class="goal" :goal="activity.targetNumber">
目标{{activity.targetNumber}}
</span>
</div>
<!-- 目标 -->
</div>
<!-- 进度条 -->
<div class="progress-bar">
<!-- 进度条背景 -->
<div class="progress-bg">
<!-- 进度条 -->
<div class="progress-bottem">
<div class="progress">
<el-progress
:text-inside="true"
:stroke-width="40"
:percentage="percent"
status="exception"
/>
</div>
</div>
<!-- 丝带 -->
</div>
</div>
<!-- 参与众筹人员展示 -->
<div class="list">
<div class="list-item" v-for="participant in activity.participantList">
<div class="display-item" :jwcode="participant.jwcode">
恭喜{{ participant.jwcode }}参与了本次众筹</div>
</div>
</div>
</div>
hhh
</template> </template>
<style scoped> <style scoped>

390
src/views/backindex.vue

@ -0,0 +1,390 @@
<script setup>
import { ref } from "vue";
import { ElMessage } from "element-plus";
import { ElMessageBox } from "element-plus";
import axios from "axios";
import moment from "moment";
const titleEdit = ref(false);
const raiseEdit = ref(false);
const addInfo = ref(false);
const deleteInfo = ref(false);
//
const info = ref({});
const getInfo = async function () {
try {
const result = await axios.get("http://192.168.9.117:8092/page");
info.value.title = result.data.data.title;
info.value.targetNumber = result.data.data.targetNumber;
} catch (error) {
console.log("请求失败", error);
}
};
getInfo();
//
const titleNew = ref({});
const putTitle = async function () {
try {
// FormData
const formData = new FormData();
// titleNewFormData
for (const key in titleNew.value) {
formData.append(key, titleNew.value[key]);
}
const result = await axios.put(
"http://192.168.9.117:8092/title",
formData,
{
headers: {
"Content-Type": "multipart/form-data",
},
}
);
if (result.data.code == 10000) {
ElMessage.success("修改成功");
titleEdit.value = false;
titleNew.value = {};
getInfo(); //
}
if (result.data.code == 10001) {
ElMessage.error(result.data.msg);
titleNew.value = {};
titleEdit.value = false;
}
} catch (error) {
console.log("请求失败", error);
}
};
//
const targetNumberNew = ref({});
const putTargetNumber = async function () {
try {
// FormData
const formData = new FormData();
// titleNewFormData
for (const key in targetNumberNew.value) {
formData.append(key, targetNumberNew.value[key]);
}
const result = await axios.put(
"http://192.168.9.117:8092/target",
formData,
{
headers: {
"Content-Type": "multipart/form-data",
},
}
);
if (result.data.code == 10000) {
ElMessage.success("修改成功");
raiseEdit.value = false;
targetNumberNew.value = {};
getInfo(); //
}
if (result.data.code == 10001) {
ElMessage.error(result.data.msg);
targetNumberNew.value = {};
raiseEdit.value = false;
}
} catch (error) {
console.log("请求失败", error);
}
};
//
const search = ref({
jwcode: "",
identity: "",
});
const tableData = ref([]);
const get = async function () {
try {
const result = await axios.post(
"http://192.168.9.117:8092/users",
search.value
);
tableData.value = result.data.data;
} catch (error) {
console.log("请求失败", error);
}
};
get();
//
const add = ref({});
const addUser = async function () {
try {
const result = await axios.post(
"http://192.168.9.117:8092/addUser",
add.value
);
if (result.data.code == 10000) {
ElMessage.success("修改成功");
addInfo.value = false;
add.value = {};
get(); //
}
if (result.data.code == 10001) {
ElMessage.error(result.data.msg);
addInfo.value = false;
add.value = {};
}
} catch (error) {
console.log("请求失败", error);
}
};
//
const idname = ref("");
function deleteRow(value) {
deleteInfo.value = true;
console.log(value);
idname.value = value;
}
const tureDelete = async function () {
try {
const result = await axios.delete(
"http://192.168.9.117:8092/delUser/" + idname.value
);
if (result.data.code == 10000) {
ElMessage.success("修改成功");
deleteInfo.value = false;
idname.value = {};
get(); //
}
if (result.data.code == 10001) {
ElMessage.error(result.data.msg);
deleteInfo.value = false;
idname.value = {};
}
} catch (error) {
console.log("请求失败", error);
}
};
//
const searchBy = ref({
jwcode: "",
identity: "",
});
const searchByJwcodeAndIdentity = async function () {
try {
const result = await axios.post(
"http://192.168.9.117:8092/users",
searchBy.value
);
if (result.data.code == 10000) {
ElMessage.success("查询成功");
searchBy.value = {};
}
if (result.data.code == 10001) {
ElMessage.error(result.data.msg);
searchBy.value = {};
}
tableData.value = result.data.data;
} catch (error) {
console.log("请求失败", error);
}
};
function Nono() {
searchBy.value = {};
get();
}
</script>
<template>
<el-container>
<el-main style="width: 100%">
<el-card style="min-width: 70%; margin: 0 auto">
<h2 style="margin-top: 0%">众筹活动界面后台</h2>
<h3>修改前台展示</h3>
<el-divider style="margin-top: 0%" />
<div style="display: flex; align-items: center">
<h4 style="margin: 0%">当前标题:</h4>
<span style="color: rgb(145, 145, 145); margin-left: 20px">{{
info.title
}}</span>
<el-button
class="xiugai"
type="danger"
style="
display: inline-block;
margin-left: 20px;
color: rgb(245, 62, 62);
"
@click="titleEdit = true"
>修改</el-button
>
</div>
<div style="display: flex; align-items: center">
<h4 style="margin-bottom: 0px; margin-top: 30px">众筹目标:</h4>
<span
style="
margin-bottom: 0px;
margin-top: 30px;
margin-left: 20px;
color: rgb(145, 145, 145);
"
>{{ info.targetNumber }}</span
>
<el-button
class="xiugai"
type="danger"
style="
display: inline-block;
margin-left: 20px;
margin-top: 30px;
color: rgb(245, 62, 62);
"
@click="raiseEdit = true"
>修改</el-button
>
</div>
</el-card>
<el-card style="min-width: 70%; margin: 0 auto; margin-top: 20px">
<h3>众筹用户列表</h3>
<el-button type="danger" @click="addInfo = true">添加</el-button>
<el-input
v-model="searchBy.jwcode"
style="width: 150px; margin-left: 200px"
placeholder="精网号"
></el-input>
<el-select
v-model="searchBy.identity"
style="width: 100px; margin-left: 60px"
placeholder="身份"
>
<el-option label="真实" value="1"></el-option>
<el-option label="虚拟" value="0"></el-option>
</el-select>
<el-button type="" @click="Nono()" style="margin-left: 40px"
>重置</el-button
>
<el-button type="danger" @click="searchByJwcodeAndIdentity()"
>查询</el-button
>
<el-table :data="tableData">
<el-table-column
prop="id"
label="序号"
width="300px"
></el-table-column>
<el-table-column
prop="jwcode"
label="编号"
width="300px"
></el-table-column>
<el-table-column prop="identity" label="身份" width="300px">
<!-- 模板内容 -->
<template #default="scope">
<span v-if="scope.row.identity == 1">
<span>真实</span>
</span>
<span v-if="scope.row.identity == 0">
<span>虚拟</span>
</span>
</template>
</el-table-column>
<el-table-column prop="creatTime" label="参与时间" width="700px">
<template #default="scope">
{{ moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") }}
</template>
</el-table-column>
<el-table-column label="操作" width="px">
<template #default="scope">
<el-button
@click="deleteRow(scope.row.jwcode)"
type="text"
style="color: rgb(245, 62, 62)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
</el-card>
</el-main>
</el-container>
<!-- 这是添加的弹窗 -->
<el-dialog v-model="addInfo" width="500">
<div>
<h3 style="display: inline-block; margin-right: 20px">精网号</h3>
<el-input
v-model="add.jwcode"
placeholder="请输入精网号"
style="width: 300px; display: inline-block"
/>
</div>
<div>
<h3 style="display: inline-block; margin-right: 20px">身份</h3>
<el-radio-group v-model="add.identity">
<el-radio value="1" size="large">真实</el-radio>
<el-radio value="0" size="large">虚拟</el-radio>
</el-radio-group>
</div>
<el-button type="danger" @click="addUser()" style="margin-left: 400px"
>添加</el-button
>
</el-dialog>
<!-- 这是修改表题的弹窗 -->
<el-dialog v-model="titleEdit" width="500">
<div>
<h3 style="display: inline-block; margin-right: 20px">输入新标题</h3>
<el-input
v-model="titleNew.title"
placeholder="请输入新标题"
style="width: 300px; display: inline-block"
/>
</div>
<el-button type="danger" @click="putTitle()" style="margin-left: 400px"
>确定</el-button
>
</el-dialog>
<!-- 这是修改众筹目标的弹窗 -->
<el-dialog v-model="raiseEdit" width="500">
<div>
<h3 style="display: inline-block; margin-right: 20px">
输入新众筹目标为
</h3>
<el-input
v-model="targetNumberNew.targetNumber"
placeholder="请输入阿拉伯数字"
style="width: 300px; display: inline-block"
/>
</div>
<el-button
type="danger"
@click="putTargetNumber()"
style="margin-left: 400px"
>确定</el-button
>
</el-dialog>
<!-- 这是删除的弹窗 -->
<el-dialog v-model="deleteInfo" width="500">
<div>
<h3 style="display: inline-block; margin-right: 20px">
确认删除该条信息
</h3>
</div>
<el-button type="danger" @click="tureDelete()" style="margin-left: 400px"
>确定</el-button
>
</el-dialog>
</template>
<style scoped>
/* 移除 el-button 的默认样式 */
.xiugai {
border: none;
background-color: transparent;
color: #409eff; /* Element Plus 默认的主题色 */
padding: 0;
font-size: inherit; /* 继承父元素的字体大小 */
}
</style>
Loading…
Cancel
Save