|
@@ -454,8 +454,32 @@ export default {
|
|
this.getCurCallType();
|
|
this.getCurCallType();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- "extractConfig2.randomPaperId"(val) {
|
|
|
|
- let item = this.tplList.find((v) => v.id == val);
|
|
|
|
|
|
+ "extractConfig2.randomPaperId"() {
|
|
|
|
+ this.getData();
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ //初始化
|
|
|
|
+ async created() {
|
|
|
|
+ // await this.getTplList();
|
|
|
|
+ let extractConfigId = this.$route.params.extractConfigId;
|
|
|
|
+ //1.查询考试集合
|
|
|
|
+ this.getExams("");
|
|
|
|
+ if (extractConfigId) {
|
|
|
|
+ this.isInsert = true;
|
|
|
|
+ //规则ID存在,表示是修改操作
|
|
|
|
+ this.getExtractConfig(extractConfigId);
|
|
|
|
+ } else {
|
|
|
|
+ this.getTplList();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ getData() {
|
|
|
|
+ if (!this.tplList.length || !this.extractConfig2.randomPaperId) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ let item = this.tplList.find(
|
|
|
|
+ (v) => v.id == this.extractConfig2.randomPaperId
|
|
|
|
+ );
|
|
this.randomTplInfo.paperStructType = item ? item.paperStructType : "";
|
|
this.randomTplInfo.paperStructType = item ? item.paperStructType : "";
|
|
|
|
|
|
let apiUrl = "/api/ecs_ques/paperStruct/1/10000";
|
|
let apiUrl = "/api/ecs_ques/paperStruct/1/10000";
|
|
@@ -478,20 +502,6 @@ export default {
|
|
this.curStructInfo.difficulty = structItem
|
|
this.curStructInfo.difficulty = structItem
|
|
? structItem.difficulty
|
|
? structItem.difficulty
|
|
: "";
|
|
: "";
|
|
-
|
|
|
|
- // this.$http
|
|
|
|
- // .post(
|
|
|
|
- // "/api/ecs_ques/randompaper/struct/question/view/info",
|
|
|
|
- // qs.stringify({
|
|
|
|
- // paperIds: this.randomTplInfo.paperIds.join(","),
|
|
|
|
- // structId: this.curStructInfo.paperStructId,
|
|
|
|
- // }),
|
|
|
|
- // {
|
|
|
|
- // headers: {
|
|
|
|
- // "content-type": "application/x-www-form-urlencoded",
|
|
|
|
- // },
|
|
|
|
- // }
|
|
|
|
- // )
|
|
|
|
this.$http
|
|
this.$http
|
|
.post("/api/ecs_ques/randompaper/struct/question/info", null, {
|
|
.post("/api/ecs_ques/randompaper/struct/question/info", null, {
|
|
params: { structId: this.curStructInfo.paperStructId },
|
|
params: { structId: this.curStructInfo.paperStructId },
|
|
@@ -504,22 +514,6 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- },
|
|
|
|
- //初始化
|
|
|
|
- async created() {
|
|
|
|
- // await this.getTplList();
|
|
|
|
- let extractConfigId = this.$route.params.extractConfigId;
|
|
|
|
- //1.查询考试集合
|
|
|
|
- this.getExams("");
|
|
|
|
- if (extractConfigId) {
|
|
|
|
- this.isInsert = true;
|
|
|
|
- //规则ID存在,表示是修改操作
|
|
|
|
- this.getExtractConfig(extractConfigId);
|
|
|
|
- } else {
|
|
|
|
- this.getTplList();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
async getTplList(id) {
|
|
async getTplList(id) {
|
|
let courseId = this.$route.query.courseId;
|
|
let courseId = this.$route.query.courseId;
|
|
let params = {
|
|
let params = {
|
|
@@ -538,6 +532,7 @@ export default {
|
|
}
|
|
}
|
|
);
|
|
);
|
|
this.tplList = res.data.content || [];
|
|
this.tplList = res.data.content || [];
|
|
|
|
+ this.getData();
|
|
} catch (e) {
|
|
} catch (e) {
|
|
this.$message.error("获取抽题模板失败");
|
|
this.$message.error("获取抽题模板失败");
|
|
}
|
|
}
|