| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868 | 
							- <template>
 
-   <!-- m-container -->
 
-   <div class>
 
-     <!-- <h2>
 
-       <div class='squrt'></div>
 
-       班级调整
 
-     </h2>-->
 
-     <div class="m-core">
 
-       <div class="topWrap">
 
-         <el-form :inline="true" :model="topForm">
 
-           <el-form-item label="班级类型">
 
-             <el-select
 
-               v-model.trim="topForm.classType"
 
-               clearable
 
-               filterable
 
-               @change="changeMixClass"
 
-             >
 
-               <el-option
 
-                 v-for="(item, index) in musicClassTypeList"
 
-                 :key="index"
 
-                 :label="item.label"
 
-                 :value="item.value"
 
-               ></el-option>
 
-             </el-select>
 
-           </el-form-item>
 
-         </el-form>
 
-       </div>
 
-       <div class="tableWrap" style>
 
-         <el-table
 
-           :data="activeSingleList"
 
-           style
 
-           ref="multipleTable"
 
-           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
 
-           tooltip-effect="dark"
 
-           @selection-change="handleSelectionChange"
 
-         >
 
-           <!-- <el-table-column type="selection"
 
-                            v-bind:selectable="chkstu"
 
-                            width="55"></el-table-column> -->
 
-           <el-table-column
 
-             align="center"
 
-             prop="name"
 
-             label="班级名称"
 
-           ></el-table-column>
 
-           <el-table-column align="center" prop="type" label="班级类型">
 
-             <template slot-scope="scope">
 
-               <div>{{ scope.row.type | classType }}</div>
 
-             </template>
 
-           </el-table-column>
 
-           <el-table-column
 
-             align="center"
 
-             prop="studentNum"
 
-             label="当前班级人数"
 
-           >
 
-             <template slot-scope="scope">
 
-               <div>{{ scope.row.studentNum }}人</div>
 
-             </template>
 
-           </el-table-column>
 
-           <el-table-column align="center" prop label="主教老师">
 
-             <template slot-scope="scope">
 
-               <div v-if="scope.row.classGroupTeacherMapperList">
 
-                 <p
 
-                   v-for="(item, index) in scope.row.classGroupTeacherMapperList"
 
-                   v-if="item.teacherRole == 'BISHOP'"
 
-                   :key="index"
 
-                 >
 
-                   {{ item.userName }}
 
-                 </p>
 
-               </div>
 
-             </template>
 
-           </el-table-column>
 
-           <el-table-column align="center" label="助教老师">
 
-             <template slot-scope="scope">
 
-               <div v-if="scope.row.classGroupTeacherMapperList">
 
-                 <p
 
-                   v-for="(item, index) in scope.row.classGroupTeacherMapperList"
 
-                   v-if="item.teacherRole == 'TEACHING'"
 
-                   :key="index"
 
-                 >
 
-                   {{ item.userName }}
 
-                 </p>
 
-               </div>
 
-             </template>
 
-           </el-table-column>
 
-           <el-table-column align="center" label="已上课时">
 
-             <template slot-scope="scope">
 
-               <div>{{ scope.row.currentClassTimes }}</div>
 
-             </template>
 
-           </el-table-column>
 
-           <el-table-column align="center" label="总课数">
 
-             <template slot-scope="scope">
 
-               <div>{{ scope.row.totalClassTimes }}</div>
 
-             </template>
 
-           </el-table-column>
 
-           <el-table-column align="center" label="是否冻结">
 
-             <template slot-scope="scope">
 
-               <div>{{ scope.row.lockFlag | yesOrNo }}</div>
 
-             </template>
 
-           </el-table-column>
 
-           <el-table-column align="center" width="240px" label="操作">
 
-             <template slot-scope="scope" v-if="scope.row.lockFlag != 1">
 
-               <div>
 
-                 <!-- v-if="scope.row.type !='MIX'" -->
 
-                 <el-button
 
-                   type="text"
 
-                   @click="resetClass(scope.row)"
 
-                   v-permission="'classGroupStudent/updateClassGroupStudents'"
 
-                   v-if="scope.row.type != 'MUSIC_NETWORK'"
 
-                   >学员调整</el-button
 
-                 >
 
-                 <el-button
 
-                   type="text"
 
-                   @click="resetTeacher(scope.row)"
 
-                   v-permission="'classGroup/classGroupUpdate'"
 
-                   >老师调整</el-button
 
-                 >
 
-                 <el-button
 
-                   type="text"
 
-                   v-if="
 
-                    ( permission('classGroup/classGroupUpdate') ||
 
-                     permission('classGroup/revisionClassGroup') ||
 
-                     permission('classGroup/revisionAddClassGroup'))&&scope.row.studentNum>0
 
-                   "
 
-                   @click="classAdjustment(scope.row)"
 
-                   >排课</el-button
 
-                 >
 
-                 <el-button
 
-                   type="text"
 
-                   v-if="
 
-                     scope.row.studentNum == '0' ||
 
-                     scope.row.totalClassTimes == '0'
 
-                   "
 
-                   @click="removeClass(scope)"
 
-                   >删除</el-button
 
-                 >
 
-                 <!--<el-button type="text"
 
-                 @click="recourse(scope.row)">重新排课</el-button>-->
 
-                 <!-- <el-popover
 
-                   placement="top"
 
-                   width="200"
 
-                   :ref="`popover-${scope.$index}`"
 
-                 >
 
-                   <p>确定删除?</p>
 
-                   <div style="text-align: right; margin: 0">
 
-                     <el-button
 
-                       size="mini"
 
-                       type="text"
 
-                       @click="
 
-                         scope._self.$refs[`popover-${scope.$index}`].doClose()
 
-                       "
 
-                       >取消</el-button
 
-                     >
 
-                     <el-button
 
-                       type="primary"
 
-                       size="mini"
 
-                       @click="removeClass(scope)"
 
-                       >确定</el-button
 
-                     >
 
-                   </div>
 
-                 </el-popover> -->
 
-               </div>
 
-             </template>
 
-           </el-table-column>
 
-         </el-table>
 
-         <div class="floor">
 
-           <div class="left">
 
-             <div
 
-               class="add"
 
-               @click="studentResetVisiable = true"
 
-               v-if="permission('classGroup/mergeClassSplitClassAffirm')"
 
-             >
 
-               拆分班级
 
-             </div>
 
-           </div>
 
-           <div class="right">
 
-             <div class="add" @click="temporary">新建临时班</div>
 
-             <div class="add" @click="addNewClass('NORMAL')">新建声部班</div>
 
-             <div class="add" @click="addNewClass('MIX')">新建合奏班</div>
 
-             <div class="add" @click="addNewClass('MUSIC_NETWORK')">
 
-               新建乐团网管课
 
-             </div>
 
-             <div class="add" @click="newClassVisible = true">基础技能班</div>
 
-           </div>
 
-           <!-- <div class="add"
 
-           @click="addNewClass('HIGH_ONLINE')">线上基础技能班</div>-->
 
-         </div>
 
-       </div>
 
-     </div>
 
-     <el-dialog
 
-       title="老师调整"
 
-       width="750px"
 
-       :visible.sync="teacherVisible"
 
-       destroy-on-close
 
-     >
 
-       <changeTeacher
 
-         v-if="teacherVisible && teacherDetail"
 
-         :classGroupId="activeClass"
 
-         :activeType="activeType"
 
-         :teacherList="teacherList"
 
-         :cooperationList="cooperationList"
 
-         :detail="teacherDetail"
 
-         @submited="teacherSubmited"
 
-         @close="teacherVisible = false"
 
-       />
 
-     </el-dialog>
 
-     <!-- 学员选择 -->
 
-     <el-dialog
 
-       :title="isOnlyChangeUser ? '学员调整' : '新建班级'"
 
-       width="750px"
 
-       :visible.sync="studentVisible"
 
-       destroy-on-close
 
-     >
 
-       <selectStudent
 
-         :activeListStudent="activeListStudent"
 
-         :studentList="studentList"
 
-         :soundList="activeSoundList"
 
-         :classGroupId="activeClass"
 
-         :teacherList="teacherList"
 
-         :cooperationList="cooperationList"
 
