lsc 11 mesi fa
parent
commit
896e66f7eb

+ 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.bc6915b7ef9700f0234131d2fc2148be.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.db29ac4028684f6213aa.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.83d2b1921941bbaf373ea33810a139ed.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.d7b1037bc584942ac466.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) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.83d2b1921941bbaf373ea33810a139ed.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.83d2b1921941bbaf373ea33810a139ed.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.d7b1037bc584942ac466.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.d7b1037bc584942ac466.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 373 - 74
src/components/pages/aiAddCourse/addCourse.vue

@@ -125,7 +125,7 @@
                                 border-radius: 5px;
                                 border-radius: 5px;
                                 font-weight: 600;
                                 font-weight: 600;
                                 padding: 12px 14px 12px 71px;
                                 padding: 12px 14px 12px 71px;
-                              "  @change="setCover"/>
+                              " @change="setCover" />
                             <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
                             <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
                               style="justify-content: center; width: 200px"></el-switch>
                               style="justify-content: center; width: 200px"></el-switch>
                           </div>
                           </div>
@@ -140,7 +140,7 @@
                             :key="index">
                             :key="index">
                             <el-radio :label="item.name">{{
                             <el-radio :label="item.name">{{
                               item.name
                               item.name
-                            }}</el-radio>
+                              }}</el-radio>
                           </div>
                           </div>
                         </el-radio-group>
                         </el-radio-group>
                       </div>
                       </div>
@@ -350,9 +350,9 @@
                   课程简要描述
                   课程简要描述
                   <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
                   <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
                     <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
                     <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
-                    @contextmenu.prevent="openAiDialog(1, 'aiDetail')"
-                    @click="openAiDialog(2, 'aiDetail')">AI优化</button>
-                  </el-tooltip>
+                      @contextmenu.prevent="openAiDialog(1, 'aiDetail')"
+                      @click="openAiDialog(2, 'aiDetail')">AI优化</button>
+                                      </el-tooltip>
                 </div>
                 </div>
                 <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
                 <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
                   <div style="width: calc(100%)">
                   <div style="width: calc(100%)">
@@ -607,11 +607,11 @@
                     <div style="margin-bottom: 10px">
                     <div style="margin-bottom: 10px">
                       <span>{{
                       <span>{{
                         infoisFinishSize
                         infoisFinishSize
-                      }}M</span>
+                        }}M</span>
                       /
                       /
                       <span>{{
                       <span>{{
                         infoisAllSize
                         infoisAllSize
-                      }}M</span>
+                        }}M</span>
                     </div>
                     </div>
                     <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
                     <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
                       ? infoprogress
                       ? infoprogress
@@ -655,8 +655,8 @@
                         <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                         <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                         <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
                         <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
                           <div class="r_pub_button_op"
                           <div class="r_pub_button_op"
-                          @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item.taskDetail2, index)"
-                          @click="openAiDialog(2, 'aiDetail1', item.taskDetail2, index)">智能优化</div>
+                            @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item.taskDetail2, index)"
+                            @click="openAiDialog(2, 'aiDetail1', item.taskDetail2, index)">智能优化</div>
                         </el-tooltip>
                         </el-tooltip>
                       </div>
                       </div>
                     </div>
                     </div>
@@ -685,11 +685,12 @@
                         <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                         <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                         <div style="display: flex;">
                         <div style="display: flex;">
                           <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
                           <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
-                              <div class="r_pub_button_op"
-                            @contextmenu.prevent="openAiDialog(1, 'teacherDetail', item.taskDetail3, index)"
-                            @click="openAiDialog(2, 'teacherDetail', item.taskDetail3, index)">智能优化</div>
+                            <div class="r_pub_button_op"
+                              @contextmenu.prevent="openAiDialog(1, 'teacherDetail', item.taskDetail3, index)"
+                              @click="openAiDialog(2, 'teacherDetail', item.taskDetail3, index)">智能优化</div>
                           </el-tooltip>
                           </el-tooltip>
