|
@@ -29,7 +29,6 @@
|
|
<script name="StuImport" lang="ts" setup>
|
|
<script name="StuImport" lang="ts" setup>
|
|
import { ref } from "vue";
|
|
import { ref } from "vue";
|
|
import SetImportParamsDialog from "./SetImportParamsDialog.vue";
|
|
import SetImportParamsDialog from "./SetImportParamsDialog.vue";
|
|
-import useTable from "@/hooks/useTable";
|
|
|
|
import { getStuList } from "@/ap/baseDataConfig";
|
|
import { getStuList } from "@/ap/baseDataConfig";
|
|
import { useUserStore } from "@/store";
|
|
import { useUserStore } from "@/store";
|
|
import { getStuImportSet, clearStuData } from "@/ap/baseDataConfig";
|
|
import { getStuImportSet, clearStuData } from "@/ap/baseDataConfig";
|
|
@@ -41,11 +40,10 @@ const showSetParamsDialog = ref(false);
|
|
const showStuImportFileDialog = ref(false);
|
|
const showStuImportFileDialog = ref(false);
|
|
const year = ref();
|
|
const year = ref();
|
|
const yearHalf = ref();
|
|
const yearHalf = ref();
|
|
-
|
|
+const loading = ref(false);
|
|
const _getStuImportSet = () => {
|
|
const _getStuImportSet = () => {
|
|
getStuImportSet({ examId: userStore.curExam?.id as number }).then(
|
|
getStuImportSet({ examId: userStore.curExam?.id as number }).then(
|
|
(res: any) => {
|
|
(res: any) => {
|
|
- console.log("mock 考生导入参数设置获取", res);
|
|
|
|
year.value = res?.year;
|
|
year.value = res?.year;
|
|
yearHalf.value = res?.yearHalf;
|
|
yearHalf.value = res?.yearHalf;
|
|
}
|
|
}
|
|
@@ -94,10 +92,14 @@ const columns: TableColumnsType = [
|
|
];
|
|
];
|
|
const dataList = ref([]);
|
|
const dataList = ref([]);
|
|
const search = () => {
|
|
const search = () => {
|
|
- getStuList({ examId: userStore.curExam?.id as number }).then((res: any) => {
|
|
+ loading.value = true;
|
|
- console.log("mock 考生列表", res);
|
|
+ getStuList({ examId: userStore.curExam?.id as number })
|
|
- dataList.value = res || [];
|
|
+ .then((res: any) => {
|
|
- });
|
|
+ dataList.value = res || [];
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
|
|
+ loading.value = false;
|
|
|
|
+ });
|
|
};
|
|
};
|
|
search();
|
|
search();
|
|
const clear = (row: any) => {
|
|
const clear = (row: any) => {
|
|
@@ -109,7 +111,6 @@ const clear = (row: any) => {
|
|
examId: userStore.curExam?.id as number,
|
|
examId: userStore.curExam?.id as number,
|
|
subjectCode: row.subjectCode,
|
|
subjectCode: row.subjectCode,
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- console.log("mock 删除考生单条数据");
|
|
|
|
window.$message.success("操作成功");
|
|
window.$message.success("操作成功");
|
|
search();
|
|
search();
|
|
});
|
|
});
|