-         :isOnlyChangeUser="isOnlyChangeUser"
 
-         :isStudentRemove="isStudentRemove"
 
-         :activeType="activeType"
 
-         @changeActiveChioseSound="changeActiveChioseSound"
 
-         @searchStudent="searchStudent(activeClass)"
 
-         @submited="studentSubmited"
 
-         @close="studentVisible = false"
 
-       />
 
-     </el-dialog>
 
-     <!-- 老师以及课程设置 -->
 
-     <el-dialog
 
-       title="班级排课"
 
-       width="1200px"
 
-       :visible.sync="infoVisible"
 
-       :modal-append-to-body="false"
 
-     >
 
-       <classroomSetting
 
-         v-if="infoVisible"
 
-         :classType="classType"
 
-         :teacherList="teacherList"
 
-         :musicGroupId="teamid"
 
-         :activeType="activeType"
 
-         :courseTypeList="courseTypeList"
 
-         :cooperationList="cooperationList"
 
-         :detail="infoDetail"
 
-         :studentSubmitedData="studentSubmitedData"
 
-         @close="infoVisible = false"
 
-         @submited="getList"
 
-       />
 
-     </el-dialog>
 
-     <!-- 新增合奏班 -->
 
-     <el-dialog
 
-       title="新增合奏班"
 
-       width="700px"
 
-       :visible.sync="MixVisible"
 
-       :modal-append-to-body="false"
 
-     >
 
-       <div class="studentMask">
 
-         <div class="left">
 
-           <div class="wrap">
 
-             <!-- :disabled="!isNewClass" -->
 
-             <el-input
 
-               placeholder="请输入合奏班名称"
 
-               v-model.trim="className"
 
-             ></el-input>
 
-           </div>
 
-           <div class="chioseStudentList">
 
-             <h4 style="padding-left: 10px">当前已选学生</h4>
 
-             <div
 
-               class="studentItem"
 
-               v-for="(item, index) in activeListStudent"
 
-               :key="index"
 
-             >
 
-               {{ item.name }}
 
-               <el-button type="text" @click="removeSiginforMix(item)"
 
-                 >删除班级</el-button
 
-               >
 
-             </div>
 
-           </div>
 
-         </div>
 
-         <div class="right">
 
-           <!--   列表开始  -->
 
-           <div class="tableList">
 
-             <el-table
 
-               tooltip-effect="dark"
 
-               style="width: 100%; margin-top: 10px"
 
-               :data="singleList"
 
-               ref="mixList"
 
-               @selection-change="SelectionMix"
 
-             >
 
-               <el-table-column
 
-                 type="selection"
 
-                 align="center"
 
-                 width="55"
 
-               ></el-table-column>
 
-               <el-table-column
 
-                 prop="name"
 
-                 align="center"
 
-                 width="120"
 
-                 label="姓名"
 
-               ></el-table-column>
 
-               <el-table-column
 
-                 prop="gender"
 
-                 align="center"
 
-                 width="100"
 
-                 label="性别"
 
-               >
 
-                 <template slot-scope="scope">
 
-                   <div>{{ scope.row.gender | sex }}</div>
 
-                 </template>
 
-               </el-table-column>
 
-               <el-table-column
 
-                 prop="subjectName"
 
-                 width="120"
 
-                 align="center"
 
-                 label="学员声部"
 
-               ></el-table-column>
 
-             </el-table>
 
-           </div>
 
-         </div>
 
-       </div>
 
-       <div slot="footer" class="dialog-footer">
 
-         <el-button @click="studentVisible = false">取 消</el-button>
 
-         <!-- 班级学员修改 -->
 
-         <el-button type="primary" v-if="!isNewClass" @click="addSomeStudent"
 
-           >确 定</el-button
 
-         >
 
-         <!-- 临时调整或者新建班级 -->
 
-         <el-button type="primary" v-if="isNewClass" @click="setInfoMsg"
 
-           >确 定</el-button
 
-         >
 
-       </div>
 
-     </el-dialog>
 
-     <el-dialog :visible.sync="newClassVisible" width="700px" title="新增班级">
 
-       <el-form
 
-         :model="newClassForm"
 
-         :inline="true"
 
-         label-width="120px"
 
-         ref="newClassForm"
 
-         class="newClassForm"
 
-       >
 
-         <el-form-item
 
-           label="班级名称"
 
-           :rules="[
 
-             { required: true, message: '请输入班级姓名', trigger: 'blur' },
 
-           ]"
 
-           prop="className"
 
-         >
 
-           <el-input
 
-             style="width: 180px"
 
-             v-model="newClassForm.className"
 
-           ></el-input>
 
-         </el-form-item>
 
-         <el-form-item
 
-           label="班级类型"
 
-           :rules="[
 
-             { required: true, message: '请选择班级类型', trigger: 'blur' },
 
-           ]"
 
-           prop="type"
 
-         >
 
-           <el-select
 
-             v-model.trim="newClassForm.type"
 
-             clearable
 
-             @change="chioseHightype"
 
-           >
 
-             <el-option
 
-               v-for="(item, index) in highTypeList"
 
-               :key="index"
 
-               :label="item.label"
 
-               :value="item.value"
 
-             ></el-option>
 
-           </el-select>
 
-         </el-form-item>
 
-         <el-form-item
 
-           label="主教老师"
 
-           prop="bishop"
 
-           :rules="[
 
-             { required: true, message: '请选择主教老师', trigger: 'blur' },
 
-           ]"
 
-         >
 
-           <el-select
 
-             v-model.trim="newClassForm.bishop"
 
-             placeholder="请选择主教老师"
 
-             clearable
 
-             filterable
 
-           >
 
-             <el-option
 
-               v-for="(item, index) in teacherList"
 
-               :key="index"
 
-               :label="item.realName"
 
-               :value="String(item.id)"
 
-             ></el-option>
 
-           </el-select>
 
-           <!-- <remote-search
 
-             :commit="'setTeachers'"
 
-             v-model="newClassForm.bishop"
 
-           /> -->
 
-         </el-form-item>
 
-         <el-form-item
 
-           label="预计招生数"
 
-           prop="expectStudentNum"
 
-           type="number"
 
-           :rules="[
 
-             { required: true, message: '请输入预计招生数', trigger: 'blur' },
 
-           ]"
 
-           @mousewheel.native.prevent
 
-         >
 
-           <el-input
 
-             style="width: 180px"
 
-             :disabled="newClassForm.type == 'HIGH_ONLINE'"
 
-             v-model="newClassForm.expectStudentNum"
 
-           ></el-input>
 
-         </el-form-item>
 
-         <el-form-item
 
-           label="助教老师"
 
-           v-if="
 
-             newClassForm.type != 'HIGH_ONLINE' &&
 
-             newClassForm.type != 'HIGH' &&
 
-             newClassForm.type
 
-           "
 
-           prop="teaching"
 
-         >
 
-           <el-select
 
-             v-model.trim="newClassForm.teaching"
 
-             placeholder="请选择助教老师"
 
-             filterable
 
-             clearable
 
-             multiple
 
-             @change="setAssistant1"
 
-           >
 
-             <el-option
 
-               v-for="(item, index) in cooperationList"
 
-               :key="index"
 
-               :label="item.realName"
 
-               :value="item.id"
 
-             ></el-option>
 
-           </el-select>
 
-           <!-- <remote-search
 
-             :commit="'setTeachers'"
 
-             v-model="newClassForm.teaching"
 
-             @change="setAssistant1"
 
-             :multiple="true"
 
-           /> -->
 
-         </el-form-item>
 
-         <el-form-item
 
-           label="声部"
 
-           prop="subjectIdList"
 
-           :rules="[{ required: true, message: '请选择声部', trigger: 'blur' }]"
 
-           v-if="newClassForm.type == 'NORMAL'"
 
-           :key="'HIGH'"
 
-         >
 
-           <el-select v-model="newClassForm.subjectIdList" clearable multiple>
 
-             <el-option
 
-               v-for="(item, index) in soundList"
 
-               :key="index"
 
-               :label="item.name"
 
-               :value="item.id"
 
-             ></el-option>
 
-           </el-select>
 
