lsc 11 kuukautta sitten
vanhempi
commit
223295e78f

+ 1 - 1
dist/index.html

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

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.9c289aa22e03761df7b379bb8659bc6b.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.9c289aa22e03761df7b379bb8659bc6b.css.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.6b9120af1b6288e216b3.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.6b9120af1b6288e216b3.js.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/manifest.0ad6c5648a38a6d1fa8f.js.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/vendor.a82b79982b082928b294.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/vendor.a82b79982b082928b294.js.map


+ 41 - 0
package-lock.json

@@ -43,6 +43,7 @@
         "qrcodejs2": "^0.0.2",
         "qrcodejs2": "^0.0.2",
         "qs": "^6.10.1",
         "qs": "^6.10.1",
         "relation-graph": "^1.1.0",
         "relation-graph": "^1.1.0",
+        "turndown": "^7.2.0",
         "v-viewer": "^1.6.4",
         "v-viewer": "^1.6.4",
         "vant": "^2.12.10",
         "vant": "^2.12.10",
         "vue": "^2.5.2",
         "vue": "^2.5.2",
@@ -194,6 +195,11 @@
         "@jridgewell/sourcemap-codec": "^1.4.14"
         "@jridgewell/sourcemap-codec": "^1.4.14"
       }
       }
     },
     },
+    "node_modules/@mixmark-io/domino": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmmirror.com/@mixmark-io/domino/-/domino-2.2.0.tgz",
+      "integrity": "sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw=="
+    },
     "node_modules/@npmcli/fs": {
     "node_modules/@npmcli/fs": {
       "version": "1.1.1",
       "version": "1.1.1",
       "resolved": "https://registry.npmmirror.com/@npmcli/fs/-/fs-1.1.1.tgz",
       "resolved": "https://registry.npmmirror.com/@npmcli/fs/-/fs-1.1.1.tgz",
@@ -16743,6 +16749,14 @@
         "node": "*"
         "node": "*"
       }
       }
     },
     },
+    "node_modules/turndown": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmmirror.com/turndown/-/turndown-7.2.0.tgz",
+      "integrity": "sha512-eCZGBN4nNNqM9Owkv9HAtWRYfLA4h909E/WGAWWBpmB275ehNhZyk87/Tpvjbp0jjNl9XwCsbe6bm6CqFsgD+A==",
+      "dependencies": {
+        "@mixmark-io/domino": "^2.2.0"
+      }
+    },
     "node_modules/tweetnacl": {
     "node_modules/tweetnacl": {
       "version": "0.14.5",
       "version": "0.14.5",
       "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz",
       "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz",
@@ -19327,6 +19341,11 @@
         "@jridgewell/sourcemap-codec": "^1.4.14"
         "@jridgewell/sourcemap-codec": "^1.4.14"
       }
       }
     },
     },
+    "@mixmark-io/domino": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmmirror.com/@mixmark-io/domino/-/domino-2.2.0.tgz",
+      "integrity": "sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw=="
+    },
     "@npmcli/fs": {
     "@npmcli/fs": {
       "version": "1.1.1",
       "version": "1.1.1",
       "resolved": "https://registry.npmmirror.com/@npmcli/fs/-/fs-1.1.1.tgz",
       "resolved": "https://registry.npmmirror.com/@npmcli/fs/-/fs-1.1.1.tgz",
@@ -21807,6 +21826,7 @@
         "script-loader": "^0.7.2",
         "script-loader": "^0.7.2",
         "semver": "^5.3.0",
         "semver": "^5.3.0",
         "shelljs": "^0.7.6",
         "shelljs": "^0.7.6",
+        "turndown": "^7.2.0",
         "uglifyjs-webpack-plugin": "^1.1.1",
         "uglifyjs-webpack-plugin": "^1.1.1",
         "url-loader": "^0.5.9",
         "url-loader": "^0.5.9",
         "v-viewer": "^1.6.4",
         "v-viewer": "^1.6.4",
@@ -21919,6 +21939,11 @@
             "@jridgewell/sourcemap-codec": "^1.4.14"
             "@jridgewell/sourcemap-codec": "^1.4.14"
           }
           }
         },
         },
