lsc 1 year ago
parent
commit
df6cda8c10

+ 3 - 3
src/components/courseDetail.vue

@@ -80,11 +80,11 @@
                 </div>
               </div>
               <div class="btnBox">
-                <div class="now_study" @click="dialogVisible = true" v-if="tType != 2">
+                <!-- <div class="now_study" @click="dialogVisible = true">
                   立即学习
-                </div>
+                </div> -->
               <div class="now_study" @click="dialogVisibleGroup = true">
-                 {{courseDetail.userid != userid ? '加入分组' : '设置分组'}}
+                 {{(courseDetail.userid != userid && courseDetail.course_teacher.indexOf(userid) == -1) ? '加入分组' : '设置分组'}}
               </div>
               <div class="now_group" v-if="groupInfo">
                 <span>所在分组:</span>{{ groupInfo.name }}

+ 3 - 3
src/components/group/group.vue

@@ -14,9 +14,9 @@
                         <div @click="setClassid(item.id)" :class="{ active: classid == item.id }"
                             v-for="(item, index) in classList" :key="index">{{ item.name }}</div>
                     </div>
-                    <div class="btn_right" v-if="courseDetail.userid == userid">
+                    <div class="btn_right" v-if="courseDetail.userid == userid || courseDetail.course_teacher.indexOf(userid) != -1">
                         <div style="color: rgb(171 171 171); margin: 0 10px 0 0">
-                            提示:需要锁定位置,才能点击头像修改座位
+                            提示:开启【开放选座】,学生能够自由加入和退出小组
                         </div>
                         <!-- 开放选座 -->
                         <!-- <div type="primary" v-if="groupJson.islock == 1 && groupJson.group.length" class="returnBtn"
@@ -156,7 +156,7 @@
                                             退出分组
                                         </div>
                                         <div style="margin-top:10px"
-                                            v-if="courseDetail.userid == userid && groupStudent[g.id].length < groupJson.number"
+                                            v-if="(courseDetail.userid == userid || courseDetail.course_teacher.indexOf(userid) != -1) && groupStudent[g.id].length < groupJson.number"
                                             @click="addGroupStudent(g.id)">
                                             添加组员
                                         </div>

+ 2 - 2
src/components/noTerminal/courseDetail.vue

@@ -80,9 +80,9 @@
                 </div>
               </div>
               <div class="btnBox">
-                <div class="now_study" @click="dialogVisible = true">
+                <!-- <div class="now_study" @click="dialogVisible = true">
                   立即学习
-                </div>
+                </div> -->
               <!-- <div class="now_study" @click="dialogVisibleGroup = true">
                  {{courseDetail.userid != userid ? '加入分组' : '设置分组'}}
               </div> -->

File diff suppressed because it is too large
+ 252 - 297
src/components/noTerminal/studyStudent.vue


+ 26 - 1
src/components/student/courseDetail.vue

@@ -60,6 +60,12 @@
               </div>
               <div class="cType" style="font-size: 18px; color: #6c6c6c">
               </div>
+              <div class="btnBox">
+                <div class="now_study" @click="dialogVisible = true">
+                  预览
+                </div>
+                <div class="now_study" @click="goToCongress">进展</div>
+            </div>
             </div>
           </div>
         </div>
