刘洋 1 year ago
parent
commit
a1c6bd1f94

+ 6 - 3
src/hooks/useOptions.ts

@@ -2,6 +2,7 @@ import { reactive, computed, watch, ref, unref, isRef, nextTick } from 'vue'
 import useFetch from '@/hooks/useFetch'
 import useFetch from '@/hooks/useFetch'
 import useMainStore from '@/store/main'
 import useMainStore from '@/store/main'
 import { ExtractApiResponse } from '@/api/api'
 import { ExtractApiResponse } from '@/api/api'
+import { useRoute } from 'vue-router'
 import type { Ref } from 'vue'
 import type { Ref } from 'vue'
 
 
 export interface DataModel {
 export interface DataModel {
@@ -30,7 +31,9 @@ const useOptions = (
   showAllLabel = true
   showAllLabel = true
 ) => {
 ) => {
   const mainStore = useMainStore()
   const mainStore = useMainStore()
-
+  const route = useRoute()
+  const _subjectCode = (route.query?._subjectCode || '') as string
+  const _questionMainNumber = Number(route.query?._questionMainNumber || '')
   const userInfo = computed(() => {
   const userInfo = computed(() => {
     return mainStore?.myUserInfo
     return mainStore?.myUserInfo
   })
   })
@@ -247,7 +250,7 @@ const useOptions = (
         //如果是专家进来,则用户信息里的subjectCode是没值的,这种情况,给专家默认选择科目列表里的第一个科目
         //如果是专家进来,则用户信息里的subjectCode是没值的,这种情况,给专家默认选择科目列表里的第一个科目
         if (userInfo.value?.role === 'EXPERT' && !userInfo.value?.subjectCode) {
         if (userInfo.value?.role === 'EXPERT' && !userInfo.value?.subjectCode) {
           if (subjectList.value.length) {
           if (subjectList.value.length) {
-            changeModelValue('subject')(subjectList.value[0].value)
+            changeModelValue('subject')(_subjectCode || subjectList.value[0].value)
           }
           }
         }
         }
       },
       },
@@ -265,7 +268,7 @@ const useOptions = (
         ) {
         ) {
           if (mainQuestionList.value.length) {
           if (mainQuestionList.value.length) {
             const oldQuestionNumber = dataModel.question
             const oldQuestionNumber = dataModel.question
-            changeModelValue('question')(mainQuestionList.value[0].value)
+            changeModelValue('question')(_questionMainNumber || mainQuestionList.value[0].value)
             if (oldQuestionNumber == mainQuestionList.value[0].value) {
             if (oldQuestionNumber == mainQuestionList.value[0].value) {
               //防止切换科目前的大题号和切换科目后的大题号相同,watch question监听不执行
               //防止切换科目前的大题号和切换科目后的大题号相同,watch question监听不执行
               watchQuestionHandle()
               watchQuestionHandle()

+ 10 - 3
src/modules/analysis/group-monitoring/index.vue

@@ -165,9 +165,10 @@ const chartOptions = computed(() => {
       axisLine: { show: false },
       axisLine: { show: false },
       axisTick: { show: false },
       axisTick: { show: false },
       splitLine: { show: false },
       splitLine: { show: false },
-      // axisLabel: {
-      //   align: 'right',
-      // },
+      axisLabel: {
+        rotate: 30,
+        // interval: 0,
+      },
       data: result.value?.map((item) => item.markingGroupLeader) || [],
       data: result.value?.map((item) => item.markingGroupLeader) || [],
     },
     },
     yAxis: {
     yAxis: {
@@ -192,6 +193,9 @@ const chartOptions = computed(() => {
             return value > 0 ? `${value}` : ''
             return value > 0 ? `${value}` : ''
           },
           },
         },
         },
+        barWidth: '20',
+        barCategoryGap: '50%',
+        barGap: '0%',
       },
       },
       {
       {
         name: '已给分',
         name: '已给分',
@@ -209,6 +213,9 @@ const chartOptions = computed(() => {
             return value > 0 ? `${value}` : ''
             return value > 0 ? `${value}` : ''
           },
           },
         },
         },
+        barWidth: '20',
+        barCategoryGap: '50%',
+        barGap: '0%',
       },
       },
     ],
     ],
   }
   }

