Browse Source

中间成果先保存

master
hejl 2 days ago
parent
commit
a78b20e1fb
  1. 397
      gofaster/app/package-lock.json
  2. 1
      gofaster/app/package.json
  3. 942
      gofaster/app/plugins/route-mapping-plugin.js
  4. 12
      gofaster/app/src/renderer/modules/role-management/services/roleService.js
  5. 8
      gofaster/app/src/renderer/modules/role-management/views/RoleManagement.vue
  6. 261
      gofaster/app/src/renderer/modules/route-sync/direct-route-mappings.js
  7. 17
      gofaster/app/src/renderer/modules/user-management/services/userService.js
  8. 8
      gofaster/app/src/renderer/views/UserManagement.vue
  9. 4
      gofaster/app/src/renderer/views/UserProfile.vue

397
gofaster/app/package-lock.json generated

@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
"@vue/compiler-sfc": "^3.5.21",
"concurrently": "^9.2.0",
"cross-env": "^7.0.3",
"dependency-cruiser": "^17.0.1",
"electron-builder": "^26.0.12",
"electron-reload": "^2.0.0-alpha.1",
"global": "^4.4.0",
@ -2184,6 +2185,36 @@ @@ -2184,6 +2185,36 @@
"acorn": "^8.14.0"
}
},
"node_modules/acorn-jsx": {
"version": "5.3.2",
"resolved": "https://registry.npmmirror.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"dev": true,
"license": "MIT",
"peerDependencies": {
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
"node_modules/acorn-jsx-walk": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/acorn-jsx-walk/-/acorn-jsx-walk-2.0.0.tgz",
"integrity": "sha512-uuo6iJj4D4ygkdzd6jPtcxs8vZgDX9YFIkqczGImoypX2fQ4dVImmu3UzA4ynixCIMTrEOWW+95M2HuBaCEOVA==",
"dev": true,
"license": "MIT"
},
"node_modules/acorn-loose": {
"version": "8.5.2",
"resolved": "https://registry.npmmirror.com/acorn-loose/-/acorn-loose-8.5.2.tgz",
"integrity": "sha512-PPvV6g8UGMGgjrMu+n/f9E/tCSkNQ2Y97eFvuVdJfG11+xdIeDcLyNdC8SHcrHbRqkfwLASdplyR6B6sKM1U4A==",
"dev": true,
"license": "MIT",
"dependencies": {
"acorn": "^8.15.0"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/acorn-walk": {
"version": "8.3.4",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
@ -4576,6 +4607,129 @@ @@ -4576,6 +4607,129 @@
"node": ">= 0.8"
}
},
"node_modules/dependency-cruiser": {
"version": "17.0.1",
"resolved": "https://registry.npmmirror.com/dependency-cruiser/-/dependency-cruiser-17.0.1.tgz",
"integrity": "sha512-4clZ8EPsOVoxGA8NMjaE95aJEO118Cd9D7gT5rysx5azij9cPiCSrnjYlZtV+90PFazlD2lZvjzBHkD1ZqGqlw==",
"dev": true,
"license": "MIT",
"dependencies": {
"acorn": "^8.15.0",
"acorn-jsx": "^5.3.2",
"acorn-jsx-walk": "^2.0.0",
"acorn-loose": "^8.5.2",
"acorn-walk": "^8.3.4",
"ajv": "^8.17.1",
"commander": "^14.0.0",
"enhanced-resolve": "^5.18.2",
"ignore": "^7.0.5",
"interpret": "^3.1.1",
"is-installed-globally": "^1.0.0",
"json5": "^2.2.3",
"memoize": "^10.1.0",
"picomatch": "^4.0.3",
"prompts": "^2.4.2",
"rechoir": "^0.8.0",
"safe-regex": "^2.1.1",
"semver": "^7.7.2",
"tsconfig-paths-webpack-plugin": "^4.2.0",
"watskeburt": "^4.2.3"
},
"bin": {
"depcruise": "bin/dependency-cruise.mjs",
"depcruise-baseline": "bin/depcruise-baseline.mjs",
"depcruise-fmt": "bin/depcruise-fmt.mjs",
"depcruise-wrap-stream-in-html": "bin/wrap-stream-in-html.mjs",
"dependency-cruise": "bin/dependency-cruise.mjs",
"dependency-cruiser": "bin/dependency-cruise.mjs"
},
"engines": {
"node": "^20.12||^22||>=24"
}
},
"node_modules/dependency-cruiser/node_modules/ajv": {
"version": "8.17.1",
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz",
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3",
"fast-uri": "^3.0.1",
"json-schema-traverse": "^1.0.0",
"require-from-string": "^2.0.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/dependency-cruiser/node_modules/commander": {
"version": "14.0.0",
"resolved": "https://registry.npmmirror.com/commander/-/commander-14.0.0.tgz",
"integrity": "sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=20"
}
},
"node_modules/dependency-cruiser/node_modules/ignore": {
"version": "7.0.5",
"resolved": "https://registry.npmmirror.com/ignore/-/ignore-7.0.5.tgz",
"integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 4"
}
},
"node_modules/dependency-cruiser/node_modules/json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true,
"license": "MIT"
},
"node_modules/dependency-cruiser/node_modules/json5": {
"version": "2.2.3",
"resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true,
"license": "MIT",
"bin": {
"json5": "lib/cli.js"
},
"engines": {
"node": ">=6"
}
},
"node_modules/dependency-cruiser/node_modules/picomatch": {
"version": "4.0.3",
"resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.3.tgz",
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/dependency-cruiser/node_modules/semver": {
"version": "7.7.2",
"resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.2.tgz",
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
"dev": true,
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/destroy": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
@ -6104,6 +6258,22 @@ @@ -6104,6 +6258,22 @@
"node": ">=10"
}
},
"node_modules/global-directory": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/global-directory/-/global-directory-4.0.1.tgz",
"integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"ini": "4.1.1"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/globalthis": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
@ -6686,6 +6856,26 @@ @@ -6686,6 +6856,26 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
},
"node_modules/ini": {
"version": "4.1.1",
"resolved": "https://registry.npmmirror.com/ini/-/ini-4.1.1.tgz",
"integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==",
"dev": true,
"license": "ISC",
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/interpret": {
"version": "3.1.1",
"resolved": "https://registry.npmmirror.com/interpret/-/interpret-3.1.1.tgz",
"integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/ip-address": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz",
@ -6807,6 +6997,23 @@ @@ -6807,6 +6997,23 @@
"node": ">=0.10.0"
}
},
"node_modules/is-installed-globally": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/is-installed-globally/-/is-installed-globally-1.0.0.tgz",
"integrity": "sha512-K55T22lfpQ63N4KEN57jZUAaAYqYHEe8veb/TycJRk9DdSCLLcovXz/mL6mOnhQaZsQGwPhuFopdQIlqGSEjiQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"global-directory": "^4.0.1",
"is-path-inside": "^4.0.0"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-interactive": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
@ -6831,6 +7038,19 @@ @@ -6831,6 +7038,19 @@
"node": ">=0.12.0"
}
},
"node_modules/is-path-inside": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/is-path-inside/-/is-path-inside-4.0.0.tgz",
"integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-plain-obj": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
@ -7120,6 +7340,16 @@ @@ -7120,6 +7340,16 @@
"node": ">=0.10.0"
}
},
"node_modules/kleur": {
"version": "3.0.3",
"resolved": "https://registry.npmmirror.com/kleur/-/kleur-3.0.3.tgz",
"integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/klona": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz",
@ -7567,6 +7797,22 @@ @@ -7567,6 +7797,22 @@
"node": ">= 4.0.0"
}
},
"node_modules/memoize": {
"version": "10.1.0",
"resolved": "https://registry.npmmirror.com/memoize/-/memoize-10.1.0.tgz",
"integrity": "sha512-MMbFhJzh4Jlg/poq1si90XRlTZRDHVqdlz2mPyGJ6kqMpyHUyVpDd5gpFAvVehW64+RA1eKE9Yt8aSLY7w2Kgg==",
"dev": true,
"license": "MIT",
"dependencies": {
"mimic-function": "^5.0.1"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sindresorhus/memoize?sponsor=1"
}
},
"node_modules/merge-descriptors": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
@ -7662,6 +7908,19 @@ @@ -7662,6 +7908,19 @@
"node": ">=6"
}
},
"node_modules/mimic-function": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/mimic-function/-/mimic-function-5.0.1.tgz",
"integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/mimic-response": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
@ -9398,6 +9657,20 @@ @@ -9398,6 +9657,20 @@
"node": ">= 4"
}
},
"node_modules/prompts": {
"version": "2.4.2",
"resolved": "https://registry.npmmirror.com/prompts/-/prompts-2.4.2.tgz",
"integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"kleur": "^3.0.3",
"sisteransi": "^1.0.5"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
@ -9609,6 +9882,29 @@ @@ -9609,6 +9882,29 @@
"node": ">=8.10.0"
}
},
"node_modules/rechoir": {
"version": "0.8.0",
"resolved": "https://registry.npmmirror.com/rechoir/-/rechoir-0.8.0.tgz",
"integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"resolve": "^1.20.0"
},
"engines": {
"node": ">= 10.13.0"
}
},
"node_modules/regexp-tree": {
"version": "0.1.27",
"resolved": "https://registry.npmmirror.com/regexp-tree/-/regexp-tree-0.1.27.tgz",
"integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==",
"dev": true,
"license": "MIT",
"bin": {
"regexp-tree": "bin/regexp-tree"
}
},
"node_modules/relateurl": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
@ -9838,6 +10134,16 @@ @@ -9838,6 +10134,16 @@
}
]
},
"node_modules/safe-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/safe-regex/-/safe-regex-2.1.1.tgz",
"integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==",
"dev": true,
"license": "MIT",
"dependencies": {
"regexp-tree": "~0.1.1"
}
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
@ -10261,6 +10567,13 @@ @@ -10261,6 +10567,13 @@
"node": ">= 10"
}
},
"node_modules/sisteransi": {
"version": "1.0.5",
"resolved": "https://registry.npmmirror.com/sisteransi/-/sisteransi-1.0.5.tgz",
"integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
"dev": true,
"license": "MIT"
},
"node_modules/slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@ -10558,6 +10871,16 @@ @@ -10558,6 +10871,16 @@
"node": ">=8"
}
},
"node_modules/strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
@ -11042,6 +11365,67 @@ @@ -11042,6 +11365,67 @@
"utf8-byte-length": "^1.0.1"
}
},
"node_modules/tsconfig-paths": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz",
"integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==",
"dev": true,
"license": "MIT",
"dependencies": {
"json5": "^2.2.2",
"minimist": "^1.2.6",
"strip-bom": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/tsconfig-paths-webpack-plugin": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.2.0.tgz",
"integrity": "sha512-zbem3rfRS8BgeNK50Zz5SIQgXzLafiHjOwUAvk/38/o1jHn/V5QAgVUcz884or7WYcPaH3N2CIfUc2u0ul7UcA==",
"dev": true,
"license": "MIT",
"dependencies": {
"chalk": "^4.1.0",
"enhanced-resolve": "^5.7.0",
"tapable": "^2.2.1",
"tsconfig-paths": "^4.1.2"
},
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/tsconfig-paths-webpack-plugin/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/tsconfig-paths/node_modules/json5": {
"version": "2.2.3",
"resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true,
"license": "MIT",
"bin": {
"json5": "lib/cli.js"
},
"engines": {
"node": ">=6"
}
},
"node_modules/tslib": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
@ -11406,6 +11790,19 @@ @@ -11406,6 +11790,19 @@
"node": ">=10.13.0"
}
},
"node_modules/watskeburt": {
"version": "4.2.3",
"resolved": "https://registry.npmmirror.com/watskeburt/-/watskeburt-4.2.3.tgz",
"integrity": "sha512-uG9qtQYoHqAsnT711nG5iZc/8M5inSmkGCOp7pFaytKG2aTfIca7p//CjiVzAE4P7hzaYuCozMjNNaLgmhbK5g==",
"dev": true,
"license": "MIT",
"bin": {
"watskeburt": "dist/run-cli.js"
},
"engines": {
"node": "^18||>=20"
}
},
"node_modules/wbuf": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz",

