zhangjie 8 місяців тому
батько
коміт
acd7ec831d

+ 0 - 1
src/render/ap/types/recognizeCheck.ts

@@ -9,7 +9,6 @@ export interface RecognizeConditionItem {
 
 export interface RecognizeCheckTaskConditionItem {
   code: string;
-  name: string;
   value: number | null;
 }
 

+ 23 - 3
src/render/views/AbsentCheck/CheckAction.vue

@@ -25,7 +25,7 @@
               @change="absentCheckTypeChange"
             ></a-select>
           </a-form-item>
-          <a-form-item label="号">
+          <a-form-item label="考号">
             <div class="exam-number">
               <a-textarea
                 v-model:value="searchModel.examNumber"
@@ -34,7 +34,12 @@
               ></a-textarea>
               <div class="number-suffix">{{ examNumberCountCont }}</div>
             </div>
-            <a-button class="ant-simple m-l-8px" type="link">查看全部</a-button>
+            <a-button
+              class="ant-simple m-l-8px"
+              type="link"
+              @click="onEditExamNumber"
+              >查看全部</a-button
+            >
           </a-form-item>
 
           <a-row>
@@ -106,6 +111,12 @@
   <ResetDialog ref="resetDialogRef" />
   <!-- ImportTypeDialog -->
   <ImportTypeDialog ref="importTypeDialogRef" />
+  <!-- MoreExamNumberDialog -->
+  <MoreExamNumberDialog
+    ref="moreExamNumberDialogRef"
+    :data="searchModel.examNumber"
+    @confirm="onExamNumberEdited"
+  />
 </template>
 
 <script setup lang="ts">
@@ -137,6 +148,7 @@ import ExportTypeDialog from "../Review/ExportTypeDialog.vue";
 import ResetDialog from "./ResetDialog.vue";
 import ImportTypeDialog from "./ImportTypeDialog.vue";
 import QuestionPanel from "../DataCheck/QuestionPanel.vue";
+import MoreExamNumberDialog from "../DataCheck/MoreExamNumberDialog.vue";
 
 defineOptions({
   name: "CheckAction",
@@ -177,6 +189,14 @@ const examNumberCountCont = computed(() => {
   return `${examNumbers.length}/100`;
 });
 
+const moreExamNumberDialogRef = ref();
+function onEditExamNumber() {
+  moreExamNumberDialogRef.value?.open();
+}
+function onExamNumberEdited(val: string) {
+  searchModel.examNumber = val;
+}
+
 function absentCheckTypeChange() {
   switch (searchDataCheckType.value) {
     // 缺考
@@ -233,7 +253,7 @@ async function onQuestionsChange() {
   await dataCheckStore
     .updateField({
       field: "QUESTION",
-      value: questions.value,
+      value: JSON.stringify(dataCheckStore.curPage.question),
     })
     .catch(() => {});
 }

+ 1 - 1
src/render/views/AbsentCheck/ResetDialog.vue

@@ -8,7 +8,7 @@
     <div class="reset-tips">
       <h3>生成条件</h3>
       <p>1.客观题未作答+主观题有作答的考生;</p>
-      <p>2.客观题未作答+主观题有作答+卡1或卡2任一题卡号</p>
+      <p>2.客观题未作答+主观题有作答+卡1或卡2任一题卡考号</p>
       <p>
         填涂≧
         <a-input-number

+ 1 - 1
src/render/views/Audit/ImageCheck/index.vue

@@ -7,7 +7,7 @@
           <span class="head-cont">{{ curImage?.name }}</span>
         </a-col>
         <a-col :span="4">
-          <span class="head-label">号:</span>
+          <span class="head-label">考号:</span>
           <span class="head-cont">{{ curImage?.examNumber }}</span>
         </a-col>
         <a-col :span="4">

+ 1 - 1
src/render/views/Audit/Intime/index.vue

@@ -24,7 +24,7 @@
       <div class="intime-side-body">
         <div class="task-list">
           <ul class="list-head">
-            <li style="width: 150px">号</li>
+            <li style="width: 150px">考号</li>
             <li style="width: 80px">姓名</li>
             <li style="width: 60px">座位号</li>
             <li style="width: 50px">状态</li>

+ 1 - 1
src/render/views/Audit/Review/ReviewAction.vue

@@ -77,7 +77,7 @@
       <div class="history-list">
         <div class="task-list">
           <ul class="list-head">
-            <li class="li-grow">号</li>
+            <li class="li-grow">考号</li>
             <li style="width: 80px">状态</li>
           </ul>
           <div class="list-body">

+ 22 - 3
src/render/views/DataCheck/CheckAction.vue

@@ -43,7 +43,7 @@
         <template #header><FilterFilled />搜索条件 (自定义)</template>
 
         <a-form :label-col="{ style: { width: '83px' } }">
-          <a-form-item label="号">
+          <a-form-item label="考号">
             <div class="exam-number">
               <a-textarea
                 v-model:value="customSearchModel.examNumber"
@@ -52,7 +52,12 @@
               ></a-textarea>
               <div class="number-suffix">{{ examNumberCountCont }}</div>
             </div>
-            <a-button class="ant-simple m-l-8px" type="link">查看全部</a-button>
+            <a-button
+              class="ant-simple m-l-8px"
+              type="link"
+              @click="onEditExamNumber"
+              >查看全部</a-button
+            >
           </a-form-item>
           <a-form-item label="姓名">
             <a-input
@@ -170,6 +175,12 @@
 
   <!-- ExportTypeDialog -->
   <ExportTypeDialog ref="exportTypeDialogRef" @confirm="onExportConfirm" />
+  <!-- MoreExamNumberDialog -->
+  <MoreExamNumberDialog
+    ref="moreExamNumberDialogRef"
+    :data="customSearchModel.examNumber"
+    @confirm="onExamNumberEdited"
+  />
 </template>
 
 <script setup lang="ts">
@@ -191,10 +202,11 @@ import { examStatusSave } from "@/ap/absentCheck";
 import useDictOption from "@/hooks/dictOption";
 import useLoading from "@/hooks/useLoading";
 import { ImageType, booleanOptionList } from "@/constants/enumerate";
+import { objModifyAssign } from "@/utils/tool";
 
 import ExportTypeDialog from "../Review/ExportTypeDialog.vue";
 import QuestionPanel from "./QuestionPanel.vue";
-import { objModifyAssign } from "@/utils/tool";
+import MoreExamNumberDialog from "./MoreExamNumberDialog.vue";
 
 defineOptions({
   name: "CheckAction",
@@ -264,6 +276,13 @@ const examNumberCountCont = computed(() => {
     .filter((item) => item);
   return `${examNumbers.length}/100`;
 });
+const moreExamNumberDialogRef = ref();
+function onEditExamNumber() {
+  moreExamNumberDialogRef.value?.open();
+}
+function onExamNumberEdited(val: string) {
+  customSearchModel.examNumber = val;
+}
 
 function dataCheckTypeChange() {
   switch (searchDataCheckType.value) {

+ 1 - 1
src/render/views/DataCheck/ModifyPaperType.vue

@@ -10,7 +10,7 @@
 
     <a-form ref="formRef" :label-col="{ style: { width: '90px' } }">
       <a-form-item label="识别结果">
-        <span class="color-brand">{{ areaResult | "#" }}</span>
+        <span class="color-brand">{{ areaResult || "#" }}</span>
       </a-form-item>
       <a-form-item label="识别图片">
         <div class="paper-type-img">

+ 90 - 0
src/render/views/DataCheck/MoreExamNumberDialog.vue

@@ -0,0 +1,90 @@
+<template>
+  <a-modal
+    v-model:open="visible"
+    :width="424"
+    style="top: 10vh"
+    title="输入考号"
+    @ok="confirm"
+  >
+    <a-form ref="formRef" :label-col="{ style: { width: '50px' } }">
+      <a-form-item label="考号">
+        <div class="exam-number">
+          <a-textarea
+            v-model:value="examNumber"
+            placeholder="请输入"
+            :auto-size="{ minRows: 4, maxRows: 10 }"
+          ></a-textarea>
+          <div class="number-suffix">{{ examNumberCountCont }}</div>
+        </div>
+      </a-form-item>
+    </a-form>
+  </a-modal>
+</template>
+
+<script setup lang="ts">
+import { onMounted, ref, watch, computed } from "vue";
+import { message } from "ant-design-vue";
+
+import useModal from "@/hooks/useModal";
+
+defineOptions({
+  name: "MoreExamNumberDialog",
+});
+
+/* modal */
+const { visible, open, close } = useModal();
+defineExpose({ open, close });
+
+const props = defineProps<{
+  data: string;
+}>();
+
+const emit = defineEmits(["confirm"]);
+
+const examNumber = ref("");
+
+const examNumberCountCont = computed(() => {
+  const examNumbers = (examNumber.value || "")
+    .split("\n")
+    .filter((item) => item);
+  return `${examNumbers.length}/100`;
+});
+
+async function confirm() {
+  emit("confirm", examNumber.value);
+  close();
+}
+
+watch(
+  () => visible.value,
+  (val) => {
+    if (val) {
+      examNumber.value = props.data || "";
+    }
+  },
+  {
+    immediate: true,
+  }
+);
+</script>
+
+<style lang="less" scoped>
+.exam-number {
+  position: relative;
+
+  .ant-input {
+    padding-bottom: 30px;
+    width: 100%;
+  }
+
+  .number-suffix {
+    position: absolute;
+    color: @text-color3;
+    height: 22px;
+    line-height: 22px;
+    bottom: 5px;
+    right: 5px;
+    z-index: 8;
+  }
+}
+</style>

+ 2 - 1
src/render/views/DataCheck/QuestionPanel.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="question-panel">
     <a-descriptions v-if="info" class="panel-info" :column="10">
-      <a-descriptions-item label="号" :span="6">
+      <a-descriptions-item label="考号" :span="6">
         {{ info.examNumber }}
       </a-descriptions-item>
       <a-descriptions-item label="姓名" :span="4">
@@ -205,6 +205,7 @@ async function onEditPaperType() {
       dataCheckStore.curPage?.sheetUri,
       paperTypeArea.value
     );
+    paperTypeResult.value = dataCheckStore.curPage?.paperType.result;
   } else {
     paperTypeImg.value = "";
   }

+ 0 - 1
src/render/views/DataCheck/ScanImage/index.vue

@@ -290,7 +290,6 @@ async function onRecogEditConfirm(result: string[]) {
     });
     curRecogBlock.value.result = result;
   }
-  // TODO:
 }
 
 // img action

+ 4 - 16
src/render/views/RecognizeCheck/ModifyRecognizeCheckTask.vue

@@ -87,10 +87,7 @@ import { PlusOutlined, MinusOutlined } from "@ant-design/icons-vue";
 
 import useLoading from "@/hooks/useLoading";
 import useModal from "@/hooks/useModal";
-import {
-  recognizeCheckTaskSave,
-  recognizeConditionsList,
-} from "@/ap/recognizeCheck";
+import { recognizeCheckTaskSave } from "@/ap/recognizeCheck";
 import {
   RecognizeConditionItem,
   RecognizeCheckListItem,
@@ -118,6 +115,7 @@ const defaultFormData = {
 
 const props = defineProps<{
   rowData: RecognizeCheckListItem | null;
+  conditionList: RecognizeConditionItem[];
 }>();
 const emit = defineEmits(["modified"]);
 
@@ -141,16 +139,10 @@ const rules: FormRules<keyof RecognizeCheckTaskSaveParams> = {
 const deleteDisabled = computed(() => formData.conditions.length <= 1);
 
 // condition action
-const conditionList = ref<RecognizeConditionItem[]>([]);
 const fieldNames = { label: "name", value: "code" };
-async function getConditionList() {
-  const res = await recognizeConditionsList();
-
-  conditionList.value = res || [];
-}
 
 function conditionChange(val: string, index: number) {
-  const curCondition = conditionList.value.find((item) => item.code === val);
+  const curCondition = props.conditionList.find((item) => item.code === val);
   if (!curCondition) return;
 
   formData.conditions[index].needValue = curCondition.needValue;
@@ -199,7 +191,7 @@ watch(
 
 function modalOpenHandle() {
   const conditionMap: Record<string, RecognizeConditionItem> = {};
-  conditionList.value.forEach((item) => {
+  props.conditionList.forEach((item) => {
     conditionMap[item.code] = item;
   });
 
@@ -222,8 +214,4 @@ function modalOpenHandle() {
     ];
   }
 }
-
-onMounted(() => {
-  getConditionList();
-});
 </script>

+ 25 - 4
src/render/views/RecognizeCheck/index.vue

@@ -85,6 +85,7 @@
     <ModifyRecognizeCheckTask
       ref="modifyRecognizeCheckTaskRef"
       :row-data="curRow"
+      :condition-list="conditionList"
       @modified="getList"
     />
   </div>
@@ -100,13 +101,17 @@ import { message } from "ant-design-vue";
 import type { TableProps } from "ant-design-vue";
 
 import useTable from "@/hooks/useTable";
-import { RecognizeCheckListItem } from "@/ap/types/recognizeCheck";
+import {
+  RecognizeCheckListItem,
+  RecognizeConditionItem,
+} from "@/ap/types/recognizeCheck";
 import {
   recognizeCheckListPage,
   recognizeCheckTaskDelete,
   recognizeCheckResetTask,
   recognizeCheckBuildTask,
   recognizeCheckTaskStatusSave,
+  recognizeConditionsList,
 } from "@/ap/recognizeCheck";
 import { showConfirm } from "@/utils/uiUtils";
 import { useUserStore } from "@/store";
@@ -121,6 +126,20 @@ const userStore = useUserStore();
 
 const router = useRouter();
 const route = useRoute();
+
+// condition action
+const conditionList = ref<RecognizeConditionItem[]>([]);
+const conditionMap = ref<Record<string, string>>({});
+async function getConditionList() {
+  const res = await recognizeConditionsList();
+
+  conditionList.value = res || [];
+  conditionList.value.forEach((item) => {
+    conditionMap.value[item.code] = item.name;
+  });
+}
+
+// datalist
 const searchModel = reactive({
   examId: userStore.curExam.id,
   subjectCode: "",
@@ -220,8 +239,9 @@ function checkDangerActionRunning(index: number) {
 
 function getConditionContent(index: number): string {
   const record = dataList.value[index];
+
   return record.conditions
-    .map((item) => `${item.name}${item.value || ""}`)
+    .map((item) => `${conditionMap.value[item.code]}${item.value || ""}`)
     .join(";");
 }
 function getConditionProgress(index: number): string {
@@ -297,9 +317,10 @@ async function onDelete(index: number) {
   message.success("操作成功");
 }
 
-onMounted(() => {
+onMounted(async () => {
   if (route.name !== "RecognizeCheck") return;
 
-  toPage(1);
+  await getConditionList();
+  await toPage(1);
 });
 </script>

+ 1 - 1
src/render/views/Review/ReviewAction.vue

@@ -118,7 +118,7 @@
       <div class="history-list">
         <div class="task-list">
           <ul class="list-head">
-            <li class="li-grow">号</li>
+            <li class="li-grow">考号</li>
             <li style="width: 80px">状态</li>
           </ul>
           <div class="list-body">

+ 2 - 2
src/render/views/Review/ReviewMarkPan.vue

@@ -92,10 +92,10 @@ function moveAreaStop(pos: MovePos) {
 
 function updateStaticSize() {
   const panDom = reviewMarkPanRef.value as HTMLDivElement;
-  if (!panDom) return;
+  const parentDom = panDom.parentElement as HTMLDivElement;
+  if (!panDom || !parentDom) return;
   panWidth = panDom.clientWidth;
   panHeight = panDom.clientHeight;
-  const parentDom = panDom.parentElement as HTMLDivElement;
   limitWidth = parentDom.clientWidth;
   limitHeight = parentDom.clientHeight;
 }

+ 1 - 1
src/render/views/Review/index.vue

@@ -171,7 +171,7 @@ async function onResetConfirm() {
 
 async function releaseTask() {
   if (!searchModel.subjectCode) return;
-  await reviewAuditTaskRelease(searchModel);
+  await reviewTaskRelease(searchModel);
 }
 
 onMounted(async () => {

+ 2 - 2
src/render/views/ScanManage/StuInfo.vue

@@ -65,7 +65,7 @@ const fields = computed(() => {
     {
       prop: "examNumber",
       colSpan: 3,
-      label: "号",
+      label: "考号",
       attrs: { allowClear: true },
     },
     {
@@ -134,7 +134,7 @@ const columns: TableColumnsType = [
     dataIndex: "subjectCode",
   },
   {
-    title: "号",
+    title: "考号",
     dataIndex: "examNumber",
   },
   {