lsc 1 ano atrás
pai
commit
657a219c95

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.3925127929a1e9771f4790940fe11ba2.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.1b8e037bd3fbbd358d74.js></script><script type=text/javascript src=./static/js/app.d5cd14b79ad3d5d5bc11.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.b90ac9487ee3f4f8844473e0cb2dc595.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.1b8e037bd3fbbd358d74.js></script><script type=text/javascript src=./static/js/app.d09cfa568c2d6fb934da.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.3925127929a1e9771f4790940fe11ba2.css.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.b90ac9487ee3f4f8844473e0cb2dc595.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.b90ac9487ee3f4f8844473e0cb2dc595.css.map


BIN
dist/static/img/molStr.a170f76.png


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.d09cfa568c2d6fb934da.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.d09cfa568c2d6fb934da.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.d5cd14b79ad3d5d5bc11.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 7 - 4
src/components/pages/addCourse.vue

@@ -1831,7 +1831,7 @@
                                       </div>
                                     </div>
                                   </div>
-                                  <div class="tool">
+                                  <!-- <div class="tool">
                                     <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
                                       <img src="../../assets/icon/secondToolList/molStr.png" alt />
                                       <div style="margin: 5px 0">分子结构</div>
@@ -1843,7 +1843,7 @@
                                         <img src="../../assets/icon/checkedIs.png" alt /><span>已选择</span>
                                       </div>
                                     </div>
-                                  </div>
+                                  </div> -->
                                   <div class="tool">
                                     <div class="whiteBIcon" @click="addTools(68, itemTaskIndex, toolIndex)">
                                       <img src="../../assets/icon/secondToolList/timeAxis.png" alt />