+ 11 - 1
src/modules/monitor/training-monitoring/index.vue

@@ -187,9 +187,19 @@ async function onSearch() {
     const valid = await elFormRef?.value?.validate()
     const valid = await elFormRef?.value?.validate()
     if (valid) {
     if (valid) {
       const { diffShow, ...params } = model || {}
       const { diffShow, ...params } = model || {}
+
+      let markingGroupNumbers: any = params.markingGroupNumbers
+      if (
+        !markingGroupNumbers ||
+        (Array.isArray(markingGroupNumbers) &&
+          markingGroupNumbers.length !== markingGroupNumbers.filter((v) => !!v).length)
+      ) {
+        markingGroupNumbers = []
+      }
+
       const dataType = model.markStage
       const dataType = model.markStage
       const fGroupNumber = model.forceGroupNumber
       const fGroupNumber = model.forceGroupNumber
-      getTrainingMonitor(params).then(() => {
+      getTrainingMonitor({ ...params, markingGroupNumbers }).then(() => {
         currentDataType = dataType
         currentDataType = dataType
         curForceGroupNumber = fGroupNumber
         curForceGroupNumber = fGroupNumber
         refreshKey.value = Date.now() + ''
         refreshKey.value = Date.now() + ''

+ 11 - 5
src/modules/quality/ending-check/components/SubjectProgress.vue

@@ -246,8 +246,14 @@ const totalChartsOption = computed<EChartsOption>(() => {
     ],
     ],
   }
   }
 })
 })
-const toOtherPage = (name: string) => {
-  router.push({ name })
+const toOtherPage = (name: string, row: any) => {
+  router.push({
+    name,
+    query:
+      mainStore.myUserInfo?.role === 'EXPERT'
+        ? { _subjectCode: subjectView.value.code, _questionMainNumber: row.questionMainNumber }
+        : {},
+  })
 }
 }
 const columns: EpTableColumn<SubjectProgress>[] = [
 const columns: EpTableColumn<SubjectProgress>[] = [
   {
   {
@@ -295,7 +301,7 @@ const columns: EpTableColumn<SubjectProgress>[] = [
       return row.questionMainNumber == 0 ? (
       return row.questionMainNumber == 0 ? (
         <span>{row.todoProblemPaperCount}</span>
         <span>{row.todoProblemPaperCount}</span>
       ) : (
       ) : (
-        <ElButton type="primary" link onClick={() => toOtherPage('MarkingProblem')}>
+        <ElButton type="primary" link onClick={() => toOtherPage('MarkingProblem', row)}>
           {row.todoProblemPaperCount}
           {row.todoProblemPaperCount}
         </ElButton>
         </ElButton>
       )
       )
@@ -309,7 +315,7 @@ const columns: EpTableColumn<SubjectProgress>[] = [
       return row.questionMainNumber == 0 ? (
       return row.questionMainNumber == 0 ? (
         <span>{row.todoSamePaperCount}</span>
         <span>{row.todoSamePaperCount}</span>
       ) : (
       ) : (
-        <ElButton type="primary" link onClick={() => toOtherPage('MarkingSimilar')}>
+        <ElButton type="primary" link onClick={() => toOtherPage('MarkingSimilar', row)}>
           {row.todoSamePaperCount}
           {row.todoSamePaperCount}
         </ElButton>
         </ElButton>
       )
       )
@@ -323,7 +329,7 @@ const columns: EpTableColumn<SubjectProgress>[] = [
       return row.questionMainNumber == 0 ? (
       return row.questionMainNumber == 0 ? (
         <span>{row.subjectiveUnVerifyPaperCount}</span>
         <span>{row.subjectiveUnVerifyPaperCount}</span>
       ) : (
       ) : (
-        <ElButton type="primary" link onClick={() => toOtherPage('QualitySubjectiveCheck')}>
+        <ElButton type="primary" link onClick={() => toOtherPage('QualitySubjectiveCheck', row)}>
           {row.subjectiveUnVerifyPaperCount}
           {row.subjectiveUnVerifyPaperCount}
         </ElButton>
         </ElButton>
       )
       )