Compare commits

..

12 Commits

Author SHA1 Message Date
南浔
909c6516ad 更新 2025-07-19 14:09:58 +08:00
9ce7a162c6 Merge pull request 'main' (#9) from main into dev
Reviewed-on: #9
2025-06-23 20:29:53 +08:00
nanxu
f9486c8706 fix(interceptor):修复登录账密错误时无限跳转的问题 2025-06-23 20:21:52 +08:00
2ac118d791 Merge pull request 'y11' (#8) from y11 into main
Reviewed-on: #8
2025-06-12 20:38:46 +08:00
9be18b910c 注册 2025-06-12 20:30:05 +08:00
1ee2c6a4b1 注册 2025-06-12 19:52:55 +08:00
d7e6b1f5e6 Merge pull request '完善后台框架及路由菜单' (#6) from dev into main
Reviewed-on: #6
2025-06-12 18:59:30 +08:00
南浔
ebb32a8cf0 完善后台框架及路由菜单 2025-06-12 18:58:00 +08:00
1db3cd0259 Merge pull request '1、新增alert插件' (#5) from dev into main
Reviewed-on: #5
2025-06-11 23:50:25 +08:00
南浔
b02c61ecd8 1、新增alert插件
2、新增登录凭证处理逻辑
3、新增AccessToken自动刷新机制
4、新增后台模板页
2025-06-11 23:46:06 +08:00
0aff030db4 Merge pull request '添加vuex组件' (#4) from dev into main
Reviewed-on: #4
2025-06-10 17:48:37 +08:00
ac870d2302 Merge pull request 'dev' (#3) from dev into main
Reviewed-on: #3
2025-06-10 17:45:18 +08:00
25 changed files with 1863 additions and 148 deletions

362
package-lock.json generated
View File

@ -8,9 +8,12 @@
"name": "frontend", "name": "frontend",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"ant-design-vue": "^1.7.8",
"axios": "^1.9.0", "axios": "^1.9.0",
"blueimp-md5": "^2.19.0",
"bootstrap": "^5.3.6", "bootstrap": "^5.3.6",
"core-js": "^3.8.3", "core-js": "^3.8.3",
"feather-icons": "^4.29.2",
"jquery": "^3.7.1", "jquery": "^3.7.1",
"perfect-scrollbar": "^1.5.6", "perfect-scrollbar": "^1.5.6",
"vue": "^2.6.14", "vue": "^2.6.14",
@ -53,6 +56,36 @@
"node": ">=6.0.0" "node": ">=6.0.0"
} }
}, },
"node_modules/@ant-design/colors": {
"version": "3.2.2",
"resolved": "https://registry.npmmirror.com/@ant-design/colors/-/colors-3.2.2.tgz",
"integrity": "sha512-YKgNbG2dlzqMhA9NtI3/pbY16m3Yl/EeWBRa+lB1X1YaYxHrxNexiQYCLTWO/uDvAjLFMEDU+zR901waBtMtjQ==",
"license": "MIT",
"dependencies": {
"tinycolor2": "^1.4.1"
}
},
"node_modules/@ant-design/icons": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/@ant-design/icons/-/icons-2.1.1.tgz",
"integrity": "sha512-jCH+k2Vjlno4YWl6g535nHR09PwCEmTBKAG6VqF+rhkrSPRLfgpU2maagwbZPLjaHuU5Jd1DFQ2KJpQuI6uG8w==",
"license": "MIT"
},
"node_modules/@ant-design/icons-vue": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/@ant-design/icons-vue/-/icons-vue-2.0.0.tgz",
"integrity": "sha512-2c0QQE5hL4N48k5NkPG5sdpMl9YnvyNhf0U7YkdZYDlLnspoRU7vIA0UK9eHBs6OpFLcJB6o8eJrIl2ajBskPg==",
"license": "MIT",
"dependencies": {
"@ant-design/colors": "^3.1.0",
"babel-runtime": "^6.26.0"
},
"peerDependencies": {
"@ant-design/icons": "^2.0.0",
"vue": ">=2.5.0",
"vue-template-compiler": ">=2.5.0"
}
},
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
"version": "7.27.1", "version": "7.27.1",
"resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.27.1.tgz", "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.27.1.tgz",
@ -1836,6 +1869,16 @@
"dev": true, "dev": true,
"license": "BSD-3-Clause" "license": "BSD-3-Clause"
}, },
"node_modules/@simonwep/pickr": {
"version": "1.7.4",
"resolved": "https://registry.npmmirror.com/@simonwep/pickr/-/pickr-1.7.4.tgz",
"integrity": "sha512-fq7jgKJT21uWGC1mARBHvvd1JYlEf93o7SuVOB4Lr0x/2UPuNC9Oe9n/GzVeg4oVtqMDfh1wIEJpsdOJEZb+3g==",
"license": "MIT",
"dependencies": {
"core-js": "^3.6.5",
"nanopop": "^2.1.0"
}
},
"node_modules/@soda/friendly-errors-webpack-plugin": { "node_modules/@soda/friendly-errors-webpack-plugin": {
"version": "1.8.1", "version": "1.8.1",
"resolved": "https://registry.npmmirror.com/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.8.1.tgz", "resolved": "https://registry.npmmirror.com/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.8.1.tgz",
@ -2994,6 +3037,15 @@
"node": ">=0.4.0" "node": ">=0.4.0"
} }
}, },
"node_modules/add-dom-event-listener": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/add-dom-event-listener/-/add-dom-event-listener-1.1.0.tgz",
"integrity": "sha512-WCxx1ixHT0GQU9hb0KI/mhgRQhnU+U3GvwY6ZvVjYq8rsihIGoaIOUbY0yMPBxLH5MDtr0kz3fisWGNcbWW7Jw==",
"license": "MIT",
"dependencies": {
"object-assign": "4.x"
}
},
"node_modules/address": { "node_modules/address": {
"version": "1.2.2", "version": "1.2.2",
"resolved": "https://registry.npmmirror.com/address/-/address-1.2.2.tgz", "resolved": "https://registry.npmmirror.com/address/-/address-1.2.2.tgz",
@ -3122,6 +3174,49 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1" "url": "https://github.com/chalk/ansi-styles?sponsor=1"
} }
}, },
"node_modules/ant-design-vue": {
"version": "1.7.8",
"resolved": "https://registry.npmmirror.com/ant-design-vue/-/ant-design-vue-1.7.8.tgz",
"integrity": "sha512-F1hmiS9vwbyfuFvlamdW5l9bHKqRlj9wHaGDIE41NZMWXyWy8qL0UFa/+I0Wl8gQWZCqODW5pN6Yfoyn85At3A==",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@ant-design/icons": "^2.1.1",
"@ant-design/icons-vue": "^2.0.0",
"@simonwep/pickr": "~1.7.0",
"add-dom-event-listener": "^1.0.2",
"array-tree-filter": "^2.1.0",
"async-validator": "^3.0.3",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-runtime": "6.x",
"classnames": "^2.2.5",
"component-classes": "^1.2.6",
"dom-align": "^1.10.4",
"dom-closest": "^0.2.0",
"dom-scroll-into-view": "^2.0.0",
"enquire.js": "^2.1.6",
"intersperse": "^1.0.0",
"is-mobile": "^2.2.1",
"is-negative-zero": "^2.0.0",
"ismobilejs": "^1.0.0",
"json2mq": "^0.2.0",
"lodash": "^4.17.5",
"moment": "^2.21.0",
"mutationobserver-shim": "^0.3.2",
"node-emoji": "^1.10.0",
"omit.js": "^1.0.0",
"raf": "^3.4.0",
"resize-observer-polyfill": "^1.5.1",
"shallow-equal": "^1.0.0",
"shallowequal": "^1.0.2",
"vue-ref": "^2.0.0",
"warning": "^4.0.0"
},
"peerDependencies": {
"vue": "^2.6.0",
"vue-template-compiler": "^2.6.0"
}
},
"node_modules/any-promise": { "node_modules/any-promise": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmmirror.com/any-promise/-/any-promise-1.3.0.tgz", "resolved": "https://registry.npmmirror.com/any-promise/-/any-promise-1.3.0.tgz",
@ -3171,6 +3266,12 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/array-tree-filter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/array-tree-filter/-/array-tree-filter-2.1.0.tgz",
"integrity": "sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==",
"license": "MIT"
},
"node_modules/array-union": { "node_modules/array-union": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/array-union/-/array-union-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/array-union/-/array-union-2.1.0.tgz",
@ -3188,6 +3289,12 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/async-validator": {
"version": "3.5.2",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-3.5.2.tgz",
"integrity": "sha512-8eLCg00W9pIRZSB781UUX/H6Oskmm8xloZfr09lz5bikRpBVDlJ3hRVuxxP1SxcwsEYfJ4IU8Q19Y8/893r3rQ==",
"license": "MIT"
},
"node_modules/asynckit": { "node_modules/asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
@ -3253,6 +3360,12 @@
"proxy-from-env": "^1.1.0" "proxy-from-env": "^1.1.0"
} }
}, },
"node_modules/babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==",
"license": "MIT"
},
"node_modules/babel-loader": { "node_modules/babel-loader": {
"version": "8.4.1", "version": "8.4.1",
"resolved": "https://registry.npmmirror.com/babel-loader/-/babel-loader-8.4.1.tgz", "resolved": "https://registry.npmmirror.com/babel-loader/-/babel-loader-8.4.1.tgz",
@ -3340,6 +3453,24 @@
"@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
} }
}, },
"node_modules/babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
"license": "MIT",
"dependencies": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
}
},
"node_modules/babel-runtime/node_modules/core-js": {
"version": "2.6.12",
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
"deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
"hasInstallScript": true,
"license": "MIT"
},
"node_modules/balanced-match": { "node_modules/balanced-match": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
@ -3417,6 +3548,12 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/blueimp-md5": {
"version": "2.19.0",
"resolved": "https://registry.npmmirror.com/blueimp-md5/-/blueimp-md5-2.19.0.tgz",
"integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==",
"license": "MIT"
},
"node_modules/body-parser": { "node_modules/body-parser": {
"version": "1.20.3", "version": "1.20.3",
"resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.3.tgz", "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.3.tgz",
@ -3781,6 +3918,12 @@
"node": ">=6.0" "node": ">=6.0"
} }
}, },
"node_modules/classnames": {
"version": "2.5.1",
"resolved": "https://registry.npmmirror.com/classnames/-/classnames-2.5.1.tgz",
"integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==",
"license": "MIT"
},
"node_modules/clean-css": { "node_modules/clean-css": {
"version": "5.3.3", "version": "5.3.3",
"resolved": "https://registry.npmmirror.com/clean-css/-/clean-css-5.3.3.tgz", "resolved": "https://registry.npmmirror.com/clean-css/-/clean-css-5.3.3.tgz",
@ -3974,6 +4117,20 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/component-classes": {
"version": "1.2.6",
"resolved": "https://registry.npmmirror.com/component-classes/-/component-classes-1.2.6.tgz",
"integrity": "sha512-hPFGULxdwugu1QWW3SvVOCUHLzO34+a2J6Wqy0c5ASQkfi9/8nZcBB0ZohaEbXOQlCflMAEMmEWk7u7BVs4koA==",
"license": "MIT",
"dependencies": {
"component-indexof": "0.0.3"
}
},
"node_modules/component-indexof": {
"version": "0.0.3",
"resolved": "https://registry.npmmirror.com/component-indexof/-/component-indexof-0.0.3.tgz",
"integrity": "sha512-puDQKvx/64HZXb4hBwIcvQLaLgux8o1CbWl39s41hrIIZDl1lJiD5jc22gj3RBeGK0ovxALDYpIbyjqDUUl0rw=="
},
"node_modules/compressible": { "node_modules/compressible": {
"version": "2.0.18", "version": "2.0.18",
"resolved": "https://registry.npmmirror.com/compressible/-/compressible-2.0.18.tgz", "resolved": "https://registry.npmmirror.com/compressible/-/compressible-2.0.18.tgz",
@ -4538,7 +4695,6 @@
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz", "resolved": "https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz",
"integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==", "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/debounce": { "node_modules/debounce": {
@ -4838,6 +4994,21 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/dom-align": {
"version": "1.12.4",
"resolved": "https://registry.npmmirror.com/dom-align/-/dom-align-1.12.4.tgz",
"integrity": "sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==",
"license": "MIT"
},
"node_modules/dom-closest": {
"version": "0.2.0",
"resolved": "https://registry.npmmirror.com/dom-closest/-/dom-closest-0.2.0.tgz",
"integrity": "sha512-6neTn1BtJlTSt+XSISXpnOsF1uni1CHsP/tmzZMGWxasYFHsBOqrHPnzmneqEgKhpagnfnfSfbvRRW0xFsBHAA==",
"license": "MIT",
"dependencies": {
"dom-matches": ">=1.0.1"
}
},
"node_modules/dom-converter": { "node_modules/dom-converter": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmmirror.com/dom-converter/-/dom-converter-0.2.0.tgz", "resolved": "https://registry.npmmirror.com/dom-converter/-/dom-converter-0.2.0.tgz",
@ -4848,6 +5019,18 @@
"utila": "~0.4" "utila": "~0.4"
} }
}, },
"node_modules/dom-matches": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/dom-matches/-/dom-matches-2.0.0.tgz",
"integrity": "sha512-2VI856xEDCLXi19W+4BechR5/oIS6bKCKqcf16GR8Pg7dGLJ/eBOWVbCmQx2ISvYH6wTNx5Ef7JTOw1dRGRx6A==",
"license": "MIT"
},
"node_modules/dom-scroll-into-view": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/dom-scroll-into-view/-/dom-scroll-into-view-2.0.1.tgz",
"integrity": "sha512-bvVTQe1lfaUr1oFzZX80ce9KLDlZ3iU+XGNE/bz9HnGdklTieqsbmsLHe+rT2XWqopvL0PckkYqN7ksmm5pe3w==",
"license": "MIT"
},
"node_modules/dom-serializer": { "node_modules/dom-serializer": {
"version": "1.4.1", "version": "1.4.1",
"resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-1.4.1.tgz", "resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-1.4.1.tgz",
@ -5041,6 +5224,12 @@
"node": ">=10.13.0" "node": ">=10.13.0"
} }
}, },
"node_modules/enquire.js": {
"version": "2.1.6",
"resolved": "https://registry.npmmirror.com/enquire.js/-/enquire.js-2.1.6.tgz",
"integrity": "sha512-/KujNpO+PT63F7Hlpu4h3pE3TokKRHN26JYmQpPyjkRD/N57R7bPDNojMXdi7uveAKjYB7yQnartCxZnFWr0Xw==",
"license": "MIT"
},
"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",
@ -5421,6 +5610,16 @@
"node": ">=0.8.0" "node": ">=0.8.0"
} }
}, },
"node_modules/feather-icons": {
"version": "4.29.2",
"resolved": "https://registry.npmmirror.com/feather-icons/-/feather-icons-4.29.2.tgz",
"integrity": "sha512-0TaCFTnBTVCz6U+baY2UJNKne5ifGh7sMG4ZC2LoBWCZdIyPa+y6UiR4lEYGws1JOFWdee8KAsAIvu0VcXqiqA==",
"license": "MIT",
"dependencies": {
"classnames": "^2.2.5",
"core-js": "^3.1.3"
}
},
"node_modules/figures": { "node_modules/figures": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/figures/-/figures-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/figures/-/figures-2.0.0.tgz",
@ -5906,7 +6105,6 @@
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmmirror.com/he/-/he-1.2.0.tgz", "resolved": "https://registry.npmmirror.com/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
"dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
"he": "bin/he" "he": "bin/he"
@ -6268,6 +6466,12 @@
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/intersperse": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/intersperse/-/intersperse-1.0.0.tgz",
"integrity": "sha512-LGcfug7OTeWkaQ8PEq8XbTy9Jl6uCNg8DrPnQUmwxSY8UETj1Y+LLmpdD0qHdEj6KVchuH3BE3ZzIXQ1t3oFUw==",
"license": "MIT"
},
"node_modules/ipaddr.js": { "node_modules/ipaddr.js": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-2.2.0.tgz", "resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-2.2.0.tgz",
@ -6383,6 +6587,24 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/is-mobile": {
"version": "2.2.2",
"resolved": "https://registry.npmmirror.com/is-mobile/-/is-mobile-2.2.2.tgz",
"integrity": "sha512-wW/SXnYJkTjs++tVK5b6kVITZpAZPtUrt9SF80vvxGiF/Oywal+COk1jlRkiVq15RFNEQKQY31TkV24/1T5cVg==",
"license": "MIT"
},
"node_modules/is-negative-zero": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz",
"integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-number": { "node_modules/is-number": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz",
@ -6469,6 +6691,12 @@
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/ismobilejs": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/ismobilejs/-/ismobilejs-1.1.1.tgz",
"integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==",
"license": "MIT"
},
"node_modules/isobject": { "node_modules/isobject": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmmirror.com/isobject/-/isobject-3.0.1.tgz", "resolved": "https://registry.npmmirror.com/isobject/-/isobject-3.0.1.tgz",
@ -6551,7 +6779,6 @@
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/jsesc": { "node_modules/jsesc": {
@ -6588,6 +6815,15 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/json2mq": {
"version": "0.2.0",
"resolved": "https://registry.npmmirror.com/json2mq/-/json2mq-0.2.0.tgz",
"integrity": "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==",
"license": "MIT",
"dependencies": {
"string-convert": "^0.2.0"
}
},
"node_modules/json5": { "node_modules/json5": {
"version": "2.2.3", "version": "2.2.3",
"resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz", "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz",
@ -6727,7 +6963,6 @@
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/lodash.debounce": { "node_modules/lodash.debounce": {
@ -6932,6 +7167,18 @@
"node": ">=4" "node": ">=4"
} }
}, },
"node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmmirror.com/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"license": "MIT",
"dependencies": {
"js-tokens": "^3.0.0 || ^4.0.0"
},
"bin": {
"loose-envify": "cli.js"
}
},
"node_modules/lower-case": { "node_modules/lower-case": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/lower-case/-/lower-case-2.0.2.tgz", "resolved": "https://registry.npmmirror.com/lower-case/-/lower-case-2.0.2.tgz",
@ -7257,6 +7504,15 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/moment": {
"version": "2.30.1",
"resolved": "https://registry.npmmirror.com/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.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-2.0.1.tgz",
@ -7288,6 +7544,12 @@
"multicast-dns": "cli.js" "multicast-dns": "cli.js"
} }
}, },
"node_modules/mutationobserver-shim": {
"version": "0.3.7",
"resolved": "https://registry.npmmirror.com/mutationobserver-shim/-/mutationobserver-shim-0.3.7.tgz",
"integrity": "sha512-oRIDTyZQU96nAiz2AQyngwx1e89iApl2hN5AOYwyxLUB47UYsU3Wv9lJWqH5y/QdiYkc5HQLi23ZNB3fELdHcQ==",
"license": "MIT"
},
"node_modules/mz": { "node_modules/mz": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz", "resolved": "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz",
@ -7318,6 +7580,12 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
} }
}, },
"node_modules/nanopop": {
"version": "2.4.2",
"resolved": "https://registry.npmmirror.com/nanopop/-/nanopop-2.4.2.tgz",
"integrity": "sha512-NzOgmMQ+elxxHeIha+OG/Pv3Oc3p4RU2aBhwWwAqDpXrdTbtRylbRLQztLy8dMMwfl6pclznBdfUhccEn9ZIzw==",
"license": "MIT"
},
"node_modules/negotiator": { "node_modules/negotiator": {
"version": "0.6.4", "version": "0.6.4",
"resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.4.tgz", "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.4.tgz",
@ -7353,6 +7621,15 @@
"tslib": "^2.0.3" "tslib": "^2.0.3"
} }
}, },
"node_modules/node-emoji": {
"version": "1.11.0",
"resolved": "https://registry.npmmirror.com/node-emoji/-/node-emoji-1.11.0.tgz",
"integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==",
"license": "MIT",
"dependencies": {
"lodash": "^4.17.21"
}
},
"node_modules/node-fetch": { "node_modules/node-fetch": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz", "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz",
@ -7477,7 +7754,6 @@
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
@ -7534,6 +7810,15 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/omit.js": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/omit.js/-/omit.js-1.0.2.tgz",
"integrity": "sha512-/QPc6G2NS+8d4L/cQhbk6Yit1WTB6Us2g84A7A/1+w9d/eRGHyEqC5kkQtHVoHZ5NFWGG7tUGgrhVZwgZanKrQ==",
"license": "MIT",
"dependencies": {
"babel-runtime": "^6.23.0"
}
},
"node_modules/on-finished": { "node_modules/on-finished": {
"version": "2.4.1", "version": "2.4.1",
"resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz", "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz",
@ -7863,6 +8148,12 @@
"integrity": "sha512-rixgxw3SxyJbCaSpo1n35A/fwI1r2rdwMKOTCg/AcG+xOEyZcE8UHVjpZMFCVImzsFoCZeJTT+M/rdEIQYO2nw==", "integrity": "sha512-rixgxw3SxyJbCaSpo1n35A/fwI1r2rdwMKOTCg/AcG+xOEyZcE8UHVjpZMFCVImzsFoCZeJTT+M/rdEIQYO2nw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==",
"license": "MIT"
},
"node_modules/picocolors": { "node_modules/picocolors": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
@ -8732,6 +9023,15 @@
], ],
"license": "MIT" "license": "MIT"
}, },
"node_modules/raf": {
"version": "3.4.1",
"resolved": "https://registry.npmmirror.com/raf/-/raf-3.4.1.tgz",
"integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
"license": "MIT",
"dependencies": {
"performance-now": "^2.1.0"
}
},
"node_modules/randombytes": { "node_modules/randombytes": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz",
@ -8860,6 +9160,12 @@
"node": ">=4" "node": ">=4"
} }
}, },
"node_modules/regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
"license": "MIT"
},
"node_modules/regexpu-core": { "node_modules/regexpu-core": {
"version": "6.2.0", "version": "6.2.0",
"resolved": "https://registry.npmmirror.com/regexpu-core/-/regexpu-core-6.2.0.tgz", "resolved": "https://registry.npmmirror.com/regexpu-core/-/regexpu-core-6.2.0.tgz",
@ -8962,6 +9268,12 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==",
"license": "MIT"
},
"node_modules/resolve": { "node_modules/resolve": {
"version": "1.22.10", "version": "1.22.10",
"resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.10.tgz", "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.10.tgz",
@ -9349,6 +9661,18 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/shallow-equal": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/shallow-equal/-/shallow-equal-1.2.1.tgz",
"integrity": "sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==",
"license": "MIT"
},
"node_modules/shallowequal": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/shallowequal/-/shallowequal-1.1.0.tgz",
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
"license": "MIT"
},
"node_modules/shebang-command": { "node_modules/shebang-command": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-1.2.0.tgz", "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-1.2.0.tgz",
@ -9650,6 +9974,12 @@
"safe-buffer": "~5.2.0" "safe-buffer": "~5.2.0"
} }
}, },
"node_modules/string-convert": {
"version": "0.2.1",
"resolved": "https://registry.npmmirror.com/string-convert/-/string-convert-0.2.1.tgz",
"integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==",
"license": "MIT"
},
"node_modules/string-width": { "node_modules/string-width": {
"version": "4.2.3", "version": "4.2.3",
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
@ -9995,6 +10325,12 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/tinycolor2": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/tinycolor2/-/tinycolor2-1.6.0.tgz",
"integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==",
"license": "MIT"
},
"node_modules/to-regex-range": { "node_modules/to-regex-range": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
@ -10291,6 +10627,12 @@
"url": "https://github.com/chalk/chalk?sponsor=1" "url": "https://github.com/chalk/chalk?sponsor=1"
} }
}, },
"node_modules/vue-ref": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/vue-ref/-/vue-ref-2.0.0.tgz",
"integrity": "sha512-uKNKpFOVeWNqS2mrBZqnpLyXJo5Q+vnkex6JvpENvhXHFNBW/SJTP8vJywLuVT3DpxwXcF9N0dyIiZ4/NpTexQ==",
"license": "MIT"
},
"node_modules/vue-router": { "node_modules/vue-router": {
"version": "3.6.5", "version": "3.6.5",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz",
@ -10319,7 +10661,6 @@
"version": "2.7.16", "version": "2.7.16",
"resolved": "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz", "resolved": "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz",
"integrity": "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==", "integrity": "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"de-indent": "^1.0.2", "de-indent": "^1.0.2",
@ -10355,6 +10696,15 @@
"vue": "^2.0.0" "vue": "^2.0.0"
} }
}, },
"node_modules/warning": {
"version": "4.0.3",
"resolved": "https://registry.npmmirror.com/warning/-/warning-4.0.3.tgz",
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
"license": "MIT",
"dependencies": {
"loose-envify": "^1.0.0"
}
},
"node_modules/watchpack": { "node_modules/watchpack": {
"version": "2.4.4", "version": "2.4.4",
"resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.4.tgz", "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.4.tgz",

View File

@ -7,9 +7,12 @@
"build": "vue-cli-service build" "build": "vue-cli-service build"
}, },
"dependencies": { "dependencies": {
"ant-design-vue": "^1.7.8",
"axios": "^1.9.0", "axios": "^1.9.0",
"blueimp-md5": "^2.19.0",
"bootstrap": "^5.3.6", "bootstrap": "^5.3.6",
"core-js": "^3.8.3", "core-js": "^3.8.3",
"feather-icons": "^4.29.2",
"jquery": "^3.7.1", "jquery": "^3.7.1",
"perfect-scrollbar": "^1.5.6", "perfect-scrollbar": "^1.5.6",
"vue": "^2.6.14", "vue": "^2.6.14",

View File

@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Poppins:400,500,700,800&display=swap" rel="stylesheet">
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
</head> </head>
<body> <body>

View File

@ -1,13 +1,24 @@
<template> <template>
<div id="app" :class="mainClass"> <div id="app" :class="mainClass">
<div class='loader' v-if="isLoading">
<div class='spinner-grow text-primary' role='status'>
<span class='sr-only'>Loading...</span>
</div>
</div>
<router-view/> <router-view/>
</div> </div>
</template> </template>
<script> <script>
import Alert from '@/components/Alert.vue';
import { mapGetters, mapState } from 'vuex';
export default { export default {
data(){
return {
isLoading:true
}
},
computed:{ computed:{
/** /**
* 授权页面添加特定类名 * 授权页面添加特定类名
@ -15,11 +26,13 @@ export default {
*/ */
mainClass(){ mainClass(){
const path = this.$route.path const path = this.$route.path
console.log(path)
if(path.startsWith('/auth')){ if(path.startsWith('/auth')){
return 'login-page' return 'login-page'
} }
} }
},
mounted(){
this.isLoading = false
} }
} }
</script> </script>

95
src/components/Alert.vue Normal file
View File

@ -0,0 +1,95 @@
<template>
<transition name="fade">
<div
v-if="visible"
:class="`alert alert-${type} alert-dismissible centered-alert`"
role="alert"
>
<div class="alert-content">
<span class="alert-message">{{ message }}</span>
<button
type="button"
class="btn-close"
aria-label="Close"
@click="close"
></button>
</div>
</div>
</transition>
</template>
<script>
export default {
name: 'Alert',
props: {
type: {
type:String,
default:'success'
},
message:{
type:String
},
duration:{
type:Number,
default:5000
}
},
data() {
return {
visible: false
}
},
methods: {
close() {
this.visible = false
setTimeout(() => {
this.$emit('close')
}, 500);
}
},
mounted(){
this.$nextTick(() => {
this.visible = true
})
if(this.duration>0){
setTimeout(() => {
this.close()
}, this.duration);
}
}
}
</script>
<style scoped>
.centered-alert {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 1080;
min-width: 300px;
max-width: 600px;
}
.alert-content {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.alert-message {
flex: 1;
word-break: break-word;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity .5s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
</style>

View File

@ -0,0 +1,196 @@
<template>
<div>
<div class="card">
<div class="card-body">
<h5 class="card-title">{{ title }}</h5>
<p>DataTables has most features enabled by default, so all you need to do to use it with your own tables is to
call the construction function: <code>$().DataTable();</code>.</p>
<div id="zero-conf_wrapper" class="dataTables_wrapper dt-bootstrap4">
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="zero-conf_length"><label>Show <select name="zero-conf_length"
aria-controls="zero-conf" class="custom-select custom-select-sm form-control form-control-sm"
v-model="pageSize">
<option value="10">10</option>
<option value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
</select> entries</label></div>
</div>
<div class="col-sm-12 col-md-6">
<div id="zero-conf_filter" class="dataTables_filter"><label>Search:<input type="search"
class="form-control form-control-sm" placeholder="" aria-controls="zero-conf"></label></div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<table id="zero-conf" class="display dataTable" style="width:100%" role="grid"
aria-describedby="zero-conf_info">
<thead>
<tr role="row">
<th class="sorting_asc" tabindex="0" aria-controls="zero-conf" rowspan="1" colspan="1"
aria-sort="ascending" aria-label="Name: activate to sort column descending"
style="width: 85.5469px;" v-for="(item, index) in headers" :key="index">{{ item.text }}</th>
</tr>
</thead>
<tbody>
<tr role="row" v-for="(item, rowIndex) in rows" :key="rowIndex"
:class="rowIndex % 2 ? 'even' : 'odd'">
<td v-for="(header, colIndex) in headers" :key="colIndex">
{{ item[header.value] }}
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th rowspan="1" colspan="1" v-for="(header, index) in headers" :key="index">{{ header.value }}</th>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-5">
<div class="dataTables_info" id="zero-conf_info" role="status" aria-live="polite">Showing 1 to 10 of 57
entries</div>
</div>
<div class="col-sm-12 col-md-7">
<div class="dataTables_paginate paging_simple_numbers" id="zero-conf_paginate">
<ul class="pagination">
<li :class="['paginate_button', 'page-item', 'previous', (currentPageIndex == 1 ? 'disabled' : '')]"
id="zero-conf_previous"><a href="#" aria-controls="zero-conf" data-dt-idx="0" tabindex="0"
class="page-link" @click.prevent="previousPage">上一页</a></li>
<li :class="['paginate_button','page-item',item.index == currentPageIndex ? 'active' : '']"
v-for="(item,index) in pageBtn" :key="index"
><a href="#" aria-controls="zero-conf" :data-dt-idx="item.index"
tabindex="0" class="page-link" @click.prevent="currentPageIndex = item.index">{{item.text}}</a></li>
<li
:class="['paginate_button', 'page-item', 'next', (currentPageIndex == pageCount ? 'disabled' : '')]"
id="zero-conf_next"><a href="#" aria-controls="zero-conf" data-dt-idx="7" tabindex="0"
class="page-link" @click.prevent="nextPage">下一页</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "DataTable",
props: {
title: {
type: String,
default: "标题",
},
headers: {
// [{ text: '', value: 'name'}, ...]
type: Array,
required: true,
},
rows: {
// [{ name: '', position: '', office: '', age: 33, startDate: '2008/11/28', salary: '162,700 ' }, ...]
type: Array,
required: true,
},
dataCount: {
type: Number,
required: true
}
},
data() {
return {
//
currentPageIndex: 1,
//
pageSize: 10,
//
pageCount: 0,
//[{text:'1',index:1},.....]
pageBtn: []
}
},
mounted() {
},
methods: {
//
nextPage() {
if (this.currentPageIndex < this.pageCount) this.currentPageIndex++;
},
//
previousPage() {
if (this.currentPageIndex > 1) {
this.currentPageIndex--
}
},
changePage(pageIndex) {
this.currentPageIndex == pageIndex
},
//
updatePageCount(newPageSize) {
this.pageCount = Math.floor(this.dataCount / newPageSize);
this.pageCount += this.dataCount % newPageSize == 0 ? 0 : 1;
},
//
updateRows(newPageIndex) {
},
//
updatePageBtn(newPageIndex){
this.pageBtn = []
//
this.pageBtn.push({text: '1', index: 1})
//8
if(this.pageCount <= 8){
for(let i = 2; i < this.pageCount; i++){
this.pageBtn.push({text: `${i}`, index: i})
}
}else{
//21
if(newPageIndex - 2 > 3){
this.pageBtn.push({text: '...', index: newPageIndex})
}
//
for(let i = newPageIndex - 2; i <= newPageIndex + 2; i++){
this.pageBtn.push({text: `${i}`, index: i})
}
//21
if(newPageIndex + 2 < this.pageCount - 2){
this.pageBtn.push({text: '...', index: newPageIndex})
}
}
//
this.pageBtn.push({text: `${this.pageCount}`, index: this.pageCount})
}
},
watch: {
//
'pageSize': {
handler(newVal) {
this.updatePageCount(newVal)
//
this.currentPageIndex = 1
this.updateRows(this.currentPageIndex)
this.updatePageBtn(this.currentPageIndex)
},
immediate: true
},
//
'currentPageIndex': {
handler(newVal) {
this.updateRows(newVal)
this.updatePageBtn(newVal)
},
immediate: true
}
}
}
</script>
<style scoped>
/* 可自定义样式 */
</style>

View File

@ -1,6 +1,9 @@
import Vue from 'vue' import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import store from './store'
import api from './request/api'
import Alert from '@/plugins/alert'
import 'jquery' import 'jquery'
import 'bootstrap/dist/js/bootstrap.bundle.min.js' import 'bootstrap/dist/js/bootstrap.bundle.min.js'
import 'bootstrap/dist/css/bootstrap.min.css' import 'bootstrap/dist/css/bootstrap.min.css'
@ -9,9 +12,24 @@ import './assets/plugins/font-awesome/css/all.min.css'
import 'perfect-scrollbar' import 'perfect-scrollbar'
import "perfect-scrollbar/css/perfect-scrollbar.css" import "perfect-scrollbar/css/perfect-scrollbar.css"
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ //挂载后端请求函数到全局
Vue.prototype.$api = api
Vue.use(Alert)
/**
* 初始化系统
*/
async function initApp() {
//初始化请求系统配置信息
await store.dispatch('config/fetch_config')
new Vue({
router, router,
store,
render: h => h(App) render: h => h(App)
}).$mount('#app') }).$mount('#app')
}
initApp()

24
src/plugins/alert.js Normal file
View File

@ -0,0 +1,24 @@
import Alert from "@/components/Alert.vue"
import Vue from "vue"
const AlertConstructor = Vue.extend(Alert)
function showAlert(message,type,duration = 5000){
const instance = new AlertConstructor({
propsData:{message,type,duration}
})
const vm = instance.$mount()
document.body.appendChild(vm.$el)
instance.$on('close',() => {
document.body.removeChild(vm.$el)
instance.$destroy()
})
return instance
}
export default {
install(){
Vue.prototype.$alert = showAlert
}
}

View File

@ -1,9 +1,27 @@
import request from "./request" import request from "./request"
// 导出一个名为login_api的函数该函数使用request.post方法发送post请求到/api/auth/login路径 // 导出一个名为login_api的函数该函数使用request.post方法发送post请求到/api/auth/login路径
export const login_api =(param)=> request.post('/api/auth/login',param) const login = async (param)=> await request.post('/api/auth/login',param)
// 导出一个名为registered_api的函数该函数接收一个参数param并使用request.post方法发送一个POST请求到/api/Auth/Register接口请求体为param // 导出一个名为registered_api的函数该函数接收一个参数param并使用request.post方法发送一个POST请求到/api/Auth/Register接口请求体为param
export const registered_api =(param)=> request.post('/api/Auth/Register',param) const register = async (param)=> await request.post('/api/Auth/Register',param)
// 导出一个名为SendValidateCode_api的函数该函数使用request.post方法发送POST请求请求的URL为'/api/Auth/SendValidateCode' // 导出一个名为SendValidateCode_api的函数该函数使用request.post方法发送POST请求请求的URL为'/api/Auth/SendValidateCode'
export const SendValidateCode_api = (param)=> request.post(`/api/Auth/SendValidateCode?email=${param}`) const SendValidateCode = async (param)=> await request.post(`/api/Auth/SendValidateCode?email=${param}`)
//获取所有系统配置
const getAllConfig = async ()=> await request.get('/api/systemconfig/getallsystemconfig')
//获取用户个人信息
const getUserInfo = async () => await request.get('/api/User/UserInfo')
//获取用户列表(分页)
const getUserList = async (pageIndex,pageSize,desc) => await request.get(`/api/Admin/UserList?pageIndex=${pageIndex}&pageSize=${pageSize}&desc=${desc}`)
export default {
login,
register,
SendValidateCode,
getAllConfig,
getUserInfo,
getUserList
}

View File

@ -1,24 +1,27 @@
import axios from "axios" import axios from "axios"
import {attachAccessToken,authRequestError} from '@/utils/intercaptors/request/auth'
import { handlerefresherror } from "@/utils/intercaptors/response/refresh"
const request = axios.create({ const request = axios.create({
baseURL:'http://192.168.5.100:2088', baseURL:'http://192.168.5.100:2088',
timeout:10000 timeout:10000,
// ✅ 只把 status >= 500 视为错误401/402/403 等都当作正常返回
validateStatus: function (status) {
return status < 500 // 500以上才视为 error其他都进 then
}
}) })
// request.interceptors.request.use(config=>{ request.interceptors.request.use(attachAccessToken,authRequestError)
// config.headers.Authorization = localStorage.getItem('token')
// return config request.interceptors.response.use(
// },err=>{ handlerefresherror,
// Promise.reject(err) err => err
// } )
// )
request.interceptors.response.use(res=>{ request.interceptors.response.use(res=>{
alert(res.data.message)
return res.data return res.data
},err=>{ },err => err
alert(err.response.data.message)
}
) )
export default request export default request

View File

@ -12,27 +12,68 @@ const routes = [
name: 'home', name: 'home',
component: HomeView component: HomeView
} }
,{ , {
path:'', path: '',
redirect:'/home' redirect: '/home'
}, },
{ {
path:'/auth', path: '/auth',
component: Login, component: Login,
children: [ children: [
{ {
path:'login', path: 'login',
component: Login component: Login
}, },
{ {
path:'register', path: 'register',
component: Register component: Register
} }
] ]
},
{
path: '/layout',
component: () => import('@/views/layout/Home.vue'),
redirect:'/layout/index',
children: [
{
path: 'index',
component: () => import('@/views/layout/Dashboard.vue'),
meta: {
title: '主页',
icon: 'home',
showInMenu: true,
showInUser:false,
isHome:true
}
},
{
path: 'users',
component: () => import('@/views/layout/Users.vue'),
meta: {
title: '用户管理',
icon: 'users',
showInMenu: true,
showInUser:false,
isHome:false
}
},
{
path: 'test',
component: () => import('@/views/layout/Users.vue'),
meta: {
title: '用户管理',
icon: 'inbox',
showInMenu: true,
showInUser:false,
isHome:false
}
},
]
} }
] ]
const router = new VueRouter({ const router = new VueRouter({
mode: 'history',
routes routes
}) })