-         </el-form-item>
 
-         <!-- <el-form-item 辜经理和焕焕狗要求不要可选声部
 
-           label="可报名声部"
 
-           prop="memo"
 
-           :rules="[
 
-             { required: true, message: '请选择可报名声部', trigger: 'blur' },
 
-           ]"
 
-           v-if="
 
-             newClassForm.type == 'HIGH' || newClassForm.type == 'HIGH_ONLINE'
 
-           "
 
-         >
 
-           <el-select
 
-             v-model.trim="newClassForm.memo"
 
-             multiple
 
-             clearable
 
-             @change="changeMemo"
 
-           >
 
-             <el-option
 
-               :disabled="item.disabled || appoint"
 
-               v-for="(item, index) in soundList"
 
-               :key="index"
 
-               :label="item.name"
 
-               :value="item.id"
 
-             ></el-option>
 
-           </el-select>
 
-         </el-form-item> -->
 
-         <el-form-item
 
-           label="网络教室声部"
 
-           prop="subjectId"
 
-           :rules="[
 
-             { required: true, message: '请选择线上声部', trigger: 'blur' },
 
-           ]"
 
-           v-if="newClassForm.type == 'HIGH_ONLINE'"
 
-           class="higheSelect"
 
-           :key="'HIGH_ONLINE'"
 
-         >
 
-           <el-select v-model="newClassForm.subjectId" clearable>
 
-             <el-option
 
-               v-for="(item, index) in soundList"
 
-               :key="index"
 
-               :label="item.name"
 
-               :value="item.id"
 
-             ></el-option>
 
-           </el-select>
 
-         </el-form-item>
 
-       </el-form>
 
-       <div slot="footer" class="dialog-footer question">
 
-         <div>
 
-           <el-popover placement="right" width="500" trigger="click">
 
-             <div class="popoverWrap">
 
-               <p>线上基础技能班规则:</p>
 
-               <p>班级数量:</p>
 
-               <p>
 
-                 可创建班级数量=各个声部学员数/6向上取整+乐团在读学员数/30向上取整
 
-               </p>
 
-               <p>
 
-                 上低音号、长号学员数合并计算
 
-               </p>
 
-               <p>班级人数:</p>
 
-               <p>线上基础技能班人数上限为6人</p>
 
-             </div>
 
-             <el-button
 
-               type="text"
 
-               icon="el-icon-question"
 
-               slot="reference"
 
-               style="color: red"
 
-               >线上基础技能班规则</el-button
 
-             >
 
-           </el-popover>
 
-         </div>
 
-         <div>
 
-           <el-button @click="newClassVisible = false">取 消</el-button>
 
-           <el-button type="primary" @click="newClassHight">确 定</el-button>
 
-         </div>
 
-       </div>
 
-     </el-dialog>
 
-     <el-dialog
 
-       title="学员列表"
 
-       :visible.sync="studentListModalVisible"
 
-       destroy-on-close
 
-     >
 
-       <viewStudentList
 
-         :list="studentListModal"
 
-         :showOk="true"
 
-         @close="studentListModalVisible = false"
 
-       />
 
-     </el-dialog>
 
-     <el-dialog
 
-       title="学员班级调整"
 
-       width="800px"
 
-       :visible.sync="studentResetVisiable"
 
-     >
 
-       <studentResetView
 
-         :teacherList="teacherList"
 
-         :courseTypesByType="courseTypesByType"
 
-         v-if="studentResetVisiable"
 
-         :classList="mergeList"
 
-         @close="closeStudentReset"
 
-       />
 
-     </el-dialog>
 
-   </div>
 
- </template>
 
- <script>
 
- import {
 
-   getAllClass,
 
-   getAllSignClassandTeacher,
 
-   getAllSignClass,
 
-   removeSingleClass,
 
-   getNoClassStudentAll,
 
-   findSound,
 
-   teamSoundStudent,
 
-   findMusicGroupClassTeacher,
 
-   revisionClassGroup,
 
-   revisionAddClassGroup,
 
-   getEmployeeOrgan,
 
-   getTeacher,
 
-   findNoClassSingle,
 
-   getMusicGroupStuNoClassType,
 
-   classGroupUpdate,
 
-   getTeamBaseInfo,
 
-   clearClassCourse,
 
-   superFindClassGroups,
 
-   createClass,
 
-   pushMessage,
 
- } from "@/api/buildTeam";
 
- import {
 
-   getClassAllStudent,
 
-   removeStudents,
 
-   addStudents,
 
- } from "@/api/studentManager";
 
- import { getOrganizationCourseUnitPriceSettings } from "@/api/specialSetting";
 
- import { queryEmployByOrganId } from "@/api/systemManage";
 
- import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
 
- import dayjs from "dayjs";
 
- import axios from "axios";
 
- import { classTimeList, musicClassTypeList } from "@/utils/searchArray";
 
- import viewStudentList from "./modals/view-student-list";
 
- import selectStudent from "./modals/select-student";
 
- import changeTeacher from "./modals/change-teacher";
 
- import classroomSetting from "./modals/classroom-setting";
 
- import studentResetView from "./modals/student-reset-view";
 
- import qs from "qs";
 
- import { permission } from "@/utils/directivePage";
 
- import { getCourseType } from "@/utils/utils";
 
- const formatClassGroupTeacherMapperList = (core, ass) => {
 
-   const list = [];
 
-   if (core) {
 
-     list.push({ userId: core, teacherRole: "BISHOP" });
 
-   }
 
-   if (ass) {
 
-     for (const item of ass) {
 
-       list.push({ userId: item, teacherRole: "TEACHING" });
 
-     }
 
-   }
 
-   return list;
 
- };
 
