diff --git a/dataDeal/data.xlsx b/dataDeal/data.xlsx index 7fc0990..73ab31d 100644 Binary files a/dataDeal/data.xlsx and b/dataDeal/data.xlsx differ diff --git a/dataDeal/导入导出模版.xlsx b/dataDeal/导入导出模版.xlsx new file mode 100644 index 0000000..03a4812 Binary files /dev/null and b/dataDeal/导入导出模版.xlsx differ diff --git a/front/src/renderer/src/assets/js/db.js b/front/src/renderer/src/assets/js/db.js index 11c9d74..3bac7ae 100644 --- a/front/src/renderer/src/assets/js/db.js +++ b/front/src/renderer/src/assets/js/db.js @@ -4,6 +4,6 @@ export const myDatabase = new Dexie('myDatabase'); // 定义数据库版本 myDatabase.version(1).stores({ - student: '++id, nianjicode, banjicode, nianji, banji, xuejihao, minzudaima, minzu, name, gender, birth, address, height, weight, BMI, BMIscore, lungs, lungsccore, fifty, fiftyscore, sitforward, sitforwardscore, jump, jumpscore, situp, situpscore, fiftyeight, fiftyeightscore, stand, standscore, eighty, eightyscore, thousand ,thousandscore, pullup, pullupscore, totalscore, level, note1, nodt2, create_at, update_at', + student: '++id, nianjicode, banjicode, nianji, banji, &xuejihao, minzudaima, minzu, name, gender, birth, address, height, weight, BMI, BMIscore, lungs, lungsccore, fifty, fiftyscore, sitforward, sitforwardscore, jump, jumpscore, situp, situpscore, fiftyeight, fiftyeightscore, stand, standscore, eighty, eightyscore, thousand ,thousandscore, pullup, pullupscore, totalscore, level, note1, nodt2, create_at, update_at', jihuoshijian: '++id, jihuoma, isVip, zhucema, create_at, update_at' }); \ No newline at end of file diff --git a/front/src/renderer/src/assets/json/jifen.json b/front/src/renderer/src/assets/json/jifen.json index e73e908..5ca6fa5 100644 --- a/front/src/renderer/src/assets/json/jifen.json +++ b/front/src/renderer/src/assets/json/jifen.json @@ -55,19 +55,19 @@ "gender": 1 }, { - "11": "Infinity", - "12": "Infinity", - "13": "Infinity", - "14": "Infinity", - "15": "Infinity", - "16": "Infinity", - "21": "Infinity", - "22": "Infinity", - "23": "Infinity", - "31": "Infinity", - "32": "Infinity", - "33": "Infinity", - "41": "Infinity", + "11": 999999, + "12": 999999, + "13": 999999, + "14": 999999, + "15": 999999, + "16": 999999, + "21": 999999, + "22": 999999, + "23": 999999, + "31": 999999, + "32": 999999, + "33": 999999, + "41": 999999, "score": 60, "gender": 1 }, @@ -123,19 +123,19 @@ "gender": 2 }, { - "11": "Infinity", - "12": "Infinity", - "13": "Infinity", - "14": "Infinity", - "15": "Infinity", - "16": "Infinity", - "21": "Infinity", - "22": "Infinity", - "23": "Infinity", - "31": "Infinity", - "32": "Infinity", - "33": "Infinity", - "41": "Infinity", + "11": 999999, + "12": 999999, + "13": 999999, + "14": 999999, + "15": 999999, + "16": 999999, + "21": 999999, + "22": 999999, + "23": 999999, + "31": 999999, + "32": 999999, + "33": 999999, + "41": 999999, "score": 60, "gender": 2 } @@ -1268,20 +1268,20 @@ "gender": 1 }, { - "11": "Infinity", - "12": "Infinity", - "13": "Infinity", - "14": "Infinity", - "15": "Infinity", - "16": "Infinity", - "21": "Infinity", - "22": "Infinity", - "23": "Infinity", - "31": "Infinity", - "32": "Infinity", - "33": "Infinity", - "41": "Infinity", - "42": "Infinity", + "11": 999999, + "12": 999999, + "13": 999999, + "14": 999999, + "15": 999999, + "16": 999999, + "21": 999999, + "22": 999999, + "23": 999999, + "31": 999999, + "32": 999999, + "33": 999999, + "41": 999999, + "42": 999999, "score": 0, "gender": 1 }, @@ -1646,20 +1646,20 @@ "gender": 2 }, { - "11": "Infinity", - "12": "Infinity", - "13": "Infinity", - "14": "Infinity", - "15": "Infinity", - "16": "Infinity", - "21": "Infinity", - "22": "Infinity", - "23": "Infinity", - "31": "Infinity", - "32": "Infinity", - "33": "Infinity", - "41": "Infinity", - "42": "Infinity", + "11": 999999, + "12": 999999, + "13": 999999, + "14": 999999, + "15": 999999, + "16": 999999, + "21": 999999, + "22": 999999, + "23": 999999, + "31": 999999, + "32": 999999, + "33": 999999, + "41": 999999, + "42": 999999, "score": 0, "gender": 2 } @@ -2030,20 +2030,20 @@ "gender": 1 }, { - "11": "Infinity", - "12": "-Infinity", - "13": "-Infinity", - "14": "-Infinity", - "15": "-Infinity", - "16": "-Infinity", - "21": "-Infinity", - "22": "-Infinity", - "23": "-Infinity", - "31": "-Infinity", - "32": "-Infinity", - "33": "-Infinity", - "41": "-Infinity", - "42": "-Infinity", + "11": -100000, + "12": -100000, + "13": -100000, + "14": -100000, + "15": -100000, + "16": -100000, + "21": -100000, + "22": -100000, + "23": -100000, + "31": -100000, + "32": -100000, + "33": -100000, + "41": -100000, + "42": -100000, "score": 0, "gender": "1" }, @@ -2408,20 +2408,20 @@ "gender": 2 }, { - "11": "-Infinity", - "12": "-Infinity", - "13": "-Infinity", - "14": "-Infinity", - "15": "-Infinity", - "16": "-Infinity", - "21": "-Infinity", - "22": "-Infinity", - "23": "-Infinity", - "31": "-Infinity", - "32": "-Infinity", - "33": "-Infinity", - "41": "-Infinity", - "42": "-Infinity", + "11": -100000, + "12": -100000, + "13": -100000, + "14": -100000, + "15": -100000, + "16": -100000, + "21": -100000, + "22": -100000, + "23": -100000, + "31": -100000, + "32": -100000, + "33": -100000, + "41": -100000, + "42": -100000, "score": 0, "gender": "2" } @@ -2438,7 +2438,8 @@ "14": 177, "15": 188, "16": 197, - "score": 120, + "score": 100, + "add_score": 20, "gender": 1 }, { @@ -2448,7 +2449,8 @@ "14": 175, "15": 186, "16": 195, - "score": 119, + "score": 100, + "add_score": 19, "gender": 1 }, { @@ -2458,7 +2460,8 @@ "14": 173, "15": 184, "16": 193, - "score": 118, + "score": 100, + "add_score": 18, "gender": 1 }, { @@ -2468,7 +2471,8 @@ "14": 171, "15": 182, "16": 191, - "score": 117, + "score": 100, + "add_score": 17, "gender": 1 }, { @@ -2478,7 +2482,8 @@ "14": 169, "15": 180, "16": 189, - "score": 116, + "score": 100, + "add_score": 16, "gender": 1 }, { @@ -2488,7 +2493,8 @@ "14": 167, "15": 178, "16": 187, - "score": 115, + "score": 100, + "add_score": 15, "gender": 1 }, { @@ -2498,7 +2504,8 @@ "14": 165, "15": 176, "16": 185, - "score": 114, + "score": 100, + "add_score": 14, "gender": 1 }, { @@ -2508,7 +2515,8 @@ "14": 163, "15": 174, "16": 183, - "score": 113, + "score": 100, + "add_score": 13, "gender": 1 }, { @@ -2518,7 +2526,8 @@ "14": 161, "15": 172, "16": 181, - "score": 112, + "score": 100, + "add_score": 12, "gender": 1 }, { @@ -2528,7 +2537,8 @@ "14": 159, "15": 170, "16": 179, - "score": 111, + "score": 100, + "add_score": 11, "gender": 1 }, { @@ -2538,7 +2548,8 @@ "14": 157, "15": 168, "16": 177, - "score": 110, + "score": 100, + "add_score": 10, "gender": 1 }, { @@ -2548,7 +2559,8 @@ "14": 155, "15": 166, "16": 175, - "score": 109, + "score": 100, + "add_score": 9, "gender": 1 }, { @@ -2558,7 +2570,8 @@ "14": 153, "15": 164, "16": 173, - "score": 108, + "score": 100, + "add_score": 8, "gender": 1 }, { @@ -2568,7 +2581,8 @@ "14": 151, "15": 162, "16": 171, - "score": 107, + "score": 100, + "add_score": 7, "gender": 1 }, { @@ -2578,7 +2592,8 @@ "14": 149, "15": 160, "16": 169, - "score": 106, + "score": 100, + "add_score": 6, "gender": 1 }, { @@ -2588,7 +2603,8 @@ "14": 147, "15": 158, "16": 167, - "score": 105, + "score": 100, + "add_score": 5, "gender": 1 }, { @@ -2598,7 +2614,8 @@ "14": 145, "15": 156, "16": 165, - "score": 104, + "score": 100, + "add_score": 4, "gender": 1 }, { @@ -2608,7 +2625,8 @@ "14": 143, "15": 154, "16": 163, - "score": 103, + "score": 100, + "add_score": 3, "gender": 1 }, { @@ -2618,7 +2636,8 @@ "14": 141, "15": 152, "16": 161, - "score": 102, + "score": 100, + "add_score": 2, "gender": 1 }, { @@ -2628,7 +2647,8 @@ "14": 139, "15": 150, "16": 159, - "score": 101, + "score": 100, + "add_score": 1, "gender": 1 }, { @@ -2848,7 +2868,8 @@ "14": 189, "15": 198, "16": 206, - "score": 120, + "score": 100, + "add_score": 20, "gender": 2 }, { @@ -2858,7 +2879,8 @@ "14": 187, "15": 196, "16": 204, - "score": 119, + "score": 100, + "add_score": 19, "gender": 2 }, { @@ -2868,7 +2890,8 @@ "14": 185, "15": 194, "16": 202, - "score": 118, + "score": 100, + "add_score": 18, "gender": 2 }, { @@ -2878,7 +2901,8 @@ "14": 183, "15": 192, "16": 200, - "score": 117, + "score": 100, + "add_score": 17, "gender": 2 }, { @@ -2888,7 +2912,8 @@ "14": 181, "15": 190, "16": 198, - "score": 116, + "score": 100, + "add_score": 16, "gender": 2 }, { @@ -2898,7 +2923,8 @@ "14": 179, "15": 188, "16": 196, - "score": 115, + "score": 100, + "add_score": 15, "gender": 2 }, { @@ -2908,7 +2934,8 @@ "14": 177, "15": 186, "16": 194, - "score": 114, + "score": 100, + "add_score": 14, "gender": 2 }, { @@ -2918,7 +2945,8 @@ "14": 175, "15": 184, "16": 192, - "score": 113, + "score": 100, + "add_score": 13, "gender": 2 }, { @@ -2928,7 +2956,8 @@ "14": 173, "15": 182, "16": 190, - "score": 112, + "score": 100, + "add_score": 12, "gender": 2 }, { @@ -2938,7 +2967,8 @@ "14": 171, "15": 180, "16": 188, - "score": 111, + "score": 100, + "add_score": 11, "gender": 2 }, { @@ -2948,7 +2978,8 @@ "14": 169, "15": 178, "16": 186, - "score": 110, + "score": 100, + "add_score": 10, "gender": 2 }, { @@ -2958,7 +2989,8 @@ "14": 167, "15": 176, "16": 184, - "score": 109, + "score": 100, + "add_score": 9, "gender": 2 }, { @@ -2968,7 +3000,8 @@ "14": 165, "15": 174, "16": 182, - "score": 108, + "score": 100, + "add_score": 8, "gender": 2 }, { @@ -2978,7 +3011,8 @@ "14": 163, "15": 172, "16": 180, - "score": 107, + "score": 100, + "add_score": 7, "gender": 2 }, { @@ -2988,7 +3022,8 @@ "14": 161, "15": 170, "16": 178, - "score": 106, + "score": 100, + "add_score": 6, "gender": 2 }, { @@ -2998,7 +3033,8 @@ "14": 159, "15": 168, "16": 176, - "score": 105, + "score": 100, + "add_score": 5, "gender": 2 }, { @@ -3008,7 +3044,8 @@ "14": 157, "15": 166, "16": 174, - "score": 104, + "score": 100, + "add_score": 4, "gender": 2 }, { @@ -3018,7 +3055,8 @@ "14": 155, "15": 164, "16": 172, - "score": 103, + "score": 100, + "add_score": 3, "gender": 2 }, { @@ -3028,7 +3066,8 @@ "14": 153, "15": 162, "16": 170, - "score": 102, + "score": 100, + "add_score": 2, "gender": 2 }, { @@ -3038,7 +3077,8 @@ "14": 151, "15": 160, "16": 168, - "score": 101, + "score": 100, + "add_score": 1, "gender": 2 }, { @@ -3772,14 +3812,6 @@ "14": 49, "15": 50, "16": 51, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 100, "gender": 1 }, @@ -3788,14 +3820,6 @@ "14": 46, "15": 47, "16": 48, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 95, "gender": 1 }, @@ -3804,14 +3828,6 @@ "14": 43, "15": 44, "16": 45, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 90, "gender": 1 }, @@ -3820,14 +3836,6 @@ "14": 40, "15": 41, "16": 42, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 85, "gender": 1 }, @@ -3836,14 +3844,6 @@ "14": 37, "15": 38, "16": 39, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 80, "gender": 1 }, @@ -3852,14 +3852,6 @@ "14": 35, "15": 36, "16": 37, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 78, "gender": 1 }, @@ -3868,14 +3860,6 @@ "14": 33, "15": 34, "16": 35, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 76, "gender": 1 }, @@ -3884,14 +3868,6 @@ "14": 31, "15": 32, "16": 33, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 74, "gender": 1 }, @@ -3900,14 +3876,6 @@ "14": 29, "15": 30, "16": 31, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 72, "gender": 1 }, @@ -3916,14 +3884,6 @@ "14": 27, "15": 28, "16": 29, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 70, "gender": 1 }, @@ -3932,14 +3892,6 @@ "14": 25, "15": 26, "16": 27, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 68, "gender": 1 }, @@ -3948,14 +3900,6 @@ "14": 23, "15": 24, "16": 25, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 66, "gender": 1 }, @@ -3964,14 +3908,6 @@ "14": 21, "15": 22, "16": 23, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 64, "gender": 1 }, @@ -3980,14 +3916,6 @@ "14": 19, "15": 20, "16": 21, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 62, "gender": 1 }, @@ -3996,14 +3924,6 @@ "14": 17, "15": 18, "16": 19, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 60, "gender": 1 }, @@ -4012,14 +3932,6 @@ "14": 15, "15": 16, "16": 17, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 50, "gender": 1 }, @@ -4028,14 +3940,6 @@ "14": 13, "15": 14, "16": 15, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 40, "gender": 1 }, @@ -4044,14 +3948,6 @@ "14": 11, "15": 12, "16": 13, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 30, "gender": 1 }, @@ -4060,14 +3956,6 @@ "14": 9, "15": 10, "16": 11, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 20, "gender": 1 }, @@ -4076,14 +3964,6 @@ "14": 7, "15": 8, "16": 9, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 10, "gender": 1 }, @@ -4092,22 +3972,10 @@ "14": 0, "15": 0, "16": 0, - "21": "无", - "22": "无", - "23": "无", - "31": "无", - "32": "无", - "33": "无", - "41": "无", - "42": "无", "score": 0, "gender": 1 }, { - "13": "无", - "14": "无", - "15": "无", - "16": "无", "21": 63, "22": 64, "23": 65, @@ -4116,14 +3984,11 @@ "33": 68, "41": 69, "42": 70, - "score": 110, + "score": 100, + "add_score": 10, "gender": 2 }, { - "13": "无", - "14": "无", - "15": "无", - "16": "无", "21": 62, "22": 63, "23": 64, @@ -4132,14 +3997,11 @@ "33": 67, "41": 68, "42": 69, - "score": 109, + "score": 100, + "add_score": 9, "gender": 2 }, { - "13": "无", - "14": "无", - "15": "无", - "16": "无", "21": 61, "22": 62, "23": 63, @@ -4148,14 +4010,11 @@ "33": 66, "41": 67, "42": 68, - "score": 108, + "score": 100, + "add_score": 8, "gender": 2 }, { - "13": "无", - "14": "无", - "15": "无", - "16": "无", "21": 60, "22": 61, "23": 62, @@ -4164,14 +4023,11 @@ "33": 65, "41": 66, "42": 67, - "score": 107, + "score": 100, + "add_score": 7, "gender": 2 }, { - "13": "无", - "14": "无", - "15": "无", - "16": "无", "21": 59, "22": 60, "23": 61, @@ -4180,14 +4036,11 @@ "33": 64, "41": 65, "42": 66, - "score": 106, + "score": 100, + "add_score": 6, "gender": 2 }, { - "13": "无", - "14": "无", - "15": "无", - "16": "无", "21": 58, "22": 59, "23": 60, @@ -4196,14 +4049,11 @@ "33": 63, "41": 64, "42": 65, - "score": 105, + "score": 100, + "add_score": 5, "gender": 2 }, { - "13": "无", - "14": "无", - "15": "无", - "16": "无", "21": 57, "22": 58, "23": 59, @@ -4212,14 +4062,11 @@ "33": 62, "41": 63, "42": 64, - "score": 104, + "score": 100, + "add_score": 4, "gender": 2 }, { - "13": "无", - "14": "无", - "15": "无", - "16": "无", "21": 56, "22": 57, "23": 58, @@ -4228,14 +4075,11 @@ "33": 61, "41": 62, "42": 63, - "score": 103, + "score": 100, + "add_score": 3, "gender": 2 }, { - "13": "无", - "14": "无", - "15": "无", - "16": "无", "21": 55, "22": 56, "23": 57, @@ -4244,14 +4088,11 @@ "33": 60, "41": 61, "42": 62, - "score": 102, + "score": 100, + "add_score": 2, "gender": 2 }, { - "13": "无", - "14": "无", - "15": "无", - "16": "无", "21": 54, "22": 55, "23": 56, @@ -4260,7 +4101,8 @@ "33": 59, "41": 60, "42": 61, - "score": 101, + "score": 100, + "add_score": 1, "gender": 2 }, { @@ -4886,16 +4728,16 @@ "gender": 1 }, { - "15": "Infinity", - "16": "Infinity", - "21": "Infinity", - "22": "Infinity", - "23": "Infinity", - "31": "Infinity", - "32": "Infinity", - "33": "Infinity", - "41": "Infinity", - "42": "Infinity", + "15": 999999, + "16": 999999, + "21": 999999, + "22": 999999, + "23": 999999, + "31": 999999, + "32": 999999, + "33": 999999, + "41": 999999, + "42": 999999, "score": 0, "gender": 1 }, @@ -5180,16 +5022,16 @@ "gender": 2 }, { - "15": "Infinity", - "16": "Infinity", - "21": "Infinity", - "22": "Infinity", - "23": "Infinity", - "31": "Infinity", - "32": "Infinity", - "33": "Infinity", - "41": "Infinity", - "42": "Infinity", + "15": 999999, + "16": 999999, + "21": 999999, + "22": 999999, + "23": 999999, + "31": 999999, + "32": 999999, + "33": 999999, + "41": 999999, + "42": 999999, "score": 0, "gender": 2 } @@ -5208,7 +5050,8 @@ "33": "2'30\"", "41": "2'28\"", "42": "2'26\"", - "score": 110, + "score": 100, + "add_score": 10, "gender": 2 }, { @@ -5220,7 +5063,8 @@ "33": "2'35\"", "41": "2'33\"", "42": "2'31\"", - "score": 109, + "score": 100, + "add_score": 9, "gender": 2 }, { @@ -5232,7 +5076,8 @@ "33": "2'40\"", "41": "2'38\"", "42": "2'36\"", - "score": 108, + "score": 100, + "add_score": 8, "gender": 2 }, { @@ -5244,7 +5089,8 @@ "33": "2'45\"", "41": "2'43\"", "42": "2'41\"", - "score": 107, + "score": 100, + "add_score": 7, "gender": 2 }, { @@ -5256,7 +5102,8 @@ "33": "2'50\"", "41": "2'48\"", "42": "2'46\"", - "score": 106, + "score": 100, + "add_score": 6, "gender": 2 }, { @@ -5268,7 +5115,8 @@ "33": "2'55\"", "41": "2'53\"", "42": "2'51\"", - "score": 105, + "score": 100, + "add_score": 5, "gender": 2 }, { @@ -5280,7 +5128,8 @@ "33": "3'00\"", "41": "2'58\"", "42": "2'56\"", - "score": 104, + "score": 100, + "add_score": 4, "gender": 2 }, { @@ -5292,7 +5141,8 @@ "33": "3'05\"", "41": "3'03\"", "42": "2'61\"", - "score": 103, + "score": 100, + "add_score": 3, "gender": 2 }, { @@ -5304,7 +5154,8 @@ "33": "3'10\"", "41": "3'08\"", "42": "3'06\"", - "score": 102, + "score": 100, + "add_score": 2, "gender": 2 }, { @@ -5316,7 +5167,8 @@ "33": "3'15\"", "41": "3'13\"", "42": "3'11\"", - "score": 101, + "score": 100, + "add_score": 1, "gender": 2 }, { @@ -5560,14 +5412,14 @@ "gender": 2 }, { - "21": "Infinity", - "22": "Infinity", - "23": "Infinity", - "31": "Infinity", - "32": "Infinity", - "33": "Infinity", - "41": "Infinity", - "42": "Infinity", + "21": 999999, + "22": 999999, + "23": 999999, + "31": 999999, + "32": 999999, + "33": 999999, + "41": 999999, + "42": 999999, "score": 0, "gender": 2 } @@ -5586,7 +5438,8 @@ "33": "2‘45“", "41": "2’42”", "42": "2‘40“", - "score": 110, + "score": 100, + "add_score": 10, "gender": 1 }, { @@ -5598,7 +5451,8 @@ "33": "2’48”", "41": "2’45”", "42": "2’43”", - "score": 109, + "score": 100, + "add_score": 9, "gender": 1 }, { @@ -5610,7 +5464,8 @@ "33": "2‘51“", "41": "2‘48“", "42": "2‘46“", - "score": 108, + "score": 100, + "add_score": 8, "gender": 1 }, { @@ -5622,7 +5477,8 @@ "33": "2‘54“", "41": "2‘51“", "42": "2‘49“", - "score": 107, + "score": 100, + "add_score": 7, "gender": 1 }, { @@ -5634,7 +5490,8 @@ "33": "2’57”", "41": "2’54”", "42": "2’52”", - "score": 106, + "score": 100, + "add_score": 6, "gender": 1 }, { @@ -5646,7 +5503,8 @@ "33": "3‘00“", "41": "2‘57“", "42": "2‘55“", - "score": 105, + "score": 100, + "add_score": 5, "gender": 1 }, { @@ -5658,7 +5516,8 @@ "33": "3‘04“", "41": "3‘01“", "42": "2‘59“", - "score": 104, + "score": 100, + "add_score": 4, "gender": 1 }, { @@ -5670,7 +5529,8 @@ "33": "3‘08“", "41": "3‘05“", "42": "3‘03“", - "score": 103, + "score": 100, + "add_score": 3, "gender": 1 }, { @@ -5682,7 +5542,8 @@ "33": "3‘12“", "41": "3‘09“", "42": "3‘07“", - "score": 102, + "score": 100, + "add_score": 2, "gender": 1 }, { @@ -5694,7 +5555,8 @@ "33": "3‘16“", "41": "3‘13“", "42": "3‘11“", - "score": 101, + "score": 100, + "add_score": 1, "gender": 1 }, { @@ -5938,14 +5800,14 @@ "gender": 1 }, { - "21": "Infinity", - "22": "Infinity", - "23": "Infinity", - "31": "Infinity", - "32": "Infinity", - "33": "Infinity", - "41": "Infinity", - "42": "Infinity", + "21": 999999, + "22": 999999, + "23": 999999, + "31": 999999, + "32": 999999, + "33": 999999, + "41": 999999, + "42": 999999, "score": 0, "gender": 1 } @@ -5964,7 +5826,8 @@ "33": 28, "41": 29, "42": 30, - "score": 110, + "score": 100, + "add_score": 10, "gender": 1 }, { @@ -5976,7 +5839,8 @@ "33": 27, "41": 28, "42": 29, - "score": 109, + "score": 100, + "add_score": 9, "gender": 1 }, { @@ -5988,7 +5852,8 @@ "33": 26, "41": 27, "42": 28, - "score": 108, + "score": 100, + "add_score": 8, "gender": 1 }, { @@ -6000,7 +5865,8 @@ "33": 25, "41": 26, "42": 27, - "score": 107, + "score": 100, + "add_score": 7, "gender": 1 }, { @@ -6012,7 +5878,8 @@ "33": 24, "41": 25, "42": 26, - "score": 106, + "score": 100, + "add_score": 6, "gender": 1 }, { @@ -6024,7 +5891,8 @@ "33": 23, "41": 24, "42": 25, - "score": 105, + "score": 100, + "add_score": 5, "gender": 1 }, { @@ -6036,7 +5904,8 @@ "33": 22, "41": 23, "42": 24, - "score": 104, + "score": 100, + "add_score": 4, "gender": 1 }, { @@ -6048,7 +5917,8 @@ "33": 21, "41": 22, "42": 23, - "score": 103, + "score": 100, + "add_score": 3, "gender": 1 }, { @@ -6060,7 +5930,8 @@ "33": 20, "41": 21, "42": 22, - "score": 102, + "score": 100, + "add_score": 2, "gender": 1 }, { @@ -6072,7 +5943,8 @@ "33": 19, "41": 20, "42": 21, - "score": 101, + "score": 100, + "add_score": 1, "gender": 1 }, { diff --git a/front/src/renderer/src/assets/json/student.json b/front/src/renderer/src/assets/json/student.json index cf81c1d..ac7f785 100644 --- a/front/src/renderer/src/assets/json/student.json +++ b/front/src/renderer/src/assets/json/student.json @@ -6,16 +6,17 @@ "index": "0", "fixed": true, "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "班级编号", "prop": "banjicode", "type": "text", "index": "1", - "fixed": true, - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": false, + "export": true }, { "label": "年级", @@ -23,7 +24,8 @@ "type": "text", "index": "-1", "tableShow": false, - "formShow": false + "formShow": false, + "export": false }, { "label": "班级名称", @@ -32,32 +34,35 @@ "index": "2", "fixed": true, "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "学籍号", "prop": "xuejihao", "type": "text", "index": "3", - "fixed": true, - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": false, + "export": true }, { "label": "民族代码", "prop": "minzudaima", "type": "text", "index": "4", - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": false, + "export": true }, { "label": "民族", "prop": "minzu", "type": "text", "index": "-1", - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": false, + "export": false }, { "label": "姓名", @@ -66,7 +71,8 @@ "index": "5", "fixed": true, "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "性别", @@ -84,7 +90,8 @@ "type": "text", "index": "6", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "出生日期", @@ -92,16 +99,18 @@ "type": "date", "default": 10, "index": "7", - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": false, + "export": true }, { "label": "家庭住址", "prop": "address", "type": "text", "index": "8", - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": false, + "export": true }, { "label": "身高", @@ -109,7 +118,8 @@ "type": "number", "index": "9", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "体重", @@ -117,7 +127,8 @@ "type": "number", "index": "10", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "BMI", @@ -125,7 +136,8 @@ "type": "number", "index": "11", "tableShow": true, - "formShow": true + "formShow": true, + "export": false }, { "label": "BMI得分", @@ -133,7 +145,8 @@ "type": "number", "index": "12", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "肺活量", @@ -141,7 +154,8 @@ "type": "number", "index": "13", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "得分", @@ -149,15 +163,17 @@ "type": "number", "index": "14", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "50米跑", "prop": "fifty", - "type": "number", + "type": "text", "index": "15", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "得分", @@ -165,7 +181,8 @@ "type": "number", "index": "16", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "坐位体前屈", @@ -173,7 +190,8 @@ "type": "number", "index": "17", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "得分", @@ -181,7 +199,8 @@ "type": "number", "index": "18", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "一分钟跳绳", @@ -189,7 +208,8 @@ "type": "number", "index": "19", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "得分", @@ -197,7 +217,8 @@ "type": "number", "index": "20", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "一分钟仰卧起坐", @@ -205,7 +226,8 @@ "type": "number", "index": "21", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "得分", @@ -213,15 +235,17 @@ "type": "number", "index": "22", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "50米×8往返跑", "prop": "fiftyeight", - "type": "number", + "type": "text", "index": "23", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "得分", @@ -229,7 +253,8 @@ "type": "number", "index": "24", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "立定跳远", @@ -237,7 +262,8 @@ "type": "number", "index": "25", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "得分", @@ -245,15 +271,17 @@ "type": "number", "index": "26", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "800米跑", "prop": "eighty", - "type": "number", + "type": "text", "index": "27", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "得分", @@ -261,15 +289,17 @@ "type": "number", "index": "28", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "1000米跑", "prop": "thousand", - "type": "number", + "type": "text", "index": "29", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "得分", @@ -277,7 +307,8 @@ "type": "number", "index": "30", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "引体向上", @@ -285,7 +316,8 @@ "type": "number", "index": "31", "tableShow": true, - "formShow": true + "formShow": true, + "export": true }, { "label": "得分", @@ -293,7 +325,8 @@ "type": "number", "index": "32", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "总分", @@ -301,7 +334,8 @@ "type": "number", "index": "33", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "等级", @@ -309,7 +343,8 @@ "type": "text", "index": "34", "tableShow": true, - "formShow": false + "formShow": false, + "export": false }, { "label": "备注1", @@ -317,7 +352,8 @@ "type": "text", "index": "35", "tableShow": false, - "formShow": false + "formShow": false, + "export": false }, { "label": "备注2", @@ -325,7 +361,8 @@ "type": "text", "index": "36", "tableShow": false, - "formShow": false + "formShow": false, + "export": false }, { "label": "创建时间", @@ -333,7 +370,8 @@ "type": "date", "default": 0, "tableShow": false, - "formShow": false + "formShow": false, + "export": false }, { "label": "更新时间", @@ -341,6 +379,7 @@ "type": "date", "default": 0, "tableShow": false, - "formShow": false + "formShow": false, + "export": false } ] \ No newline at end of file diff --git a/front/src/renderer/src/views/student.vue b/front/src/renderer/src/views/student.vue index c85bbca..db56c15 100644 --- a/front/src/renderer/src/views/student.vue +++ b/front/src/renderer/src/views/student.vue @@ -79,6 +79,7 @@ import _ from 'lodash' import * as XLSX from 'xlsx'; import tableHeaderLocal from '../assets/json/student.json' +import jifen from '../assets/json/jifen.json' import { myDatabase } from '../assets/js/db.js' import dayjs from 'dayjs' import tablecomponent from "../components/tablecomponent.vue" @@ -93,11 +94,13 @@ export default { dayjs: dayjs, tableHeader: [], formHeader: [], + exportHeader: [], tableData: [], currentPage: 1, pageSize: 12, pageSizes: [12, 50, 100, 200], total: 0, + fileOriData: null, searchParams: { name: "" }, @@ -134,14 +137,168 @@ export default { let fileReader = new FileReader() fileReader.onload = async function () { let data = this.result - let workbook = that.$XLSX.read(data, { type: 'binary' }) + let workbook = XLSX.read(data, { type: 'binary' }) let sheetName = workbook.SheetNames[0] - let sheetData = that.$XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], { header: 1, defval: '' }) - let list = [] + let sheetData = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]) + for (let i = 0; i < sheetData.length; i++) { + let element = sheetData[i]; + let dealItem = {} + for (let key in element) { + let headerItem = _.find(tableHeaderLocal, o => o.label === key) + dealItem[headerItem.prop] = element[key] + } + try { + await myDatabase.student.add({ + ...dealItem, + ...that.dealRow(dealItem), + create_at: dayjs().format('YYYY-MM-DD HH:mm:ss'), + update_at: dayjs().format('YYYY-MM-DD HH:mm:ss') + }) + } catch (error) { + ElMessage({ + message: `${dealItem.name}(${dealItem.xuejihao})学籍号重复,不可再次新增该学生信息`, + type: 'error', + }) + } + await that.searchData() + } + } + fileReader.onerror = function (error) { + ElMessage({ + message: `Error reading file:, ${error}`, + type: 'error', + }) + } + fileReader.readAsArrayBuffer(file) + }, + // 处理每行的数据 + dealRow(row) { + row["addScore"] = 0 + row["BMI"] = Number(Number(row.weight / (row.height * row.height / 10000)).toFixed(2)) + // let nianjicodeList = ["11", "12","13","14", "15","16","21", "22","23","31", "32","33","41","42"] + let nianjicodeList = ["11", "12", "13", "14", "15", "16", "21", "22", "23"] + if (nianjicodeList.includes(`${row.nianjicode}`)) { + for (let key in jifen) { + let value = jifen[key] + let scoreItem = {} + for (let i = 0; i < value.list.length; i++) { + let item = value.list[i]; + let rowValue = this.transTime(row[value.prop]) + let itemValue = this.transTime(item[row.nianjicode]) + if (item.gender === row.gender && this.createComparator(value.fuhao)(rowValue, itemValue)) { + scoreItem = { ...item } + break + } + } + row[key] = scoreItem.score || "" + row["addScore"] = (Number(row["addScore"] || 0) || 0) + (Number(scoreItem.add_score || 0) || 0) + } + } + // todo处理总分 + + return row + }, + transTime(value) { + if (typeof (value) === "number") { + return value + } else if (typeof (value) === "string") { + let time = value.trim(); + let seconds = 0; + if (time.includes("'") && time.includes('"')) { + // 处理 2'20" 格式 + let parts = time.split(/['"]/).filter(Boolean); + let minutes = parseInt(parts[0], 10); + let secondsPart = parseInt(parts[1], 10); + seconds = minutes * 60 + secondsPart; + } else if (time.includes('.')) { + // 处理 2.20 格式 + let parts = time.split('.'); + let minutes = parseInt(parts[0], 10); + let secondsPart = parseFloat('.' + parts[1]) * 60; + seconds = minutes * 60 + secondsPart; + } else { + seconds = Number(time) + } + return seconds + } + }, + createComparator(operator) { + switch (operator) { + case '<=': + return (a, b) => a <= b; + case '>=': + return (a, b) => a >= b; + case '==': + return (a, b) => a == b; + case '!=': + return (a, b) => a != b; + case '<': + return (a, b) => a < b; + case '>': + return (a, b) => a > b; + default: + throw new Error('Invalid operator'); + } + }, + + //表格增加数据 + async successSubmit11(opts) { + let that = this + let file = opts.file + this.fileDealData = [] + let fileReader = new FileReader() + fileReader.onload = async function () { + let data = this.result + let dataObj = {} + let workbook = XLSX.read(data, { type: 'binary' }) + for (let i = 0; i < workbook.SheetNames.length; i++) { + let sheetName = workbook.SheetNames[i]; + let sheetData = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]) + let sheetDataList = [] + let noKey = ["prop", "fuhao"] + for (let i = 0; i < sheetData.length; i++) { + let element = sheetData[i]; + let item = {} + for (let key in element) { + if (element[key] === "-Infinity") { + element[key] = -100000 + } else if (element[key] === "Infinity") { + element[key] = 999999 + } + if (element[key] !== "无") { + if (noKey.indexOf(key) === -1) { + item[key] = element[key] + } + if (key === "score") { + if (element[key] > 100) { + item[key] = 100 + item[`add_${key}`] = element[key] - 100 + } + } + } + } + sheetDataList.push(item) + } + dataObj[sheetName] = { + prop: sheetData[0].prop, + fuhao: sheetData[0].fuhao, + list: sheetDataList + } + } + console.log(774444, dataObj) + // let sheetName = workbook.SheetNames[0] + // let sheetData = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], { header: 1, defval: '' }) + // console.log(11174444, sheetData) + + // let list = [] } + fileReader.onerror = function (error) { - console.error('Error reading file:', error) + ElMessage({ + message: `Error reading file:, ${error}`, + type: 'error', + }) } fileReader.readAsArrayBuffer(file) }, @@ -321,8 +478,6 @@ export default { }) }) }, - // 导入数据 - importStudent() { }, // 导出数据 async exportData() { let listCopy = _.cloneDeep(this.selectionData) @@ -355,15 +510,11 @@ export default { }) } }, - // 导入数据 - dealFormHeaderData() { - - - }, }, async mounted() { this.tableHeader = _.filter(tableHeaderLocal, o => o.tableShow) this.formHeader = _.filter(tableHeaderLocal, o => o.formShow) + this.exportHeader = _.filter(tableHeaderLocal, o => o.export) await this.updateSeach() },