فهرست منبع

feat: 自查一致性分析完善

chenhao 2 سال پیش
والد
کامیت
2ad2408f01

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

@@ -34,7 +34,7 @@ export namespace Statistics {
 
   type SelfCheckAnalysis = BaseDefine<SelfCheckAnalysisReq, SelfCheckAnalysisResponse[]>
 
-  interface elfCheckAnalysisDiffListItemPaper {
+  interface SelfCheckAnalysisDiffListItemPaper {
     diff: number
     lastMarkScore: number
     markScore: number
@@ -45,7 +45,7 @@ export namespace Statistics {
 
   interface SelfCheckAnalysisDiffListItem {
     diff: number
-    papers: elfCheckAnalysisDiffListItemPaper[]
+    papers: SelfCheckAnalysisDiffListItemPaper[]
   }
 
   type SelfCheckAnalysisDiffList = BaseDefine<
@@ -77,6 +77,7 @@ export namespace Statistics {
       markingGroupNumber: number | string
       startTime: string
       endTime: string
+      taskId?: number
     },
     SelfCheckDataDetail[]
   >

+ 3 - 2
src/modules/analysis/view-marked-detail/index.vue

@@ -181,9 +181,10 @@ const {
 /** 确定给分 */
 const { fetch: updatePersonalMarkDetailScore } = useFetch('updatePersonalMarkDetailScore')
 
-const onSubmit = () => {
+const onSubmit = async () => {
   if (current.value) {
-    updatePersonalMarkDetailScore({ taskId: current.value.taskId, scores: modelScore.value })
+    await updatePersonalMarkDetailScore({ taskId: current.value.taskId, scores: modelScore.value })
+    fetchTable()
   }
 }
 

+ 3 - 2
src/modules/expert/assess/index.vue

@@ -211,9 +211,10 @@ const onSearch = async () => {
 
 const { fetch: updateMarkScore } = useFetch('updateMarkScore')
 
-const onSubmit = () => {
+const onSubmit = async () => {
   if (currentAssessPaper.value) {
-    updateMarkScore({ id: currentAssessPaper.value.id, scores: modelScore.value })
+    await updateMarkScore({ id: currentAssessPaper.value.id, scores: modelScore.value })
+    onSearch()
   }
 }
 

+ 4 - 3
src/modules/monitor/system-check/index.vue

@@ -134,7 +134,7 @@ const onSendBack = () => {
 
 /** 打回成功 */
 const onRejected = () => {
-  checkNext()
+  onSearch()
 }
 
 type OperationClick = MarkHeaderInstance['onClick']
@@ -250,9 +250,10 @@ const onSearch = async () => {
 /** 系统抽查卷打分 */
 const { fetch: markSystemSpotPaper } = useFetch('markSystemSpotPaper')
 
-const onSubmit = () => {
+const onSubmit = async () => {
   if (currentSystemCheckPaper.value) {
-    markSystemSpotPaper({ id: currentSystemCheckPaper.value.id, scores: modelScore.value })
+    await markSystemSpotPaper({ id: currentSystemCheckPaper.value.id, scores: modelScore.value })
+    onSearch()
   }
 }
 

+ 7 - 4
src/modules/quality/self-check-detail/index.vue

@@ -73,7 +73,7 @@ import MarkHistoryList from '@/components/shared/MarkHistoryList.vue'
 import SendBackMark from '@/components/shared/SendBackMark.vue'
 
 import type { SetImgBgOption } from '@/hooks/useSetImgBg'
-import type { ExtractApiResponse } from '@/api/api'
+import type { ExtractApiParams, ExtractApiResponse } from '@/api/api'
 import type { MarkHeaderInstance, EpTableColumn } from 'global-type'
 
 type RowType = ExtractApiResponse<'getSelfCheckDataDetail'> & { index: number }
@@ -109,7 +109,7 @@ const {
 
 /** 刷新 */
 const onRefresh = () => {
-  console.log('刷新')
+  getSelfCheckDataDetail(query as unknown as ExtractApiParams<'getSelfCheckDataDetail'>)
 }
 
 /** 预览试卷 */
@@ -174,12 +174,15 @@ const {
 /** 修改给分 */
 const { fetch: markSelfCheckData } = useFetch('markSelfCheckData')
 
-const onSubmit = () => {
+const onSubmit = async () => {
   if (current.value) {
-    markSelfCheckData({ taskId: current.value.taskId, scores: modelScore.value })
+    await markSelfCheckData({ taskId: current.value.taskId, scores: modelScore.value })
+    onRefresh()
   }
 }
 
+onRefresh()
+
 const imgOption = computed<SetImgBgOption>(() => {
   return {
     image: current?.value?.filePath,

+ 22 - 8
src/modules/quality/self-check/index.vue

@@ -26,11 +26,7 @@
         ></base-table>
       </el-card>
       <el-card class="flex-1" shadow="never">
-        <base-table
-          :columns="columns3"
-          :data="currentSelfCheckAnalysisDiffItem?.papers"
-          @row-dblclick="onPaperDBClick"
-        ></base-table>
+        <base-table :columns="columns3" :data="papers" @row-dblclick="onPaperDBClick"></base-table>
       </el-card>
     </div>
   </div>
@@ -39,6 +35,7 @@
 <script setup lang="ts" name="QualitySelfCheck">
 /** 自查一致性分析 */
 import { reactive, watch, computed, ref } from 'vue'
+import { useRouter } from 'vue-router'
 import { ElButton, ElCard } from 'element-plus'
 import { omit } from 'lodash-es'
 import BaseForm from '@/components/element/BaseForm.vue'
@@ -52,6 +49,8 @@ import useTableCheck from '@/hooks/useTableCheck'
 import type { ExtractApiParams, ExtractApiResponse } from '@/api/api'
 import type { EpFormItem, EpTableColumn } from 'global-type'
 
+const { push } = useRouter()
+
 type FormModel = Omit<ExtractApiParams<'selfCheckAnalysis'>, 'startTime' | 'endTime'>
 
 const { subjectList, mainQuestionList, groupListWithAll, dataModel, onOptionInit, changeModelValue } = useOptions([
@@ -170,12 +169,27 @@ function onSearch() {
 
 /** 自查一致性列表双击 */
 const onSelfCheckAnalysisDBClick = () => {
-  console.log('自查一致性列表双击')
+  push({
+    name: 'QualitySelfCheckDetail',
+    query: {
+      ...omit(model, 'time'),
+      startTime: model.time[0],
+      endTime: model.time[1],
+    },
+  })
 }
 
 /** 试卷列表双击 */
-const onPaperDBClick = () => {
-  console.log('自查一致性列表双击')
+const onPaperDBClick = (row: ExtractArrayValue<typeof papers.value>) => {
+  push({
+    name: 'QualitySelfCheckDetail',
+    query: {
+      ...omit(model, 'time'),
+      startTime: model.time[0],
+      endTime: model.time[1],
+      taskId: row.taskId,
+    },
+  })
 }
 
 onOptionInit(onSearch)