teamCourseList.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469
  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 if(res.data.code == 403) {
  1122. this.$message.error(`登录过期,请重新登录!`)
  1123. setTimeout(() => {
  1124. this.$store.dispatch('user/resetToken').then(() => {
  1125. location.reload()
  1126. })
  1127. }, 1000);
  1128. } else {
  1129. this.$message.error(res.data.msg);
  1130. }
  1131. // let blob = new Blob([res.data], {
  1132. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  1133. // type: "application/vnd.ms-excel;charset=utf-8",
  1134. //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  1135. // });
  1136. // let text = new Response(blob).text();
  1137. // text.then((res) => {
  1138. // // 判断是否报错
  1139. // if (res.indexOf("code") != -1) {
  1140. // let json = JSON.parse(res);
  1141. // this.$message.error(json.msg);
  1142. // } else {
  1143. // let objectUrl = URL.createObjectURL(blob);
  1144. // let link = document.createElement("a");
  1145. // let fname = "课表列表" + new Date().getTime() + ".xls"; //下载文件的名字
  1146. // link.href = objectUrl;
  1147. // link.setAttribute("download", fname);
  1148. // document.body.appendChild(link);
  1149. // link.click();
  1150. // }
  1151. // });
  1152. load.endLoading();
  1153. })
  1154. .catch((error) => {
  1155. this.$message.error("导出数据失败,请联系管理员");
  1156. load.endLoading();
  1157. });
  1158. })
  1159. .catch(() => {});
  1160. },
  1161. getList() {
  1162. if (!this.getSearchForm()) {
  1163. return;
  1164. }
  1165. superFindCourseSchedules(this.getSearchForm()).then((res) => {
  1166. if (res.code == 200) {
  1167. this.tableList = res.data.rows;
  1168. this.rules.total = res.data.total;
  1169. let idList = this.deleteList.map((course) => {
  1170. return course.id;
  1171. });
  1172. this.isDetele = true;
  1173. this.$nextTick(() => {
  1174. this.tableList.forEach((course) => {
  1175. if (idList.indexOf(course.id) != -1) {
  1176. this.$refs.tableList.toggleRowSelection(course, true);
  1177. }
  1178. });
  1179. this.isDetele = false;
  1180. });
  1181. this.$refs.searchForm.save(this.searchForm);
  1182. //
  1183. // this.$router.push({ query: {} })
  1184. // let arr = this.$helpers.lodash.differenceWith( this.tableList, this.deleteList,'id')
  1185. }
  1186. });
  1187. // this.$router.replace({ query: {...this.$route.query,courseIdSearch:null} })
  1188. },
  1189. lookDetail(row) {
  1190. // this.maskForm = row;
  1191. // 发请求 获取详情 row.id
  1192. this.maskForm = row;
  1193. this.activeName = "first";
  1194. this.classVisible = true;
  1195. getTeacherPersonalAttendanceDetail({ courseScheduleId: row.id }).then(
  1196. (res) => {
  1197. if (res.code == 200) {
  1198. this.maskForm = { ...this.maskForm, ...res.data };
  1199. this.maskForm.id = row.id;
  1200. this.activeName = "first";
  1201. this.classVisible = true;
  1202. this.isMainGo = this.$refs.filterSearch?.show;
  1203. }
  1204. }
  1205. );
  1206. },
  1207. syncTeacherAttend() {
  1208. if (this.maskForm.id) {
  1209. getTeacherPersonalAttendanceDetail({
  1210. courseScheduleId: this.maskForm.id,
  1211. }).then((res) => {
  1212. if (res.code == 200) {
  1213. this.maskForm = { ...this.maskForm, ...res.data };
  1214. this.isMainGo = this.$refs.filterSearch?.show;
  1215. }
  1216. });
  1217. }
  1218. },
  1219. handleClick(tab, event) {
  1220. // console.log(tab, event);
  1221. },
  1222. resetClass(row) {
  1223. this.id = row.id;
  1224. this.show = true;
  1225. },
  1226. closeReset() {
  1227. this.show = false;
  1228. },
  1229. clearAttend(row) {
  1230. this.$confirm("是否清除考勤记录?", "提示", {
  1231. confirmButtonText: "确定",
  1232. cancelButtonText: "取消",
  1233. type: "warning",
  1234. })
  1235. .then(() => {
  1236. cleanAttendance({ courseScheduleIds: row.id }).then((res) => {
  1237. if (res.code == 200) {
  1238. this.$message.success("清除成功");
  1239. this.getList();
  1240. } else {
  1241. this.$message.error(res.msg);
  1242. }
  1243. });
  1244. })
  1245. .catch(() => {});
  1246. },
  1247. cancleMore() {
  1248. // this.$refs.searchForm2.resetFields()
  1249. this.showMove = false;
  1250. },
  1251. okMore() {
  1252. this.getList();
  1253. this.showMove = false;
  1254. },
  1255. // addCompound(row) {
  1256. // this.compoundList.push(row);
  1257. // this.compoundList = [...new Set(this.compoundList)];
  1258. // },
  1259. // isAddCom(row) {
  1260. // let flag = false;
  1261. // this.compoundList.forEach((com) => {
  1262. // if (com.id == row.id) {
  1263. // flag = true;
  1264. // }
  1265. // });
  1266. // return flag;
  1267. // },
  1268. cancleCompound(row) {
  1269. let indexNum = null;
  1270. this.deleteList.forEach((com, index) => {
  1271. if (com.id == row.id) {
  1272. indexNum = index;
  1273. }
  1274. });
  1275. if (indexNum + "") {
  1276. this.deleteList.splice(indexNum, 1);
  1277. }
  1278. this.tableList.forEach((course, index) => {
  1279. if (course.id == row.id) {
  1280. this.$refs.tableList.toggleRowSelection(course, false);
  1281. }
  1282. });
  1283. if (this.deleteList.length <= 0) {
  1284. this.clearCom();
  1285. }
  1286. },
  1287. clearCom() {
  1288. // this.deleteList = [];
  1289. this.$set(this, "deleteList", []);
  1290. this.$refs.tableList.clearSelection();
  1291. this.$refs.addCompound.isLook = false;
  1292. },
  1293. resetCompound(row) {
  1294. this.$confirm("您确定取消合并该课程?", "提示", {
  1295. confirmButtonText: "确定",
  1296. cancelButtonText: "取消",
  1297. type: "warning",
  1298. })
  1299. .then(() => {
  1300. cancelCourseMerge({ mainCourseId: row.id }).then((res) => {
  1301. if (res.code == 200) {
  1302. this.$message.success("提交成功");
  1303. this.getList();
  1304. }
  1305. });
  1306. })
  1307. .catch(() => {});
  1308. },
  1309. handleSelectionChange(arr) {
  1310. // this.deleteList = arr;
  1311. if (arr.length > 0) {
  1312. // 有可能加 有可能减
  1313. this.deleteList = this.deleteList.concat(arr);
  1314. // 去重
  1315. this.deleteList = this.$helpers.lodash.uniqBy(this.deleteList, "id");
  1316. }
  1317. // else if(){}
  1318. else {
  1319. if (this.isDetele) return;
  1320. // 有2种 1是新页
  1321. // 2是点击反选
  1322. let idList = this.deleteList.map((course) => {
  1323. return course.id;
  1324. });
  1325. this.$nextTick(() => {
  1326. let tableIdList = [];
  1327. this.tableList.forEach((course) => {
  1328. tableIdList.push(course.id);
  1329. if (idList.indexOf(course.id) != -1) {
  1330. this.$refs.tableList.toggleRowSelection(course, false);
  1331. // 删除这个元素
  1332. }
  1333. });
  1334. this.deleteList = this.$helpers.lodash.remove(
  1335. this.deleteList,
  1336. function (item) {
  1337. return tableIdList.indexOf(item.id) == -1;
  1338. }
  1339. );
  1340. if (this.deleteList.length <= 0) {
  1341. this.clearCom();
  1342. }
  1343. });
  1344. }
  1345. },
  1346. gotoCourse(row) {
  1347. if (row.groupType == "MUSIC") {
  1348. this.$router.push({
  1349. path: "/teamList",
  1350. query: { search: row.musicGroupId },
  1351. });
  1352. } else if (row.groupType == "VIP") {
  1353. this.$router.push({
  1354. path: "/vipManager/vipList",
  1355. query: { search: row.musicGroupId },
  1356. });
  1357. } else if (row.groupType == "PRACTICE") {
  1358. this.$router.push({
  1359. path: "/accompanyManager/accompany",
  1360. query: { search: row.musicGroupId },
  1361. });
  1362. }
  1363. },
  1364. onTableSelect(rows, row) {
  1365. let idList = this.deleteList.map((course) => {
  1366. return course.id;
  1367. });
  1368. if (idList.indexOf(row.id) != -1) {
  1369. this.deleteList.splice(idList.indexOf(row.id), 1);
  1370. if (this.deleteList.length <= 0) {
  1371. this.clearCom();
  1372. }
  1373. }
  1374. },
  1375. getColor(str) {
  1376. let obj = {
  1377. NOT_START: "coruseGreen",
  1378. UNDERWAY: "courseYellow",
  1379. OVER: "courseRed",
  1380. };
  1381. return obj[str]
  1382. },
  1383. },
  1384. filters: {
  1385. isCall(val) {
  1386. if (val == 0) {
  1387. return "未点名";
  1388. } else if (val == 1) {
  1389. return "已点名";
  1390. }
  1391. },
  1392. },
  1393. watch: {
  1394. classVisible(val) {
  1395. if (!val) {
  1396. this.activeName = null;
  1397. }
  1398. },
  1399. "searchForm.courseIdSearch"(val) {},
  1400. },
  1401. };
  1402. </script>
  1403. <style lang="scss" scoped>
  1404. .courseRed{color: #808080;}
  1405. .courseYellow{color:#FF802C}
  1406. .coruseGreen{color:#01C1B5}
  1407. .visible {
  1408. visibility: hidden;
  1409. }
  1410. .cl-container {
  1411. .topFrom {
  1412. margin: 20px 30px 0;
  1413. .classlist {
  1414. display: flex;
  1415. flex-direction: row;
  1416. justify-content: flex-start;
  1417. align-items: center;
  1418. ul {
  1419. li {
  1420. list-style: none;
  1421. }
  1422. }
  1423. }
  1424. }
  1425. .searchForm {
  1426. margin: 0 30px;
  1427. }
  1428. }
  1429. .btnWraps {
  1430. display: flex;
  1431. flex-direction: row;
  1432. justify-content: flex-start;
  1433. div {
  1434. margin-right: 20px;
  1435. }
  1436. }
  1437. .inputStyle {
  1438. width: 180px;
  1439. }
  1440. .red {
  1441. color: red;
  1442. }
  1443. .green {
  1444. color: var(--color-primary);
  1445. }
  1446. .exportBtn {
  1447. background: var(--color-primary);
  1448. }
  1449. .newBand {
  1450. margin-top: 30px;
  1451. }
  1452. </style>