- export default {
 
-   props: ["musicGroupInfo"],
 
-   name: "tresetClass",
 
-   components: {
 
-     viewStudentList,
 
-     selectStudent,
 
-     classroomSetting,
 
-     studentResetView,
 
-     changeTeacher,
 
-   },
 
-   data() {
 
-     return {
 
-       teacherVisible: false,
 
-       musicGroupInfos: this.musicGroupInfo,
 
-       classType: 0,
 
-       pickerOptions: {
 
-         firstDayOfWeek: 1,
 
-         disabledDate(time) {
 
-           return time.getTime() + 86400000 <= new Date().getTime();
 
-         },
 
-       },
 
-       step: "00:05",
 
-       teamid: "",
 
-       topForm: {
 
-         classType: "",
 
-       },
 
-       studentSubmitedData: null,
 
-       infoDetail: null,
 
-       classTimeList,
 
-       tableList: [],
 
-       maxClassList: [],
 
-       activeSingleList: [],
 
-       studentListModal: [],
 
-       studentListModalVisible: false,
 
-       resetCourseVisible: false, // 重新排课弹窗
 
-       resetClassVisible: false, // 班级调整弹窗
 
-       studentVisible: false,
 
-       MixVisible: false, // 新增合奏班弹窗
 
-       activeListStudent: [], // 当前选中的学生列表
 
-       activeChioseSound: "", //选择的声部
 
-       chioseSoundList: [], //当前的所有声部
 
-       studentList: [], //列表里的学生集合
 
-       activeMixClass: "", // 选中的合奏班
 
-       chioseStudent: [], // 勾选的学生信息
 
-       isNewClass: false, // 是否为新建班级
 
-       isOnlyChangeUser: false,
 
-       isStudentRemove: false, // 班级上没有未开始课程时
 
-       isSearch: false, // 是否需要搜索
 
-       isTemporary: false, // 是否为临时班级
 
-       className: "", // 班级名称
 
-       activeClass: "", // 当前操作的班级
 
-       soundList: [],
 
-       infoVisible: false, // 判断是否需要显示老师设置
 
-       teacherForm: {
 
-         isAdd: null,
 
-         coreTeacher: "",
 
-         assistant: [],
 
-         courseType: "",
 
-         courseTime: "",
 
-         checked: true,
 
-         courseNum: "",
 
-         mixClassGroupId: "",
 
-         sound: "",
 
-         expectStudentNum: "",
 
-       },
 
-       teacherRules: {
 
-         isAdd: [{ required: true, message: "请选择调整类型" }],
 
-         coreTeacher: [{ required: true, message: "请选择主教老师" }],
 
-         courseType: [{ required: true, message: "请选择上课类型" }],
 
-         courseTime: [{ required: true, message: "请选择开始时间" }],
 
-         courseNum: [{ required: true, message: "请输入排课次数" }],
 
-         mixClassGroupId: [{ required: true, message: "请选择合奏班" }],
 
-         sound: [{ required: true, message: "请选择合声部" }],
 
-         expectStudentNum: [{ required: true, message: "请填写预计招生人数" }],
 
-       },
 
-       weekList: [],
 
-       teacherList: [], // 存储的老师列表
 
-       courseTypeList: [],
 
-       weekDateList: [
 
-         { value: "1", label: "星期一" },
 
-         { value: "2", label: "星期二" },
 
-         { value: "3", label: "星期三" },
 
-         { value: "4", label: "星期四" },
 
-         { value: "5", label: "星期五" },
 
-         { value: "6", label: "星期六" },
 
-         { value: "7", label: "星期日" },
 
-       ],
 
-       // 班级类型
 
-       classTypeList: [
 
-         { value: "NORMAL", label: "声部班" },
 
-         { value: "MIX", label: "合奏班" },
 
-         { value: "HIGH", label: "基础技能班" },
 
-         { value: "SNAP", label: "临时班" },
 
-         { value: "HIGH_ONLINE", label: "线上基础技能班" },
 
-         { value: "MUSIC_NETWORK", label: "乐团网管课" },
 
-       ],
 
-       musicClassTypeList,
 
-       // 基础技能班类型
 
-       highTypeList: [
 
-         { value: "HIGH", label: "基础技能班" },
 
-         { value: "HIGH_ONLINE", label: "线上基础技能班" },
 
-       ],
 
-       cooperationList: [],
 
-       singleList: [],
 
-       activeSingleLists: [],
 
-       activeType: "",
 
-       resetClassForm: {
 
-         // 班级调整form对象
 
-         startTime: "",
 
-         endTime: "",
 
-         assistant: [],
 
-         coreTeacher: "",
 
-       },
 
-       recourseForm: {
 
-         courseType: "",
 
-         checked: false,
 
-         courseTime: "",
 
-         courseNum: "",
 
-       },
 
-       teacherDetail: null,
 
-       organId: "",
 
-       newClassVisible: false,
 
-       newClassForm: {
 
-         className: null,
 
-         type: null,
 
-         subjectIdList: [],
 
-         expectStudentNum: null,
 
-         bishop: null,
 
-         teaching: [],
 
-         memo: [],
 
-         subjectId: null,
 
-       },
 
-       classGroupIds: null,
 
-       maxMun: 16,
 
-       courseTime: "",
 
-       studentResetVisiable: false,
 
-       courseTypesByType: null,
 
-       mergeList: [],
 
-       activeSoundList: [],
 
-       appoint: false,
 
-     };
 
-   },
 
-   created() {
 
-     this.init();
 
-   },
 
-   // activated() {
 
-   //   this.init();
 
-   // },
 
-   mounted() {},
 
-   methods: {
 
-     permission(val) {
 
-       return permission(val);
 
-     },
 
-     async init() {
 
-       this.teamid = this.$route.query.id;
 
-       if (this.musicGroupInfo) {
 
-         this.organId = this.musicGroupInfos.organId;
 
-         this.chargeTypeId = this.musicGroupInfos.chargeTypeId;
 
-       } else {
 
-         getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
 
-           if (res.code == 200) {
 
-             this.musicGroupInfos = res.data.musicGroup;
 
-             this.organId = this.musicGroupInfos.organId;
 
-             this.chargeTypeId = this.musicGroupInfos.chargeTypeId;
 
-           }
 
-         });
 
-       }
 
-       this.$nextTick(async (res) => {
 
-         try {
 
-           if (this.organId && this.chargeTypeId) {
 
-             const res = await getOrganizationCourseUnitPriceSettings({
 
-               chargeTypeId: this.chargeTypeId,
 
-               organId: this.organId,
 
-               rows: 9999,
 
-             });
 
-             const d = {};
 
-             this.courseTypes = res.data.rows;
 
-             for (const item of this.courseTypes) {
 
-               d[item.courseType] = item;
 
-             }
 
-             this.courseTypesByType = d;
 
-             console.log(this.courseTypesByType);
 
-           }
 
-         } catch (error) {}
 
-         // 根据乐团id获取乐团所属分部
 
-         getTeacher({ organId: this.organId }).then((res) => {
 
-           if (res.code == 200) {
 
-             this.cooperationList = res.data;
 
-             this.teacherList = res.data;
 
-           }
 
-         });
 
-         getAllClass({ musicGroupId: this.teamid }).then((res) => {
 
-           if (res.code == 200) {
 
-             this.maxClassList = res.data;
 
-           }
 
-         });
 
-         // 获取默认乐团内的所有班
 
-         this.changeMixClass();
 
-         // 根据乐团id获取乐团的所有声部
 
-         findSound({ musicGroupId: this.teamid }).then((res) => {
 
-           if (res.code == 200) {
 
-             this.soundList = res.data;
 
-           }
 
-         });
 
-       });
 
-       // 根据分部id和缴费类型获取 可选课程类型
 
-     },
 
-     resetTeacher(row) {
 
-       this.teacherVisible = true;
 
-       this.teacherDetail = row;
 
-     },
 
-     teacherSubmited(data) {
 
-       const obj = this.getSubmitData(data, {
 
-         classGroupId: this.teacherDetail?.id,
 
-         courseAddType: "onlyUpdateTeacher",
 
-       });
 
-       classGroupUpdate(obj).then((res) => {
 
-         if (res.code == 200) {
 
-           this.$message.success("修改成功");
 
-           this.teacherVisible = false;
 
-           this.getList();
 
-         }
 
-       });
 
-     },
 
-     getSubmitData(data, more = {}) {
 
-       return [
 
-         {
 
-           type: this.activeType,
 
-           classGroupName: data?.name,
 
-           musicGroupId: this.teamid,
 
-           classGroupTeacherMapperList: formatClassGroupTeacherMapperList(
 
-             data.coreTeacher,
 
-             data.assistant
 
-           ),
 
-           students: data?.seleched,
 
-           ...more,
 
-         },
 
-       ];
 
-     },
 
-     getClassDate(data) {
 
-       return {
 
-         type: this.activeType,
 
-         name: data?.name,
 
-         musicGroupId: this.teamid,
 
-         subjectIdList:
 
-           data?.soundList.length > 0 ? data?.soundList.join(",") : null,
 
-         teacherMapperList: formatClassGroupTeacherMapperList(
 
-           data.coreTeacher,
 
-           data.assistant
 
-         ),
 
-         groupType: "MUSIC",
 
-       };
 
-     },
 
-     async submitClass(data) {
 
-       const list = this.getSubmitData(data, { onlyCreateClassGroup: true });
 
-       let obj = this.getClassDate(data);
 
-       if (this.activeType == "MUSIC_NETWORK") {
 
-         try {
 
-           await revisionAddClassGroup(list);
 
-           this.$message.success("提交成功");
 
-           this.studentVisible = false;
 
-           this.getList();
 
-         } catch (error) {
 
-           console.log(error);
 
-         }
 
-       } else {
 
-         createClass(obj).then((res) => {
 
-           if (res.code == 200) {
 
-             this.studentVisible = false;
 
-             this.$message.success("提交成功");
 
-             this.getList();
 
-           }
 
-         });
 
-       }
 
-       return;
 
-       console.log(data);
 
-       try {
 
-         if (this.classType == 1) {
 
-           // 0新建班级 2 3 4新增班级修改
 
-           console.log(list, "submitClass,临时班");
 
-           return;
 
-           await revisionClassGroup(list);
 
-           this.$message.success("提交成功");
 
-         } else if (
 
-           this.classType == 2 ||
 
-           this.classType == 3 ||
 
-           this.classType == 4
 
-         ) {
 
-           console.log(list, "submitClass");
 
-           return;
 
-           await revisionAddClassGroup(list);
 
-           this.$message.success("提交成功");
 
-         }
 
-         this.studentVisible = false;
 
-         this.getList();
 
-       } catch (error) {
 
-         console.log(error);
 
-       }
 
-     },
 