1
gofaster/app/package.json

@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
"@vue/compiler-sfc": "^3.5.21",
"concurrently": "^9.2.0",
"cross-env": "^7.0.3",
"dependency-cruiser": "^17.0.1",
"electron-builder": "^26.0.12",
"electron-reload": "^2.0.0-alpha.1",
"global": "^4.4.0",

942
gofaster/app/plugins/route-mapping-plugin.js

File diff suppressed because it is too large Load Diff

12
gofaster/app/src/renderer/modules/role-management/services/roleService.js

@ -43,6 +43,7 @@ api.interceptors.response.use( @@ -43,6 +43,7 @@ api.interceptors.response.use(
export const roleService = {
// 获取角色列表
// @serverApiMethod GET /auth/roles
async getRoles(page = 1, pageSize = 10) {
try {
const response = await api.get('/auth/roles', {
@ -55,6 +56,7 @@ export const roleService = { @@ -55,6 +56,7 @@ export const roleService = {
},
// 获取单个角色
// @serverApiMethod GET /auth/roles/{id}
async getRole(id) {
try {
const response = await api.get(`/auth/roles/${id}`)
@ -65,6 +67,7 @@ export const roleService = { @@ -65,6 +67,7 @@ export const roleService = {
},
// 创建角色
// @serverApiMethod POST /auth/roles
async createRole(roleData) {
try {
const response = await api.post('/auth/roles', roleData)
@ -75,6 +78,7 @@ export const roleService = { @@ -75,6 +78,7 @@ export const roleService = {
},
// 更新角色
// @serverApiMethod PUT /auth/roles/{id}
async updateRole(id, roleData) {
try {
const response = await api.put(`/auth/roles/${id}`, roleData)
@ -85,6 +89,7 @@ export const roleService = { @@ -85,6 +89,7 @@ export const roleService = {
},
// 删除角色
// @serverApiMethod DELETE /auth/roles/{id}
async deleteRole(id) {
try {
await api.delete(`/auth/roles/${id}`)
@ -95,6 +100,7 @@ export const roleService = { @@ -95,6 +100,7 @@ export const roleService = {
},
// 获取权限列表
// @serverApiMethod GET /auth/permissions
async getPermissions() {
try {
const response = await api.get('/auth/permissions')
@ -105,6 +111,7 @@ export const roleService = { @@ -105,6 +111,7 @@ export const roleService = {
},
// 为用户分配角色
// @serverApiMethod POST /auth/roles/users/{userId}/assign
async assignRolesToUser(userId, roleIds) {
try {
const response = await api.post(`/auth/roles/users/${userId}/assign`, {
@ -117,6 +124,7 @@ export const roleService = { @@ -117,6 +124,7 @@ export const roleService = {
},
// 获取用户的角色列表
// @serverApiMethod GET /auth/roles/users/{userId}
async getUserRoles(userId) {
try {
const response = await api.get(`/auth/roles/users/${userId}`)
@ -127,6 +135,7 @@ export const roleService = { @@ -127,6 +135,7 @@ export const roleService = {
},
// 从用户移除角色
// @serverApiMethod DELETE /auth/roles/users/{userId}/remove
async removeRolesFromUser(userId, roleIds) {
try {
const response = await api.delete(`/auth/roles/users/${userId}/remove`, {
@ -139,6 +148,7 @@ export const roleService = { @@ -139,6 +148,7 @@ export const roleService = {
},
// 获取角色的权限列表
// @serverApiMethod GET /auth/permissions/roles/{roleId}
async getRolePermissions(roleId) {
try {
const response = await api.get(`/auth/permissions/roles/${roleId}`)
@ -149,6 +159,7 @@ export const roleService = { @@ -149,6 +159,7 @@ export const roleService = {
},
// 为角色分配权限
// @serverApiMethod POST /auth/permissions/roles/{roleId}/assign
async assignPermissionsToRole(roleId, permissionIds) {
try {
const response = await api.post(`/auth/permissions/roles/${roleId}/assign`, {
@ -161,6 +172,7 @@ export const roleService = { @@ -161,6 +172,7 @@ export const roleService = {
},
// 从角色移除权限
// @serverApiMethod DELETE /auth/permissions/roles/{roleId}/remove
async removePermissionsFromRole(roleId, permissionIds) {
try {
const response = await api.delete(`/auth/permissions/roles/${roleId}/remove`, {

8
gofaster/app/src/renderer/modules/role-management/views/RoleManagement.vue

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
/>
</div>
<div class="filters">
<button class="btn btn-primary" @click="createNewRole">
<button name="create-role" class="btn btn-primary" @click="createNewRole">
<i class="fas fa-plus"></i> 新建角色
</button>
</div>
@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
<div v-else-if="roles.length === 0" class="empty-state">
<p><i class="fas fa-inbox"></i> 暂无角色数据</p>
<button class="btn btn-primary" @click="createNewRole">
<button name="create-first-role" class="btn btn-primary" @click="createNewRole">
<i class="fas fa-plus"></i> 创建第一个角色
</button>
</div>
@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
<button class="btn btn-sm btn-primary" @click="assignPermissions(role)" title="分配权限">
<i class="fas fa-shield-alt"></i>
</button>
<button class="btn btn-sm btn-danger" @click="deleteRole(role)" title="删除角色">
<button name="delete-role" class="btn btn-sm btn-danger" @click="deleteRole(role)" title="删除角色">
<i class="fas fa-trash"></i>
</button>
</div>
@ -177,7 +177,7 @@ @@ -177,7 +177,7 @@
<button type="button" class="btn btn-secondary" @click="showCreateDialog = false">
取消
</button>
<button type="submit" class="btn btn-primary" :disabled="saving">
<button name="save-role" type="submit" class="btn btn-primary" :disabled="saving">
{{ saving ? '保存中...' : (editingRole ? '更新' : '创建') }}
</button>
</div>

261
gofaster/app/src/renderer/modules/route-sync/direct-route-mappings.js

@ -53,133 +53,120 @@ export const directRouteMappings = { @@ -53,133 +53,120 @@ export const directRouteMappings = {
"methodName": "getUsers",
"method": "GET",
"path": "/auth/admin/users",
"line": 51,
"callingComponents": [
{
"component": "UserManagement",
"path": "/user-management"
}
]
"line": 50,
"callingComponents": []
},
{
"methodName": "getUser",
"method": "GET",
"path": "/auth/admin/users/{id}",
"line": 63,
"callingComponents": []
},
{
"methodName": "createUser",
"method": "POST",
"path": "/auth/admin/users",
"line": 73,
"callingComponents": [
{
"component": "UserManagement",
"path": "/user-management"
}
]
"line": 74,
"callingComponents": []
},
{
"methodName": "updateUser",
"method": "PUT",
"path": "/auth/admin/users/{id}",
"line": 83,
"callingComponents": [
{
"component": "UserManagement",
"path": "/user-management"
}
]
"line": 85,
"callingComponents": []
},
{
"methodName": "deleteUser",
"method": "DELETE",
"path": "/auth/admin/users/{id}",
"line": 93,
"callingComponents": [
{
"component": "UserManagement",
"path": "/user-management"
}
]
"line": 96,
"callingComponents": []
},
{
"methodName": "getRoles",
"method": "GET",
"path": "/auth/admin/roles",
"line": 107,
"callingComponents": []
},
{
"methodName": "changePassword",
"method": "POST",
"path": "/auth/change-password",
"line": 113,
"callingComponents": [
{
"component": "PasswordChangeModal",
"path": "/"
}
]
"line": 118,
"callingComponents": []
},
{
"methodName": "getPasswordPolicy",
"method": "GET",
"path": "/auth/password-policy",
"line": 123,
"callingComponents": [
{
"component": "PasswordChangeModal",
"path": "/"
}
]
"line": 129,
"callingComponents": []
},
{
"methodName": "validatePassword",
"method": "POST",
"path": "/auth/validate-password",
"line": 133,
"callingComponents": [
{
"component": "PasswordChangeModal",
"path": "/"
}
]
"line": 140,
"callingComponents": []
},
{
"methodName": "checkPasswordStatus",
"method": "GET",
"path": "/auth/password-status",
"line": 151,
"callingComponents": []
},
{
"methodName": "getPermissions",
"method": "GET",
"path": "/permissions",
"line": 162,
"callingComponents": []
},
{
"methodName": "getCaptcha",
"method": "GET",
"path": "/auth/captcha",
"line": 163,
"callingComponents": [
{
"component": "LoginModal",
"path": "/"
}
]
"line": 173,
"callingComponents": []
},
{
"methodName": "login",
"method": "POST",
"path": "/auth/login",
"line": 182,
"callingComponents": [
{
"component": "LoginModal",
"path": "/"
}
]
"line": 184,
"callingComponents": []
},
{
"methodName": "logout",
"method": "POST",
"path": "/auth/logout",
"line": 215,
"callingComponents": []
},
{
"methodName": "getCurrentUser",
"method": "GET",
"path": "/auth/userinfo",
"line": 245,
"callingComponents": [
{
"component": "UserProfile",
"path": "/user-profile"
}
]
"path": "/auth/me",
"line": 252,
"callingComponents": []
},
{
"methodName": "changePassword",
"method": "POST",
"path": "/auth/change-password",
"line": 259,
"callingComponents": [
{
"component": "PasswordChangeModal",
"path": "/"
}
]
"line": 273,
"callingComponents": []
},
{
"methodName": "resetPassword",
"method": "POST",
"path": "/auth/reset-password",
"line": 284,
"callingComponents": []
}
]
},
@ -192,157 +179,85 @@ export const directRouteMappings = { @@ -192,157 +179,85 @@ export const directRouteMappings = {
"methodName": "getRoles",
"method": "GET",
"path": "/auth/roles",
"line": 48,
"callingComponents": [
{
"component": "RoleManagement",
"path": "/role-management"
},
{
"component": "UserRoleAssignment",
"path": "/user-management"
}
]
"line": 47,
"callingComponents": []
},
{
"methodName": "getRole",
"method": "GET",
"path": "/auth/roles/{id}",
"line": 60,
"callingComponents": [
{
"component": "PermissionManager",
"path": null
}
]
"callingComponents": []
},
{
"methodName": "createRole",
"method": "POST",
"path": "/auth/roles",
"line": 70,
"callingComponents": [
{
"component": "RoleManagement",
"path": "/role-management"
}
]
"line": 71,
"callingComponents": []
},
{
"methodName": "updateRole",
"method": "PUT",
"path": "/auth/roles/{id}",
"line": 80,
"callingComponents": [
{
"component": "RoleManagement",
"path": "/role-management"
},
{
"component": "PermissionManager",
"path": null
}
]
"line": 82,
"callingComponents": []
},
{
"methodName": "deleteRole",
"method": "DELETE",
"path": "/auth/roles/{id}",
"line": 90,
"callingComponents": [
{
"component": "RoleManagement",
"path": "/role-management"
}
]
"line": 93,
"callingComponents": []
},
{
"methodName": "getPermissions",
"method": "GET",
"path": "/auth/permissions",
"line": 100,
"callingComponents": [
{
"component": "PermissionManager",
"path": null
},
{
"component": "RolePermissionAssignment",
"path": "/role-management"
}
]
"line": 104,
"callingComponents": []
},
{
"methodName": "assignRolesToUser",
"method": "POST",
"path": "/auth/roles/users/{userId}/assign",
"line": 110,
"callingComponents": [
{
"component": "UserRoleAssignment",
"path": "/user-management"
}
]
"line": 115,
"callingComponents": []
},
{
"methodName": "getUserRoles",
"method": "GET",
"path": "/auth/roles/users/{userId}",
"line": 122,
"callingComponents": [
{
"component": "UserRoleAssignment",
"path": "/user-management"
}
]
"line": 128,
"callingComponents": []
},
{
"methodName": "removeRolesFromUser",
"method": "DELETE",
"path": "/auth/roles/users/{userId}/remove",
"line": 132,
"callingComponents": [
{
"component": "UserRoleAssignment",
"path": "/user-management"
}
]
"line": 139,
"callingComponents": []
},
{
"methodName": "getRolePermissions",
"method": "GET",
"path": "/auth/permissions/roles/{roleId}",
"line": 144,
"callingComponents": [
{
"component": "RolePermissionAssignment",
"path": "/role-management"
}
]
"line": 152,
"callingComponents": []
},
{
"methodName": "assignPermissionsToRole",
"method": "POST",
"path": "/auth/permissions/roles/{roleId}/assign",
"line": 154,
"callingComponents": [
{
"component": "RolePermissionAssignment",
"path": "/role-management"
}
]
"line": 163,
"callingComponents": []
},
{
"methodName": "removePermissionsFromRole",
"method": "DELETE",
"path": "/auth/permissions/roles/{roleId}/remove",
"line": 166,
"callingComponents": [
{
"component": "RolePermissionAssignment",
"path": "/role-management"
}
]
"line": 176,
"callingComponents": []
}
]
}

17
gofaster/app/src/renderer/modules/user-management/services/userService.js

@ -46,6 +46,7 @@ api.interceptors.response.use( @@ -46,6 +46,7 @@ api.interceptors.response.use(
export const userService = {
// 获取用户列表
// @serverApiMethod GET /auth/admin/users
async getUsers(page = 1, pageSize = 10) {
try {
const response = await api.get('/auth/admin/users', {
@ -58,6 +59,7 @@ export const userService = { @@ -58,6 +59,7 @@ export const userService = {
},
// 获取单个用户
// @serverApiMethod GET /auth/admin/users/{id}
async getUser(id) {
try {
const response = await api.get(`/auth/admin/users/${id}`)
@ -68,6 +70,7 @@ export const userService = { @@ -68,6 +70,7 @@ export const userService = {
},
// 创建用户
// @serverApiMethod POST /auth/admin/users
async createUser(userData) {
try {
const response = await api.post('/auth/admin/users', userData)
@ -78,6 +81,7 @@ export const userService = { @@ -78,6 +81,7 @@ export const userService = {
},
// 更新用户
// @serverApiMethod PUT /auth/admin/users/{id}
async updateUser(id, userData) {
try {
const response = await api.put(`/auth/admin/users/${id}`, userData)
@ -88,6 +92,7 @@ export const userService = { @@ -88,6 +92,7 @@ export const userService = {
},
// 删除用户
// @serverApiMethod DELETE /auth/admin/users/{id}
async deleteUser(id) {
try {
await api.delete(`/auth/admin/users/${id}`)
@ -98,6 +103,7 @@ export const userService = { @@ -98,6 +103,7 @@ export const userService = {
},
// 获取角色列表
// @serverApiMethod GET /auth/admin/roles
async getRoles() {
try {
const response = await api.get('/auth/admin/roles')
@ -108,6 +114,7 @@ export const userService = { @@ -108,6 +114,7 @@ export const userService = {
},
// 修改密码
// @serverApiMethod POST /auth/change-password
async changePassword(passwordData) {
try {
const response = await api.post('/auth/change-password', passwordData)
@ -118,6 +125,7 @@ export const userService = { @@ -118,6 +125,7 @@ export const userService = {
},
// 获取密码策略
// @serverApiMethod GET /auth/password-policy
async getPasswordPolicy() {
try {
const response = await api.get('/auth/password-policy')
@ -128,6 +136,7 @@ export const userService = { @@ -128,6 +136,7 @@ export const userService = {
},
// 验证密码强度
// @serverApiMethod POST /auth/validate-password
async validatePassword(password) {
try {
const response = await api.post('/auth/validate-password', { password })
@ -138,6 +147,7 @@ export const userService = { @@ -138,6 +147,7 @@ export const userService = {
},
// 检查密码状态
// @serverApiMethod GET /auth/password-status
async checkPasswordStatus() {
try {
const response = await api.get('/auth/password-status')
@ -148,6 +158,7 @@ export const userService = { @@ -148,6 +158,7 @@ export const userService = {
},
// 获取权限列表
// @serverApiMethod GET /permissions
async getPermissions() {
try {
const response = await api.get('/permissions')
@ -158,6 +169,7 @@ export const userService = { @@ -158,6 +169,7 @@ export const userService = {
},
// 获取验证码
// @serverApiMethod GET /auth/captcha
async getCaptcha() {
try {
const response = await api.get('/auth/captcha')
@ -168,6 +180,7 @@ export const userService = { @@ -168,6 +180,7 @@ export const userService = {
},
// 用户登录
// @serverApiMethod POST /auth/login
async login(credentials) {
try {
// 确保credentials包含client_ip
@ -198,6 +211,7 @@ export const userService = { @@ -198,6 +211,7 @@ export const userService = {
},
// 用户登出
// @serverApiMethod POST /auth/logout
async logout(token) {
try {
if (token) {
@ -234,6 +248,7 @@ export const userService = { @@ -234,6 +248,7 @@ export const userService = {
},
// 获取当前用户信息
// @serverApiMethod GET /auth/me
async getCurrentUser(token = null) {
try {
// 如果传入了token,使用传入的token;否则使用localStorage中的token
@ -254,6 +269,7 @@ export const userService = { @@ -254,6 +269,7 @@ export const userService = {
},
// 修改密码
// @serverApiMethod POST /auth/change-password
async changePassword(passwordData) {
try {
const response = await api.post('/auth/change-password', passwordData)
@ -264,6 +280,7 @@ export const userService = { @@ -264,6 +280,7 @@ export const userService = {
},
// 重置密码
// @serverApiMethod POST /auth/reset-password
async resetPassword(email) {
try {
const response = await api.post('/auth/reset-password', { email })

8
gofaster/app/src/renderer/views/UserManagement.vue

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<div class="user-management">
<div class="page-header">
<h2>用户管理</h2>
<button class="btn btn-primary" @click="showAddUserModal = true">
<button name="add-user" class="btn btn-primary" @click="showAddUserModal = true">
<i class="icon">+</i> 添加用户
</button>
</div>
@ -69,10 +69,10 @@ @@ -69,10 +69,10 @@
<td>{{ formatDate(user.created_at) }}</td>
<td>
<div class="actions">
<button class="btn btn-sm btn-info" @click="editUser(user)">
<button name="edit-user" class="btn btn-sm btn-info" @click="editUser(user)">
<i class="icon"></i>
</button>
<button class="btn btn-sm btn-danger" @click="deleteUser(user.id)">
<button name="delete-user" class="btn btn-sm btn-danger" @click="deleteUser(user.id)">
<i class="icon">🗑</i>
</button>
</div>
@ -168,7 +168,7 @@ @@ -168,7 +168,7 @@
<button type="button" class="btn btn-secondary" @click="closeModal">
取消
</button>
<button type="submit" class="btn btn-primary">
<button name="submit-user-form" type="submit" class="btn btn-primary">
{{ showEditUserModal ? '更新' : '创建' }}
</button>
</div>

4
gofaster/app/src/renderer/views/UserProfile.vue

@ -111,10 +111,10 @@ @@ -111,10 +111,10 @@
<!-- 操作按钮 -->
<div class="profile-actions">
<button @click="refreshProfile" class="action-btn refresh-btn">
<button name="refresh-profile" @click="refreshProfile" class="action-btn refresh-btn">
🔄 刷新信息
</button>
<button @click="changePassword" class="action-btn password-btn">
<button name="change-password" @click="changePassword" class="action-btn password-btn">
🔒 修改密码
</button>
</div>

Loading…
Cancel
Save