View File

@ -1,4 +1,14 @@
import Vue from 'vue' import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
import config from './modules/config'
import userinfo from './modules/userinfo'
Vue.use(Vuex) Vue.use(Vuex)
export default new Vuex.Store({
modules:{
config,
userinfo
}
})

View File

@ -0,0 +1,54 @@
import api from '@/request/api'
const state = {
//全局系统配置
systemconfig:[]
}
const mutations = {
/**设置系统配置 */
SET_CONFIG(state,config){
state.systemconfig = config
}
}
const actions = {
/**
* 初始化配置
*/
async fetch_config({commit}){
try{
const res = await api.getAllConfig()
commit('SET_CONFIG',res.data)
}catch(e){
console.error('初始化配置失败'.e)
}
}
}
const getters = {
/**
* 将后端返回的系统配置数组转换为对象格式
* @returns {object}
*/
configMap: (state) => {
const map = {}
state.systemconfig.forEach(item => {
map[item.configName] = item.configBody
})
return map
},
systemname: (state,getters) => getters.configMap.SystemName || '青蓝',
systemdesc: (state,getters) => getters.configMap.SystemDescription || '无',
systemlogo: (state,getters) => getters.configMap.LogoLocation || 'https://img.picui.cn/free/2025/06/11/684900b15ecc4.jpg',
systemphone: (state,getters) => getters.configMap.Phone || '13000000000',
systememail: (state,getters) => getters.configMap.Email || 'admin@admin.com'
}
export default {
namespaced:true,
state,
mutations,
actions,
getters
}

