|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<el-dialog
|
|
<el-dialog
|
|
- title="创建班级"
|
|
|
|
|
|
+ title="选择学员"
|
|
append-to-body
|
|
append-to-body
|
|
width="800px"
|
|
width="800px"
|
|
:visible.sync="transClassVisible"
|
|
:visible.sync="transClassVisible"
|
|
@@ -18,11 +18,11 @@
|
|
</p>
|
|
</p>
|
|
</el-alert>
|
|
</el-alert>
|
|
<el-form :model="form" ref="form">
|
|
<el-form :model="form" ref="form">
|
|
- <div class="classWrap">
|
|
|
|
|
|
+ <div class="classWrap" v-for="(item,index) in form.classList" :key="index">
|
|
<h2 class="classTitle">
|
|
<h2 class="classTitle">
|
|
- <span>线上基础技能班</span>
|
|
|
|
|
|
+ <span>线上基础技能班{{index+1}}</span>
|
|
<i
|
|
<i
|
|
- @click="remove(scope.$index)"
|
|
|
|
|
|
+ @click="remove(index)"
|
|
v-if="form.classList.length > 1"
|
|
v-if="form.classList.length > 1"
|
|
class="close-icon el-icon-delete-solid"
|
|
class="close-icon el-icon-delete-solid"
|
|
></i>
|
|
></i>
|
|
@@ -30,7 +30,7 @@
|
|
<el-row :gutter="40">
|
|
<el-row :gutter="40">
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
<el-form-item
|
|
<el-form-item
|
|
- prop="classNames"
|
|
|
|
|
|
+ :prop="'classList.' + index + '.name'"
|
|
:rules="[
|
|
:rules="[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -47,7 +47,7 @@
|
|
</p>
|
|
</p>
|
|
</template>
|
|
</template>
|
|
<el-input
|
|
<el-input
|
|
- v-model="form.classNames"
|
|
|
|
|
|
+ v-model="item.name"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
placeholder="请输入班级名称"
|
|
placeholder="请输入班级名称"
|
|
/>
|
|
/>
|
|
@@ -57,7 +57,7 @@
|
|
<el-form-item
|
|
<el-form-item
|
|
:label="'声部'"
|
|
:label="'声部'"
|
|
style="margin-right: 0"
|
|
style="margin-right: 0"
|
|
- prop="sound"
|
|
|
|
|
|
+ :prop="'classList.' + index + '.subjectIdList'"
|
|
:rules="[
|
|
:rules="[
|
|
{ required: true, message: '请选择声部', trigger: 'blur' },
|
|
{ required: true, message: '请选择声部', trigger: 'blur' },
|
|
]"
|
|
]"
|
|
@@ -65,12 +65,12 @@
|
|
<template slot="label">
|
|
<template slot="label">
|
|
<p style="position: relative">
|
|
<p style="position: relative">
|
|
<span style="color: #f56c6c; margin-right: 4px">*</span>
|
|
<span style="color: #f56c6c; margin-right: 4px">*</span>
|
|
- 声部
|
|
|
|
|
|
+ 网络教室声部
|
|
</p>
|
|
</p>
|
|
</template>
|
|
</template>
|
|
- <select-all
|
|
|
|
- v-model="form.sound"
|
|
|
|
- style="width: 100%"
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="item.subjectIdList"
|
|
|
|
+ style="width: 100% !important"
|
|
clearable
|
|
clearable
|
|
multiple
|
|
multiple
|
|
collapse-tags
|
|
collapse-tags
|
|
@@ -83,15 +83,15 @@
|
|
:label="item.name"
|
|
:label="item.name"
|
|
:value="item.id"
|
|
:value="item.id"
|
|
></el-option>
|
|
></el-option>
|
|
- </select-all>
|
|
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row>
|
|
|
|
|
|
+ <el-row :gutter="40">
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
<el-form-item
|
|
<el-form-item
|
|
label="主教老师"
|
|
label="主教老师"
|
|
- prop="coreTeacher"
|
|
|
|
|
|
+ :prop="'classList.' + index + '.coreTeacher'"
|
|
:rules="[{ required: true, message: '请选择主教老师' }]"
|
|
:rules="[{ required: true, message: '请选择主教老师' }]"
|
|
>
|
|
>
|
|
<template slot="label">
|
|
<template slot="label">
|
|
@@ -101,10 +101,11 @@
|
|
</p>
|
|
</p>
|
|
</template>
|
|
</template>
|
|
<el-select
|
|
<el-select
|
|
- v-model.trim="form.coreTeacher"
|
|
|
|
|
|
+ v-model.trim="item.coreTeacher"
|
|
placeholder="请选择主教老师"
|
|
placeholder="请选择主教老师"
|
|
clearable
|
|
clearable
|
|
filterable
|
|
filterable
|
|
|
|
+ style="width: 100% !important"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="(item, index) in teacherList"
|
|
v-for="(item, index) in teacherList"
|
|
@@ -122,9 +123,30 @@
|
|
<!-- <remote-search :commit="'setTeachers'" v-model="form.coreTeacher" /> -->
|
|
<!-- <remote-search :commit="'setTeachers'" v-model="form.coreTeacher" /> -->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <template slot="label">
|
|
|
|
+ <p style="position: relative">
|
|
|
|
+
|
|
|
|
+ <!-- <span style="color: #f56c6c; margin-right: 4px">*</span> -->
|
|
|
|
+ </p>
|
|
|
|
+ </template>
|
|
|
|
+ <div class="studentTitle">
|
|
|
|
+ <p>已选择<span style="color:red;">{{item.studentList.length}}</span>名</p>
|
|
|
|
+ <el-button type="text" @click="chioseStudent(index)">选择学员 >></el-button>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-button class="addButton" @click="addClass">添加+</el-button>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
+ <transStudent ref="transStudent" @close="()=>{showStudentVisible = false}" @submit="setStudent" v-if="showStudentVisible" :soundList="soundList" :studentList="studentList" :activeListStudent="activeListStudent" activeType='HIGH_ONLINE'/>
|
|
|
|
+ </div>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="transClassVisible = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="gotoNext">下一步</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
@@ -132,28 +154,59 @@
|
|
<script>
|
|
<script>
|
|
import { getCourseScheduleConvert } from "../../api";
|
|
import { getCourseScheduleConvert } from "../../api";
|
|
import { findSound, getTeacher } from "@/api/buildTeam";
|
|
import { findSound, getTeacher } from "@/api/buildTeam";
|
|
|
|
+import transStudent from './transStudent'
|
|
export default {
|
|
export default {
|
|
|
|
+ props:{
|
|
|
|
+ students:{
|
|
|
|
+ type:Array,
|
|
|
|
+ default:[]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
transClassVisible: false,
|
|
transClassVisible: false,
|
|
|
|
+ getStudentList:[],
|
|
form: {
|
|
form: {
|
|
- classList: [{}, {}],
|
|
|
|
|
|
+ classList: [{
|
|
|
|
+ expectStudentNum: 6,
|
|
|
|
+ groupType: "MUSIC",
|
|
|
|
+ musicGroupId: this.$route.query.id,
|
|
|
|
+ name: "",
|
|
|
|
+ studentList: [],
|
|
|
|
+ coreTeacher: '',
|
|
|
|
+ type: "HIGH_ONLINE",
|
|
|
|
+ }],
|
|
},
|
|
},
|
|
soundList: [],
|
|
soundList: [],
|
|
teacherList: [],
|
|
teacherList: [],
|
|
teamid: "",
|
|
teamid: "",
|
|
organId: "",
|
|
organId: "",
|
|
|
|
+ showStudentVisible:false,
|
|
|
|
+ activeStudentIndex:0,
|
|
|
|
+ activeListStudent:[],
|
|
|
|
+ studentList:[]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- mounted() {},
|
|
|
|
|
|
+ components:{
|
|
|
|
+ transStudent
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.init()
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
async openDialog() {
|
|
async openDialog() {
|
|
// 获取列表
|
|
// 获取列表
|
|
this.transClassVisible = true;
|
|
this.transClassVisible = true;
|
|
},
|
|
},
|
|
getList() {},
|
|
getList() {},
|
|
- gotoNext() {},
|
|
|
|
- remove(index) {},
|
|
|
|
|
|
+ gotoNext() {
|
|
|
|
+ this.$refs.form.validate(flag=>{
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ remove(index) {
|
|
|
|
+ this.form.classList.splice(index,1)
|
|
|
|
+ },
|
|
init() {
|
|
init() {
|
|
this.teamid = this.$route.query.id;
|
|
this.teamid = this.$route.query.id;
|
|
this.organId = this.$route.query.organId;
|
|
this.organId = this.$route.query.organId;
|
|
@@ -172,6 +225,36 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ addClass() {
|
|
|
|
+ this.form.classList.push({
|
|
|
|
+ expectStudentNum: 6,
|
|
|
|
+ groupType: "MUSIC",
|
|
|
|
+ musicGroupId: this.$route.query.id,
|
|
|
|
+ name: "",
|
|
|
|
+ studentList: [],
|
|
|
|
+ coreTeacher: '',
|
|
|
|
+ type: "HIGH_ONLINE",
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ setStudent(student){
|
|
|
|
+ console.log(this.activeStudentIndex)
|
|
|
|
+ this.form.classList[this.activeStudentIndex].studentList =[...student] ;
|
|
|
|
+ // 提交完的学生
|
|
|
|
+ },
|
|
|
|
+ chioseStudent(index){
|
|
|
|
+ this.activeStudentIndex = index;
|
|
|
|
+ this.activeListStudent =this.students.filter(item=>{
|
|
|
|
+ return this.form?.classList[index]?.studentList.indexOf(item.useId) != -1
|
|
|
|
+ })
|
|
|
|
+ this.studentList =this.students;
|
|
|
|
+ this.showStudentVisible = true;
|
|
|
|
+
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ console.log( this.$refs.transStudent)
|
|
|
|
+ this.$refs.transStudent.openDialog()
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
chioseCourse() {
|
|
chioseCourse() {
|
|
@@ -196,7 +279,8 @@ export default {
|
|
}
|
|
}
|
|
.classWrap {
|
|
.classWrap {
|
|
background-color: #f2f2f2;
|
|
background-color: #f2f2f2;
|
|
- padding: 10px;
|
|
|
|
|
|
+ padding: 20px 20px 10px;
|
|
|
|
+ margin-bottom: 20px;
|
|
.classTitle {
|
|
.classTitle {
|
|
// width: 760px;
|
|
// width: 760px;
|
|
display: flex;
|
|
display: flex;
|
|
@@ -211,18 +295,30 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-::v-deep .el-form-item__label{
|
|
|
|
|
|
+::v-deep .el-form-item__label {
|
|
display: block;
|
|
display: block;
|
|
width: 100%;
|
|
width: 100%;
|
|
text-align: left;
|
|
text-align: left;
|
|
- &::before{
|
|
|
|
|
|
+ &::before {
|
|
content: "" !important;
|
|
content: "" !important;
|
|
- position: absolute;
|
|
|
|
- color: transparent;
|
|
|
|
- margin-right: 4px;
|
|
|
|
|
|
+ position: absolute;
|
|
|
|
+ color: transparent;
|
|
|
|
+ margin-right: 4px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
::v-deep .el-form-item__content {
|
|
::v-deep .el-form-item__content {
|
|
|
|
+ display: block;
|
|
margin-left: 0;
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
+.addButton {
|
|
|
|
+ width: 100%;
|
|
|
|
+}
|
|
|
|
+.studentTitle {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ width: 100%;
|
|
|
|
+ p {
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>>
|
|
</style>>
|