accompanys.vue 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418
  1. <template>
  2. <div class="m-container">
  3. <div class="titlewrap">
  4. <h2>
  5. <el-page-header @back="goBack" :content="name"></el-page-header>
  6. </h2>
  7. <p style="margin-bottom: 10px; margin-left: 30px">
  8. 课程有效期:{{ timers }}
  9. </p>
  10. </div>
  11. <!-- v-permission="'vipGroupManage/updateVipBaseInfo'" -->
  12. <div class="wrap">
  13. <div
  14. class="newBand"
  15. @click="resetTeachers"
  16. v-if="courseType && courseType != 'TRIAL'"
  17. v-permission="'courseSchedule/practiceGroupTeacherAdjust'"
  18. >
  19. 课程组调整
  20. </div>
  21. <!-- // accompanys/addCourse -->
  22. <div
  23. v-permission="{
  24. child: 'courseSchedule/batchAddCourses',
  25. parent: '/accompanys',
  26. }"
  27. class="newBand"
  28. @click="addCourse"
  29. >
  30. 网管课加课
  31. </div>
  32. <div
  33. class="newBand"
  34. v-if="courseType && courseType != 'TRIAL'"
  35. v-permission="'courseSchedule/batchUpdateCourseSchedule'"
  36. @click="adjustment"
  37. >
  38. 批量调整
  39. </div>
  40. <div
  41. class="newBand"
  42. v-permission="'courseSchedule/updateCoursesExpireDate'"
  43. @click="expireVisible = true"
  44. >
  45. 有效期调整
  46. </div>
  47. </div>
  48. <div class="tableWrap">
  49. <el-table
  50. :data="tableList"
  51. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  52. @selection-change="handleSelectionChange"
  53. >
  54. <el-table-column
  55. type="selection"
  56. :selectable="isDisabled"
  57. width="55"
  58. ></el-table-column>
  59. <el-table-column
  60. label="课程编号"
  61. align="center"
  62. prop="id"
  63. ></el-table-column>
  64. <el-table-column
  65. label="课程名称"
  66. align="center"
  67. prop="name"
  68. ></el-table-column>
  69. <el-table-column
  70. label="主教老师"
  71. align="center"
  72. prop="teacherName"
  73. ></el-table-column>
  74. <!-- <el-table-column label="主教老师" align="center" >
  75. <template slot-scope="scope">
  76. <div v-show="scope.row.teacher">
  77. {{scope.row.teacher.realName}}
  78. </div>
  79. </template>
  80. </el-table-column>-->
  81. <!-- <el-table-column label="班级id"
  82. align="center"
  83. prop="classGroupId">
  84. </el-table-column>-->
  85. <el-table-column label="上课日期" align="center" prop="classDate">
  86. <template slot-scope="scope">
  87. <div>
  88. {{ scope.row.classDate | formatTimer }}
  89. {{ scope.row.startClassTimeStr | timerForMinFormat }}~{{
  90. scope.row.endClassTimeStr | timerForMinFormat
  91. }}
  92. </div>
  93. </template>
  94. </el-table-column>
  95. <!-- <el-table-column label="开始时间"
  96. align="center"
  97. prop="startClassTimeStr">
  98. <template slot-scope="scope">
  99. <div>{{ scope.row.startClassTimeStr | timerForMinFormat}}</div>
  100. </template>
  101. </el-table-column>
  102. <el-table-column label="结束时间"
  103. align="center"
  104. prop="endClassTimeStr">
  105. <template slot-scope="scope">
  106. <div>{{ scope.row.endClassTimeStr | timerForMinFormat}}</div>
  107. </template>
  108. </el-table-column> -->
  109. <el-table-column label="是否点名" align="center" prop="status">
  110. <template slot-scope="scope">{{
  111. scope.row.isCallNames ? "是" : "否"
  112. }}</template>
  113. </el-table-column>
  114. <el-table-column label="课程状态" align="center" prop="status">
  115. <template slot-scope="scope">
  116. <div>{{ scope.row.status | coursesStatus }}</div>
  117. </template>
  118. </el-table-column>
  119. <el-table-column label="结算状态" align="center">
  120. <template slot-scope="scope">
  121. <div>{{ scope.row.isSettlement ? "已结算" : "未结算" }}</div>
  122. </template>
  123. </el-table-column>
  124. <!-- <el-table-column label="教学点" align="center" prop="schoolName">
  125. <template slot-scope="scope">
  126. <div>{{scope.row.schoolName?scope.row.schoolName:'网络教室'}}</div>
  127. </template>
  128. </el-table-column>-->
  129. <el-table-column
  130. label="操作"
  131. width="250px"
  132. align="center"
  133. fixed="right"
  134. >
  135. <template slot-scope="scope">
  136. <div>
  137. <el-button
  138. type="text"
  139. v-if="
  140. !scope.row.isSettlement &&
  141. permission('courseSchedule/practiceCourseAdjust')
  142. "
  143. @click="resetClass(scope.row)"
  144. >调整</el-button
  145. >
  146. <el-button
  147. type="text"
  148. v-if="
  149. !scope.row.isSettlement &&
  150. scope.row.status == 'NOT_START' &&
  151. permission('accompanys/remove')
  152. "
  153. @click="removeClass(scope.row)"
  154. >删除</el-button
  155. >
  156. <el-button
  157. type="text"
  158. v-if="
  159. scope.row.status == 'NOT_START' &&
  160. courseType != 'TRIAL' &&
  161. permission('courseSchedule/practiceCourseTeacherAdjust')
  162. "
  163. @click="resetTeacher(scope.row)"
  164. >更换老师</el-button
  165. >
  166. <el-button
  167. v-if="
  168. scope.row.status == 'OVER' &&
  169. scope.row.isSettlement == 0 &&
  170. permission(
  171. '/accompanys/teacherAttendance/updateTeacherAttendance'
  172. )
  173. "
  174. type="text"
  175. @click="onMarkAttendance(scope.row)"
  176. >补考勤</el-button
  177. >
  178. <!-- && permission('studentAttendance/updateStudentAttendances', '/accompanys') -->
  179. <el-button
  180. v-if="
  181. scope.row.status == 'OVER' &&
  182. permission(
  183. '/accompanys/studentAttendance/updateStudentAttendances'
  184. )
  185. "
  186. type="text"
  187. @click="onCallName(scope.row)"
  188. >点名表</el-button
  189. >
  190. <el-button
  191. type="text"
  192. v-if="
  193. !scope.row.isSettlement &&
  194. permission('accompanys/cleanAttendance')
  195. "
  196. @click="clearAttend(scope.row)"
  197. >清除考勤</el-button
  198. >
  199. </div>
  200. </template>
  201. </el-table-column>
  202. </el-table>
  203. <!-- <pagination :total="rules.total"
  204. :page.sync="rules.page"
  205. :limit.sync="rules.limit"
  206. :page-sizes="rules.page_size"
  207. @pagination="getList" /> 乔乔说后台没有分页所以一口气都展示-->
  208. </div>
  209. <el-dialog
  210. title="有效期调整"
  211. width="400px"
  212. :before-close="expireClose"
  213. :visible.sync="expireVisible"
  214. >
  215. <el-form
  216. :model="expireForm"
  217. ref="expireForm"
  218. :rules="expireRules"
  219. label-position="right"
  220. label-width="80px;"
  221. :inline="true"
  222. >
  223. <el-form-item label="有效期开始时间" prop="coursesStartDate">
  224. <el-date-picker
  225. v-model.trim="expireForm.coursesStartDate"
  226. style="width: 200px !important"
  227. type="date"
  228. :picker-options="startBigin()"
  229. value-format="yyyy-MM-dd"
  230. placeholder="选择日期"
  231. ></el-date-picker>
  232. </el-form-item>
  233. <el-form-item label="有效期结束时间" prop="coursesExpireDate">
  234. <el-date-picker
  235. v-model.trim="expireForm.coursesExpireDate"
  236. style="width: 200px !important"
  237. type="date"
  238. :picker-options="bigin"
  239. value-format="yyyy-MM-dd"
  240. placeholder="选择日期"
  241. ></el-date-picker>
  242. </el-form-item>
  243. <div style="padding-left: 15px; color: red">
  244. <p>有效期开始时间不得晚于课程组第一节课日期</p>
  245. <p>有效期结束时间不得早于课程组最后一节课日期</p>
  246. </div>
  247. </el-form>
  248. <div slot="footer" class="dialog-footer">
  249. <el-button @click="expireVisible = false">取 消</el-button>
  250. <el-button type="primary" @click="submitExpireDate">确 定</el-button>
  251. </div>
  252. </el-dialog>
  253. <el-dialog
  254. title="补考勤"
  255. width="400px"
  256. :visible.sync="markAttendance.status"
  257. >
  258. <el-form>
  259. <el-form-item label="签到状态">{{
  260. markAttendance.dataInfo.isSignIn | attendanceType
  261. }}</el-form-item>
  262. <el-form-item label="签到时间">{{
  263. markAttendance.dataInfo.signInTime
  264. }}</el-form-item>
  265. <el-form-item label="签退状态">{{
  266. markAttendance.dataInfo.isSignOut | attendanceOutType
  267. }}</el-form-item>
  268. <el-form-item label="签退时间">{{
  269. markAttendance.dataInfo.signOutTime
  270. }}</el-form-item>
  271. </el-form>
  272. <div slot="footer" class="dialog-footer">
  273. <el-button @click="markAttendance.status = false">取 消</el-button>
  274. <el-button
  275. type="primary"
  276. :disabled="
  277. markAttendance.dataInfo.isSignIn == 1 &&
  278. markAttendance.dataInfo.isSignOut == 1
  279. ? true
  280. : false
  281. "
  282. @click="batchAdjustmentTime"
  283. >确定补卡</el-button
  284. >
  285. </div>
  286. </el-dialog>
  287. <el-dialog
  288. title="课程调整"
  289. width="400px"
  290. :before-close="handleClose"
  291. :visible.sync="courseVisible"
  292. >
  293. <el-form
  294. :model="maskForm"
  295. ref="maskForm"
  296. :rules="maskRules"
  297. label-position="right"
  298. label-width="80px"
  299. :inline="true"
  300. >
  301. <el-form-item label="上课日期" prop="date" v-if="courseType != 'TRIAL'">
  302. <el-date-picker
  303. v-model.trim="maskForm.date"
  304. type="date"
  305. :picker-options="courseOption"
  306. value-format="yyyy-MM-dd"
  307. placeholder="选择日期"
  308. ></el-date-picker>
  309. </el-form-item>
  310. <!-- 试听课 -->
  311. <el-form-item label="上课日期" prop="date" v-else>
  312. <el-date-picker
  313. v-model.trim="maskForm.date"
  314. style="width: 200px !important"
  315. type="date"
  316. value-format="yyyy-MM-dd"
  317. :picker-options="bigin"
  318. placeholder="选择日期"
  319. ></el-date-picker>
  320. </el-form-item>
  321. <el-form-item
  322. label="开始时间"
  323. prop="startTime"
  324. :rules="[
  325. { required: true, message: '请选择开始时间', trigger: 'change' },
  326. ]"
  327. >
  328. <el-time-picker
  329. placeholder="起始时间"
  330. v-model="maskForm.startTime"
  331. @change="changeStartTime"
  332. format="HH:mm"
  333. value-format="HH:mm"
  334. :picker-options="{
  335. selectableRange: `04:00:00 - 23:30:00`,
  336. }"
  337. ></el-time-picker>
  338. </el-form-item>
  339. <el-form-item label="结束时间" prop="endTime">
  340. <el-time-picker
  341. placeholder="结束时间"
  342. format="HH:mm"
  343. value-format="HH:mm"
  344. v-model="maskForm.endTime"
  345. disabled
  346. >
  347. </el-time-picker>
  348. </el-form-item>
  349. <!-- v-show="maskForm.teachMode=='OFFLINE'"-->
  350. <!-- <el-form-item label="课程类型" prop="courseType">
  351. <el-select clearable v-model.trim="maskForm.teachMode">
  352. <el-option label="线上课" value="ONLINE"></el-option>
  353. <el-option label="线下课" value="OFFLINE"></el-option>
  354. </el-select>
  355. </el-form-item>-->
  356. <!-- <el-form-item label="教学地点" v-show="maskForm.teachMode == 'OFFLINE'">
  357. <el-select v-model.trim="maskForm.address" filterable clearable>
  358. <el-option
  359. v-for="(item,index) in schoolList"
  360. :key="index"
  361. :value="item.id"
  362. :label="item.name"
  363. ></el-option>
  364. </el-select>
  365. </el-form-item> 1-->
  366. </el-form>
  367. <div slot="footer" class="dialog-footer">
  368. <el-button @click="handleClose">取 消</el-button>
  369. <el-button type="primary" @click="submitResetClass">确 定</el-button>
  370. </div>
  371. </el-dialog>
  372. <el-dialog
  373. :title="isMultiple ? '课程组调整' : '更换老师'"
  374. width="400px"
  375. :before-close="teacherClose"
  376. :visible.sync="teacherVisible"
  377. >
  378. <el-form
  379. :model="teacherForm"
  380. ref="teacherForm"
  381. :rules="teacherRules"
  382. label-position="right"
  383. label-width="80px;"
  384. :inline="true"
  385. >
  386. <el-form-item label="课程班名称" v-show="isMultiple">
  387. <el-input v-model.trim="teacherForm.name" disabled></el-input>
  388. </el-form-item>
  389. <el-form-item label="课程组声部" v-show="isMultiple">
  390. <el-select
  391. v-model.trim="teacherForm.subjectId"
  392. @change="changeSound"
  393. filterable
  394. clearable
  395. >
  396. <el-option
  397. v-for="(item, index) in subjectList"
  398. :key="index"
  399. :value="item.id"
  400. :label="item.name"
  401. ></el-option>
  402. </el-select>
  403. </el-form-item>
  404. <el-form-item label="课程组老师" v-if="isMultiple">
  405. <el-select v-model.trim="teacherForm.teacher" filterable clearable>
  406. <el-option
  407. v-for="(item, index) in teacherList"
  408. :key="index"
  409. :value="item.id"
  410. :label="item.realName"
  411. ></el-option>
  412. </el-select>
  413. </el-form-item>
  414. <el-form-item label="指导老师" v-else="isMultiple">
  415. <el-select v-model.trim="teacherForm.teacher" filterable clearable>
  416. <el-option
  417. v-for="(item, index) in teacherList"
  418. :key="index"
  419. :value="item.id"
  420. :label="item.realName"
  421. ></el-option>
  422. </el-select>
  423. </el-form-item>
  424. <el-form-item label="乐团主管" v-show="isMultiple">
  425. <el-select
  426. v-model.trim="teacherForm.educationalTeacherId"
  427. filterable
  428. clearable
  429. >
  430. <el-option
  431. v-for="(item, index) in educationList"
  432. :key="index"
  433. :value="item.userId"
  434. :label="item.userName"
  435. ></el-option>
  436. </el-select>
  437. </el-form-item>
  438. <el-form-item v-if="isMultiple">
  439. <p style="color: #ff5353">
  440. *更改课程组老师,将更换全部未开始课程的老师
  441. </p>
  442. </el-form-item>
  443. </el-form>
  444. <div slot="footer" class="dialog-footer">
  445. <el-button @click="teacherVisible = false">取 消</el-button>
  446. <el-button type="primary" @click="subresetTeacher">确 定</el-button>
  447. </div>
  448. </el-dialog>
  449. <el-dialog
  450. :title="adjustmentName"
  451. width="800px"
  452. :visible.sync="adjustmentVisible"
  453. >
  454. <el-form
  455. :model="adjustmentForm"
  456. label-position="right"
  457. label-width="120px"
  458. ref="adjustmentForm"
  459. :rules="adjustmentRules"
  460. :inline="true"
  461. >
  462. <el-form-item label="已选择课时数" v-if="!isaddCourse">
  463. <el-input disabled v-model.trim="adjustmentForm.count"></el-input>
  464. </el-form-item>
  465. <el-form-item label="添加课时数" prop="addCount" v-if="isaddCourse">
  466. <el-input
  467. type="number"
  468. @mousewheel.native.prevent
  469. v-model.trim="adjustmentForm.addCount"
  470. ></el-input>
  471. </el-form-item>
  472. <br />
  473. <!-- <el-form-item label="单课费用" prop="fee" v-show="isaddCourse">
  474. <el-input v-model.trim="adjustmentForm.fee"></el-input>
  475. </el-form-item>-->
  476. <el-form-item label="排课起始时间" prop="courseTime">
  477. <el-date-picker
  478. v-model.trim="adjustmentForm.courseTime"
  479. :picker-options="pickerOptions"
  480. style="width: 200px !important"
  481. type="date"
  482. value-format="yyyy-MM-dd"
  483. placeholder="选择日期"
  484. ></el-date-picker>
  485. <el-checkbox
  486. style="margin-left: 10px"
  487. v-model.trim="adjustmentForm.checked"
  488. >是否跳过节假日</el-checkbox
  489. >
  490. </el-form-item>
  491. </el-form>
  492. <div class="WeekWrap">
  493. <h3 style="margin-bottom: 20px">
  494. 循环次数
  495. <el-button type="text" style="margin-left: 10px" @click="addWeek"
  496. >添加</el-button
  497. >
  498. </h3>
  499. <div class="countWrap" style="margin-bottom: 10px">
  500. <div
  501. class="countItem"
  502. style="margin-bottom: 20px"
  503. v-for="(item, index) in weekList"
  504. :key="index"
  505. >
  506. <span>循环周期:</span>
  507. <el-select v-model.trim="item.dayOfWeek" filterable clearable>
  508. <el-option
  509. v-for="(item, index) in weekDateList"
  510. :key="index"
  511. :label="item.label"
  512. :value="item.value"
  513. ></el-option>
  514. </el-select>
  515. <span style="margin-left: 10px">开始时间</span>
  516. <el-time-picker
  517. style="margin-left: 10px"
  518. placeholder
  519. v-model.trim="item.startClassTime"
  520. @change="
  521. (val) => {
  522. changeStartTimes(val, item);
  523. }
  524. "
  525. format="HH:mm"
  526. value-format="HH:mm"
  527. :picker-options="{
  528. selectableRange: '04:30:00 - 23:30:00',
  529. }"
  530. ></el-time-picker>
  531. <span style="margin-left: 10px">结束时间</span>
  532. <el-time-picker
  533. style="margin-left: 10px"
  534. placeholder
  535. v-model.trim="item.endClassTime"
  536. format="HH:mm"
  537. value-format="HH:mm"
  538. disabled
  539. :picker-options="{
  540. selectableRange: '04:30:00 - 23:30:00',
  541. }"
  542. ></el-time-picker>
  543. <el-button
  544. style="margin-left: 10px"
  545. type="danger"
  546. @click="removeWeek(item)"
  547. icon="el-icon-delete"
  548. circle
  549. ></el-button>
  550. </div>
  551. </div>
  552. </div>
  553. <div slot="footer" class="dialog-footer">
  554. <el-button @click="adjustmentVisible = false">取 消</el-button>
  555. <el-button
  556. type="primary"
  557. v-show="!isaddCourse"
  558. @click="submitAdjustment"
  559. >确 定</el-button
  560. >
  561. <el-button type="primary" v-show="isaddCourse" @click="addCourseSubmit"
  562. >确 定</el-button
  563. >
  564. </div>
  565. </el-dialog>
  566. <el-dialog title="点名表" width="700px" :visible.sync="rollCall.status">
  567. <el-table :data="rollCall.gridData">
  568. <el-table-column
  569. align="center"
  570. property="userName"
  571. label="学员姓名"
  572. ></el-table-column>
  573. <el-table-column
  574. align="center"
  575. property="phone"
  576. label="手机号"
  577. ></el-table-column>
  578. <el-table-column
  579. align="center"
  580. property="subjectName"
  581. label="学员声部"
  582. ></el-table-column>
  583. <el-table-column align="center" label="到课状态">
  584. <template slot-scope="scope">
  585. {{ scope.row.status | studentCallName }}
  586. </template>
  587. </el-table-column>
  588. <el-table-column
  589. align="center"
  590. label="操作"
  591. v-if="rollCall.selectItem.isSettlement == 0"
  592. width="220px"
  593. >
  594. <template slot-scope="scope">
  595. <el-button
  596. size="small"
  597. @click="onChangeRollCall('TRUANT', scope.row)"
  598. type="primary"
  599. round
  600. >未到</el-button
  601. >
  602. <el-button
  603. size="small"
  604. @click="onChangeRollCall('LEAVE', scope.row)"
  605. type="warning"
  606. round
  607. >请假</el-button
  608. >
  609. <el-button
  610. size="small"
  611. @click="onChangeRollCall('NORMAL', scope.row)"
  612. type="success"
  613. round
  614. >到课</el-button
  615. >
  616. </template>
  617. </el-table-column>
  618. </el-table>
  619. <pagination
  620. :total="rollCall.total"
  621. :page.sync="rollCall.page"
  622. :limit.sync="rollCall.limit"
  623. :page-sizes="rollCall.page_size"
  624. @pagination="getCallName"
  625. />
  626. </el-dialog>
  627. </div>
  628. </template>
  629. <script>
  630. import pagination from "@/components/Pagination/index";
  631. import { permission } from "@/utils/directivePage";
  632. import { nextMonthLastDay } from "@/utils/validate";
  633. import {
  634. findPracticeGroupCourseSchedules,
  635. practiceCourseAdjus,
  636. getTeacher,
  637. practiceGroupManage,
  638. practiceGroupTeacherAdjust,
  639. practiceCourseTeacherAdjust,
  640. cleanAttendance,
  641. batchAddCourses,
  642. getPracticeApplySubjects,
  643. batchUpdateCourseSchedule,
  644. findEducationUsers,
  645. updateTeacherAttendance,
  646. updateCoursesExpireDate,
  647. findAttendanceStudentByCourseWithPage,
  648. updateStudentAttendances,
  649. resetCourse,
  650. } from "@/api/buildTeam";
  651. import {
  652. vipCourseAdjust,
  653. batchAppendVipGroupCourses,
  654. bathDelete,
  655. } from "@/api/vipSeting";
  656. import merge from "webpack-merge";
  657. // import { start } from 'repl';
  658. import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
  659. import dayjs from "dayjs";
  660. let that;
  661. export default {
  662. components: {
  663. pagination,
  664. },
  665. data() {
  666. return {
  667. adjustmentName: "",
  668. isaddCourse: false,
  669. adjustmentVisible: false,
  670. expireVisible: false,
  671. isMultiple: true,
  672. name: "网管课程组",
  673. courseVisible: false,
  674. teacherVisible: false,
  675. Frules: null,
  676. FsearchForm: null,
  677. userId: null,
  678. activeRow: null,
  679. courseType: null,
  680. rules: {
  681. // 分页规则
  682. limit: 20, // 限制显示条数
  683. page: 1, // 当前页
  684. total: 0, // 总条数
  685. page_size: [10, 20, 50, 100], // 选择限制显示条数
  686. },
  687. tableList: [],
  688. teacherList: [],
  689. courseData: [],
  690. practiceId: null,
  691. subjectList: [],
  692. maskForm: {
  693. date: "",
  694. startTime: "",
  695. id: "",
  696. endTime: "",
  697. },
  698. adjustmentForm: {
  699. count: "",
  700. courseTime: "",
  701. checked: false,
  702. addCount: "",
  703. courseType: "",
  704. fee: "",
  705. },
  706. startTime: null,
  707. expireForm: {
  708. coursesExpireDate: null,
  709. coursesStartDate: null,
  710. tempCoursesExpireDate: null,
  711. },
  712. expireRules: {
  713. coursesStartDate: [
  714. { required: true, message: "请选择有效期开始时间", trigger: "blur" },
  715. ],
  716. coursesExpireDate: [
  717. { required: true, message: "请选择有效期结束时间", trigger: "blur" },
  718. ],
  719. },
  720. maskRules: {
  721. date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
  722. // startTime: [{ required: true, message: '请选择上课开始时间', trigger: 'blur' },],
  723. // endTime: [
  724. // { required: true, message: "请选择上课结束时间", trigger: "blur" }
  725. // ]
  726. },
  727. teacherRules: {
  728. teacher: [{ required: true, message: "请选择老师", trigger: "blur" }],
  729. subjectId: [{ required: true, message: "请选择声部", trigger: "blur" }],
  730. educationalTeacherId: [
  731. { required: true, message: "请选择乐团主管", trigger: "blur" },
  732. ],
  733. },
  734. teacherForm: {
  735. teacher: null,
  736. name: null,
  737. subjectId: null,
  738. educationalTeacherId: null,
  739. },
  740. courseOption: null,
  741. coursesExpireDate: null,
  742. adjustmentRules: {
  743. courseTime: [{ required: true, message: "请选择开始时间" }],
  744. addCount: [{ required: true, message: "请输入加课次数" }],
  745. courseType: [{ required: true, message: "请选择课程类型" }],
  746. fee: [{ required: true, message: "请输入费用" }],
  747. },
  748. pickerOptions: {
  749. firstDayOfWeek: 1,
  750. disabledDate(time) {
  751. return time.getTime() + 86400000 <= new Date().getTime();
  752. },
  753. },
  754. weekList: [
  755. {
  756. dayOfWeek: "",
  757. startTime: "",
  758. endTime: "",
  759. moid: new Date().getTime(),
  760. },
  761. ],
  762. weekDateList: [
  763. { value: "1", label: "星期一" },
  764. { value: "2", label: "星期二" },
  765. { value: "3", label: "星期三" },
  766. { value: "4", label: "星期四" },
  767. { value: "5", label: "星期五" },
  768. { value: "6", label: "星期六" },
  769. { value: "7", label: "星期日" },
  770. ],
  771. activeList: [],
  772. educationList: [],
  773. timers: null,
  774. markAttendance: {
  775. // 考勤状态
  776. status: false,
  777. dataInfo: {},
  778. },
  779. bigin: this.beginDate(),
  780. rollCall: {
  781. // 点名表
  782. status: false,
  783. gridData: [],
  784. selectItem: {}, // 选中状态
  785. limit: 10, // 限制显示条数
  786. page: 1, // 当前页
  787. total: 0, // 总条数
  788. page_size: [10, 20, 40, 50], // 选择限制显示条数
  789. },
  790. accompanTime: 25,
  791. };
  792. },
  793. created() {
  794. that = this;
  795. },
  796. mounted() {
  797. this.init();
  798. },
  799. methods: {
  800. init() {
  801. this.practiceId = this.$route.query.id;
  802. this.userId = this.$route.query.userId;
  803. this.courseType = this.$route.query.type;
  804. this.expireForm.coursesExpireDate = this.$route.query.coursesExpireDate;
  805. this.expireForm.coursesStartDate = this.$route.query.coursesStartDate;
  806. this.timers =
  807. this.$route.query.coursesStartDate +
  808. "至" +
  809. this.$route.query.coursesExpireDate;
  810. // 获取乐团主管
  811. findEducationUsers().then((res) => {
  812. if (res.code == 200) {
  813. this.educationList = res.data;
  814. }
  815. });
  816. // <!-- 状态 指导老师 活动方案-->
  817. getTeacher({ organId: this.organId }).then((res) => {
  818. if (res.code == 200) {
  819. this.teacherList = res.data;
  820. }
  821. });
  822. // 获取默认声部信息
  823. getPracticeApplySubjects().then((res) => {
  824. if (res.code == 200) {
  825. this.subjectList = res.data;
  826. }
  827. });
  828. // 获取课程组信息
  829. this.courseOption = this.coursesDate();
  830. this.getCourseGroup();
  831. this.getList();
  832. },
  833. onCallName(item) {
  834. // 点名表
  835. this.rollCall.page = 1;
  836. this.rollCall.selectItem = item;
  837. this.getCallName();
  838. },
  839. getCallName() {
  840. let rollCall = this.rollCall;
  841. let params = {
  842. page: rollCall.page,
  843. rows: rollCall.limit,
  844. courseScheduleId: rollCall.selectItem.id,
  845. };
  846. findAttendanceStudentByCourseWithPage(params).then((res) => {
  847. let result = res.data;
  848. rollCall.status = true;
  849. if (res.code == 200) {
  850. rollCall.gridData = result.rows;
  851. rollCall.total = result.total;
  852. }
  853. });
  854. },
  855. onChangeRollCall(type, row) {
  856. let rollCall = this.rollCall;
  857. let params = {
  858. courseScheduleId: rollCall.selectItem.id,
  859. studentAttendances: [
  860. {
  861. userId: row.studentId,
  862. status: type,
  863. },
  864. ],
  865. };
  866. updateStudentAttendances(params).then((res) => {
  867. if (res.code == 200) {
  868. this.$message.success("修改成功");
  869. row.status = type;
  870. this.getList();
  871. } else {
  872. this.$message.error(res.msg);
  873. }
  874. });
  875. },
  876. lookStudents(row) {
  877. let id = row.id;
  878. getStudyStudents({ courseScheduleId: id }).then((res) => {
  879. if (res.code == 200) {
  880. this.studentList = res.data;
  881. this.studentVisible = true;
  882. }
  883. });
  884. },
  885. getCourseGroup() {
  886. practiceGroupManage({ search: this.practiceId }).then((res) => {
  887. if (res.code == 200) {
  888. this.courseData = res.data.rows;
  889. if (this.courseData.length > 0) {
  890. this.name = this.courseData[0].name;
  891. let originalStartDate = this.courseData[0].coursesStartDate
  892. ? new Date(this.courseData[0].coursesStartDate)
  893. : new Date();
  894. let buyMonths = this.courseData[0].buyMonths;
  895. let lastDayNum = nextMonthLastDay(
  896. originalStartDate.getFullYear(),
  897. originalStartDate.getMonth() + buyMonths + 1
  898. );
  899. if (lastDayNum[2] >= originalStartDate.getDate()) {
  900. originalStartDate.setMonth(
  901. originalStartDate.getMonth() + buyMonths
  902. );
  903. } else {
  904. originalStartDate = new Date(lastDayNum.join("-"));
  905. }
  906. originalStartDate.setDate(originalStartDate.getDate() - 1);
  907. let overTime =
  908. originalStartDate.getFullYear() +
  909. "-" +
  910. (originalStartDate.getMonth() + 1) +
  911. "-" +
  912. originalStartDate.getDate();
  913. this.expireForm.tempCoursesExpireDate = overTime;
  914. }
  915. }
  916. });
  917. },
  918. permission(str, parent) {
  919. return permission(str, parent);
  920. },
  921. beginDate() {
  922. let self = this;
  923. return {
  924. firstDayOfWeek: 1,
  925. disabledDate(time) {
  926. if (self.expireForm.tempCoursesExpireDate) {
  927. return (
  928. new Date(self.expireForm.tempCoursesExpireDate).getTime() >
  929. time.getTime()
  930. );
  931. } else {
  932. return time.getTime() >= Date.now();
  933. //开始时间不选时,结束时间最大值小于等于当天
  934. }
  935. },
  936. };
  937. },
  938. startBigin(){
  939. let timer;
  940. if(this.tableList[0]?.classDate){
  941. timer = this.tableList[0]?.classDate
  942. }
  943. return {
  944. firstDayOfWeek: 1,
  945. disabledDate(time) {
  946. // 该时间不可调整到课程组第一节课程开始时间之后
  947. if (timer) {
  948. return (
  949. new Date(timer).getTime() <
  950. time.getTime()
  951. );
  952. } else {
  953. return time.getTime() >= Date.now()
  954. //开始时间不选时,结束时间最大值小于等于当天
  955. }
  956. },
  957. };
  958. },
  959. submitExpireDate() {
  960. this.$refs.expireForm.validate((some) => {
  961. if (some) {
  962. updateCoursesExpireDate({
  963. practiceGroupId: this.practiceId,
  964. coursesExpireDate: this.expireForm.coursesExpireDate,
  965. coursesStartDate: this.expireForm.coursesStartDate,
  966. }).then((res) => {
  967. if (res.code == 200) {
  968. this.$message.success("有效期修改成功");
  969. this.$router.push({
  970. query: merge(this.$route.query, { coursesStartDate: this.expireForm.coursesStartDate,coursesExpireDate:this.expireForm.coursesExpireDate }),
  971. });
  972. this.expireVisible = false;
  973. this.getCourseGroup();
  974. this.getList();
  975. } else {
  976. this.$message.error(res.msg);
  977. }
  978. });
  979. } else {
  980. return;
  981. }
  982. });
  983. },
  984. onMarkAttendance(item) {
  985. // 补考勤
  986. this.markAttendance = {
  987. status: true,
  988. dataInfo: item,
  989. };
  990. },
  991. batchAdjustmentTime() {
  992. let tempData = this.markAttendance.dataInfo;
  993. let params = {
  994. teacherId: tempData.actualTeacherId,
  995. courseScheduleId: tempData.id,
  996. signInStatus: 1,
  997. signOutStatus: 1,
  998. };
  999. updateTeacherAttendance(params).then((res) => {
  1000. if (res.code == 200) {
  1001. this.$message.success("补卡成功");
  1002. this.markAttendance.status = false;
  1003. this.getList();
  1004. } else {
  1005. this.$message.error(res.msg);
  1006. }
  1007. });
  1008. },
  1009. getList() {
  1010. // 乔乔说后台分页数据是假的所以不分页 page: this.rules.page, rows: this.rules.limit this.rules.total = res.data.pageInfo.total;
  1011. findPracticeGroupCourseSchedules({ practiceId: this.practiceId }).then(
  1012. (res) => {
  1013. if (res.code == 200) {
  1014. this.tableList = res.data.pageInfo.rows;
  1015. }
  1016. }
  1017. );
  1018. },
  1019. goBack() {
  1020. this.$store.dispatch("delVisitedViews", this.$route);
  1021. this.$router.push({
  1022. path: "/business/accompany",
  1023. });
  1024. },
  1025. teacherClose() {
  1026. this.isMultiple = false;
  1027. this.teacherForm.teacher = null;
  1028. this.teacherVisible = false;
  1029. },
  1030. handleClose() {
  1031. this.$refs["maskForm"].resetFields();
  1032. this.courseVisible = false;
  1033. // this.startTime = "";
  1034. // this.maskForm = {
  1035. // date: "",
  1036. // startTime: "",
  1037. // id: ""
  1038. // };
  1039. },
  1040. expireClose() {
  1041. this.expireVisible = false;
  1042. this.expireForm.coursesExpireDate = null;
  1043. this.$refs["expireForm"].resetFields();
  1044. },
  1045. submitResetClass() {
  1046. // endClassTimeStr: this.maskForm.endTime,
  1047. let maskForm = this.maskForm;
  1048. let diff = dayjs(maskForm.date + " " + maskForm.startTime).diff(
  1049. new Date(),
  1050. "second"
  1051. );
  1052. if (diff <= 0) {
  1053. this.$message.error("课程开始时间必须大于当前时间");
  1054. return;
  1055. }
  1056. this.$refs.maskForm.validate((valid) => {
  1057. if (valid) {
  1058. let obj = {
  1059. startClassTime: dayjs(
  1060. this.maskForm.date + " " + this.maskForm.startTime
  1061. ).format("YYYY-MM-DD HH:mm:ss"),
  1062. id: this.maskForm.id,
  1063. classDate: this.maskForm.date,
  1064. groupType: "PRACTICE",
  1065. };
  1066. resetCourse(obj).then((res) => {
  1067. if (res.code == 200) {
  1068. this.$message.success("修改成功");
  1069. this.courseVisible = false;
  1070. this.getList();
  1071. }
  1072. });
  1073. }
  1074. });
  1075. // if (!this.startTime) {
  1076. // this.$message.error("请填写修改时间");
  1077. // return;
  1078. // }
  1079. // let obj = {
  1080. // startClassTime: dayjs(this.maskForm.date + ' ' + this.startTime).format('YYYY-MM-DD HH:mm:ss'),
  1081. // id: this.maskForm.id,
  1082. // classDate: this.maskForm.date,
  1083. // groupType: 'PRACTICE'
  1084. // };
  1085. // resetCourse(obj).then(res => {
  1086. // if (res.code == 200) {
  1087. // this.$message.success("修改成功");
  1088. // this.courseVisible = false;
  1089. // this.getList();
  1090. // }
  1091. // });
  1092. },
  1093. resetClass(row) {
  1094. /**
  1095. * maskForm.startTime
  1096. *
  1097. */
  1098. this.$nextTick(() => {
  1099. this.maskForm = {
  1100. date: dayjs(row.classDate).format("YYYY-MM-DD"),
  1101. startTime: row.startClassTimeStr.substring(0, 5),
  1102. endTime: row.endClassTimeStr.substring(0, 5),
  1103. id: row.id,
  1104. };
  1105. // this.startTime = row.startClassTimeStr.substring(0, 5);
  1106. });
  1107. this.coursesExpireDate = row.coursesExpireDate;
  1108. // 修改课时
  1109. this.courseVisible = true;
  1110. },
  1111. resetTeacher(row) {
  1112. // 单节课
  1113. this.isMultiple = false;
  1114. this.activeRow = row;
  1115. this.teacherForm.teacher = row.actualTeacherId;
  1116. this.teacherVisible = true;
  1117. },
  1118. resetTeachers() {
  1119. // 课程组
  1120. this.isMultiple = true;
  1121. this.teacherForm.teacher = this.courseData[0].userId;
  1122. this.teacherForm.name = this.courseData[0].name;
  1123. this.teacherForm.subjectId = this.courseData[0].subjectId;
  1124. this.teacherForm.educationalTeacherId =
  1125. this.courseData[0].educationalTeacherId || null;
  1126. this.teacherVisible = true;
  1127. },
  1128. // 提交课程组修改
  1129. subresetTeacher() {
  1130. this.$refs.teacherForm.validate((some) => {
  1131. if (some) {
  1132. if (this.isMultiple) {
  1133. // 修改课程组老师
  1134. practiceGroupTeacherAdjust({
  1135. practiceGroupId: this.practiceId,
  1136. teacherId: this.teacherForm.teacher,
  1137. subjectId: this.teacherForm.subjectId,
  1138. educationalTeacherId: this.teacherForm.educationalTeacherId,
  1139. }).then((res) => {
  1140. if (res.code == 200) {
  1141. this.$message.success("修改成功");
  1142. this.getCourseGroup();
  1143. this.getList();
  1144. this.teacherVisible = false;
  1145. }
  1146. });
  1147. } else {
  1148. // 修改单节课老师
  1149. practiceCourseTeacherAdjust({
  1150. courseScheduleId: this.activeRow.id,
  1151. teacherId: this.teacherForm.teacher,
  1152. }).then((res) => {
  1153. if (res.code == 200) {
  1154. this.$message.success("修改成功");
  1155. this.getList();
  1156. this.teacherVisible = false;
  1157. }
  1158. });
  1159. }
  1160. } else {
  1161. return;
  1162. }
  1163. });
  1164. },
  1165. coursesDate() {
  1166. let self = this;
  1167. return {
  1168. firstDayOfWeek: 1,
  1169. disabledDate: (time) => {
  1170. // if (self.leftForm.courseStart) {
  1171. // let date = new Date(self.leftForm.courseStart.replace(/-/, "/"));
  1172. // coursesExpireDate
  1173. let date = new Date(this.coursesExpireDate.replace(/-/, "/"));
  1174. return (
  1175. time.getTime() > date.getTime() ||
  1176. time.getTime() + 86400000 <= new Date().getTime()
  1177. );
  1178. // }
  1179. // return;
  1180. },
  1181. };
  1182. },
  1183. // 是否允许批量调整
  1184. isDisabled(row, index) {
  1185. // || !row.isCallNames
  1186. if (row.isSettlement) {
  1187. return false;
  1188. } else {
  1189. return true;
  1190. }
  1191. },
  1192. onCourseExpireDate() {
  1193. // 修改课程有效期
  1194. },
  1195. adjustment() {
  1196. this.adjustmentName = "批量调整";
  1197. this.isaddCourse = false;
  1198. if (this.adjustmentForm.count <= 0) {
  1199. this.$message.error("请至少勾选一节课");
  1200. } else {
  1201. this.adjustmentVisible = true;
  1202. }
  1203. },
  1204. changeSound(val) {
  1205. if (val) {
  1206. this.subjectList.forEach((item) => {
  1207. if (item.id == val) {
  1208. let strArr = this.teacherForm.name.split("•");
  1209. this.teacherForm.name = item.name + "•" + strArr[1];
  1210. }
  1211. });
  1212. }
  1213. },
  1214. addWeek() {
  1215. // 添加循环周期
  1216. this.weekList.push({
  1217. dayOfWeek: "",
  1218. startClassTime: "",
  1219. endClassTime: "",
  1220. id: new Date(),
  1221. });
  1222. },
  1223. // 删除循环周
  1224. removeWeek(item) {
  1225. for (let i in this.weekList) {
  1226. if (this.weekList[i].id == item.id) {
  1227. this.weekList.splice(i, 1);
  1228. }
  1229. }
  1230. },
  1231. // 批量调整
  1232. submitAdjustment() {
  1233. this.$refs["adjustmentForm"].validate((item) => {
  1234. if (item) {
  1235. let week = this.weekList;
  1236. if (!week[0] || !week[0].startClassTime || !week[0].dayOfWeek) {
  1237. this.$message.error("至少排一节课");
  1238. return;
  1239. }
  1240. // 开始
  1241. let obj = {};
  1242. let idArr = this.activeList.map((item) => {
  1243. return item.id;
  1244. });
  1245. // courseScheduleIdList
  1246. let courseScheduleIdList = idArr;
  1247. obj.courseScheduleIdList = courseScheduleIdList;
  1248. obj.startDate = this.adjustmentForm.courseTime;
  1249. obj.coursesTimes = this.adjustmentForm.addCount;
  1250. obj.teachingArrangementList = this.weekList;
  1251. obj.isJumpHoliday = this.adjustmentForm.checked;
  1252. obj.musicGroupId = this.practiceId;
  1253. obj.teachMode = "ONLINE";
  1254. obj.type = "PRACTICE";
  1255. batchUpdateCourseSchedule(obj).then((res) => {
  1256. if (res.code == 200) {
  1257. this.$message.success("恭喜您修改成功");
  1258. this.adjustmentVisible = false;
  1259. this.getList();
  1260. }
  1261. });
  1262. }
  1263. });
  1264. },
  1265. handleSelectionChange(val) {
  1266. this.adjustmentForm.count = val.length;
  1267. this.activeList = val;
  1268. },
  1269. clearAttend(row) {
  1270. this.$confirm("是否清除考勤记录?", "提示", {
  1271. confirmButtonText: "确定",
  1272. cancelButtonText: "取消",
  1273. type: "warning",
  1274. })
  1275. .then(() => {
  1276. cleanAttendance({ courseScheduleIds: row.id }).then((res) => {
  1277. if (res.code == 200) {
  1278. this.$message.success("清除成功");
  1279. this.getList();
  1280. } else {
  1281. this.$message.error(res.msg);
  1282. }
  1283. });
  1284. })
  1285. .catch(() => {});
  1286. },
  1287. // 网管课加课弹窗
  1288. addCourse() {
  1289. this.adjustmentName = "网管课加课";
  1290. this.isaddCourse = true;
  1291. this.adjustmentVisible = true;
  1292. },
  1293. // 网管课加课提交
  1294. addCourseSubmit() {
  1295. this.$refs["adjustmentForm"].validate((item) => {
  1296. if (item) {
  1297. let week = this.weekList;
  1298. if (!week[0] || !week[0].startClassTime || !week[0].dayOfWeek) {
  1299. this.$message.error("至少排一节课");
  1300. return;
  1301. }
  1302. // 开始
  1303. let obj = {};
  1304. obj.startDate = this.adjustmentForm.courseTime;
  1305. obj.coursesTimes = this.adjustmentForm.addCount;
  1306. obj.teachingArrangementList = this.weekList;
  1307. obj.isJumpHoliday = this.adjustmentForm.checked;
  1308. obj.musicGroupId = this.practiceId;
  1309. obj.teachMode = "ONLINE";
  1310. obj.type = "PRACTICE";
  1311. batchAddCourses(obj).then((res) => {
  1312. if (res.code == 200) {
  1313. this.$message.success("恭喜您添加成功");
  1314. this.adjustmentVisible = false;
  1315. this.getList();
  1316. }
  1317. });
  1318. }
  1319. });
  1320. },
  1321. // 删除
  1322. removeClass(row) {
  1323. this.$confirm("是否删除该课程?", "提示", {
  1324. confirmButtonText: "确定",
  1325. cancelButtonText: "取消",
  1326. type: "warning",
  1327. }).then(() => {
  1328. bathDelete({ courseScheduleIds: row.id }).then((res) => {
  1329. if (res.code == 200) {
  1330. this.$message.success("删除成功");
  1331. this.getList();
  1332. }
  1333. });
  1334. });
  1335. },
  1336. changeStartTime(val) {
  1337. this.$nextTick((res) => {
  1338. if (val) {
  1339. this.$set(
  1340. this.maskForm,
  1341. "endTime",
  1342. addTimerFormMinute(this.maskForm.date, val, this.accompanTime)
  1343. );
  1344. } else {
  1345. this.$set(this.maskForm, "endTime", "");
  1346. }
  1347. });
  1348. },
  1349. changeStartTimes(val, item) {
  1350. this.$nextTick((res) => {
  1351. if (val) {
  1352. let str = dayjs(new Date()).format("YYYY-MM-DD");
  1353. this.$set(
  1354. item,
  1355. "endClassTime",
  1356. addTimerFormMinute(str, val, this.accompanTime)
  1357. );
  1358. } else {
  1359. this.$set(item, "endClassTime", "");
  1360. }
  1361. });
  1362. },
  1363. },
  1364. filters: {
  1365. studentCallName: (value) => {
  1366. let template = {
  1367. NORMAL: "到课",
  1368. TRUANT: "未到",
  1369. LEAVE: "请假",
  1370. DROP_OUT: "退学",
  1371. "": "未到",
  1372. };
  1373. return template[value];
  1374. },
  1375. },
  1376. watch: {
  1377. adjustmentVisible(val) {
  1378. if (!val) {
  1379. this.$refs.adjustmentForm.resetFields();
  1380. }
  1381. },
  1382. },
  1383. computed: {},
  1384. };
  1385. </script>
  1386. <style lang="scss" scoped>
  1387. .titlewrap {
  1388. display: flex;
  1389. flex-direction: row;
  1390. justify-content: flex-start;
  1391. align-items: center;
  1392. }
  1393. .wrap {
  1394. display: flex;
  1395. flex-direction: row;
  1396. justify-content: flex-start;
  1397. div {
  1398. margin-right: 20px;
  1399. }
  1400. }
  1401. .countWrap {
  1402. /deep/.el-date-editor.el-input,
  1403. /deep/.el-date-editor.el-input__inner {
  1404. width: 100px !important;
  1405. }
  1406. }
  1407. </style>