-     studentSubmited(data) {
 
-       if (!this.isOnlyChangeUser) {
 
-         this.submitClass(data);
 
-         // this.studentSubmitedData = data;
 
-         // this.infoVisible = true;
 
-       } else {
 
-         this.getList();
 
-       }
 
-     },
 
-     recourse(row) {
 
-       (this.weekList = [
 
-         {
 
-           week: "",
 
-           startTime: "",
 
-           endTime: "",
 
-           id: new Date(),
 
-         },
 
-       ]),
 
-         (this.resetCourseVisible = true);
 
-     },
 
-     addMix() {
 
-       this.MixVisible = true;
 
-     },
 
-     changeActiveChioseSound(val) {
 
-       this.activeChioseSound = val;
 
-     },
 
-     setAssistant(val) {
 
-       for (let i in val) {
 
-         if (val[i] == this.teacherForm.coreTeacher) {
 
-           val.splice(i, 1);
 
-         }
 
-       }
 
-     },
 
-     changeMixClass(val) {
 
-       // 根据合奏班id获取合奏班下的所有声部班
 
-       this.getList(val);
 
-       this.activeMixClass = val;
 
-     },
 
-     getList(val) {
 
-       getAllSignClassandTeacher({ musicGroupId: this.teamid, type: val }).then(
 
-         (res) => {
 
-           if (res.code == 200) {
 
-             this.activeSingleList = res.data;
 
-             if (res.data?.length > 0) {
 
-               this.mergeList = res.data.filter((item) => {
 
-                 return item.type != "MUSIC_NETWORK";
 
-               });
 
-             }
 
-             // this.topForm.count = this.activeSingleList.length
 
-           }
 
-         }
 
-       );
 
-     },
 
-     // 临时调整
 
-     temporary() {
 
-       this.classType = 1;
 
-       this.activeClass = "";
 
-       this.activeListStudent = [];
 
-       this.studentList = [];
 
-       this.isNewClass = true;
 
-       this.studentVisible = true;
 
-       this.isOnlyChangeUser = false;
 
-       this.isSearch = true;
 
-       this.className = "";
 
-       this.isTemporary = true;
 
-       this.activeType = "SNAP";
 
-       this.activeChioseSound = null;
 
-       this.setType("SNAP");
 
-       this.getNoClassStudent("SNAP");
 
-     },
 
-     setType(type) {
 
-       this.courseTypeList = getCourseType(type);
 
-       this.activeSoundList = this.soundList;
 
-     },
 
-     // 新增班级
 
-     addNewClass(type) {
 
-       const types = {
 
-         NORMAL: 2,
 
-         MUSIC_NETWORK: 4,
 
-       };
 
-       this.isOnlyChangeUser = false;
 
-       this.classType = types[type] || 3;
 
-       this.setType(type);
 
-       this.activeType = type;
 
-       this.activeClass = "";
 
-       this.activeListStudent = [];
 
-       this.studentList = [];
 
-       this.isNewClass = true;
 
-       this.studentVisible = true;
 
-       this.isSearch = false;
 
-       this.className = "";
 
-       this.isTemporary = false;
 
-       this.activeChioseSound = null;
 
-       this.getNoClassStudent(type);
 
-     },
 
-     searchStudent(classGroupId) {
 
-       console.log(this.activeChioseSound);
 
-       // 搜索学生
 
-       // 根据声部id  乐团id搜索学生
 
-       if (this.activeType == "SNAP") {
 
-         teamSoundStudent({
 
-           musicGroupId: this.teamid,
 
-           actualSubjectId: this.activeChioseSound,
 
-         }).then((res) => {
 
-           if (res.code == 200) {
 
-             this.studentList = res.data;
 
-           }
 
-         });
 
-       } else {
 
-         this.getNoClassStudent(
 
-           this.activeType,
 
-           this.activeChioseSound,
 
-           classGroupId
 
-         );
 
-       }
 
-     },
 
-     // 选择学生的方法修改
 
-     SelectionStudent(val) {
 
-       this.chioseStudent = val;
 
-     },
 
-     // 新增选中的学生
 
-     NewselectionStudent(val) {
 
-       this.chioseStudent = val;
 
-       // 这里新增的添加到选中的学生列表  根据学生id去重
 
-       if (this.chioseStudent.length > 0) {
 
-         this.chioseStudent = this.chioseStudent.concat(val);
 
-       } else {
 
-         this.chioseStudent = val;
 
-       }
 
-       // 联动版
 
-       // this.activeListStudent = this.objArrayRemoval(this.chioseStudent, 'userId')
 
-       // 非联动多选版
 
-       this.activeListStudent = this.activeListStudent.concat(
 
-         this.chioseStudent
 
-       );
 
-       // // 去重
 
-       this.activeListStudent = this.objArrayRemoval(
 
-         this.activeListStudent,
 
-         "userId"
 
-       );
 
-       // 将其填入选中的学生
 
-     },
 
-     clearCourse(scope) {
 
-       clearClassCourse({ classGroupId: scope.row.id })
 
-         .then((res) => {
 
-           if (res.code == 200) {
 
-             this.$message.success("清除成功");
 
-             scope._self.$refs[scope.$index].doClose();
 
-             // 重新请求列表
 
-             this.getList(this.activeMixClass);
 
-           } else {
 
-             this.$message.error(res.msg);
 
-             scope._self.$refs[scope.$index].doClose();
 
-           }
 
-         })
 
-         .catch((res) => {
 
-           scope._self.$refs[scope.$index].doClose();
 
-         });
 
-       // 清空课表
 
-     },
 
-     // 删除班级
 
-     removeClass(scope) {
 
-       this.$confirm("是否确定删除该班级?", "提示", {
 
-         confirmButtonText: "确定",
 
-         cancelButtonText: "取消",
 
-         type: "warning",
 
-       })
 
-         .then(() => {
 
-           removeSingleClass({ classGroupId: scope.row.id })
 
-             .then((res) => {
 
-               if (res.code == 200) {
 
-                 this.$message.success("删除成功");
 
-                 // 重新请求列表
 
-                 this.getList(this.activeMixClass);
 
-               }
 
-             })
 
-             .catch((res) => {});
 
-         })
 
-         .catch(() => {});
 
-     },
 
-     // 修改班级
 
-     resetClass(row) {
 
-       this.isOnlyChangeUser = true;
 
-       this.isNewClass = false;
 
-       this.className = row.name;
 
-       this.studentVisible = true;
 
-       this.activeClass = row.id;
 
-       this.isSearch = false;
 
-       this.activeType = row.type;
 
-       this.activeChioseSound = null;
 
-       this.isStudentRemove =
 
-         row.currentClassTimes == row.totalClassTimes ? true : false; // 上课时长是否没有
 
-       // 根据单机班id 查询声部班内的所有学生
 
-       getClassAllStudent({ classGroupId: row.id }).then((res) => {
 
-         if (res.code == 200) {
 
-           this.activeListStudent = res.data.map((item) => {
 
-             item.isVisible = false;
 
-             return item;
 
-           });
 
-         }
 
-       });
 
-       this.activeSoundList = this.soundList;
 
-       this.getNoClassStudent(row.type); // 基础技能班能获取所有
 
-       // if (this.activeType == "HIGH" || this.activeType == "HIGH_ONLINE") {
 
-       //   this.getNoClassStudent(row.type, row.memo);
 
-       //   let arr = row.memo.split(",");
 
-       //   console.log(arr);
 
-       //   this.activeSoundList = this.soundList.filter((sound) => {
 
-       //     return arr.indexOf(sound.id + "") != -1;
 
-       //   });
 
-       // } else {
 
-       //   this.activeSoundList = this.soundList;
 
-       //   this.getNoClassStudent(row.type);
 
-       //   console.log(this.activeSoundList);
 
-       // }
 
-     },
 
-     // 班级调整
 
