一些小改动

This commit is contained in:
zlm133588 2025-05-01 19:37:35 +08:00
parent e5799e3c73
commit a9837d2128
36 changed files with 364 additions and 153 deletions

View File

@ -1,4 +1,4 @@
VITE_TITLE = '自动评测系统' VITE_TITLE = '自动批阅系统'
VITE_PORT = 3100 VITE_PORT = 3100

View File

@ -54,8 +54,11 @@ importers:
specifier: ^8.5.0 specifier: ^8.5.0
version: 8.5.0 version: 8.5.0
echarts: echarts:
specifier: ^5.4.3 specifier: ^5.6.0
version: 5.4.3 version: 5.6.0
element-plus:
specifier: ^2.9.7
version: 2.9.8(vue@3.4.21(typescript@5.3.3))
file-saver: file-saver:
specifier: ^2.0.5 specifier: ^2.0.5
version: 2.0.5 version: 2.0.5
@ -82,7 +85,7 @@ importers:
version: 6.1.1(codemirror@6.0.1(@lezer/common@1.2.1))(vue@3.4.21(typescript@5.3.3)) version: 6.1.1(codemirror@6.0.1(@lezer/common@1.2.1))(vue@3.4.21(typescript@5.3.3))
vue-echarts: vue-echarts:
specifier: ^6.6.8 specifier: ^6.6.8
version: 6.6.8(@vue/runtime-core@3.4.21)(echarts@5.4.3)(vue@3.4.21(typescript@5.3.3)) version: 6.6.8(@vue/runtime-core@3.4.21)(echarts@5.6.0)(vue@3.4.21(typescript@5.3.3))
vue-router: vue-router:
specifier: ^4.2.5 specifier: ^4.2.5
version: 4.2.5(vue@3.4.21(typescript@5.3.3)) version: 4.2.5(vue@3.4.21(typescript@5.3.3))
@ -370,6 +373,15 @@ packages:
peerDependencies: peerDependencies:
vue: ^3.0.11 vue: ^3.0.11
'@ctrl/tinycolor@3.6.1':
resolution: {integrity: sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==}
engines: {node: '>=10'}
'@element-plus/icons-vue@2.3.1':
resolution: {integrity: sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==}
peerDependencies:
vue: ^3.2.0
'@emotion/hash@0.8.0': '@emotion/hash@0.8.0':
resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==} resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==}
@ -523,6 +535,15 @@ packages:
resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
'@floating-ui/core@1.6.9':
resolution: {integrity: sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==}
'@floating-ui/dom@1.6.13':
resolution: {integrity: sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==}
'@floating-ui/utils@0.2.9':
resolution: {integrity: sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==}
'@gradio/client@0.14.0': '@gradio/client@0.14.0':
resolution: {integrity: sha512-aFV1gkG3l3omfTWCH5ASp4LDFPhs4Utm1uZaiVjvjy4CfCx7mIqoX7BXa8YVrUqjOXmFUpKBeWwYXFCkuwgj4A==} resolution: {integrity: sha512-aFV1gkG3l3omfTWCH5ASp4LDFPhs4Utm1uZaiVjvjy4CfCx7mIqoX7BXa8YVrUqjOXmFUpKBeWwYXFCkuwgj4A==}
engines: {node: '>=18.0.0'} engines: {node: '>=18.0.0'}
@ -641,6 +662,9 @@ packages:
rollup: rollup:
optional: true optional: true
'@sxzz/popperjs-es@2.11.7':
resolution: {integrity: sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==}
'@transloadit/prettier-bytes@0.0.7': '@transloadit/prettier-bytes@0.0.7':
resolution: {integrity: sha512-VeJbUb0wEKbcwaSlj5n+LscBl9IPgLPkHVGBkh00cztv6X4L/TJXK58LzFuBKX7/GAfiGhIwH67YTLTlzvIzBA==} resolution: {integrity: sha512-VeJbUb0wEKbcwaSlj5n+LscBl9IPgLPkHVGBkh00cztv6X4L/TJXK58LzFuBKX7/GAfiGhIwH67YTLTlzvIzBA==}
@ -708,6 +732,9 @@ packages:
'@types/svgo@2.6.4': '@types/svgo@2.6.4':
resolution: {integrity: sha512-l4cmyPEckf8moNYHdJ+4wkHvFxjyW6ulm9l4YGaOxeyBWPhBOT0gvni1InpFPdzx1dKf/2s62qGITwxNWnPQng==} resolution: {integrity: sha512-l4cmyPEckf8moNYHdJ+4wkHvFxjyW6ulm9l4YGaOxeyBWPhBOT0gvni1InpFPdzx1dKf/2s62qGITwxNWnPQng==}
'@types/web-bluetooth@0.0.16':
resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
'@types/web-bluetooth@0.0.20': '@types/web-bluetooth@0.0.20':
resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
@ -915,12 +942,21 @@ packages:
'@vueuse/core@10.7.2': '@vueuse/core@10.7.2':
resolution: {integrity: sha512-AOyAL2rK0By62Hm+iqQn6Rbu8bfmbgaIMXcE3TSr7BdQ42wnSFlwIdPjInO62onYsEMK/yDMU8C6oGfDAtZ2qQ==} resolution: {integrity: sha512-AOyAL2rK0By62Hm+iqQn6Rbu8bfmbgaIMXcE3TSr7BdQ42wnSFlwIdPjInO62onYsEMK/yDMU8C6oGfDAtZ2qQ==}
'@vueuse/core@9.13.0':
resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==}
'@vueuse/metadata@10.7.2': '@vueuse/metadata@10.7.2':
resolution: {integrity: sha512-kCWPb4J2KGrwLtn1eJwaJD742u1k5h6v/St5wFe8Quih90+k2a0JP8BS4Zp34XUuJqS2AxFYMb1wjUL8HfhWsQ==} resolution: {integrity: sha512-kCWPb4J2KGrwLtn1eJwaJD742u1k5h6v/St5wFe8Quih90+k2a0JP8BS4Zp34XUuJqS2AxFYMb1wjUL8HfhWsQ==}
'@vueuse/metadata@9.13.0':
resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==}
'@vueuse/shared@10.7.2': '@vueuse/shared@10.7.2':
resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==} resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==}
'@vueuse/shared@9.13.0':
resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==}
'@wangeditor/basic-modules@1.1.7': '@wangeditor/basic-modules@1.1.7':
resolution: {integrity: sha512-cY9CPkLJaqF05STqfpZKWG4LpxTMeGSIIF1fHvfm/mz+JXatCagjdkbxdikOuKYlxDdeqvOeBmsUBItufDLXZg==} resolution: {integrity: sha512-cY9CPkLJaqF05STqfpZKWG4LpxTMeGSIIF1fHvfm/mz+JXatCagjdkbxdikOuKYlxDdeqvOeBmsUBItufDLXZg==}
peerDependencies: peerDependencies:
@ -1524,6 +1560,9 @@ packages:
dayjs@1.11.10: dayjs@1.11.10:
resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==} resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==}
dayjs@1.11.13:
resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==}
debug@2.6.9: debug@2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
peerDependencies: peerDependencies:
@ -1668,8 +1707,8 @@ packages:
eastasianwidth@0.2.0: eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
echarts@5.4.3: echarts@5.6.0:
resolution: {integrity: sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==} resolution: {integrity: sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==}
editor@1.0.0: editor@1.0.0:
resolution: {integrity: sha512-SoRmbGStwNYHgKfjOrX2L0mUvp9bUVv0uPppZSOMAntEbcFtoC3MKF5b3T6HQPXKIV+QGY3xPO3JK5it5lVkuw==} resolution: {integrity: sha512-SoRmbGStwNYHgKfjOrX2L0mUvp9bUVv0uPppZSOMAntEbcFtoC3MKF5b3T6HQPXKIV+QGY3xPO3JK5it5lVkuw==}
@ -1682,6 +1721,11 @@ packages:
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
hasBin: true hasBin: true
element-plus@2.9.8:
resolution: {integrity: sha512-srViUaUdfblBKGMeuEPiXxxKlH5aUmKqEwmhb/At9Sj91DbU6od/jYN1955cTnzt3wTSA7GfnZF7UiRX9sdRHg==}
peerDependencies:
vue: ^3.2.0
emoji-regex@8.0.0: emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
@ -2469,6 +2513,13 @@ packages:
lodash-es@4.17.21: lodash-es@4.17.21:
resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
lodash-unified@1.0.3:
resolution: {integrity: sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==}
peerDependencies:
'@types/lodash-es': '*'
lodash: '*'
lodash-es: '*'
lodash.camelcase@4.3.0: lodash.camelcase@4.3.0:
resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==}
@ -2571,6 +2622,9 @@ packages:
mdn-data@2.0.30: mdn-data@2.0.30:
resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
memoize-one@6.0.0:
resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
meow@8.1.2: meow@8.1.2:
resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==}
engines: {node: '>=10'} engines: {node: '>=10'}
@ -2728,6 +2782,9 @@ packages:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
normalize-wheel-es@1.2.0:
resolution: {integrity: sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw==}
npm-run-path@4.0.1: npm-run-path@4.0.1:
resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
engines: {node: '>=8'} engines: {node: '>=8'}
@ -3892,8 +3949,8 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'} engines: {node: '>=10'}
zrender@5.4.4: zrender@5.6.1:
resolution: {integrity: sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==} resolution: {integrity: sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==}
snapshots: snapshots:
@ -4193,6 +4250,12 @@ snapshots:
dependencies: dependencies:
vue: 3.4.21(typescript@5.3.3) vue: 3.4.21(typescript@5.3.3)
'@ctrl/tinycolor@3.6.1': {}
'@element-plus/icons-vue@2.3.1(vue@3.4.21(typescript@5.3.3))':
dependencies:
vue: 3.4.21(typescript@5.3.3)
'@emotion/hash@0.8.0': {} '@emotion/hash@0.8.0': {}
'@esbuild/android-arm64@0.18.20': '@esbuild/android-arm64@0.18.20':
@ -4284,6 +4347,17 @@ snapshots:
'@eslint/js@8.56.0': {} '@eslint/js@8.56.0': {}
'@floating-ui/core@1.6.9':
dependencies:
'@floating-ui/utils': 0.2.9
'@floating-ui/dom@1.6.13':
dependencies:
'@floating-ui/core': 1.6.9
'@floating-ui/utils': 0.2.9
'@floating-ui/utils@0.2.9': {}
'@gradio/client@0.14.0': '@gradio/client@0.14.0':
dependencies: dependencies:
bufferutil: 4.0.8 bufferutil: 4.0.8
@ -4431,6 +4505,8 @@ snapshots:
optionalDependencies: optionalDependencies:
rollup: 3.29.4 rollup: 3.29.4
'@sxzz/popperjs-es@2.11.7': {}
'@transloadit/prettier-bytes@0.0.7': {} '@transloadit/prettier-bytes@0.0.7': {}
'@trysound/sax@0.2.0': {} '@trysound/sax@0.2.0': {}
@ -4486,6 +4562,8 @@ snapshots:
dependencies: dependencies:
'@types/node': 20.11.27 '@types/node': 20.11.27
'@types/web-bluetooth@0.0.16': {}
'@types/web-bluetooth@0.0.20': {} '@types/web-bluetooth@0.0.20': {}
'@typescript-eslint/scope-manager@6.21.0': '@typescript-eslint/scope-manager@6.21.0':
@ -4829,8 +4907,20 @@ snapshots:
- '@vue/composition-api' - '@vue/composition-api'
- vue - vue
'@vueuse/core@9.13.0(vue@3.4.21(typescript@5.3.3))':
dependencies:
'@types/web-bluetooth': 0.0.16
'@vueuse/metadata': 9.13.0
'@vueuse/shared': 9.13.0(vue@3.4.21(typescript@5.3.3))
vue-demi: 0.14.7(vue@3.4.21(typescript@5.3.3))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
'@vueuse/metadata@10.7.2': {} '@vueuse/metadata@10.7.2': {}
'@vueuse/metadata@9.13.0': {}
'@vueuse/shared@10.7.2(vue@3.4.21(typescript@5.3.3))': '@vueuse/shared@10.7.2(vue@3.4.21(typescript@5.3.3))':
dependencies: dependencies:
vue-demi: 0.14.7(vue@3.4.21(typescript@5.3.3)) vue-demi: 0.14.7(vue@3.4.21(typescript@5.3.3))
@ -4838,6 +4928,13 @@ snapshots:
- '@vue/composition-api' - '@vue/composition-api'
- vue - vue
'@vueuse/shared@9.13.0(vue@3.4.21(typescript@5.3.3))':
dependencies:
vue-demi: 0.14.7(vue@3.4.21(typescript@5.3.3))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
'@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)': '@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)':
dependencies: dependencies:
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2) '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
@ -5483,6 +5580,8 @@ snapshots:
dayjs@1.11.10: {} dayjs@1.11.10: {}
dayjs@1.11.13: {}
debug@2.6.9: debug@2.6.9:
dependencies: dependencies:
ms: 2.0.0 ms: 2.0.0
@ -5612,10 +5711,10 @@ snapshots:
eastasianwidth@0.2.0: {} eastasianwidth@0.2.0: {}
echarts@5.4.3: echarts@5.6.0:
dependencies: dependencies:
tslib: 2.3.0 tslib: 2.3.0
zrender: 5.4.4 zrender: 5.6.1
editor@1.0.0: {} editor@1.0.0: {}
@ -5625,6 +5724,27 @@ snapshots:
dependencies: dependencies:
jake: 10.8.7 jake: 10.8.7
element-plus@2.9.8(vue@3.4.21(typescript@5.3.3)):
dependencies:
'@ctrl/tinycolor': 3.6.1
'@element-plus/icons-vue': 2.3.1(vue@3.4.21(typescript@5.3.3))
'@floating-ui/dom': 1.6.13
'@popperjs/core': '@sxzz/popperjs-es@2.11.7'
'@types/lodash': 4.14.202
'@types/lodash-es': 4.17.12
'@vueuse/core': 9.13.0(vue@3.4.21(typescript@5.3.3))
async-validator: 4.2.5
dayjs: 1.11.13
escape-html: 1.0.3
lodash: 4.17.21
lodash-es: 4.17.21
lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21)
memoize-one: 6.0.0
normalize-wheel-es: 1.2.0
vue: 3.4.21(typescript@5.3.3)
transitivePeerDependencies:
- '@vue/composition-api'
emoji-regex@8.0.0: {} emoji-regex@8.0.0: {}
emoji-regex@9.2.2: {} emoji-regex@9.2.2: {}
@ -6490,6 +6610,12 @@ snapshots:
lodash-es@4.17.21: {} lodash-es@4.17.21: {}
lodash-unified@1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21):
dependencies:
'@types/lodash-es': 4.17.12
lodash: 4.17.21
lodash-es: 4.17.21
lodash.camelcase@4.3.0: {} lodash.camelcase@4.3.0: {}
lodash.clonedeep@4.5.0: {} lodash.clonedeep@4.5.0: {}
@ -6569,6 +6695,8 @@ snapshots:
mdn-data@2.0.30: {} mdn-data@2.0.30: {}
memoize-one@6.0.0: {}
meow@8.1.2: meow@8.1.2:
dependencies: dependencies:
'@types/minimist': 1.2.5 '@types/minimist': 1.2.5
@ -6765,6 +6893,8 @@ snapshots:
normalize-path@3.0.0: {} normalize-path@3.0.0: {}
normalize-wheel-es@1.2.0: {}
npm-run-path@4.0.1: npm-run-path@4.0.1:
dependencies: dependencies:
path-key: 3.1.1 path-key: 3.1.1
@ -7795,9 +7925,9 @@ snapshots:
dependencies: dependencies:
vue: 3.4.21(typescript@5.3.3) vue: 3.4.21(typescript@5.3.3)
vue-echarts@6.6.8(@vue/runtime-core@3.4.21)(echarts@5.4.3)(vue@3.4.21(typescript@5.3.3)): vue-echarts@6.6.8(@vue/runtime-core@3.4.21)(echarts@5.6.0)(vue@3.4.21(typescript@5.3.3)):
dependencies: dependencies:
echarts: 5.4.3 echarts: 5.6.0
resize-detector: 0.3.0 resize-detector: 0.3.0
vue: 3.4.21(typescript@5.3.3) vue: 3.4.21(typescript@5.3.3)
vue-demi: 0.13.11(vue@3.4.21(typescript@5.3.3)) vue-demi: 0.13.11(vue@3.4.21(typescript@5.3.3))
@ -7929,6 +8059,6 @@ snapshots:
yocto-queue@0.1.0: {} yocto-queue@0.1.0: {}
zrender@5.4.4: zrender@5.6.1:
dependencies: dependencies:
tslib: 2.3.0 tslib: 2.3.0

View File

@ -4,7 +4,7 @@
class="m-auto max-w-700 min-w-345 f-c-c rounded-10 bg-white p-15 card-shadow" class="m-auto max-w-700 min-w-345 f-c-c rounded-10 bg-white p-15 card-shadow"
dark:bg-dark dark:bg-dark
> >
<div relative w-320 flex-col px-20 py-35> <div relative w-370 flex-col px-20 py-35>
<SvgIcon <SvgIcon
v-if="showCloseIcon" v-if="showCloseIcon"
icon="close" icon="close"
@ -152,10 +152,11 @@ initLoginInfo()
showTo() showTo()
function showTo(){ function showTo(){
if(props.title==="自动评测系统 - 管理端") showToStudent.value=false; if(props.title==="自动批阅系统 - 管理端")
showToStudent.value=false;
} }
const regist=()=>{ const regist=()=>{
if (props.title==="自动评测系统 - 管理端"){ if (props.title==="自动批阅系统 - 管理端"){
router.push({name: 'AdminRegister'}) router.push({name: 'AdminRegister'})
}else { }else {
router.push({name:'Signup'}) router.push({name:'Signup'})
@ -163,7 +164,7 @@ const regist=()=>{
} }
} }
const forget=()=>{ const forget=()=>{
if (props.title==="自动评测系统 - 管理端"){ if (props.title==="自动批阅系统 - 管理端"){
router.push({name:'AdminRePwInfo'}) router.push({name:'AdminRePwInfo'})
}else { }else {
router.push({name:'RePwInfo'}) router.push({name:'RePwInfo'})

View File

@ -34,7 +34,7 @@
<n-data-table <n-data-table
remote remote
:single-line="false" :single-line="false"
style="text-align: center" style="width: 1200px;--n-td-padding: 2px 5px;"
ref="table" ref="table"
:columns="columns" :columns="columns"
:data="assistantList" :data="assistantList"

View File

@ -1,13 +1,17 @@
<template> <template>
<div flex-col gap-y-10 style="width: 30px"> <div flex-col gap-y-10 style="width: 30px">
<div style="display: flex"> <div style="display: flex">
<n-button type="primary" size="small" @click="onEdit" style="--n-width: 70px;margin-left: 20px;margin-right: 20px"> <n-button type="primary" size="small"
@click="onEdit" style="--n-width: 50px;margin-left: 20px;margin-right: 20px">
编辑 编辑
</n-button> </n-button>
<n-button type="primary" size="small" @click="onPassword" style="--n-width: 90px;"> <n-button type="primary" size="small"
@click="onPassword"
style="--n-width: 80px;">
重置密码 重置密码
</n-button> </n-button>
<n-button type="primary" size="small" @click="onDelete" style="--n-width: 70px;margin-left:20px "> <n-button type="primary" size="small"
@click="onDelete" style="--n-width: 50px;margin-left:20px ">
删除 删除
</n-button> </n-button>
</div> </div>

View File

@ -92,7 +92,7 @@ const columns = [
return h( return h(
ClassAssistantActions, ClassAssistantActions,
{ {
onClickDetailed: () => onDetailedAssistant(row), // onClickDetailed: () => onDetailedAssistant(row),
onClickDelete: () => onDeleteAssistant(row), onClickDelete: () => onDeleteAssistant(row),
onClickPassword:()=>onPasswordAssistant(row), onClickPassword:()=>onPasswordAssistant(row),
} }

View File

@ -1,9 +1,9 @@
<template> <template>
<div flex-col gap-y-10 style="width: 30px"> <div flex-col gap-y-10 style="width: 30px">
<div style="display: flex"> <div style="display: flex">
<n-button type="primary" size="small" @click="onDetailed" style="--n-width: 73px;margin-left: 15px;margin-right: 20px"> <!-- <n-button type="primary" size="small" @click="onDetailed" style="&#45;&#45;n-width: 73px;margin-left: 15px;margin-right: 20px">-->
详细信息 <!-- 详细信息-->
</n-button> <!-- </n-button>-->
<n-button type="primary" size="small" @click="onPassword" style="--n-width: 73px;margin-right: 20px"> <n-button type="primary" size="small" @click="onPassword" style="--n-width: 73px;margin-right: 20px">
重置密码 重置密码
</n-button> </n-button>

View File

@ -1,18 +1,28 @@
<template> <template>
<div flex-col gap-y-10 style="width: 30px"> <div flex-col gap-y-10 style="width: 30px">
<div style="display: flex"> <div style="display: flex">
<n-button type="primary" size="small" @click="onEdit" style="--n-width: 70px;margin: 0px 0px"> <n-button type="primary" size="small"
@click="onEdit" style="--n-width: 70px;margin: 0px 0px" v-if="
userStore.getRole().length > 0 && (userStore.getRole().some((r) => r === 'admin'|| userStore.getRole().some((r) => r === 'teacher')))
">
修改 修改
</n-button> </n-button>
<n-button type="primary" size="small" @click="onDelete" style="--n-width: 70px;margin: 0px 20px"> <n-button type="primary" size="small"
@click="onDelete" style="--n-width: 70px;margin: 0px 20px" v-if="
userStore.getRole().length > 0 && (userStore.getRole().some((r) => r === 'admin'|| userStore.getRole().some((r) => r === 'teacher')))
">
删除 删除
</n-button> </n-button>
<n-button type="primary" size="small" @click="onBanji" style="--n-width: 70px;margin: 0px 20px"> <n-button type="primary" size="small"
@click="onBanji" style="--n-width: 70px;margin: 0px 20px" v-if="
userStore.getRole().length > 0 && (userStore.getRole().some((r) => r === 'admin'|| userStore.getRole().some((r) => r === 'teacher')))
">
参与班级 参与班级
</n-button> </n-button>
<n-button type="primary" size="small" <n-button type="primary" size="small"
@click="onAddProblem" @click="onAddProblem"
style="margin-left: 12px">作业添加</n-button> style="margin-left: 12px" >作业添加
</n-button>
<n-button type="primary" size="small" <n-button type="primary" size="small"
@click="onProblem" @click="onProblem"
style="--n-width: 70px;margin: 0px 20px"> style="--n-width: 70px;margin: 0px 20px">
@ -28,6 +38,9 @@
</template> </template>
<script setup> <script setup>
import {useUserStore} from "@/store";
const userStore = useUserStore()
const emit = const emit =
defineEmits(['clickDelete'],['clickEdit'],['clickAdd'],['clickBanji'],['clickProblem']['clickStore']) defineEmits(['clickDelete'],['clickEdit'],['clickAdd'],['clickBanji'],['clickProblem']['clickStore'])
const onDelete = ()=>{ const onDelete = ()=>{

View File

@ -56,10 +56,10 @@ const submit = async () => {
tagsStore.removeTag(path.value) tagsStore.removeTag(path.value)
await router.push({name: 'AdminCourseList'}) await router.push({name: 'AdminCourseList'})
} catch (err) { } catch (err) {
$message.error(err.message) // $message.error(err.message)
} }
} else { } else {
$message.error("编辑不能为空") $message.error("课程名称不能为空")
} }
} }
const queryByPage = async () => { const queryByPage = async () => {

View File

@ -12,7 +12,10 @@
<span style="width: 143px;">课程名称:</span> <span style="width: 143px;">课程名称:</span>
<n-input style="margin-left: 10px;" v-model:value="courseInfoValue.name" placeholder=""></n-input> <n-input style="margin-left: 10px;" v-model:value="courseInfoValue.name" placeholder=""></n-input>
<n-button type="primary" style="margin-left: 10px;" @click="sub">查看课程</n-button> <n-button type="primary" style="margin-left: 10px;" @click="sub">查看课程</n-button>
<n-button type="primary" size="small" @click="onAdd" style="margin-left: 12px">添加课程</n-button> <n-button type="primary"
size="small" @click="onAdd" style="margin-left: 12px" v-if="
userStore.getRole().length > 0 && (userStore.getRole().some((r) => r === 'admin'|| userStore.getRole().some((r) => r === 'teacher')))
">添加课程</n-button>
</div> </div>
</div> </div>
</n-form-item> </n-form-item>
@ -51,6 +54,7 @@ const rules=ref(null)
const courseInfoRef = ref(null) const courseInfoRef = ref(null)
const loading = ref(true) const loading = ref(true)
const courseList = ref([]) const courseList = ref([])
const role=userStore.getRole()
const paginationReactive = reactive({ const paginationReactive = reactive({
page: 1, page: 1,
pageSize: 10, pageSize: 10,
@ -67,7 +71,7 @@ const courseInfoValue = ref({
}); });
const columns = [ let columns = [
{ {
key: 'name', key: 'name',
title: '课程名称', title: '课程名称',
@ -78,6 +82,16 @@ const columns = [
title: '操作', title: '操作',
width: '150', width: '150',
render(row) { render(row) {
if(role[0]==='assistant'){
return h(
CourseActions,
{
onClickAdd:()=>onAddProblem(row),
onClickProblem:()=>onProblem(row),
onClickStore:()=>onProblemStore(row)
}
);
} else{
return h( return h(
CourseActions, CourseActions,
{ {
@ -92,6 +106,7 @@ const columns = [
); );
} }
} }
}
] ]
const queryByPage = async (currentPage)=>{ const queryByPage = async (currentPage)=>{
loading.value = true loading.value = true

View File

@ -271,4 +271,13 @@ onMounted(() => {
queryByPage1() queryByPage1()
// getSchools() // getSchools()
}) })
watch(
()=>router.currentRoute.value.fullPath,
()=>{
if
(router.currentRoute.value.fullPath==='/admin/course/view-classes-not-in-course') {
queryByPage(paginationReactive.page)
}
}
)
</script> </script>

View File

@ -4,7 +4,7 @@
:login="api.login" :login="api.login"
success-path="/admin" success-path="/admin"
:show-close-icon="false" :show-close-icon="false"
title="自动评测系统 - 管理端" title="自动批阅系统 - 管理端"
/> />
</AppPage> </AppPage>
</template> </template>

View File

@ -29,9 +29,6 @@
<script setup> <script setup>
import {ref, reactive, onMounted, watch} from 'vue' import {ref, reactive, onMounted, watch} from 'vue'
import api from '@/api/admin'; import api from '@/api/admin';
import ProblemActions from
'./ProblemActions.vue';
import {formatDateTime} from '@/utils';
import { useUserStore } from '@/store'; import { useUserStore } from '@/store';
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
const rules=ref(null) const rules=ref(null)
@ -40,6 +37,7 @@ const router = useRouter()
const route = useRoute() const route = useRoute()
const {problemId, history } = route.query const {problemId, history } = route.query
const ProblemInfoRef = ref(null) const ProblemInfoRef = ref(null)
const path=ref('')
const loading = ref(true) const loading = ref(true)
const ScoringRubricList = const ScoringRubricList =
ref([]) ref([])
@ -114,8 +112,9 @@ const onChangePage = (page) => {
} }
} }
onMounted(()=>{ onMounted(()=>{
path.value = router.currentRoute.value.fullPath
queryByPage() queryByPage()
path.value = router.currentRoute.value.fullPath
}) })
watch(route, () => { watch(route, () => {
queryByPage() // 路由变化时重新获取数据 queryByPage() // 路由变化时重新获取数据

View File

@ -19,7 +19,8 @@
:loading="loading" :loading="loading"
:row-key="rowKey" :row-key="rowKey"
:scroll-x="900" :scroll-x="900"
style="width: 1180px;--n-td-padding:0px 5px;" style="width: 1100px;--n-td-padding:0px
5px;"
/> />
</CommonPage> </CommonPage>

View File

@ -115,6 +115,10 @@ const cancel = ()=>{
// router.push({path: 'problem-list'}) // router.push({path: 'problem-list'})
} }
const updateSetup =async ()=>{ const updateSetup =async ()=>{
if(problemInfoValue.value.startTime!==''&&problemInfoValue.value.endTime!==''){
if(problemInfoValue.value.startTime>=problemInfoValue.value.endTime){
$message.error("结束时间不能早于开始时间")
}else{
try { try {
await api.updateSetup({ await api.updateSetup({
...problemInfoValue.value, ...problemInfoValue.value,
@ -126,7 +130,7 @@ const updateSetup =async ()=>{
} catch (err) { } catch (err) {
tagsStore.removeTag(path.value) tagsStore.removeTag(path.value)
} }
} }}}
const onAdd = ()=>{ const onAdd = ()=>{
router.push({name: 'AdminProblemPostClass'}) router.push({name: 'AdminProblemPostClass'})
} }

View File

@ -120,7 +120,6 @@ const problemInfoRef = ref(null)
const descEditorHeight = ref('160px') const descEditorHeight = ref('160px')
const cancel = ()=>{ const cancel = ()=>{
tagsStore.removeTag(path.value) tagsStore.removeTag(path.value)
router.push({path: 'problem-list'})
} }
const queryByPage = async ()=>{ const queryByPage = async ()=>{
loading.value = true; loading.value = true;
@ -143,7 +142,9 @@ const queryByPage = async ()=>{
const onAddClass =ref(false) const onAddClass =ref(false)
const post =async ()=>{ const post =async ()=>{
if(problemInfoValue.value.startTime!==''&&problemInfoValue.value.endTime!==''){ if(problemInfoValue.value.startTime!==''&&problemInfoValue.value.endTime!==''){
try { if(problemInfoValue.value.startTime>=problemInfoValue.value.endTime){
$message.error("结束时间不能早于开始时间")
}else{try {
await api.postProblem({ await api.postProblem({
...problemInfoValue.value ...problemInfoValue.value
}) })
@ -155,7 +156,7 @@ const post =async ()=>{
tagsStore.removeTag(path.value) tagsStore.removeTag(path.value)
// await router.push({name: // await router.push({name:
// 'AdminProblemStore'}) // 'AdminProblemStore'})
} }}
}else { }else {
$message.error("时间范围不能为空") $message.error("时间范围不能为空")
} }

View File

@ -129,6 +129,7 @@ const problemInfoRef = ref(null)
const loading = ref(false) const loading = ref(false)
const descEditorHeight = ref('160px') const descEditorHeight = ref('160px')
const problemReviewValue=ref({ const problemReviewValue=ref({
studentId:0,
title:'', title:'',
description:'', description:'',
studentNo:'', studentNo:'',
@ -197,19 +198,28 @@ const submitAndNext =async ()=>{
problemId:problemId, problemId:problemId,
}) })
$message.success("批阅成功") $message.success("批阅成功")
}else { }else {
$message.error("教师评分不能为空") $message.error("教师评分不能为空")
} }
const res =await api.findNextReport({ const res =await api.findNextReport({
problemId:problemId problemId:problemId
}) })
if(res.message=="所有报告都批阅完成") if(res.message==="所有报告都批阅完成")
tagsStore.removeTag(path.value) {
else $message.success("所有报告都批阅完成")}
else{
problemReviewValue.value=res.data problemReviewValue.value=res.data
loading.value=false await router.push({
name: 'AdminProblemReview',
query: {
classId: classId,
problemId: problemId,
courseId: courseId,
studentId: problemReviewValue.value.studentId
} }
})
loading.value=false
}}
const redo=async ()=>{ const redo=async ()=>{
try { try {
await api.redoReport({ await api.redoReport({

View File

@ -248,9 +248,15 @@ const onChangePage = (page) => {
onMounted(()=>{ onMounted(()=>{
queryByPage(paginationReactive.page) queryByPage(paginationReactive.page)
}) })
// watch(route, () => { watch(
// queryByPage(); // 路由变化时重新获取数据 ()=>router.currentRoute.value.fullPath,
// }); ()=>{
if
(router.currentRoute.value.fullPath==='/admin/problem/problem-store') {
queryByPage(paginationReactive.page)
}
}
)
</script> </script>
<style> <style>

View File

@ -21,24 +21,7 @@ let scoreRanges =[
// 获取图表 DOM 元素 // 获取图表 DOM 元素
const chart = ref(null); const chart = ref(null);
// const studentInfoValue = ref({
// id:0,
// studentNo:'',
// chineseName:'',
// readTime:[],
// submitTime:[],
// submissionStatus:'',
// score:0,
// pageNum:paginationReactive.page,
// pageSize:paginationReactive.pageSize
// });
const queryByPage = async ()=>{ const queryByPage = async ()=>{
// loading.value = true;
// studentInfoValue.value.pageNum=currentPage
// studentInfoValue.value.pageSize=paginationReactive.pageSize
// const res1=await
// api.findProblemById({id:problemId});
// problem.value=res1.data
const res = await const res = await
api.findScore( api.findScore(
{ {
@ -47,13 +30,9 @@ const queryByPage = async ()=>{
selectedStatus:selectedStatus.value, selectedStatus:selectedStatus.value,
} }
); );
const {pageNum, pageSize, total, list} = res.data
// paginationReactive.page = pageNum
// paginationReactive.pageSize = pageSize
// paginationReactive.itemCount = total
scoreList.value =res.data scoreList.value =res.data
const scores = scoreList.value.map(score => const scores = scoreList.value.map(score =>
parseFloat(score)); parseInt(score));
scores.forEach(score => { scores.forEach(score => {
if (score < 60) { if (score < 60) {
scoreRanges[0].count++; scoreRanges[0].count++;
@ -114,7 +93,6 @@ onMounted(() => {
<n-scrollbar x-scrollable style="max-height: 100vh"> <n-scrollbar x-scrollable style="max-height: 100vh">
<CommonPage> <CommonPage>
<div> <div>
<!-- <h1>分数统计</h1>-->
<div ref="chart" style="width: 600px; <div ref="chart" style="width: 600px;
height: 400px;margin-left: 300px"></div> height: 400px;margin-left: 300px"></div>
</div> </div>

View File

@ -35,7 +35,7 @@ export default {
meta: { meta: {
title: '作业管理', title: '作业管理',
icon: 'material-symbols:problem-outline', icon: 'material-symbols:problem-outline',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -48,7 +48,7 @@ export default {
meta: { meta: {
title: '作业列表', title: '作业列表',
icon: 'eva:list-fill', icon: 'eva:list-fill',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -61,7 +61,7 @@ export default {
meta: { meta: {
title: '作业发布', title: '作业发布',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -74,7 +74,7 @@ export default {
meta: { meta: {
title: '作业修改设置', title: '作业修改设置',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -87,7 +87,7 @@ export default {
meta: { meta: {
title: '统计成绩', title: '统计成绩',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -100,7 +100,7 @@ export default {
meta: { meta: {
title: '作业编辑', title: '作业编辑',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -113,7 +113,7 @@ export default {
meta: { meta: {
title: '作业批阅', title: '作业批阅',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -126,7 +126,7 @@ export default {
meta: { meta: {
title: '作业提交情况', title: '作业提交情况',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -139,7 +139,7 @@ export default {
meta: { meta: {
title: '作业添加', title: '作业添加',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -152,20 +152,7 @@ export default {
meta: { meta: {
title: '加时', title: '加时',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true,
keepAlive: true,
},
},
{
name: 'AdminProblemReview',
path: 'problem-review',
isHidden: true,
component: () => import('@/views/admin/problem/problem-review.vue'),
meta: {
title: '作业批阅',
icon: 'ic:baseline-add',
role: ['admin', 'teacher'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -178,7 +165,7 @@ export default {
meta: { meta: {
title: '作业库', title: '作业库',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -191,7 +178,7 @@ export default {
meta: { meta: {
title: '添加评分标准', title: '添加评分标准',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -204,7 +191,7 @@ export default {
meta: { meta: {
title: '添加评分细则', title: '添加评分细则',
icon: 'ic:baseline-add', icon: 'ic:baseline-add',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -218,7 +205,7 @@ export default {
meta: { meta: {
title: '课程管理', title: '课程管理',
icon: 'lucide:book-check', icon: 'lucide:book-check',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },
@ -230,7 +217,7 @@ export default {
meta: { meta: {
title: '课程列表', title: '课程列表',
icon: 'eva:list-fill', icon: 'eva:list-fill',
role: ['admin', 'teacher'], role: ['admin', 'teacher','assistant'],
requireAuth: true, requireAuth: true,
keepAlive: true, keepAlive: true,
}, },

View File

@ -177,9 +177,11 @@ public class ProblemController {
@PostMapping( @PostMapping(
"/addTime") "/addTime")
public RespBean addTime(@RequestBody PMPostProblem pmPostProblem) { public RespBean addTime(@RequestBody PMPostProblem pmPostProblem,HttpServletRequest request) {
DecodeToken decodeToken=new DecodeToken(request);
Integer teacherId = Integer.parseInt(decodeToken.getUserId());
int num = int num =
problemServiceI.editSubmitReport(pmPostProblem.getEndTime(), pmPostProblem.getProblemId(), pmPostProblem.getStudentId()); problemServiceI.editSubmitReport(pmPostProblem.getEndTime(), pmPostProblem.getProblemId(), pmPostProblem.getStudentId(),teacherId);
if (num == 1) if (num == 1)
return RespBean.ok("加时成功"); return RespBean.ok("加时成功");
else else
@ -346,12 +348,13 @@ public class ProblemController {
int studentId= int studentId=
problemServiceI.findNextId(pmReviewMessage.getProblemId()); problemServiceI.findNextId(pmReviewMessage.getProblemId());
if(studentId==0) if(studentId==0)
return RespBean.error("所有报告都批阅完成"); return RespBean.ok("所有报告都批阅完成");
else pmReviewMessage.setStudentId(studentId); else pmReviewMessage.setStudentId(studentId);
//根据studentId和problemId查找 //根据studentId和problemId查找
PMReviewMessage reviewMessage= PMReviewMessage reviewMessage=
problemServiceI.findProblemReview(pmReviewMessage); problemServiceI.findProblemReview(pmReviewMessage);
return RespBean.ok("获取下一份批阅报告成功!", reviewMessage.setStudentId(pmReviewMessage.getStudentId());
return RespBean.ok("获取下一份报告成功!",
reviewMessage); reviewMessage);
} }

View File

@ -11,7 +11,7 @@ import java.util.List;
public interface SubmitReportDaoI extends BaseDaoI<SubmitReport> { public interface SubmitReportDaoI extends BaseDaoI<SubmitReport> {
public List<Object[]> findWeijiaoList(PMStudentSubmit pmStudentSubmit); public List<Object[]> findWeijiaoList(PMStudentSubmit pmStudentSubmit);
public List<Object[]> findYijiaoList(PMStudentSubmit pmStudentSubmit); public List<Object[]> findYijiaoList(PMStudentSubmit pmStudentSubmit);
public int updateAddTime(LocalDateTime addTime,int problemId,int studentId); public int updateAddTime(LocalDateTime addTime,int problemId,int studentId,int teacherId);
public int editScoreAndComment(PMReviewMessage pmReviewMessage); public int editScoreAndComment(PMReviewMessage pmReviewMessage);
public int redoReport(PMReviewMessage pmReviewMessage); public int redoReport(PMReviewMessage pmReviewMessage);
public List<Object[]> findProblemReview(PMReviewMessage pmReviewMessage); public List<Object[]> findProblemReview(PMReviewMessage pmReviewMessage);

View File

@ -332,7 +332,7 @@ public class ProblemDaoImpl extends BaseDaoImpl<Problem> implements ProblemDaoI{
if (selectedStatus.equals("not_started")) { if (selectedStatus.equals("not_started")) {
hql = "SELECT p.id as id, p.title as title, pp.startTime as startTime, pp.endTime as endTime, " + hql = "SELECT p.id as id, p.title as title, pp.startTime as startTime, pp.endTime as endTime, " +
"COUNT(CASE WHEN sr.score IS NULL AND sr.autoscore IS NOT NULL THEN 1 END) AS daipi, " + "COUNT(CASE WHEN sr.score IS NULL AND sr.autoscore IS NOT NULL THEN 1 END) AS daipi, " +
"COUNT(CASE WHEN sr.submissionTime IS NOT NULL THEN 1 END) AS yijiao " + "COUNT(CASE WHEN sr.submissionTime IS NOT NULL and sr.problemId=p.id THEN 1 END) AS yijiao " +
// "COUNT(CASE WHEN sr.submissionTime IS NULL THEN 1 END) AS weijiao " + // "COUNT(CASE WHEN sr.submissionTime IS NULL THEN 1 END) AS weijiao " +
"FROM Problem p " + "FROM Problem p " +
"INNER JOIN PostProblem pp ON p.id = pp.problemId " + "INNER JOIN PostProblem pp ON p.id = pp.problemId " +
@ -351,7 +351,7 @@ public class ProblemDaoImpl extends BaseDaoImpl<Problem> implements ProblemDaoI{
} else if (selectedStatus.equals("in_progress")) { } else if (selectedStatus.equals("in_progress")) {
hql = "SELECT p.id as id, p.title as title, pp.startTime as startTime, pp.endTime as endTime, " + hql = "SELECT p.id as id, p.title as title, pp.startTime as startTime, pp.endTime as endTime, " +
"COUNT(CASE WHEN sr.score IS NULL AND sr.autoscore IS NOT NULL THEN 1 END) AS daipi, " + "COUNT(CASE WHEN sr.score IS NULL AND sr.autoscore IS NOT NULL THEN 1 END) AS daipi, " +
"COUNT(CASE WHEN sr.submissionTime IS NOT NULL THEN 1 END) AS yijiao " + "COUNT(CASE WHEN sr.submissionTime IS NOT NULL and sr.problemId=p.id THEN 1 END) AS yijiao " +
// "COUNT(CASE WHEN sr.submissionTime IS NULL THEN 1 END) AS weijiao " + // "COUNT(CASE WHEN sr.submissionTime IS NULL THEN 1 END) AS weijiao " +
"FROM Problem p " + "FROM Problem p " +
"INNER JOIN PostProblem pp ON p.id = pp.problemId " + "INNER JOIN PostProblem pp ON p.id = pp.problemId " +
@ -370,7 +370,7 @@ public class ProblemDaoImpl extends BaseDaoImpl<Problem> implements ProblemDaoI{
}else if(selectedStatus.equals("completed")){ }else if(selectedStatus.equals("completed")){
hql = "SELECT p.id as id, p.title as title, pp.startTime as startTime, pp.endTime as endTime, " + hql = "SELECT p.id as id, p.title as title, pp.startTime as startTime, pp.endTime as endTime, " +
"COUNT(CASE WHEN sr.score IS NULL AND sr.autoscore IS NOT NULL THEN 1 END) AS daipi, " + "COUNT(CASE WHEN sr.score IS NULL AND sr.autoscore IS NOT NULL THEN 1 END) AS daipi, " +
"COUNT(CASE WHEN sr.submissionTime IS NOT NULL THEN 1 END) AS yijiao " + "COUNT(CASE WHEN sr.submissionTime IS NOT NULL and sr.problemId=p.id THEN 1 END) AS yijiao " +
// "COUNT(CASE WHEN sr.submissionTime IS NULL THEN 1 END) AS weijiao " + // "COUNT(CASE WHEN sr.submissionTime IS NULL THEN 1 END) AS weijiao " +
"FROM Problem p " + "FROM Problem p " +
"INNER JOIN PostProblem pp ON p.id = pp.problemId " + "INNER JOIN PostProblem pp ON p.id = pp.problemId " +
@ -387,7 +387,7 @@ public class ProblemDaoImpl extends BaseDaoImpl<Problem> implements ProblemDaoI{
}else{ }else{
hql = "SELECT p.id as id, p.title as title, pp.startTime as startTime, pp.endTime as endTime, " + hql = "SELECT p.id as id, p.title as title, pp.startTime as startTime, pp.endTime as endTime, " +
"COUNT(CASE WHEN sr.score IS NULL AND sr.autoscore IS NOT NULL THEN 1 END) AS daipi, " + "COUNT(CASE WHEN sr.score IS NULL AND sr.autoscore IS NOT NULL THEN 1 END) AS daipi, " +
"COUNT(CASE WHEN sr.submissionTime IS NOT NULL THEN 1 END) AS yijiao " + "COUNT(CASE WHEN sr.submissionTime IS NOT NULL and sr.problemId=p.id THEN 1 END) AS yijiao " +
"FROM Problem p " + "FROM Problem p " +
"INNER JOIN PostProblem pp ON p.id = pp.problemId " + "INNER JOIN PostProblem pp ON p.id = pp.problemId " +
"left join Classstudents cs" + "left join Classstudents cs" +

View File

@ -3,6 +3,7 @@ package com.example.aes.problem.dao.impl;
import com.example.aes.problem.dao.SubmitReportDaoI; import com.example.aes.problem.dao.SubmitReportDaoI;
import com.example.aes.problem.model.PMReviewMessage; import com.example.aes.problem.model.PMReviewMessage;
import com.example.aes.problem.model.PMStudentSubmit; import com.example.aes.problem.model.PMStudentSubmit;
import com.example.aes.problem.model.ScoringRubric;
import com.example.aes.problem.model.SubmitReport; import com.example.aes.problem.model.SubmitReport;
import com.example.aes.user.dao.impl.BaseDaoImpl; import com.example.aes.user.dao.impl.BaseDaoImpl;
import com.example.aes.user.model.Course; import com.example.aes.user.model.Course;
@ -33,9 +34,7 @@ String chineseName=
"left join PostProblem pp on cs" + "left join PostProblem pp on cs" +
".classId=pp.classId "+ ".classId=pp.classId "+
"left JOIN"+ "left JOIN"+
" SubmitReport sr ON " + " SubmitReport sr on (sr.problemId = pp.problemId and sr.studentId=u.id)"+
"sr" +
".studentId=u.id"+
" WHERE cs.classId=:classId " + " WHERE cs.classId=:classId " +
"and " + "and " +
"pp.problemId " + "pp.problemId " +
@ -63,13 +62,32 @@ String chineseName=
return query.getResultList(); return query.getResultList();
} }
@Override @Override
public int updateAddTime(LocalDateTime addTime,int problemId,int studentId){ public int updateAddTime(LocalDateTime addTime,int problemId,int studentId,int teacherId){
String hql= "UPDATE SubmitReport sr SET" + String hql ="from SubmitReport sr WHERE" +
" sr" +
".problemId ="+problemId+" AND " +
"sr" +
".studentId="+studentId;
List<SubmitReport> submitReports =
this.find(hql);
if(submitReports.size()==0){
SubmitReport submitReport=
new SubmitReport();
submitReport.setProblemId(problemId);
submitReport.setStudentId(studentId);
submitReport.setAdminuserId(teacherId);
submitReport.setSubmissionStatus(
"未领取");
this.save(submitReport);
}
String hql1= "UPDATE SubmitReport sr " +
"SET" +
" sr.addTime= :addTime " " sr.addTime= :addTime "
+ "WHERE sr.problemId = " + + "WHERE sr.problemId = " +
":problemId" + ":problemId" +
" AND sr.studentId= :studentId"; " AND sr.studentId= :studentId";
Query q = this.getCurrentSession().createQuery(hql); Query q =
this.getCurrentSession().createQuery(hql1);
q.setParameter("addTime",addTime); q.setParameter("addTime",addTime);
q.setParameter("problemId",problemId); q.setParameter("problemId",problemId);
q.setParameter("studentId",studentId); q.setParameter("studentId",studentId);
@ -136,9 +154,8 @@ String chineseName=
"left join PostProblem pp on cs" + "left join PostProblem pp on cs" +
".classId=pp.classId "+ ".classId=pp.classId "+
"left JOIN"+ "left JOIN"+
" SubmitReport sr ON " + " SubmitReport sr on (sr" +
"sr" + ".problemId = pp.problemId and sr.studentId=u.id)"+
".studentId=u.id"+
" WHERE cs.classId=:classId " + " WHERE cs.classId=:classId " +
"and " + "and " +
"pp.problemId " + "pp.problemId " +
@ -169,10 +186,6 @@ String chineseName=
public List<Object[]> findScoreList(PMStudentSubmit pmStudentSubmit){ public List<Object[]> findScoreList(PMStudentSubmit pmStudentSubmit){
int classId= pmStudentSubmit.getClassId(); int classId= pmStudentSubmit.getClassId();
int problemId= pmStudentSubmit.getProblemId(); int problemId= pmStudentSubmit.getProblemId();
// String studentNo=
// '%'+pmStudentSubmit.getStudentNo()+'%';
// String chineseName=
// '%'+pmStudentSubmit.getChineseName()+'%';
String hql="SELECT u.chineseName," + String hql="SELECT u.chineseName," +
"u.studentNo, sr" + "u.studentNo, sr" +
".submissionTime," + ".submissionTime," +
@ -186,9 +199,8 @@ String chineseName=
"left join PostProblem pp on cs" + "left join PostProblem pp on cs" +
".classId=pp.classId "+ ".classId=pp.classId "+
"left JOIN"+ "left JOIN"+
" SubmitReport sr ON " + " SubmitReport sr on (sr" +
"sr" + ".problemId = pp.problemId and sr.studentId=u.id)"+
".studentId=u.id"+
" WHERE cs.classId=:classId " + " WHERE cs.classId=:classId " +
"and " + "and " +
"pp.problemId " + "pp.problemId " +

View File

@ -316,8 +316,8 @@ public class ProblemServiceImpl implements ProblemServiceI {
} }
} }
@Override @Override
public int editSubmitReport(LocalDateTime addTime,int problemId,int studentId){ public int editSubmitReport(LocalDateTime addTime,int problemId,int studentId,int teacherId){
return studentSubmitDao.updateAddTime(addTime,problemId,studentId); return studentSubmitDao.updateAddTime(addTime,problemId,studentId,teacherId);
} }
@Override @Override

View File

@ -50,7 +50,7 @@ public interface ProblemServiceI {
public DataGrid findWeijiaoList(PMStudentSubmit pmStudentSubmit); public DataGrid findWeijiaoList(PMStudentSubmit pmStudentSubmit);
public DataGrid findYijiaoList(PMStudentSubmit pmStudentSubmit); public DataGrid findYijiaoList(PMStudentSubmit pmStudentSubmit);
public PMReviewMessage findProblemReview(PMReviewMessage pmReviewMessage); public PMReviewMessage findProblemReview(PMReviewMessage pmReviewMessage);
public int editSubmitReport(LocalDateTime addTime,int problemId,int studentId); public int editSubmitReport(LocalDateTime addTime,int problemId,int studentId,int teacherId);
public int editScoreAndComment(PMReviewMessage pmReviewMessage); public int editScoreAndComment(PMReviewMessage pmReviewMessage);
public int redoReport(PMReviewMessage pmReviewMessage); public int redoReport(PMReviewMessage pmReviewMessage);
public List<Float> findScoreList(PMStudentSubmit pmStudentSubmit); public List<Float> findScoreList(PMStudentSubmit pmStudentSubmit);

View File

@ -219,6 +219,17 @@ public class AdminusersController {
.findAllAssistant(pmadminusers); .findAllAssistant(pmadminusers);
return RespBean.ok("查看助教信息成功", dataGrid); return RespBean.ok("查看助教信息成功", dataGrid);
} }
@PostMapping("/updateTeacherNoPassword")
public RespBean updateTeacherNoPassword(@RequestBody PMAdminusers pmadminusers) {
boolean result = adminusersServiceI
.updateTeacherNoPasswordByaccount(pmadminusers);
if (result == true) {
return RespBean.ok("修改信息成功");
} else {
return RespBean.error("修改信息失败");
}
}
@PostMapping("/getAssistantById") @PostMapping("/getAssistantById")
public RespBean getAssistantById(@RequestBody PMAdminusers pmadminusers) // 查找助教的信息 public RespBean getAssistantById(@RequestBody PMAdminusers pmadminusers) // 查找助教的信息
{ {

View File

@ -113,7 +113,7 @@ public class CourseCotroller {
// 课程新名称 // 课程新名称
String name = pmCourse.getName(); String name = pmCourse.getName();
if(courseServiceI.findCourseByName(name)=="true"){ if(courseServiceI.findCourseByName(name)=="true"){
return RespBean.ok("课程名称重复"); return RespBean.error("课程名称重复");
} }
int num = int num =
courseServiceI.editCourse(pmCourse.getId(),pmCourse.getName()); courseServiceI.editCourse(pmCourse.getId(),pmCourse.getName());

View File

@ -117,6 +117,7 @@ public class AdminusersDaoImpl extends BaseDaoImpl<Adminusers> implements
p.setAccount(assistant.getAccount()); p.setAccount(assistant.getAccount());
p.setRole(assistant.getRole()); p.setRole(assistant.getRole());
p.setEmail(assistant.getEmail()); p.setEmail(assistant.getEmail());
p.setNo(assistant.getNo());
pmadminusersList.add(p); pmadminusersList.add(p);
} }
@ -136,6 +137,7 @@ public class AdminusersDaoImpl extends BaseDaoImpl<Adminusers> implements
p.setAccount(assistant.getAccount()); p.setAccount(assistant.getAccount());
p.setRole(assistant.getRole()); p.setRole(assistant.getRole());
p.setEmail(assistant.getEmail()); p.setEmail(assistant.getEmail());
p.setNo(assistant.getNo());
pmadminusersList.add(p); pmadminusersList.add(p);
} }

View File

@ -87,7 +87,7 @@ public class AssistantClassImpl extends BaseDaoImpl<AssistantClass> implements
@Override @Override
public boolean delAssistantClass(int id) { public boolean delAssistantClass(int id) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
String hql = "delete from AssistantClass where id=" + id; String hql = "delete from AssistantClass where classId=" + id;
int result = this.executeHql(hql); int result = this.executeHql(hql);
if (result > 0) if (result > 0)
return true; return true;

View File

@ -17,6 +17,7 @@ public interface AdminusersServiceI {
public boolean addTeacher(PMAdminusers pmadminusers);// 注册教师 public boolean addTeacher(PMAdminusers pmadminusers);// 注册教师
public boolean updatePasswordByAccount(PMAdminusers pmadminusers); public boolean updatePasswordByAccount(PMAdminusers pmadminusers);
public DataGrid findAllAssistant(PMAdminusers pmadminusers); // 查看所有助教信息 public DataGrid findAllAssistant(PMAdminusers pmadminusers); // 查看所有助教信息
public boolean updateTeacherNoPasswordByaccount(PMAdminusers pmadminusers);
public PMAdminusers getAdminuserById(int id); // 根据id获取单个老师的信息 public PMAdminusers getAdminuserById(int id); // 根据id获取单个老师的信息
public boolean editAssistant(PMAdminusers pmadminusers); // 修改助教 public boolean editAssistant(PMAdminusers pmadminusers); // 修改助教
public boolean editPassword(PMAdminusers pmadminusers); // 修改密码 public boolean editPassword(PMAdminusers pmadminusers); // 修改密码

View File

@ -134,6 +134,20 @@ public class AdminusersServiceImpl implements AdminusersServiceI {
else else
return false; return false;
} }
@Override
public boolean updateTeacherNoPasswordByaccount(PMAdminusers pmadminusers) {
String hql = "update Adminusers set email='" + pmadminusers.getEmail()
+ "',question='" + pmadminusers.getQuestion() + "' , "
+ " answer = '" + pmadminusers.getAnswer() + "' , "
+ " no = '" + pmadminusers.getNo()
+ "' where account='" + pmadminusers.getAccount() + "'";
int result = adminusersDao.executeHql(hql);
if (result == 1)
return true;
else
return false;
}
@Override @Override
public DataGrid findAllAssistant(PMAdminusers pmadminusers) { public DataGrid findAllAssistant(PMAdminusers pmadminusers) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@ -1,5 +1,6 @@
package com.example.aes.user.service.impl; package com.example.aes.user.service.impl;
import com.example.aes.user.dao.AssistantClassDaoI;
import com.example.aes.user.dao.ClassesDaoI; import com.example.aes.user.dao.ClassesDaoI;
import com.example.aes.user.dao.ClassstudentsDaoI; import com.example.aes.user.dao.ClassstudentsDaoI;
import com.example.aes.user.model.*; import com.example.aes.user.model.*;
@ -18,6 +19,13 @@ public class ClassesServiceImpl implements ClassesServiceI {
private ClassesDaoI classesDao; private ClassesDaoI classesDao;
private ClassstudentsDaoI classstudentsDao; private ClassstudentsDaoI classstudentsDao;
private AssistantClassDaoI assistantClassDao;
@Autowired
public void setAssistantClassDao(AssistantClassDaoI assistantClassDao) {
this.assistantClassDao = assistantClassDao;
}
// private AttendenceDaoI attendenceDao; // private AttendenceDaoI attendenceDao;
// private StudentAttendenceDaoI studentattendenceDao; // private StudentAttendenceDaoI studentattendenceDao;
// private ExamClassesDaoI examClassesDao; // private ExamClassesDaoI examClassesDao;
@ -119,6 +127,7 @@ public void setclassstudentsDao(ClassstudentsDaoI classstudentsDao) {
for(Classstudents cs : csList) for(Classstudents cs : csList)
classstudentsDao.delete(cs); classstudentsDao.delete(cs);
} }
assistantClassDao.delAssistantClass(id);
return classesDao.deleteClass(id); return classesDao.deleteClass(id);
} }

View File

@ -42,12 +42,12 @@ public class LoginServiceImpl implements LoginService {
// 判断用户密码与数据库密码是否一致 // 判断用户密码与数据库密码是否一致
if(sql_account.getPwd().equals(account.getPassword())) if(sql_account.getPwd().equals(account.getPassword()))
{ {
if(sql_account.getRole().equals("teacher") && sql_account.getStatus().equals("待审核")){ // if(sql_account.getRole().equals("teacher") && sql_account.getStatus().equals("待审核")){
return RespBean.error("等待管理员审核,请耐心等候"); // return RespBean.error("等待管理员审核,请耐心等候");
} else if (sql_account.getRole().equals("teacher") && sql_account.getStatus().equals("拒绝")) { // } else if (sql_account.getRole().equals("teacher") && sql_account.getStatus().equals("拒绝")) {
return RespBean.error("您的账号已被拒绝,请联系管理员"); // return RespBean.error("您的账号已被拒绝,请联系管理员");
} // }
else { // else {
// 生成token // 生成token
String token = TokenUtil.genToken(sql_account.getID().toString(),sql_account.getRole(),sql_account.getCode()); String token = TokenUtil.genToken(sql_account.getID().toString(),sql_account.getRole(),sql_account.getCode());
// 生成响应对象 // 生成响应对象
@ -56,7 +56,7 @@ public class LoginServiceImpl implements LoginService {
map.put("role",sql_account.getRole()); map.put("role",sql_account.getRole());
map.put("name",sql_account.getName()); map.put("name",sql_account.getName());
return RespBean.ok("登陆成功!",map); return RespBean.ok("登陆成功!",map);
} // }
} }
else else
return RespBean.error("密码错误"); return RespBean.error("密码错误");

View File

@ -0,0 +1,104 @@
二维数组升序排序
Arrays.sort(intervals, new Comparator<int[]>() {
public int compare(int[] interval1, int[] interval2) {
return interval1[0] - interval2[0];
}
});
链表转数组
List<int[]> merged = new ArrayList<int[]>();
return merged.toArray(new int[merged.size()][]);
hash.put(c,hash.getOrDefault(c,1)+1); //若没有就是1,若有就是原有值增一。
public class LRUCache {
//双向链表
class DLinkedNode {
int key;
int value;
DLinkedNode prev;
DLinkedNode next;
public DLinkedNode() {}
public DLinkedNode(int _key, int _value) {key = _key; value = _value;}
}
private Map<Integer, DLinkedNode> cache = new HashMap<Integer, DLinkedNode>();
private int size;
private int capacity;
private DLinkedNode head, tail;
public LRUCache(int capacity) {
this.size = 0;
this.capacity = capacity;
// 使用伪头部和伪尾部节点
head = new DLinkedNode();
tail = new DLinkedNode();
head.next = tail;
tail.prev = head;
}
public int get(int key) {
DLinkedNode node = cache.get(key);
if (node == null) {
return -1;
}
// 如果 key 存在,先通过哈希表定位,再移到头部
moveToHead(node);
return node.value;
}
public void put(int key, int value) {
DLinkedNode node = cache.get(key);
if (node == null) {
// 如果 key 不存在,创建一个新的节点
DLinkedNode newNode = new DLinkedNode(key, value);
// 添加进哈希表
cache.put(key, newNode);
// 添加至双向链表的头部
addToHead(newNode);
++size;
if (size > capacity) {
// 如果超出容量,删除双向链表的尾部节点
DLinkedNode tail = removeTail();
// 删除哈希表中对应的项
cache.remove(tail.key);
--size;
}
}
else {
// 如果 key 存在,先通过哈希表定位,再修改 value,并移到头部
node.value = value;
moveToHead(node);
}
}
private void addToHead(DLinkedNode node) {
node.prev = head;
node.next = head.next;
head.next.prev = node;
head.next = node;
}
private void removeNode(DLinkedNode node) {
node.prev.next = node.next;
node.next.prev = node.prev;
}
private void moveToHead(DLinkedNode node) {
removeNode(node);
addToHead(node);
}
private DLinkedNode removeTail() {
DLinkedNode res = tail.prev;
removeNode(res);
return res;
}
}

View File

@ -0,0 +1 @@
ѧ<EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><>Ȼ<EFBFBD>༶
1 ѧ�� ���� ��Ȼ�༶