Browse Source

手动回收和待回收数量展示

刘洋 2 năm trước cách đây
mục cha
commit
addb4caa6a

+ 1 - 0
.eslintrc.cjs

@@ -32,6 +32,7 @@ module.exports = {
     'vue/component-name-in-template-casing': ['error', 'kebab-case'],
     'vue/one-component-per-file': 0,
     'vue/no-v-html': 0,
+    '@typescript-eslint/no-empty-function': 0,
   },
   globals: {},
 }

+ 2 - 2
server.config.ts

@@ -3,11 +3,11 @@ import type { ServerOptions } from 'vite'
 const server: ServerOptions = {
   proxy: {
     '^/?(api|file)/': {
-      // target: 'http://192.168.10.41:8200',
+      target: 'http://192.168.10.41:8200',
       // target: 'http://192.168.10.178:8200',
       // target: 'http://192.168.10.108:8200',
       // target: 'http://cet-test.markingtool.cn',
-      target: 'http://192.168.10.136:80',
+      // target: 'http://192.168.10.136:80',
       // target: 'http://cet-dev.markingtool.cn:8200',
     },
   },

+ 2 - 0
src/api/api-types/exam.d.ts

@@ -53,6 +53,7 @@ export namespace Exam {
 
   /** 启用/禁用考试 */
   type ToggleEnableExam = BaseDefine<{ ids: number[]; enable: boolean }>
+  type RecoveryTask = BaseDefine<any, any>
   export interface ApiMap {
     /** 删除考试 */
     deleteExam: DeleteExam
@@ -64,5 +65,6 @@ export namespace Exam {
     saveExamInfo: SaveExamInfo
     /** 启用/禁用考试 */
     toggleEnableExam: ToggleEnableExam
+    recoveryTask: RecoveryTask
   }
 }

+ 2 - 0
src/api/api-types/statistics.d.ts

@@ -499,6 +499,7 @@ export namespace Statistics {
 
   type GetSystemCheckLevel = BaseDefine<null, any>
   type GetDayList = BaseDefine<any, any>
+  type GetRecoveryTaskCount = BaseDefine<any, any>
 
   /** 系统抽查卷打分 */
   type MarkSystemSpotPaper = BaseDefine<{ id?: number; scores: number[] }>
@@ -640,5 +641,6 @@ export namespace Statistics {
     getProvinceProcess: GetProvinceProcess
     getCompareList: GetCompareList
     getDayList: GetDayList
+    getRecoveryTaskCount: GetRecoveryTaskCount
   }
 }

+ 1 - 0
src/api/exam.ts

@@ -12,6 +12,7 @@ const ExamApi: DefineApiModule<Exam.ApiMap> = {
   saveExamInfo: '/api/exam/save',
   /** 启用/禁用考试 */
   toggleEnableExam: '/api/exam/toggle',
+  recoveryTask: '/api/question/main/task/update',
 }
 
 export default ExamApi

+ 1 - 0
src/api/statistics.ts

@@ -166,6 +166,7 @@ const StatisticsApi: DefineApiModule<Statistics.ApiMap> = {
     },
   },
   getDayList: '/api/statistic/mark/day/list',
+  getRecoveryTaskCount: '/api/statistic/marking/progress/check/for/allow/mark/count',
 }
 
 export default StatisticsApi

+ 9 - 1
src/modules/admin-subject/struct/index.vue

@@ -22,6 +22,7 @@
               </template>
             </el-popconfirm>
             <el-button v-if="row.firstMain" type="primary" link @click="onEditMainQuestion(row)">大题设置</el-button>
+            <el-button v-if="row.firstMain" type="primary" link @click="recovery(row)">手动回收</el-button>
           </template>
         </base-table>
       </el-card>
@@ -87,7 +88,7 @@ const columns: EpTableColumn[] = [
   { label: '小题号', prop: 'subNumber' },
   { label: '小题满分', prop: 'totalScore' },
   { label: '间隔分', prop: 'intervalScore' },
-  { label: '操作', slotName: 'operation' },
+  { label: '操作', slotName: 'operation', width: 262 },
 ]
 
 if (props.id) {
@@ -109,6 +110,13 @@ function onEditMainQuestion(row: ExtractArrayValue<ExtractApiResponse<'getSubQue
     push({ name: 'EditStruct', params: { subjectCode: subjectInfo.value.code, mainNumber: row.mainNumber } })
   }
 }