@@ -4023,8 +4023,11 @@ export default {
       // let teacherJuri = this.teacherJuri2;
       this.ManAarray = [];
       let _user = JSON.parse(JSON.stringify(this.checkboxList3));
-      if (_user.indexOf(this.courseUserid || this.userid) == -1) {
-        _user.push(this.courseUserid || this.userid);
+      if (_user.indexOf(this.userid) == -1) {
+        _user.push(this.userid);
+      }
+      if (_user.indexOf(this.courseUserid) == -1) {
+        _user.push(this.courseUserid);
       }
       let params = {
         uid: _user.join(","),

+ 7 - 4
src/components/pages/easy/addCourse.vue

@@ -1273,7 +1273,7 @@
                                     </div>
                                   </div>
                                 </div>
-                                <div class="tool">
+                                <!-- <div class="tool">
                                   <div class="whiteBIcon" @click="
                                     addTools(67, itemTaskIndex, toolIndex)
                                     ">
@@ -1289,7 +1289,7 @@
                                       <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
                                     </div>
                                   </div>
-                                </div>
+                                </div> -->
                                 <div class="tool">
                                   <div class="whiteBIcon" @click="
                                     addTools(68, itemTaskIndex, toolIndex)
@@ -4888,8 +4888,11 @@ export default {
       // let teacherJuri = this.teacherJuri2;
       this.ManAarray = [];
       let _user = JSON.parse(JSON.stringify(this.checkboxList3));
-      if (_user.indexOf(this.courseUserid || this.userid) == -1) {
-        _user.push(this.courseUserid || this.userid);
+      if (_user.indexOf(this.userid) == -1) {
+        _user.push(this.userid);
+      }
+      if (_user.indexOf(this.courseUserid) == -1) {
+        _user.push(this.courseUserid);
       }
       let params = {
         uid: _user.join(","),

+ 5 - 2
src/components/pages/student/addCourse.vue

@@ -5485,8 +5485,11 @@ export default {
         );
       }
       let array = JSON.parse(JSON.stringify(this.checkboxList3));
-      if (array.indexOf(this.courseUserid || this.userid) == -1) {
-        array.push(this.courseUserid || this.userid);
+      if (array.indexOf(this.userid) == -1) {
+        array.push(this.userid);
+      }
+      if (array.indexOf(this.courseUserid) == -1) {
+        array.push(this.courseUserid);
       }
       for (var i = 0; i < _unitJosn.length; i++) {
         let _chapter = _unitJosn[i].chapterInfo[0].taskJson;

+ 5 - 2
src/components/pages/studio/addCourse.vue

@@ -6510,8 +6510,11 @@ export default {
         );
       }
       let array = JSON.parse(JSON.stringify(this.checkboxList3));
-      if (array.indexOf(this.courseUserid || this.userid) == -1) {
-        array.push(this.courseUserid || this.userid);
+      if (array.indexOf(this.userid) == -1) {
+        array.push(this.userid);
+      }
+      if (array.indexOf(this.courseUserid) == -1) {
+        array.push(this.courseUserid);
       }
       for (var i = 0; i < _unitJosn.length; i++) {
         let _chapter = _unitJosn[i].chapterInfo[0].taskJson;

+ 177 - 49
src/components/pages/synergyCourse/addCourse.vue

@@ -28,10 +28,13 @@
           <div class="rightBox" style="padding: 0;"
             :style="{ height: (!isBtnDisplay) ? 'calc(100% - 50px)' : 'calc(100% - 120px)' }" v-if="this.steps == 1">
             <!-- @mousewheel="scrollChange" -->
-            <div class="updateMask" :style="{
+            <!-- <div class="updateMask" :style="{
               height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
+            }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
+            <div class="whiteBg" style="background:unset;padding: 0;position:relative;">
+              <div class="updateMask" :style="{
+              height: '100%',
             }" v-if="cid && userid != courseUserid && role != '1'"></div>
-            <div class="whiteBg" style="background:unset;padding: 0;">
               <div>
                 <div class="basic_box" style="padding: 0;">
                   <div class="big_box">
@@ -43,7 +46,7 @@
                           <div class="course_input_box">
                             <div class="bb_courseIcon"><img src="../../../assets/icon/new/course.png" /></div>
                             <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName"
-                              style="border: 1.5px solid rgb(202, 209, 220);margin: 0px 10px 0px 0px;border-radius: 5px;font-weight: 600;padding: 12px 14px 12px 71px;" />
+                              style="border: 1.5px solid rgb(202, 209, 220);margin: 0px 10px 0px 0px;border-radius: 5px;font-weight: 600;padding: 12px 14px 12px 71px;" @change="changeName"/>
                             <!-- background: #f6f6f6; -->
                             <!-- <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
                               style="justify-content: center;width: 200px;"></el-switch> -->
@@ -110,35 +113,19 @@
                 </div>
               </div>
             </div>
-            <div class="whiteBg" style="margin-top: 10px">
+            <div class="whiteBg" style="margin-top: 10px;">
               <div class="wb_j_box">
                 <div class="wb_j_box_content">
-                  <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
-                    (dialogVisibleClass = true),
-                    (classSearch = ''),
-                    (gradeId = ''),
-                    getClass()
-                    ">添加班级</button>
-                  <div v-if="checkboxList2.length" class="wb_j_box_p_box">
-                    <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
-                      getClassC(tc) }}</span>
-                  </div> -->
-                  <div class="wb_j_box_btn" @click="
-                    (dialogVisibleClass = true),
-                    (classSearch = ''),
-                    (gradeId = ''),
-                    getClass()
-                    ">
-                    <div class="wb_j_box_title">授课班级</div>
-                    <div class="wb_j_box_btn_c">
-                      <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
-                        v-if="checkboxList2.length" popper-class="text_tooltip2">
-                        <div class="wb_j_box_span">{{ getListClassC(checkboxList2) }}</div>
-                      </el-tooltip>
-                      <div v-else class="wb_j_box_span">请选择授课班级</div>
-                      <div class="wb_j_box_arrow"></div>
+                  <div class="wb_j_box_btn"  @click="openMember">
+                      <div class="wb_j_box_title">协同人员</div>
+                      <div class="wb_j_box_btn_c">
+                        <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top" v-if="checkboxList3.length"  popper-class="text_tooltip2">
+                          <div class="wb_j_box_span">{{getListMan2(checkboxList3)}}</div>
+                        </el-tooltip>
+                        <div v-else class="wb_j_box_span">请选择协同人员</div>
+                        <div class="wb_j_box_arrow"></div>
+                      </div>
                     </div>
-                  </div>
                 </div>
                 <div style="margin-left: auto;">
                   <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="isPasteTask">智能粘贴</button>
@@ -146,8 +133,9 @@
               </div>
             </div>
             <div class="whiteBg" style="margin-top: 10px">
-              <groupBox :cid="cid" :classList="classList" :courseDetail="courseDetail" :userid="userid" :type="1"
-                classId="" :oid="oid"></groupBox>
+              <groupBox :cid="cid" :people="checkboxList3" :classList="classList" :courseDetail="courseDetail" :userid="userid" :type="1"
+                classId="" :oid="oid" v-if="cid"></groupBox>
+              <div v-else class="tipsBox">请添加课程名称后才能设置分组</div>
             </div>
             <div class="whiteBg" style="border-radius: 0; background:#F0F2F5;" v-if="false">
               <div style="display: flex">
@@ -1721,7 +1709,7 @@
         <el-button type="primary" @click="isAddClass">确定</el-button>
       </span>
     </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">
       <div class="people">
         <div class="people_top">
@@ -1756,6 +1744,58 @@
         <el-button @click="dialogVisibleMember = false">取 消</el-button>
         <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
       </span>
+    </el-dialog> -->
+    <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
+      :before-close="handleClose" class="addNewPP customWidth">
+      <div class="people">
+        <div class="people_top">
+          <div class="people_top_right">
+            <div class="people_search">
+              <el-input placeholder="搜索完整的姓名/账号(不含邮箱后缀)" v-model="searchTN" @keyup.enter.native="getTeacher"></el-input>
+              <div class="search_img" @click="getTeacher">
+                <img src="../../../assets/icon/search.png" alt />
+              </div>
+            </div>
+          </div>
+          <div class="people_nav">选择成员</div>
+        </div>
+        <div class="t_j_box" style="
+            padding: 20px 0 0 25px;
+            width: calc(100% - 55px);
+            margin-left: 25px;
+          ">
+          <span>姓名</span>
+          <span>身份</span>
+          <span>账号</span>
+          <span>学校</span>
+        </div>
+        <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length">
+          <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
+            <div class="t_j_box">
+              <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
+                <span>{{ item.name ? item.name : "暂无姓名" }}</span>
+              </el-tooltip>
+              <span>{{ item.type == "1" ? "老师" : "学生" }}</span>
+              <el-tooltip placement="top" :content="item.username">
+                <span>{{ item.username }}</span>
+              </el-tooltip>
+              <el-tooltip placement="top" :content="item.school">
+                <span>{{ item.school }}</span>
+              </el-tooltip>
+            </div>
+          </el-checkbox>
+        </el-checkbox-group>
+        <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
+      </div>
+      <div style="margin-top: 10px;">
+        <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total"
+          v-if="page && teacherJuri.length" style="padding-bottom: 20px"
+          @current-change="handleCurrentChange"></el-pagination>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleMember = false">取 消</el-button>
+        <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
+      </span>
     </el-dialog>
     <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px"
       :before-close="(done) => { closePan(4) }" class="dialog_diy fullStyle">
@@ -2895,6 +2935,9 @@ export default {
       imageList: [],
       heightPx: '100%',
       toolsData: toolsData,
+      pageSize:20,
+      total:0,
+      page:0,
     };
   },
   directives: {
@@ -2941,6 +2984,24 @@ export default {
         return this.ManAarray.length ? _people2 : "";
       };
     },
+    getListMan2() {
+      return function (list) {
+        let _people2 = [];
+        if (this.ManAarray.length) {
+          for(var j = 0;j < list.length; j++){
+            let people = list[j];
+            for (var i = 0; i < this.ManAarray.length; i++) {
+              if (this.ManAarray[i].userid == people && people != this.courseUserid) {
+                _people2.push(this.ManAarray[i].name);
+                break;
+              }
+            }
+          }
+        }
+
+        return this.ManAarray.length ? _people2.join("、") : "";
+      };
+    },
     isInvite() {
       return function (cid) {
         let array = [];
@@ -3110,6 +3171,11 @@ export default {
     },
   },
   methods: {
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.page = val;
+      this.getTeacher();
+    },
     openAI() {
       window.parent.postMessage({ tools: "64" }, "*");
     },
@@ -3117,8 +3183,11 @@ export default {
       // let teacherJuri = this.teacherJuri2;
       this.ManAarray = [];
       let _user = JSON.parse(JSON.stringify(this.checkboxList3));
-      if (_user.indexOf(this.courseUserid || this.userid) == -1) {
-        _user.push(this.courseUserid || this.userid);
+      if (_user.indexOf(this.userid) == -1) {
+        _user.push(this.userid);
+      }
+      if (_user.indexOf(this.courseUserid) == -1) {
+        _user.push(this.courseUserid);
       }
       let params = {
         uid: _user.join(","),
@@ -3384,6 +3453,23 @@ export default {
       }
       this.$refs.stepBox.scrollTop = 0;
     },
+    changeName(){
+      if (this.cid == "" || this.cid == undefined) {
+        if (this.courseName == "") {
+          this.$message.error("请补充填写课程名称");
+          return;
+        } else {
+          this.addWork(2);
+        }
+      } else {
+        if (this.courseName == "") {
+          this.$message.error("请补充填写课程名称");
+          return;
+        } else {
+          this.updateWork(2);
+        }
+      }
+    },
     unitSet(i) {
       this.unitIndex = i;
       // this.$refs.rightboxR.scrollTop = 0;
@@ -4558,23 +4644,28 @@ export default {
     },
     getTeacher() {
       let params = {
-        oid:
+        org:
           this.org && this.org != "undefined" && this.org != "null"
             ? this.org
-            : this.oid,
+            : "",
+        oid: this.oid,
         cu: "",
         cn: this.searchTN,
+        page: this.page,
+        pageSize: this.pageSize,
       };
       this.ajax
         .get(
           this.$store.state.api +
           (this.org && this.org != "undefined" && this.org != "null"
-            ? "selectTeacherAddOrg"
-            : "selectTeacherAdd"),
+            ? "selectUserByOidS2"
+            : "selectUserByOidS2"),
           params
         )
         .then((res) => {
           let teacherJuri = res.data[0];
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.teacherJuri2 = JSON.parse(JSON.stringify(res.data[0]));
           for (var i = 0; i < teacherJuri.length; i++) {
             if (teacherJuri[i].userid == this.userid) {
               teacherJuri.splice(i, 1);
@@ -4704,7 +4795,7 @@ export default {
       this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
       this.$forceUpdate();
     },
-    addWork() {
+    addWork(type) {
       let cPan = 1;
       for (var i = 0; i < this.unitJson.length; i++) {
         for (
@@ -4794,13 +4885,27 @@ export default {
           this.cid = res.data.courseId;
           this.courseUserid = this.userid;
           this.islogin = true;
-          this.steps = 4;
+          if(type!=2){
+            this.steps = 4;
+          }else{
+            this.selectCourseDetail222();
+          }
         })
         .catch((err) => {
           this.$message.error("网络不佳");
           console.error(err);
         });
     },
+    selectCourseDetail222() {
+        let params = {
+          cid: this.cid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "select_synergy", params)
+          .then((res) => {
+            this.courseDetail = res.data[0][0]
+          });
+    },
     goCourse() {
       window.parent.postMessage({ cid: this.courseId, type: "1" }, "*");
     },
@@ -4851,7 +4956,7 @@ export default {
           console.error(err);
         });
     },
-    updateWork() {
+    updateWork(type) {
       let cPan = 1;
       for (var i = 0; i < this.unitJson.length; i++) {
         for (
@@ -4944,7 +5049,9 @@ export default {
           // }
           this.number = this.nbOrder;
           this.courseId = this.cid;
-          this.steps = 4;
+          if(type != 2){
+            this.steps = 4;
+          }
         })
         .catch((err) => {
           this.$message.error("网络不佳");
@@ -7058,7 +7165,12 @@ export default {
       }, 0);
     },
     openMember() {
+      if(this.cid && this.userid != this.courseUserid && this.role != '1'){
+        this.$message.error('非管理员和创建者不可编辑')
+        return;
+      }
       this.searchTN = "";
+      this.page = 1
       this.getTeacher();
       this.dialogVisibleMember = true;
     },
@@ -8699,11 +8811,16 @@ export default {
 .people_name {
   display: flex;
   justify-content: flex-start;
-  padding: 20px 10px;
+  padding: 10px 0 0 25px;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  height: calc(100% - 140px);
+  overflow-y: auto;
+  overflow-x: hidden;
   flex-direction: column;
-  flex-wrap: wrap;
 }
 
+
 .p_box {
   position: relative;
 }
@@ -10565,7 +10682,7 @@ ol {
 }
 
 .updateTips::after {
-  content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
+  content: "协同构建不支持修改基本信息,只支持加入分组。";
   font-size: 14px;
   margin-left: 20px;
   font-weight: 400;
@@ -10593,14 +10710,19 @@ ol {
 }
 
 .t_j_box span:nth-child(2) {
-  width: 30%;
+  min-width: 30px;
+  margin-right: 10px;
+}
+
+.t_j_box span:nth-child(3) {
+  width: 38%;
   overflow: hidden;
   text-overflow: ellipsis;
   margin-right: 10px;
 }
 
-.t_j_box span:nth-child(3) {
-  max-width: calc(55% - 20px);
+.t_j_box span:nth-child(4) {
+  max-width: calc(45% - 60px);
   overflow: hidden;
   text-overflow: ellipsis;
 }
@@ -11346,4 +11468,10 @@ ol {
 .class_item>>>.el-checkbox__input {
   display: flex;
   align-items: center;
-}</style>
+}
+.tipsBox{
+  text-align: center;
+    line-height: 200px;
+    font-size: 20px;
+}
+</style>

+ 4 - 4
src/components/pages/synergyCourse/course.vue

@@ -139,14 +139,14 @@
       <div class="student_table">
         <div class="course_box">
           <div class="out_box" v-for="(item, index) in course" :key="index">
-            <!-- <div class="myCourse" v-if="item.userid == userid">我的课程</div>
+            <div class="myCourse" v-if="item.userid == userid">我的创建</div>
             <div class="myCourse" style="background: #4187f0" v-else-if="!item.course_teacher ||
               (item.course_teacher &&
                 item.course_teacher.indexOf(userid) == -1)
               ">
-              他人课程
+              他人创建
             </div>
-            <div class="xtCourse" v-else>协同课程</div> -->
+            <div class="xtCourse" v-else>协同构建</div>
             <div class="tup">
               <img :src="item.cover != null && item.cover != ''
                 ? JSON.parse(item.cover).length > 0
@@ -858,7 +858,7 @@ export default {
     // },
     deleteCourse(cid) {
       // if (this.time()) {
-      this.$confirm("确定删除此课程吗?", "提示", {
+      this.$confirm("确定删除吗?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",

+ 60 - 21
src/components/pages/synergyCourse/group/group.vue

@@ -1,8 +1,8 @@
 <template>
     <div>
-        <div>
+        <div style="overflow: auto">
             <div class="g_d_btnBox">
-                <div class="btn_left" v-if="type == 1 || type == 4">
+                <!-- <div class="btn_left" v-if="type == 1 || type == 4">
                     <div @click="setClassid('1')" :class="{ active: classid == '1' }" v-if="!classList.length">全部</div>
                     <div @click="setClassid(item.id)" :class="{ active: classid == item.id }"
                         v-for="(item, index) in classList" :key="index">{{ item.name }}</div>
@@ -11,11 +11,13 @@
                     <div @click="setClassid('1')" :class="{ active: classid == '1' }" v-if="!classList.length">全部</div>
                     <div @click="setClassid(item.id)" :class="{ active: classid == item.id }"
                         v-for="(item, index) in classList" :key="index">{{ item.name }}</div>
-                </div>
+                </div> -->
+                <div></div>
+                <!-- || (courseDetail.course_teacher && courseDetail.course_teacher.indexOf(userid) != -1) -->
                 <div class="btn_right"
-                    v-if="courseDetail.userid == userid || (courseDetail.course_teacher && courseDetail.course_teacher.indexOf(userid) != -1)">
+                    v-if="courseDetail.userid == userid">
                     <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"
@@ -41,6 +43,16 @@
                         删除分组
                     </div>
                 </div>
+                <div class="btn_right"
+                    v-else>
+                    <div style="color: rgb(171 171 171); margin: 0 10px 0 0">
+                        提示:开启【开放选座】,能够自由加入和退出小组。
+                    </div>
+                    <div class="group_switch">
+                        <span>开放选座</span>
+                        <el-switch v-model="islock" active-text="" class="switchCss" @change="lockChair" disabled></el-switch>
+                    </div>
+                </div>
             </div>
             <div style="min-height: 250px;">
                 <div class="g_d_box" v-if="groupJson.group.length && isopen">
@@ -163,9 +175,10 @@
                                         退出分组
                                     </div>
                                     <div style="margin-top:10px"
-                                        v-if="(courseDetail.userid == userid || (courseDetail.course_teacher && courseDetail.course_teacher.indexOf(userid) != -1)) && groupStudent[g.id].length < groupJson.number"
+                                        v-if="(courseDetail.userid == userid ) && groupStudent[g.id].length < groupJson.number"
                                         @click="addGroupStudent(g.id)">
                                         添加组员
+                                        <!-- || (courseDetail.course_teacher && courseDetail.course_teacher.indexOf(userid) != -1) -->
                                     </div>
                                 </div>
                             </div>
@@ -338,8 +351,8 @@
                 <el-button type="primary" @click="updateChair">确定</el-button>
             </span>
         </el-dialog>
-        <el-dialog title="添加学生" :visible.sync="dialogVisibleMember" :append-to-body="true" width="540px" height="80%"
-            :before-close="handleClose" class="addNewPP">
+        <el-dialog title="添加组员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="540px" height="80%"
+            :before-close="handleClose" class="addNewPP" v-loading="loading">
             <div class="people">
                 <div class="people_top">
                     <div class="people_top_right">
@@ -397,7 +410,7 @@
 
 <script>
 export default {
-    props: ['cid', 'classList', 'courseDetail', 'userid', "type", "classId", "oid"],
+    props: ['cid', 'classList', 'courseDetail', 'userid', "type", "classId", "oid", "people"],
     data() {
         return {
             groupJson2: {},
@@ -431,6 +444,7 @@ export default {
             page: 1,
             dialogVisibleMember: false,
             searchTN: "",
+            loading: false,
         }
     },
     methods: {
@@ -450,23 +464,48 @@ export default {
             this.selectCStudent();
         },
         selectCStudent() {
+            // let params = {
+            //     cid: this.classid,
+            //     oid: this.oid,
+            //     cn: this.searchTN,
+            // };
+            // this.ajax
+            //     .get(this.$store.state.api + "selectSnameByCidGroup", params)
+            //     .then((res) => {
+            //         if (res.data && res.data[0].length) {
+            //             this.classJuri = res.data[0].filter((el) => {
+            //                 return this.allGroupStudentUid.indexOf(el.userid) == -1
+            //             });
+            //         }
+            //     })
+            //     .catch((err) => {
+            //         console.error(err);
+            //     });
+            this.loading = true
+            let _user = JSON.parse(JSON.stringify(this.people));
+            if (_user.indexOf(this.userid) == -1) {
+                _user.push(this.userid);
+            }
+            if(_user.indexOf(this.courseDetail.userid) == -1){
+                _user.push(this.courseDetail.userid);
+            }
             let params = {
-                cid: this.classid,
-                oid: this.oid,
-                cn: this.searchTN,
+                uid: _user.join(","),
             };
             this.ajax
-                .get(this.$store.state.api + "selectSnameByCidGroup", params)
-                .then((res) => {
+            .get(this.$store.state.api + "getAllUserById", params)
+            .then((res) => {
+            this.loading = false
                     if (res.data && res.data[0].length) {
                         this.classJuri = res.data[0].filter((el) => {
                             return this.allGroupStudentUid.indexOf(el.userid) == -1
                         });
                     }
-                })
+            })
                 .catch((err) => {
-                    console.error(err);
-                });
+            this.loading = false
+                console.error(err);
+            });
         },
         setClassid(cid) {
             this.classid = cid
@@ -885,9 +924,9 @@ export default {
             this.getCourseGroup();
             // if (this.dialogVisibleGroup) {
             //     this.getCourseGroup();
-            //     this.timer = setInterval(() => {
-            //         this.getCourseGroup();
-            //     }, 5000)
+                this.timer = setInterval(() => {
+                    this.getCourseGroup();
+                }, 5000)
             // } else {
             //     clearInterval(this.timer)
             //     this.timer = null
@@ -1088,7 +1127,7 @@ export default {
     display: flex;
     justify-content: space-between;
     align-items: flex-end;
-    margin-bottom: 20px;
+    margin: 20px 0;
 }
 
 .btn_left {

+ 7 - 4
src/components/pages/task/addCourse.vue

@@ -1771,7 +1771,7 @@
                                     </div>
                                   </div>
                                 </div>
-                                <div class="tool">
+                                <!-- <div class="tool">
                                   <div class="whiteBIcon" @click="
                                     addTools(67, itemTaskIndex, toolIndex)
                                     ">
@@ -1787,7 +1787,7 @@
                                       <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
                                     </div>
                                   </div>
-                                </div>
+                                </div> -->
                                 <div class="tool">
                                   <div class="whiteBIcon" @click="
                                     addTools(68, itemTaskIndex, toolIndex)
@@ -7357,8 +7357,11 @@ export default {
       // let teacherJuri = this.teacherJuri2;
       this.ManAarray = [];
       let _user = JSON.parse(JSON.stringify(this.checkboxList3));
-      if (_user.indexOf(this.courseUserid || this.userid) == -1) {
-        _user.push(this.courseUserid || this.userid);
+      if (_user.indexOf(this.userid) == -1) {
+        _user.push(this.userid);
+      }
+      if (_user.indexOf(this.courseUserid) == -1) {
+        _user.push(this.courseUserid);
       }
       let params = {
         uid: _user.join(","),

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff