|
@@ -15,77 +15,82 @@
|
|
|
<el-divider></el-divider>
|
|
|
</div>
|
|
|
<div class="topWrap">
|
|
|
- <el-select
|
|
|
- placeholder="请选择主班"
|
|
|
- v-model="radio"
|
|
|
- clearable
|
|
|
- @change="changeMasterClass"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in dataList"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- :key="index"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- <el-button type="text" style="float: right" @click="clearCom"
|
|
|
- >清空列表</el-button
|
|
|
- >
|
|
|
+ <el-select
|
|
|
+ placeholder="请选择主班"
|
|
|
+ v-model="radio"
|
|
|
+ clearable
|
|
|
+ @change="changeMasterClass"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in dataList"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
+ String(item.id)
|
|
|
+ }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button type="text" style="float: right" @click="clearCom"
|
|
|
+ >清空列表</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
<!-- <el-radio-group v-model="radio" @change="changeMasterClass"> -->
|
|
|
- <el-table
|
|
|
- :data="dataList"
|
|
|
- height="300px"
|
|
|
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ <el-table
|
|
|
+ :data="dataList"
|
|
|
+ height="300px"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ >
|
|
|
+ <el-table-column align="center" label="班级编号" width="110">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.id }}
|
|
|
+ <!-- <el-radio :label="scope.row.id"></el-radio> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ width="180px"
|
|
|
+ label="班级名称"
|
|
|
+ prop="name"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" label="班级类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.type | classType }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ width="180px"
|
|
|
+ prop="teacherName"
|
|
|
+ label="已选学生数"
|
|
|
>
|
|
|
- <el-table-column align="center" label="班级编号" width="110">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{scope.row.id}}
|
|
|
- <!-- <el-radio :label="scope.row.id"></el-radio> -->
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- width="180px"
|
|
|
- label="班级名称"
|
|
|
- prop="name"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column align="center" label="班级类型">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>{{ scope.row.type | classType }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- width="180px"
|
|
|
- prop="teacherName"
|
|
|
- label="已选学生数"
|
|
|
- >
|
|
|
- <!-- -->
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- {{
|
|
|
- scope.row.studentList ? scope.row.studentList.length : 0
|
|
|
- }}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="操作" width="200px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" @click="cancleCom(scope.row)"
|
|
|
- >取消</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- @click="showStudentList(scope.row)"
|
|
|
- :disabled="scope.row.id == radio"
|
|
|
- >添加学生</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ <!-- -->
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{
|
|
|
+ scope.row.studentList ? scope.row.studentList.length : 0
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="操作" width="200px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="cancleCom(scope.row)"
|
|
|
+ >取消</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="showStudentList(scope.row)"
|
|
|
+ :disabled="scope.row.id == radio"
|
|
|
+ >添加学生</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
<!-- </el-radio-group> -->
|
|
|
</div>
|
|
|
<el-button
|
|
@@ -131,20 +136,18 @@
|
|
|
masterClassGroupId:'',
|
|
|
classGroupStudents:[] -->
|
|
|
<calenderStudentList
|
|
|
- ref='calenderStudentList'
|
|
|
+ ref="calenderStudentList"
|
|
|
v-if="calenderStudentVisible"
|
|
|
:classList="dataList"
|
|
|
:studentIds="studentIds"
|
|
|
:masterClassGroupId="masterClassGroupId"
|
|
|
:classGroupStudents="classGroupStudents"
|
|
|
:mergeInfo="mergeInfo"
|
|
|
- @refresh='refresh'
|
|
|
+ @refresh="refresh"
|
|
|
/>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="calenderStudentVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitInfo"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitInfo">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -181,14 +184,13 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
cancleCom(row) {
|
|
|
- if(row.id== this.radio){
|
|
|
- this.radio = ''
|
|
|
+ if (row.id == this.radio) {
|
|
|
+ this.radio = "";
|
|
|
}
|
|
|
this.$emit("cancleCompound", row);
|
|
|
},
|
|
|
clearCom() {
|
|
|
this.$emit("clearCom");
|
|
|
-
|
|
|
},
|
|
|
async submitClass() {
|
|
|
if (!this.radio) {
|
|
@@ -212,7 +214,7 @@ export default {
|
|
|
flag = true;
|
|
|
}
|
|
|
|
|
|
- if (com.id != this.radio&&com.studentList?.length>0) {
|
|
|
+ if (com.id != this.radio && com.studentList?.length > 0) {
|
|
|
this.classGroupStudents.push({
|
|
|
[com.id]: com.studentList.map((stu) => stu.userId).join(","),
|
|
|
});
|
|
@@ -250,12 +252,12 @@ export default {
|
|
|
// 试着请求
|
|
|
},
|
|
|
getList() {
|
|
|
- this.$emit("getList");
|
|
|
+ this.$emit("getList");
|
|
|
},
|
|
|
- refresh(){
|
|
|
+ refresh() {
|
|
|
this.calenderStudentVisible = false;
|
|
|
- this.clearCom()
|
|
|
- this.getList()
|
|
|
+ this.clearCom();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
closeReset() {
|
|
|
this.clearCom();
|
|
@@ -293,9 +295,9 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- submitInfo(){
|
|
|
- this.$refs.calenderStudentList.submit()
|
|
|
- }
|
|
|
+ submitInfo() {
|
|
|
+ this.$refs.calenderStudentList.submit();
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
compoundList(val) {
|
|
@@ -346,7 +348,7 @@ export default {
|
|
|
/deep/.el-divider--horizontal {
|
|
|
margin: 0 !important;
|
|
|
}
|
|
|
-.topWrap{
|
|
|
+.topWrap {
|
|
|
margin: 10px 0;
|
|
|
padding: 0 20px 0 0;
|
|
|
}
|