-                          <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{ item.isTask3 ? '确定' : '编辑'}}</div>
+                          <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
+                            item.isTask3 ? '确定' : '编辑'}}</div>
                         </div>
                         </div>
                       </div>
                       </div>
                     </div>
                     </div>
@@ -697,6 +698,86 @@
                 </div>
                 </div>
               </div>
               </div>
             </div>
             </div>
+            <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="cpoteType > 0">
+              <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
+                <div class="c_info_title">
+                  概念群
+                </div>
+                <div class="task_outline">
+                  <div class="outline_detail" v-loading="cpoteLoading.cpote1">
+                    <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
+                      v-model="cpote.cpote1"></textarea>
+                    <div class="op_box">
+                      <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
+                      <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                        <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
+                            @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
+                      </el-tooltip>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="cpoteType > 1">
+              <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
+                <div class="c_info_title">
+                  问题链
+                </div>
+                <div class="task_outline">
+                  <div class="outline_detail" v-loading="cpoteLoading.cpote2">
+                    <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
+                      v-model="cpote.cpote2"></textarea>
+                    <div class="op_box">
+                      <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
+                      <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                        <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
+                            @click="openAiDialog(2, 'aiCpote2')">智能优化</div>
+                      </el-tooltip>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="cpoteType > 2">
+              <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
+                <div class="c_info_title">
+                  目标层
+                </div>
+                <div class="task_outline">
+                  <div class="outline_detail" v-loading="cpoteLoading.cpote3">
+                    <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
+                      v-model="cpote.cpote3"></textarea>
+                    <div class="op_box">
+                      <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
+                      <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                        <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
+                            @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
+                      </el-tooltip>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="cpoteType > 3">
+              <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
+                <div class="c_info_title">
+                  任务簇
+                </div>
+                <div class="task_outline">
+                  <div class="outline_detail" v-loading="cpoteLoading.cpote4">
+                    <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
+                      v-model="cpote.cpote4"></textarea>
+                    <div class="op_box">
+                      <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
+                      <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                        <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
+                            @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
+                      </el-tooltip>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
             <div class="info_btnBox3" v-if="istemplate != 1">
             <div class="info_btnBox3" v-if="istemplate != 1">
               <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
               <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
                 goTo(
                 goTo(
@@ -721,9 +802,12 @@
                     pub_btn_next_img: steps != 3,
                     pub_btn_next_img: steps != 3,
                     pub_btn_finish_img: steps == 3,
                     pub_btn_finish_img: steps == 3,
                   }">
                   }">
-                  {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
+                  {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : 
+                  (templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" && cpoteType < 4) ? 
+                  cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层"  : "生成任务簇" 
+                  : "下一步" }}
                 </button>
                 </button>
-              </el-tooltip>
+                              </el-tooltip>
             </div>
             </div>
           </div>
           </div>
           <div class="rightBox" v-if="steps == 2" :style="{
           <div class="rightBox" v-if="steps == 2" :style="{
@@ -891,8 +975,7 @@
                   <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
                   <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
                   <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
                   <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
                 </div>
                 </div>
-                <div class="stepsBottom" v-if="stepsNav == 1" 
-                :style="{
+                <div class="stepsBottom" v-if="stepsNav == 1" :style="{
                   height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
                   height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
                   position: istemplate == 1 ? 'sticky' : 'unset',
                   position: istemplate == 1 ? 'sticky' : 'unset',
                   top: istemplate == 1 ? '0' : 'unset'
                   top: istemplate == 1 ? '0' : 'unset'
@@ -962,8 +1045,8 @@
                             <div>工具{{ toolIndex2 + 1 }}:</div>
                             <div>工具{{ toolIndex2 + 1 }}:</div>
                             <div>
                             <div>
                               {{
                               {{
-                                toolsData[tool.tool[0]] &&
-                                toolsData[tool.tool[0]].name
+                              toolsData[tool.tool[0]] &&
+                              toolsData[tool.tool[0]].name
                               }}
                               }}
                             </div>
                             </div>
                           </div>
                           </div>
@@ -1002,7 +1085,7 @@
                               " placement="top">
                               " placement="top">
                               <span>{{
                               <span>{{
                                 stage.dyName ? stage.dyName : "未命名阶段"
                                 stage.dyName ? stage.dyName : "未命名阶段"
-                              }}</span>
+                                }}</span>
                             </el-tooltip>
                             </el-tooltip>
                           </div>
                           </div>
                         </div>
                         </div>
@@ -1049,7 +1132,7 @@
                               <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
                               <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
                                 <span>{{
                                 <span>{{
                                   t.task ? t.task : "未命名任务"
                                   t.task ? t.task : "未命名任务"
-                                }}</span>
+                                  }}</span>
                               </el-tooltip>
                               </el-tooltip>
                             </div>
                             </div>
                           </div>
                           </div>
@@ -1065,8 +1148,8 @@
                               <div>工具{{ toolIndex2 + 1 }}:</div>
                               <div>工具{{ toolIndex2 + 1 }}:</div>
                               <div>
                               <div>
                                 {{
                                 {{
-                                  toolsData[tool.tool[0]] &&
-                                  toolsData[tool.tool[0]].name
+                                toolsData[tool.tool[0]] &&
+                                toolsData[tool.tool[0]].name
                                 }}
                                 }}
                               </div>
                               </div>
                             </div>
                             </div>
@@ -1112,9 +1195,9 @@
                           unitJson[unitJson.length - 1].easy == 6
                           unitJson[unitJson.length - 1].easy == 6
                         ">{{
                         ">{{
                           item.dyName
                           item.dyName
-                            ? item.dyName
-                            : "第" + (index + 1) + "阶段"
-                        }}</span>
+                          ? item.dyName
+                          : "第" + (index + 1) + "阶段"
+                          }}</span>
                         <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
                         <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
                       </div>
                       </div>
                       <div class="cru_line" :style="{
                       <div class="cru_line" :style="{
@@ -1404,15 +1487,15 @@
                           <div style="margin-bottom: 10px">
                           <div style="margin-bottom: 10px">
                             <span>{{
                             <span>{{
                               unitJson[unitIndex].chapterInfo[0].taskJson[
                               unitJson[unitIndex].chapterInfo[0].taskJson[
-                                0
+                              0
                               ].isFinishSize
                               ].isFinishSize
-                            }}M</span>
+                              }}M</span>
                             /
                             /
                             <span>{{
                             <span>{{
                               unitJson[unitIndex].chapterInfo[0].taskJson[
                               unitJson[unitIndex].chapterInfo[0].taskJson[
-                                0
+                              0
                               ].isAllSize
                               ].isAllSize
-                            }}M</span>
+                              }}M</span>
                           </div>
                           </div>
                           <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
                           <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
                             0
                             0
@@ -1820,15 +1903,15 @@
                               <div style="margin-bottom: 10px">
                               <div style="margin-bottom: 10px">
                                 <span>{{
                                 <span>{{
                                   unitJson[unitIndex].chapterInfo[0].taskJson[
                                   unitJson[unitIndex].chapterInfo[0].taskJson[
-                                    itemTaskIndex
+                                  itemTaskIndex
                                   ].isFinishSize
                                   ].isFinishSize
-                                }}M</span>
+                                  }}M</span>
                                 /
                                 /
                                 <span>{{
                                 <span>{{
                                   unitJson[unitIndex].chapterInfo[0].taskJson[
                                   unitJson[unitIndex].chapterInfo[0].taskJson[
-                                    itemTaskIndex
+                                  itemTaskIndex
                                   ].isAllSize
                                   ].isAllSize
-                                }}M</span>
+                                  }}M</span>
                               </div>
                               </div>
                               <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
                               <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
                                 itemTaskIndex
                                 itemTaskIndex
@@ -1866,12 +1949,12 @@
                             ">
                             ">
                             <div class="lineTitle clineTitle">
                             <div class="lineTitle clineTitle">
                               {{
                               {{
-                                !unitJson[unitIndex].easy ||
-                                  unitJson[unitIndex].easy == 6 ||
-                                  easyArray.indexOf(unitJson[unitIndex].easy) !=
-                                  -1
-                                  ? "练习内容"
-                                  : "评价内容"
+                              !unitJson[unitIndex].easy ||
+                              unitJson[unitIndex].easy == 6 ||
+                              easyArray.indexOf(unitJson[unitIndex].easy) !=
+                              -1
+                              ? "练习内容"
+                              : "评价内容"
                               }}
                               }}
                             </div>
                             </div>
                             <!-- <div class="line" style="width: 90%"></div> -->
                             <!-- <div class="line" style="width: 90%"></div> -->
