|
@@ -106,7 +106,7 @@ import TextAnswerQuestion from "./edit/TextAnswerQuestion.vue";
|
|
|
import { randomCode } from "@/plugins/utils";
|
|
|
import {
|
|
|
buildGptQuestionApi,
|
|
|
- gptQuestionListApi,
|
|
|
+ gptRebuildQuestionListApi,
|
|
|
updateGptQuestionApi,
|
|
|
gptTaskDetailApi,
|
|
|
} from "../api";
|
|
@@ -238,7 +238,7 @@ export default {
|
|
|
|
|
|
const res = await buildGptQuestionApi({
|
|
|
...this.formModel,
|
|
|
- sideQuestionId: this.questionModel.id,
|
|
|
+ insteadQuestionId: this.question.id,
|
|
|
}).catch(() => {});
|
|
|
this.buildLoading = false;
|
|
|
if (!res) return;
|
|
@@ -278,15 +278,11 @@ export default {
|
|
|
}, 3 * 1000);
|
|
|
},
|
|
|
async getResult() {
|
|
|
- let data = {
|
|
|
- courseId: this.formModel.courseId,
|
|
|
- taskId: this.curTaskId,
|
|
|
- curPage: 1,
|
|
|
- pageSize: 1,
|
|
|
- };
|
|
|
- const res = await gptQuestionListApi(data).catch(() => {});
|
|
|
+ const res = await gptRebuildQuestionListApi(this.curTaskId).catch(
|
|
|
+ () => {}
|
|
|
+ );
|
|
|
if (!res) return;
|
|
|
- this.initData(res.data.content[0]);
|
|
|
+ this.initData(res.data);
|
|
|
},
|
|
|
async confirm() {
|
|
|
const valid = await this.$refs.QuestionEditDetail.validate().catch(
|
|
@@ -298,7 +294,10 @@ export default {
|
|
|
this.confirmLoading = true;
|
|
|
|
|
|
let questionModel = this.$refs.QuestionEditDetail.getData();
|
|
|
- const res = await updateGptQuestionApi(questionModel).catch(() => {});
|
|
|
+ const res = await updateGptQuestionApi({
|
|
|
+ ...questionModel,
|
|
|
+ propertyIdList: this.formModel.propertyIdList,
|
|
|
+ }).catch(() => {});
|
|
|
this.confirmLoading = false;
|
|
|
if (!res) return;
|
|
|
|