-     classAdjustment(row) {
 
-       this.infoDetail = row;
 
-       this.activeType = row.type;
 
-       this.activeClass = row.id;
 
-       // this.activeListStudent = row.subjectIdList.split(',')
 
-       this.setType(row.type);
 
-       // activeListStudent
 
-       this.isNewClass = false;
 
-       this.teacherForm.assistant = [];
 
-       for (let i in row.classGroupTeacherMapperList) {
 
-         if (row.classGroupTeacherMapperList[i].teacherRole == "BISHOP") {
 
-           this.teacherForm.coreTeacher =
 
-             row.classGroupTeacherMapperList[i].userId;
 
-         }
 
-         if (row.classGroupTeacherMapperList[i].teacherRole == "TEACHING") {
 
-           this.teacherForm.assistant.push(
 
-             row.classGroupTeacherMapperList[i].userId
 
-           );
 
-         }
 
-       }
 
-       this.infoVisible = true;
 
-     },
 
-     async getNoClassStudent(type, actualSubjectId, classGroupId) {
 
-       const params = {
 
-         musicGroupId: this.teamid,
 
-         type,
 
-         actualSubjectId,
 
-         classGroupId,
 
-       };
 
-       await getMusicGroupStuNoClassType(params).then((res) => {
 
-         if (res.code == 200) {
 
-           this.studentList = res.data;
 
-           // }
 
-         }
 
-       });
 
-     },
 
-     // 删除学生 调整
 
-     removeStudent(item) {
 
-       // 这里做判断如果是线上基础技能班 学生人数不能少于3人
 
-       if (
 
-         this.activeType == "HIGH_ONLINE" &&
 
-         this.activeListStudent.length <= 3
 
-       ) {
 
-         this.$message.error("线上基础技能课不能小于3人");
 
-         return;
 
-       }
 
-       removeStudents({
 
-         classGroupId: this.activeClass,
 
-         userId: item.userId,
 
-       }).then((res) => {
 
-         if (res.code == 200) {
 
-           this.$message.success("删除成功");
 
-           item.isVisible = false;
 
-           // 这里刷新 this.studentList this.activeListStudent
 
-           this.getList(this.activeMixClass);
 
-           getClassAllStudent({ classGroupId: this.activeClass }).then((res) => {
 
-             if (res.code == 200) {
 
-               this.activeListStudent = res.data;
 
-             }
 
-           });
 
-           this.getNoClassStudent(this.activeType, null, this.activeClass);
 
-           // getNoClassStudentAll({ musicGroupId: this.teamid }).then(res => {
 
-           //   if (res.code == 200) {
 
-           //     this.$message.success('删除成功');
 
-           //     this.studentList = res.data.map(item => {
 
-           //       item.isVisible = false;
 
-           //       return item;
 
-           //     });
 
-           //   }
 
-           // })
 
-         }
 
-       });
 
-     },
 
-     // 批量添加学生
 
-     addSomeStudent() {
 
-       // 获取勾选的学生
 
-       let arr = this.chioseStudent.map((item) => {
 
-         return item.userId;
 
-       });
 
-       if (arr.length <= 0) {
 
-         if (this.isNewClass) {
 
-           this.$message.error("至少添加一名学员");
 
-           return;
 
-         } else {
 
-           this.studentVisible = false;
 
-           return;
 
-         }
 
-       }
 
-       if (this.activeType == "HIGH_ONLINE") {
 
-         superFindClassGroups({ classGroupId: this.activeClass }).then((res) => {
 
-           if (res.code == 200) {
 
-             if (
 
-               this.activeListStudent.length + this.chioseStudent.length > 6 ||
 
-               this.activeListStudent.length + this.chioseStudent.length < 3
 
-             ) {
 
-               this.$message.error("线上技能班必须为3-6人");
 
-               return;
 
-             } else {
 
-               addStudents({
 
-                 classGroupId: this.activeClass,
 
-                 userIdsStr: arr.join(","),
 
-               }).then((res) => {
 
-                 if (res.code == 200) {
 
-                   this.studentVisible = false;
 
-                   this.$message.success("添加成功");
 
-                   this.getList();
 
-                   return;
 
-                 }
 
-               });
 
-             }
 
-           }
 
-         });
 
-       } else {
 
-         addStudents({
 
-           classGroupId: this.activeClass,
 
-           userIdsStr: arr.join(","),
 
-         }).then((res) => {
 
-           if (res.code == 200) {
 
-             this.studentVisible = false;
 
-             this.$message.success("添加成功");
 
-             this.getList();
 
-           }
 
-         });
 
-       }
 
-     },
 
-     SelectionMix(val) {
 
-       this.activeSingleLists = val;
 
-     },
 
-     removeSiginforMix(item) {
 
-       for (let k in this.activeSingleLists) {
 
-         if (this.activeSingleLists[k].id == item.id) {
 
-           this.$refs["mixList"].toggleRowSelection(item, false);
 
-         }
 
-       }
 
-     },
 
-     temporaryRemoveStudent(item) {
 
-       // 列表中删除
 
-       for (let i in this.activeListStudent) {
 
-         if (this.activeListStudent[i].userId == item.userId) {
 
-           this.activeListStudent.splice(i, 1);
 
-         }
 
-       }
 
-       // 查询列表中的项 取消勾选 temporaryStudentList  toggleRowSelection
 
-       // 循环列表 找到相应的行取消勾选
 
-       for (let k in this.studentList) {
 
-         if (this.studentList[k].userId == item.userId) {
 
-           this.$refs["temporaryStudentList"].toggleRowSelection(item, false);
 
-         }
 
-       }
 
-       // this.$refs['temporaryStudentList'].toggleRowSelection(row, selected);
 
-     },
 
-     // 对象数组去重
 
-     objArrayRemoval(arr, attr) {
 
-       let obj = {};
 
-       let result = [];
 
-       for (let x in arr) {
 
-         if (!obj[arr[x][attr]]) {
 
-           result.push(arr[x]);
 
-           obj[arr[x][attr]] = true;
 
-         }
 
-       }
 
-       return result;
 
-     },
 
-     setInfoMsg() {
 
-       // 判断班级名称是否输入
 
-       if (!this.className) {
 
-         this.$message.error("请输入班级名称");
 
-         return;
 
-       }
 
-       // 判断有没有勾选学生
 
-       if (this.activeListStudent.length <= 0) {
 
-         // 没有勾学生
 
-         this.$message.error("班级里至少要有一名学生");
 
-         return;
 
-       }
 
-       if (this.activeType == "HIGH_ONLINE") {
 
-         if (
 
-           this.activeListStudent.length > 6 ||
 
-           this.activeListStudent.length < 3
 
-         ) {
 
-           this.$message.error("线上技能班必须为3-6人");
 
-           return;
 
-         }
 
-         this.teacherForm.expectStudentNum = this.activeListStudent.length;
 
-       }
 
-       this.infoVisible = true;
 
-     },
 
-     addWeek() {
 
-       // 添加循环周期
 
-       this.weekList.push({
 
-         dayOfWeek: "",
 
-         startClassTime: "",
 
-         endClassTime: "",
 
-         time: this.courseTime,
 
-         id: new Date().getTime(),
 
-       });
 
-     },
 
-     // 删除循环周
 
-     removeWeek(item) {
 
-       for (let i in this.weekList) {
 
-         if (this.weekList[i].id == item.id) {
 
-           this.weekList.splice(i, 1);
 
-         }
 
-       }
 
-     },
 
-     // 提交临时班的信息
 
