lsc 9 månader sedan
förälder
incheckning
2d6aba36f2

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.ce87bd1e4ed476586090ed5f90580166.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.f1ca754a4b35a9ec6d84.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.b948cb571715ac8604a38b4bcc89d17f.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.39f3b81605d0c73ceb08.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/css/app.b948cb571715ac8604a38b4bcc89d17f.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/css/app.b948cb571715ac8604a38b4bcc89d17f.css.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/css/app.ce87bd1e4ed476586090ed5f90580166.css.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 6 - 0
dist/static/img/videoFile.8b2406f.svg


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/app.39f3b81605d0c73ceb08.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/app.39f3b81605d0c73ceb08.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 92 - 43
src/components/pages/aiAddCourse/addCourse.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="pb_content" style="background: #f0f2f5" v-loading="loading">
     <div class="pb_content_body" style="position: relative; margin: 0">
-      <div class="right" :style="{width:promptShow ? 'calc(100% - 300px)' : '100%'}">
+      <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
         <div class="courseTop">
           <div class="stepsNav">
             <el-breadcrumb separator-class="el-icon-arrow-right">
@@ -26,7 +26,7 @@
         <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
         <!-- @mouseenter="stepDisplay(true)"
               @mouseleave="stepDisplay(false)" -->
-        <div ref="stepBox" class="stepBox">
+        <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
           <div class="stepBg" v-if="false">
             <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
               <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
@@ -99,8 +99,8 @@
             style="padding: 0" :style="{
               height:
                 !isStepDisplay && !isBtnDisplay
-                  ? 'calc(100% - 20px)'
-                  : 'calc(100% - 100px)',
+                  ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
+                  : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
             }">
             <div class="updateMask" :style="{
               height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
@@ -348,9 +348,11 @@
               <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
                 <div class="c_info_title">
                   课程简要描述
-                  <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
+                  <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                    <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>
                 </div>
                 <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
                   <div style="width: calc(100%)">
@@ -651,9 +653,11 @@
                         placeholder="请输入任务描述" v-model="item.taskDetail2"></textarea>
                       <div class="op_box">
                         <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
-                        <div class="r_pub_button_op"
+                        <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                          <div class="r_pub_button_op"
                           @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item.taskDetail2, index)"
                           @click="openAiDialog(2, 'aiDetail1', item.taskDetail2, index)">智能优化</div>
+                        </el-tooltip>
                       </div>
                     </div>
                   </div>
@@ -680,9 +684,11 @@
                       <div class="op_box">
                         <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                         <div style="display: flex;">
-                          <div class="r_pub_button_op"
-                          @contextmenu.prevent="openAiDialog(1, 'teacherDetail', item.taskDetail3, index)"
-                          @click="openAiDialog(2, 'teacherDetail', item.taskDetail3, index)">智能优化</div>
+                          <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>
+                          </el-tooltip>
                           <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{ item.isTask3 ? '确定' : '编辑'}}</div>
                         </div>
                       </div>
@@ -691,7 +697,7 @@
                 </div>
               </div>
             </div>
-            <div class="info_btnBox3">
+            <div class="info_btnBox3" v-if="istemplate != 1">
               <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
                 goTo(
                   '/course?userid=' +
@@ -709,20 +715,22 @@
               <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
                 {{ steps == 4 ? "返回课程" : "上一步" }}
               </button>
-              <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps(2)"
-                @contextmenu.prevent="nextSteps(1)" :class="{
-                  pub_btn_next_img: steps != 3,
-                  pub_btn_finish_img: steps == 3,
-                }">
-                {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
-              </button>
+              <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps(2)"
+                  @contextmenu.prevent="nextSteps(1)" :class="{
+                    pub_btn_next_img: steps != 3,
+                    pub_btn_finish_img: steps == 3,
+                  }">
+                  {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
+                </button>
+              </el-tooltip>
             </div>
           </div>
           <div class="rightBox" v-if="steps == 2" :style="{
             height:
               !isStepDisplay && !isBtnDisplay
-                ? 'calc(100% - 40px)'
-                : 'calc(100% - 100px)',
+                ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
+                : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
           }">
             <div class="basic_box" style="
                 padding: 20px 30px 0px !important;
@@ -871,19 +879,24 @@
               </button>
             </div>
           </div>
-          <div class="rightBox" v-if="steps == 3" ref="rightboxR" :style="{
+          <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
             height:
               !isStepDisplay && !isBtnDisplay
-                ? 'calc(100% - 40px)'
-                : 'calc(100% - 100px)',
+                ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
+                : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
           }">
             <div class="rb_c_box">
-              <div class="rb_c_box_left" v-if="steps == 3 && unitJson[unitIndex].easy != 1">
+              <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
                 <div class="rb_c_nav">
                   <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
                   <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
                 </div>
-                <div class="stepsBottom" v-if="stepsNav == 1">
+                <div class="stepsBottom" v-if="stepsNav == 1" 
+                :style="{
+                  height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
+                  position: istemplate == 1 ? 'sticky' : 'unset',
+                  top: istemplate == 1 ? '0' : 'unset'
+                }">
                   <!-- <div class="navTop">辅助导航</div> -->
                   <div class="navBottom" v-if="courseState == 4">
                     <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
@@ -1124,7 +1137,7 @@
                       阶段顺序
                     </button>
                     <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
-                      v-if="steps == 3 && isPasteTask" style="margin: 0 0 0 auto">
+                      v-if="(steps == 3 || istemplate == 1)  && isPasteTask" style="margin: 0 0 0 auto">
                       智能粘贴
                     </button>
                     <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
@@ -1516,11 +1529,13 @@
                                   "></textarea> -->
                               <div class="op_box">
                                 <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
-                                <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
-                                  itemTaskIndex
-                                ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
-                                  itemTaskIndex
-                                ], itemTaskIndex)">智能优化</div>
+                                <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                                  <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
+                                    itemTaskIndex
+                                  ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
+                                    itemTaskIndex
+                                  ], itemTaskIndex)">智能优化</div>
+                                </el-tooltip>
                               </div>
                             </div>
                           </div>
@@ -3178,10 +3193,12 @@
                                   " v-model="itemTool.toolDetail"></textarea>
                                 <div class="op_box">
                                   <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
-                                  <div class="r_pub_button_op"
-                                    @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
-                                    @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
-                                    智能优化</div>
+                                  <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                                    <div class="r_pub_button_op"
+                                      @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
+                                      @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
+                                      智能优化</div>
+                                  </el-tooltip>
                                 </div>
                               </div>
                             </div>
@@ -3476,9 +3493,11 @@
                                 margin: 20px 0;
                               ">
                               <div class="lineTitle clineTitle">评价设置</div>
-                              <div class="r_pub_button_op" style="margin-left:auto;"
+                              <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                                <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>
+                              </el-tooltip>
                               <!-- <div class="line" style="width: 90%"></div> -->
                             </div>
                           </div>
@@ -3643,17 +3662,17 @@
                       ">
                       返回课程
                     </button>
-                    <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5"
+                    <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 ? "返回课程" : "上一步" }}
                     </button>
-                    <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
+                    <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
                       pub_btn_next_img: steps != 3,
                       pub_btn_finish_img: steps == 3,
                     }">
                       {{ steps == 3 ? "确认上传" : "下一步" }}
                     </button>
-                    <button class="c_pub_button_confirm" v-if="steps < 4 && promptShow" @click="openSaveTips">保存模板</button>
+                    <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ? '修改模板' : '保存模板'}}</button>
                   </div>
                 </div>
               </div>
@@ -3708,7 +3727,7 @@
           </div>
         </div>
       </div>
-      <div class="leftBar" v-if="promptShow">
+      <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"/>
@@ -5083,7 +5102,7 @@
       :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
     <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" @aiConfirm="aiConfirm" :clickType="clickType">
     </aiDialog>
-    <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"></tipsDialog>
+    <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid" @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
   </div>
 </template>
 
@@ -5377,7 +5396,7 @@ export default {
       newIndex: "",
       englishList: {},
       typeIndex: "",
-      courseState: 2,
+      courseState: 4,
       taskJSONa: [
         {
           task: "",
@@ -5457,6 +5476,7 @@ export default {
       clickType: 1,
       promptShow: false,
       templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
+      istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
       dialogVisibleTips: false,
       tipsJson: {}
     };
@@ -5969,6 +5989,19 @@ export default {
       return _guid;
     },
     retrunCourse() {
+      if(this.istemplate == 1){
+        this.goTo(
+              "/course?userid=" +
+              this.userid +
+              "&oid=" +
+              this.oid +
+              "&org=" +
+              this.org +
+              "&role=" +
+              this.role
+            );
+        return
+      }
       this.$confirm("是否保存已编辑内容?", "提示", {
         confirmButtonText: "保存",
         cancelButtonText: "不保存",
@@ -10652,7 +10685,19 @@ export default {
         this.ajax
           .get(this.$store.state.api + "select_course_detail", params)
           .then((res) => {
- 
+            let _unitJson = JSON.parse(res.data[0][0].chapters);
+            let fileInfo = []
+            for(var i = 0; i < _unitJson.length; i++){
+              let tasks = _unitJson[i].chapterInfo[0].taskJson
+              for(var j = 0; j < tasks.length; j++){
+                if(tasks[j].chapterData.length){
+                  fileInfo = [...fileInfo, ...tasks[j].chapterData] 
+                }
+              }
+            }
+
+            this.infoData = fileInfo
+
             this.$forceUpdate();
             this.courseName = res.data[0][0].title;
             this.courseText = res.data[0][0].brief;
@@ -13068,7 +13113,7 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
               taskDetail: "",
               taskDetail2: _task.detail,
               taskDetail3: "",
-              chapterData: [],
+              chapterData: _this.infoData,
               toolText: "",
               toolChoose: [
                 {
@@ -13892,6 +13937,10 @@ ${_this.aiCallBack}
     this.getTipsTemplate();
     // this.selectType();
     this.selectEva();
+    if(this.istemplate == 1){
+      this.isOutline = true
+      this.isOutline2 = true
+    }
     this.loading = false;
     this.timer2 = setInterval(() => {
       this.selectEva();

+ 14 - 8
src/components/pages/aiAddCourse/templateDialog.vue

@@ -10,6 +10,7 @@
                 </el-input>
             </div>
             <div class="a-d-t-right">
+                <!-- <el-button @click="open2()" type="primary" size="small" style="margin-right: 10px;">设置模板</el-button> -->
                 <span @click.stop="close">×</span>
             </div>
         </div>
@@ -58,6 +59,8 @@
 									">
                                 <div class="a-d-b-i-t-btn" v-if="item.userid == userid" style="margin-right: 10px;"
                                     @click="deleteA(item.id)">删除</div>
+                                <div class="a-d-b-i-t-btn1" v-if="item.userid == userid" style="margin-right: 10px;"
+                                    @click="open2(item.id)">修改</div>
                                 <div class="a-d-b-i-t-btn1" @click="open(item.id)">
                                     使用
                                 </div>
@@ -137,6 +140,9 @@ export default {
         open(id) {
             this.$emit('goToCourseTemplate', id)
         },
+        open2(id) {
+            this.$emit('goToCourseTemplate2', id)
+        },
         deleteA(id) {
             let _this = this
             _this.$confirm(
@@ -305,7 +311,7 @@ export default {
 }
 
 .a-d-t-right {
-    width: 40px;
+    /* width: 40px; */
     height: 40px;
     margin-right: 10px;
     display: flex;
@@ -342,8 +348,8 @@ export default {
 }
 
 .a-d-b-item {
-    width: 22%;
-    height: 200px;
+    width: 30%;
+    height: 240px;
     display: flex;
     flex-direction: column;
     background-color: #fff;
@@ -410,10 +416,10 @@ export default {
     overflow: hidden;
     /* max-height: 186px; */
     max-height: 100px;
-    height: 100px;
-    min-height: 100px;
+    height: 140px;
+    min-height: 140px;
     font-size: 14px;
-    -webkit-line-clamp: 5;
+    -webkit-line-clamp: 7;
     line-height: 20px;
     display: -webkit-box;
     -webkit-box-orient: vertical;
@@ -425,7 +431,7 @@ export default {
     font-size: 14px;
     width: 98%;
     box-sizing: border-box;
-    padding: 8px 25px;
+    padding: 8px 0;
     border: 1px solid rgb(247, 30, 30);
     border-radius: 5px;
     color: rgb(247, 30, 30);
@@ -439,7 +445,7 @@ export default {
     font-size: 14px;
     width: 98%;
     box-sizing: border-box;
-    padding: 8px 25px;
+    padding: 8px 0;
     border: 1px solid rgba(54, 129, 252, 1);
     border-radius: 5px;
     background-color: rgba(54, 129, 252, 1);

+ 74 - 30
src/components/pages/aiAddCourse/tipsDialog.vue

@@ -47,6 +47,10 @@ export default {
             type: String,
             default: ''
         },
+        templateid: {
+            type: String,
+            default: ''
+        }
     },
     data() {
         return {
@@ -61,11 +65,11 @@ export default {
                 this.title = this.tipsJson.name ? this.tipsJson.name : ''
                 this.detail = this.tipsJson.detail ? this.tipsJson.detail : ''
                 this.radio = this.tipsJson.open ? parseInt(this.tipsJson.open) : 0
-            }else {
+            } else {
                 this.$emit('update:tipsJson', {
-                    name:this.title,
-                    detail:this.detail,
-                    open:this.radio,
+                    name: this.title,
+                    detail: this.detail,
+                    open: this.radio,
                 })
             }
         },
@@ -83,50 +87,90 @@ export default {
                 this.$message.error('请输入模板名称');
                 return
             }
-            let params = {
-                userid: this.userid,
-                name: this.title
+            if (this.templateid) {
+                this.$confirm(
+                    "确定修改此模板嘛?",
+                    "提示",
+                    {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning",
+                    }
+                )
+                    .then(() => {
+                        this.updateTipsTemplate();
+                    })
+                    .catch(() => {
+                        return;
+                    });
+            }else{
+                this.addTipsTemplate();
             }
+            // let params = {
+            //     userid: this.userid,
+            //     name: this.title
+            // }
+            // this.ajax
+            //     .get(this.$store.state.api + "selectTipsTemplateB", params)
+            //     .then((res) => {
+            //         if (res.data[0].length) {
+            //             this.$confirm(
+            //                 "发现已有此模板,是否以现在的内容覆盖此模板?",
+            //                 "提示",
+            //                 {
+            //                     confirmButtonText: "确定",
+            //                     cancelButtonText: "取消",
+            //                     type: "warning",
+            //                 }
+            //             )
+            //                 .then(() => {
+            //                     this.addTipsTemplate();
+            //                 })
+            //                 .catch(() => {
+            //                     return;
+            //                 });
+            //         } else {
+            //             this.addTipsTemplate();
+            //         }
+            //     })
+            //     .catch((err) => {
+            //         this.$message.error("网络不佳");
+            //         console.error(err);
+            //     });
+        },
+        addTipsTemplate() {
+            let params = [{
+                n: this.title,
+                d: this.detail,
+                json: JSON.stringify(this.aiJson),
+                o: this.radio,
+                uid: this.userid
+            }]
             this.ajax
-                .get(this.$store.state.api + "selectTipsTemplateB", params)
+                .post(this.$store.state.api + "addTipsTemplate", params)
                 .then((res) => {
-                    if (res.data[0].length) {
-                        this.$confirm(
-                            "发现已有此模板,是否以现在的内容覆盖此模板?",
-                            "提示",
-                            {
-                                confirmButtonText: "确定",
-                                cancelButtonText: "取消",
-                                type: "warning",
-                            }
-                        )
-                            .then(() => {
-                                this.addTipsTemplate();
-                            })
-                            .catch(() => {
-                                return;
-                            });
-                    } else {
-                        this.addTipsTemplate();
-                    }
+                    this.$message.success("保存成功");
+                    this.$emit('retrunCourse')
+                    this.close();
                 })
                 .catch((err) => {
                     this.$message.error("网络不佳");
                     console.error(err);
                 });
         },
-        addTipsTemplate() {
+        updateTipsTemplate() {
             let params = [{
                 n: this.title,
                 d: this.detail,
                 json: JSON.stringify(this.aiJson),
                 o: this.radio,
-                uid: this.userid
+                uid: this.templateid
             }]
             this.ajax
                 .post(this.$store.state.api + "addTipsTemplate", params)
                 .then((res) => {
-                    this.$message.success("保存成功");
+                    this.$message.success("修改成功");
+                    this.$emit('retrunCourse')
                     this.close();
                 })
                 .catch((err) => {

+ 33 - 3
src/components/pages/course.vue

@@ -397,7 +397,7 @@
       </span>
     </el-dialog>
 		<shareDialog ref="shareDialogRef"/>
-    <templateDialog :dialogVisibleTemplate.sync="dialogVisibleTemplate" :userid="userid" :org="org" :oid="oid" @goToCourseTemplate="goToCourseTemplate"></templateDialog>
+    <templateDialog :dialogVisibleTemplate.sync="dialogVisibleTemplate" :userid="userid" :org="org" :oid="oid" @goToCourseTemplate="goToCourseTemplate" @goToCourseTemplate2="goToCourseTemplate2"></templateDialog>
   </div>
 </template>
 
@@ -461,8 +461,8 @@ export default {
       pTypeCheckName: [],
       btnDisplay: false,
       dialogVisibleTemplate: false,
-      orgArray:['1973f6c7-1561-11ee-91d8-005056b86db5','777559d2-7239-11ee-b98c-005056b86db5','884c5665-a453-46f3-b7b6-01d575290aa9'],
-      oidArray:['f297fbdc-f0a0-11ee-b534-005056b86db5']
+      orgArray:['1973f6c7-1561-11ee-91d8-005056b86db5','777559d2-7239-11ee-b98c-005056b86db5','884c5665-a453-46f3-b7b6-01d575290aa9','0fec3a8a-ad04-11ed-b13d-005056b86db5'],
+      oidArray:['f297fbdc-f0a0-11ee-b534-005056b86db5','45facc0a-1211-11ec-80ad-005056b86db5']
     };
   },
   methods: {
@@ -610,6 +610,36 @@ export default {
           tid 
         );
     },
+    goToCourseTemplate2(tid){
+      if(tid){
+        this.$router.push(
+          "/aiAddCourse?userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role +
+          "&templateid=" +
+          tid +
+          "&istemplate=1"
+        );
+      }else{
+        this.$router.push(
+          "/aiAddCourse?userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role +
+          "&templateid=" +
+          "&istemplate=1"
+        );
+      }
+    },
     goToCourse5(courseId) {
       if (courseId) {
         this.$router.push(

+ 2 - 2
src/components/pages/newCourse/addCourse.vue

@@ -10005,7 +10005,7 @@ export default {
       //   ic
       // ].name = JSON.parse(JSON.stringify(e.target.value));
       this.line =
-        this.unitJson[i].chapterInfo[0].taskJson[0].chapterData[ic].name;
+        this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
       this.taskCount = j;
       this.lineCount = ic;
       this.dialogVisibleupdataVideoT = true;
@@ -18196,7 +18196,7 @@ ol {
 
 .rb_c_box_right {
   height: auto;
-  width: calc(100%);
+  width: calc(100% - 280px);
   /* overflow: hidden; */
 }
 

Vissa filer visades inte eftersom för många filer har ändrats