bzkf3 2 lat temu
rodzic
commit
b4fdafab9f
4 zmienionych plików z 32 dodań i 2 usunięć
  1. 1 0
      components.d.ts
  2. 1 1
      src/components/TheCard.vue
  3. 1 0
      src/composables/steps.ts
  4. 29 1
      src/pages/index.vue

+ 1 - 0
components.d.ts

@@ -10,6 +10,7 @@ export {}
 declare module '@vue/runtime-core' {
   export interface GlobalComponents {
     ElButton: typeof import('element-plus/es')['ElButton']
+    ElLink: typeof import('element-plus/es')['ElLink']
     ElStep: typeof import('element-plus/es')['ElStep']
     ElSteps: typeof import('element-plus/es')['ElSteps']
     'I:healthiconsYes': typeof import('~icons/healthicons/yes')['default']

+ 1 - 1
src/components/TheCard.vue

@@ -19,7 +19,7 @@ defineExpose({
   >
     <div class="w-175px flex flex-col px-14px py-14px">
       <div>{{ title }}</div>
-      <div class="text-xs text-hex-6c6c6c">
+      <div class="mt-1 text-xs text-hex-6c6c6c">
         {{ description }}
       </div>
       <slot name="tip" />

+ 1 - 0
src/composables/steps.ts

@@ -20,6 +20,7 @@ export const stepsMap = reactive([
   [
     [0],
     [0],
+    [0],
   ],
 ])
 

+ 29 - 1
src/pages/index.vue

@@ -98,6 +98,12 @@ const steps = reactive(
               ],
             },
             {
+              title: '修改成绩',
+              children: [
+                { title: '修改成绩', optional: false, description: '考试成绩发布后三天内可修改' },
+              ],
+            },
+            {
               title: '考试关闭',
               children: [
                 { title: '考试关闭', optional: false, description: '最后考试结束关闭考试' },
@@ -178,6 +184,12 @@ const steps = reactive(
               ],
             },
             {
+              title: '修改成绩',
+              children: [
+                { title: '修改成绩', optional: false, description: '考试成绩发布后三天内可修改' },
+              ],
+            },
+            {
               title: '考试关闭',
               children: [
                 { title: '考试关闭', optional: false, description: '最后考试结束关闭考试' },
@@ -325,7 +337,7 @@ onBeforeRouteLeave(() => {
     <div class="h-full w-220px">
       <el-steps direction="vertical" :active="gid">
         <el-step
-          v-for="({ title, children }, idx) in steps" :key="title" class="cursor-pointer hover:bg-light-400"
+          v-for="({ title, children }, idx) in steps" :key="title" class="cursor-pointer hover:bg-light-600" :class="idx === currentStep && 'bg-light-400'"
           @click="handleSwitchGid(idx)"
         >
           <template #title>
@@ -381,6 +393,22 @@ onBeforeRouteLeave(() => {
                 </div>
               </template>
             </template>
+
+            <template #tip>
+              <template v-if="task.title === '成绩发布'">
+                <div class="mt-2 flex flex-col items-start px-1 text-xs space-y-1" style="--el-font-size-base:10px">
+                  <el-link type="primary">
+                    修改试题答案
+                  </el-link>
+                  <el-link type="primary">
+                    设置成绩查看权限
+                  </el-link>
+                  <el-link type="primary">
+                    标记缺考
+                  </el-link>
+                </div>
+              </template>
+            </template>
           </the-card>
         </div>
         <div />