|
@@ -87,7 +87,7 @@
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem>
|
|
<FormItem>
|
|
<Input
|
|
<Input
|
|
- v-model.trim="filter.name"
|
|
|
|
|
|
+ v-model.trim="filter.studentName"
|
|
placeholder="输入姓名"
|
|
placeholder="输入姓名"
|
|
clearable
|
|
clearable
|
|
></Input>
|
|
></Input>
|
|
@@ -112,6 +112,16 @@
|
|
>
|
|
>
|
|
</Select>
|
|
</Select>
|
|
</FormItem>
|
|
</FormItem>
|
|
|
|
+ <FormItem>
|
|
|
|
+ <Select v-model="filter.subject" placeholder="科目" clearable>
|
|
|
|
+ <Option
|
|
|
|
+ v-for="item in subjects"
|
|
|
|
+ :key="item.subject"
|
|
|
|
+ :value="item.subject"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ ></Option>
|
|
|
|
+ </Select>
|
|
|
|
+ </FormItem>
|
|
<FormItem>
|
|
<FormItem>
|
|
<Button
|
|
<Button
|
|
size="small"
|
|
size="small"
|
|
@@ -151,7 +161,6 @@
|
|
:download-filename="downloadStudentTemplateFilename"
|
|
:download-filename="downloadStudentTemplateFilename"
|
|
:headers="headers"
|
|
:headers="headers"
|
|
:format="['xls', 'xlsx']"
|
|
:format="['xls', 'xlsx']"
|
|
- :upload-success-handle="uploadStudentSuccess"
|
|
|
|
@upload-success="uploadSuccess"
|
|
@upload-success="uploadSuccess"
|
|
ref="ExportStudent"
|
|
ref="ExportStudent"
|
|
>
|
|
>
|
|
@@ -165,7 +174,6 @@
|
|
:download-filename="downloadRelateTemplateFilename"
|
|
:download-filename="downloadRelateTemplateFilename"
|
|
:headers="headers"
|
|
:headers="headers"
|
|
:format="['xls', 'xlsx']"
|
|
:format="['xls', 'xlsx']"
|
|
- :upload-success-handle="uploadStudentSuccess"
|
|
|
|
ref="ExportRelate"
|
|
ref="ExportRelate"
|
|
>
|
|
>
|
|
</import-file>
|
|
</import-file>
|
|
@@ -203,7 +211,7 @@ export default {
|
|
examRoom: "",
|
|
examRoom: "",
|
|
startNumber: null,
|
|
startNumber: null,
|
|
endNumber: null,
|
|
endNumber: null,
|
|
- name: "",
|
|
|
|
|
|
+ studentName: "",
|
|
upload: null,
|
|
upload: null,
|
|
isAbsent: null
|
|
isAbsent: null
|
|
},
|
|
},
|
|
@@ -320,6 +328,13 @@ export default {
|
|
page: this.current - 1,
|
|
page: this.current - 1,
|
|
size: this.size
|
|
size: this.size
|
|
};
|
|
};
|
|
|
|
+ if (
|
|
|
|
+ (datas.upload !== null && !datas.subject) ||
|
|
|
|
+ (datas.upload === null && datas.subject)
|
|
|
|
+ ) {
|
|
|
|
+ this.$Message.error("上传状态和科目必须同时选择!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
const data = await studentPageList(datas);
|
|
const data = await studentPageList(datas);
|
|
this.students = data.data.map(student => {
|
|
this.students = data.data.map(student => {
|
|
student.uploadStatus.split(",").map(status => {
|
|
student.uploadStatus.split(",").map(status => {
|
|
@@ -384,35 +399,7 @@ export default {
|
|
this.curStudent = row;
|
|
this.curStudent = row;
|
|
this.$refs.ModifyStudent.open();
|
|
this.$refs.ModifyStudent.open();
|
|
},
|
|
},
|
|
- uploadStudentSuccess(response) {
|
|
|
|
- if (response && !response.length) {
|
|
|
|
- return {
|
|
|
|
- success: true,
|
|
|
|
- msg: "导入成功!"
|
|
|
|
- };
|
|
|
|
- }
|
|
|
|
- var errorInfos = response
|
|
|
|
- .filter(function(item) {
|
|
|
|
- return !!item.excelErrorType;
|
|
|
|
- })
|
|
|
|
- .map(function(item) {
|
|
|
|
- return "第" + item.row + "行," + item.excelErrorType;
|
|
|
|
- })
|
|
|
|
- .join(";");
|
|
|
|
- if (errorInfos) {
|
|
|
|
- return {
|
|
|
|
- success: false,
|
|
|
|
- msg: errorInfos
|
|
|
|
- };
|
|
|
|
- } else {
|
|
|
|
- return {
|
|
|
|
- success: true,
|
|
|
|
- msg: "导入成功!"
|
|
|
|
- };
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- uploadSuccess(result) {
|
|
|
|
- if (!result.success) return;
|
|
|
|
|
|
+ uploadSuccess() {
|
|
this.getList();
|
|
this.getList();
|
|
this.getAreaList();
|
|
this.getAreaList();
|
|
},
|
|
},
|