lsc 9 달 전
부모
커밋
7b25af7eac

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.adcbef7d959ee2b64a227fa008deccee.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.bba3ed5aca95350eeef8.js></script><script type=text/javascript src=./static/js/app.3b4e957d2711d9634599.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.fccd4ef08e8d7dc1575ebcc3a6c09b21.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.bba3ed5aca95350eeef8.js></script><script type=text/javascript src=./static/js/app.e0820094b5039de33461.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.adcbef7d959ee2b64a227fa008deccee.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.fccd4ef08e8d7dc1575ebcc3a6c09b21.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.fccd4ef08e8d7dc1575ebcc3a6c09b21.css.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.e0820094b5039de33461.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.e0820094b5039de33461.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 397 - 60
src/components/pages/aiAddCourse/addCourse.vue

@@ -934,7 +934,7 @@
                     检索资料
                     <div class="add_info_box" style="margin: 0 0 0 auto;align-items:center">
                       <input type="text" placeholder="请输入检索关键词" class="binfo_input" v-model="searchFileName" style="width: 200px;margin: 0 5px 10px 0;min-height: 36px;box-sizing: border-box;height: 36px;"/>
-                      <button class="c_pub_button_add" @click="findMatchingContents">
+                      <button class="c_pub_button_add" @click="startFindMatchingContents">
                         点击检索资料
                         <!-- <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
                           beforeUploadInfo2(
@@ -946,17 +946,18 @@
                     </div>
                   </div>
                 </div>
-                <div v-loading="knowInfoDataLoading" element-loading-text="小可正在努力生成中,请稍等..." :style="{ minHeight: knowInfoDataLoading ? '200px' : 'auto'}">
+                <div style="display: flex; align-items: center;">
+                  <div v-loading="knowInfoDataLoading" element-loading-text="小可正在努力生成中,请稍等..." style="height: 200px; width:100%;">
                   <div class="c_pub_button_confirm stopBtn" v-if="knowInfoDataLoading && isfindMatchingContents" @click="cancelAjax('findMatchingContents')">停止</div>
-                  <div class="add_chapters_box add_c_none" v-if="
-                    knowInfoData2 &&
-                    knowInfoData2.length == 0
+                  <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
+                    knowInfoData3 &&
+                    knowInfoData3.length == 0
                   ">
                     <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
-                    <span>暂时还没有内容,快去添加吧</span>
+                    <span>暂时还没有内容,快去检索吧</span>
                   </div>
-                  <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
-                    <div class="chapter_upload" v-for="(item1, index1) in knowInfoData2" :key="item1.id" @click="
+                  <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:100%;overflow: auto;" @scroll="panFind">
+                    <div class="chapter_upload" v-for="(item1, index1) in knowInfoData3" :key="item1.id" @click="
                             getChapterData(
                               $event,
                               index1,
@@ -968,7 +969,7 @@
                                     display: flex;
                                     align-items: center;
                                   ">
-                        <div class="chapter_upload_check file-loading-class" :class="{ checked: knowFileids2.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData2(item1.fileid)" v-loading="!item1.fileid"></div>
+                        <div class="chapter_upload_check file-loading-class" :class="{ checked: knowFileids3.indexOf(item1.url) != -1 }" @click="checkKnowInfoData3(item1.url)"></div>
                         <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
                           <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
                           <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
@@ -986,7 +987,9 @@
                           </div>
                         </div>
                         <div class="chapter_upload_n">
-                          <input readonly="true" v-if="
+                          <el-tooltip :content="item1.name" placement="top" effect="dark">
+                            <!-- content to trigger tooltip here -->
+                            <input readonly="true" v-if="
                             item1.type == 2 ||
                             item1.type == 3 ||
                             item1.type == 12 ||
@@ -1035,6 +1038,7 @@
                                       " readonly="true" @click="
                                         openUpdateSource(index1)
                                         " />
+                          </el-tooltip>
                         </div>
                         <div class="chapter_upload_ic">
                           <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
@@ -1043,13 +1047,132 @@
                             ">
                             <div></div>
                           </div>
-                          <div class="chapter_upload_ic_r" @click.stop="
-                            deleteKnowInfoData2(
+                          <!-- <div class="chapter_upload_ic_r" @click.stop="
+                            deleteKnowInfoData3(
                               $event,
                               index1
                             )
                             ">
                             <div></div>
+                          </div> -->
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                  </div>
+                  <div style="margin: 0 5px; min-width: fit-content">
+                    <button class="c_pub_button_confirm" @click="useUrl">
+                      使用
+                      <svg t="1730970226429" class="right_icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1465" width="128" height="128"><path d="M236.552013 926.853955a55.805997 55.805997 0 0 0 0 80.454996 59.682997 59.682997 0 0 0 82.794996 0l468.099978-455.081978a55.805997 55.805997 0 0 0 0-80.453996L319.348009 16.689999a59.682997 59.682997 0 0 0-82.794996 0 55.805997 55.805997 0 0 0 0 80.454996L663.401993 511.999975 236.624013 926.853955z" p-id="1466" fill="#ffffff"></path></svg>
+                    </button>
+                  </div>
+                  <div style="height: 200px; width:100%;">
+                    <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
+                      knowInfoData2 &&
+                      knowInfoData2.length == 0
+                    ">
+                      <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
+                      <span>暂时还没有内容,快去添加吧</span>
+                    </div>
+                    <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:100%;overflow: auto;" ref="rightKnow">
+                      <div class="chapter_upload" v-for="(item1, index1) in knowInfoData2" :key="item1.id" @click="
+                              getChapterData(
+                                $event,
+                                index1,
+                                item1.type
+                              )
+                              " >
+                        <div class="chapter_upload_o" style="
+                                      position: relative;
+                                      display: flex;
+                                      align-items: center;
+                                    ">
+                          <div class="chapter_upload_check file-loading-class" :class="{ checked: knowFileids2.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData2(item1.fileid)" v-loading="!item1.fileid"></div>
+                          <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
+                            <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
+                            <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
+                            </div>
+                            <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
+                            </div>
+                            <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
+                            <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
+                            </div>
+                            <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
+                            </div>
+                            <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
+                            </div>
+                            <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
+                            </div>
+                          </div>
+                          <div class="chapter_upload_n">
+                            <el-tooltip :content="item1.name" placement="top" effect="dark">
+                              <!-- content to trigger tooltip here -->
+                              <input readonly="true" v-if="
+                              item1.type == 2 ||
+                              item1.type == 3 ||
+                              item1.type == 12 ||
+                              item1.type == 13 ||
+                              item1.type == 7
+                            " :placeholder="item1.name"  @click.stop="
+                              checkChpater3($event, index1, item1)
+                              " style="
+                                          border: none;
+                                          outline: none;
+                                          width: 80%;
+                                          minwidth: 215px;
+                                          z-index: 99;
+                                          font-size: 14px;
+                                          white-space: nowrap;
+                                          overflow: hidden;
+                                          text-overflow: ellipsis;
+                                        " />
+                            <input :placeholder="item1.name" v-if="item1.type == 6" style="
+                                          border: none;
+                                          outline: none;
+                                          width: 80%;
+                                          white-space: nowrap;
+                                          overflow: hidden;
+                                          text-overflow: ellipsis;
+                                        " readonly="true" @click="
+                                          selectAttText(index1)
+                                          " />
+                            <input :placeholder="item1.title ? item1.title : '链接'
+                              " v-if="item1.type == 8" style="
+                                          border: none;
+                                          outline: none;
+                                          width: 80%;
+                                          white-space: nowrap;
+                                          overflow: hidden;
+                                          text-overflow: ellipsis;
+                                        " readonly="true" @click="selectLine(index1)" />
+                            <input :placeholder="item1.title ? item1.title : '链接'
+                              " v-if="item1.type == 14" style="
+                                          border: none;
+                                          outline: none;
+                                          width: 80%;
+                                          white-space: nowrap;
+                                          overflow: hidden;
+                                          text-overflow: ellipsis;
+                                        " readonly="true" @click="
+                                          openUpdateSource(index1)
+                                          " />
+                            </el-tooltip>
+                          </div>
+                          <div class="chapter_upload_ic">
+                            <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
+                            <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
+                              checkChpater3($event, index1, item1)
+                              ">
+                              <div></div>
+                            </div>
+                            <div class="chapter_upload_ic_r" @click.stop="
+                              deleteKnowInfoData2(
+                                $event,
+                                index1
+                              )
+                              ">
+                              <div></div>
+                            </div>
                           </div>
                         </div>
                       </div>
@@ -2472,8 +2595,9 @@
                     v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="margin-left: auto;border: none;">
                     {{ steps == 4 ? "返回课程" : "上一步" }}
                   </button>
-                  <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog2(2, 'aiTask3','all'), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</button>
-                  <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="allEvaCan(), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有评价按钮`)" v-if="panTaskElist() == 0 && panEvaCont() == 0">一键生成所有评价</button>
+                  <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</button>
+                  <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)" v-if="panTool() == 0">一键生成所有工具</button>
+                  <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="allEvaCan(), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有评价按钮`)" v-if="panTool() > 0 && panTaskElist() == 0 && panEvaCont() == 0">一键生成所有评价</button>
                   <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案</button>
                   <button class="c_pub_button_confirm" style="margin: 0 0 0 10px;" v-if="steps < 4 && istemplate != 1" @click="nextSteps">
                     {{ steps == 3 ? "确认上传" : "下一步" }}
@@ -3744,32 +3868,21 @@
                           !unitJson[unitIndex].easy
                         " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" element-loading-text="小可正在努力生成中,请稍等...">
                           <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" @click="cancelAjax('aiTaskGL2', itemTaskIndex)">停止</div>
-                           <div v-if="
-                            unitJson[unitIndex].easy != 3 &&
-                            !(
-                              unitJson[unitIndex].easy == 5 &&
-                              itemTask.taskType == 1
-                            )
-                          " style="
-                              flex-direction: row;
-                              justify-content: flex-start;
-                              align-items: center;
-                            ">
+                           <div style="width: 100%">
                             <div style="
                                 display: flex;
                                 flex-direction: row;
                                 align-items: center;
                                 margin: 5px 0 20px;
+                                width: 100%
                               ">
-                              <div class="lineTitle clineTitle">
-                                {{
-                                !unitJson[unitIndex].easy ||
-                                unitJson[unitIndex].easy == 6 ||
-                                easyArray.indexOf(unitJson[unitIndex].easy) !=
-                                -1
-                                ? "练习内容"
-                                : "评价内容"
-                                }}
+                              <div class="lineTitle clineTitle" style="width: 100%">
+                                <span>练习内容</span>
+                                <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                                  <div class="r_pub_button_op" style="margin-left:auto;"
+                                    @contextmenu.prevent="openAiDialog(1, 'aiTaskG2', itemTaskIndex)"
+                                    @click="openAiDialog(2, 'aiTaskG2', itemTaskIndex)">{{ panDanTool(itemTask) > 0 ? '重新生成工具' : '生成工具' }}</div>
+                                </el-tooltip>
                               </div>
                               <!-- <div class="line" style="width: 90%"></div> -->
                             </div>
@@ -7729,12 +7842,17 @@ export default {
       knowFileids: [],
       searchFileName: "",
       knowInfoDataLoading: false,
+      isfindMatchingContents: null,
+      findMatchingContentsPage: 1,
+      findMatchingContentsFinish: false,
       knowInfoData2: [],
       knowinfoproVisible2: false,
       knowinfoisFinishSize2: 0,
       knowinfoisAllSize2: 0,
       knowinfoprogress2: 0,
       knowFileids2: [],
+      knowInfoData3: [],
+      knowFileids3: [],
       pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
       pjIndex: [52, 48, 1, 3, 16, 45, 47, 41],
       taskAnLoading: [],
@@ -7994,6 +8112,31 @@ export default {
         return ppts;
       };
     },
+    panDanTool(){
+      return function (array) {
+        let count = 0;
+        for(var i = 0; i < array.toolChoose.length; i++){
+          if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
+            count++
+          }
+        }
+        return count;
+      };
+    },
+    panTool(){
+      return function () {
+        let count = 0;
+        for(var j = 0; j < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; j++){
+          let array = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[j]
+          for(var i = 0; i < array.toolChoose.length; i++){
+            if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
+              count++
+            }
+          }
+        }
+        return count;
+      };
+    }
   },
   watch: {
     unitIndex(newValue, oldValue) {
@@ -11802,6 +11945,13 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
         this.knowFileids2.splice(this.knowFileids2.indexOf(fileid), 1)
       }
     },