+        "@mixmark-io/domino": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmmirror.com/@mixmark-io/domino/-/domino-2.2.0.tgz",
+          "integrity": "sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw=="
+        },
         "@npmcli/fs": {
         "@npmcli/fs": {
           "version": "1.1.1",
           "version": "1.1.1",
           "resolved": "https://registry.npmmirror.com/@npmcli/fs/-/fs-1.1.1.tgz",
           "resolved": "https://registry.npmmirror.com/@npmcli/fs/-/fs-1.1.1.tgz",
@@ -35523,6 +35548,14 @@
             "safe-buffer": "^5.0.1"
             "safe-buffer": "^5.0.1"
           }
           }
         },
         },
+        "turndown": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmmirror.com/turndown/-/turndown-7.2.0.tgz",
+          "integrity": "sha512-eCZGBN4nNNqM9Owkv9HAtWRYfLA4h909E/WGAWWBpmB275ehNhZyk87/Tpvjbp0jjNl9XwCsbe6bm6CqFsgD+A==",
+          "requires": {
+            "@mixmark-io/domino": "^2.2.0"
+          }
+        },
         "tweetnacl": {
         "tweetnacl": {
           "version": "0.14.5",
           "version": "0.14.5",
           "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz",
           "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz",
@@ -48768,6 +48801,14 @@
         "safe-buffer": "^5.0.1"
         "safe-buffer": "^5.0.1"
       }
       }
     },
     },
+    "turndown": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmmirror.com/turndown/-/turndown-7.2.0.tgz",
+      "integrity": "sha512-eCZGBN4nNNqM9Owkv9HAtWRYfLA4h909E/WGAWWBpmB275ehNhZyk87/Tpvjbp0jjNl9XwCsbe6bm6CqFsgD+A==",
+      "requires": {
+        "@mixmark-io/domino": "^2.2.0"
+      }
+    },
     "tweetnacl": {
     "tweetnacl": {
       "version": "0.14.5",
       "version": "0.14.5",
       "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz",
       "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz",

+ 1 - 0
package.json

@@ -45,6 +45,7 @@
     "qrcodejs2": "^0.0.2",
     "qrcodejs2": "^0.0.2",
     "qs": "^6.10.1",
     "qs": "^6.10.1",
     "relation-graph": "^1.1.0",
     "relation-graph": "^1.1.0",
+    "turndown": "^7.2.0",
     "v-viewer": "^1.6.4",
     "v-viewer": "^1.6.4",
     "vant": "^2.12.10",
     "vant": "^2.12.10",
     "vue": "^2.5.2",
     "vue": "^2.5.2",

+ 169 - 52
src/components/pages/aiAddCourse/addCourse.vue

@@ -565,7 +565,7 @@
                             @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2)"
                             @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2)"
                             @click="openAiDialog(2, 'aiteacherTextDetail', 2)">智能优化</div>
                             @click="openAiDialog(2, 'aiteacherTextDetail', 2)">智能优化</div>
                           </el-tooltip>
                           </el-tooltip>
-                          <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
+                          <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2()">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
                         </div>
                         </div>
                       </div>
                       </div>
                   </div>
                   </div>
@@ -597,7 +597,7 @@
                             @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2)"
                             @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2)"
                             @click="openAiDialog(2, 'aitargetTextDetail', 2)">智能优化</div>
                             @click="openAiDialog(2, 'aitargetTextDetail', 2)">智能优化</div>
                         </el-tooltip>
                         </el-tooltip>
-                        <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
+                        <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB,forceUpdate2()">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
                       </div>
                       </div>
                     </div>
                     </div>
                   </div>
                   </div>
@@ -925,7 +925,7 @@
                               @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
                               @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
                               @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
                               @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
                           </el-tooltip>
                           </el-tooltip>
-                          <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB">{{ courseTextB ? '确定' : '编辑'}}</div>
+                          <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2()">{{ courseTextB ? '确定' : '编辑'}}</div>
                         </div>
                         </div>
                       </div>
                       </div>
                   </div>
                   </div>
@@ -948,17 +948,19 @@
                       <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
                       <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
                     </div>
                     </div>
                   </div>
                   </div>
-                  <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan">{{ interPan ? '折叠' : '展开'}}</button>
+                  <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
                 </div>
                 </div>
                 <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
                 <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
                   <div class="inter_box" v-show="interPan">
                   <div class="inter_box" v-show="interPan">