@@ -3198,7 +3281,8 @@
                                       @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
                                       @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
                                       @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
                                       @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
                                       智能优化</div>
                                       智能优化</div>
-                                  </el-tooltip>
+                                                                 
+                                  </el-tooltip>
                                 </div>
                                 </div>
                               </div>
                               </div>
                             </div>
                             </div>
@@ -3495,8 +3579,8 @@
                               <div class="lineTitle clineTitle">评价设置</div>
                               <div class="lineTitle clineTitle">评价设置</div>
                               <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
                               <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
                                 <div class="r_pub_button_op" style="margin-left:auto;"
                                 <div class="r_pub_button_op" style="margin-left:auto;"
-                                @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
-                                @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
+                                  @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
+                                  @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
                               </el-tooltip>
                               </el-tooltip>
                               <!-- <div class="line" style="width: 90%"></div> -->
                               <!-- <div class="line" style="width: 90%"></div> -->
                             </div>
                             </div>
@@ -3624,7 +3708,7 @@
                             <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
                             <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
                             <div>
                             <div>
                               {{
                               {{
-                                itemTask.isFold === 1 ? "展开任务" : "收起任务"
+                              itemTask.isFold === 1 ? "展开任务" : "收起任务"
                               }}
                               }}
                             </div>
                             </div>
                           </div>
                           </div>
@@ -3662,8 +3746,8 @@
                       ">
                       ">
                       返回课程
                       返回课程
                     </button>
                     </button>
-                    <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && istemplate != 1"
-                      @click="lastSteps" style="background: #dbdbdb">
+                    <button class="c_pub_button_return pub_btn_last_img"
+                      v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
                       {{ steps == 4 ? "返回课程" : "上一步" }}
                       {{ steps == 4 ? "返回课程" : "上一步" }}
                     </button>
                     </button>
                     <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
                     <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
@@ -3672,7 +3756,8 @@
                     }">
                     }">
                       {{ steps == 3 ? "确认上传" : "下一步" }}
                       {{ steps == 3 ? "确认上传" : "下一步" }}
                     </button>
                     </button>
-                    <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ? '修改模板' : '保存模板'}}</button>
+                    <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
+                      '修改模板' : '保存模板'}}</button>
                   </div>
                   </div>
                 </div>
                 </div>
               </div>
               </div>
@@ -3728,15 +3813,16 @@
         </div>
         </div>
       </div>
       </div>
       <div class="leftBar" v-if="istemplate == 1">
       <div class="leftBar" v-if="istemplate == 1">
-        <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson"/>
-        <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson"/>
-        <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson"/>
-        <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson"/>
-        <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail" @setAiJson="setAiJson"/>
-        <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson"/>
-        <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson"/>
-        <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson"/>
-        <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson"/>
+        <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
+        <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" />
+        <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" />
+        <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" />
+        <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
+          @setAiJson="setAiJson" />
+        <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
+        <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
+        <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
+        <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
       </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"
@@ -3887,21 +3973,19 @@
     </el-dialog>
     </el-dialog>
     <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
     <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
       :before-close="handleClose" class="addNewPP customWidth">
       :before-close="handleClose" class="addNewPP customWidth">
-      <div  style="display: flex;justify-content: space-between;"> 
+      <div style="display: flex;justify-content: space-between;">
         <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
         <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
           <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
           <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
-              全部
-          </div> 
-          <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)" v-for="(i) in CollaborativeTeaList" :key="i.id">
-            <el-tooltip
-              placement="top"
-              :content="i.name"
-              >
+            全部
+          </div>
+          <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
+            v-for="(i) in CollaborativeTeaList" :key="i.id">
+            <el-tooltip placement="top" :content="i.name">
               <span>{{i.name}}</span>
               <span>{{i.name}}</span>
             </el-tooltip>
             </el-tooltip>
           </div>
           </div>
           <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
           <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
