Browse Source

fix: 只下轨迹图变成了原图

zhangjie 1 year ago
parent
commit
51a3a30963
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/views/base/track-export/useDraw.ts

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

@@ -7,7 +7,7 @@ import {
 } from '@/api/task';
 import { Task, Track, SpecialTag, Question } from '@/api/types/task';
 import { TrackConfigType } from '@/store/modules/app/types';
-import { PictureTypeEnum } from '@/constants/enumerate';
+import { PictureTypeEnum, PICTURE_TYPE } from '@/constants/enumerate';
 import { calcSum, maxNum, strGbLen } from '@/utils/utils';
 import { useAppStore } from '@/store';
 
@@ -185,7 +185,7 @@ export default function useDraw(winId: number) {
   function checkOnlyOrigin() {
     return (
       trackConfig.value.pictureType.length === 1 &&
-      trackConfig.value.pictureType[0] === 'track'
+      trackConfig.value.pictureType[0] === 'origin'
     );
   }
 
@@ -228,7 +228,7 @@ export default function useDraw(winId: number) {
       task.value.examName,
       `${rawTask.courseName}(${rawTask.courseCode})`,
       rawTask.paperNumber,
-      type,
+      PICTURE_TYPE[type],
       filename,
     ];
     return window.api.joinPath(paths);