zhangjie 3 dienas atpakaļ
vecāks
revīzija
d74133295f

+ 9 - 0
src/router/routes/modules/base.ts

@@ -54,6 +54,15 @@ const BASE: AppRouteRecordRaw = {
         requiresAuth: true,
       },
     },
+    {
+      path: '/subject/optional-rule-edit/:subjectId',
+      name: 'OptionalRuleEdit',
+      component: () => import('@/views/subject/OptionalRuleEdit.vue'),
+      meta: {
+        title: '选择题设置',
+        requiresAuth: true,
+      },
+    },
     {
       path: '/exam-manage',
       name: 'ExamManage',

+ 5 - 2
src/views/subject/SubjectManage.vue

@@ -356,9 +356,12 @@
       setLoading(false);
     }
   };
-
+  // 选做题设置
   const onSetOptional = (row: SubjectItem) => {
-    currentSubject.value = row;
+    router.push({
+      name: 'OptionalRuleEdit',
+      params: { subjectId: row.id },
+    });
   };
 
   // 导出