-              其他
+            其他
           </div>
           </div>
         </div>
         </div>
         <div style="width: calc(100% - 100px);" v-loading="CollLoading">
         <div style="width: calc(100% - 100px);" v-loading="CollLoading">
@@ -3943,7 +4027,7 @@
         </div>
         </div>
       </div>
       </div>
 
 
-      
+
       <span slot="footer" class="dialog-footer">
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisibleMember = false">取 消</el-button>
         <el-button @click="dialogVisibleMember = false">取 消</el-button>
         <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
         <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
@@ -3984,7 +4068,7 @@
                 ">
                 ">
                 <span style="min-width: fit-content">{{
                 <span style="min-width: fit-content">{{
                   index1 + 1 + "、"
                   index1 + 1 + "、"
-                }}</span>
+                  }}</span>
                 <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
                 <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
                   v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
                   v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
                     $forceUpdate();
                     $forceUpdate();
@@ -4086,7 +4170,7 @@
                 <div style="display: flex; align-items: center">
                 <div style="display: flex; align-items: center">
                   <span style="min-width: fit-content">{{
                   <span style="min-width: fit-content">{{
                     index1 + 1 + "、"
                     index1 + 1 + "、"
-                  }}</span>
+                    }}</span>
                   <!-- <el-input class="a_add_head_input"  v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
                   <!-- <el-input class="a_add_head_input"  v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
                     placeholder="请输入题目">
                     placeholder="请输入题目">
                   </el-input> -->
                   </el-input> -->
@@ -5102,7 +5186,8 @@
       :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
       :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
     <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" @aiConfirm="aiConfirm" :clickType="clickType">
     <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" @aiConfirm="aiConfirm" :clickType="clickType">
     </aiDialog>
     </aiDialog>
