teamCourseList.vue 46 KB

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