Pārlūkot izejas kodu

智能出题提示

zhangjie 1 gadu atpakaļ
vecāks
revīzija
ee321bbbb2
1 mainītis faili ar 14 papildinājumiem un 1 dzēšanām
  1. 14 1
      src/modules/question/views/QuestionManage.vue

+ 14 - 1
src/modules/question/views/QuestionManage.vue

@@ -490,11 +490,24 @@ export default {
       this.questionImportData = data;
       this.$refs.QuestionImportEdit.open();
     },
-    toGPTQuestion() {
+    async toGPTQuestion() {
       if (!this.filter.courseId) {
         this.$message.error("请先选择课程!");
         return;
       }
+      let gptTips = sessionStorage.getItem("gptTips");
+      if (!gptTips) {
+        const confirm = await this.$confirm(
+          `请务必仔细阅读本协议内容,若您不同意本协议的任何内容,将无法使用该功能,智能出题功能借助AI工具来辅助出题,提高出题效率,减轻命题老师工作量,并不确保出题的正确性及适用性,请在出题后务必仔细检查核对,以免将有问题的试题加入试卷,用于考试。`,
+          "提示",
+          {
+            type: "warning",
+          }
+        ).catch(() => {});
+        if (confirm !== "confirm") return;
+        sessionStorage.setItem("gptTips", "true");
+      }
+
       this.$refs.GptQuestionDialog.open();
     },
   },