-    <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid" @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
+    <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
+      @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -5478,7 +5563,26 @@ export default {
       templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
       templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
       istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
       istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
       dialogVisibleTips: false,
       dialogVisibleTips: false,
-      tipsJson: {}
+      tipsJson: {},
+      cpote:{
+        cpote1: '',
+        cpote2: '',
+        cpote3: '',
+        cpote4: '',
+      },
+      cpoteLoading:{
+        cpote1: false,
+        cpote2: false,
+        cpote3: false,
+        cpote4: false,
+      },
+      cpotetLoading:{
+        cpote1: false,
+        cpote2: false,
+        cpote3: false,
+        cpote4: false,
+      },
+      cpoteType: 0,
     };
     };
   },
   },
   directives: {
   directives: {
@@ -6182,6 +6286,22 @@ export default {
             return;
             return;
           }
           }
 
 
+          if(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" && this.cpoteType != 4){
+            let _type = ''
+            if(this.cpoteType == 0){
+              _type = 'aiCpote1'
+            }else if(this.cpoteType == 1){
+              _type = 'aiCpote2'
+            }else if(this.cpoteType == 2){
+              _type = 'aiCpote3'
+            }else if(this.cpoteType == 3){
+              _type = 'aiCpote4'
+            }
+            this.cpoteType++
+            this.openAiDialog(clickType, _type)
+            return;
+          }
+
           const functionA = () => {
           const functionA = () => {
             setTimeout(() => {
             setTimeout(() => {
               this.loading = false
               this.loading = false
@@ -8364,11 +8484,12 @@ export default {
             this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
             this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
           inviteCode: JSON.stringify(this.inviteCode),
           inviteCode: JSON.stringify(this.inviteCode),
           refile: JSON.stringify(this.infoData),
           refile: JSON.stringify(this.infoData),
-          reBrief: this.courseText2
+          reBrief: this.courseText2,
+          cpote: JSON.stringify(this.cpote),
         },
         },
       ];
       ];
       this.ajax
       this.ajax
-        .post(this.$store.state.api + "addWorkNew2AI", params)
+        .post(this.$store.state.api + "addWorkNew2AI2", params)
         .then((res) => {
         .then((res) => {
           console.log(this.steps);
           console.log(this.steps);
           if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
           if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
@@ -8608,11 +8729,12 @@ export default {
             this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
             this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
           inviteCode: JSON.stringify(this.inviteCode),
           inviteCode: JSON.stringify(this.inviteCode),
           refile: JSON.stringify(this.infoData),
           refile: JSON.stringify(this.infoData),
-          reBrief: this.courseText2
+          reBrief: this.courseText2,
+          cpote: JSON.stringify(this.cpote),
         },
         },
       ];
       ];
       this.ajax
       this.ajax
-        .post(this.$store.state.api + "updateWorkNew2AI", params)
+        .post(this.$store.state.api + "updateWorkNew2AI2", params)
         .then((res) => {
         .then((res) => {
           if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
           if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
             if (this.cidType == 1) {
             if (this.cidType == 1) {
@@ -10564,6 +10686,7 @@ export default {
       } else {
       } else {
         this.isOutline = true
         this.isOutline = true
         this.isOutline2 = true
         this.isOutline2 = true
+        this.cpoteType = 4
         this.cidType = 1;
         this.cidType = 1;
         let params = {
         let params = {
           cid: this.cid,
           cid: this.cid,
@@ -10654,6 +10777,14 @@ export default {
             if(res.data[3].length){
             if(res.data[3].length){
               try {
               try {
                 this.aiJson = JSON.parse(res.data[3][0].tips);
                 this.aiJson = JSON.parse(res.data[3][0].tips);
+                this.templateid = res.data[3][0].template;
+              }catch(error){
+                console.error(error)
+              }
+            }
+            if(res.data[0][0].cpote){
+              try {
+                this.cpote = JSON.parse(res.data[0][0].cpote);
               }catch(error){
               }catch(error){
                 console.error(error)
                 console.error(error)
               }
               }
@@ -12722,6 +12853,51 @@ export default {
         this.aiText = this.aiJson.teacherDetail
         this.aiText = this.aiJson.teacherDetail
         this.aiCallBack = callback
         this.aiCallBack = callback
         this.aiIndex = index
         this.aiIndex = index
+      } else if (type == "aiCpote1") {
+        if (this.cpotetLoading.cpote1) {
+          this.$message({
+            message: "请回答完毕后再次发送",
+            type: "warning"
+          });
+          return;
+        }
+        this.aitype = "aiCpote1"
+        this.aiText = this.aiJson.cpote1
+        this.aiCallBack = callback
+      } else if (type == "aiCpote2") {
+        if (this.cpotetLoading.cpote2) {
+          this.$message({
+            message: "请回答完毕后再次发送",
+            type: "warning"
+          });
+          return;
+        }
+        this.aitype = "aiCpote2"
+        this.aiText = this.aiJson.cpote2
+        this.aiCallBack = callback
+      }
+      else if (type == "aiCpote3") {
+        if (this.cpotetLoading.cpote3) {
+          this.$message({
+            message: "请回答完毕后再次发送",
+            type: "warning"
+          });
+          return;
+        }
+        this.aitype = "aiCpote3"
+        this.aiText = this.aiJson.cpote3
+        this.aiCallBack = callback
+      } else if (type == "aiCpote4") {
+        if (this.cpotetLoading.cpote4) {
+          this.$message({
+            message: "请回答完毕后再次发送",
+            type: "warning"
+          });
+          return;
+        }
+        this.aitype = "aiCpote4"
+        this.aiText = this.aiJson.cpote4
+        this.aiCallBack = callback
       }
       }
       this.dialogVisibleAiD = true
       this.dialogVisibleAiD = true
     },
     },
@@ -12889,6 +13065,14 @@ ${_text}
         this.aiDetail4(msg, this.aiIndex)
         this.aiDetail4(msg, this.aiIndex)
       } else if (this.aitype == "teacherDetail") {
       } else if (this.aitype == "teacherDetail") {
         this.aiDetail5(msg, this.aiIndex)
         this.aiDetail5(msg, this.aiIndex)
+      } else if (this.aitype == "aiCpote1") {
+        this.aiCpote(msg, this.aiCallBack)
+      } else if (this.aitype == "aiCpote2") {
+        this.aiCpote(msg, this.aiCallBack)
+      } else if (this.aitype == "aiCpote3") {
+        this.aiCpote(msg, this.aiCallBack)
+      } else if (this.aitype == "aiCpote4") {
+        this.aiCpote(msg, this.aiCallBack)
       } else if (this.aitype == "aiTeacher") {
       } else if (this.aitype == "aiTeacher") {
         this.loading = true
         this.loading = true
         var _text = ""
         var _text = ""
@@ -13910,6 +14094,121 @@ ${_this.aiCallBack}
         }
         }
       };
       };
     },
     },
+    aiCpote(msg, callback) {
+      let _this = this
+      let _index = _this.aitype.replace("aiC","c")
+      let sub = []
+      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)
+            }
+          }
+        }
+      }
+      let messages = `
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
+
+${msg} 
+
+${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
+
+## 参考资料
+课程名字:${this.courseName}
+课程简要描述:${this.courseText ? this.courseText : '暂无'}
+学科:${sub.length ? sub.join(",") : "无"}
+班级:${this.getListClassC(this.checkboxList2)}`
+      _this.cpoteLoading[_index] = true
+      _this.cpotetLoading[_index] = true
+      let _uuid = uuidv4();
+      let params = JSON.stringify({
+        // "model": "Chat",
+        model: 'gpt-3.5-turbo',
+        temperature: 0,
+        max_tokens: 4096,
+        top_p: 1,
+        frequency_penalty: 0,
+        presence_penalty: 0,
+        messages: [{
+          content: messages,
+          role: 'user'
+        }],
+        uid: _uuid,
+        mind_map_question: "",
+      })
+      // let params = JSON.stringify({
+      //     message: {
+      //         anthropic_version: "bedrock-2023-05-31",
+      //         max_tokens: 4096,
+      //         temperature: 0,
+      //         top_p: 1,
+      //         messages:  [{
+      //             "role": "user",
+      //             "content": messages
+      //         }] , 
+      //     },
+      //     uid: _uuid,
+      //     model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
+      // });
+      _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
+      // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
+        console.log(response);
+        // 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].taskDetail = data.choices[0].message.content
+        //   _this.$forceUpdate()
+        // }
+        // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
+        if (response.data.FunctionResponse.result == "发送成功") {
+        } else {
+          this.$message.warning(response.data.FunctionResponse.result);
+        }
+      }).catch(function (error) {
+        _this.cpoteLoading[_index] = false
+        _this.cpotetLoading[_index] = false
+        callback ? callback() : ''
+        console.log(error);
+      });
+      _this.aiDetail5getAiContent(_uuid, _index, callback)
+    },
+    aiDetail5getAiContent(_uid, loading, callback) {
+      let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
+      // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
+      let _allText = "";
+      let _mdText = "";
+      _source.onmessage = _e => {
+        if (_e.data.replace("'", "").replace("'", "") == "[DONE]") {
+          //对话已经完成
+          _mdText = _mdText.replace("_", "");
+          _source.close();
+          this.cpote[loading] = _mdText;
+          this.cpoteLoading[loading] = false
+          this.cpotetLoading[loading] = false
+          callback ? callback() : ''
+          return;
+        } else {
+          //对话还在继续
+          let _text = "";
+          _text = _e.data.replaceAll("'", "");
+          if (_allText == "") {
+            _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
+          } else {
+            _allText += _text;
+          }
+          _mdText = _allText + "_";
+          _mdText = _mdText.replace(/\\n/g, "\n");
+          _mdText = _mdText.replace(/\\/g, "");
+          if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
+          //转化返回的回复流数据
+          this.cpote[loading] = _mdText;
+          this.cpoteLoading[loading] = false
+          // 处理流数据
+        }
+      };
+    },
   },
   },
   beforeDestroy() {
   beforeDestroy() {
     clearTimeout(this.timer);
     clearTimeout(this.timer);

Some files were not shown because too many files changed in this diff