+function recovery(row: any) {
+  useFetch('recoveryTask')
+    .fetch({ subjectCode: subjectInfo.value.code, mainNumber: row.mainNumber })
+    .then((res) => {
+      ElMessage.success(`回收成功`)
+    })
+}
 
 const { fetch: editSubQuestion, loading: saving } = useFetch('editSubQuestion')
 

+ 18 - 2
src/modules/quality/ending-check/components/EndCheck.vue

@@ -5,6 +5,10 @@
         <template #form-item-button>
           <el-button type="primary" @click="onStartCheck">开始检查</el-button>
         </template>
+        <template #form-item-info>
+          <span>待回收:</span>
+          <span class="recovery-count">{{ recoveryCountRes?.count }}</span>
+        </template>
       </base-form>
     </div>
     <div class="m-t-base flex">
@@ -180,7 +184,6 @@ const SelectionCell: any = (obj: any) => {
   const { value, intermediate = false, onChange } = obj
   return <ElCheckbox onChange={onChange} modelValue={value} indeterminate={intermediate} />
 }
-
 const mainLayout = useMainLayoutStore()
 // const table1 = ref()
 // const table2 = ref()
@@ -290,6 +293,8 @@ const {
   loading: loading3,
 } = useFetch('unProcessSimilarList')
 
+const { fetch: getRecoveryCount, result: recoveryCountRes, loading: loading5 } = useFetch('getRecoveryTaskCount')
+
 watch(dataModel, () => {
   model.subjectCode = dataModel.subject || ''
   model.questionMainNumber = dataModel.question
@@ -298,8 +303,9 @@ watch(dataModel, () => {
 
 const { defineColumn, _ } = useForm()
 
-const OneRow = defineColumn(_, 'row-1', { span: 6 })
+const OneRow = defineColumn(_, 'row-1', { span: 5 })
 const btnRow = defineColumn(_, 'row-1', { span: 2 })
+const infoRow = defineColumn(_, 'row-1', { span: 3 })
 
 const items = computed<EpFormItem[]>(() => [
   OneRow({
@@ -334,6 +340,10 @@ const items = computed<EpFormItem[]>(() => [
     slotName: 'button',
     labelWidth: '20px',
   }),
+  infoRow({
+    slotName: 'info',
+    labelWidth: '20px',
+  }),
 ])
 
 /** 未评卷 table */
@@ -440,6 +450,7 @@ const onStartCheck = () => {
   getUnMarkBackPaperList({ pageNumber: 1, pageSize: 999999, ...model })
   getUnProcessProblemList(model)
   getUnProcessSimilarList(model)
+  getRecoveryCount({ questionMainNumber: model.questionMainNumber, subjectCode: model.subjectCode })
 }
 
 const currentTask = ref<ExtractMultipleApiResponse<'unMarkPaperList'>>()
@@ -509,6 +520,11 @@ onOptionInit(onStartCheck)
 </script>
 
 <style scoped lang="scss">
+.recovery-count {
+  color: $color--primary;
+  font-weight: bold;
+  font-size: 16px;
+}
 .table-wrap {
   height: calc(100vh - 280px);
   overflow: auto;

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

@@ -1,5 +1,5 @@
 <template>
-  <div class="p-base">
+  <div class="radius-base">
     <div class="fill-blank radius-base p-t-base">
       <base-form :items="items" :model="model" :label-width="'80px'" size="small">
         <template #form-item-button>
@@ -7,7 +7,7 @@
         </template>
       </base-form>
     </div>
-    <div class="fill-blank radius-base p-base chart-info">
+    <div class="fill-blank radius-base m-t-base p-base chart-info">
       <vue-e-charts v-loading="loading" class="full" :option="totalChartsOption" autoresize></vue-e-charts>
     </div>
     <div class="m-t-base fill-blank radius-base p-base">
@@ -69,7 +69,7 @@ watch(dataModel, () => {
 
 const { defineColumn, _ } = useForm()
 
-const OneRow = defineColumn(_, 'row-1', { span: 6 })
+const OneRow = defineColumn(_, 'row-1', { span: 5 })
 const btnRow = defineColumn(_, 'row-1', { span: 2 })
 
 const items = computed<any>(() => [