|
@@ -410,6 +410,7 @@ export default {
|
|
|
.then((response) => {
|
|
|
this.properties = response.data;
|
|
|
this.init();
|
|
|
+ this.initCoursePropertyQuestionCountMap();
|
|
|
});
|
|
|
} else {
|
|
|
//修改
|
|
@@ -425,24 +426,11 @@ export default {
|
|
|
this.noPublicDifficultyCount =
|
|
|
paperDetailStruct.noPublicDifficultyCount;
|
|
|
this.initQuesNameList();
|
|
|
+ this.initCoursePropertyQuestionCountMap();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- const coursePropertyQuestionCountMap = {};
|
|
|
- for (
|
|
|
- let i = 0, len = this.coursePropertyNumberDtos.length;
|
|
|
- i < len;
|
|
|
- i++
|
|
|
- ) {
|
|
|
- for (let p = 0; p < 2; p++) {
|
|
|
- for (let d = 1; d < 4; d++) {
|
|
|
- coursePropertyQuestionCountMap[`${i}_${p}_${d}`] = null;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.coursePropertyQuestionCountMap = coursePropertyQuestionCountMap;
|
|
|
},
|
|
|
//初始化方法
|
|
|
init() {
|
|
@@ -478,6 +466,21 @@ export default {
|
|
|
i = i + 1;
|
|
|
}
|
|
|
},
|
|
|
+ initCoursePropertyQuestionCountMap() {
|
|
|
+ const coursePropertyQuestionCountMap = {};
|
|
|
+ for (
|
|
|
+ let i = 0, len = this.coursePropertyNumberDtos.length;
|
|
|
+ i < len;
|
|
|
+ i++
|
|
|
+ ) {
|
|
|
+ for (let p = 0; p < 2; p++) {
|
|
|
+ for (let d = 1; d < 4; d++) {
|
|
|
+ coursePropertyQuestionCountMap[`${i}_${p}_${d}`] = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.coursePropertyQuestionCountMap = coursePropertyQuestionCountMap;
|
|
|
+ },
|
|
|
//初始化来源大题名称
|
|
|
initQuesNameList() {
|
|
|
var url =
|
|
@@ -798,7 +801,7 @@ export default {
|
|
|
.get(QUESTION_API + "/question/count", { params: this.question })
|
|
|
.then((response) => {
|
|
|
const k = `${rindex}_${publicity}_${difficulty}`;
|
|
|
- this.coursePropertyQuestionCountMap[k] = response.data;
|
|
|
+ this.$set(this.coursePropertyQuestionCountMap, k, response.data);
|
|
|
// console.log(`${k}:`, response.data);
|
|
|
});
|
|
|
},
|