-     submitTemporary(type) {
 
-       // 参数是一样  type为1 新增临时班
 
-       // type为2  新增声部班
 
-       // type为3 修改班级信息
 
-       if (type == 1) {
 
-         this.isTemporary = true;
 
-       } else {
 
-         this.isTemporary = false;
 
-       }
 
-       this.$refs["teacherForm"].validate((item) => {
 
-         if (item) {
 
-           let week = this.weekList;
 
-           if (this.teacherForm.isAdd != "onlyUpdateTeacher") {
 
-             if (
 
-               !week[0] ||
 
-               !week[0].startClassTime ||
 
-               !week[0].endClassTime ||
 
-               !week[0].dayOfWeek
 
-             ) {
 
-               this.$message.error("至少排一节课");
 
-               return;
 
-             }
 
-           }
 
-           // 这里代表排课成功  发请求  新增临时班
 
-           let classGroupName = this.className;
 
-           let classGroupTeacherMapperList = [
 
-             { userId: this.teacherForm.coreTeacher, teacherRole: "BISHOP" },
 
-           ];
 
-           for (let i in this.teacherForm.assistant) {
 
-             classGroupTeacherMapperList.push({
 
-               userId: this.teacherForm.assistant[i],
 
-               teacherRole: "TEACHING",
 
-             });
 
-           }
 
-           // let mixClassGroupId = this.teacherForm.mixClassGroupId;
 
-           let musicGroupId = this.teamid;
 
-           let startDate = this.teacherForm.courseTime;
 
-           let courseType = this.teacherForm.courseType;
 
-           let courseTimes = this.teacherForm.courseNum;
 
-           if (
 
-             courseTimes <= 0 &&
 
-             this.teacherForm.isAdd != "onlyUpdateTeacher"
 
-           ) {
 
-             this.$message.error("请至少排一节课");
 
-             return;
 
-           } else if (courseTimes > this.maxMun) {
 
-             this.$message.error(`一次最多排${this.maxMun}节课`);
 
-             return;
 
-           }
 
-           let students = this.activeListStudent.map((item) => {
 
-             return item.userId;
 
-           });
 
-           let holiday = this.teacherForm.checked;
 
-           let courseList = [];
 
-           for (let i in this.weekList) {
 
-             courseList.push(this.weekList[i]);
 
-           }
 
-           if (
 
-             courseList.length <= 0 &&
 
-             this.teacherForm.isAdd != "onlyUpdateTeacher"
 
-           ) {
 
-             this.$message.error("新增班级至少排一节课");
 
-             return;
 
-           }
 
-           if (this.teacherForm.isAdd == "onlyUpdateTeacher") {
 
-             startDate = null;
 
-             courseType = null;
 
-             students = null;
 
-             holiday = null;
 
-             courseTimes = null;
 
-             (courseList = null), (mineType = null);
 
-           }
 
-           //       mixClassGroupId,
 
-           let mineType = this.activeType;
 
-           let obj = {
 
-             classGroupName,
 
-             classGroupTeacherMapperList,
 
-             musicGroupId,
 
-             startDate,
 
-             courseType,
 
-             students,
 
-             holiday,
 
-             courseTimes,
 
-             courseTimeDtoList: courseList,
 
-             type: mineType,
 
-             courseAddType: this.teacherForm.isAdd,
 
-           };
 
-           if (type == 1) {
 
-             // 新增临时班级
 
-             console.log(obj, "submitTemporary");
 
-             return;
 
-             revisionClassGroup(obj).then((res) => {
 
-               if (res.code == 200) {
 
-                 // 提示修改成功
 
-                 this.$message.success("修改成功");
 
-                 this.infoVisible = false;
 
-                 this.studentVisible = false;
 
-                 this.getList();
 
-               }
 
-             });
 
-           } else if (type == 2) {
 
-             (obj.subjectId = this.teacherForm.sound),
 
-               (obj.expectStudentNum = this.teacherForm.expectStudentNum);
 
-             console.log(obj, "submitTemporary");
 
-             return;
 
-             let data = {};
 
-             // 新增声部班
 
-             revisionAddClassGroup(obj).then((res) => {
 
-               if (res.code == 200) {
 
-                 // 修改成功
 
-                 this.$message.success("修改成功");
 
-                 this.infoVisible = false;
 
-                 this.studentVisible = false;
 
-                 this.getList();
 
-               }
 
-             });
 
-           } else if (type == 3) {
 
-             // 乐团修改
 
-             obj.classGroupId = this.activeClass;
 
-             classGroupUpdate(obj).then((res) => {
 
-               if (res.code == 200) {
 
-                 this.$message.success("修改成功");
 
-                 this.infoVisible = false;
 
-                 this.getList();
 
-               }
 
-             });
 
-           }
 
-         } else {
 
-           this.$message.error("请填写必要信息");
 
-           return;
 
-         }
 
-       });
 
-     },
 
-     // 新建基础技能班
 
-     newClassHight() {
 
-       this.$refs["newClassForm"].validate((res) => {
 
-         if (res) {
 
-           let obj = {};
 
-           obj.musicGroupId = this.teamid;
 
-           obj.name = this.newClassForm.className;
 
-           obj.type = this.newClassForm.type;
 
-           obj.groupType = "MUSIC";
 
-           obj.expectStudentNum = this.newClassForm.expectStudentNum;
 
-           obj.teacherMapperList = [];
 
-           obj.teacherMapperList.push({
 
-             userId: this.newClassForm.bishop,
 
-             teacherRole: "BISHOP",
 
-           });
 
-           let subjectIdList;
 
-           if (this.newClassForm.type == "HIGH_ONLINE") {
 
-             subjectIdList = this.newClassForm.subjectId;
 
-             if (this.newClassForm.memo.length > 0) {
 
-               obj.memo = this.newClassForm.memo.join(",");
 
-             }
 
-           } else {
 
-             subjectIdList =
 
-               this.newClassForm.memo.length > 0
 
-                 ? this.newClassForm.memo.join(",")
 
-                 : null;
 
-             for (let i in this.newClassForm.teaching) {
 
-               obj.teacherMapperList.push({
 
-                 userId: this.newClassForm.teaching[i],
 
-                 teacherRole: "TEACHING",
 
-               });
 
-             }
 
-             obj.memo = subjectIdList;
 
-           }
 
-           obj.subjectIdList = subjectIdList;
 
-           createClass(obj).then((res) => {
 
-             if (res.code == 200) {
 
-               this.$message.success("创建成功");
 
-               this.getList();
 
-               this.resetClassFrom();
 
-               this.newClassVisible = false;
 
-             }
 
-           });
 
-         }
 
-       });
 
-     },
 
-     resetClassFrom() {
 
-       this.newClassForm = {
 
-         className: null,
 
-         type: null,
 
-         subjectIdList: [],
 
-         subjectId: "",
 
-         expectStudentNum: null,
 
-         bishop: null,
 
-         teaching: [],
 
-         memo: [],
 
-       };
 
-       this.changeMemo([]);
 
-     },
 
-     setAssistant1(val) {
 
-       if (val) {
 
-         for (let i in val) {
 
-           if (val[i] == this.newClassForm.bishop) {
 
-             val.splice(i, 1);
 
-           }
 
-         }
 
-       }
 
-     },
 
-     handleSelectionChange(val) {
 
-       if (val.length > 0) {
 
-         this.classGroupIds = val
 
-           .map((item) => {
 
-             return item.id;
 
-           })
 
-           .join(",");
 
-       } else {
 
-         this.classGroupIds = null;
 
-       }
 
-     },
 
-     chkstu(row, index) {
 
-       return (
 
-         (row.type == "HIGH_ONLINE" && row.totalClassTimes <= 0) ||
 
-         (row.type == "HIGH" && row.totalClassTimes <= 0)
 
-       );
 
-     },
 
-     startRegest() {
 
-       if (!this.classGroupIds) {
 
-         this.$message.error("请至少选择1个基础技能班");
 
-         return;
 
-       }
 
-       this.$confirm("是否开启报名?", "提示", {
 
-         confirmButtonText: "确定",
 
-         cancelButtonText: "取消",
 
-         type: "warning",
 
-       })
 
-         .then(() => {
 
-           pushMessage({
 
-             classGroupIds: this.classGroupIds,
 
-             musicGroupId: this.teamid,
 
-           }).then((res) => {
 
-             if (res.code == 200) {
 
-               this.$message.success(`开启成功,已推送${res.data}名学生`);
 
-               this.getList();
 
-             }
 
-           });
 
-         })
 
-         .catch(() => {});
 
-     },
 
-     toggleSelection(rows) {
 
-       if (rows) {
 
-         rows.forEach((row) => {
 
-           this.$refs.multipleTable.toggleRowSelection(row);
 
-         });
 
-       } else {
 
-         this.$refs.multipleTable.clearSelection();
 
-       }
 
-     },
 