@@ -139,6 +145,16 @@ export default {
     goTo(path) {
       this.$router.push(path);
     },
+    goToCongress(){
+      window.location.href='https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/courseProgress?cid=' +
+                      this.id +
+                      '&userid=' +
+                      this.userid +
+                      '&oid=' +
+                      this.oid +
+                      '&org=' +
+                      this.org
+    },
     addUserRate(i) {
       // var suid = this.userid;
       // if (
@@ -448,7 +464,7 @@ export default {
 }
 
 .now_study {
-  width: 150px;
+  padding: 0 50px;
   height: 35px;
   color: #fff;
   background: #4a9eed;
@@ -460,6 +476,10 @@ export default {
   margin-top: 30px;
 }
 
+.now_study + .now_study{
+  margin-left: 10px;
+}
+
 .choose_who {
   display: flex;
   margin: 15px 0 0 25px;
@@ -1144,4 +1164,9 @@ export default {
 .s_up2 {
   transform: rotate(90deg);
 }
+
+.btnBox{
+  display: flex;
+}
+
 </style>

+ 19 - 8
src/components/studentIndex.vue

@@ -76,8 +76,7 @@
                     <div style="color: #b4b4b4">{{ item.utime }}</div>
                   </div>
                 </div>
-                <div class="now_study">
-                  <div @click="
+                <div class="now_study" @click="
                     goTo(
                       '/courseDetailS?courseId=' +
                       item.courseId +
@@ -97,11 +96,10 @@
                       screenType
                     )
                   ">
-                    预览
-                  </div>
-                  <div @click="goToCongress(item)">
+                    立即学习
+                  <!-- <div @click="goToCongress(item)">
                     进展
-                  </div>
+                  </div> -->
                 </div>
               </div>
             </div>
@@ -900,8 +898,21 @@ export default {
 .people>div:nth-child(2) {
   margin-left: 10px;
 }
-
 .now_study {
+  width: 100%;
+  height: 40px;
+  color: #fff;
+  background: #4a9eed;
+  text-align: center;
+  line-height: 40px;
+  font-size: 13px;
+  cursor: pointer;
+}
+
+.now_study:hover {
+  background: #205cc6;
+}
+/* .now_study {
   width: 100%;
   height: 40px;
   color: #222;
@@ -924,7 +935,7 @@ export default {
 .now_study > div:hover {
   background: #6574a2;
     color: #fff;
-}
+} */
 
 .main_box {
   width: 100%;

+ 43 - 26
src/components/studyStudent.vue

@@ -1816,7 +1816,7 @@
 
                         <div class="comment" style="min-width: 200px">
                           <div class="worksName">
-                            <div style="cursor: pointer" @click="openSname(w.sName, w.wid)">
+                            <div style="cursor: pointer" @click="openSname(w.sName, w.wid, toolIndex)">
                               {{ w.sName }}
                             </div>
                           </div>
@@ -4617,7 +4617,7 @@
             </div>
             <div v-if="e.detail">{{ e.detail }}</div>
           </div>
-          <div class="easy_comment" v-if="isStar == false">
+          <div class="easy_comment" v-if="false">
             <div v-for="(p, pIndex) in PlTextList" :key="pIndex" @click="fastText(p, 2)">
               {{ p }}
             </div>
@@ -4653,7 +4653,7 @@
             </div>
             <div v-if="e.detail">{{ e.detail }}</div>
           </div>
-          <div class="easy_comment" v-if="isStar == false">
+          <div class="easy_comment" v-if="false">
             <div v-for="(p, pIndex) in PlTextList" :key="pIndex" @click="fastText(p, 2)">
               {{ p }}
             </div>
@@ -5128,7 +5128,7 @@
       <div v-if="dialogVisibleGroup">
         <div v-if="courseDetail.userid == userid" class="g_d_btnBox">
           <div style="color: rgb(171 171 171); margin: 0 10px 0 0">
-            提示:需要锁定位置,才能点击头像修改座位
+            提示:开启【开放选座】,学生能够自由加入和退出小组
           </div>
           <!-- <div type="primary" v-if="groupJson.islock == 1" class="returnBtn" style="background-color: #225bc7"
             @click="lockChair">
@@ -5561,7 +5561,7 @@
               ></el-input> -->
 
               <el-select style="margin-top: 10px" v-model="item.username" filterable allow-create placeholder="请选择学生">
-                <el-option v-for="item1 in uploadStudentJuri" :key="item1.userid"
+                <el-option v-for="item1 in checkUpload()" :key="item1.userid"
                   :label="item1.name ? item1.name : item1.username" :value="item1.userid">
                 </el-option>
               </el-select>
@@ -5593,7 +5593,7 @@
         <span class="tian1">名称</span>
         <el-select v-model="worksSName" filterable allow-create style="width: 250px; margin: 15px 0px"
           placeholder="请选择学生">
-          <el-option v-for="item in classJuri" :key="item.userid" :label="item.name ? item.name : item.username"
+          <el-option v-for="item in uploadStudentJuri" :key="item.userid" :label="item.name ? item.name : item.username"
             :value="item.userid">
           </el-option>
         </el-select>
@@ -6533,22 +6533,6 @@ export default {
           console.error(err);
         });
     },
-
-    selectCStudent() {
-      let params = {
-        cid: this.tcid ? this.tcid : this.courseDetail.juri,
-        oid: this.oid,
-        cn: '',
-      };
-      this.ajax
-        .get(this.$store.state.api + "selectSnameByCidGroup", params)
-        .then((res) => {
-          this.classJuri = res.data[0];
-        })
-        .catch((err) => {
-          console.error(err);
-        });
-    },
     selectUploadStudent() {
       let params = {
         cid: this.uploadCid,
@@ -6558,7 +6542,16 @@ export default {
       this.ajax
         .get(this.$store.state.api + "selectSnameByCidGroup", params)
         .then((res) => {
-          this.uploadStudentJuri = res.data[0];
+          var studentK = [];
+            if (this.isWorksS[this.toolindex].length > 0) {
+              for (var z = 0; z < this.isWorksS[this.toolindex].length; z++) {
+                studentK.push(this.isWorksS[this.toolindex][z].uid);
+              }
+              studentK = studentK.join(",");
+            }
+          this.uploadStudentJuri = res.data[0].filter((el)=>{
+            return studentK.indexOf(el.userid) == -1
+          });
         })
         .catch((err) => {
           console.error(err);
@@ -8354,7 +8347,7 @@ export default {
                   uid: file.uid,
                   fileType: _ftype,
                   username:
-                    _this.plworkFile.length + 1 > 10
+                    _this.plworkFile.length > 10
                       ? _this.plworkFile.length + 1
                       : "0" + (_this.plworkFile.length + 1),
                 });
@@ -9339,7 +9332,6 @@ export default {
             _this.selectSWorks(gindex);
           }
 
-          _this.selectCStudent();
           _this.selectStudent();
           _this.selectSLook();
           if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
@@ -9673,6 +9665,7 @@ export default {
               this.navList[this.courseType].isOpen = true;
               this.taskCount = parseInt(_followC[1])
               this.navId = res.data[0][0].followC;
+              document.scrollingElement.scrollTop = 0;
               this.getCourseDetail(2)
             }
           }
@@ -10733,6 +10726,12 @@ export default {
       if (t == 16 || t == 32 || t == 57 || t == 50) {
         this.dialogVisibleWorks = true;
       } else if (t == 15) {
+        this.answerQ = this.chapInfoList[this.courseType].chapterInfo[0]
+          .taskJson[index].toolChoose[i].answerQ
+          ? this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index]
+            .toolChoose[i].answerQ
+          : "";
+        this.questionAnswer = ''
         this.answerDialogVisibleTeacher = true;//问答
       } else if (t == 52) {
         this.wordJson = this.chapInfoList[this.courseType].chapterInfo[0]
@@ -11051,9 +11050,12 @@ export default {
       this.fulltype = type;
       this.fullUrl = url;
     },
-    openSname(n, id) {
+    openSname(n, id, i) {
       this.snameWid = id;
       this.worksSName = n;
+      this.toolindex = i
+      this.uploadCid = this.tcid ? this.tcid : this.courseDetail.juri
+      this.selectUploadStudent();
       this.dialogVisibleSname = true;
     },
     updateName() {
@@ -11682,6 +11684,21 @@ export default {
           : "";
       };
     },
+    checkUpload(){
+      return function(){
+        var studentK = [];
+            if (this.plworkFile.length > 0) {
+              for (var z = 0; z < this.plworkFile.length; z++) {
+                studentK.push(this.plworkFile[z].username);
+              }
+              studentK = studentK.join(",");
+            }
+            var a  = this.uploadStudentJuri.filter((el)=>{
+            return studentK.indexOf(el.userid) == -1
+          });
+          return  a
+      }
+    }
   },
   mounted() {
     if (this.screenType == 2) {

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