lsc 1 year ago
parent
commit
50ba03a8e4

+ 1 - 1
dist/index.html

@@ -18,7 +18,7 @@
       border-radius: 10px;
       -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
       background-color: rgba(0, 0, 0, 0.1);
-    }</style><link href=./static/css/app.7e27addeb5a59aa0e0f6192579d48a5f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.99a913bcc02dad4e392a.js></script><script type=text/javascript src=./static/js/app.e440bc42261d93789dd7.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.8a765a449584f91d80615a1a072335d9.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.99a913bcc02dad4e392a.js></script><script type=text/javascript src=./static/js/app.967bc00f59264cdf5077.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

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


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


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


BIN
dist/static/img/downC.d085d2d.png


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


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


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


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


+ 6 - 6
src/components/components/answerData.vue

@@ -24,7 +24,7 @@
         <div v-for="(item, index) in timu" :key="index" class="borderB">
           <div class="s_title">第{{ index + 1 }}题</div>
           <div class="stuBox" style="margin-top: 20px; align-items: flex-start">
-            <div style="margin: 0 0 10px 0; min-width: 70px; color: #adadad">
+            <div style="margin: 0 0 10px 0; min-width: 70px; color: #adadad;font-size:16px;">
               答对同学:
             </div>
             <div class="stuBox" style="flex-wrap: wrap">
@@ -39,7 +39,7 @@
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="dialogVisible = false"
+        <el-button @click="dialogVisible = false"
           >关 闭</el-button
         >
       </span>
@@ -287,7 +287,7 @@ export default {
 
 .dialog_diy >>> .el-dialog__header,
 .dialog_diy1 >>> .el-dialog__header {
-  background: #002e81 !important;
+  background: #454545 !important;
   padding: 15px 20px;
 }
 
@@ -320,7 +320,6 @@ export default {
 .dialog_diy1 >>> .el-dialog__footer {
   background: #fafafa;
 }
-
 .s_title {
   /* margin-top: 10px; */
   font-size: 18px;
@@ -336,8 +335,6 @@ export default {
 }
 
 .studentClass {
-  background: #46a1eb;
-  color: #fff;
   width: 90px;
   height: 25px;
   text-align: center;
@@ -350,6 +347,9 @@ export default {
   text-overflow: ellipsis;
   font-size: 16px;
   margin-bottom: 10px;
+  background: #fff;
+  color: #0061ff;
+  border: 1px solid #0061ff;
 }
 
 .borderB {

+ 20 - 19
src/components/components/answerData2.vue

@@ -29,7 +29,7 @@
         <div v-for="(item, index) in timu" :key="index" class="borderB">
           <div class="s_title">第{{index+1}}题</div>
           <div class="stuBox" style="margin-top: 20px;align-items: flex-start;">
-            <div style="margin: 0 0 10px 0; min-width: 70px; color: #adadad">
+            <div style="margin: 0 0 10px 0; min-width: 70px; color: #adadad;font-size:16px;">
               答对同学:
             </div>
             <div class="stuBox" style="flex-wrap: wrap">
@@ -39,7 +39,7 @@
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="dialogVisible = false">关 闭</el-button>
+        <el-button @click="dialogVisible = false">关 闭</el-button>
       </span>
     </el-dialog>
   </div>
@@ -359,39 +359,39 @@ export default {
   margin: 0 3px;
 }
 
-.dialog_diy>>>.el-dialog__header,
-.dialog_diy1>>>.el-dialog__header {
-  background: #002e81 !important;
+.dialog_diy >>> .el-dialog__header,
+.dialog_diy1 >>> .el-dialog__header {
+  background: #454545 !important;
   padding: 15px 20px;
 }
 
-.dialog_diy>>>.el-dialog__title,
-.dialog_diy1>>>.el-dialog__title {
+.dialog_diy >>> .el-dialog__title,
+.dialog_diy1 >>> .el-dialog__title {
   color: #fff;
 }
 
-.dialog_diy>>>.el-dialog__headerbtn,
-.dialog_diy1>>>.el-dialog__headerbtn {
+.dialog_diy >>> .el-dialog__headerbtn,
+.dialog_diy1 >>> .el-dialog__headerbtn {
   top: 19px;
 }
 
-.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close,
-.dialog_diy1>>>.el-dialog__headerbtn .el-dialog__close {
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close,
+.dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close {
   color: #fff;
 }
 
-.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover,
-.dialog_diy1>>>.el-dialog__headerbtn .el-dialog__close:hover {
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover,
+.dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close:hover {
   color: #fff;
 }
 
-.dialog_diy1>>>.el-dialog__body {
+.dialog_diy1 >>> .el-dialog__body {
   padding: 0;
 }
 
-.dialog_diy>>>.el-dialog__body,
-.dialog_diy>>>.el-dialog__footer,
-.dialog_diy1>>>.el-dialog__footer {
+.dialog_diy >>> .el-dialog__body,
+.dialog_diy >>> .el-dialog__footer,
+.dialog_diy1 >>> .el-dialog__footer {
   background: #fafafa;
 }
 
@@ -410,8 +410,6 @@ export default {
 }
 
 .studentClass {
-  background: #46a1eb;
-  color: #fff;
   width: 90px;
   height: 25px;
   text-align: center;
@@ -424,6 +422,9 @@ export default {
   text-overflow: ellipsis;
   font-size: 16px;
   margin-bottom: 10px;
+  background: #fff;
+  color: #0061ff;
+  border: 1px solid #0061ff;
 }
 
 .borderB {

+ 7 - 6
src/components/components/askStatic.vue

@@ -127,7 +127,7 @@
         <div v-for="(item, index) in timu" :key="index" class="borderB">
           <div v-html="item" class="s_title"></div>
           <div class="stuBox" style="margin-top: 20px; align-items: flex-start">
-            <div style="margin: 0 0 10px 0; min-width: 70px; color: #adadad">
+            <div style="margin: 0 0 10px 0; min-width: 70px; color: #adadad;font-size:16px;">
               选择同学:
             </div>
             <div class="stuBox" style="flex-wrap: wrap">
@@ -142,7 +142,7 @@
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="dialogVisible = false"
+        <el-button @click="dialogVisible = false"
           >关 闭</el-button
         >
       </span>
@@ -333,7 +333,7 @@ export default {
 
 .dialog_diy >>> .el-dialog__header,
 .dialog_diy1 >>> .el-dialog__header {
-  background: #002e81 !important;
+  background: #454545 !important;
   padding: 15px 20px;
 }
 
@@ -382,8 +382,6 @@ export default {
 }
 
 .studentClass {
-  background: #46a1eb;
-  color: #fff;
   width: 90px;
   height: 25px;
   text-align: center;
@@ -394,8 +392,11 @@ export default {
   overflow: hidden;
   padding: 5px;
   text-overflow: ellipsis;
-  font-size: 14px;
+  font-size: 16px;
   margin-bottom: 10px;
+  background: #fff;
+  color: #0061ff;
+  border: 1px solid #0061ff;
 }
 
 .borderB {

+ 8 - 5
src/components/components/askStatic2.vue

@@ -163,7 +163,7 @@
           </div>
           <div v-else v-html="item" class="s_title"></div>
           <div class="stuBox" style="margin-top: 20px; align-items: flex-start">
-            <div style="margin: 0 0 10px 0; min-width: 70px; color: #adadad">
+            <div style="margin: 0 0 10px 0; min-width: 70px; color: #adadad;font-size:16px;">
               选择同学:
             </div>
             <div class="stuBox" style="flex-wrap: wrap">
@@ -178,7 +178,7 @@
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="dialogVisible = false"
+        <el-button @click="dialogVisible = false"
           >关 闭</el-button
         >
       </span>
@@ -373,7 +373,7 @@ export default {
 
 .dialog_diy >>> .el-dialog__header,
 .dialog_diy1 >>> .el-dialog__header {
-  background: #002e81 !important;
+  background: #454545 !important;
   padding: 15px 20px;
 }
 
@@ -422,8 +422,8 @@ export default {
 }
 
 .studentClass {
-  background: #46a1eb;
-  color: #fff;
+  /* background: #46a1eb;
+  color: #fff; */
   width: 90px;
   height: 25px;
   text-align: center;
@@ -436,6 +436,9 @@ export default {
   text-overflow: ellipsis;
   font-size: 16px;
   margin-bottom: 10px;
+  background: #fff;
+  color: #0061ff;
+  border: 1px solid #0061ff;
 }
 
 .borderB {

+ 120 - 40
src/components/easy2/studyStudent.vue

@@ -720,12 +720,6 @@
                               <span v-if="vitem.text">{{ vitem.text }}-</span
                               >{{ vitem.name }}
                             </div>
-                            <div class="downIcon" @click="downloadFile2(vitem)">
-                              <img
-                                src="../../assets/icon/newIcon/down.png"
-                                alt
-                              />
-                            </div>
                             <div
                               class="downIcon"
                               @click="checkFileFull1(vitem.type, vitem)"
@@ -735,18 +729,18 @@
                                 alt
                               />
                             </div>
-                          </div>
-                          <div class="navListItem" v-if="vitem.type == 12">
-                            <div class="navText" @click="downloadFile2(vitem)">
-                              <span v-if="vitem.text">{{ vitem.text }}-</span
-                              >{{ vitem.name }}
-                            </div>
                             <div class="downIcon" @click="downloadFile2(vitem)">
                               <img
                                 src="../../assets/icon/newIcon/down.png"
                                 alt
                               />
                             </div>
+                          </div>
+                          <div class="navListItem" v-if="vitem.type == 12">
+                            <div class="navText" @click="downloadFile2(vitem)">
+                              <span v-if="vitem.text">{{ vitem.text }}-</span
+                              >{{ vitem.name }}
+                            </div>
                             <div
                               class="downIcon"
                               @click="checkFileFull1(vitem.type, vitem)"
@@ -756,6 +750,12 @@
                                 alt
                               />
                             </div>
+                            <div class="downIcon" @click="downloadFile2(vitem)">
+                              <img
+                                src="../../assets/icon/newIcon/down.png"
+                                alt
+                              />
+                            </div>
                           </div>
                           <div class="navListItem" v-if="vitem.type == 13">
                             <div
@@ -1311,21 +1311,15 @@
                         </div>
                       </div>
                     </div>
-                    <div class="tooldetail" v-if="tool.toolDetail != ''">
+                    <div class="tooldetail" v-if="tool.toolDetail != ''" :class="{isUpdateToolDetailClass:toolDetailIndex == toolIndex}">
                       <!-- <div class="toolTitle">工具描述</div> -->
-                      <div
+                      <div style="height:100%;"
                         v-html="contentConvent(tool.toolDetail)"
                         v-if="toolDetailIndex != toolIndex"
-                        @click.stop="updateToolDetail(toolIndex)"
+                        @click.stop="updateToolDetail(toolIndex, 2)"
                       ></div>
-                      <div v-else @click.stop="">
-                        <el-input
-                          type="textarea"
-                          :rows="3"
-                          resize="none"
-                          v-model="updateToolDetailInner"
-                          placeholder="请输入任务描述"
-                        ></el-input>
+                      <div v-else @click.stop="" style="height:100%;">
+                        <textarea @change="() => { $forceUpdate() }" class="checkTextArea" rows="3" v-autoHeight="70" type="text" placeholder="请输入任务描述" v-model="updateToolDetailInner"></textarea>
                       </div>
                     </div>
                     <el-button
@@ -7519,7 +7513,7 @@
                 >
                   <div class="e_add_top">
                     <div class="e_add_title">
-                      <span>目标管理名称</span>
+                      <!-- <span>目标管理名称</span> -->
                       <span>{{ eTitle }}</span>
                       <img
                         src="../../assets/line.png"
@@ -7528,7 +7522,7 @@
                           width: 125px;
                           height: 20px;
                           bottom: -10px;
-                          left: 120px;
+                          left: 5px;
                         "
                       />
                       <!-- <el-input
@@ -7541,7 +7535,7 @@
                   <div class="e_add_content">
                     <div class="e_add_list_pbox">
                       <div class="e_add_list_pbox_title">
-                        <span class="type_title">切换模式</span>
+                        <!-- <span class="type_title">切换模式</span> -->
                         <div class="type_content">
                           <span
                             :class="{ active: typeMode == 1 }"
@@ -11936,18 +11930,22 @@ export default {
           document.querySelector(".student_body").offsetTop;
       }, 500);
     },
-    updateToolDetail(i) {
-      this.toolDetailIndex = i;
-      if (!this.isUpdateToolDetail1) {
+    updateToolDetail(i, type) {
+      if (!this.isUpdateToolDetail1 && type == 2) {
+        this.toolDetailIndex = i
         this.isUpdateToolDetail1 = true;
-        this.updateToolDetailInner = JSON.parse(
-          JSON.stringify(
-            this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
-              this.taskCount
-            ].toolChoose[i].toolDetail
-          )
-        );
-      } else {
+        setTimeout(() => {
+          this.updateToolDetailInner = JSON.parse(
+            JSON.stringify(
+              this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+                this.taskCount
+              ].toolChoose[i].toolDetail
+            )
+          );
+          document.querySelector(".checkTextArea").focus();
+        }, 0);
+      } else if((this.isUpdateToolDetail1 && type != 2)){
+        // this.toolDetailIndex = i;
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
           this.taskCount
         ].toolChoose[i].toolDetail = JSON.parse(
@@ -11970,6 +11968,7 @@ export default {
               type: "success",
             });
             this.toolDetailIndex = null;
+            
             this.updateToolDetailInner = "";
             this.getCourseDetail(2);
             this.$forceUpdate();
@@ -11977,6 +11976,46 @@ export default {
           .catch((err) => {
             console.error(err);
           });
+      } else if((this.isUpdateToolDetail1 && type == 2)){
+        this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+          this.taskCount
+        ].toolChoose[this.toolDetailIndex].toolDetail = JSON.parse(
+          JSON.stringify(this.updateToolDetailInner)
+        );
+        let params = [
+          {
+            cid: this.id,
+            chapters: JSON.stringify(this.chapInfoList),
+            uid: this.userid,
+            unitIndex: this.courseType,
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "updateWorkNew4", params)
+          .then((res) => {
+            this.$message({
+              message: "修改成功",
+              type: "success",
+            });
+            
+            this.toolDetailIndex = i;
+            this.isUpdateToolDetail1 = true;
+            setTimeout(() => {
+              this.updateToolDetailInner = JSON.parse(
+                JSON.stringify(
+                  this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+                    this.taskCount
+                  ].toolChoose[i].toolDetail
+                )
+              );
+              document.querySelector(".checkTextArea").focus();
+            }, 0);
+            this.getCourseDetail(2);
+            this.$forceUpdate();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
       }
     },
     jumpGj(i, j, k, l) {
@@ -11999,9 +12038,10 @@ export default {
           a.scrollTop = a.scrollTop - 150;
         }, 0);
       }
+      this.navId = ""
       if (l) {
         this.courseType = i;
-        this.navId = l;
+        // this.navId = l;
         this.taskCount = j;
         this.selectPz();
         this.getHomeWork();
@@ -15411,6 +15451,13 @@ export default {
       //     window.scrollTo(0, a.offsetTop);
       //   }
       // }, 0);
+      for (var z = 0; z < this.navList.length; z++) {
+        for (var q = 0; q < this.navList[z].task.length; q++) {
+          for (var w = 0; w < this.navList[z].task[q].tool.length; w++) {
+            this.navList[z].task[q].tool[w].isTool = false;
+          }
+        }
+      }
       this.selectPz();
       this.getHomeWork();
       this.getCourseDetail(2);
@@ -18923,6 +18970,19 @@ export default {
         clearInterval(el.__vueSetInterval__);
       },
     },
+    autoHeight: {
+      update(el, binding) {
+        const { value } = binding
+        if (value && typeof value === 'number') {
+          el.style.height = `${value}px`
+        } else {
+          el.style.height = 'auto'
+        }
+      },
+      componentUpdated(el) {
+        el.style.height = `${el.scrollHeight + 5}px`
+      },
+    },
   },
   beforeDestroy() {
     window.onresize = null;
@@ -19292,13 +19352,15 @@ export default {
 .filebox .tooldetail {
   width: calc(100% - 280px);
   margin: 0px 12px;
-  padding: 12px 25px 0 13px;
+  padding: 12px;
   line-height: 30px;
   word-break: break-word;
   background: #ffffff;
   border-radius: 8px 8px 8px 8px;
   opacity: 1;
   border: 1px solid #cad1dc;
+  overflow:hidden;
+  box-sizing:border-box;
 }
 
 .file {
@@ -21149,7 +21211,7 @@ export default {
 
 .type_content {
   font-size: 16px;
-  margin-left: 30px;
+  /* margin-left: 30px; */
 }
 
 .type_content span + span {
@@ -23311,4 +23373,22 @@ ol {
   max-height: 300px;
   overflow: auto;
 }
+
+.isUpdateToolDetailClass{
+ padding: 0 !important; 
+}
+
+.isUpdateToolDetailClass textarea{
+  padding:12px;
+  font-size: 16px;
+  min-height:100%;
+  width: 100%;
+  box-sizing:border-box;
+  outline: none;
+  border:none;
+  line-height: 30px;
+  resize: none;
+  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", Arial, sans-serif;
+  color: #838383;
+}
 </style>

+ 120 - 40
src/components/easy3/studyStudent.vue

@@ -710,12 +710,6 @@
                               <span v-if="vitem.text">{{ vitem.text }}-</span
                               >{{ vitem.name }}
                             </div>
-                            <div class="downIcon" @click="downloadFile2(vitem)">
-                              <img
-                                src="../../assets/icon/newIcon/down.png"
-                                alt
-                              />
-                            </div>
                             <div
                               class="downIcon"
                               @click="checkFileFull1(vitem.type, vitem)"
@@ -725,18 +719,18 @@
                                 alt
                               />
                             </div>
-                          </div>
-                          <div class="navListItem" v-if="vitem.type == 12">
-                            <div class="navText" @click="downloadFile2(vitem)">
-                              <span v-if="vitem.text">{{ vitem.text }}-</span
-                              >{{ vitem.name }}
-                            </div>
                             <div class="downIcon" @click="downloadFile2(vitem)">
                               <img
                                 src="../../assets/icon/newIcon/down.png"
                                 alt
                               />
                             </div>
+                          </div>
+                          <div class="navListItem" v-if="vitem.type == 12">
+                            <div class="navText" @click="downloadFile2(vitem)">
+                              <span v-if="vitem.text">{{ vitem.text }}-</span
+                              >{{ vitem.name }}
+                            </div>
                             <div
                               class="downIcon"
                               @click="checkFileFull1(vitem.type, vitem)"
@@ -746,6 +740,12 @@
                                 alt
                               />
                             </div>
+                            <div class="downIcon" @click="downloadFile2(vitem)">
+                              <img
+                                src="../../assets/icon/newIcon/down.png"
+                                alt
+                              />
+                            </div>
                           </div>
                           <div class="navListItem" v-if="vitem.type == 13">
                             <div
@@ -1298,21 +1298,15 @@
                         </div>
                       </div>
                     </div>
-                    <div class="tooldetail" v-if="tool.toolDetail != ''">
+                    <div class="tooldetail" v-if="tool.toolDetail != ''" :class="{isUpdateToolDetailClass:toolDetailIndex == toolIndex}">
                       <!-- <div class="toolTitle">工具描述</div> -->
-                      <div
+                      <div style="height:100%;"
                         v-html="contentConvent(tool.toolDetail)"
                         v-if="toolDetailIndex != toolIndex"
-                        @click.stop="updateToolDetail(toolIndex)"
+                        @click.stop="updateToolDetail(toolIndex, 2)"
                       ></div>
-                      <div v-else @click.stop="">
-                        <el-input
-                          type="textarea"
-                          :rows="3"
-                          resize="none"
-                          v-model="updateToolDetailInner"
-                          placeholder="请输入任务描述"
-                        ></el-input>
+                      <div v-else @click.stop="" style="height:100%;">
+                        <textarea @change="() => { $forceUpdate() }" class="checkTextArea" rows="3" v-autoHeight="70" type="text" placeholder="请输入任务描述" v-model="updateToolDetailInner"></textarea>
                       </div>
                     </div>
                     <el-button
@@ -7506,7 +7500,7 @@
                 >
                   <div class="e_add_top">
                     <div class="e_add_title">
-                      <span>目标管理名称</span>
+                      <!-- <span>目标管理名称</span> -->
                       <span>{{ eTitle }}</span>
                       <img
                         src="../../assets/line.png"
@@ -7515,7 +7509,7 @@
                           width: 125px;
                           height: 20px;
                           bottom: -10px;
-                          left: 120px;
+                          left: 5px;
                         "
                       />
                       <!-- <el-input
@@ -7528,7 +7522,7 @@
                   <div class="e_add_content">
                     <div class="e_add_list_pbox">
                       <div class="e_add_list_pbox_title">
-                        <span class="type_title">切换模式</span>
+                        <!-- <span class="type_title">切换模式</span> -->
                         <div class="type_content">
                           <span
                             :class="{ active: typeMode == 1 }"
@@ -11924,18 +11918,22 @@ export default {
           document.querySelector(".student_body").offsetTop;
       }, 500);
     },
-    updateToolDetail(i) {
-      this.toolDetailIndex = i;
-      if (!this.isUpdateToolDetail1) {
+    updateToolDetail(i, type) {
+      if (!this.isUpdateToolDetail1 && type == 2) {
+        this.toolDetailIndex = i
         this.isUpdateToolDetail1 = true;
-        this.updateToolDetailInner = JSON.parse(
-          JSON.stringify(
-            this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
-              this.taskCount
-            ].toolChoose[i].toolDetail
-          )
-        );
-      } else {
+        setTimeout(() => {
+          this.updateToolDetailInner = JSON.parse(
+            JSON.stringify(
+              this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+                this.taskCount
+              ].toolChoose[i].toolDetail
+            )
+          );
+          document.querySelector(".checkTextArea").focus();
+        }, 0);
+      } else if((this.isUpdateToolDetail1 && type != 2)){
+        // this.toolDetailIndex = i;
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
           this.taskCount
         ].toolChoose[i].toolDetail = JSON.parse(
@@ -11958,6 +11956,7 @@ export default {
               type: "success",
             });
             this.toolDetailIndex = null;
+            
             this.updateToolDetailInner = "";
             this.getCourseDetail(2);
             this.$forceUpdate();
@@ -11965,6 +11964,46 @@ export default {
           .catch((err) => {
             console.error(err);
           });
+      } else if((this.isUpdateToolDetail1 && type == 2)){
+        this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+          this.taskCount
+        ].toolChoose[this.toolDetailIndex].toolDetail = JSON.parse(
+          JSON.stringify(this.updateToolDetailInner)
+        );
+        let params = [
+          {
+            cid: this.id,
+            chapters: JSON.stringify(this.chapInfoList),
+            uid: this.userid,
+            unitIndex: this.courseType,
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "updateWorkNew4", params)
+          .then((res) => {
+            this.$message({
+              message: "修改成功",
+              type: "success",
+            });
+            
+            this.toolDetailIndex = i;
+            this.isUpdateToolDetail1 = true;
+            setTimeout(() => {
+              this.updateToolDetailInner = JSON.parse(
+                JSON.stringify(
+                  this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+                    this.taskCount
+                  ].toolChoose[i].toolDetail
+                )
+              );
+              document.querySelector(".checkTextArea").focus();
+            }, 0);
+            this.getCourseDetail(2);
+            this.$forceUpdate();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
       }
     },
     jumpGj(i, j, k, l) {
@@ -11987,9 +12026,10 @@ export default {
           a.scrollTop = a.scrollTop - 150;
         }, 0);
       }
+      this.navId = ""
       if (l) {
         this.courseType = i;
-        this.navId = l;
+        // this.navId = l;
         this.taskCount = j;
         this.selectPz();
         this.getHomeWork();
@@ -15400,6 +15440,13 @@ export default {
       //     window.scrollTo(0, a.offsetTop);
       //   }
       // }, 0);
+      for (var z = 0; z < this.navList.length; z++) {
+        for (var q = 0; q < this.navList[z].task.length; q++) {
+          for (var w = 0; w < this.navList[z].task[q].tool.length; w++) {
+            this.navList[z].task[q].tool[w].isTool = false;
+          }
+        }
+      }
       this.selectPz();
       this.getHomeWork();
       this.getCourseDetail(2);
@@ -18912,6 +18959,19 @@ export default {
         clearInterval(el.__vueSetInterval__);
       },
     },
+    autoHeight: {
+      update(el, binding) {
+        const { value } = binding
+        if (value && typeof value === 'number') {
+          el.style.height = `${value}px`
+        } else {
+          el.style.height = 'auto'
+        }
+      },
+      componentUpdated(el) {
+        el.style.height = `${el.scrollHeight + 5}px`
+      },
+    },
   },
   beforeDestroy() {
     window.onresize = null;
@@ -19281,13 +19341,15 @@ export default {
 .filebox .tooldetail {
   width: calc(100% - 280px);
   margin: 0px 12px;
-  padding: 12px 25px 0 13px;
+  padding: 12px;
   line-height: 30px;
   word-break: break-word;
   background: #ffffff;
   border-radius: 8px 8px 8px 8px;
   opacity: 1;
   border: 1px solid #cad1dc;
+  overflow:hidden;
+  box-sizing:border-box;
 }
 
 .file {
@@ -21138,7 +21200,7 @@ export default {
 
 .type_content {
   font-size: 16px;
-  margin-left: 30px;
+  /* margin-left: 30px; */
 }
 
 .type_content span + span {
@@ -23300,4 +23362,22 @@ ol {
   max-height: 300px;
   overflow: auto;
 }
+
+.isUpdateToolDetailClass{
+ padding: 0 !important; 
+}
+
+.isUpdateToolDetailClass textarea{
+  padding:12px;
+  font-size: 16px;
+  min-height:100%;
+  width: 100%;
+  box-sizing:border-box;
+  outline: none;
+  border:none;
+  line-height: 30px;
+  resize: none;
+  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", Arial, sans-serif;
+  color: #838383;
+}
 </style>

+ 131 - 43
src/components/studyStudent.vue

@@ -86,7 +86,9 @@
             <div
               class="stageBoxCss"
               @click="get(stageIndex)"
-              :class="{ stageBoxIsCss: item.isOpen }"
+              :class="{ 
+                // stageBoxIsCss: stageIndex == courseType,
+               }"
             >
               <div class="stageItemTitle" :class="{ stageNav: item.isOpen }">
                 <div>阶段{{ stageIndex + 1 }}</div>
@@ -100,10 +102,10 @@
                   </div>
                 </el-tooltip>
               </div>
-              <div class="closeTri" v-if="item.isOpen">
+              <!-- <div class="closeTri" v-if="stageIndex == courseType" :style="{transform:item.isOpen ? 'rotate(0deg)' : 'rotate(-90deg)'}">
                 <img src="../assets/icon/newIcons/downC.png" alt />
-              </div>
-              <div class="closeTri" v-else>
+              </div> -->
+              <div class="closeTri" :style="{transform:item.isOpen ? 'rotate(90deg)' : 'rotate(0deg)'}">
                 <img src="../assets/icon/newIcons/right.png" alt />
               </div>
             </div>
@@ -723,9 +725,6 @@
                               <span v-if="vitem.text">{{ vitem.text }}-</span
                               >{{ vitem.name }}
                             </div>
-                            <div class="downIcon" @click="downloadFile2(vitem)">
-                              <img src="../assets/icon/newIcon/down.png" alt />
-                            </div>
                             <div
                               class="downIcon"
                               @click="checkFileFull1(vitem.type, vitem)"
@@ -735,15 +734,15 @@
                                 alt
                               />
                             </div>
+                            <div class="downIcon" @click="downloadFile2(vitem)">
+                              <img src="../assets/icon/newIcon/down.png" alt />
+                            </div>
                           </div>
                           <div class="navListItem" v-if="vitem.type == 12">
                             <div class="navText" @click="downloadFile2(vitem)">
                               <span v-if="vitem.text">{{ vitem.text }}-</span
                               >{{ vitem.name }}
                             </div>
-                            <div class="downIcon" @click="downloadFile2(vitem)">
-                              <img src="../assets/icon/newIcon/down.png" alt />
-                            </div>
                             <div
                               class="downIcon"
                               @click="checkFileFull1(vitem.type, vitem)"
@@ -753,6 +752,9 @@
                                 alt
                               />
                             </div>
+                            <div class="downIcon" @click="downloadFile2(vitem)">
+                              <img src="../assets/icon/newIcon/down.png" alt />
+                            </div>
                           </div>
                           <div class="navListItem" v-if="vitem.type == 13">
                             <div
@@ -1305,21 +1307,15 @@
                         </div>
                       </div>
                     </div>
-                    <div class="tooldetail" v-if="tool.toolDetail != ''">
+                    <div class="tooldetail" v-if="tool.toolDetail != ''" :class="{isUpdateToolDetailClass:toolDetailIndex == toolIndex}">
                       <!-- <div class="toolTitle">工具描述</div> -->
-                      <div
+                      <div style="height:100%;"
                         v-html="contentConvent(tool.toolDetail)"
                         v-if="toolDetailIndex != toolIndex"
-                        @click.stop="updateToolDetail(toolIndex)"
+                        @click.stop="updateToolDetail(toolIndex, 2)"
                       ></div>
-                      <div v-else @click.stop="">
-                        <el-input
-                          type="textarea"
-                          :rows="3"
-                          resize="none"
-                          v-model="updateToolDetailInner"
-                          placeholder="请输入任务描述"
-                        ></el-input>
+                      <div v-else @click.stop="" style="height:100%;">
+                        <textarea @change="() => { $forceUpdate() }" class="checkTextArea" rows="3" v-autoHeight="70" type="text" placeholder="请输入任务描述" v-model="updateToolDetailInner"></textarea>
                       </div>
                     </div>
                     <el-button
@@ -7512,7 +7508,7 @@
                 >
                   <div class="e_add_top">
                     <div class="e_add_title">
-                      <span>目标管理名称</span>
+                      <!-- <span>目标管理名称</span> -->
                       <span>{{ eTitle }}</span>
                       <img
                         src="../assets/line.png"
@@ -7521,7 +7517,7 @@
                           width: 125px;
                           height: 20px;
                           bottom: -10px;
-                          left: 120px;
+                          left: 5px;
                         "
                       />
                       <!-- <el-input
@@ -7534,7 +7530,7 @@
                   <div class="e_add_content">
                     <div class="e_add_list_pbox">
                       <div class="e_add_list_pbox_title">
-                        <span class="type_title">切换模式</span>
+                        <!-- <span class="type_title">切换模式</span> -->
                         <div class="type_content">
                           <span
                             :class="{ active: typeMode == 1 }"
@@ -11903,18 +11899,22 @@ export default {
           document.querySelector(".student_body").offsetTop;
       }, 500);
     },
-    updateToolDetail(i) {
-      this.toolDetailIndex = i;
-      if (!this.isUpdateToolDetail1) {
+    updateToolDetail(i, type) {
+      if (!this.isUpdateToolDetail1 && type == 2) {
+        this.toolDetailIndex = i
         this.isUpdateToolDetail1 = true;
-        this.updateToolDetailInner = JSON.parse(
-          JSON.stringify(
-            this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
-              this.taskCount
-            ].toolChoose[i].toolDetail
-          )
-        );
-      } else {
+        setTimeout(() => {
+          this.updateToolDetailInner = JSON.parse(
+            JSON.stringify(
+              this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+                this.taskCount
+              ].toolChoose[i].toolDetail
+            )
+          );
+          document.querySelector(".checkTextArea").focus();
+        }, 0);
+      } else if((this.isUpdateToolDetail1 && type != 2)){
+        // this.toolDetailIndex = i;
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
           this.taskCount
         ].toolChoose[i].toolDetail = JSON.parse(
@@ -11937,6 +11937,7 @@ export default {
               type: "success",
             });
             this.toolDetailIndex = null;
+            
             this.updateToolDetailInner = "";
             this.getCourseDetail(2);
             this.$forceUpdate();
@@ -11944,6 +11945,46 @@ export default {
           .catch((err) => {
             console.error(err);
           });
+      } else if((this.isUpdateToolDetail1 && type == 2)){
+        this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+          this.taskCount
+        ].toolChoose[this.toolDetailIndex].toolDetail = JSON.parse(
+          JSON.stringify(this.updateToolDetailInner)
+        );
+        let params = [
+          {
+            cid: this.id,
+            chapters: JSON.stringify(this.chapInfoList),
+            uid: this.userid,
+            unitIndex: this.courseType,
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "updateWorkNew4", params)
+          .then((res) => {
+            this.$message({
+              message: "修改成功",
+              type: "success",
+            });
+            
+            this.toolDetailIndex = i;
+            this.isUpdateToolDetail1 = true;
+            setTimeout(() => {
+              this.updateToolDetailInner = JSON.parse(
+                JSON.stringify(
+                  this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+                    this.taskCount
+                  ].toolChoose[i].toolDetail
+                )
+              );
+              document.querySelector(".checkTextArea").focus();
+            }, 0);
+            this.getCourseDetail(2);
+            this.$forceUpdate();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
       }
     },
     jumpGj(i, j, k, l) {
@@ -11958,7 +11999,7 @@ export default {
       this.navList[i].task[j].tool[k].isTool =
         !this.navList[i].task[j].tool[k].isTool;
       var a = document.scrollingElement;
-
+      this.navId = ""
       let target = document.querySelector(`#gj${k}`);
       if (target) {
         target.scrollIntoView(true);
@@ -11968,7 +12009,7 @@ export default {
       }
       if (l) {
         this.courseType = i;
-        this.navId = l;
+        // this.navId = l;
         this.taskCount = j;
         this.selectPz();
         this.getHomeWork();
@@ -15299,7 +15340,7 @@ export default {
       this.getCourseDetail(2);
       this.$forceUpdate();
     },
-    openTask(s, n, i) {
+    openTask(s, n, i,ctype) {
       if (this.IsFollow && this.tType == 2) {
         this.$message.error("已经开启跟随模式,请认真跟堂听讲");
         return;
@@ -15339,15 +15380,19 @@ export default {
           }
         }
       }
-      if (this.navList[s].task[n].isOpen == true) {
+      if (this.navList[s].task[n].isOpen == true && ctype != 2) {
         this.navList[s].task[n].isOpen = !this.navList[s].task[n].isOpen;
         return;
       }
       this.courseType = s;
       this.navId = i;
       this.taskCount = n;
-      this.navList[this.courseType].task[this.taskCount].isOpen =
+      if(ctype == 2){
+        this.navList[s].task[n].isOpen = true
+      }else{
+        this.navList[this.courseType].task[this.taskCount].isOpen =
         !this.navList[this.courseType].task[this.taskCount].isOpen;
+      }
       if (this.IsLookOpen) {
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
           this.taskCount
@@ -15378,6 +15423,13 @@ export default {
       //     window.scrollTo(0, a.offsetTop);
       //   }
       // }, 0);
+      for (var z = 0; z < this.navList.length; z++) {
+        for (var q = 0; q < this.navList[z].task.length; q++) {
+          for (var w = 0; w < this.navList[z].task[q].tool.length; w++) {
+            this.navList[z].task[q].tool[w].isTool = false;
+          }
+        }
+      }
       this.selectPz();
       this.getHomeWork();
       this.getCourseDetail(2);
@@ -15392,9 +15444,11 @@ export default {
       //   this.navList[k].isOpen = false;
       // }
       // this.navList[i].isOpen = true;
+      let a = this.navList[i].isOpen
       this.navList[i].isOpen = !this.navList[i].isOpen;
+      this.$forceUpdate()
       if (this.navList[i].isOpen) {
-        this.openTask(i, 0, i + "-0");
+        this.openTask(i, 0, (i + "-0"),2);
       }
     },
     addQuestion() {
@@ -18886,6 +18940,19 @@ export default {
         clearInterval(el.__vueSetInterval__);
       },
     },
+    autoHeight: {
+      update(el, binding) {
+        const { value } = binding
+        if (value && typeof value === 'number') {
+          el.style.height = `${value}px`
+        } else {
+          el.style.height = 'auto'
+        }
+      },
+      componentUpdated(el) {
+        el.style.height = `${el.scrollHeight}px`
+      },
+    },
   },
   beforeDestroy() {
     window.onresize = null;
@@ -19252,13 +19319,15 @@ export default {
 .filebox .tooldetail {
   width: calc(100% - 280px);
   margin: 0px 12px;
-  padding: 12px 25px 0 13px;
+  padding: 12px;
   line-height: 30px;
   word-break: break-word;
   background: #ffffff;
   border-radius: 8px 8px 8px 8px;
   opacity: 1;
   border: 1px solid #cad1dc;
+  overflow:hidden;
+  box-sizing:border-box;
 }
 
 .file {
@@ -21109,7 +21178,7 @@ export default {
 
 .type_content {
   font-size: 16px;
-  margin-left: 30px;
+  /* margin-left: 30px; */
 }
 
 .type_content span + span {
@@ -22792,6 +22861,7 @@ ol {
   min-width: 15px;
   width: 15px;
   height: 15px;
+  transition: all .5s;
 }
 
 .closeTri1 {
@@ -23294,4 +23364,22 @@ ol {
   max-height: 300px;
   overflow: auto;
 }
+
+.isUpdateToolDetailClass{
+ padding: 0 !important; 
+}
+
+.isUpdateToolDetailClass textarea{
+  padding:12px;
+  font-size: 16px;
+  min-height:100%;
+  width: 100%;
+  box-sizing:border-box;
+  outline: none;
+  border:none;
+  line-height: 30px;
+  resize: none;
+  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", Arial, sans-serif;
+  color: #838383;
+}
 </style>

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