Browse Source

feat: 轨迹修改

zhangjie 2 months ago
parent
commit
0e216e44d0

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "teachcloud-mark-tool",
   "description": "teachcloud mark tool",
-  "version": "1.0.4",
+  "version": "1.0.5",
   "main": "./out/main/index.js",
   "author": "chulinice",
   "license": "MIT",

+ 1 - 0
src/api/types/task.ts

@@ -103,6 +103,7 @@ export interface Question {
   /** 题目名称 */
   title: string;
   /** 得分;null的值时是为打回时可以被评卷修改的;null也是从未评分过的情况,要通过rejected来判断 */
+  markerScore: number | null;
   score: number | null;
   /** 限制最小分数 */
   minScore: number;

+ 3 - 2
src/store/modules/user/index.ts

@@ -1,6 +1,7 @@
 import { defineStore } from 'pinia';
 import { removeRouteListener } from '@/utils/route-listener';
 import { userLogout } from '@/api/user';
+import { DEVICE_ID, PLATFORM } from '@/constants/app';
 import { UserState } from './types';
 
 const useUserStore = defineStore('user', {
@@ -28,8 +29,8 @@ const useUserStore = defineStore('user', {
     version: '',
     privilegeId: '',
     uiSetting: null,
-    deviceId: '',
-    platform: '',
+    deviceId: DEVICE_ID,
+    platform: PLATFORM,
   }),
 
   getters: {

+ 1 - 1
src/views/base/track-export/useDraw.ts

@@ -820,7 +820,7 @@ export default function useDraw(drawConfig: DrawConfig) {
           },
         });
       });
-      const tCont = `得分:${question.score},满分:${question.maxScore}`;
+      const tCont = `得分:${question.markerScore},满分:${question.maxScore}`;
       const tContLen = strGbLen(tCont) / 2;
       dataArr.push({
         type: 'text',

+ 2 - 3
src/views/login/login/index.vue

@@ -71,7 +71,6 @@
   import type { LoginData } from '@/api/types/user';
   import { FormRules, OptionListItem } from '@/types/global';
   import { objAssign } from '@/utils/utils';
-  import { DEVICE_ID, PLATFORM } from '@/constants/app';
 
   defineOptions({
     name: 'Login',
@@ -147,7 +146,7 @@
       data.curSchoolInfo = curSchool || ({} as UserSchoolInfoType);
     }
 
-    userStore.setInfo({ ...data, deviceId: DEVICE_ID, platform: PLATFORM });
+    userStore.setInfo({ ...data });
 
     const menuRes = await sysMenu();
     const validMenu = menuRes.privileges.find(
@@ -159,7 +158,7 @@
       return;
     }
     data.privilegeId = validMenu.id;
-    userStore.setInfo({ ...data, deviceId: DEVICE_ID, platform: PLATFORM });
+    userStore.setInfo({ ...data });
 
     router.push({
       name: 'TrackExport',