View File

@ -0,0 +1,60 @@
import api from '@/request/api'
const state = {
user: JSON.parse(localStorage.getItem('USER_INFO') || null)
}
const mutations = {
/**
* 储存当前登录用户信息
* @param {*} state
* @param {*} userinfo 用户信息
*/
SET_USERINFO(state,userinfo){
state.user = userinfo
localStorage.setItem('USER_INFO',JSON.stringify(userinfo))
state.loaded = true
},
/**
* 退出登录清除用户数据
* @param {*} state
*/
LOGOUT(state){
state.user = null
localStorage.removeItem('USER_INFO')
}
}
const actions = {
async fetchUserInfo({ commit, state }) {
if (state.user) return
try {
const res = await api.getUserInfo()
if(res.code == 1000){
commit('SET_USERINFO', res.data)
}else{
console.error('获取用户信息失败')
}
} catch (e) {
console.error('获取用户信息失败', e)
}
}
}
const getters = {
/**
* 用户是否为管理员
* @param {*} state
* @returns
*/
isAdmin:state => state.user.roles.some(x => x.role == 'Admin')
}
export default {
namespaced:true,
state,
mutations,
actions,
getters
}

26
src/utils/auth.js Normal file
View File

@ -0,0 +1,26 @@
export default {
getAccessToken(){
return sessionStorage.getItem('ACCESS_TOKEN') || ''
},
getRefreshToken(){
return localStorage.getItem('REFRESH_TOKEN') || ''
},
getUserId(){
return localStorage.getItem('USER_ID') || -2
},
setAccessToken(token){
sessionStorage.setItem('ACCESS_TOKEN',token)
},
setRefreshToken(token){
localStorage.setItem('REFRESH_TOKEN',token)
},
setUserId(id){
localStorage.setItem('USER_ID',id)
},
clear(){
sessionStorage.removeItem('ACCESS_TOKEN')
localStorage.removeItem('REFRESH_TOKEN')
localStorage.removeItem('USER_ID')
}
}

View File

@ -0,0 +1,14 @@
// src/utils/interceptors/request/auth.js
import auth from '@/utils/auth'
export function attachAccessToken(config) {
const token = auth.getAccessToken()
if (token) {
config.headers['Authorization'] = `Bearer ${token}`
}
return config
}
export function authRequestError(err) {
return Promise.reject(err)
}

View File

@ -0,0 +1,67 @@
import request from "@/request/request"
import auth from "@/utils/auth"
let isrefreshing = false
//待刷新token任务列表
let queue = []
//不刷新Token白名单
let urls = ['/api/auth/refresh','/api/auth/login','/api/auth/register']
/**
* 运行任务队列
* @param {*} token
*/
function runqueque(token) {
queue.forEach(element => element(token))
queue = []
}
/**
* 处理accessToken自动刷新
* @param {*} response
* @returns
*/
export function handlerefresherror(response) {
const { config, data, status } = response
if ((data.code == 2009 || status == 401 && !urls.includes(config.url)) && !config._retry) {
config._retry = true
if (!isrefreshing) {
isrefreshing = true
return request.post('/api/auth/refresh', {
userid: auth.getUserId(),
refreshtoken: auth.getRefreshToken()
})
.then(r => {
if (r.code != 1000) {
window.location.href = '/auth/login'
return Promise.reject(r)
}
const { token, refreshToken } = r.data
auth.setAccessToken(token)
auth.setRefreshToken(refreshToken)
runqueque(token)
// 用新 token 重做原始请求
config.headers['Authorization'] = `Bearer ${token}`
return request(config)
})
.catch(err => {
auth.clear()
window.location.href = '/auth/login'
return Promise.reject(err)
})
.finally(() => isrefreshing = false)
}
// 刷新中:队列化
return new Promise((resolve, reject) => {
queue.push(token => {
config.headers['Authorization'] = `Bearer ${token}`
resolve(request(config))
})
})
} else {
return response
}
}

20
src/views/Notfound.vue Normal file
View File

@ -0,0 +1,20 @@
<template>
<div class="error-page err-404 page">
<div class="container">
<div class="error-container">
<div class="error-info">
<h1>404</h1>
<p>It seems that the page you are looking for no longer exists.<br>Please contact our <a href="#">help center</a> or go to the <RouterLink to="/home">homepage</RouterLink>.</p>
</div>
<div class="error-image"></div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'notfound'
}
</script>

View File

@ -8,34 +8,36 @@
<img src="../../assets/images/logo@2x.png" alt=""> <img src="../../assets/images/logo@2x.png" alt="">
</div> </div>
<div class="authent-text"> <div class="authent-text">
<p>Welcome to IO!</p> <p>欢迎访问{{ systemname }}!</p>
<p>Please Sign-in to your account.</p> <p>请登录你的账户.</p>
</div> </div>
<form> <form>
<div class="mb-3"> <div class="mb-3">
<div class="form-floating"> <div class="form-floating">
<input type="email" class="form-control" id="floatingInput" placeholder="name@example.com"> <input v-model="formdata.username" type="text" class="form-control"
<label for="floatingInput">Email address</label> id="floatingInput" placeholder="username">
<label for="floatingInput">用户名</label>
</div> </div>
</div> </div>
<div class="mb-3"> <div class="mb-3">
<div class="form-floating"> <div class="form-floating">
<input type="password" class="form-control" id="floatingPassword" placeholder="Password"> <input v-model="formdata.password" type="password" class="form-control"
<label for="floatingPassword">Password</label> id="floatingPassword" placeholder="Password">
<label for="floatingPassword">密码</label>
</div> </div>
</div> </div>
<div class="mb-3 form-check"> <div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1"> <input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Check me out</label> <label class="form-check-label" for="exampleCheck1">记住我</label>
</div> </div>
<div class="d-grid"> <div class="d-grid">
<button type="submit" class="btn btn-info m-b-xs">Sign In</button> <button type="button" class="btn btn-info m-b-xs" @click="login">登录</button>
<button class="btn btn-primary">Facebook</button> <button class="btn btn-primary">三方登录</button>
</div> </div>
</form> </form>
<div class="authent-reg"> <div class="authent-reg">
<p>Not registered? <a href="register.html">Create an account</a></p> <p>没有账户<router-link to="register">点击创建</router-link></p>
</div> </div>
</div> </div>
</div> </div>
@ -45,10 +47,69 @@
</template> </template>
<script> <script>
import md5 from 'blueimp-md5';
import { mapGetters } from 'vuex';
import auth from '@/utils/auth';
export default {
data() {
return {
formdata: {
username: '',
password: ''
}
}
},
methods: {
/**
* 用户登录
*/
async login() {
//MD5
const passwordOld = this.formdata.password
this.formdata.password = md5(passwordOld)
try {
const res = await this.$api.login(this.formdata)
let msg = ''
let type = 'danger'
console.log(res)
switch (res.code) {
case 2000: msg = '登录成功'; break
case 2001: msg = '用户名或密码错误'; break
case 2002: msg = '账户被禁用'; break
case 2004: msg = '用户不存在'; break
default: msg = '登录失败'; break
}
if (res.code == 2000) {
//
auth.setAccessToken(res.data.token)
auth.setRefreshToken(res.data.refreshToken)
auth.setUserId(res.data.userInfo.id)
this.$store.commit('userinfo/SET_USERINFO', res.data.userInfo)
type = 'success'
this.$alert(msg, type)
this.$router.push('/layout/index')
}else{
this.$alert(msg, type)
}
} catch (e) {
console.log(e)
this.$alert('未知错误', 'error')
} finally {
//
this.formdata.password = passwordOld
}
}
},
computed: {
/**
* 初始化系统配置
*/
...mapGetters('config', ['systemname'])
}
}
</script> </script>
<style> <style scoped></style>
</style>

View File

@ -150,7 +150,7 @@ export default {
async GetCode() { async GetCode() {
this.verification_email() this.verification_email()
if (!this.error.email) { if (!this.error.email) {
let res=await SendValidateCode_api(this.form.email) let res=await this.$api.SendValidateCode(this.form.email)
this.countdown = 60 this.countdown = 60
this.startCountdown() this.startCountdown()
@ -172,7 +172,7 @@ export default {
this.verification_validatecode() this.verification_validatecode()
this.verification_check() this.verification_check()
if (!this.error.username && !this.error.email && !this.error.password && !this.error.validatecode && !this.error.agrement) { if (!this.error.username && !this.error.email && !this.error.password && !this.error.validatecode && !this.error.agrement) {
let res=await registered_api({ let res=await this.$api.register({
username: this.form.username, username: this.form.username,
password: this.form.password, password: this.form.password,
email: this.form.email, email: this.form.email,

View File

@ -0,0 +1,387 @@
<template>
<div class="main-wrapper">
<div class="row">
<div class="col-md-6 col-xl-3">
<div class="card stat-widget">
<div class="card-body">
<h5 class="card-title">New Customers</h5>
<h2>132</h2>
<p>From last week</p>
<div class="progress">
<div class="progress-bar bg-info progress-bar-striped" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-xl-3">
<div class="card stat-widget">
<div class="card-body">
<h5 class="card-title">Orders</h5>
<h2>287</h2>
<p>Orders in waitlist</p>
<div class="progress">
<div class="progress-bar bg-success progress-bar-striped" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-xl-3">
<div class="card stat-widget">
<div class="card-body">
<h5 class="card-title">Monthly Profit</h5>
<h2>7.4K</h2>
<p>For last 30 days</p>
<div class="progress">
<div class="progress-bar bg-danger progress-bar-striped" role="progressbar" style="width: 60%" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-xl-3">
<div class="card stat-widget">
<div class="card-body">
<h5 class="card-title">Orders</h5>
<h2>87</h2>
<p>Orders in waitlist</p>
<div class="progress">
<div class="progress-bar bg-primary progress-bar-striped" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xl-8">
<div class="card">
<div class="card-body">
<h5 class="card-title">Revenue</h5>
<div id="apex1"></div>
</div>
</div>
</div>
<div class="col-sm-6 col-xl-4">
<div class="card stat-widget">
<div class="card-body">
<h5 class="card-title">Social Media</h5>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-primary text-primary">
<i data-feather="thumbs-up"></i>
</div>
<div class="tr-text">
<h4>New post reached 7k+ likes</h4>
<p>02 March</p>
</div>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-info text-info">
<i data-feather="twitch"></i>
</div>
<div class="tr-text">
<h4>Developer AMA is now live</h4>
<p>01 March</p>
</div>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-danger text-danger">
<i data-feather="instagram"></i>
</div>
<div class="tr-text">
<h4>52 unread messages</h4>
<p>23 February</p>
</div>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-warning text-warning">
<i data-feather="shopping-bag"></i>
</div>
<div class="tr-text">
<h4>2 new orders from shop page</h4>
<p>17 February</p>
</div>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-info text-info">
<i data-feather="twitter"></i>
</div>
<div class="tr-text">
<h4>Hashtag #circl is trending</h4>
<p>03 February</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 col-lg-8">
<div class="card table-widget">
<div class="card-body">
<h5 class="card-title">Recent Orders</h5>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">Customer</th>
<th scope="col">Product</th>
<th scope="col">Invoice</th>
<th scope="col">Price</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row"><img src="../../assets/images/avatars/profile-image.png" alt="">Anna Doe</th>
<td>Modern</td>
<td>#53327</td>
<td>$20</td>
<td><span class="badge bg-info">Shipped</span></td>
</tr>
<tr>
<th scope="row"><img src="../../assets/images/avatars/profile-image.png" alt="">John Doe</th>
<td>Alpha</td>
<td>#13328</td>
<td>$25</td>
<td><span class="badge bg-success">Paid</span></td>
</tr>
<tr>
<th scope="row"><img src="../../assets/images/avatars/profile-image.png" alt="">Anna Doe</th>
<td>Lime</td>
<td>#35313</td>
<td>$20</td>
<td><span class="badge bg-danger">Pending</span></td>
</tr>
<tr>
<th scope="row"><img src="../../assets/images/avatars/profile-image.png" alt="">John Doe</th>
<td>Circl Admin</td>
<td>#73423</td>
<td>$23</td>
<td><span class="badge bg-primary">Shipped</span></td>
</tr>
<tr>
<th scope="row"><img src="../../assets/images/avatars/profile-image.png" alt="">Nina Doe</th>
<td>Space</td>
<td>#54773</td>
<td>$20</td>
<td><span class="badge bg-success">Paid</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-md-12 col-lg-4">
<div class="card stat-widget">
<div class="card-body">
<h5 class="card-title">Orders</h5>
<div id="apex2"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-4">
<div class="card stat-widget">
<div class="card-body">
<h5 class="card-title">Tasks Overview</h5>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-primary text-primary">
<i data-feather="user"></i>
</div>
<div class="tr-text">
<a href="#"><h4>Project Managment</h4></a>
<p>Management</p>
</div>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-info text-info">
<i data-feather="user"></i>
</div>
<div class="tr-text">
<a href="#"><h4>Design</h4></a>
<p>Creative</p>
</div>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-secondary">
<i data-feather="user"></i>
</div>
<div class="tr-text">
<a href="#"><h4>Financial Accounting</h4></a>
<p>Finance</p>
</div>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-primary text-primary">
<i data-feather="user"></i>
</div>
<div class="tr-text">
<a href="#"><h4>Testing</h4></a>
<p>Manager</p>
</div>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-secondary text-secondary">
<i data-feather="user"></i>
</div>
<div class="tr-text">
<a href="#"><h4>Development</h4></a>
<p>Developers</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12 col-lg-4">
<div class="card">
<img src="../../assets/images/card-bg.png" class="card-img-top" alt="...">
<div class="card-body">
<div class="card-meet-header">
<div class="card-meet-day">
<h6>WED</h6>
<h3>7</h3>
</div>
<div class="card-meet-text">
<h6>Developer AMA</h6>
<p>Meet project developers</p>
</div>
</div>
<p class="card-text m-b-md">Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
<a href="#" class="btn btn-info">Join</a>
<a href="#" class="btn btn-primary">Invite</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-4">
<div class="card stat-widget">
<div class="card-body">
<h5 class="card-title">Transactions</h5>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-primary text-primary">
<i data-feather="thumbs-up"></i>
</div>
<div class="tr-text">
<h4>Facebook</h4>
<p>02 March</p>
</div>
</div>
<div class="tr-rate">
<p><span class="text-success">+ $24</span></p>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-success text-success">
<i data-feather="credit-card"></i>
</div>
<div class="tr-text">
<h4>Visa</h4>
<p>02 March</p>
</div>
</div>
<div class="tr-rate">
<p><span class="text-success">+ $300</span></p>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-danger text-danger">
<i data-feather="tv"></i>
</div>
<div class="tr-text">
<h4>Netflix</h4>
<p>02 March</p>
</div>
</div>
<div class="tr-rate">
<p><span class="text-danger">- $17</span></p>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-warning text-warning">
<i data-feather="shopping-cart"></i>
</div>
<div class="tr-text">
<h4>Themeforest</h4>
<p>02 March</p>
</div>
</div>
<div class="tr-rate">
<p><span class="text-danger">- $220</span></p>
</div>
</div>
</div>
<div class="transactions-list">
<div class="tr-item">
<div class="tr-company-name">
<div class="tr-icon tr-card-icon tr-card-bg-info text-info">
<i data-feather="dollar-sign"></i>
</div>
<div class="tr-text">
<h4>PayPal</h4>
<p>02 March</p>
</div>
</div>
<div class="tr-rate">
<p><span class="text-success">+20%</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>

204
src/views/layout/Home.vue Normal file
View File

@ -0,0 +1,204 @@
<template>
<div class="page-container">
<div class="page-header">
<nav class="navbar navbar-expand-lg d-flex justify-content-between">
<div class="" id="navbarNav">
<ul class="navbar-nav" id="leftNav">
<li class="nav-item">
<a class="nav-link" id="sidebar-toggle" href="#" @click="toggerSiderBar"><i data-feather="arrow-left"></i></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">主页</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">设置</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">帮助</a>
</li>
</ul>
</div>
<div class="logo">
<a class="navbar-brand" href="index.html"></a>
</div>
<div class="" id="headerNav">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link search-dropdown" href="#" id="searchDropDown" role="button"
data-bs-toggle="dropdown" aria-expanded="false"><i data-feather="search"></i></a>
<div class="dropdown-menu dropdown-menu-end dropdown-lg search-drop-menu"
aria-labelledby="searchDropDown">
<form>
<input class="form-control" type="text" placeholder="Type something.."
aria-label="Search">
</form>
<h6 class="dropdown-header">Recent Searches</h6>
<a class="dropdown-item" href="#">charts</a>
<a class="dropdown-item" href="#">new orders</a>
<a class="dropdown-item" href="#">file manager</a>
<a class="dropdown-item" href="#">new users</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link notifications-dropdown" href="#" id="notificationsDropDown" role="button"
data-bs-toggle="dropdown" aria-expanded="false">3</a>
<div class="dropdown-menu dropdown-menu-end notif-drop-menu"
aria-labelledby="notificationsDropDown">
<h6 class="dropdown-header">Notifications</h6>
<a href="#">
<div class="header-notif">
<div class="notif-image">
<span class="notification-badge bg-info text-white">
<i class="fas fa-bullhorn"></i>
</span>
</div>
<div class="notif-text">
<p class="bold-notif-text">faucibus dolor in commodo lectus mattis</p>
<small>19:00</small>
</div>
</div>
</a>
<a href="#">
<div class="header-notif">
<div class="notif-image">
<span class="notification-badge bg-primary text-white">
<i class="fas fa-bolt"></i>
</span>
</div>
<div class="notif-text">
<p class="bold-notif-text">faucibus dolor in commodo lectus mattis</p>
<small>18:00</small>
</div>
</div>
</a>
<a href="#">
<div class="header-notif">
<div class="notif-image">
<span class="notification-badge bg-success text-white">
<i class="fas fa-at"></i>
</span>
</div>
<div class="notif-text">
<p>faucibus dolor in commodo lectus mattis</p>
<small>yesterday</small>
</div>
</div>
</a>
<a href="#">
<div class="header-notif">
<div class="notif-image">
<span class="notification-badge">
<img src="../../assets/images/avatars/profile-image.png" alt="">
</span>
</div>
<div class="notif-text">
<p>faucibus dolor in commodo lectus mattis</p>
<small>yesterday</small>
</div>
</div>
</a>
<a href="#">
<div class="header-notif">
<div class="notif-image">
<span class="notification-badge">
<img src="../../assets/images/avatars/profile-image.png" alt="">
</span>
</div>
<div class="notif-text">
<p>faucibus dolor in commodo lectus mattis</p>
<small>yesterday</small>
</div>
</div>
</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link profile-dropdown" href="#" id="profileDropDown" role="button"
data-bs-toggle="dropdown" aria-expanded="false"><img
src="../../assets/images/avatars/profile-image.png" alt=""></a>
<div class="dropdown-menu dropdown-menu-end profile-drop-menu"
aria-labelledby="profileDropDown">
<a class="dropdown-item" href="#"><i data-feather="user"></i>Profile</a>
<a class="dropdown-item" href="#"><i data-feather="inbox"></i>Messages</a>
<a class="dropdown-item" href="#"><i data-feather="edit"></i>Activities<span
class="badge rounded-pill bg-success">12</span></a>
<a class="dropdown-item" href="#"><i data-feather="check-circle"></i>Tasks</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#"><i data-feather="settings"></i>Settings</a>
<a class="dropdown-item" href="#"><i data-feather="unlock"></i>Lock</a>
<a class="dropdown-item" href="#"><i data-feather="log-out"></i>Logout</a>
</div>
</li>
</ul>
</div>
</nav>
</div>
<div class="page-sidebar">
<ul class="list-unstyled accordion-menu">
<li class="sidebar-title">
主页
</li>
<li :class="{ 'active-page' : $route.path.endsWith(item.path) }" v-for="item in routeMenu.filter(x => x.meta.isHome)" :key="item.path">
<router-link :to="item.path"><i :data-feather="item.meta.icon"></i>{{item.meta.title}}</router-link>
</li>
<li class="sidebar-title">
菜单
</li>
<li :class="{ 'active-page' : $route.path.endsWith(item.path) }" v-for="item in routeMenu.filter(x => !x.meta.isHome)" :key="item.path">
<router-link :to="item.path"><i :data-feather="item.meta.icon"></i>{{item.meta.title}}</router-link>
</li>
</ul>
</div>
<div class="page-content">
<router-view/>
</div>
</div>
</template>
<script>
import feather from 'feather-icons'
import { mapGetters } from 'vuex'
export default {
data(){
return{
routeMenu: []
}
},
methods:{
/**
* 展开/关闭侧边菜单栏
*/
toggerSiderBar(){
document.body.classList.toggle('sidebar-hidden')
},
updateRouterMenu(){
const baseroutes = this.$router.options.routes
const route = baseroutes.find(x => x.path == '/layout')
this.routeMenu = route.children.filter(x => this.isAdmin ? x.meta.showInMenu : (x.meta.showInMenu && x.meta.showInUser))
}
},watch:{
isAdmin:{
handler(newval){
this.updateRouterMenu()
},
immediate:true
}
},
computed:{
...mapGetters('userinfo',['isAdmin'])
},
mounted(){
feather.replace()
},
beforeCreate(){
//
this.$store.dispatch('userinfo/fetchUserInfo')
}
}
</script>
<style>
</style>

128
src/views/layout/Users.vue Normal file
View File

@ -0,0 +1,128 @@
<template>
<div class="main-wrapper">
<div class="row">
<div class="col">
<DataTable :title="'员工信息表'" :headers="tableHeaders" :rows="tableData" :data-count="dataCount"/>
</div>
</div>
</div>
</template>
<script>
import DataTable from '@/components/DataTable.vue';
export default {
components: { DataTable },
data() {
return {
dataCount:11,
tableHeaders: [
{ text: "名字", value: "name", width: "155px" },
{ text: "位置", value: "position", width: "214px" },
{ text: "办公室", value: "office", width: "48px" },
{ text: "年龄", value: "age", width: "29px" },
{ text: "开始日期", value: "startDate", width: "82px" },
{ text: "工资", value: "salary", width: "103px" },
],
tableData: [
{
name: "佐藤爱理",
position: "会计",
office: "东京",
age: 33,
startDate: "2008/11/28",
salary: "162,700 元",
},
{
name: "安吉莉卡·拉莫斯",
position: "首席执行官 CEO",
office: "伦敦",
age: 47,
startDate: "2009/10/09",
salary: "1,200,000 美元",
},
{
name: "安吉莉卡·拉莫斯",
position: "首席执行官 CEO",
office: "伦敦",
age: 47,
startDate: "2009/10/09",
salary: "1,200,000 美元",
},
{
name: "安吉莉卡·拉莫斯",
position: "首席执行官 CEO",
office: "伦敦",
age: 47,
startDate: "2009/10/09",
salary: "1,200,000 美元",
},
{
name: "安吉莉卡·拉莫斯",
position: "首席执行官 CEO",
office: "伦敦",
age: 47,
startDate: "2009/10/09",
salary: "1,200,000 美元",
},
{
name: "安吉莉卡·拉莫斯",
position: "首席执行官 CEO",
office: "伦敦",
age: 47,
startDate: "2009/10/09",
salary: "1,200,000 美元",
},
{
name: "安吉莉卡·拉莫斯",
position: "首席执行官 CEO",
office: "伦敦",
age: 47,
startDate: "2009/10/09",
salary: "1,200,000 美元",
},
{
name: "安吉莉卡·拉莫斯",
position: "首席执行官 CEO",
office: "伦敦",
age: 47,
startDate: "2009/10/09",
salary: "1,200,000 美元",
},
{
name: "安吉莉卡·拉莫斯",
position: "首席执行官 CEO",
office: "伦敦",
age: 47,
startDate: "2009/10/09",
salary: "1,200,000 美元",
},
{
name: "安吉莉卡·拉莫斯",
position: "首席执行官 CEO",
office: "伦敦",
age: 47,
startDate: "2009/10/09",
salary: "1,200,000 美元",
},
// ...
],
};
},
methods: {
async loadUserList(pageIndex = 1, pageSize = 10, desc = false){
try{
const res = await this.$api.getUserList(pageIndex,pageSize,desc)
console.log(res)
}catch(e){
this.$alert('用户列表数据加载失败!','danger')
console.error(e)
}
}
},
mounted(){
this.loadUserList()
}
};
</script>

View File

@ -1,79 +0,0 @@
<template>
<div :class="active">
<div class='loader'>
<div class='spinner-grow text-primary' role='status'>
<span class='sr-only'>Loading...</span>
</div>
</div>
<div class="container">
<div class="row justify-content-md-center">
<div class="col-md-12 col-lg-4">
<div class="card login-box-container">
<div class="card-body">
<div class="authent-logo">
<img src="../../assets/images/logo@2x.png" alt="">
</div>
<div class="authent-text">
<p>Welcome to IO!</p>
<p>Please Sign-in to your account.</p>
</div>
<form>
<div class="mb-3">
<div class="form-floating">
<input type="text" class="form-control" id="floatingInput" placeholder="账号" v-model="username">
<label for="floatingInput">账号</label>
</div>
</div>
<div class="mb-3">
<div class="form-floating">
<input type="password" class="form-control" id="floatingPassword" placeholder="密码" v-model="password">
<label for="floatingPassword">密码</label>
</div>
</div>
<!-- <div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Check me out</label>
</div> -->
<div class="d-grid">
<button type="submit" class="btn btn-info m-b-xs" @click="submit()">登录</button>
</div>
</form>
<div class="authent-reg">
<p>没有账号<RouterLink to="/registered">注册</RouterLink></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { login_api } from '@/request/api'
export default {
name: 'Login',
data() {
return {
active: 'login-page',
username: '',
password :''
}
},
mounted() {
this.active = 'login-page no-loader'
},
methods: {
async submit(){
let res=await login_api({username:this.username,password:this.password})
if (res.code == 2000) {
console.log('登录成功')
this.$router.push('/home')
}else{
console.log(res.msg);
}
}
},
}
</script>

View File

@ -3,6 +3,7 @@ const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({ module.exports = defineConfig({
publicPath: process.env.BRANCH_PATH || '/', // 👈 支持动态子路径部署 publicPath: process.env.BRANCH_PATH || '/', // 👈 支持动态子路径部署
transpileDependencies: true transpileDependencies: true
}) })