-                    <iframe :src="interUrl" frameborder="0"></iframe>
+                    <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl" frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
                   </div>
                   </div>
                   <div style="width: calc(100%);height: 100%" class='op_task_box'>
                   <div style="width: calc(100%);height: 100%" class='op_task_box'>
                     <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
                     <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
-                      placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
-                    <div class="markBox vditor-reset" style="white-space:pre-wrap;height: 500px;overflow-y:auto" v-text="courseText" v-else-if="textLoading"></div>
-                    <div class="markBox vditor-reset" style="height: 500px;overflow-y:auto" v-html="MarkdownT(courseText)" v-else></div>
+                      placeholder="请输入课程简要描述" v-if="courseTextB && interPan"></textarea>
+                    <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
+                      placeholder="请输入课程简要描述" v-else-if="courseTextB && !interPan"></textarea>
+                    <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-else-if="textLoading"></div>
+                    <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-html="MarkdownT(courseText)" v-else></div>
                       <div class="op_box">
                       <div class="op_box">
                         <div class="op_remark"></div>
                         <div class="op_remark"></div>
                         <div style="display: flex;">
                         <div style="display: flex;">
@@ -967,7 +969,7 @@
                               @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
                               @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
                               @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
                               @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
                           </el-tooltip> -->
                           </el-tooltip> -->
-                          <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB">{{ courseTextB ? '确定' : '编辑'}}</div>
+                          <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2()">{{ courseTextB ? '确定' : '编辑'}}</div>
                         </div>
                         </div>
                       </div>
                       </div>
                   </div>
                   </div>
@@ -1142,7 +1144,7 @@
                               @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2)"
                               @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2)"
                               @click="openAiDialog(2, 'aitargetTextDetail2', 2)">智能优化</div>
                               @click="openAiDialog(2, 'aitargetTextDetail2', 2)">智能优化</div>
                           </el-tooltip>
                           </el-tooltip>
-                          <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
+                          <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B,forceUpdate2()">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
                         </div>
                         </div>
                       </div>
                       </div>
                   </div>
                   </div>
@@ -1899,8 +1901,8 @@
                           @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
                           @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
                           class="chapter_upload_drag"></div>
                           class="chapter_upload_drag"></div>
                         <div class="nt_taskBox">
                         <div class="nt_taskBox">
-                          <div class="nt_taskTitle" v-if="templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'">活动{{ index + 1 }}:</div>
-                          <div class="nt_taskTitle" v-else>任务{{ index + 1 }}:</div>
+                          <div class="nt_taskTitle" v-if="templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'">活动{{ tIndex + 1 }}:</div>
+                          <div class="nt_taskTitle" v-else>任务{{ tIndex + 1 }}:</div>
                           <div class="nt_taskName">
                           <div class="nt_taskName">
                             <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
                             <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
                               <span>{{ t.task ? t.task : "未命名任务" }}</span>
                               <span>{{ t.task ? t.task : "未命名任务" }}</span>
@@ -2006,8 +2008,8 @@
                               isdrag = 'task-' + stageIndex + '-' + tIndex
                               isdrag = 'task-' + stageIndex + '-' + tIndex
                               " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
                               " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
                           <div class="nt_taskBox" style="width: calc(100% - 52px)">
                           <div class="nt_taskBox" style="width: calc(100% - 52px)">
