|
@@ -113,7 +113,7 @@
|
|
|
<el-form-item style="margin: 0">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- :loading="hasTaskRunning || loading"
|
|
|
+ :loading="hasTaskRunning || buildLoading"
|
|
|
@click="toProduct"
|
|
|
>生成试题</el-button
|
|
|
>
|
|
@@ -280,6 +280,7 @@ export default {
|
|
|
pageSize: 10,
|
|
|
total: 0,
|
|
|
curQuestion: {},
|
|
|
+ buildLoading: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -347,12 +348,14 @@ export default {
|
|
|
}, 3 * 1000);
|
|
|
},
|
|
|
async toProduct() {
|
|
|
- this.loading = true;
|
|
|
+ // this.loading = true;
|
|
|
+ this.buildLoading = true;
|
|
|
|
|
|
const res = await buildGptQuestionApi({ ...this.formModel }).catch(
|
|
|
() => {}
|
|
|
);
|
|
|
- this.loading = false;
|
|
|
+ // this.loading = false;
|
|
|
+ this.buildLoading = false;
|
|
|
if (!res) return;
|
|
|
|
|
|
this.curTaskId = res.data;
|
|
@@ -374,6 +377,7 @@ export default {
|
|
|
curPage: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
};
|
|
|
+ this.loading = true;
|
|
|
const res = await gptQuestionListApi(data).catch(() => {});
|
|
|
this.loading = false;
|
|
|
if (!res) return;
|