index.vue 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244
  1. <template>
  2. <div id="classHoursReview">
  3. <div style="margin-bottom: 10px">
  4. <el-button
  5. :size="size"
  6. :type="active === 1 ? 'primary' : ''"
  7. @click="changeActive(1)"
  8. >班级学员</el-button
  9. >
  10. <el-button
  11. :size="size"
  12. :type="active === 2 ? 'primary' : ''"
  13. @click="changeActive(2)"
  14. >学时管理</el-button
  15. >
  16. </div>
  17. <div class="dis_fs">
  18. <ul class="ul_ls">
  19. <li>学员编码:{{ userData.studentCode }}</li>
  20. <li>学员姓名:{{ realName }}</li>
  21. <li>学员身份证号码:{{ idCard }}</li>
  22. <li>绑定手机号码:{{ telPhone }}</li>
  23. </ul>
  24. <div class="photoSty1">
  25. <el-image
  26. style="width: 100%; height: 100%"
  27. :src="$methodsTools.splitImgHost(recent_photos)"
  28. :preview-src-list="[$methodsTools.splitImgHost(recent_photos)]"
  29. >
  30. </el-image>
  31. <div class="pos_bottom">一寸头像图</div>
  32. </div>
  33. <div class="photoSty2">
  34. <el-image
  35. style="width: 100%; height: 100%"
  36. :src="$methodsTools.splitImgHost(idcard_face_photo)"
  37. :preview-src-list="[$methodsTools.splitImgHost(idcard_face_photo)]"
  38. >
  39. </el-image>
  40. <div class="pos_bottom">身份证正面照片</div>
  41. </div>
  42. <div class="photoSty2" style="margin-right: 0px">
  43. <el-image
  44. style="width: 100%; height: 100%"
  45. :src="$methodsTools.splitImgHost(idcard_national_photo)"
  46. :preview-src-list="[
  47. $methodsTools.splitImgHost(idcard_national_photo),
  48. ]"
  49. >
  50. </el-image>
  51. <div class="pos_bottom">身份证背面照片</div>
  52. </div>
  53. </div>
  54. <div class="dis_fls">
  55. <div class="s_sd">
  56. <div class="dis_colu">
  57. <div class="jdNumSty" style="margin-bottom: 4px">
  58. 视频学习进度:{{ userData.stuAllNum }}/{{ userData.secAllNum }}
  59. {{
  60. userData.stuAllNum == 0 && userData.secAllNum == 0
  61. ? "0"
  62. : (userData.stuAllNum / userData.secAllNum) * 100
  63. }}% 通过:{{ userData.pass }}节
  64. <span style="color: #f56c6c">作弊:{{ userData.cheat }}节</span>
  65. <span style="color: #409eff"> 待审:{{ userData.pending }}节</span>
  66. </div>
  67. <div class="jdNumSty">
  68. 做题学习进度:{{ userData.recordNum }}/{{ userData.examNum }}
  69. {{
  70. userData.recordNum == 0 && userData.examNum == 0
  71. ? "0"
  72. : (userData.recordNum / userData.examNum) * 100
  73. }}% 通过:{{ userData.examPass }}节
  74. <span style="color: #f56c6c">作弊:{{ userData.examCheat }}节</span>
  75. <span style="color: #409eff">
  76. 待审:{{ userData.examPending }}节</span
  77. >
  78. </div>
  79. </div>
  80. <div class="shbtns">
  81. 学时审批状态:{{
  82. userData.allStatus === 1
  83. ? "未通过"
  84. : userData.allStatus === 0
  85. ? "待审核"
  86. : userData.allStatus === -1
  87. ? "不可审核"
  88. : userData.allStatus === 2
  89. ? "通过审核"
  90. : "未知状态,请联系管理员"
  91. }}
  92. </div>
  93. </div>
  94. <div class="s_sd">
  95. <div
  96. class="btnStys"
  97. @click="getChangeStatus(1)"
  98. v-if="userData.allStatus === 0 || userData.allStatus === 1"
  99. >
  100. 待审核全部通过
  101. </div>
  102. <div
  103. class="btnStys"
  104. @click="getChangeStatus(2)"
  105. v-if="userData.allStatus === 0 || userData.allStatus === 1"
  106. >
  107. 待审核全部作弊
  108. </div>
  109. </div>
  110. </div>
  111. <template v-for="(asrt, insrt) in 3">
  112. <el-table
  113. border
  114. v-loading="loading"
  115. :key="insrt"
  116. :data="
  117. listData[
  118. insrt === 0
  119. ? 'tableData1'
  120. : insrt === 1
  121. ? 'tableData2'
  122. : insrt === 2
  123. ? 'tableData3'
  124. : ''
  125. ]
  126. "
  127. style="width: 100%"
  128. :default-expand-all="false"
  129. :header-cell-style="
  130. insrt === 0
  131. ? {
  132. 'background-color': 'skyblue',
  133. padding: '8px',
  134. color: '#333',
  135. }
  136. : insrt === 1
  137. ? {
  138. 'background-color': 'rgb(255,255,204)',
  139. padding: '8px',
  140. color: '#333',
  141. }
  142. : insrt === 2
  143. ? {
  144. 'background-color': '#eee',
  145. padding: '8px',
  146. color: '#333',
  147. }
  148. : ''
  149. "
  150. >
  151. <!-- 插槽开始--------------------------------------------------------- -->
  152. <el-table-column
  153. :label="
  154. insrt === 0 ? '模块' : insrt === 1 ? '章' : insrt === 2 ? '节' : ''
  155. "
  156. type="expand"
  157. width="70px"
  158. >
  159. <template slot-scope="scope">
  160. <!-- type为3时使用该插槽START -->
  161. <div
  162. v-if="scope.row.type === 3 || scope.row.type === 4"
  163. class="dis_flexs"
  164. >
  165. <ul
  166. style="flex: 1"
  167. v-if="
  168. scope.row.userStudyRecordPhotoList &&
  169. scope.row.userStudyRecordPhotoList.length
  170. "
  171. >
  172. <li
  173. v-for="(its, inds) in scope.row.userStudyRecordPhotoList"
  174. :key="inds"
  175. class="liImgs"
  176. >
  177. <el-image
  178. style="width: 100%; height: 100%"
  179. :src="$methodsTools.splitImgHost(its.photo)"
  180. :preview-src-list="[$methodsTools.splitImgHost(its.photo)]"
  181. >
  182. </el-image>
  183. <div class="abos">
  184. {{ $methodsTools.onlyForma(its.createTime) }}
  185. </div>
  186. </li>
  187. <div style="clear: both"></div>
  188. </ul>
  189. <p v-else style="text-align: center; width: 100%">暂无拍照数据</p>
  190. <div
  191. class="styFlex"
  192. v-if="
  193. (userData.allStatus === 0 || userData.allStatus === 1) &&
  194. scope.row.periodStatus === 1
  195. "
  196. >
  197. <el-button
  198. :disabled="scope.row.status === 1"
  199. class="btnstyles"
  200. size="mini"
  201. @click="changeStatus(scope.row, 1, scope.$index)"
  202. >通过</el-button
  203. >
  204. <el-button
  205. :disabled="scope.row.status === 0"
  206. class="btnstyles"
  207. size="mini"
  208. @click="
  209. scope.row.status === 2 || scope.row.status === 3
  210. ? changeStatus(scope.row, 2, scope.$index)
  211. : ''
  212. "
  213. >作弊</el-button
  214. >
  215. </div>
  216. <!-- <div
  217. class="styFlex"
  218. v-if="
  219. (scope.row.allStatus === 0 || scope.row.allStatus === 1) &&
  220. scope.row.periodStatus === 1 &&
  221. scope.row.status === 0
  222. "
  223. >
  224. <el-button
  225. class="btnstyles"
  226. size="mini"
  227. @click="changeStatus(scope.row, 1, scope.$index)"
  228. >通过</el-button
  229. >
  230. </div> -->
  231. </div>
  232. <!-- type为3时使用该插槽END -->
  233. <!-- 章表格START -->
  234. <el-table
  235. v-else
  236. border
  237. :data="
  238. scope.row.type === 1
  239. ? scope.row.classPeriods
  240. : scope.row.type === 2
  241. ? scope.row.classPeriodSectionList
  242. : ''
  243. "
  244. style="width: 100%"
  245. :default-expand-all="false"
  246. :header-cell-style="
  247. scope.row.type === 1
  248. ? {
  249. 'background-color': 'rgb(255,255,204)',
  250. padding: '8px',
  251. color: '#333',
  252. }
  253. : scope.row.type === 2
  254. ? {
  255. 'background-color': '#eee',
  256. padding: '8px',
  257. color: '#333',
  258. }
  259. : ''
  260. "
  261. >
  262. <!-- 章插槽START -->
  263. <el-table-column
  264. type="expand"
  265. :label="
  266. scope.row.type === 1
  267. ? '章'
  268. : scope.row.type === 2
  269. ? '节/卷'
  270. : ''
  271. "
  272. :width="
  273. scope.row.type === 1
  274. ? '70px'
  275. : scope.row.type === 2
  276. ? '80px'
  277. : ''
  278. "
  279. >
  280. <template slot-scope="scope2">
  281. <!-- 节插槽START -->
  282. <div
  283. v-if="scope2.row.type === 3 || scope2.row.type === 4"
  284. class="dis_flexs"
  285. >
  286. <ul
  287. style="flex: 1"
  288. v-if="
  289. scope2.row.userStudyRecordPhotoList &&
  290. scope2.row.userStudyRecordPhotoList.length
  291. "
  292. >
  293. <li
  294. v-for="(its, inds) in scope2.row
  295. .userStudyRecordPhotoList"
  296. :key="inds"
  297. class="liImgs"
  298. >
  299. <el-image
  300. style="width: 100%; height: 100%"
  301. :src="$methodsTools.splitImgHost(its.photo)"
  302. :preview-src-list="[
  303. $methodsTools.splitImgHost(its.photo),
  304. ]"
  305. >
  306. </el-image>
  307. <div class="abos">
  308. {{ $methodsTools.onlyForma(its.createTime) }}
  309. </div>
  310. </li>
  311. <div style="clear: both"></div>
  312. </ul>
  313. <p v-else style="text-align: center; width: 100%">
  314. 暂无拍照数据
  315. </p>
  316. <div
  317. class="styFlex"
  318. v-if="
  319. (userData.allStatus === 0 ||
  320. userData.allStatus === 1) &&
  321. scope2.row.periodStatus === 1
  322. "
  323. >
  324. <el-button
  325. :disabled="scope2.row.status === 1"
  326. class="btnstyles"
  327. size="mini"
  328. @click="
  329. changeStatusCharpter(
  330. scope2.row,
  331. 1,
  332. scope.$index,
  333. scope2.$index
  334. )
  335. "
  336. >通过</el-button
  337. >
  338. <el-button
  339. :disabled="scope2.row.status === 0"
  340. class="btnstyles"
  341. size="mini"
  342. @click="
  343. scope2.row.status === 2 || scope2.row.status === 3
  344. ? changeStatusCharpter(
  345. scope2.row,
  346. 2,
  347. scope.$index,
  348. scope2.$index
  349. )
  350. : ''
  351. "
  352. >作弊</el-button
  353. >
  354. </div>
  355. <!-- <div
  356. class="styFlex"
  357. v-if="
  358. (scope2.row.allStatus === 0 ||
  359. scope2.row.allStatus === 1) &&
  360. scope2.row.periodStatus === 1 &&
  361. scope2.row.status === 0
  362. "
  363. >
  364. <el-button
  365. class="btnstyles"
  366. size="mini"
  367. @click="
  368. changeStatusCharpter(
  369. scope2.row,
  370. 1,
  371. scope.$index,
  372. scope2.$index
  373. )
  374. "
  375. >通过</el-button
  376. >
  377. </div> -->
  378. </div>
  379. <!-- 节插槽END -->
  380. <!-- 节表格START -->
  381. <el-table
  382. v-else
  383. border
  384. :data="
  385. scope2.row.type === 2
  386. ? scope2.row.classPeriodSectionList
  387. : ''
  388. "
  389. style="width: 100%"
  390. :default-expand-all="false"
  391. :header-cell-style="
  392. scope2.row.type === 2
  393. ? {
  394. 'background-color': '#eee',
  395. padding: '8px',
  396. color: '#333',
  397. }
  398. : ''
  399. "
  400. >
  401. <!-- 节插槽START -->
  402. <el-table-column
  403. type="expand"
  404. :label="scope2.row.type === 2 ? '节/卷' : ''"
  405. width="80px"
  406. >
  407. <template slot-scope="scope3">
  408. <div
  409. v-if="scope3.row.type === 3 || scope3.row.type === 4"
  410. class="dis_flexs"
  411. >
  412. <ul
  413. style="flex: 1"
  414. v-if="
  415. scope3.row.userStudyRecordPhotoList &&
  416. scope3.row.userStudyRecordPhotoList.length
  417. "
  418. >
  419. <li
  420. v-for="(its, inds) in scope3.row
  421. .userStudyRecordPhotoList"
  422. :key="inds"
  423. class="liImgs"
  424. >
  425. <el-image
  426. style="width: 100%; height: 100%"
  427. :src="$methodsTools.splitImgHost(its.photo)"
  428. :preview-src-list="[
  429. $methodsTools.splitImgHost(its.photo),
  430. ]"
  431. >
  432. </el-image>
  433. <div class="abos">
  434. {{ $methodsTools.onlyForma(its.createTime) }}
  435. </div>
  436. </li>
  437. <div style="clear: both"></div>
  438. </ul>
  439. <p v-else style="text-align: center; width: 100%">
  440. 暂无拍照数据
  441. </p>
  442. <div
  443. class="styFlex"
  444. v-if="
  445. (userData.allStatus === 0 ||
  446. userData.allStatus === 1) &&
  447. scope3.row.periodStatus === 1
  448. "
  449. >
  450. <el-button
  451. :disabled="scope3.row.status === 1"
  452. class="btnstyles"
  453. size="mini"
  454. @click="
  455. changeStatusModule(
  456. scope3.row,
  457. 1,
  458. scope.$index,
  459. scope2.$index,
  460. scope3.$index
  461. )
  462. "
  463. >通过</el-button
  464. >
  465. <el-button
  466. :disabled="scope3.row.status === 0"
  467. class="btnstyles"
  468. size="mini"
  469. @click="
  470. scope3.row.status === 2 ||
  471. scope3.row.status === 3
  472. ? changeStatusModule(
  473. scope3.row,
  474. 2,
  475. scope.$index,
  476. scope2.$index,
  477. scope3.$index
  478. )
  479. : ''
  480. "
  481. >作弊</el-button
  482. >
  483. </div>
  484. <!-- <div
  485. class="styFlex"
  486. v-if="
  487. (scope3.row.allStatus === 0 ||
  488. scope3.row.allStatus === 1) &&
  489. scope3.row.periodStatus === 1 &&
  490. scope3.row.status === 0
  491. "
  492. >
  493. <el-button
  494. class="btnstyles"
  495. size="mini"
  496. @click="
  497. changeStatusModule(
  498. scope3.row,
  499. 1,
  500. scope.$index,
  501. scope2.$index,
  502. scope3.$index
  503. )
  504. "
  505. >通过</el-button
  506. >
  507. </div> -->
  508. </div>
  509. </template>
  510. </el-table-column>
  511. <!-- 节插槽END -->
  512. <template
  513. v-for="(item, index) in scope2.row.type === 2
  514. ? tableSet3
  515. : ''"
  516. >
  517. <el-table-column
  518. :width="item.width"
  519. :key="index"
  520. :label="item.label"
  521. align="center"
  522. >
  523. <template slot-scope="scope3">
  524. <span v-if="item.scope === 'select'">
  525. <span v-for="(k, ds) in item.options" :key="ds">
  526. {{
  527. k.value == scope3.row[item.prop] ? k.label : ""
  528. }}
  529. </span>
  530. </span>
  531. <div v-else-if="item.scope === 'activeNum'">
  532. <el-select
  533. v-model="scope3.row[item.prop]"
  534. placeholder="请选择"
  535. @change="
  536. getNewListMores(
  537. scope.$index,
  538. scope2.$index,
  539. scope3.$index,
  540. $event,
  541. scope3.row
  542. )
  543. "
  544. >
  545. <el-option
  546. v-for="(items, indexs) in scope3.row['numList']"
  547. :key="indexs"
  548. :label="'第' + items + '次审核记录'"
  549. :value="items"
  550. >
  551. </el-option>
  552. </el-select>
  553. </div>
  554. <span v-else-if="item.scope === 'typeOptions'">
  555. <span v-for="(is, ds) in item.options" :key="ds">
  556. <span v-if="is.value === scope3.row[item.prop]">{{
  557. is.label
  558. }}</span>
  559. </span>
  560. </span>
  561. <span v-else-if="item.scope === 'aTime'">
  562. {{ $methodsTools.onlyForma(scope3.row[item.prop]) }}
  563. </span>
  564. <span v-else> {{ scope3.row[item.prop] }} </span>
  565. </template>
  566. </el-table-column>
  567. </template>
  568. </el-table>
  569. <!-- 节表格END -->
  570. </template>
  571. </el-table-column>
  572. <!-- 章插槽END -->
  573. <template
  574. v-for="(item, index) in scope.row.type === 1
  575. ? tableSet2
  576. : scope.row.type === 2
  577. ? tableSet3
  578. : ''"
  579. >
  580. <el-table-column
  581. :width="item.width"
  582. :key="index"
  583. :label="item.label"
  584. align="center"
  585. >
  586. <template slot-scope="scope2">
  587. <span v-if="item.scope === 'select'">
  588. <span v-for="(k, ds) in item.options" :key="ds">
  589. {{ k.value == scope2.row[item.prop] ? k.label : "" }}
  590. </span>
  591. </span>
  592. <div v-else-if="item.scope === 'activeNum'">
  593. <el-select
  594. v-model="scope2.row[item.prop]"
  595. placeholder="请选择"
  596. @change="
  597. getNewListchapt(
  598. scope.$index,
  599. scope2.$index,
  600. $event,
  601. scope2.row
  602. )
  603. "
  604. >
  605. <el-option
  606. v-for="(items, indexs) in scope2.row['numList']"
  607. :key="indexs"
  608. :label="'第' + items + '次审核记录'"
  609. :value="items"
  610. >
  611. </el-option>
  612. </el-select>
  613. </div>
  614. <span v-else-if="item.scope === 'typeOptions'">
  615. <span v-for="(is, ds) in item.options" :key="ds">
  616. <span v-if="is.value === scope2.row[item.prop]">{{
  617. is.label
  618. }}</span>
  619. </span>
  620. </span>
  621. <span v-else-if="item.scope === 'aTime'">
  622. {{ $methodsTools.onlyForma(scope2.row[item.prop]) }}
  623. </span>
  624. <span v-else> {{ scope2.row[item.prop] }} </span>
  625. </template>
  626. </el-table-column>
  627. </template>
  628. </el-table>
  629. <!-- 章表格END -->
  630. </template>
  631. </el-table-column>
  632. <!-- 插槽结束--------------------------------------------------------- -->
  633. <template
  634. v-for="(item, index) in insrt === 0
  635. ? tableSet1
  636. : insrt === 1
  637. ? tableSet2
  638. : insrt === 2
  639. ? tableSet3
  640. : ''"
  641. >
  642. <el-table-column
  643. :width="item.width"
  644. :key="index"
  645. :label="item.label"
  646. align="center"
  647. >
  648. <template slot-scope="scope">
  649. <span v-if="item.scope === 'select'">
  650. <span v-for="(k, ds) in item.options" :key="ds">
  651. {{ k.value == scope.row[item.prop] ? k.label : "" }}
  652. </span>
  653. </span>
  654. <div v-else-if="item.scope === 'activeNum'">
  655. <el-select
  656. v-model="scope.row[item.prop]"
  657. placeholder="请选择"
  658. @change="getNewList(scope.$index, $event, scope.row)"
  659. >
  660. <el-option
  661. v-for="(items, indexs) in scope.row['numList']"
  662. :key="indexs"
  663. :label="'第' + items + '次审核记录'"
  664. :value="items"
  665. >
  666. </el-option>
  667. </el-select>
  668. </div>
  669. <span v-else-if="item.scope === 'typeOptions'">
  670. <span v-for="(is, ds) in item.options" :key="ds">
  671. <span v-if="is.value === scope.row[item.prop]">{{
  672. is.label
  673. }}</span>
  674. </span>
  675. </span>
  676. <span v-else-if="item.scope === 'aTime'">
  677. {{ $methodsTools.onlyForma(scope.row[item.prop]) }}
  678. </span>
  679. <span v-else>
  680. {{ scope.row[item.prop] }}{{ item.ch ? item.ch : "" }}
  681. </span>
  682. </template>
  683. </el-table-column>
  684. </template>
  685. </el-table>
  686. </template>
  687. </div>
  688. </template>
  689. <script>
  690. export default {
  691. data() {
  692. return {
  693. size: "medium",
  694. active: "",
  695. loading: false,
  696. studentCode: "",
  697. realName: "",
  698. idCard: "",
  699. telPhone: "",
  700. recent_photos: "",
  701. idcard_face_photo: "",
  702. idcard_national_photo: "",
  703. arr: ["tableData1", "tableData2", "tableData3"],
  704. listData: {
  705. tableData1: [],
  706. tableData2: [],
  707. tableData3: [],
  708. },
  709. userData: {},
  710. tableData: [],
  711. tableSet1: [
  712. {
  713. label: "姓名",
  714. prop: "realName",
  715. },
  716. {
  717. label: "模块标题",
  718. prop: "typeName",
  719. },
  720. {
  721. label: "学时",
  722. prop: "classHours",
  723. },
  724. ],
  725. tableSet2: [
  726. {
  727. label: "姓名",
  728. prop: "realName",
  729. },
  730. {
  731. label: "章标题",
  732. prop: "typeName",
  733. },
  734. {
  735. label: "学时",
  736. prop: "classHours",
  737. },
  738. {
  739. label: "开始学习时间",
  740. prop: "studyStartTime",
  741. scope: "aTime",
  742. },
  743. {
  744. label: "结束学习时间",
  745. prop: "studyEndTime",
  746. scope: "aTime",
  747. },
  748. {
  749. label: "测试成绩",
  750. prop: "performance",
  751. },
  752. ],
  753. tableSet3: [
  754. {
  755. label: "选择",
  756. prop: "numIndex",
  757. scope: "activeNum",
  758. width: "180px",
  759. },
  760. {
  761. label: "姓名",
  762. prop: "realName",
  763. },
  764. {
  765. label: "标题",
  766. prop: "typeName",
  767. },
  768. {
  769. label: "类型",
  770. prop: "type",
  771. scope: "typeOptions",
  772. options: [
  773. {
  774. label: "节",
  775. value: 3,
  776. },
  777. {
  778. label: "试卷",
  779. value: 4,
  780. },
  781. ],
  782. },
  783. {
  784. label: "开始时间",
  785. prop: "studyStartTime",
  786. scope: "aTime",
  787. },
  788. {
  789. label: "结束时间",
  790. prop: "studyEndTime",
  791. scope: "aTime",
  792. },
  793. {
  794. label: "审核状态",
  795. prop: "status",
  796. scope: "select",
  797. options: [
  798. {
  799. label: "待审核",
  800. value: 2,
  801. },
  802. {
  803. label: "通过",
  804. value: 1,
  805. },
  806. {
  807. label: "作弊",
  808. value: 0,
  809. },
  810. ],
  811. },
  812. {
  813. label: "审核时间",
  814. prop: "auditTime",
  815. scope: "aTime",
  816. },
  817. ],
  818. tableSet4: [
  819. {
  820. label: "选择",
  821. prop: "numIndex",
  822. scope: "activeNum",
  823. width: "180px",
  824. },
  825. {
  826. label: "姓名",
  827. prop: "realName",
  828. },
  829. {
  830. label: "题卷标题",
  831. prop: "typeName",
  832. },
  833. {
  834. label: "开始做题时间",
  835. prop: "studyStartTime",
  836. scope: "aTime",
  837. },
  838. {
  839. label: "结束做题时间",
  840. prop: "studyEndTime",
  841. scope: "aTime",
  842. },
  843. {
  844. label: "审核状态",
  845. prop: "status",
  846. scope: "select",
  847. options: [
  848. {
  849. label: "待审核",
  850. value: 2,
  851. },
  852. {
  853. label: "通过",
  854. value: 1,
  855. },
  856. {
  857. label: "作弊",
  858. value: 0,
  859. },
  860. ],
  861. },
  862. {
  863. label: "审核时间",
  864. prop: "auditTime",
  865. scope: "aTime",
  866. },
  867. ],
  868. tableDataChild: {},
  869. tableSetChild: [],
  870. };
  871. },
  872. mounted() {
  873. this.getUserInfo();
  874. this.search();
  875. },
  876. methods: {
  877. /**
  878. * 通过 作弊 periodId
  879. */
  880. changeStatus(item, int, index) {
  881. var data = {
  882. id: item.periodStatusId,
  883. };
  884. if (int === 1) {
  885. data.status = 1;
  886. }
  887. if (int === 2) {
  888. data.status = 0;
  889. }
  890. this.$api.editGradeUsereditPeriode(data).then((res) => {
  891. this.$message.success("修改成功");
  892. this.getNewList(index, item.numIndex, item);
  893. });
  894. },
  895. changeStatusCharpter(item, int, index1, index2) {
  896. var data = {
  897. id: item.periodStatusId,
  898. };
  899. if (int === 1) {
  900. data.status = 1;
  901. }
  902. if (int === 2) {
  903. data.status = 0;
  904. }
  905. this.$api.editGradeUsereditPeriode(data).then((res) => {
  906. this.$message.success("修改成功");
  907. this.getNewListchapt(index1, index2, item.numIndex, item);
  908. });
  909. },
  910. changeStatusModule(item, int, index1, index2, index3) {
  911. var data = {
  912. id: item.periodStatusId,
  913. };
  914. if (int === 1) {
  915. data.status = 1;
  916. }
  917. if (int === 2) {
  918. data.status = 0;
  919. }
  920. this.$api.editGradeUsereditPeriode(data).then((res) => {
  921. this.$message.success("修改成功");
  922. this.getNewListMores(index1, index2, index3, item.numIndex, item);
  923. });
  924. },
  925. //批量审批
  926. getChangeStatus(int) {
  927. var data = {
  928. gradeId: Number(this.$route.query.id),
  929. userId: Number(this.$route.query.userId),
  930. goodsId: Number(this.$route.query.goodsId),
  931. };
  932. if (int === 1) {
  933. data.status = 1;
  934. }
  935. if (int === 2) {
  936. data.status = 0;
  937. }
  938. this.$api.editGradeUsereditPeriodeAll(data).then((res) => {
  939. if (int === 1) {
  940. this.$message.success("状态全部通过修改成功");
  941. }
  942. if (int === 2) {
  943. this.$message.success("状态全部作弊修改成功");
  944. }
  945. this.getUserInfo();
  946. this.search();
  947. });
  948. },
  949. //节
  950. getNewList(index, int, item) {
  951. let data = {
  952. courseId: item.courseId,
  953. moduleId: item.moduleId,
  954. chapterId: item.chapterId,
  955. numIndex: int,
  956. userId: this.$route.query.userId,
  957. goodsId: this.$route.query.goodsId,
  958. gradeId: this.$route.query.id,
  959. };
  960. if (item.type === 3) {
  961. data.sectionId = item.id;
  962. }
  963. if (item.type === 4) {
  964. data.examId = item.id;
  965. }
  966. this.$api.inquireGradegradelistPeriodAuditStatus(data).then((res) => {
  967. this.$set(this.listData.tableData3, index, res.data);
  968. this.getUserInfo();
  969. });
  970. },
  971. //章 节
  972. getNewListchapt(a, b, int, item) {
  973. let data = {
  974. courseId: item.courseId,
  975. moduleId: item.moduleId,
  976. chapterId: item.chapterId,
  977. numIndex: int,
  978. userId: this.$route.query.userId,
  979. goodsId: this.$route.query.goodsId,
  980. gradeId: this.$route.query.id,
  981. };
  982. if (item.type === 3) {
  983. data.sectionId = item.id;
  984. }
  985. if (item.type === 4) {
  986. data.examId = item.id;
  987. }
  988. this.$api.inquireGradegradelistPeriodAuditStatus(data).then((res) => {
  989. this.$set(
  990. this.listData.tableData2[a].classPeriodSectionList,
  991. b,
  992. res.data
  993. );
  994. this.getUserInfo();
  995. });
  996. },
  997. //模块 章 节
  998. getNewListMores(a, b, c, int, item) {
  999. let data = {
  1000. courseId: item.courseId,
  1001. moduleId: item.moduleId,
  1002. chapterId: item.chapterId,
  1003. numIndex: int,
  1004. userId: this.$route.query.userId,
  1005. goodsId: this.$route.query.goodsId,
  1006. gradeId: this.$route.query.id,
  1007. };
  1008. if (item.type === 3) {
  1009. data.sectionId = item.id;
  1010. }
  1011. if (item.type === 4) {
  1012. data.examId = item.id;
  1013. }
  1014. this.$api.inquireGradegradelistPeriodAuditStatus(data).then((res) => {
  1015. this.$set(
  1016. this.listData.tableData1[a].classPeriods[b].classPeriodSectionList,
  1017. c,
  1018. res.data
  1019. );
  1020. this.getUserInfo();
  1021. });
  1022. },
  1023. //获取用户信息
  1024. getUserInfo() {
  1025. this.$api
  1026. .inquireGradegradelistUserlistPeriod({
  1027. gradeId: this.$route.query.id,
  1028. userId: this.$route.query.userId,
  1029. goodsId: this.$route.query.goodsId,
  1030. })
  1031. .then((res) => {
  1032. if (res.rows[0].keyValue) {
  1033. var data = JSON.parse(res.rows[0].keyValue);
  1034. this.recent_photos = data.recent_photos.value;
  1035. this.idcard_face_photo = data.idcard_face_photo.value;
  1036. this.idcard_national_photo = data.idcard_national_photo.value;
  1037. this.realName = data.name.value;
  1038. this.idCard = data.idcard.value;
  1039. this.telPhone = data.telphone.value;
  1040. }
  1041. this.userData = res.rows[0];
  1042. });
  1043. },
  1044. search() {
  1045. let data = {
  1046. gradeId: this.$route.query.id,
  1047. userId: this.$route.query.userId,
  1048. goodsId: this.$route.query.goodsId,
  1049. };
  1050. this.loading = true;
  1051. this.$api
  1052. .inquireGradegradelistPeriodAudit(data)
  1053. .then((res) => {
  1054. let tab1 = [];
  1055. let tab2 = [];
  1056. let tab3 = [];
  1057. for (let i = 0; i < res.rows.length; i++) {
  1058. if (res.rows[i].type === 1) {
  1059. tab1.push(res.rows[i]);
  1060. }
  1061. if (res.rows[i].type === 2) {
  1062. tab2.push(res.rows[i]);
  1063. }
  1064. if (res.rows[i].type === 3) {
  1065. tab3.push(res.rows[i]);
  1066. }
  1067. }
  1068. this.listData.tableData1 = tab1;
  1069. this.listData.tableData2 = tab2;
  1070. this.listData.tableData3 = tab3;
  1071. })
  1072. .finally(() => {
  1073. this.loading = false;
  1074. });
  1075. },
  1076. //切换顶部BTN
  1077. changeActive(int) {
  1078. if (int === 1) {
  1079. this.active = int;
  1080. this.$router.push({
  1081. path: "studentMenu",
  1082. query: {
  1083. id: this.$route.query.id,
  1084. },
  1085. });
  1086. }
  1087. if (int === 2) {
  1088. this.active = int;
  1089. this.$router.push({
  1090. path: "classHours",
  1091. query: {
  1092. id: this.$route.query.id,
  1093. },
  1094. });
  1095. }
  1096. },
  1097. },
  1098. };
  1099. </script>
  1100. <style lang="less" scoped>
  1101. .styFlex {
  1102. width: 80px;
  1103. text-align: center;
  1104. }
  1105. .btnstyles {
  1106. margin-left: 0px;
  1107. margin-bottom: 10px;
  1108. }
  1109. .dis_flexs {
  1110. display: flex;
  1111. align-items: center;
  1112. }
  1113. .dis_fs {
  1114. display: flex;
  1115. align-items: center;
  1116. height: 211px;
  1117. background-color: #eee;
  1118. padding: 0px 30px;
  1119. overflow: auto;
  1120. .ul_ls {
  1121. margin-right: 30px;
  1122. align-self: flex-start;
  1123. li {
  1124. font-size: 14px;
  1125. white-space: nowrap;
  1126. margin-bottom: 14px;
  1127. }
  1128. }
  1129. &::-webkit-scrollbar {
  1130. width: 14px;
  1131. height: 14px;
  1132. }
  1133. &::-webkit-scrollbar-track,
  1134. &::-webkit-scrollbar-thumb {
  1135. border-radius: 999px;
  1136. border: 5px solid transparent;
  1137. }
  1138. &::-webkit-scrollbar-track {
  1139. box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2) inset;
  1140. }
  1141. &::-webkit-scrollbar-thumb {
  1142. min-height: 20px;
  1143. background-clip: content-box;
  1144. box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.2) inset;
  1145. }
  1146. &::-webkit-scrollbar-corner {
  1147. background: transparent;
  1148. }
  1149. }
  1150. .photoSty1 {
  1151. flex-shrink: 0;
  1152. width: 150px;
  1153. height: 160px;
  1154. background-color: #fff;
  1155. margin-right: 60px;
  1156. position: relative;
  1157. }
  1158. .photoSty2 {
  1159. position: relative;
  1160. flex-shrink: 0;
  1161. width: 230px;
  1162. height: 160px;
  1163. margin-right: 60px;
  1164. background-color: #fff;
  1165. }
  1166. .pos_bottom {
  1167. position: absolute;
  1168. height: 20px;
  1169. bottom: 0px;
  1170. left: 0px;
  1171. right: 0px;
  1172. background-color: rgba(0, 0, 0, 0.8);
  1173. text-align: center;
  1174. line-height: 20px;
  1175. font-size: 14px;
  1176. color: #fff;
  1177. }
  1178. .dis_fls {
  1179. margin: 16px 0px;
  1180. display: flex;
  1181. align-items: center;
  1182. justify-content: space-between;
  1183. flex-wrap: wrap;
  1184. .s_sd {
  1185. display: flex;
  1186. align-items: center;
  1187. flex-shrink: 0;
  1188. margin-bottom: 10px;
  1189. .dis_colu {
  1190. height: 55px;
  1191. margin-right: 14px;
  1192. display: flex;
  1193. flex-direction: column;
  1194. justify-content: space-around;
  1195. font-size: 14px;
  1196. }
  1197. }
  1198. }
  1199. .jdNumSty {
  1200. border: 1px solid #000;
  1201. border-radius: 6px;
  1202. padding: 6px;
  1203. }
  1204. .shbtns {
  1205. padding: 0px 10px;
  1206. height: 55px;
  1207. line-height: 55px;
  1208. background-color: #eee;
  1209. border-radius: 6px;
  1210. }
  1211. .btnStys {
  1212. border: 1px solid #666;
  1213. padding: 0px 8px;
  1214. border-radius: 4px;
  1215. font-size: 15px;
  1216. margin-right: 8px;
  1217. cursor: pointer;
  1218. }
  1219. .liImgs {
  1220. float: left;
  1221. width: 250px;
  1222. height: 250px;
  1223. margin-right: 20px;
  1224. margin-bottom: 20px;
  1225. position: relative;
  1226. .abos {
  1227. position: absolute;
  1228. bottom: 0px;
  1229. width: 100%;
  1230. height: 44px;
  1231. line-height: 44px;
  1232. font-size: 16px;
  1233. color: #000;
  1234. text-align: center;
  1235. background-color: rgba(90, 90, 90, 0.7);
  1236. }
  1237. }
  1238. </style>