teamCourseList.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <div class="squrt"></div>
  5. 课表列表
  6. <filter-search
  7. ref="filterSearch"
  8. @reload="reloadSearch"
  9. @setTimeForSearch="setTimeForSearch"
  10. :keys="['searchType']"
  11. :moreKeys="['start', 'end', 'organId']"
  12. />
  13. </h2>
  14. <div class="m-core">
  15. <!-- 搜索类型 -->
  16. <save-form
  17. :inline="true"
  18. class="searchForm"
  19. @submit="search"
  20. @reset="reset"
  21. ref="searchForm"
  22. :model.sync="searchForm"
  23. >
  24. <el-form-item>
  25. <el-input
  26. type="number"
  27. v-model.trim="searchForm.courseIdSearch"
  28. clearable
  29. placeholder="课程编号"
  30. />
  31. </el-form-item>
  32. <!-- <el-form-item>
  33. <el-input
  34. v-model.trim="searchForm.search"
  35. clearable
  36. placeholder="课程组编号/课程名称"
  37. />
  38. </el-form-item>
  39. <el-form-item>
  40. <el-select
  41. v-model.trim="searchForm.schoolId"
  42. clearable
  43. filterable
  44. placeholder="请选择教学点"
  45. >
  46. <el-option
  47. v-for="(item, index) in selects.schools"
  48. :key="index"
  49. :value="item.id"
  50. :label="item.name"
  51. ></el-option>
  52. </el-select>
  53. </el-form-item> -->
  54. <el-form-item>
  55. <remote-search
  56. :commit="'setTeachers'"
  57. v-model="searchForm.teacherIdList"
  58. />
  59. </el-form-item>
  60. <!-- <el-form-item>
  61. <el-select
  62. class="multiple"
  63. v-model.trim="searchForm.organIdList"
  64. filterable
  65. clearable
  66. placeholder="请选择分部"
  67. >
  68. <el-option
  69. v-for="(item, index) in selects.branchs"
  70. :key="index"
  71. :label="item.name"
  72. :value="item.id"
  73. ></el-option>
  74. </el-select>
  75. </el-form-item>
  76. <el-form-item>
  77. <el-select
  78. v-model.trim="searchForm.groupType"
  79. clearable
  80. filterable
  81. placeholder="课程组类型"
  82. >
  83. <el-option
  84. v-for="item in courseListType"
  85. :key="item.value"
  86. :value="item.value"
  87. :label="item.label"
  88. ></el-option>
  89. </el-select>
  90. </el-form-item> -->
  91. <el-form-item>
  92. <el-select
  93. v-model.trim="searchForm.courseType"
  94. clearable
  95. filterable
  96. placeholder="课程类型"
  97. >
  98. <el-option
  99. v-for="(item, index) in courseType"
  100. :key="index"
  101. :value="item.value"
  102. :label="item.label"
  103. ></el-option>
  104. </el-select>
  105. </el-form-item>
  106. <!-- <el-form-item>
  107. <el-select
  108. v-model.trim="searchForm.teachMode"
  109. clearable
  110. filterable
  111. placeholder="教学模式"
  112. >
  113. <el-option label="线上课" value="ONLINE"></el-option>
  114. <el-option label="线下课" value="OFFLINE"></el-option>
  115. </el-select>
  116. </el-form-item> -->
  117. <el-form-item>
  118. <el-select
  119. v-model.trim="searchForm.courseStatus"
  120. clearable
  121. filterable
  122. placeholder="课程状态"
  123. >
  124. <el-option label="未开始" value="NOT_START"></el-option>
  125. <el-option label="进行中" value="UNDERWAY"></el-option>
  126. <el-option label="已结束" value="OVER"></el-option>
  127. </el-select>
  128. </el-form-item>
  129. <!-- <el-form-item>
  130. <el-select
  131. v-model.trim="searchForm.mergeCourseType"
  132. clearable
  133. filterable
  134. placeholder="合并课程类型"
  135. >
  136. <el-option
  137. v-for="(item, index) in mergeCourseTypeOptions"
  138. :key="index"
  139. :value="item.value"
  140. :label="item.label"
  141. ></el-option>
  142. </el-select>
  143. </el-form-item>
  144. <el-form-item>
  145. <el-select
  146. v-model.trim="searchForm.teachType"
  147. clearable
  148. filterable
  149. placeholder="老师类型"
  150. >
  151. <el-option
  152. v-for="item in workTypeOptions"
  153. :key="item.label"
  154. :label="item.label"
  155. :value="item.value"
  156. ></el-option>
  157. </el-select>
  158. </el-form-item>
  159. <el-form-item>
  160. <el-select
  161. v-model.trim="searchForm.isCallNames"
  162. clearable
  163. filterable
  164. placeholder="是否点名"
  165. >
  166. <el-option label="是" value="1"></el-option>
  167. <el-option label="否" value="0"></el-option>
  168. </el-select>
  169. </el-form-item> -->
  170. <el-form-item>
  171. <el-date-picker
  172. v-model.trim="searchForm.timer"
  173. type="daterange"
  174. value-format="yyyy-MM-dd"
  175. range-separator="-"
  176. start-placeholder="上课开始日期"
  177. end-placeholder="上课结束日期"
  178. :picker-options="{
  179. firstDayOfWeek: 1,
  180. }"
  181. ></el-date-picker>
  182. </el-form-item>
  183. <el-form-item>
  184. <el-button
  185. :type="isSearch ? 'primary' : 'info'"
  186. icon="el-icon-circle-plus-outline"
  187. @click="showMove = true"
  188. >更多选项</el-button
  189. >
  190. </el-form-item>
  191. <el-form-item>
  192. <el-button native-type="submit" type="primary">搜索</el-button>
  193. <el-button native-type="reset" type="danger">重置</el-button>
  194. <el-button
  195. v-permission="'export/superFindCourseSchedules'"
  196. @click="onCourseExport"
  197. type="primary"
  198. >导出课表</el-button
  199. >
  200. </el-form-item>
  201. </save-form>
  202. <!-- 列表 -->
  203. <div class="tableWrap">
  204. <el-table
  205. :data="tableList"
  206. ref="tableList"
  207. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  208. @selection-change="handleSelectionChange"
  209. @select="onTableSelect"
  210. row-key="id"
  211. >
  212. >
  213. <el-table-column type="selection" width="55"></el-table-column>
  214. <el-table-column
  215. align="center"
  216. prop="organName"
  217. label="分部名称"
  218. ></el-table-column>
  219. <el-table-column
  220. align="center"
  221. width="170px"
  222. prop="musicGroupId"
  223. label="乐团/课程组编号"
  224. >
  225. <template slot-scope="scope">
  226. <el-button type="text" @click="gotoCourse(scope.row)">
  227. <copy-text>{{ scope.row.musicGroupId }}</copy-text>
  228. </el-button>
  229. </template>
  230. </el-table-column>
  231. <el-table-column
  232. align="center"
  233. prop="id"
  234. width="100px"
  235. label="课程编号"
  236. >
  237. <template slot-scope="scope">
  238. <copy-text>{{ scope.row.id }}</copy-text>
  239. </template>
  240. </el-table-column>
  241. <el-table-column align="center" width="200px" label="上课时间">
  242. <template slot-scope="scope"
  243. >{{
  244. scope.row.startClassTime
  245. ? scope.row.startClassTime.substr(0, 16)
  246. : ""
  247. }}-{{
  248. scope.row.endClassTime
  249. ? scope.row.endClassTime.substr(11, 5)
  250. : ""
  251. }}</template
  252. >
  253. </el-table-column>
  254. <el-table-column
  255. align="center"
  256. prop="subjectName"
  257. label="声部"
  258. ></el-table-column>
  259. <el-table-column prop="name" width="150px" label="课程名称">
  260. <template slot-scope="scope">
  261. <copy-text>{{ scope.row.name }}</copy-text>
  262. </template>
  263. </el-table-column>
  264. <el-table-column align="center" width="150px" label="课程类型">
  265. <template slot-scope="scope">
  266. <div>{{ scope.row.type | coursesType }}</div>
  267. </template>
  268. </el-table-column>
  269. <el-table-column align="center" label="教学模式">
  270. <template slot-scope="scope">
  271. <div>{{ scope.row.teachMode | teachMode }}</div>
  272. </template>
  273. </el-table-column>
  274. <el-table-column
  275. align="center"
  276. prop="teacherName"
  277. width="110"
  278. label="主教老师"
  279. ></el-table-column>
  280. <el-table-column align="center" prop="schoolName" label="教学点">
  281. <template slot-scope="scope">
  282. <div>
  283. {{ scope.row.schoolName ? scope.row.schoolName : "网络教室" }}
  284. </div>
  285. </template>
  286. </el-table-column>
  287. <el-table-column
  288. align="center"
  289. prop="courseScheduleStatus"
  290. label="课程状态"
  291. >
  292. <template slot-scope="scope">
  293. <div>{{ scope.row.status | coursesStatus }}</div>
  294. </template>
  295. </el-table-column>
  296. <el-table-column align="center" label="考勤申诉">
  297. <template slot-scope="scope">
  298. <div>{{ scope.row.isComplaints == 1 ? "是" : "否" }}</div>
  299. </template>
  300. </el-table-column>
  301. <el-table-column align="center" prop="isLock" label="是否冻结">
  302. <template slot-scope="scope">{{
  303. scope.row.isLock ? "是" : "否"
  304. }}</template>
  305. </el-table-column>
  306. <el-table-column
  307. align="center"
  308. prop="newCourseId"
  309. label="合并类型"
  310. width="130px"
  311. >
  312. <template slot-scope="scope">
  313. <div>
  314. <span
  315. v-if="
  316. scope.row.newCourseId > 0 &&
  317. scope.row.newCourseId == scope.row.id
  318. "
  319. >合并课
  320. </span>
  321. <el-button
  322. type="text"
  323. @click="common(scope.row)"
  324. v-if="
  325. scope.row.newCourseId > 0 &&
  326. scope.row.newCourseId != scope.row.id
  327. "
  328. >
  329. 被合并课
  330. </el-button>
  331. </div>
  332. </template>
  333. </el-table-column>
  334. <el-table-column align="center" prop="isCallNames" label="云教练课程">
  335. <template slot-scope="scope">{{
  336. scope.row.memberFlag ? "是" : "否"
  337. }}</template>
  338. </el-table-column>
  339. <el-table-column
  340. align="center"
  341. prop="isCallNames"
  342. label="是否点名"
  343. fixed="right"
  344. >
  345. <template slot-scope="scope">{{
  346. scope.row.isCallNames ? "是" : "否"
  347. }}</template>
  348. </el-table-column>
  349. <el-table-column
  350. align="center"
  351. label="详情"
  352. fixed="right"
  353. width="220px"
  354. >
  355. <template slot-scope="scope">
  356. <div>
  357. <!-- <el-button
  358. type="text"
  359. @click="removeCourse(scope.row)"
  360. v-permission="
  361. 'courseSchedule/batchDelete?page=teamCourseList'
  362. "
  363. >删除</el-button
  364. > -->
  365. <auth auths="/teamCourseListDetail">
  366. <!-- v-if="permission('teamCourseList/details')" -->
  367. <el-button type="text" @click="lookDetail(scope.row)"
  368. >详情</el-button
  369. >
  370. </auth>
  371. <el-button
  372. type="text"
  373. v-if="
  374. permission('courseSchedule/classStartDateAdjust?hight') &&
  375. (!scope.row.isLock || scope.row.newCourseId > 0)
  376. "
  377. @click="resetClass(scope.row)"
  378. >调整</el-button
  379. >
  380. <!-- <el-button
  381. type="text"
  382. @click="addCompound(scope.row)"
  383. v-if="
  384. scope.row.groupType == 'MUSIC' &&
  385. scope.row.type != 'MUSIC_NETWORK' &&
  386. scope.row.type != 'HIGH_ONLINE' &&
  387. scope.row.status == 'NOT_START' &&
  388. !isAddCom(scope.row) &&
  389. permission('courseSchedule/courseMerge') &&
  390. scope.row.newCourseId <= 0 &&
  391. !scope.row.beMerged &&
  392. !scope.row.isLock // 李焕辜临轩要求冻结课程不能合并
  393. "
  394. >添加合课</el-button
  395. >
  396. <el-button
  397. type="text"
  398. v-if="
  399. isAddCom(scope.row) &&
  400. permission('courseSchedule/courseMerge')
  401. "
  402. @click="cancleCompound(scope.row)"
  403. >取消合课</el-button
  404. > -->
  405. <el-button
  406. type="text"
  407. v-if="
  408. scope.row.newCourseId == scope.row.id &&
  409. permission('courseSchedule/mergeCourseSplit') &&
  410. scope.row.status != 'OVER'
  411. "
  412. @click="resetCompound(scope.row)"
  413. >取消合并</el-button
  414. >
  415. <el-button
  416. type="text"
  417. v-if="
  418. scope.row.status == 'OVER' &&
  419. !scope.row.isSettlement &&
  420. permission('courseSchedule/cleanAttendance')
  421. "
  422. @click="clearAttend(scope.row)"
  423. >清除考勤</el-button
  424. >
  425. </div>
  426. </template>
  427. </el-table-column>
  428. </el-table>
  429. <pagination
  430. :total.sync="rules.total"
  431. :page.sync="rules.page"
  432. :limit.sync="rules.limit"
  433. :page-sizes="rules.page_size"
  434. @pagination="getList"
  435. sync
  436. />
  437. </div>
  438. </div>
  439. <el-dialog title="课表详情" :visible.sync="classVisible" width="1000px">
  440. <el-form :model="maskForm" :inline="true">
  441. <el-form-item label="老师姓名">
  442. <!-- <el-input v-model.trim="maskForm.teacherName"
  443. disabled></el-input>-->
  444. <div class="inputStyle">{{ maskForm.teacherName }}</div>
  445. </el-form-item>
  446. <el-form-item label="课程模式">
  447. <!-- <el-input :value="maskForm.teachMode | teachMode"
  448. disabled></el-input>-->
  449. <div class="inputStyle">{{ maskForm.teachMode | teachMode }}</div>
  450. <!-- <span>{{maskForm.teachMode }}</span> -->
  451. </el-form-item>
  452. <el-form-item label="课程类型">
  453. <!-- <el-input :value="maskForm.type |classType"
  454. disabled></el-input>-->
  455. <div class="inputStyle">{{ maskForm.type | coursesType }}</div>
  456. </el-form-item>
  457. <!-- courseScheduleStatus -->
  458. <el-form-item label="课程状态">
  459. <!-- <el-input :value="maskForm.type |classType"
  460. disabled></el-input>-->
  461. <div class="inputStyle">{{ maskForm.status | coursesStatus }}</div>
  462. </el-form-item>
  463. <!-- <el-form-item label="签到时间">
  464. <div class="inputStyle">{{maskForm.signInTime | dateForMinFormat}}</div>
  465. </el-form-item>
  466. <el-form-item label="签退时间">
  467. <div class="inputStyle">{{maskForm.signOutTime | dateForMinFormat}}</div>
  468. </el-form-item> -->
  469. <el-form-item label="是否点名">
  470. <!-- <el-input :value="maskForm.isCallNames | isCall"
  471. disabled></el-input>-->
  472. <div class="inputStyle">{{ maskForm.isCallNames | isCall }}</div>
  473. </el-form-item>
  474. <!-- <el-form-item label="签到状态">
  475. <div class="inputStyle"
  476. :class="maskForm.isSignIn==1?'':'red'">{{ maskForm.isSignIn | attendanceType}}</div>
  477. </el-form-item>
  478. <el-form-item label="签退状态">
  479. <div class="inputStyle"
  480. :class="maskForm.isSignIn==1?'':'red'">{{ maskForm.isSignOut | attendanceOutType}}</div>
  481. </el-form-item> -->
  482. <el-form-item label="上课时间">
  483. {{
  484. maskForm.startClassTime
  485. ? maskForm.startClassTime.substr(0, 16)
  486. : ""
  487. }}-{{
  488. maskForm.endClassTime ? maskForm.endClassTime.substr(11, 5) : ""
  489. }}
  490. </el-form-item>
  491. <el-form-item label="上课时长">
  492. <div
  493. class="inputStyle"
  494. :class="maskForm.attendClassTime <= 120 ? '' : 'red'"
  495. >
  496. {{
  497. maskForm.attendClassTime >= 0 ? maskForm.attendClassTime : 0
  498. }}分钟
  499. <el-tooltip placement="top" popper-class="mTooltip">
  500. <div slot="content">学员和老师同时在教室里的时长。</div>
  501. <!-- <img :src="imageIcon" class="micon el-tooltip" style="width:8px height:8px" alt /> -->
  502. <i
  503. class="el-icon-question micon el-tooltip"
  504. style="font-size: 18px; color: #f56c6c"
  505. v-permission="'export/teacherSalary'"
  506. ></i>
  507. </el-tooltip>
  508. </div>
  509. </el-form-item>
  510. <el-form-item label="学员考勤" v-if="maskForm.status != 'NOT_START'">
  511. <div
  512. class="inputStyle"
  513. :class="maskForm.errorAttendanceNum != 0 ? 'red' : 'green'"
  514. >
  515. {{ maskForm.errorAttendanceNum != 0 ? "异常" : "正常" }}
  516. </div>
  517. </el-form-item>
  518. <el-form-item label="老师考勤" v-if="maskForm.status != 'NOT_START'">
  519. <div
  520. class="inputStyle"
  521. :class="
  522. maskForm.signInStatusEnum == 1 && maskForm.signOutStatusEnum == 1
  523. ? 'green'
  524. : 'red'
  525. "
  526. >
  527. {{
  528. maskForm.signInStatusEnum == 1 && maskForm.signOutStatusEnum == 1
  529. ? "正常"
  530. : "异常"
  531. }}
  532. </div>
  533. </el-form-item>
  534. <el-form-item v-if="maskForm.school" label="教学点">
  535. {{ maskForm.school.name }}
  536. <el-tooltip content="查看教学点" :open-delay="0.5">
  537. <i
  538. @click="openLocation(maskForm.school)"
  539. class="el-icon-map-location"
  540. style="cursor: pointer"
  541. ></i>
  542. </el-tooltip>
  543. </el-form-item>
  544. </el-form>
  545. <!-- v-if="maskForm.status != 'NOT_START'" -->
  546. <el-tabs v-model.trim="activeName" type="card" @tab-click="handleClick">
  547. <el-tab-pane
  548. label="学员列表"
  549. name="first"
  550. v-if="permission('/teamCourseListDetailStudnetList')"
  551. >
  552. <div v-if="activeName == 'first'">
  553. <!-- studentRollCall -->
  554. <studentRollCall
  555. :courseScheduleId="maskForm.id"
  556. :isMainGo="isMainGo"
  557. ></studentRollCall>
  558. </div>
  559. </el-tab-pane>
  560. <!-- <el-tab-pane label="GPS定位"
  561. v-if="maskForm.teachMode == 'OFFLINE'"
  562. name="second">
  563. <div v-if="activeName == 'second'">
  564. <gpsLoction :courseScheduleId="maskForm.id"></gpsLoction>
  565. </div>
  566. </el-tab-pane> -->
  567. <el-tab-pane
  568. label="老师列表"
  569. name="second"
  570. v-if="permission('/teamCourseListDetailTeacherList')"
  571. >
  572. <div v-if="activeName == 'second'">
  573. <teacherList
  574. :courseScheduleId="maskForm.id"
  575. :teachMode="maskForm.teachMode"
  576. :courseStatus="maskForm.status"
  577. @syncTeacherAttend="syncTeacherAttend"
  578. ></teacherList>
  579. </div>
  580. </el-tab-pane>
  581. <!-- v-if="maskForm.teachMode != 'OFFLINE'" -->
  582. <el-tab-pane
  583. label="训练"
  584. name="third"
  585. v-if="permission('/teamCourseListDetailWorkList')"
  586. >
  587. <div v-if="activeName == 'third'">
  588. <studentWork :courseScheduleId="maskForm.id"></studentWork>
  589. </div>
  590. </el-tab-pane>
  591. <!-- v-if="maskForm.type == 'VIP' || maskForm.type == 'PRACTICE'" -->
  592. <el-tab-pane
  593. label="评论"
  594. name="four"
  595. v-if="permission('/teamCourseListDetailCommentList')"
  596. >
  597. <div v-if="activeName == 'four'">
  598. <courseEvaluate :courseScheduleId="maskForm.id"></courseEvaluate>
  599. </div>
  600. </el-tab-pane>
  601. <el-tab-pane
  602. label="调整记录"
  603. v-if="permission('/teamCourseListDetailAdjust')"
  604. name="five"
  605. >
  606. <div v-if="activeName == 'five'">
  607. <infoMsg :courseScheduleId="maskForm.id"></infoMsg>
  608. </div>
  609. </el-tab-pane>
  610. <!-- infoMsg -->
  611. </el-tabs>
  612. </el-dialog>
  613. <el-dialog :visible.sync="show" width="400px" title="课程调整">
  614. <resetClass
  615. :show="show"
  616. v-if="show"
  617. @closeReset="closeReset"
  618. @getList="getList"
  619. :id="id"
  620. />
  621. </el-dialog>
  622. <el-dialog title="查看教学点" :visible.sync="locationVisible">
  623. <school-location
  624. v-if="maskForm.school"
  625. :longitudeLatitude="maskForm.school.longitudeLatitude"
  626. :address="maskForm.school.address"
  627. />
  628. </el-dialog>
  629. <el-dialog
  630. title="更多选项"
  631. :visible.sync="showMove"
  632. v-if="showMove"
  633. width="700px"
  634. >
  635. <el-form
  636. :inline="true"
  637. class="searchForm"
  638. @submit="search"
  639. @reset="reset"
  640. ref="searchForm2"
  641. :model.sync="searchForm"
  642. label-width="120px"
  643. >
  644. <el-form-item label="课程组编号/名称" prop="search">
  645. <el-input
  646. style="width: 180px"
  647. v-model.trim="searchForm.search"
  648. clearable
  649. placeholder="课程组编号/课程名称"
  650. />
  651. </el-form-item>
  652. <el-form-item label="教学点" prop="schoolId">
  653. <el-select
  654. style="width: 180px"
  655. v-model.trim="searchForm.schoolId"
  656. clearable
  657. filterable
  658. placeholder="请选择教学点"
  659. >
  660. <el-option
  661. v-for="(item, index) in selects.schools"
  662. :key="index"
  663. :value="item.id"
  664. :label="item.name"
  665. ></el-option>
  666. </el-select>
  667. </el-form-item>
  668. <el-form-item label="分部" prop="organIdList">
  669. <el-select
  670. style="width: 180px"
  671. class="multiple"
  672. v-model.trim="searchForm.organIdList"
  673. filterable
  674. clearable
  675. placeholder="请选择分部"
  676. >
  677. <el-option
  678. v-for="(item, index) in selects.branchs"
  679. :key="index"
  680. :label="item.name"
  681. :value="item.id"
  682. ></el-option>
  683. </el-select>
  684. </el-form-item>
  685. <el-form-item label="课程组类型" prop="groupType">
  686. <el-select
  687. style="width: 180px"
  688. v-model.trim="searchForm.groupType"
  689. clearable
  690. filterable
  691. placeholder="课程组类型"
  692. >
  693. <el-option
  694. v-for="item in courseListType"
  695. :key="item.value"
  696. :value="item.value"
  697. :label="item.label"
  698. ></el-option>
  699. </el-select>
  700. </el-form-item>
  701. <el-form-item label="教学模式" prop="teachMode">
  702. <el-select
  703. style="width: 180px"
  704. v-model.trim="searchForm.teachMode"
  705. clearable
  706. filterable
  707. placeholder="教学模式"
  708. >
  709. <el-option label="线上课" value="ONLINE"></el-option>
  710. <el-option label="线下课" value="OFFLINE"></el-option>
  711. </el-select>
  712. </el-form-item>
  713. <!-- <el-form-item label="课程状态" prop="courseStatus">
  714. <el-select
  715. style="width:180px"
  716. v-model.trim="searchForm.courseStatus"
  717. clearable
  718. filterable
  719. placeholder="课程状态"
  720. >
  721. <el-option label="未开始" value="NOT_START"></el-option>
  722. <el-option label="进行中" value="UNDERWAY"></el-option>
  723. <el-option label="已结束" value="OVER"></el-option>
  724. </el-select>
  725. </el-form-item> -->
  726. <el-form-item label="合并课类型" prop="mergeCourseType">
  727. <el-select
  728. style="width: 180px"
  729. v-model.trim="searchForm.mergeCourseType"
  730. clearable
  731. filterable
  732. placeholder="合并课程类型"
  733. >
  734. <el-option
  735. v-for="(item, index) in mergeCourseTypeOptions"
  736. :key="index"
  737. :value="item.value"
  738. :label="item.label"
  739. ></el-option>
  740. </el-select>
  741. </el-form-item>
  742. <el-form-item label="老师类型" prop="teachType">
  743. <el-select
  744. style="width: 180px"
  745. v-model.trim="searchForm.teachType"
  746. clearable
  747. filterable
  748. placeholder="老师类型"
  749. >
  750. <el-option
  751. v-for="item in workTypeOptions"
  752. :key="item.label"
  753. :label="item.label"
  754. :value="item.value"
  755. ></el-option>
  756. </el-select>
  757. </el-form-item>
  758. <el-form-item label="是否点名" prop="isCallNames">
  759. <el-select
  760. style="width: 180px"
  761. v-model.trim="searchForm.isCallNames"
  762. clearable
  763. filterable
  764. placeholder="是否点名"
  765. >
  766. <el-option label="是" value="1"></el-option>
  767. <el-option label="否" value="0"></el-option>
  768. </el-select>
  769. </el-form-item>
  770. <el-form-item label="云教练课程" prop="memberFlag">
  771. <el-select
  772. style="width: 180px"
  773. v-model.trim="searchForm.memberFlag"
  774. clearable
  775. filterable
  776. placeholder="云教练课程"
  777. >
  778. <el-option label="是" value="1"></el-option>
  779. <el-option label="否" value="0"></el-option>
  780. </el-select>
  781. </el-form-item>
  782. <el-form-item label="创建日期" prop="creatTimer">
  783. <el-date-picker
  784. v-model.trim="searchForm.creatTimer"
  785. type="daterange"
  786. value-format="yyyy-MM-dd"
  787. range-separator="-"
  788. start-placeholder="创建开始日期"
  789. end-placeholder="创建结束日期"
  790. :picker-options="{
  791. firstDayOfWeek: 1,
  792. }"
  793. ></el-date-picker>
  794. </el-form-item>
  795. <el-form-item label="课程时间" prop="courseTime">
  796. <el-time-picker
  797. is-range
  798. :picker-options="{
  799. selectableRange: '04:00:00 - 23:59:59',
  800. }"
  801. style="width: 350px !important"
  802. v-model="searchForm.courseTime"
  803. range-separator="-"
  804. start-placeholder="上课开始时间"
  805. end-placeholder="上课结束时间"
  806. placeholder="选择时间范围"
  807. value-format="HH:mm:ss"
  808. format="HH:mm"
  809. @change="changeCourseTime"
  810. >
  811. </el-time-picker>
  812. </el-form-item>
  813. </el-form>
  814. <span slot="footer" class="dialog-footer">
  815. <el-button @click="cancleMore">取 消</el-button>
  816. <el-button type="primary" @click="okMore">确 定</el-button>
  817. </span>
  818. </el-dialog>
  819. <!-- showMove -->
  820. <addCompound
  821. ref="addCompound"
  822. :compoundList="deleteList"
  823. v-if="permission('courseSchedule/courseMerge')"
  824. v-show="deleteList.length > 0"
  825. @clearCom="clearCom"
  826. @getList="getList"
  827. @removeCourse="removeCourse"
  828. @cancleCompound="cancleCompound"
  829. />
  830. </div>
  831. </template>
  832. <script>
  833. import pagination from "@/components/Pagination/index";
  834. import {
  835. superFindCourseSchedules,
  836. cleanAttendance,
  837. cancelCourseMerge,
  838. } from "@/api/buildTeam";
  839. import { bathDelete } from "@/api/vipSeting";
  840. import { workType, mergeCourseType } from "@/constant";
  841. import { objectToOptions, getTimes } from "@/utils";
  842. import { getTeacherPersonalAttendanceDetail } from "@/api/teacherManager";
  843. import { getSchool } from "@/api/systemManage";
  844. import { courseType, courseListType } from "@/utils/searchArray";
  845. import studentRollCall from "./componentCourse/studentRollCall";
  846. import gpsLoction from "./componentCourse/gpsLocation";
  847. import studentWork from "./componentCourse/studentWork";
  848. import courseEvaluate from "./componentCourse/courseEvaluate";
  849. import { permission } from "@/utils/directivePage";
  850. import axios from "axios";
  851. import { getToken } from "@/utils/auth";
  852. import load from "@/utils/loading";
  853. import SchoolLocation from "./components/modals/school-location";
  854. import resetClass from "./componentCourse/resetClass";
  855. import teacherList from "./componentCourse/teacherList";
  856. import addCompound from "./componentCourse/addCompound";
  857. import infoMsg from "./componentCourse/infoMsg";
  858. import cleanDeep from 'clean-deep'
  859. let nowTime = new Date();
  860. nowTime =
  861. nowTime.getFullYear() +
  862. "-" +
  863. (nowTime.getMonth() + 1) +
  864. "-" +
  865. nowTime.getDate();
  866. const initSearch = {
  867. teachMode: null, // 教学模式
  868. organIdList: null,
  869. courseStatus: null,
  870. courseType: null,
  871. timer: [], // 时间
  872. class: null,
  873. teachType: null,
  874. mergeCourseType: null,
  875. isCallNames: null, // 是否点名
  876. search: null, // 乐团名称 编号 vip课名称
  877. teacherIdList: null, // 老师编号
  878. schoolId: null, // 教学点编号
  879. creatTimer: [],
  880. courseIdSearch: null,
  881. memberFlag: null,
  882. courseTime: ["", ""],
  883. };
  884. export default {
  885. name: "teamCourseList",
  886. data() {
  887. return {
  888. classVisible: false,
  889. timerVisible: false,
  890. courseVisible: false,
  891. locationVisible: false,
  892. courseType: courseType,
  893. mergeCourseType,
  894. courseListType: courseListType,
  895. searchForm: { ...initSearch },
  896. tableList: [],
  897. searchLsit: [],
  898. organList: [],
  899. rules: {
  900. // 分页规则
  901. limit: 10, // 限制显示条数
  902. page: 1, // 当前页
  903. total: 0, // 总条数
  904. page_size: [10, 20, 40, 50], // 选择限制显示条数
  905. },
  906. teacherList: [],
  907. schoolList: [],
  908. maskForm: {},
  909. activeName: "first",
  910. id: null,
  911. show: false,
  912. compoundList: [],
  913. deleteList: [],
  914. isMainGo: false,
  915. isDetele: false,
  916. showMove: false,
  917. };
  918. },
  919. components: {
  920. pagination,
  921. studentRollCall,
  922. gpsLoction,
  923. studentWork,
  924. courseEvaluate,
  925. resetClass,
  926. teacherList,
  927. addCompound,
  928. infoMsg,
  929. SchoolLocation,
  930. },
  931. created() {
  932. // this.searchForm.timer = [nowTime, nowTime];
  933. },
  934. computed: {
  935. workTypeOptions() {
  936. return objectToOptions(workType);
  937. },
  938. mergeCourseTypeOptions() {
  939. return objectToOptions(mergeCourseType);
  940. },
  941. isSearch() {
  942. return (
  943. this.searchForm.search ||
  944. this.searchForm.schoolId ||
  945. this.searchForm.organIdList ||
  946. this.searchForm.groupType ||
  947. this.searchForm.teachMode ||
  948. this.searchForm.mergeCourseType ||
  949. this.searchForm.teachType ||
  950. this.searchForm.isCallNames ||
  951. this.searchForm.memberFlag ||
  952. this.searchForm.creatTimer?.length > 0 || (this.searchForm.courseTime?.length > 0&&this.searchForm.courseTime[0])
  953. );
  954. },
  955. },
  956. mounted() {
  957. const { query, params } = this.$route;
  958. if (params.courseIdSearch) {
  959. this.searchForm.courseIdSearch = params.courseIdSearch;
  960. }
  961. if (query.start || query.end) {
  962. this.searchForm.timer = [query.start, query.end];
  963. } else {
  964. let flag = false;
  965. for (let item in this.searchForm) {
  966. if (typeof this.searchForm[item] == "object") {
  967. // 对象或者数组
  968. if (this.searchForm[item]?.length > 0 && this.searchForm[item][0]) {
  969. flag = true;
  970. }
  971. } else {
  972. if (this.searchForm[item]) {
  973. // console.log(this.searchForm[item])
  974. // this.searchForm.timer = [];
  975. flag = true;
  976. }
  977. }
  978. }
  979. if (!flag) {
  980. this.searchForm.timer = [nowTime, nowTime];
  981. }
  982. }
  983. // 课程时间段异常,不需要时间搜索
  984. if (query.searchType == "COURSE_TIME_ERROR") {
  985. this.searchForm.timer = [];
  986. }
  987. if (query.organId) {
  988. this.searchForm.organIdList = Number(query.organId);
  989. }
  990. console.log(this.searchForm);
  991. this.$store.dispatch("setBranchs");
  992. this.$store.dispatch("setTeachers");
  993. this.$store.dispatch("setSchools");
  994. this.init();
  995. },
  996. methods: {
  997. changeCourseTime(val) {
  998. console.log(val);
  999. },
  1000. init() {
  1001. this.getList();
  1002. },
  1003. setTimeForSearch() {
  1004. const { query } = this.$route;
  1005. if (query.start || query.end) {
  1006. this.searchForm.timer = [query.start, query.end];
  1007. } else {
  1008. this.searchForm.timer = [];
  1009. // this.reset()
  1010. this.searchForm = { ...initSearch };
  1011. }
  1012. },
  1013. permission(str, parent) {
  1014. return permission(str, parent);
  1015. },
  1016. reloadSearch(notSetTime) {
  1017. if (!notSetTime) {
  1018. this.searchForm.timer = [nowTime, nowTime];
  1019. }
  1020. this.rules.page = 1;
  1021. this.getList();
  1022. },
  1023. async removeCourse(row) {
  1024. if (this.deleteList.length < 1 && !row) {
  1025. this.$message.error("请自少选择一节课");
  1026. return;
  1027. }
  1028. let flag = false;
  1029. let arr = this.deleteList.map((course) => {
  1030. if (course.isSettlement || course.status == "UNDERWAY") {
  1031. flag = true;
  1032. }
  1033. return course.id;
  1034. });
  1035. if (flag) {
  1036. this.$message.error("已结算或进行中的课程无法删除");
  1037. return;
  1038. }
  1039. let courseScheduleIds = arr.join(",") || row.id;
  1040. this.$confirm("是否确认删除此数据?", "提示", {
  1041. type: "warning",
  1042. })
  1043. .then(() => {
  1044. bathDelete({ courseScheduleIds: courseScheduleIds })
  1045. .then((res) => {
  1046. if (res.code == 200) {
  1047. this.$message.success("删除成功");
  1048. this.getList();
  1049. this.clearCom();
  1050. }
  1051. })
  1052. .catch((e) => {
  1053. this.$refs.addCompound.isLook = true;
  1054. });
  1055. })
  1056. .catch((e) => {
  1057. this.$refs.addCompound.isLook = true;
  1058. });
  1059. },
  1060. reset() {
  1061. this.searchForm = { ...initSearch };
  1062. // this.$router.push({ query: {} })
  1063. this.search();
  1064. },
  1065. search() {
  1066. this.rules.page = 1;
  1067. this.getList();
  1068. },
  1069. common(row) {
  1070. this.searchForm = {
  1071. ...initSearch,
  1072. timer: [],
  1073. courseIdSearch: row.newCourseId,
  1074. };
  1075. this.search();
  1076. },
  1077. getSearchForm() {
  1078. let searchForm = this.searchForm;
  1079. if (!searchForm.timer || searchForm.timer.length <= 0) {
  1080. searchForm.timer = [];
  1081. // this.$message.error("请选择时间段");
  1082. // return;
  1083. }
  1084. if (!searchForm.creatTimer || searchForm.creatTimer.length <= 0) {
  1085. searchForm.creatTimer = [];
  1086. }
  1087. let count = 0;
  1088. for (let item in searchForm) {
  1089. if (searchForm[item] && !Array.isArray(searchForm[item])) {
  1090. count++;
  1091. } else if (
  1092. Array.isArray(searchForm[item]) &&
  1093. searchForm[item].length > 0
  1094. ) {
  1095. count++;
  1096. }
  1097. }
  1098. // 课程时间段异常,不需要时间搜索,则课表列表搜索可以不要条件搜索
  1099. // if (count <= 0) {
  1100. // this.$message.error("请至少选择一个搜索条件");
  1101. // return false;
  1102. // }
  1103. if (searchForm.courseTime?.length > 0) {
  1104. searchForm.startClassTimeStr = searchForm.courseTime[0];
  1105. searchForm.endClassTimeStr = searchForm.courseTime[1];
  1106. } else {
  1107. searchForm.startClassTimeStr = null;
  1108. searchForm.endClassTimeStr = null;
  1109. }
  1110. const { creatTimer, timer, courseTime, ...rest } = searchForm;
  1111. return {
  1112. ...rest,
  1113. page: this.rules.page,
  1114. rows: this.rules.limit,
  1115. searchType: this.$route.query.searchType,
  1116. ...getTimes(creatTimer, ["createStartDate", "createEndDate"]),
  1117. ...getTimes(timer, ["startTime", "endTime"]),
  1118. };
  1119. },
  1120. openLocation(school) {
  1121. this.locationVisible = true;
  1122. },
  1123. onCourseExport() {
  1124. // 课表导出
  1125. if (!this.getSearchForm()) {
  1126. return;
  1127. }
  1128. let url = "/api-web/export/superFindCourseSchedules";
  1129. const options = {
  1130. method: "get",
  1131. headers: {
  1132. Authorization: getToken(),
  1133. },
  1134. params: cleanDeep(this.getSearchForm()),
  1135. url,
  1136. // responseType: "blob",
  1137. };
  1138. this.$confirm("您确定导出报表", "提示", {
  1139. confirmButtonText: "确定",
  1140. cancelButtonText: "取消",
  1141. type: "warning",
  1142. })
  1143. .then(() => {
  1144. load.startLoading();
  1145. axios(options)
  1146. .then((res) => {
  1147. if(res.data.code == 200) {
  1148. this.$message.success(res.data.data);
  1149. } else {
  1150. this.$message.error(res.data.msg)
  1151. }
  1152. // let blob = new Blob([res.data], {
  1153. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  1154. // type: "application/vnd.ms-excel;charset=utf-8",
  1155. //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  1156. // });
  1157. // let text = new Response(blob).text();
  1158. // text.then((res) => {
  1159. // // 判断是否报错
  1160. // if (res.indexOf("code") != -1) {
  1161. // let json = JSON.parse(res);
  1162. // this.$message.error(json.msg);
  1163. // } else {
  1164. // let objectUrl = URL.createObjectURL(blob);
  1165. // let link = document.createElement("a");
  1166. // let fname = "课表列表" + new Date().getTime() + ".xls"; //下载文件的名字
  1167. // link.href = objectUrl;
  1168. // link.setAttribute("download", fname);
  1169. // document.body.appendChild(link);
  1170. // link.click();
  1171. // }
  1172. // });
  1173. load.endLoading();
  1174. })
  1175. .catch((error) => {
  1176. this.$message.error("导出数据失败,请联系管理员");
  1177. load.endLoading();
  1178. });
  1179. })
  1180. .catch(() => {});
  1181. },
  1182. getList() {
  1183. if (!this.getSearchForm()) {
  1184. return;
  1185. }
  1186. superFindCourseSchedules(this.getSearchForm()).then((res) => {
  1187. if (res.code == 200) {
  1188. this.tableList = res.data.rows;
  1189. this.rules.total = res.data.total;
  1190. let idList = this.deleteList.map((course) => {
  1191. return course.id;
  1192. });
  1193. this.isDetele = true;
  1194. this.$nextTick(() => {
  1195. this.tableList.forEach((course) => {
  1196. if (idList.indexOf(course.id) != -1) {
  1197. this.$refs.tableList.toggleRowSelection(course, true);
  1198. }
  1199. });
  1200. this.isDetele = false;
  1201. });
  1202. this.$refs.searchForm.save(this.searchForm);
  1203. //
  1204. // this.$router.push({ query: {} })
  1205. // let arr = this.$helpers.lodash.differenceWith( this.tableList, this.deleteList,'id')
  1206. }
  1207. });
  1208. // this.$router.replace({ query: {...this.$route.query,courseIdSearch:null} })
  1209. },
  1210. lookDetail(row) {
  1211. // this.maskForm = row;
  1212. // 发请求 获取详情 row.id
  1213. this.maskForm = row;
  1214. this.activeName = "first";
  1215. this.classVisible = true;
  1216. getTeacherPersonalAttendanceDetail({ courseScheduleId: row.id }).then(
  1217. (res) => {
  1218. if (res.code == 200) {
  1219. this.maskForm = { ...this.maskForm, ...res.data };
  1220. this.maskForm.id = row.id;
  1221. this.activeName = "first";
  1222. this.classVisible = true;
  1223. this.isMainGo = this.$refs.filterSearch?.show;
  1224. }
  1225. }
  1226. );
  1227. },
  1228. syncTeacherAttend() {
  1229. if (this.maskForm.id) {
  1230. getTeacherPersonalAttendanceDetail({
  1231. courseScheduleId: this.maskForm.id,
  1232. }).then((res) => {
  1233. if (res.code == 200) {
  1234. this.maskForm = { ...this.maskForm, ...res.data };
  1235. this.isMainGo = this.$refs.filterSearch?.show;
  1236. }
  1237. });
  1238. }
  1239. },
  1240. handleClick(tab, event) {
  1241. // console.log(tab, event);
  1242. },
  1243. resetClass(row) {
  1244. this.id = row.id;
  1245. this.show = true;
  1246. },
  1247. closeReset() {
  1248. this.show = false;
  1249. },
  1250. clearAttend(row) {
  1251. this.$confirm("是否清除考勤记录?", "提示", {
  1252. confirmButtonText: "确定",
  1253. cancelButtonText: "取消",
  1254. type: "warning",
  1255. })
  1256. .then(() => {
  1257. cleanAttendance({ courseScheduleIds: row.id }).then((res) => {
  1258. if (res.code == 200) {
  1259. this.$message.success("清除成功");
  1260. this.getList();
  1261. } else {
  1262. this.$message.error(res.msg);
  1263. }
  1264. });
  1265. })
  1266. .catch(() => {});
  1267. },
  1268. cancleMore() {
  1269. // this.$refs.searchForm2.resetFields()
  1270. this.showMove = false;
  1271. },
  1272. okMore() {
  1273. this.getList();
  1274. this.showMove = false;
  1275. },
  1276. // addCompound(row) {
  1277. // this.compoundList.push(row);
  1278. // this.compoundList = [...new Set(this.compoundList)];
  1279. // },
  1280. // isAddCom(row) {
  1281. // let flag = false;
  1282. // this.compoundList.forEach((com) => {
  1283. // if (com.id == row.id) {
  1284. // flag = true;
  1285. // }
  1286. // });
  1287. // return flag;
  1288. // },
  1289. cancleCompound(row) {
  1290. let indexNum = null;
  1291. this.deleteList.forEach((com, index) => {
  1292. if (com.id == row.id) {
  1293. indexNum = index;
  1294. }
  1295. });
  1296. if (indexNum + "") {
  1297. this.deleteList.splice(indexNum, 1);
  1298. }
  1299. this.tableList.forEach((course, index) => {
  1300. if (course.id == row.id) {
  1301. this.$refs.tableList.toggleRowSelection(course, false);
  1302. }
  1303. });
  1304. if (this.deleteList.length <= 0) {
  1305. this.clearCom();
  1306. }
  1307. },
  1308. clearCom() {
  1309. // this.deleteList = [];
  1310. this.$set(this, "deleteList", []);
  1311. this.$refs.tableList.clearSelection();
  1312. this.$refs.addCompound.isLook = false;
  1313. },
  1314. resetCompound(row) {
  1315. this.$confirm("您确定取消合并该课程?", "提示", {
  1316. confirmButtonText: "确定",
  1317. cancelButtonText: "取消",
  1318. type: "warning",
  1319. })
  1320. .then(() => {
  1321. cancelCourseMerge({ mainCourseId: row.id }).then((res) => {
  1322. if (res.code == 200) {
  1323. this.$message.success("提交成功");
  1324. this.getList();
  1325. }
  1326. });
  1327. })
  1328. .catch(() => {});
  1329. },
  1330. handleSelectionChange(arr) {
  1331. // this.deleteList = arr;
  1332. if (arr.length > 0) {
  1333. // 有可能加 有可能减
  1334. this.deleteList = this.deleteList.concat(arr);
  1335. // 去重
  1336. this.deleteList = this.$helpers.lodash.uniqBy(this.deleteList, "id");
  1337. }
  1338. // else if(){}
  1339. else {
  1340. if (this.isDetele) return;
  1341. // 有2种 1是新页
  1342. // 2是点击反选
  1343. let idList = this.deleteList.map((course) => {
  1344. return course.id;
  1345. });
  1346. this.$nextTick(() => {
  1347. let tableIdList = [];
  1348. this.tableList.forEach((course) => {
  1349. tableIdList.push(course.id);
  1350. if (idList.indexOf(course.id) != -1) {
  1351. this.$refs.tableList.toggleRowSelection(course, false);
  1352. // 删除这个元素
  1353. }
  1354. });
  1355. this.deleteList = this.$helpers.lodash.remove(
  1356. this.deleteList,
  1357. function (item) {
  1358. return tableIdList.indexOf(item.id) == -1;
  1359. }
  1360. );
  1361. if (this.deleteList.length <= 0) {
  1362. this.clearCom();
  1363. }
  1364. });
  1365. }
  1366. },
  1367. gotoCourse(row) {
  1368. if (row.groupType == "MUSIC") {
  1369. this.$router.push({
  1370. path: "/teamList",
  1371. query: { search: row.musicGroupId },
  1372. });
  1373. } else if (row.groupType == "VIP") {
  1374. this.$router.push({
  1375. path: "/vipManager/vipList",
  1376. query: { search: row.musicGroupId },
  1377. });
  1378. } else if (row.groupType == "PRACTICE") {
  1379. this.$router.push({
  1380. path: "/accompanyManager/accompany",
  1381. query: { search: row.musicGroupId },
  1382. });
  1383. }
  1384. },
  1385. onTableSelect(rows, row) {
  1386. let idList = this.deleteList.map((course) => {
  1387. return course.id;
  1388. });
  1389. if (idList.indexOf(row.id) != -1) {
  1390. this.deleteList.splice(idList.indexOf(row.id), 1);
  1391. if (this.deleteList.length <= 0) {
  1392. this.clearCom();
  1393. }
  1394. }
  1395. },
  1396. },
  1397. filters: {
  1398. isCall(val) {
  1399. if (val == 0) {
  1400. return "未点名";
  1401. } else if (val == 1) {
  1402. return "已点名";
  1403. }
  1404. },
  1405. },
  1406. watch: {
  1407. classVisible(val) {
  1408. if (!val) {
  1409. this.activeName = null;
  1410. }
  1411. },
  1412. "searchForm.courseIdSearch"(val) {},
  1413. },
  1414. };
  1415. </script>
  1416. <style lang="scss" scoped>
  1417. .visible {
  1418. visibility: hidden;
  1419. }
  1420. .cl-container {
  1421. .topFrom {
  1422. margin: 20px 30px 0;
  1423. .classlist {
  1424. display: flex;
  1425. flex-direction: row;
  1426. justify-content: flex-start;
  1427. align-items: center;
  1428. ul {
  1429. li {
  1430. list-style: none;
  1431. }
  1432. }
  1433. }
  1434. }
  1435. .searchForm {
  1436. margin: 0 30px;
  1437. }
  1438. }
  1439. .btnWraps {
  1440. display: flex;
  1441. flex-direction: row;
  1442. justify-content: flex-start;
  1443. div {
  1444. margin-right: 20px;
  1445. }
  1446. }
  1447. .inputStyle {
  1448. width: 180px;
  1449. }
  1450. .red {
  1451. color: red;
  1452. }
  1453. .green {
  1454. color: #14928a;
  1455. }
  1456. .exportBtn {
  1457. background: #13817a;
  1458. }
  1459. .newBand {
  1460. margin-top: 30px;
  1461. }
  1462. </style>