|
@@ -129,11 +129,17 @@ export default {
|
|
|
downloadUrl: INVIGILATOR_IMPORT_TEMPLATE_DOWNLOAD_URL,
|
|
|
};
|
|
|
},
|
|
|
- async created() {
|
|
|
- this.searchForm();
|
|
|
- },
|
|
|
+ // async created() {
|
|
|
+ // this.searchForm();
|
|
|
+ // },
|
|
|
methods: {
|
|
|
async searchForm() {
|
|
|
+ try {
|
|
|
+ await this.$refs.form.validate();
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ return;
|
|
|
+ }
|
|
|
const res = await searchInvigilators({
|
|
|
examId: this.form.examId,
|
|
|
userId: this.form.userId,
|
|
@@ -167,8 +173,18 @@ export default {
|
|
|
}
|
|
|
this.$refs.theDialog2.openDialog();
|
|
|
},
|
|
|
- exportInvigilate() {
|
|
|
- exportInvigilate();
|
|
|
+ async exportInvigilate() {
|
|
|
+ try {
|
|
|
+ await this.$refs.form.validate();
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ exportInvigilate({
|
|
|
+ examId: this.form.examId,
|
|
|
+ userId: this.form.userId,
|
|
|
+ roomCode: this.form.roomCode,
|
|
|
+ });
|
|
|
this.$notify({ title: "导入任务已成功启动", type: "success" });
|
|
|
},
|
|
|
},
|