-                            <div class="nt_taskTitle" v-if="templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'">活动{{ index + 1 }}:</div>
-                            <div class="nt_taskTitle" v-else>任务{{ index + 1 }}:</div>
+                            <div class="nt_taskTitle" v-if="templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'">活动{{ tIndex + 1 }}:</div>
+                            <div class="nt_taskTitle" v-else>任务{{ tIndex + 1 }}:</div>
                             <div class="nt_taskName">
                             <div class="nt_taskName">
                               <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
                               <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
                                 <span>{{
                                 <span>{{
@@ -2040,7 +2042,7 @@
                   </div>
                   </div>
                 </div>
                 </div>
                 <div class="rb_c_ai_box" v-if="stepsNav == 2">
                 <div class="rb_c_ai_box" v-if="stepsNav == 2">
-                  <aiBox @setUnitJson="setUnitJson" :courseId="courseId" :unitJson="unitJson"></aiBox>
+                  <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
                 </div>
                 </div>
               </div>
               </div>
               <div class="rb_c_box_right">
               <div class="rb_c_box_right">
@@ -2435,8 +2437,8 @@
                       <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
                       <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
                         <div class="taskTitle">
                         <div class="taskTitle">
                           <div style="display: flex;width: 100%;justify-content: space-between;">
                           <div style="display: flex;width: 100%;justify-content: space-between;">
-                            <span v-if="templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'">活动{{ index + 1 }}</span>
-                            <span v-else>任务{{ index + 1 }}</span>
+                            <span v-if="templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'">活动{{ itemTaskIndex + 1 }}</span>
+                            <span v-else>任务{{ itemTaskIndex + 1 }}</span>
                             <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
                             <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
                               <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
                               <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
                                 @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
                                 @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
@@ -5408,8 +5410,8 @@
         <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
         <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
         <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
         <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
       </div>
       </div>
-      <div class="leftBar2" v-if="istemplate != 1 && templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'">
-        <aiBoxRight  :courseId="courseId" :unitJson="unitJson"></aiBoxRight>
+      <div class="leftBar2" v-if="istemplate != 1 && templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2' && chatid">
+        <aiBoxRight  :courseId="chatid" :unitJson="unitJson"></aiBoxRight>
       </div>
       </div>
     </div>
     </div>
     <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
     <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
@@ -6956,6 +6958,7 @@ import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
 import wpdf from "../test/file/wPdf2.vue";
 import wpdf from "../test/file/wPdf2.vue";
 import wOffice from "../test/file/wOffice.vue";
 import wOffice from "../test/file/wOffice.vue";
 import htmlDocx from "html-docx-js/dist/html-docx";
 import htmlDocx from "html-docx-js/dist/html-docx";
+import TurndownService from 'turndown';
 
 
 var OpenCC = require("opencc-js");
 var OpenCC = require("opencc-js");
 let converter = OpenCC.Converter({
 let converter = OpenCC.Converter({
@@ -7412,8 +7415,10 @@ export default {
       isTargetCancelSource2: null,
       isTargetCancelSource2: null,
       fileidArray: [],
       fileidArray: [],
       interPan: true,
       interPan: true,
+      interFlash: true,
       agentid: "",
       agentid: "",
-      interSetting: false
+      interSetting: false,
+      chatid: ""
     };
     };
   },
   },
   directives: {
   directives: {
@@ -7581,9 +7586,9 @@ export default {
       let sagentid = this.aiJson.sagentid
       let sagentid = this.aiJson.sagentid
       let url = ''
       let url = ''
       if(sagentid){
       if(sagentid){
-        url = 'https://beta.cloud.cocorobo.cn/aigpt/#/js?active_role=6&agentid='+sagentid+'&sagentid='+agentid
+        url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
       }else{
       }else{
-        url = 'https://beta.cloud.cocorobo.cn/aigpt/#/js?active_role=6&agentid='+agentid+'&sagentid='+agentid
+        url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
       }
       }
       return url;
       return url;
     },
     },
@@ -7740,6 +7745,16 @@ export default {
         );
         );
       }
       }
     },
     },
+    courseName(newVal, oldVal) {
+      this.setCourseInfo();
+    },
+    courseTypeId: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setCourseInfo();
+      }
+    }
   },
   },
   methods: {
   methods: {
     tableRowClassName({ row, rowIndex }) {
     tableRowClassName({ row, rowIndex }) {
@@ -11412,6 +11427,7 @@ export default {
             isuseT: this.isuseT,
             isuseT: this.isuseT,
             mode: this.mode,
             mode: this.mode,
             targetCourseText2: this.targetCourseText2,
             targetCourseText2: this.targetCourseText2,
+            chatid: this.chatid,
           }),
           }),
           iresearch: this.isFileSearch ? 1 : 2,
           iresearch: this.isFileSearch ? 1 : 2,
         },
         },
@@ -11680,6 +11696,7 @@ export default {
             isuseT: this.isuseT,
             isuseT: this.isuseT,
             mode: this.mode,
             mode: this.mode,
             targetCourseText2: this.targetCourseText2,
             targetCourseText2: this.targetCourseText2,
+            chatid: this.chatid,
           }),
           }),
           iresearch: this.isFileSearch ? 1 : 2,
           iresearch: this.isFileSearch ? 1 : 2,
         },
         },
