teamCourseList.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474
  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. let nowTime = new Date();
  859. nowTime =
  860. nowTime.getFullYear() +
  861. "-" +
  862. (nowTime.getMonth() + 1) +
  863. "-" +
  864. nowTime.getDate();
  865. const initSearch = {
  866. teachMode: null, // 教学模式
  867. organIdList: null,
  868. courseStatus: null,
  869. courseType: null,
  870. timer: [], // 时间
  871. class: null,
  872. teachType: null,
  873. mergeCourseType: null,
  874. isCallNames: null, // 是否点名
  875. search: null, // 乐团名称 编号 vip课名称
  876. teacherIdList: null, // 老师编号
  877. schoolId: null, // 教学点编号
  878. creatTimer: [],
  879. courseIdSearch: null,
  880. memberFlag: null,
  881. courseTime: ["", ""],
  882. };
  883. export default {
  884. name: "teamCourseList",
  885. data() {
  886. return {
  887. classVisible: false,
  888. timerVisible: false,
  889. courseVisible: false,
  890. locationVisible: false,
  891. courseType: courseType,
  892. mergeCourseType,
  893. courseListType: courseListType,
  894. searchForm: { ...initSearch },
  895. tableList: [],
  896. searchLsit: [],
  897. organList: [],
  898. rules: {
  899. // 分页规则
  900. limit: 10, // 限制显示条数
  901. page: 1, // 当前页
  902. total: 0, // 总条数
  903. page_size: [10, 20, 40, 50], // 选择限制显示条数
  904. },
  905. teacherList: [],
  906. schoolList: [],
  907. maskForm: {},
  908. activeName: "first",
  909. id: null,
  910. show: false,
  911. compoundList: [],
  912. deleteList: [],
  913. isMainGo: false,
  914. isDetele: false,
  915. showMove: false,
  916. };
  917. },
  918. components: {
  919. pagination,
  920. studentRollCall,
  921. gpsLoction,
  922. studentWork,
  923. courseEvaluate,
  924. resetClass,
  925. teacherList,
  926. addCompound,
  927. infoMsg,
  928. SchoolLocation,
  929. },
  930. created() {
  931. // this.searchForm.timer = [nowTime, nowTime];
  932. },
  933. computed: {
  934. workTypeOptions() {
  935. return objectToOptions(workType);
  936. },
  937. mergeCourseTypeOptions() {
  938. return objectToOptions(mergeCourseType);
  939. },
  940. isSearch() {
  941. return (
  942. this.searchForm.search ||
  943. this.searchForm.schoolId ||
  944. this.searchForm.organIdList ||
  945. this.searchForm.groupType ||
  946. this.searchForm.teachMode ||
  947. this.searchForm.mergeCourseType ||
  948. this.searchForm.teachType ||
  949. this.searchForm.isCallNames ||
  950. this.searchForm.memberFlag ||
  951. this.searchForm.creatTimer?.length > 0 || (this.searchForm.courseTime?.length > 0&&this.searchForm.courseTime[0])
  952. );
  953. },
  954. },
  955. mounted() {
  956. const { query, params } = this.$route;
  957. if (params.courseIdSearch) {
  958. this.searchForm.courseIdSearch = params.courseIdSearch;
  959. }
  960. if (query.start || query.end) {
  961. this.searchForm.timer = [query.start, query.end];
  962. } else {
  963. let flag = false;
  964. for (let item in this.searchForm) {
  965. if (typeof this.searchForm[item] == "object") {
  966. // 对象或者数组
  967. if (this.searchForm[item]?.length > 0 && this.searchForm[item][0]) {
  968. flag = true;
  969. }
  970. } else {
  971. if (this.searchForm[item]) {
  972. // console.log(this.searchForm[item])
  973. // this.searchForm.timer = [];
  974. flag = true;
  975. }
  976. }
  977. }
  978. if (!flag) {
  979. this.searchForm.timer = [nowTime, nowTime];
  980. }
  981. }
  982. // 课程时间段异常,不需要时间搜索
  983. if (query.searchType == "COURSE_TIME_ERROR") {
  984. this.searchForm.timer = [];
  985. }
  986. if (query.organId) {
  987. this.searchForm.organIdList = Number(query.organId);
  988. }
  989. console.log(this.searchForm);
  990. this.$store.dispatch("setBranchs");
  991. this.$store.dispatch("setTeachers");
  992. this.$store.dispatch("setSchools");
  993. this.init();
  994. },
  995. methods: {
  996. changeCourseTime(val) {
  997. console.log(val);
  998. },
  999. init() {
  1000. this.getList();
  1001. },
  1002. setTimeForSearch() {
  1003. const { query } = this.$route;
  1004. if (query.start || query.end) {
  1005. this.searchForm.timer = [query.start, query.end];
  1006. } else {
  1007. this.searchForm.timer = [];
  1008. // this.reset()
  1009. this.searchForm = { ...initSearch };
  1010. }
  1011. },
  1012. permission(str, parent) {
  1013. return permission(str, parent);
  1014. },
  1015. reloadSearch(notSetTime) {
  1016. if (!notSetTime) {
  1017. this.searchForm.timer = [nowTime, nowTime];
  1018. }
  1019. this.rules.page = 1;
  1020. this.getList();
  1021. },
  1022. async removeCourse(row) {
  1023. if (this.deleteList.length < 1 && !row) {
  1024. this.$message.error("请自少选择一节课");
  1025. return;
  1026. }
  1027. let flag = false;
  1028. let arr = this.deleteList.map((course) => {
  1029. if (course.isSettlement || course.status == "UNDERWAY") {
  1030. flag = true;
  1031. }
  1032. return course.id;
  1033. });
  1034. if (flag) {
  1035. this.$message.error("已结算或进行中的课程无法删除");
  1036. return;
  1037. }
  1038. let courseScheduleIds = arr.join(",") || row.id;
  1039. this.$confirm("是否确认删除此数据?", "提示", {
  1040. type: "warning",
  1041. })
  1042. .then(() => {
  1043. bathDelete({ courseScheduleIds: courseScheduleIds })
  1044. .then((res) => {
  1045. if (res.code == 200) {
  1046. this.$message.success("删除成功");
  1047. this.getList();
  1048. this.clearCom();
  1049. }
  1050. })
  1051. .catch((e) => {
  1052. this.$refs.addCompound.isLook = true;
  1053. });
  1054. })
  1055. .catch((e) => {
  1056. this.$refs.addCompound.isLook = true;
  1057. });
  1058. },
  1059. reset() {
  1060. this.searchForm = { ...initSearch };
  1061. // this.$router.push({ query: {} })
  1062. this.search();
  1063. },
  1064. search() {
  1065. this.rules.page = 1;
  1066. this.getList();
  1067. },
  1068. common(row) {
  1069. this.searchForm = {
  1070. ...initSearch,
  1071. timer: [],
  1072. courseIdSearch: row.newCourseId,
  1073. };
  1074. this.search();
  1075. },
  1076. getSearchForm() {
  1077. let searchForm = this.searchForm;
  1078. if (!searchForm.timer || searchForm.timer.length <= 0) {
  1079. searchForm.timer = [];
  1080. // this.$message.error("请选择时间段");
  1081. // return;
  1082. }
  1083. if (!searchForm.creatTimer || searchForm.creatTimer.length <= 0) {
  1084. searchForm.creatTimer = [];
  1085. }
  1086. let count = 0;
  1087. for (let item in searchForm) {
  1088. if (searchForm[item] && !Array.isArray(searchForm[item])) {
  1089. count++;
  1090. } else if (
  1091. Array.isArray(searchForm[item]) &&
  1092. searchForm[item].length > 0
  1093. ) {
  1094. count++;
  1095. }
  1096. }
  1097. // 课程时间段异常,不需要时间搜索,则课表列表搜索可以不要条件搜索
  1098. // if (count <= 0) {
  1099. // this.$message.error("请至少选择一个搜索条件");
  1100. // return false;
  1101. // }
  1102. if (searchForm.courseTime?.length > 0) {
  1103. searchForm.startClassTimeStr = searchForm.courseTime[0];
  1104. searchForm.endClassTimeStr = searchForm.courseTime[1];
  1105. } else {
  1106. searchForm.startClassTimeStr = null;
  1107. searchForm.endClassTimeStr = null;
  1108. }
  1109. const { creatTimer, timer, courseTime, ...rest } = searchForm;
  1110. return {
  1111. ...rest,
  1112. page: this.rules.page,
  1113. rows: this.rules.limit,
  1114. searchType: this.$route.query.searchType,
  1115. ...getTimes(creatTimer, ["createStartDate", "createEndDate"]),
  1116. ...getTimes(timer, ["startTime", "endTime"]),
  1117. };
  1118. },
  1119. openLocation(school) {
  1120. this.locationVisible = true;
  1121. },
  1122. onCourseExport() {
  1123. // 课表导出
  1124. if (!this.getSearchForm()) {
  1125. return;
  1126. }
  1127. let url = "/api-web/export/superFindCourseSchedules";
  1128. const options = {
  1129. method: "get",
  1130. headers: {
  1131. Authorization: getToken(),
  1132. },
  1133. params: this.getSearchForm(),
  1134. url,
  1135. // responseType: "blob",
  1136. };
  1137. this.$confirm("您确定导出报表", "提示", {
  1138. confirmButtonText: "确定",
  1139. cancelButtonText: "取消",
  1140. type: "warning",
  1141. })
  1142. .then(() => {
  1143. load.startLoading();
  1144. axios(options)
  1145. .then((res) => {
  1146. console.log(res);
  1147. this.$message.success(res.data.data);
  1148. // let blob = new Blob([res.data], {
  1149. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  1150. // type: "application/vnd.ms-excel;charset=utf-8",
  1151. //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  1152. // });
  1153. // let text = new Response(blob).text();
  1154. // text.then((res) => {
  1155. // // 判断是否报错
  1156. // if (res.indexOf("code") != -1) {
  1157. // let json = JSON.parse(res);
  1158. // this.$message.error(json.msg);
  1159. // } else {
  1160. // let objectUrl = URL.createObjectURL(blob);
  1161. // let link = document.createElement("a");
  1162. // let fname = "课表列表" + new Date().getTime() + ".xls"; //下载文件的名字
  1163. // link.href = objectUrl;
  1164. // link.setAttribute("download", fname);
  1165. // document.body.appendChild(link);
  1166. // link.click();
  1167. // }
  1168. // });
  1169. load.endLoading();
  1170. })
  1171. .catch((error) => {
  1172. this.$message.error("导出数据失败,请联系管理员");
  1173. load.endLoading();
  1174. });
  1175. })
  1176. .catch(() => {});
  1177. },
  1178. getList() {
  1179. if (!this.getSearchForm()) {
  1180. return;
  1181. }
  1182. superFindCourseSchedules(this.getSearchForm()).then((res) => {
  1183. if (res.code == 200) {
  1184. this.tableList = res.data.rows;
  1185. this.rules.total = res.data.total;
  1186. let idList = this.deleteList.map((course) => {
  1187. return course.id;
  1188. });
  1189. this.isDetele = true;
  1190. this.$nextTick(() => {
  1191. this.tableList.forEach((course) => {
  1192. if (idList.indexOf(course.id) != -1) {
  1193. this.$refs.tableList.toggleRowSelection(course, true);
  1194. }
  1195. });
  1196. this.isDetele = false;
  1197. });
  1198. this.$refs.searchForm.save(this.searchForm);
  1199. //
  1200. // this.$router.push({ query: {} })
  1201. // let arr = this.$helpers.lodash.differenceWith( this.tableList, this.deleteList,'id')
  1202. }
  1203. });
  1204. // this.$router.replace({ query: {...this.$route.query,courseIdSearch:null} })
  1205. },
  1206. lookDetail(row) {
  1207. // this.maskForm = row;
  1208. // 发请求 获取详情 row.id
  1209. this.maskForm = row;
  1210. this.activeName = "first";
  1211. this.classVisible = true;
  1212. getTeacherPersonalAttendanceDetail({ courseScheduleId: row.id }).then(
  1213. (res) => {
  1214. if (res.code == 200) {
  1215. this.maskForm = { ...this.maskForm, ...res.data };
  1216. this.maskForm.id = row.id;
  1217. this.activeName = "first";
  1218. this.classVisible = true;
  1219. this.isMainGo = this.$refs.filterSearch?.show;
  1220. }
  1221. }
  1222. );
  1223. },
  1224. syncTeacherAttend() {
  1225. if (this.maskForm.id) {
  1226. getTeacherPersonalAttendanceDetail({
  1227. courseScheduleId: this.maskForm.id,
  1228. }).then((res) => {
  1229. if (res.code == 200) {
  1230. this.maskForm = { ...this.maskForm, ...res.data };
  1231. this.isMainGo = this.$refs.filterSearch?.show;
  1232. }
  1233. });
  1234. }
  1235. },
  1236. handleClick(tab, event) {
  1237. // console.log(tab, event);
  1238. },
  1239. resetClass(row) {
  1240. this.id = row.id;
  1241. this.show = true;
  1242. },
  1243. closeReset() {
  1244. this.show = false;
  1245. },
  1246. clearAttend(row) {
  1247. this.$confirm("是否清除考勤记录?", "提示", {
  1248. confirmButtonText: "确定",
  1249. cancelButtonText: "取消",
  1250. type: "warning",
  1251. })
  1252. .then(() => {
  1253. cleanAttendance({ courseScheduleIds: row.id }).then((res) => {
  1254. if (res.code == 200) {
  1255. this.$message.success("清除成功");
  1256. this.getList();
  1257. } else {
  1258. this.$message.error(res.msg);
  1259. }
  1260. });
  1261. })
  1262. .catch(() => {});
  1263. },
  1264. cancleMore() {
  1265. // this.$refs.searchForm2.resetFields()
  1266. this.showMove = false;
  1267. },
  1268. okMore() {
  1269. this.getList();
  1270. this.showMove = false;
  1271. },
  1272. // addCompound(row) {
  1273. // this.compoundList.push(row);
  1274. // this.compoundList = [...new Set(this.compoundList)];
  1275. // },
  1276. // isAddCom(row) {
  1277. // let flag = false;
  1278. // this.compoundList.forEach((com) => {
  1279. // if (com.id == row.id) {
  1280. // flag = true;
  1281. // }
  1282. // });
  1283. // return flag;
  1284. // },
  1285. cancleCompound(row) {
  1286. let indexNum = null;
  1287. this.deleteList.forEach((com, index) => {
  1288. if (com.id == row.id) {
  1289. indexNum = index;
  1290. }
  1291. });
  1292. if (indexNum + "") {
  1293. this.deleteList.splice(indexNum, 1);
  1294. }
  1295. this.tableList.forEach((course, index) => {
  1296. if (course.id == row.id) {
  1297. this.$refs.tableList.toggleRowSelection(course, false);
  1298. }
  1299. });
  1300. if (this.deleteList.length <= 0) {
  1301. this.clearCom();
  1302. }
  1303. },
  1304. clearCom() {
  1305. // this.deleteList = [];
  1306. this.$set(this, "deleteList", []);
  1307. this.$refs.tableList.clearSelection();
  1308. this.$refs.addCompound.isLook = false;
  1309. },
  1310. resetCompound(row) {
  1311. this.$confirm("您确定取消合并该课程?", "提示", {
  1312. confirmButtonText: "确定",
  1313. cancelButtonText: "取消",
  1314. type: "warning",
  1315. })
  1316. .then(() => {
  1317. cancelCourseMerge({ mainCourseId: row.id }).then((res) => {
  1318. if (res.code == 200) {
  1319. this.$message.success("提交成功");
  1320. this.getList();
  1321. }
  1322. });
  1323. })
  1324. .catch(() => {});
  1325. },
  1326. handleSelectionChange(arr) {
  1327. // this.deleteList = arr;
  1328. if (arr.length > 0) {
  1329. // 有可能加 有可能减
  1330. this.deleteList = this.deleteList.concat(arr);
  1331. // 去重
  1332. this.deleteList = this.$helpers.lodash.uniqBy(this.deleteList, "id");
  1333. }
  1334. // else if(){}
  1335. else {
  1336. if (this.isDetele) return;
  1337. // 有2种 1是新页
  1338. // 2是点击反选
  1339. let idList = this.deleteList.map((course) => {
  1340. return course.id;
  1341. });
  1342. this.$nextTick(() => {
  1343. let tableIdList = [];
  1344. this.tableList.forEach((course) => {
  1345. tableIdList.push(course.id);
  1346. if (idList.indexOf(course.id) != -1) {
  1347. this.$refs.tableList.toggleRowSelection(course, false);
  1348. // 删除这个元素
  1349. }
  1350. });
  1351. this.deleteList = this.$helpers.lodash.remove(
  1352. this.deleteList,
  1353. function (item) {
  1354. return tableIdList.indexOf(item.id) == -1;
  1355. }
  1356. );
  1357. if (this.deleteList.length <= 0) {
  1358. this.clearCom();
  1359. }
  1360. });
  1361. }
  1362. },
  1363. gotoCourse(row) {
  1364. if (row.groupType == "MUSIC") {
  1365. this.$router.push({
  1366. path: "/teamList",
  1367. query: { search: row.musicGroupId },
  1368. });
  1369. } else if (row.groupType == "VIP") {
  1370. this.$router.push({
  1371. path: "/vipManager/vipList",
  1372. query: { search: row.musicGroupId },
  1373. });
  1374. } else if (row.groupType == "PRACTICE") {
  1375. this.$router.push({
  1376. path: "/accompanyManager/accompany",
  1377. query: { search: row.musicGroupId },
  1378. });
  1379. }
  1380. },
  1381. onTableSelect(rows, row) {
  1382. let idList = this.deleteList.map((course) => {
  1383. return course.id;
  1384. });
  1385. if (idList.indexOf(row.id) != -1) {
  1386. this.deleteList.splice(idList.indexOf(row.id), 1);
  1387. if (this.deleteList.length <= 0) {
  1388. this.clearCom();
  1389. }
  1390. }
  1391. },
  1392. },
  1393. filters: {
  1394. isCall(val) {
  1395. if (val == 0) {
  1396. return "未点名";
  1397. } else if (val == 1) {
  1398. return "已点名";
  1399. }
  1400. },
  1401. },
  1402. watch: {
  1403. classVisible(val) {
  1404. if (!val) {
  1405. this.activeName = null;
  1406. }
  1407. },
  1408. "searchForm.courseIdSearch"(val) {},
  1409. },
  1410. };
  1411. </script>
  1412. <style lang="scss" scoped>
  1413. .visible {
  1414. visibility: hidden;
  1415. }
  1416. .cl-container {
  1417. .topFrom {
  1418. margin: 20px 30px 0;
  1419. .classlist {
  1420. display: flex;
  1421. flex-direction: row;
  1422. justify-content: flex-start;
  1423. align-items: center;
  1424. ul {
  1425. li {
  1426. list-style: none;
  1427. }
  1428. }
  1429. }
  1430. }
  1431. .searchForm {
  1432. margin: 0 30px;
  1433. }
  1434. }
  1435. .btnWraps {
  1436. display: flex;
  1437. flex-direction: row;
  1438. justify-content: flex-start;
  1439. div {
  1440. margin-right: 20px;
  1441. }
  1442. }
  1443. .inputStyle {
  1444. width: 180px;
  1445. }
  1446. .red {
  1447. color: red;
  1448. }
  1449. .green {
  1450. color: #14928a;
  1451. }
  1452. .exportBtn {
  1453. background: #13817a;
  1454. }
  1455. .newBand {
  1456. margin-top: 30px;
  1457. }
  1458. </style>