huangminghao 1 vuosi sitten
vanhempi
commit
9974409595

+ 0 - 1
src/common/axios.config.js

@@ -8,7 +8,6 @@ console.log(process.env)
 axios.interceptors.request.use((config) => {
     //在发送请求之前做某件事
     let token = sessionStorage.getItem('access_token') || ""  //获取token 
-    console.log(token)
     if (token != "") {
         config.headers = {
             'access-token': token,

+ 19 - 7
src/components/pages/synergyCourse/addCourse.vue

@@ -1543,7 +1543,7 @@
               </button>
               <button class="c_pub_button_confirm pub_btn_finish_img" @click="nextSteps"
                 v-if="!(cid && userid != courseUserid && role != '1')">
-                确认上传
+                确认创建
               </button>
             </div>
           </div>
@@ -1772,7 +1772,10 @@
           <span>账号</span>
           <span>学校</span>
         </div>
-        <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length">
+        <div style="margin-left:25px;">
+          <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
+        </div>
+        <el-checkbox-group v-model="checkboxList3" @change="handleCheckedTeacherJuriChange" 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 : '暂无姓名'">
@@ -1796,7 +1799,7 @@
           @current-change="handleCurrentChange"></el-pagination>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisibleMember = false">取 消</el-button>
+        <el-button @click="dialogVisibleMember = false;">取 消</el-button>
         <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
       </span>
     </el-dialog>
@@ -3179,6 +3182,8 @@ export default {
       // console.log(`当前页: ${val}`);
       this.page = val;
       this.getTeacher();
+      this.checkAll=false;
+      this.isIndeterminate = true;
     },
     openAI() {
       window.parent.postMessage({ tools: "64" }, "*");
@@ -3247,14 +3252,19 @@ export default {
       }
     },
     handleCheckAllChange(val) {
-      this.checkedCities = val ? cityOptions : [];
+      this.checkboxList3 = [];
+      if(val){
+        this.teacherJuri.forEach(item=>{
+          this.checkboxList3.push(item.userid);
+        })
+      }
       this.isIndeterminate = false;
     },
-    handleCheckedCitiesChange(value) {
+    handleCheckedTeacherJuriChange(value) {
       let checkedCount = value.length;
-      this.checkAll = checkedCount === this.cities.length;
+      this.checkAll = checkedCount === this.teacherJuri.length;
       this.isIndeterminate =
-        checkedCount > 0 && checkedCount < this.cities.length;
+        checkedCount > 0 && checkedCount < this.teacherJuri.length;
     },
     addHw(e) {
       var el = e.currentTarget;
@@ -5156,6 +5166,8 @@ export default {
     isAddPPTeacher() {
       this.dialogVisibleMember = false;
       this.setMan();
+      this.checkAll=false;
+      this.isIndeterminate=true;
     },
     getTemplate() {
       this.ajax

+ 1 - 2
src/components/pages/synergyCourse/course.vue

@@ -31,7 +31,7 @@
               <div class="search">
                 <img src="../../../assets/icon/search.png" alt="" />
               </div>
-              <input class="sInput" type="text" placeholder="请输入关键字" v-model="courseName" @input="getCourse()" />
+              <input class="sInput" type="text" placeholder="请输入关键字" v-model="courseName" @change="getCourse()" @input="getCourse()" />
             </div>
             <el-button type="primary" class="bgColor" style="margin-left: 10px;" @click="reset">重置</el-button>
           </div>
@@ -897,7 +897,6 @@ export default {
           this.isLoading = false;
           this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
           this.course = res.data[0];
-          console.log(this.course)
         })
         .catch((err) => {
           console.error(err);

+ 26 - 1
src/components/pages/synergyCourse/group/group.vue

@@ -302,6 +302,10 @@
                                 v-if="groupJson2.group && groupJson2.group.length > 1">删除</el-button>
                         </div>
                     </div>
+                    <div class="batch_add_group">
+                        <span>批量添加小组:</span>
+                        <el-input-number v-model="addGroupNum" @change="handleAddGroupNumChange" label="批量添加小组"></el-input-number>
+                    </div>
                 </div>
                 <div class="groupContent">
                     <div class="groupTitle">请设置每组人数</div>
@@ -310,7 +314,7 @@
                 </div>
             </div>
             <span slot="footer" class="dialog-footer">
-                <el-button @click="dialogVisibleGroup2 = false">取 消</el-button>
+                <el-button @click="dialogVisibleGroup2 = false;addGroupNum=0;">取 消</el-button>
                 <el-button type="primary" @click="updateGroupJson(2)">确定</el-button>
             </span>
         </el-dialog>
@@ -414,6 +418,7 @@ export default {
     props: ['cid', 'classList', 'courseDetail', 'userid', "type", "classId", "oid", "people"],
     data() {
         return {
+            addGroupNum:0,
             groupJson2: {},
             classid: "1",
             groupid: "",
@@ -449,11 +454,28 @@ export default {
         }
     },
     methods: {
+        handleAddGroupNumChange(currentValue, oldValue){
+            let num = currentValue-oldValue;
+            if(num>0){
+                for(let i=0;i<num;i++){
+                    this.groupJson2.group.push({
+                        name: "第" + (this.groupJson2.group.length + 1) + "组",
+                        id: this.guid()
+                    });
+                }
+            }else{
+                num=Math.abs(num);
+                for(let i=0;i<num;i++){
+                    this.groupJson2.group.pop();
+                }
+            }
+        },
         handleClose2(done) {
             this.$emit('update:dialogVisibleGroup', false)
             done();
         },
         handleClose(done) {
+            this.addGroupNum=0;
             done();
         },
         getStudent() {
@@ -940,6 +962,9 @@ export default {
 </script>
 
 <style scoped>
+.batch_add_group{
+    margin-top: 15px;
+}
 .dialog_diy>>>.el-dialog {
     margin-top: 10vh !important;
 }