lsc 11 hónapja
szülő
commit
1bb76f1675

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.b15c606c2c3c75d23446067eca1a80a0.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.2083f798ac1be94cad3d.js></script><script type=text/javascript src=./static/js/app.8824253937bc506613d1.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.5218608b6599c7d624044515b93a5545.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.3cd0a0187ca1f70ded67.js></script><script type=text/javascript src=./static/js/app.d97a9c888e4604495f4e.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/css/app.5218608b6599c7d624044515b93a5545.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/css/app.5218608b6599c7d624044515b93a5545.css.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/app.d97a9c888e4604495f4e.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/app.d97a9c888e4604495f4e.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/vendor.3cd0a0187ca1f70ded67.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/vendor.3cd0a0187ca1f70ded67.js.map


+ 2 - 2
package-lock.json

@@ -8644,7 +8644,7 @@
     },
     "node_modules/markdown-it": {
       "version": "14.1.0",
-      "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz",
+      "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz",
       "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==",
       "dependencies": {
         "argparse": "^2.0.1",
@@ -26129,7 +26129,7 @@
     },
     "markdown-it": {
       "version": "14.1.0",
-      "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz",
+      "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz",
       "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==",
       "requires": {
         "argparse": "^2.0.1",

+ 117 - 107
src/components/pages/aiAddCourse/addCourse.vue

@@ -5335,6 +5335,7 @@ export default {
       taskDetailLoading2: [],
       taskDetailLoading3: [],
       taskDetailLoading4: [],
+      dArray: {},
     };
   },
   directives: {
@@ -6071,32 +6072,123 @@ export default {
             this.$forceUpdate();
             return
           }
-
           this.loading = true
-          setTimeout(() => {
-            this.loading = false
-            this.steps = 3;
-          }, 0)
-          this.isClickColor = 1;
-          this.unitJson[
-            this.unitIndex
-          ].chapterInfo[0].taskJson[0].toolOpen = true;
-          this.$forceUpdate();
-          setTimeout(() => {
-            this.checkEva(this.checkId);
+
+          const functionA = () => {
+            setTimeout(() => {
+              this.loading = false
+              this.steps = 3;
+            }, 0)
+            this.isClickColor = 1;
+            this.unitJson[
+              this.unitIndex
+            ].chapterInfo[0].taskJson[0].toolOpen = true;
+            this.$forceUpdate();
             setTimeout(() => {
               this.checkEva(this.checkId);
-            }, 100);
-          }, 1000);
-          if (this.cid == "" || this.cid == undefined) {
-            this.addWork();
-          } else {
-            if (this.userid != this.courseUserid && this.role != "1") {
-              this.updateWork2();
+              setTimeout(() => {
+                this.checkEva(this.checkId);
+              }, 100);
+            }, 1000);
+            if (this.cid == "" || this.cid == undefined) {
+              this.addWork();
             } else {
-              this.updateWork();
+              if (this.userid != this.courseUserid && this.role != "1") {
+                this.updateWork2();
+              } else {
+                this.updateWork();
+              }
             }
           }
+
+          if(this.cid){
+            functionA()
+          }else {
+            let url = []
+              if (this.infoData.length) {
+                for (var i = 0; i < this.infoData.length; i++) {
+                  url.push(this.infoData[i].url)
+                }
+              }
+            let msg = `
+            ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
+
+            --------
+            ## 要求
+            请根据${JSON.stringify(this.dArray)}以及##补充参考资料。输出格式和内容要求参考##输出格式与要求
+
+            --------
+            ## 输出格式与要求
+            [
+              {
+                detail: "面向学生的任务描述",
+                elist:[
+                  {"value":"评价名字1","detail":"评价维度1","score":5},
+                  {"value":"评价名字2","detail":"评价维度2","score":5},
+                  {"value":"评价名字3","detail":"评价维度3","score":5}
+                ],//至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
+                toolChoose: [
+                  {
+                    tool: "工具", //电子白板,文档,思维导图,表格,作业提交中选择其中一个工具
+                    detail: "工具描述"
+                  }
+                ] //可0~2个工具
+              }
+            ]
+
+            --------
+            ## 补充参考资料
+            补充资料:${url.join(",")}
+            补充描述:${this.courseText2}
+
+            --------
+            ## 示例
+            [
+              {
+                detail: "面向学生的任务描述",
+                elist:[
+                  {"value":"评价名字1","detail":"评价维度1", "score": 5},
+                  {"value":"评价名字2","detail":"评价维度2", "score": 5},
+                  {"value":"评价名字3","detail":"评价维度3", "score": 5}
+                ],
+                toolChoose: [
+                  {
+                    tool:"电子白板", 
+                    detail: "工具描述"
+                  },
+                  {
+                    tool:"思维大图", 
+                    detail: "工具描述"
+                  }
+                ]
+              },
+              {
+                detail: "面向学生的任务描述",
+                elist:[
+                  {"value":"评价名字1","detail":"评价维度1", "score": 5},
+                  {"value":"评价名字2","detail":"评价维度2", "score": 5},
+                  {"value":"评价名字3","detail":"评价维度3", "score": 5}
+                ],
+                toolChoose: []
+              },
+              {
+                detail: "面向学生的任务描述",
+                elist:[
+                  {"value":"评价名字1","detail":"评价维度1", "score": 5},
+                  {"value":"评价名字2","detail":"评价维度2", "score": 5},
+                  {"value":"评价名字3","detail":"评价维度3", "score": 5}
+                ],
+                toolChoose: [
+                  {
+                    tool:"文档", 
+                    detail: "工具描述"
+                  }
+                ]
+              }
+            ]`
+            this.aiGet3(msg, functionA)
+          }
+          
         } else {
           this.$message.error("请补充填写课程名称");
           return;
@@ -12368,6 +12460,7 @@ export default {
         if (data.choices && data.choices.length && data.choices[0].message) {
           console.log(data.choices[0].message.content);
           let dArray = JSON.parse(data.choices[0].message.content)
+          _this.dArray = dArray
           _this.unitJson[0].chapterInfo[0].taskJson = []
 
           for (var i = 0; i < dArray.length; i++) {
@@ -12399,91 +12492,8 @@ export default {
           }
           _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
           _this.$forceUpdate();
-          let url = []
-            if (_this.infoData.length) {
-              for (var i = 0; i < this.infoData.length; i++) {
-                url.push(_this.infoData[i].url)
-              }
-            }
-          let msg = `
-          ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
-
-          --------
-          ## 要求
-          请根据${JSON.stringify(dArray)}以及##补充参考资料。输出格式和内容要求参考##输出格式与要求
-
-          --------
-          ## 输出格式与要求
-          [
-            {
-              detail: "面向学生的任务描述",
-              elist:[
-                {"value":"评价名字1","detail":"评价维度1","score":5},
-                {"value":"评价名字2","detail":"评价维度2","score":5},
-                {"value":"评价名字3","detail":"评价维度3","score":5}
-              ],//至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
-              toolChoose: [
-                {
-                  tool: "工具", //电子白板,文档,思维导图,表格,作业提交中选择其中一个工具
-                  detail: "工具描述"
-                }
-              ] //可0~2个工具
-            }
-          ]
-
-          --------
-          ## 补充参考资料
-          补充资料:${url.join(",")}
-          补充描述:${_this.courseText2}
-
-          --------
-          ## 示例
-          [
-            {
-              detail: "面向学生的任务描述",
-              elist:[
-                {"value":"评价名字1","detail":"评价维度1", "score": 5},
-                {"value":"评价名字2","detail":"评价维度2", "score": 5},
-                {"value":"评价名字3","detail":"评价维度3", "score": 5}
-              ],
-              toolChoose: [
-                {
-                  tool:"电子白板", 
-                  detail: "工具描述"
-                },
-                {
-                  tool:"思维大图", 
-                  detail: "工具描述"
-                }
-              ]
-            },
-            {
-              detail: "面向学生的任务描述",
-              elist:[
-                {"value":"评价名字1","detail":"评价维度1", "score": 5},
-                {"value":"评价名字2","detail":"评价维度2", "score": 5},
-                {"value":"评价名字3","detail":"评价维度3", "score": 5}
-              ],
-              toolChoose: []
-            },
-            {
-              detail: "面向学生的任务描述",
-              elist:[
-                {"value":"评价名字1","detail":"评价维度1", "score": 5},
-                {"value":"评价名字2","detail":"评价维度2", "score": 5},
-                {"value":"评价名字3","detail":"评价维度3", "score": 5}
-              ],
-              toolChoose: [
-                {
-                  tool:"文档", 
-                  detail: "工具描述"
-                }
-              ]
-            }
-          ]`
-
-          _this.aiGet3(msg, callback)
         }
+        callback ? callback() : ''
       }).catch(function (error) {
         _this.loading = false
         console.log(error);
@@ -12531,9 +12541,9 @@ export default {
               for(var j = 0;j < _task.toolChoose.length; j++){
                 _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
                   {
-                    tool: [toolsJson[_task.toolChoose[j].tool].tool],
+                    tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
                     toolDetail: _task.toolChoose[j].detail,
-                    toolType: toolsJson[_task.toolChoose[j].tool].type,
+                    toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
                     askCount: 1,
                     askTitle: "",
                     askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
@@ -12746,7 +12756,7 @@ export default {
         let data = response.data.FunctionResponse
         if (data.choices && data.choices.length && data.choices[0].message) {
           console.log(data.choices[0].message.content);
-          _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].elist = JSON.parse(data.choices[0].message.content)
+          _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
           _this.$forceUpdate()
         }
         _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott