|
@@ -135,7 +135,7 @@
|
|
|
type="primary"
|
|
|
@click="updateRules(scope.row)"
|
|
|
plain
|
|
|
- ><i class="el-icon-edit"></i>修改
|
|
|
+ ><i class="el-icon-edit"></i>编辑
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
v-if="scope.row.ifFinish == 1"
|
|
@@ -278,7 +278,8 @@ export default {
|
|
|
isClear: 0,
|
|
|
formSearch: {
|
|
|
examId: "",
|
|
|
- courseNo: ""
|
|
|
+ courseNo: "",
|
|
|
+ courseName: ""
|
|
|
},
|
|
|
tableData: [],
|
|
|
currentPage: 1,
|
|
@@ -374,13 +375,25 @@ export default {
|
|
|
name: "extract_paper_info_add"
|
|
|
});
|
|
|
},
|
|
|
- //修改调卷规则
|
|
|
+ getCourseName(courseNo) {
|
|
|
+ for (let course of this.courseList) {
|
|
|
+ if (course.code == courseNo) {
|
|
|
+ this.formSearch.courseName = course.name;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //编辑调卷规则
|
|
|
updateRules(row) {
|
|
|
+ this.getCourseName(this.formSearch.courseNo);
|
|
|
sessionStorage.setItem("extract_paper_examId", row.examId);
|
|
|
sessionStorage.setItem(
|
|
|
"extract_paper_courseNo",
|
|
|
this.formSearch.courseNo
|
|
|
);
|
|
|
+ sessionStorage.setItem(
|
|
|
+ "extract_paper_courseName",
|
|
|
+ this.formSearch.courseName
|
|
|
+ );
|
|
|
sessionStorage.setItem("extract_paper_currentPage", this.currentPage);
|
|
|
this.$router.push({
|
|
|
name: "extract_paper_info_edit",
|
|
@@ -592,6 +605,7 @@ export default {
|
|
|
//查询所有课程
|
|
|
getCourses(query) {
|
|
|
query = query.trim();
|
|
|
+ console.log("query:", query);
|
|
|
if (query) {
|
|
|
if (!(query.indexOf("(") > -1 && query.indexOf(")") > -1)) {
|
|
|
this.courseLoading = true;
|
|
@@ -599,6 +613,7 @@ export default {
|
|
|
.get(CORE_API + "/course/query?name=" + query + "&enable=true")
|
|
|
.then(response => {
|
|
|
this.courseList = response.data;
|
|
|
+ console.log("this.courseList:", this.courseList);
|
|
|
this.courseLoading = false;
|
|
|
});
|
|
|
}
|
|
@@ -629,13 +644,18 @@ export default {
|
|
|
this.getExams("");
|
|
|
this.formSearch = {
|
|
|
examId: "",
|
|
|
- courseNo: ""
|
|
|
+ courseNo: "",
|
|
|
+ courseName: ""
|
|
|
};
|
|
|
} else {
|
|
|
this.formSearch.courseNo =
|
|
|
sessionStorage.getItem("extract_paper_courseNo") == "null"
|
|
|
? ""
|
|
|
: sessionStorage.getItem("extract_paper_courseNo");
|
|
|
+ this.formSearch.courseName =
|
|
|
+ sessionStorage.getItem("extract_paper_courseName") == "null"
|
|
|
+ ? ""
|
|
|
+ : sessionStorage.getItem("extract_paper_courseName");
|
|
|
this.formSearch.examId =
|
|
|
sessionStorage.getItem("extract_paper_examId") == ""
|
|
|
? ""
|
|
@@ -647,6 +667,9 @@ export default {
|
|
|
if (this.formSearch.examId) {
|
|
|
this.initialize(this.formSearch.examId);
|
|
|
}
|
|
|
+ if (this.formSearch.courseName) {
|
|
|
+ this.getCourses(this.formSearch.courseName);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|