@@ -11785,7 +11802,7 @@ export default {
             this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
             this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
             this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
             this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
 
 
-            this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : 'agentid'
+            this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
             this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
             this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
 
 
             // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
             // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
@@ -13667,6 +13684,8 @@ export default {
         }
         }
         console.log("这是新增课程");
         console.log("这是新增课程");
         this.selectAllType();
         this.selectAllType();
+        this.chatid = uuidv4();
+        this.courseTextB = true
       } else {
       } else {
         this.isOutline = true
         this.isOutline = true
         this.isOutline2 = true
         this.isOutline2 = true
@@ -13777,7 +13796,7 @@ export default {
                 this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
                 this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
                 this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
                 this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
 
 
-                this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : 'agentid'
+                this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
                 this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
                 this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
                 this.templateid = res.data[3][0].template;
                 this.templateid = res.data[3][0].template;
               }catch(error){
               }catch(error){
@@ -13803,9 +13822,10 @@ export default {
                 this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
                 this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
                 this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
                 this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
                 this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
                 this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
-                this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : 1;
+                this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : false;
                 this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
                 this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
                 this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
                 this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
+                this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
                 if(this.targetCourseText2 || (!this.teacherCourseText)){
                 if(this.targetCourseText2 || (!this.teacherCourseText)){
                   this.courseTextBool = true
                   this.courseTextBool = true
                 }
                 }
@@ -13930,7 +13950,7 @@ export default {
             this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
             this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
             this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
             this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
 
 
-            this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : 'agentid'
+            this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
             this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
             this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
             if(res.data[0][0].cpote){
             if(res.data[0][0].cpote){
               try {
               try {
@@ -13951,9 +13971,10 @@ export default {
                 this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
                 this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
                 this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
                 this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
                 this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? this.infoData2.length ? this.infoData2 : JSON.parse(res.data[0][0].setting).infoData2 : [...this.infoData2];
                 this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? this.infoData2.length ? this.infoData2 : JSON.parse(res.data[0][0].setting).infoData2 : [...this.infoData2];
-                this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : 1;
+                this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : false;
                 this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
                 this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
                 this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
                 this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
+                this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
                 if(this.targetCourseText2 || (!this.teacherCourseText)){
                 if(this.targetCourseText2 || (!this.teacherCourseText)){
                   this.courseTextBool = true
                   this.courseTextBool = true
                 }
                 }
@@ -14706,6 +14727,15 @@ export default {
     forceUpdate() {
     forceUpdate() {
       this.$forceUpdate();
       this.$forceUpdate();
     },
     },
+    forceUpdate2() {
+      setTimeout(() => {
+        this.courseText += "*0*%*";
+        setTimeout(() => {
+          this.courseText = this.courseText.replaceAll("*0*%*", "");
+        }, 0);
+      }, 100);
+      this.$forceUpdate();
+    },
     deletEList(index, tIndex, eIndex) {
     deletEList(index, tIndex, eIndex) {
       this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
       this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
         eIndex,
         eIndex,
@@ -15394,6 +15424,52 @@ export default {
         this.isPasteTask = true;
         this.isPasteTask = true;
       }
       }
     },
     },
+    getPaste2() {
+      let iframe = document.querySelectorAll(".interIframe")[0];
+      const turndownService = new TurndownService();
+
+      let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
+      let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
+      if(confirm_next_step){
+        this.courseText += turndownService.turndown(confirm_next_step)
+        iframe.contentWindow.confirm_next_step = ''
+      }
+      if(work_area_text && work_area_text.aiContent){
+        this.courseText += turndownService.turndown(work_area_text.aiContent)
+        iframe.contentWindow.work_area_text = ''
+      }
+    },
+    setCourseInfo(){
+      let courseInfo = ''
+      let sub = []
+      let mclass = []
+      if (this.courseTypeId.length) {
+        for (var i = 0; i < this.courseTypeId.length; i++) {
+          let _sid = this.courseTypeId[i]
+          for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
+            if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
+              sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
+            }
+          }
+          for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
+            if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
+              mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
+            }
+          }
+        }
+      }
+      if(this.courseName){
+        courseInfo = `课程名称:${this.courseName} `
+      }
+      if(mclass.length){
+        courseInfo += `年级:${mclass.join(',')} `
+      }
+      if(sub.length){
+        courseInfo += `学科:${sub.join(',')} `
+      }
+      console.log(courseInfo)
+      window.course_info = courseInfo
+    },
     setCover() {
     setCover() {
       var _this = this;
       var _this = this;
       if(_this.cover.length){
       if(_this.cover.length){
@@ -15920,6 +15996,12 @@ export default {
       }else {
       }else {
         this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
         this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
       }
       }
+      setTimeout(() => {
+          this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
+          setTimeout(() => {
+            this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
+          }, 0);
+      }, 100);
       this.$forceUpdate();
       this.$forceUpdate();
     },
     },
     editTask2(index){
     editTask2(index){
@@ -15928,6 +16010,12 @@ export default {
       }else {
       }else {
         this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
         this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
       }
       }
+      setTimeout(() => {
+          this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
+          setTimeout(() => {
+            this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
+          }, 0);
+      }, 100);
       this.$forceUpdate();
       this.$forceUpdate();
     },
     },
     openRule(i, k){
     openRule(i, k){
@@ -15944,6 +16032,12 @@ export default {
       }else {
       }else {
         this.cpote[index] = true
         this.cpote[index] = true
       }
       }
+      setTimeout(() => {
+          this.cpote[index.replace('s','')] += "*0*%*";
+          setTimeout(() => {
+            this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
+          }, 0);
+      }, 100);
       this.$forceUpdate();
       this.$forceUpdate();
     },
     },
     clickGenTT(){
     clickGenTT(){
@@ -15984,15 +16078,28 @@ export default {
       }
       }
     },
     },
     setAgentid(){
     setAgentid(){
+      if(this.agentid.trim()){
+        this.$message.error('请输入工作流链接')
+        return;
+      }
       if(this.istemplate == 1){
       if(this.istemplate == 1){
-        this.aiJson.agentid = this.agentid
+        this.aiJson.agentid = this.agentid.trim()
       }else {
       }else {
-        this.aiJson.sagentid = this.agentid
+        this.aiJson.sagentid = this.agentid.trim()
       }
       }
+      this.interFlash = false
+      setTimeout(() => {
+        this.interFlash = true
+      }, 100);
       this.interSetting = false
       this.interSetting = false
     },
     },
     rebuildAgentid(){
     rebuildAgentid(){
       this.aiJson.sagentid = ''
       this.aiJson.sagentid = ''
+      this.interFlash = false
+      setTimeout(() => {
+        this.interFlash = true
+      }, 100);
+      this.interSetting = false
     },
     },
     cancelInterSetting(){
     cancelInterSetting(){
       this.agentid = ''
       this.agentid = ''
@@ -16181,6 +16288,13 @@ export default {
         this.aiCallBack = callback
         this.aiCallBack = callback
 
 
       } else if (type == "aiTeacher2") {
       } else if (type == "aiTeacher2") {
+        if(this.ttaskDetailLoading5.length){
+          let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
+          this.$message({
+            message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
+            type: "warning"
+          });
+        }
         this.aitype = "aiTeacher2"
         this.aitype = "aiTeacher2"
         this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
         this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
       } else if (type == "aiTeacher3") {
       } else if (type == "aiTeacher3") {
@@ -16399,8 +16513,8 @@ detail包含子教学目标、过程性成果、子评价标准
 task2输出子任务名称但是不要输出序号或者前缀仅输出名称`  
 task2输出子任务名称但是不要输出序号或者前缀仅输出名称`  
 if(this.templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'){
 if(this.templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'){
   txt = `活動名:活動名(活動所需時間)     
   txt = `活動名:活動名(活動所需時間)     
-活動設計:描述該教學活動是如何展開的,至少寫100個token    
-活動的評價量規:學生能做到...
+     活動設計:描述該教學活動是如何展開的,至少寫100個token    
+    活動的評價量規:學生能做到...    
 `
 `
   txt2 = `detail至少输出300tokens,markdown格式输出。
   txt2 = `detail至少输出300tokens,markdown格式输出。
 detail包含活動名、活動設計、活動的評價量規
 detail包含活動名、活動設計、活動的評價量規
@@ -19709,8 +19823,8 @@ ${msg}
         // 处理错误,可以尝试重新连接
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
         console.log('EventSource error:', event);
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
-        _this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
-        _this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
+        _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
+        _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
         _this.isOutlineTaskCancelToken[_tindex2] = null
         _this.isOutlineTaskCancelToken[_tindex2] = null
         _this.isOutlineTaskCancelSource[_tindex2].close();
         _this.isOutlineTaskCancelSource[_tindex2].close();
         _this.isOutlineTaskCancelSource[_tindex2] = null;
         _this.isOutlineTaskCancelSource[_tindex2] = null;
@@ -19753,8 +19867,8 @@ ${msg}
 评价标准:评价标准。`
 评价标准:评价标准。`
       if(this.templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'){
       if(this.templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'){
   txt = `活動名:活動名(活動所需時間)    
   txt = `活動名:活動名(活動所需時間)    
-活動設計:描述該教學活動是如何展開的,至少寫100個token    
-活動的評價量規:學生能做到...    
+     活動設計:描述該教學活動是如何展開的,至少寫100個token    
+    活動的評價量規:學生能做到...    
 `
 `
       }
       }
       let messages = `NOTICE
       let messages = `NOTICE
@@ -19901,8 +20015,8 @@ ${txt}
 **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果`
 **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果`
       if(this.templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'){
       if(this.templateid == '9dd4bb76-1e48-11ef-bee5-005056b86db5'){
   txt = `活動名:活動名(活動所需時間)     
   txt = `活動名:活動名(活動所需時間)     
-活動設計:描述該教學活動是如何展開的,至少寫100個token     
-活動的評價量規:學生能做到...
+     活動設計:描述該教學活動是如何展開的,至少寫100個token     
+    活動的評價量規:學生能做到...
 `
 `
       }
       }
       let messages = `NOTICE
       let messages = `NOTICE
@@ -20068,8 +20182,8 @@ ${txt}
         // 处理错误,可以尝试重新连接
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
         console.log('EventSource error:', event);
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
-        _this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
-        _this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
+        _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
+        _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
         _this.isOutlineTaskCancelToken[_tindex2] = null
         _this.isOutlineTaskCancelToken[_tindex2] = null
         _this.isOutlineTaskCancelSource[_tindex2].close();
         _this.isOutlineTaskCancelSource[_tindex2].close();
         _this.isOutlineTaskCancelSource[_tindex2] = null;
         _this.isOutlineTaskCancelSource[_tindex2] = null;
@@ -20240,8 +20354,8 @@ ${_this.aiCallBack.taskDetail}
         // 处理错误,可以尝试重新连接
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
         console.log('EventSource error:', event);
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
-        _this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
-        _this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
+        _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
+        _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
         _source.close();
         _source.close();
       };
       };
     },
     },
@@ -20412,8 +20526,8 @@ ${msg} 输出格式和内容要求参考#格式与要求
         // 处理错误,可以尝试重新连接
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
         console.log('EventSource error:', event);
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
-        _this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
-        _this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
+        _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
+        _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
         _source.close();
         _source.close();
       };
       };
     },
     },
@@ -20781,8 +20895,8 @@ ${_text2}`
           // 处理错误,可以尝试重新连接
           // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
         console.log('EventSource error:', event);
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
-        _this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
-        _this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
+        _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
+        _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
         _source.close();
         _source.close();
       };
       };
     },
     },
@@ -20973,8 +21087,8 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
         // 处理错误,可以尝试重新连接
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
         console.log('EventSource error:', event);
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
-        _this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
-        _this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
+        _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
+        _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
         _source.close();
         _source.close();
       };
       };
     },
     },
@@ -22455,16 +22569,16 @@ ${msg}
     // this.timer = null;
     // this.timer = null;
     // clearInterval(this.timer2);
     // clearInterval(this.timer2);
     // this.timer2 = null;
     // this.timer2 = null;
-    // clearInterval(this.pasteTimer);
-    // this.pasteTimer = null;
+    clearInterval(this.pasteTimer);
+    this.pasteTimer = null;
   },
   },
   beforeRouteLeave(to, from, next) {
   beforeRouteLeave(to, from, next) {
     // clearTimeout(this.timer);
     // clearTimeout(this.timer);
     // this.timer = null;
     // this.timer = null;
     // clearInterval(this.timer2);
     // clearInterval(this.timer2);
     // this.timer2 = null;
     // this.timer2 = null;
-    // clearInterval(this.pasteTimer);
-    // this.pasteTimer = null;
+    clearInterval(this.pasteTimer);
+    this.pasteTimer = null;
     next();
     next();
   },
   },
   created() {
   created() {
@@ -22493,7 +22607,7 @@ ${msg}
       this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
       this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
       this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
       this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
 
 
-      this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : 'agentid'
+      this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
       this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
       this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
     }
     }
     this.loading = false;
     this.loading = false;
@@ -22503,6 +22617,9 @@ ${msg}
     // this.pasteTimer = setInterval(() => {
     // this.pasteTimer = setInterval(() => {
     //   this.getPaste();
     //   this.getPaste();
     // }, 1000);
     // }, 1000);
+    this.pasteTimer = setInterval(() => {
+      this.getPaste2();
+    }, 500);
     setTimeout(() => {
     setTimeout(() => {
       // this.selectAllType();
       // this.selectAllType();
 
 

+ 20 - 4
src/components/pages/aiAddCourse/aiBoxRight.vue

@@ -18,7 +18,7 @@
           </div>
           </div>
           <div
           <div
            element-loading-background="#f6f9ff" 
            element-loading-background="#f6f9ff" 
-           :style="{minHeight: item.loading ? '50px' : 'unset'}"
+           :style="{minHeight: item.loading ? '50px' : 'unset', minWidth: item.loading ? '50px' : 'unset'}"
             class="content"
             class="content"
             v-loading="item.loading"
             v-loading="item.loading"
             v-html="item.aiContent"
             v-html="item.aiContent"
@@ -157,6 +157,20 @@ export default {
       handler(newValue, oldValue) {
       handler(newValue, oldValue) {
         this.course = this.unitJson[0].chapterInfo[0].taskJson;
         this.course = this.unitJson[0].chapterInfo[0].taskJson;
       }
       }
+    },
+    courseId: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        if(newValue){
+          this.getChatList().then(_ => {
+            this.$nextTick(() => {
+              console.log(this.$refs.chatDialog.scrollHeight)
+              this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+            });
+          });
+        }
+      }
     }
     }
   },
   },
   methods: {
   methods: {
@@ -271,7 +285,9 @@ export default {
           this.array.find(i => i.uid == _uid).isShowSynchronization = true;
           this.array.find(i => i.uid == _uid).isShowSynchronization = true;
           this.array.find(i => i.uid == _uid).loading = false;
           this.array.find(i => i.uid == _uid).loading = false;
           // 这里保存对话
           // 这里保存对话
-          this.insertChat(_uid);
+          if(this.courseId){
+            this.insertChat(_uid);
+          }
           return;
           return;
         } else {
         } else {
           //对话还在继续
           //对话还在继续
@@ -311,7 +327,7 @@ export default {
         alltext: _data.aiContent,
         alltext: _data.aiContent,
         type: "chat",
         type: "chat",
         filename: _data.filename,
         filename: _data.filename,
-        session_name: `${this.courseId}-addCourse` //这是对话记录位置
+        session_name: `${this.courseId}-addCourseA` //这是对话记录位置
       };
       };
       this.ajax
       this.ajax
         .post("https://gpt4.cocorobo.cn/insert_chat", params)
         .post("https://gpt4.cocorobo.cn/insert_chat", params)
@@ -327,7 +343,7 @@ export default {
           userid: this.userid,
           userid: this.userid,
           groupid: "602def61-005d-11ee-91d8-005056b8q12w",
           groupid: "602def61-005d-11ee-91d8-005056b8q12w",
           // session_name:``
           // session_name:``
-          session_name: `${this.courseId}-addCourse`
+          session_name: `${this.courseId}-addCourseA`
         };
         };
         this.ajax
         this.ajax
           .post("https://gpt4.cocorobo.cn/get_agent_park_chat", params)
           .post("https://gpt4.cocorobo.cn/get_agent_park_chat", params)

+ 1 - 1
src/components/pages/aiAddCourse/templateDialog.vue

@@ -10,7 +10,7 @@
                 </el-input>
                 </el-input>
             </div>
             </div>
             <div class="a-d-t-right">
             <div class="a-d-t-right">
-                <!-- <el-button @click="open2()" type="primary" size="small" style="margin-right: 10px;">设置模板</el-button> -->
+                <el-button @click="open2()" type="primary" size="small" style="margin-right: 10px;">设置模板</el-button>
                 <span @click.stop="close">×</span>
                 <span @click.stop="close">×</span>
             </div>
             </div>
         </div>
         </div>

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä