|
@@ -24,6 +24,8 @@
|
|
@click="toggleListType('level3', 3)"
|
|
@click="toggleListType('level3', 3)"
|
|
>批次</span
|
|
>批次</span
|
|
>
|
|
>
|
|
|
|
+ <i>></i>
|
|
|
|
+ <span :class="{ active: chooseLevel >= 4 }">考生</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="bottom">
|
|
<div class="bottom">
|
|
@@ -40,40 +42,93 @@
|
|
</div>
|
|
</div>
|
|
<div class="info-wrap">
|
|
<div class="info-wrap">
|
|
<Accordion :arr="arr">
|
|
<Accordion :arr="arr">
|
|
- <template #one>11111</template>
|
|
|
|
|
|
+ <template #one>
|
|
|
|
+ <div class="flex accordion-body">
|
|
|
|
+ <VerticalDateRange v-model="timeArr" />
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template #two>
|
|
|
|
+ <div class="accordion-body">
|
|
|
|
+ <a-radio-group
|
|
|
|
+ v-model:value="imageType"
|
|
|
|
+ @change="onImageTypeChange"
|
|
|
|
+ >
|
|
|
|
+ <a-radio
|
|
|
|
+ v-for="item in imageTypeOptions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >{{ item.label }}</a-radio
|
|
|
|
+ >
|
|
|
|
+ </a-radio-group>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template #three>
|
|
|
|
+ <div class="accordion-body">
|
|
|
|
+ <QuestionPanel
|
|
|
|
+ v-model:questions="questions"
|
|
|
|
+ :info="questionInfo"
|
|
|
|
+ :simple="isSliceImage"
|
|
|
|
+ @change="onQuestionsChange"
|
|
|
|
+ :hideMissExamRadio="true"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
</Accordion>
|
|
</Accordion>
|
|
</div>
|
|
</div>
|
|
- <div class="image-wrap"></div>
|
|
|
|
|
|
+ <div class="image-wrap">
|
|
|
|
+ <ScanImage
|
|
|
|
+ v-if="dataCheckStore.curPage && isOriginImage"
|
|
|
|
+ @prev="onPrevPage"
|
|
|
|
+ @next="onNextPage"
|
|
|
|
+ />
|
|
|
|
+ <SliceImage v-if="dataCheckStore.curPage && !isOriginImage" />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script name="ImageView" lang="ts" setup>
|
|
<script name="ImageView" lang="ts" setup>
|
|
-import { ref, computed, onMounted, reactive } from "vue";
|
|
|
|
-import { useRequest } from "vue-request";
|
|
|
|
-import { useUserStore } from "@/store";
|
|
|
|
|
|
+import { ref, computed, onMounted, watch } from "vue";
|
|
|
|
+import VerticalDateRange from "@/components/VerticalDateRange/index.vue";
|
|
|
|
+import { useUserStore, useDataCheckStore } from "@/store";
|
|
|
|
+import { IMAGE_TYPE, enum2Options } from "@/constants/enums";
|
|
|
|
+import QuestionPanel from "../DataCheck/QuestionPanel.vue";
|
|
|
|
+import ScanImage from "../DataCheck/ScanImage/index.vue";
|
|
|
|
+import SliceImage from "../DataCheck/SliceImage/index.vue";
|
|
import {
|
|
import {
|
|
batchSubjectList,
|
|
batchSubjectList,
|
|
batchDeviceList,
|
|
batchDeviceList,
|
|
batchList,
|
|
batchList,
|
|
batchStudentList,
|
|
batchStudentList,
|
|
|
|
+ getStuCardDetail,
|
|
} from "@/ap/scanManage";
|
|
} from "@/ap/scanManage";
|
|
|
|
|
|
|
|
+const imageTypeOptions = enum2Options(IMAGE_TYPE);
|
|
|
|
+const dataCheckStore = useDataCheckStore();
|
|
|
|
+function onImageTypeChange() {
|
|
|
|
+ dataCheckStore.setInfo({
|
|
|
|
+ imageType: imageType.value,
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const timeArr = ref([]);
|
|
|
|
+const timeParams = computed<any>(() => {
|
|
|
|
+ return { startTime: timeArr.value[0], endTime: timeArr.value[1] };
|
|
|
|
+});
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
const examId = computed(() => userStore.curExam?.id);
|
|
const examId = computed(() => userStore.curExam?.id);
|
|
-// const { runAsync: run1 } = useRequest(batchSubjectList);
|
|
|
|
-// const { runAsync: run2 } = useRequest(batchDeviceList);
|
|
|
|
-// const { runAsync: run3 } = useRequest(batchList);
|
|
|
|
-// const { runAsync: run4 } = useRequest(batchStudentList);
|
|
|
|
const _batchSubjectList = () => {
|
|
const _batchSubjectList = () => {
|
|
- batchSubjectList({ examId: examId.value }).then((res: any) => {
|
|
|
|
- leftList.value = res || [];
|
|
|
|
- listType.value = "level1";
|
|
|
|
- });
|
|
|
|
|
|
+ batchSubjectList({ examId: examId.value, ...timeParams.value }).then(
|
|
|
|
+ (res: any) => {
|
|
|
|
+ leftList.value = res || [];
|
|
|
|
+ listType.value = "level1";
|
|
|
|
+ }
|
|
|
|
+ );
|
|
};
|
|
};
|
|
|
|
|
|
const _batchDeviceList = () => {
|
|
const _batchDeviceList = () => {
|
|
batchDeviceList({
|
|
batchDeviceList({
|
|
examId: examId.value,
|
|
examId: examId.value,
|
|
subjectCode: curSubject.value.value,
|
|
subjectCode: curSubject.value.value,
|
|
|
|
+ ...timeParams.value,
|
|
}).then((res: any) => {
|
|
}).then((res: any) => {
|
|
leftList.value = res || [];
|
|
leftList.value = res || [];
|
|
listType.value = "level2";
|
|
listType.value = "level2";
|
|
@@ -84,22 +139,43 @@ const _batchList = () => {
|
|
examId: examId.value,
|
|
examId: examId.value,
|
|
subjectCode: curSubject.value.value,
|
|
subjectCode: curSubject.value.value,
|
|
device: curDevice.value.value,
|
|
device: curDevice.value.value,
|
|
|
|
+ ...timeParams.value,
|
|
}).then((res: any) => {
|
|
}).then((res: any) => {
|
|
leftList.value = res || [];
|
|
leftList.value = res || [];
|
|
listType.value = "level3";
|
|
listType.value = "level3";
|
|
});
|
|
});
|
|
};
|
|
};
|
|
const _batchStudentList = () => {
|
|
const _batchStudentList = () => {
|
|
- batchStudentList({ batchId: curSubject.value.value }).then((res: any) => {
|
|
|
|
|
|
+ batchStudentList({ batchId: curBatch.value.value }).then((res: any) => {
|
|
leftList.value = res || [];
|
|
leftList.value = res || [];
|
|
listType.value = "level4";
|
|
listType.value = "level4";
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+const _getStuCardDetail = () => {
|
|
|
|
+ getStuCardDetail({
|
|
|
|
+ batchId: curBatch.value.value,
|
|
|
|
+ studentId: curStu.value.studentId,
|
|
|
|
+ }).then((res: any) => {
|
|
|
|
+ curStuCardData.value = res || {};
|
|
|
|
+ dataCheckStore.setInfo({
|
|
|
|
+ curPage: curStuCardData.value as any,
|
|
|
|
+ curPageIndex: -1,
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ if (!dataCheckStore.curPage) return;
|
|
|
|
+ dataCheckStore.setInfo({ curStudent: curStuCardData.value as any });
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
_batchSubjectList();
|
|
_batchSubjectList();
|
|
});
|
|
});
|
|
|
|
|
|
-const arr = ref([{ title: "搜索条件", name: "one", open: true }]);
|
|
|
|
|
|
+const arr = ref([
|
|
|
|
+ { title: "搜索条件", name: "one", open: true },
|
|
|
|
+ { title: "图片类别", name: "two", open: true },
|
|
|
|
+ { title: "题卡信息", name: "three", open: true },
|
|
|
|
+]);
|
|
|
|
|
|
const listType = ref("level1");
|
|
const listType = ref("level1");
|
|
const fieldNames = computed(() => {
|
|
const fieldNames = computed(() => {
|
|
@@ -124,6 +200,12 @@ const leftList = ref<any>([]);
|
|
const curSubject = ref({ label: "", value: "" });
|
|
const curSubject = ref({ label: "", value: "" });
|
|
const curDevice = ref({ label: "", value: "" });
|
|
const curDevice = ref({ label: "", value: "" });
|
|
const curBatch = ref({ label: "", value: "" });
|
|
const curBatch = ref({ label: "", value: "" });
|
|
|
|
+const curStu = ref({
|
|
|
|
+ examNumber: "",
|
|
|
|
+ studentId: void 0,
|
|
|
|
+ studentName: "",
|
|
|
|
+});
|
|
|
|
+const curStuCardData = ref({});
|
|
|
|
|
|
const chooseLeft = (item: any, index: number) => {
|
|
const chooseLeft = (item: any, index: number) => {
|
|
activeIndex.value = index;
|
|
activeIndex.value = index;
|
|
@@ -136,6 +218,13 @@ const chooseLeft = (item: any, index: number) => {
|
|
} else if (listType.value === "level3") {
|
|
} else if (listType.value === "level3") {
|
|
curBatch.value = { value: item.batchId, label: item.batchId };
|
|
curBatch.value = { value: item.batchId, label: item.batchId };
|
|
_batchStudentList();
|
|
_batchStudentList();
|
|
|
|
+ } else if (listType.value === "level4") {
|
|
|
|
+ curStu.value = {
|
|
|
|
+ examNumber: item.examNumber,
|
|
|
|
+ studentId: item.studentId,
|
|
|
|
+ studentName: item.studentName,
|
|
|
|
+ };
|
|
|
|
+ _getStuCardDetail();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const toggleListType = (type: string, num: number) => {
|
|
const toggleListType = (type: string, num: number) => {
|
|
@@ -143,8 +232,8 @@ const toggleListType = (type: string, num: number) => {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
const clearObj = { value: "", label: "" };
|
|
const clearObj = { value: "", label: "" };
|
|
|
|
+ leftList.value = [];
|
|
if (type === "level1") {
|
|
if (type === "level1") {
|
|
- leftList.value = [];
|
|
|
|
curSubject.value = { ...clearObj };
|
|
curSubject.value = { ...clearObj };
|
|
curDevice.value = { ...clearObj };
|
|
curDevice.value = { ...clearObj };
|
|
curBatch.value = { ...clearObj };
|
|
curBatch.value = { ...clearObj };
|
|
@@ -153,23 +242,66 @@ const toggleListType = (type: string, num: number) => {
|
|
curDevice.value = { ...clearObj };
|
|
curDevice.value = { ...clearObj };
|
|
curBatch.value = { ...clearObj };
|
|
curBatch.value = { ...clearObj };
|
|
_batchDeviceList();
|
|
_batchDeviceList();
|
|
|
|
+ } else if (type === "level3") {
|
|
|
|
+ curBatch.value = { ...clearObj };
|
|
|
|
+ _batchList();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const activeIndex = ref();
|
|
const activeIndex = ref();
|
|
-// const imgList = ref([
|
|
|
|
-// {
|
|
|
|
-// url: "https://cet-test.markingtool.cn/file/slice/1/2/10101/1/031/1/101011221203102-1.jpg",
|
|
|
|
-// },
|
|
|
|
-// {
|
|
|
|
-// url: "https://cet-test.markingtool.cn/file/slice/1/2/10101/1/031/1/101011221203101-1.jpg",
|
|
|
|
-// },
|
|
|
|
-// {
|
|
|
|
-// url: "https://cet-test.markingtool.cn/file/slice/1/2/10100/1/035/1/101001221203502-1.jpg",
|
|
|
|
-// },
|
|
|
|
-// ]);
|
|
|
|
|
|
+
|
|
|
|
+const imageType = ref(dataCheckStore.imageType);
|
|
|
|
+// imageType
|
|
|
|
+const isOriginImage = computed(() => {
|
|
|
|
+ return dataCheckStore.imageType === "ORIGIN";
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+// imageType
|
|
|
|
+const isSliceImage = computed(() => {
|
|
|
|
+ return dataCheckStore.imageType === "SLICE";
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+// question panel
|
|
|
|
+const questionInfo = computed(() => {
|
|
|
|
+ return {
|
|
|
|
+ examNumber: dataCheckStore.curStudent?.examNumber,
|
|
|
|
+ name: dataCheckStore.curStudent?.name,
|
|
|
|
+ examSite: dataCheckStore.curStudent?.examSite,
|
|
|
|
+ seatNumber: dataCheckStore.curStudent?.seatNumber,
|
|
|
|
+ paperType: dataCheckStore.curStudent?.paperType,
|
|
|
|
+ };
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+const questions = ref<any>([]);
|
|
|
|
+watch(
|
|
|
|
+ () => dataCheckStore.curPageIndex,
|
|
|
|
+ (val, oldval) => {
|
|
|
|
+ if (val !== oldval) {
|
|
|
|
+ questions.value = [...(dataCheckStore.curPage?.question || [])];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+);
|
|
|
|
+
|
|
|
|
+async function onQuestionsChange() {
|
|
|
|
+ if (!dataCheckStore.curPage) return;
|
|
|
|
+ dataCheckStore.curPage.question = [...questions.value];
|
|
|
|
+
|
|
|
|
+ await dataCheckStore
|
|
|
|
+ .updateField({
|
|
|
|
+ field: "QUESTION",
|
|
|
|
+ value: questions.value,
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {});
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+async function onPrevPage() {}
|
|
|
|
+
|
|
|
|
+async function onNextPage() {}
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
.image-view {
|
|
.image-view {
|
|
|
|
+ .accordion-body {
|
|
|
|
+ padding: 12px 16px;
|
|
|
|
+ }
|
|
.image-wrap {
|
|
.image-wrap {
|
|
height: 100%;
|
|
height: 100%;
|
|
border-left: 1px solid #e5e6eb;
|
|
border-left: 1px solid #e5e6eb;
|
|
@@ -216,16 +348,21 @@ const activeIndex = ref();
|
|
}
|
|
}
|
|
span {
|
|
span {
|
|
color: @text-color3;
|
|
color: @text-color3;
|
|
|
|
+ &:not(:last-child) {
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
&.active {
|
|
&.active {
|
|
color: @text-color1;
|
|
color: @text-color1;
|
|
|
|
+ font-weight: bold;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.result-list {
|
|
.result-list {
|
|
background: #f2f3f5;
|
|
background: #f2f3f5;
|
|
border-radius: 6px;
|
|
border-radius: 6px;
|
|
- padding: 6px 8px;
|
|
|
|
- line-height: 20px;
|
|
|
|
|
|
+ padding: 0 8px;
|
|
|
|
+ height: 32px;
|
|
|
|
+ line-height: 32px;
|
|
color: @text-color1;
|
|
color: @text-color1;
|
|
}
|
|
}
|
|
}
|
|
}
|