|
@@ -10,7 +10,7 @@
|
|
>
|
|
>
|
|
<el-form-item label="课程名称(代码)">
|
|
<el-form-item label="课程名称(代码)">
|
|
<el-select
|
|
<el-select
|
|
- v-model="paperTitleForm.courseNo"
|
|
|
|
|
|
+ v-model="paperTitleForm.courseId"
|
|
class="dialog-input-width"
|
|
class="dialog-input-width"
|
|
filterable
|
|
filterable
|
|
clearable
|
|
clearable
|
|
@@ -22,9 +22,9 @@
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in courseInfoSelect"
|
|
v-for="item in courseInfoSelect"
|
|
- :key="item.courseNo"
|
|
|
|
|
|
+ :key="item.courseId"
|
|
:label="item.courseInfo"
|
|
:label="item.courseInfo"
|
|
- :value="item.courseNo"
|
|
|
|
|
|
+ :value="item.courseId"
|
|
>
|
|
>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -130,8 +130,7 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
paperTitleForm: {
|
|
paperTitleForm: {
|
|
- courseNo: "",
|
|
|
|
- courseName: "",
|
|
|
|
|
|
+ courseId: "",
|
|
paperId: "",
|
|
paperId: "",
|
|
paperDetailId: "",
|
|
paperDetailId: "",
|
|
value: "",
|
|
value: "",
|
|
@@ -158,21 +157,15 @@ export default {
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
paperTitelDisable() {
|
|
paperTitelDisable() {
|
|
- if (this.paperTitleForm.courseNo) {
|
|
|
|
|
|
+ if (this.paperTitleForm.courseId) {
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
paperDetailDisable() {
|
|
paperDetailDisable() {
|
|
- console.log(
|
|
|
|
- "this.paperTitleForm.courseNo:",
|
|
|
|
- this.paperTitleForm.courseNo
|
|
|
|
- );
|
|
|
|
- console.log("this.paperTitleForm.paperId:", this.paperTitleForm.paperId);
|
|
|
|
- console.log("this.detailsData.length:", this.detailsData.length);
|
|
|
|
if (
|
|
if (
|
|
- this.paperTitleForm.courseNo &&
|
|
|
|
|
|
+ this.paperTitleForm.courseId &&
|
|
this.paperTitleForm.paperId &&
|
|
this.paperTitleForm.paperId &&
|
|
this.detailsData.length > 0
|
|
this.detailsData.length > 0
|
|
) {
|
|
) {
|
|
@@ -183,7 +176,7 @@ export default {
|
|
},
|
|
},
|
|
nextDisabled() {
|
|
nextDisabled() {
|
|
if (
|
|
if (
|
|
- this.paperTitleForm.courseNo &&
|
|
|
|
|
|
+ this.paperTitleForm.courseId &&
|
|
this.paperTitleForm.paperId &&
|
|
this.paperTitleForm.paperId &&
|
|
this.paperTitleForm.paperDetailId &&
|
|
this.paperTitleForm.paperDetailId &&
|
|
this.paperTitleForm.value
|
|
this.paperTitleForm.value
|
|
@@ -198,8 +191,8 @@ export default {
|
|
var courseList = [];
|
|
var courseList = [];
|
|
for (let course of this.courseList) {
|
|
for (let course of this.courseList) {
|
|
var courseInfo = course.name + "(" + course.code + ")";
|
|
var courseInfo = course.name + "(" + course.code + ")";
|
|
- var courseNo = course.code;
|
|
|
|
- courseList.push({ courseNo: courseNo, courseInfo: courseInfo });
|
|
|
|
|
|
+ var courseId = course.id;
|
|
|
|
+ courseList.push({ courseId: courseId, courseInfo: courseInfo });
|
|
}
|
|
}
|
|
return courseList;
|
|
return courseList;
|
|
},
|
|
},
|
|
@@ -260,8 +253,8 @@ export default {
|
|
this.$http
|
|
this.$http
|
|
.get(
|
|
.get(
|
|
QUESTION_API +
|
|
QUESTION_API +
|
|
- "/importPaper/1/500/?courseNo=" +
|
|
|
|
- this.paperTitleForm.courseNo
|
|
|
|
|
|
+ "/importPaper/1/500/?courseId=" +
|
|
|
|
+ this.paperTitleForm.courseId
|
|
)
|
|
)
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.tableData = response.data.content;
|
|
this.tableData = response.data.content;
|
|
@@ -298,7 +291,7 @@ export default {
|
|
this.$refs[formData].validate((valid) => {
|
|
this.$refs[formData].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
for (let course of this.courseList) {
|
|
for (let course of this.courseList) {
|
|
- if (course.code == this.paperTitleForm.courseNo) {
|
|
|
|
|
|
+ if (course.courseId == this.paperTitleForm.courseId) {
|
|
this.paperTitleForm.courseName = course.name;
|
|
this.paperTitleForm.courseName = course.name;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -307,7 +300,7 @@ export default {
|
|
.post(
|
|
.post(
|
|
QUESTION_API +
|
|
QUESTION_API +
|
|
"/importPaper/saveBlankPaper/" +
|
|
"/importPaper/saveBlankPaper/" +
|
|
- this.paperTitleForm.courseNo +
|
|
|
|
|
|
+ this.paperTitleForm.courseId +
|
|
"/" +
|
|
"/" +
|
|
this.paperForm.name
|
|
this.paperForm.name
|
|
)
|
|
)
|
|
@@ -316,8 +309,8 @@ export default {
|
|
this.$http
|
|
this.$http
|
|
.get(
|
|
.get(
|
|
QUESTION_API +
|
|
QUESTION_API +
|
|
- "/importPaper/1/500/?courseNo=" +
|
|
|
|
- this.paperTitleForm.courseNo
|
|
|
|
|
|
+ "/importPaper/1/500/?courseId=" +
|
|
|
|
+ this.paperTitleForm.courseId
|
|
)
|
|
)
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.tableData = response.data.content;
|
|
this.tableData = response.data.content;
|
|
@@ -351,11 +344,10 @@ export default {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
for (let course of this.courseList) {
|
|
for (let course of this.courseList) {
|
|
- if (course.code == this.paperTitleForm.courseNo) {
|
|
|
|
|
|
+ if (course.courseId == this.paperTitleForm.courseId) {
|
|
this.paperTitleForm.courseName = course.name;
|
|
this.paperTitleForm.courseName = course.name;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log(path);
|
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path:
|
|
path:
|
|
path +
|
|
path +
|
|
@@ -366,9 +358,7 @@ export default {
|
|
"/" +
|
|
"/" +
|
|
this.paperTitleForm.value +
|
|
this.paperTitleForm.value +
|
|
"/" +
|
|
"/" +
|
|
- encodeURIComponent(this.paperTitleForm.courseNo) +
|
|
|
|
- "/" +
|
|
|
|
- encodeURIComponent(this.paperTitleForm.courseName),
|
|
|
|
|
|
+ encodeURIComponent(this.paperTitleForm.courseId),
|
|
});
|
|
});
|
|
},
|
|
},
|
|
},
|
|
},
|