+    checkKnowInfoData3(fileid){
+      if(this.knowFileids3.indexOf(fileid) == -1){
+        this.knowFileids3.push(fileid)
+      }else {
+        this.knowFileids3.splice(this.knowFileids3.indexOf(fileid), 1)
+      }
+    },
     deleteInfoData(e, ic) {
       e.stopPropagation();
       let _this = this;
@@ -16541,7 +16691,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
         }
       }
     },
-    setCover(attempts = 0) {
+    setCover($event, attempts = 0) {
       var _this = this;
       if (_this.cover.length || attempts >= 3) {
         return;
@@ -16571,12 +16721,12 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
             _this.imageloading2 = false;
           }else {
             _this.imageloading2 = false;
-            _this.setCover(attempts + 1);
+            _this.setCover($event, attempts + 1);
           }
         })
         .catch(function (error) {
           _this.imageloading2 = false;
-          _this.setCover(attempts + 1);
+          _this.setCover($event, attempts + 1);
           console.log(error);
         });
     },
@@ -17501,12 +17651,12 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
       }
       let pan2 = 1
       let taskJson = this.unitJson[0].chapterInfo[0].taskJson
-      for(var index = 0; index < taskJson.length; index++){
-        for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
-          if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
-            if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
+      for(var _index = 0; _index < taskJson.length; _index++){
+        for (var j = 0; j < taskJson[_index].toolChoose.length; j++) {
+          if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[_index].toolChoose[j].tool[0]) != -1){
+            if(this.$refs['evalist'+_index+j] && this.$refs['evalist'+_index+j][0].loading){
               this.$message({
-                message: `请等待任务${index+1}回答完毕后再继续`,
+                message: `请等待任务${_index+1}回答完毕后再继续`,
                 type: "warning"
               });
               pan2 = 2
@@ -17674,6 +17824,17 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
         this.aitype = type
         this.aiText = this.aiJson.aiTaskG3
         this.aiCallBack = callback
+      } else if (type == "aiTaskG2") {
+        if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][1])) {
+          this.$message({
+            message: "请回答完毕后再次发送",
+            type: "warning"
+          });
+          return;
+        }
+        this.aitype = type
+        this.aiText = this.aiJson.aiTaskG2
+        this.aiCallBack = callback
       } else if (type == "aiDetail1") {
         if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
           this.$message({
@@ -18199,7 +18360,7 @@ ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid
               this.taskGLoading[_task] = []
             }
             this.taskGLoading[_task][0] = true
-            this.taskGLoading[_task][1] = true
+            // this.taskGLoading[_task][1] = true
             // this.taskGLoading[_task][2] = true
 
             // this.aiGetG323(message3, _task)
@@ -18291,7 +18452,8 @@ ${msg3}
 {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
 
               _this.aiGetG321(message1, ij, (callback2) => {
-                _this.aiGetG322(message2, ij, callback2);
+                // _this.aiGetG322(message2, ij, callback2);
+                callback2 ? callback2() : ''
               }, () => {
                 // 回调函数,当前任务完成后执行
                 ij++;
@@ -18386,10 +18548,11 @@ ${msg3}
             this.taskGLoading[this.aiCallBack[0]] = []
           }
           this.taskGLoading[this.aiCallBack[0]][0] = true
-          this.taskGLoading[this.aiCallBack[0]][1] = true
+          // this.taskGLoading[this.aiCallBack[0]][1] = true
           // this.taskGLoading[this.aiCallBack[0]][2] = true
           this.aiGetG321(message1, this.aiCallBack[0], () => {
-            this.aiGetG322(message2, this.aiCallBack[0])
+            // this.aiGetG322(message2, this.aiCallBack[0])
+            this.aiCallBack[0] ? this.aiCallBack[0]() : ''
           })
           // this.aiGetG323(message3, this.aiCallBack[0])
         }
@@ -18421,6 +18584,106 @@ ${msg3}
           this.taskGLoading[this.aiCallBack][2] = true
           this.aiGetG323(message3, this.aiCallBack)
 
+      } else if (this.aitype == "aiTaskG2") {
+        if(this.aiCallBack == 'all'){
+          for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
+            if(!this.taskGLoading[_task]){
+              this.taskGLoading[_task] = []
+            }
+            this.taskGLoading[_task][1] = true
+
+          }
+
+          let ij = 0;
+          let _this = this
+          function processNext() {
+            if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
+              if(!_this.taskGLoading[ij][1]){
+                ij++;
+                processNext();
+                return;
+              }
+let message2 = `NOTICE
+Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
+Language: ${_this.getLang()}
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
+Instruction: Based on the context, follow "Format example", write content.
+
+# Context
+## 要求
+${msg2} 
+
+## 参考资料
+教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
+
+# 输出格式与要求
+互动工具列表
+工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
+工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
+
+工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
+工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
+
+工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
+工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
+
+${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
+
+# Format example
+{"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
+
+              _this.aiGetG322(message2, ij, () => {
+                // 回调函数,当前任务完成后执行
+                ij++;
+                processNext(); // 处理下一个任务
+              });
+            }
+          }
+
+          processNext(); // 启动处理
+
+
+        }else{
+
+let message2 = `NOTICE
+Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
+Language: ${this.getLang()}
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
+Instruction: Based on the context, follow "Format example", write content.
+
+# Context
+## 要求
+${msg2} 
+
+## 参考资料
+教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
+
+# 输出格式与要求
+互动工具列表
+工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
+工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
+
+工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
+工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
+
+工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
+工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
+
+${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
+
+# Format example
+{"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
+
+          if(!this.taskGLoading[this.aiCallBack]){
+            this.taskGLoading[this.aiCallBack] = []
+          }
+          // this.taskGLoading[this.aiCallBack[0]][0] = true
+          // this.taskGLoading[this.aiCallBack[0]][1] = true
+          this.taskGLoading[this.aiCallBack][1] = true
+          this.aiGetG322(message2, this.aiCallBack)
+        }
       } else if (this.aitype == "aiDetail1") {
         this.aiDetail(msg, this.aiIndex)
       } else if (this.aitype == "aiDetail2") {
@@ -19297,6 +19560,9 @@ ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考
         if(this.knowInfoDataLoading){
           this.knowInfoDataLoading = false
         }
+        if(this.findMatchingContentsPage > 1){
+          this.findMatchingContentsPage --
+        }
         this.$forceUpdate()
       }
     },
@@ -24672,6 +24938,64 @@ ${msg}
         console.log(e);
       });
     },
+    async useUrl(){
+      if(!this.knowFileids3.length){
+        this.$message.error('请选择要使用的检索资料')
+        return
+      }
+      let array = []
+      for(var i = 0; i < this.knowFileids3.length; i++){
+        let item = this.knowFileids3[i]
+        for(var j = 0; j < this.knowInfoData3.length; j++){
+          if(item == this.knowInfoData3[j].url){
+            let isExist = this.knowInfoData2.some(item => item.name === this.knowInfoData3[j].name);
+            if (!isExist) {
+              this.knowInfoData2.push(this.knowInfoData3[j]);
+            }
+          }
+        }
+      }
+      this.$nextTick(() => {
+        this.$refs.rightKnow.scrollTop = this.$refs.rightKnow.scrollHeight;
+      });
+      this.knowFileids3 = ''
+      for (let i = 0; i < this.knowInfoData2.length; i++) {
+        if (!this.knowInfoData2[i].fileid) {
+          let fileid = await this.createFileid(this.knowInfoData2[i].url)
+          this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
+          console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
+          if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
+            this.knowFileids2.push(fileid)
+          }
+        }
+      }
+
+
+    },
+    panFind(event) {
+      if(!this.findMatchingContentsFinish){
+        const { scrollTop, clientHeight, scrollHeight } = event.target;
+        // 判断是否触底
+        if (scrollTop + clientHeight >= scrollHeight - 5 && !this.knowInfoDataLoading) {
+          this.findMatchingContentsPage++
+          this.findMatchingContents(); // 调用下拉刷新方法
+        }
+      }
+    },
+    startFindMatchingContents(){
+      if(!this.searchFileName){
+        this.$message.error('请输入检索关键词')
+        return
+      }
+      if(this.knowInfoDataLoading){
+        this.$message.error('检索中请稍后')
+        return
+      }
+      this.findMatchingContentsFinish = false
+      this.findMatchingContentsPage = 1
+      this.knowInfoData3 = []
+      this.findMatchingContents(); // 调用下拉刷新方法
+    },
     findMatchingContents(){
       if(!this.searchFileName){
         this.$message.error('请输入检索关键词')
@@ -24696,10 +25020,11 @@ ${msg}
       let params = {
         type: sub.join(","),
         string: this.searchFileName,
+        page: this.findMatchingContentsPage
       };
       let md = new MarkdownIt();
       this.isfindMatchingContents = this.ajax.setCancelSource()
-      this.ajax.get(this.$store.state.api + 'findMatchingContents', params, this.isfindMatchingContents).then(async res => {
+      this.ajax.get(this.$store.state.api + 'findMatchingContentsPage', params, this.isfindMatchingContents).then(async res => {
         console.log(res)
         this.isfindMatchingContents = null
         this.knowInfoDataLoading = false
@@ -24728,10 +25053,10 @@ ${msg}
             } else {
                 _type = 12;
             }
-            let isExist = this.knowInfoData2.some(item => item.name === el.title);
+            let isExist = this.knowInfoData3.some(item => item.name === el.title);
             if (!isExist) {
               // let fileid = await this.createFileid(url)
-              this.knowInfoData2.push({
+              this.knowInfoData3.push({
                 name: el.title,
                 url: url,
                 uid: '',
@@ -24744,16 +25069,17 @@ ${msg}
               // }
             }
           }
-          for (let i = 0; i < this.knowInfoData2.length; i++) {
-            if (!this.knowInfoData2[i].fileid) {
-              let fileid = await this.createFileid(this.knowInfoData2[i].url)
-              this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
-              console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
-              if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
-                this.knowFileids2.push(fileid)
-              }
-            }
-          }
+          // for (let i = 0; i < this.knowInfoData3.length; i++) {
+          //   if (!this.knowInfoData2[i].fileid) {
+          //     let fileid = await this.createFileid(this.knowInfoData2[i].url)
+          //     this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
+          //     console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
+          //     if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
+          //       this.knowFileids2.push(fileid)
+          //     }
+          //   }
+          // }
+
           // let data = {
           //   target:{
           //     files: files
@@ -24762,7 +25088,11 @@ ${msg}
           // console.log(data)
           // this.beforeUploadInfo2(data, 20)
         }else{
-          this.$message.error('未检索出内容')
+          if(this.findMatchingContentsPage == 1){
+            this.$message.error('未检索出内容')
+          }else {
+            this.findMatchingContentsFinish = true
+          }
         }
       }).catch(e => {
         console.log('查询失败');
@@ -29561,4 +29891,11 @@ ol {
 .button-toggle:focus {
     outline: none; /* 去掉聚焦时的边框 */
 }
+
+
+.right_icon{
+  width: 12px;
+  height: 12px;
+  margin-left: 5px;
+}
 </style>

+ 137 - 15
src/components/pages/aiAddCourse/record.vue

@@ -1,5 +1,30 @@
 <template>
   <div class="record_box">
+    <div class="ca-b-o-main2" style="height: 25px;">
+      <div class="select_box" v-if="audioUrlArray.length">
+        <span>音频:</span>
+        <el-select v-model="audioUrl">
+          <el-option v-for="(item, index) in audioUrlArray" :key="index" :label="'音频'+(index+1)" :value="item">
+            <div class="selectBox">
+              <span>{{ '音频'+(index+1) }}</span>
+              <div class="controlsBox">
+                <span class="delSelect" @click.stop="delAudio(index)"></span>
+              </div>
+            </div>
+          </el-option>
+        </el-select>
+      </div>
+      <div class="select_box">
+        <span>语言:</span>
+        <el-select v-model="languageRadio">
+          <el-option v-for="item in languageList"
+            :key="item.label"
+            :label="item.lang"
+            :value="item.label">
+          </el-option>
+        </el-select>
+      </div>
+    </div>
     <div class="ca-b-o-main">
       <div
         class="ca-b-o-m-tape"
@@ -164,17 +189,51 @@ export default {
     videoText(newValue) {
       this.$emit("update:videoText2", newValue);
     },
-    audioUrl(newValue) {
-      this.$emit("update:audioUrl2", newValue);
+    // audioUrl(newValue) {
+    //   this.$emit("update:audioUrl2", newValue);
+    // },
+    audioUrlArray(newValue) {
+      this.$emit("update:audioUrl2", newValue.join(','));
     },
     videoText2(newValue) {
       this.videoText = newValue;
+    },
+    audioUrl2(newVal){
+      if(newVal){
+        this.audioUrlArray = newVal.split(",")
+        this.audioUrl = newVal.split(",")[0]
+        this.controlsStatus = 2
+      }
     }
   },
   mounted() {
     this.videoText = this.videoText2;
   },
   methods: {
+    delAudio(index){
+      
+      this.$confirm("是否确定删掉此音频?", "提醒", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+        .then(() => {
+          if(this.audioUrl == this.audioUrlArray[index] && this.audioUrlArray.length > 1){
+            this.audioUrlArray.splice(index, 1)
+            this.audioUrl = this.audioUrlArray[0]
+          }else {
+            this.audioUrlArray.splice(index, 1)
+          }
+          if(!this.audioUrlArray.length){
+            this.audioUrl = ''
+            this.controlsStatus = 0
+          }
+        })
+        .catch(e => {
+          console.log(e);
+          console.log("不顶替");
+        });
+    },
     updateRecordedTime({ duration }) {
       // 更新currentTime,将秒数转换为时分秒格式
       let hours = Math.floor(duration / 3600);
@@ -193,20 +252,20 @@ export default {
       if (this.uploadFileLoading) return this.$message.info("请稍等...");
       // 开始录音
       if (this.audioUrl) {
-        this.$confirm("是否删掉此音频并开始录音?", "提醒", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
+        // this.$confirm("是否删掉此音频并开始录音?", "提醒", {
+        //   confirmButtonText: "确定",
+        //   cancelButtonText: "取消",
+        //   type: "warning"
+        // })
+        //   .then(() => {
             this.recordedForm.status = 0;
-            this.audioUrl = "";
+            // this.audioUrl = "";
             this.onClickStartRecord();
-          })
-          .catch(e => {
-            console.log(e);
-            console.log("不顶替");
-          });
+          // })
+          // .catch(e => {
+          //   console.log(e);
+          //   console.log("不顶替");
+          // });
       } else if (this.controlsStatus != 1 && this.recordedForm.status == 0) {
         this.controlsStatus = 1;
         this.recordedForm.status = 1;
@@ -842,7 +901,7 @@ export default {
 .text_box {
   width: calc(100% - 20px);
   margin: 0 auto;
-  height: calc(100% - 75px);
+  height: calc(100% - 105px);
 }
 
 .binfo_input {
@@ -907,4 +966,67 @@ export default {
 .audio_class >>> .slider .process {
   background: #000;
 }
+
+
+.ca-b-o-main2 {
+  width: calc(100% - 20px);
+  height: 50px;
+  margin: 10px auto;
+  /* border-radius: 5px; */
+  transition: 0.3s;
+  position: relative;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+.select_box >>> .el-inpu__inner{
+  border: none;
+}
+
+.select_box{
+  width: 150px;
+  display: flex;
+  align-items: center;
+}
+
+.select_box > span{
+  min-width: fit-content;
+}
+
+.select_box + .select_box{
+  margin-left: 10px;
+}
+
+.selectBox {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.controlsBox {
+  display: flex;
+  align-items: center;
+  width: auto;
+  height: 100%;
+  display: none;
+}
+
+.selectBox:hover > .controlsBox {
+  display: flex;
+}
+
+.delSelect {
+  width: 16px;
+  height: 16px;
+  /* display: none; */
+  align-items: center;
+  justify-content: center;
+  background: url("../../../assets/icon/classroomObservation/del.svg") no-repeat;
+  background-size: 100% 100%;
+  box-sizing: border-box;
+  /* transform: translateY(7px); */
+}
 </style>

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.