|
@@ -0,0 +1,137 @@
|
|
|
+<script setup lang="ts">
|
|
|
+ import { useModalInner, BasicModal } from '/@/components/Modal';
|
|
|
+ import { useTable, BasicTable } from '/@/components/Table';
|
|
|
+ import { reactive, ref } from 'vue';
|
|
|
+ import { Recordable } from 'vite-plugin-mock';
|
|
|
+ import { requestMagicApi } from '/@/api/magicApi';
|
|
|
+ import { getExamPlanPlanList } from '/@/services/apis/ExamPlanController';
|
|
|
+ import { getExamSubjectScorePage } from '/@/services/apis/ExamSubjectScoreController';
|
|
|
+
|
|
|
+ const modelRef = ref<Recordable>({});
|
|
|
+ const status = ref<Number>(0);
|
|
|
+
|
|
|
+ const emit = defineEmits(['success', 'register']);
|
|
|
+ const searchInfo = reactive<Recordable>({});
|
|
|
+
|
|
|
+ const [registerTable, { reload }] = useTable({
|
|
|
+ api: getExamSubjectScorePage,
|
|
|
+ title: '满足学生列表',
|
|
|
+ rowKey: 'id',
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: '学期',
|
|
|
+ dataIndex: 'semesterName',
|
|
|
+ align: 'left',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '考试计划',
|
|
|
+ dataIndex: 'milexamname',
|
|
|
+ align: 'left',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '科目',
|
|
|
+ dataIndex: 'coursename',
|
|
|
+ align: 'left',
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '成绩',
|
|
|
+ dataIndex: 'score',
|
|
|
+ align: 'left',
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '班级排名',
|
|
|
+ dataIndex: 'gradeRanking1',
|
|
|
+ align: 'left',
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '年级排名',
|
|
|
+ dataIndex: 'gradeRanking',
|
|
|
+ align: 'left',
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ formConfig: {
|
|
|
+ labelWidth: 120,
|
|
|
+ schemas: [
|
|
|
+ {
|
|
|
+ field: 'semesterId',
|
|
|
+ label: '学期',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ colProps: { span: 8 },
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: requestMagicApi,
|
|
|
+ params: {
|
|
|
+ url: '/baseData/semester/option',
|
|
|
+ },
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'examPlanId',
|
|
|
+ label: '考试计划',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ colProps: { span: 8 },
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: getExamPlanPlanList,
|
|
|
+ valueField: 'id',
|
|
|
+ labelField: 'name',
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ useSearchForm: true,
|
|
|
+ showTableSetting: true,
|
|
|
+ bordered: true,
|
|
|
+ immediate: false,
|
|
|
+ canResize: true,
|
|
|
+ });
|
|
|
+
|
|
|
+ const [registerModal, { setModalProps }] = useModalInner((data) => {
|
|
|
+ setModalProps({ confirmLoading: false });
|
|
|
+ modelRef.value = { ...data.baseData };
|
|
|
+ searchInfo.userId = data.baseData.id;
|
|
|
+ status.value = data.status;
|
|
|
+ reload();
|
|
|
+ });
|
|
|
+
|
|
|
+ const handleCancel = () => {
|
|
|
+ emit('success');
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <BasicModal
|
|
|
+ :destroyOnClose="true"
|
|
|
+ :maskClosable="false"
|
|
|
+ v-bind="$attrs"
|
|
|
+ @register="registerModal"
|
|
|
+ :width="1002"
|
|
|
+ title="查看成绩"
|
|
|
+ :footer="null"
|
|
|
+ @cancel="handleCancel"
|
|
|
+ >
|
|
|
+ <div style="height: 600px">
|
|
|
+ <BasicTable @register="registerTable" :searchInfo="searchInfo" />
|
|
|
+ </div>
|
|
|
+ </BasicModal>
|
|
|
+</template>
|
|
|
+
|
|
|
+<style scoped lang="less"></style>
|