|
@@ -14,7 +14,8 @@
|
|
|
<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 || courseDetail.course_teacher.indexOf(userid) != -1">
|
|
|
+ <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>
|
|
@@ -34,6 +35,9 @@
|
|
|
<div type="primary" @click="updateGroup" class="returnBtn" style="background-color: #225bc7">
|
|
|
分组设置
|
|
|
</div>
|
|
|
+ <div type="primary" @click="deleteCourseGroup" class="returnBtn" style="background-color: #225bc7">
|
|
|
+ 删除分组
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
@@ -152,7 +156,8 @@
|
|
|
groupStudent[g.id][
|
|
|
groupStudentUid[g.id].indexOf(userid)
|
|
|
].id)
|
|
|
- " v-else-if="groupStudentUid && groupStudentUid[g.id].indexOf(userid) != -1">
|
|
|
+ "
|
|
|
+ v-else-if="groupStudentUid && groupStudentUid[g.id].indexOf(userid) != -1">
|
|
|
退出分组
|
|
|
</div>
|
|
|
<div style="margin-top:10px"
|
|
@@ -366,7 +371,8 @@
|
|
|
</el-checkbox>
|
|
|
</el-checkbox-group> -->
|
|
|
<div class="i_box_login2" v-if="classJuri.length">
|
|
|
- <div :class="{active:checkboxList3.indexOf(item.userid)!= -1}" v-for="item in classJuri" :key="item.userid" :label="item.userid" @click="addGroupUser(item.userid)">
|
|
|
+ <div :class="{ active: checkboxList3.indexOf(item.userid) != -1 }" v-for="item in classJuri"
|
|
|
+ :key="item.userid" :label="item.userid" @click="addGroupUser(item.userid)">
|
|
|
<el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
|
|
|
<span>{{ item.name ? item.name : "暂无姓名" }}</span>
|
|
|
</el-tooltip>
|
|
@@ -401,7 +407,7 @@ export default {
|
|
|
number: undefined,
|
|
|
islock: 1,
|
|
|
},
|
|
|
- islock:false,
|
|
|
+ islock: false,
|
|
|
timer: null,
|
|
|
groupStudent: {},
|
|
|
groupStudentUid: {},
|
|
@@ -494,6 +500,39 @@ export default {
|
|
|
}
|
|
|
this.dialogVisibleGroup2 = true;
|
|
|
},
|
|
|
+ deleteCourseGroup() {
|
|
|
+ this.$confirm(
|
|
|
+ "确定删除该分组么?删除后分组将会被清空!",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ let params = [{
|
|
|
+ gid: this.groupid,
|
|
|
+ }];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "deleteCourseGroup", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.groupJson = {
|
|
|
+ group: [],
|
|
|
+ number: undefined,
|
|
|
+ islock: 1,
|
|
|
+ }
|
|
|
+ this.islock = false
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getCourseGroup();
|
|
|
+ this.$forceUpdate()
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => { });
|
|
|
+ },
|
|
|
addGroup() {
|
|
|
this.groupJson2.group.push({
|
|
|
name: "第" + (this.groupJson2.group.length + 1) + "组",
|
|
@@ -714,11 +753,11 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
- addGroupUser(uid){
|
|
|
- if(this.checkboxList3.indexOf(uid) == -1){
|
|
|
+ addGroupUser(uid) {
|
|
|
+ if (this.checkboxList3.indexOf(uid) == -1) {
|
|
|
this.checkboxList3.push(uid)
|
|
|
- }else{
|
|
|
- this.checkboxList3.splice(this.checkboxList3.indexOf(uid),1)
|
|
|
+ } else {
|
|
|
+ this.checkboxList3.splice(this.checkboxList3.indexOf(uid), 1)
|
|
|
}
|
|
|
},
|
|
|
async joinGroup2() {
|
|
@@ -1190,18 +1229,21 @@ export default {
|
|
|
padding: 0 5px;
|
|
|
overflow: hidden;
|
|
|
background: rgb(225, 237, 255);
|
|
|
- margin: 10px calc((100% - (80px*5)) / 4 ) 0 0 ;
|
|
|
+ margin: 10px calc((100% - (80px*5)) / 4) 0 0;
|
|
|
color: rgb(37 124 255);
|
|
|
border-radius: 5px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
+
|
|
|
.i_box_login2>div:nth-child(5n) {
|
|
|
- margin: 10px 0 0 0 ;
|
|
|
+ margin: 10px 0 0 0;
|
|
|
}
|
|
|
-.i_box_login2 > .active{
|
|
|
+
|
|
|
+.i_box_login2>.active {
|
|
|
background: rgb(92, 157, 255);
|
|
|
color: #fff;
|
|
|
}
|
|
|
+
|
|
|
.i_box_login2>div>span {
|
|
|
width: 100%;
|
|
|
overflow: hidden;
|
|
@@ -1210,13 +1252,14 @@ export default {
|
|
|
display: block;
|
|
|
}
|
|
|
|
|
|
-.group_switch{
|
|
|
+.group_switch {
|
|
|
margin-right: 10px;
|
|
|
height: 30px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
-.group_switch>span{
|
|
|
+
|
|
|
+.group_switch>span {
|
|
|
margin-right: 5px;
|
|
|
}
|
|
|
</style>
|