studyTimes.vue 39 KB

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