-     chioseHightype(val) {
 
-       this.changeMemo([]);
 
-       if (val == "HIGH_ONLINE") {
 
-         this.newClassForm.teaching = [];
 
-       }
 
-       this.newClassForm.subjectId = "";
 
-       this.$set(this.newClassForm, "subjectIdList", []);
 
-       this.$set(this.newClassForm, "memo", []);
 
-     },
 
-     changeStartClassTime(item) {
 
-       // item.endClassTime = ''
 
-       this.$set(item, "endClassTime", "");
 
-     },
 
-     changeEndClassTime(item, val) {
 
-       this.$set(item, "endClassTime", val);
 
-     },
 
-     changeCourseType(val) {
 
-       console.log(val);
 
-       if (val) {
 
-         this.classTimeList.forEach((item) => {
 
-           if (item.value == val) {
 
-             this.courseTime = item.label;
 
-           }
 
-         });
 
-         // courseTime
 
-         this.weekList = [
 
-           {
 
-             week: "",
 
-             startTime: "",
 
-             endTime: "",
 
-             time: this.courseTime,
 
-             id: new Date().getTime(),
 
-           },
 
-         ];
 
-       } else {
 
-         this.courseTime = null;
 
-         this.weekList = [];
 
-       }
 
-       // if (val === 'HIGH_ONLINE' || val === 'HIGH' || val === 'MUSIC_NETWORK') {
 
-       //   this.step = '00:05'
 
-       // } else {
 
-       //   this.step = '00:15'
 
-       // }
 
-     },
 
-     changeStartTimes(val, item) {
 
-       if (val && item.time) {
 
-         let str = dayjs(new Date()).format("YYYY-MM-DD");
 
-         this.$set(
 
-           item,
 
-           "endClassTime",
 
-           addTimerFormMinute(str, val, item.time)
 
-         );
 
-       } else {
 
-         this.$set(item, "endClassTime", "");
 
-         this.$message.error("请先设置课程时间");
 
-       }
 
-       if (!item.endClassTime) {
 
-         this.$set(item, "startClassTime", "");
 
-       }
 
-     },
 
-     setItem(item, index) {
 
-       // console.log(item, index)
 
-       this.weekList[index].startClassTime = "";
 
-       this.weekList[index].endClassTime = "";
 
-       console.log();
 
-     },
 
-     closeStudentReset() {
 
-       this.studentResetVisiable = false;
 
-     },
 
-     changeMemo(val) {
 
-       // 声部id
 
-       // let flag = false;
 
-       // if (val.length < 1) {
 
-       //   this.soundList.forEach((sound) => {
 
-       //     sound.disabled = false;
 
-       //     this.appoint = false;
 
-       //   });
 
-       // } else {
 
-       //   this.soundList.forEach((sound) => {
 
-       //     if (sound.id == val[0]) {
 
-       //       if (
 
-       //         sound.name.indexOf("上低音号") > -1 ||
 
-       //         sound.name.indexOf("长号") > -1
 
-       //       ) {
 
-       //         // 要么选中长号  要么选中上低音号
 
-       //         sound.disabled = false;
 
-       //         flag = true;
 
-       //       } else {
 
-       //         sound.disabled = true;
 
-       //         this.appoint = true;
 
-       //       }
 
-       //     }
 
-       //   });
 
-       //   if (flag) {
 
-       //     this.soundList.forEach((sound) => {
 
-       //       if (
 
-       //         sound.name.indexOf("上低音号") > -1 ||
 
-       //         sound.name.indexOf("长号") > -1
 
-       //       ) {
 
-       //         // 要么选中长号  要么选中上低音号
 
-       //         sound.disabled = false;
 
-       //       } else {
 
-       //         sound.disabled = true;
 
-       //       }
 
-       //     });
 
-       //   }
 
-       // }
 
-     },
 
-   },
 
-   watch: {
 
-     "newClassForm.type"() {
 
-       if (this.newClassForm.type === "HIGH_ONLINE") {
 
-         this.$set(this.newClassForm, "expectStudentNum", 6);
 
-       }
 
-     },
 
-     infoVisible(val) {
 
-       if (!val) {
 
-         this.teacherForm = {
 
-           isAdd: null,
 
-           coreTeacher: "",
 
-           assistant: [],
 
-           courseType: "",
 
-           courseTime: "",
 
-           checked: true,
 
-           courseNum: "",
 
-           mixClassGroupId: "",
 
-           sound: "",
 
-           expectStudentNum: "",
 
-         };
 
-         this.infoDetail = null;
 
-         // this.$refs["teacherForm"].resetFields();
 
-         this.weekList = [];
 
-       }
 
-     },
 
-     newClassVisible(val) {
 
-       if (!val) {
 
-         this.newClassForm = {
 
-           className: null,
 
-           type: null,
 
-           subjectIdList: [],
 
-           expectStudentNum: null,
 
-           bishop: null,
 
-           teaching: null,
 
-           memo: [],
 
-         };
 
-         this.resetClassFrom();
 
-       }
 
-     },
 
-   },
 
- };
 
- </script>
 
- <style lang="scss" scoped>
 
- .dialog-footer.question {
 
-   display: flex;
 
-   flex-direction: row;
 
-   justify-content: space-between;
 
- }
 
- .topWrap {
 
-   display: flex;
 
-   flex-direction: row;
 
-   justify-content: space-between;
 
- }
 
- .floor {
 
-   padding-right: 20px;
 
-   display: flex;
 
-   flex-direction: row;
 
-   justify-content: space-between;
 
-   width: 100%;
 
-   height: 48px;
 
-   line-height: 48px;
 
-   background: rgba(237, 238, 240, 1);
 
-   font-size: 14px;
 
-   color: #444;
 
-   align-items: center;
 
-   position: relative;
 
-   z-index: 1;
 
-   .right {
 
-     display: flex;
 
-     flex-direction: row;
 
-     justify-content: flex-start;
 
-     .remove {
 
-       width: 98px;
 
-       height: 32px;
 
-       background: rgba(248, 80, 67, 1);
 
-       border-radius: 3px;
 
-       color: #fff;
 
-       line-height: 32px;
 
-       text-align: center;
 
-       margin-left: 164px;
 
-       cursor: pointer;
 
-     }
 
-   }
 
-   .add {
 
-     width: auto;
 
-     padding: 0 10px;
 
-     height: 32px;
 
-     background: rgba(20, 146, 138, 1);
 
-     border-radius: 3px;
 
-     color: #fff;
 
-     line-height: 32px;
 
-     text-align: center;
 
-     margin-left: 20px;
 
-     cursor: pointer;
 
-   }
 
- }
 
- .studentMask {
 
-   display: flex;
 
-   flex-direction: row;
 
-   justify-content: flex-start;
 
-   .left {
 
-     width: 200px;
 
-     margin-right: 20px;
 
-     .wrap {
 
-       margin-bottom: 20px;
 
-     }
 
-     h4 {
 
-       font-size: 16px;
 
-       color: #444;
 
-       line-height: 38px;
 
-     }
 
-     .chioseStudentList {
 
-       height: 500px;
 
-       overflow-y: auto;
 
-       border: 1px solid #ccc;
 
-       .studentItem {
 
-         padding-left: 10px;
 
-         line-height: 25px;
 
-       }
 
-     }
 
-   }
 
-   .right {
 
-     width: calc(100% - 200px);
 
-     .tableList {
 
-       max-height: 500px;
 
-       overflow-y: auto;
 
-     }
 
-   }
 
- }
 
- .resetClassForm {
 
-   /deep/.el-date-editor.el-input,
 
-   /deep/.el-date-editor.el-input__inner {
 
-     width: 180px !important;
 
-   }
 
- }
 
- // /deep/.el-date-editor.el-input,
 
- // /deep/.el-date-editor.el-input__inner {
 
- //   width: 100px !important;
 
- // }
 
- .higheSelect {
 
-   /deep/.el-input__inner {
 
-     height: 40px !important;
 
-   }
 
- }
 
- /deep/ .el-alert__content {
 
-   display: block;
 
-   width: 100%;
 
- }
 
- .alert-content {
 
-   display: flex;
 
-   justify-content: space-between;
 
-   > strong {
 
-     cursor: pointer;
 
-   }
 
- }
 
- </style>
 
 
  |