index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. <template>
  2. <div id="listOfhoursToBeReviewed">
  3. <div style="margin-bottom: 10px">
  4. <span style="font-size: 15px; color: #666">审核状态:</span
  5. ><el-button
  6. :type="formData.periodStatus === 2 ? 'primary' : ''"
  7. :size="size"
  8. @click="changeBTN(2)"
  9. >初审({{ reviewListNums }})
  10. <!-- <i
  11. class="el-icon-warning-outline"
  12. :style="
  13. reviewListNums >= 200
  14. ? 'color:red;'
  15. : reviewListNums < 200 && reviewListNums >= 100
  16. ? 'color:green'
  17. : reviewListNums < 100
  18. ? 'color:block;'
  19. : ''
  20. "
  21. style="font-weight: bold"
  22. ></i> --> </el-button
  23. ><el-button
  24. :type="formData.periodStatus === 3 ? 'primary' : ''"
  25. :size="size"
  26. @click="changeBTN(3)"
  27. >复审({{ underReiviewNums }})
  28. <!-- <i
  29. class="el-icon-warning-outline"
  30. :style="
  31. underReiviewNums >= 200
  32. ? 'color:red;'
  33. : underReiviewNums < 200 && underReiviewNums >= 100
  34. ? 'color:green'
  35. : underReiviewNums < 100
  36. ? 'color:block;'
  37. : ''
  38. "
  39. style="font-weight: bold"
  40. ></i> --> </el-button
  41. ><el-button
  42. :type="formData.periodStatus === 0 ? 'primary' : ''"
  43. :size="size"
  44. @click="changeBTN(0)"
  45. >不通过({{ failNums }})</el-button
  46. ><el-button
  47. :type="formData.periodStatus === 1 ? 'primary' : ''"
  48. :size="size"
  49. @click="changeBTN(1)"
  50. >已通过</el-button
  51. ><el-button
  52. :type="formData.periodStatus === -1 ? 'primary' : ''"
  53. :size="size"
  54. @click="changeBTN(-1)"
  55. >不可审核</el-button
  56. >
  57. </div>
  58. <search-box-new
  59. ref="searchBox"
  60. :formData="formData"
  61. :formList="formList"
  62. @search="search"
  63. @init="init"
  64. />
  65. <table-list
  66. :tableSets="tableSet"
  67. :tableData="tableData"
  68. :navText="navText"
  69. :loading="loading"
  70. >
  71. <template slot="btn" slot-scope="props">
  72. <el-button type="text" @click="jumpPage(props.scope.row)"
  73. >学时审核</el-button
  74. >
  75. </template>
  76. </table-list>
  77. <pagination
  78. :total="total"
  79. :pageSize="formData.pageSize"
  80. :currentPage="formData.pageNum"
  81. @handleSizeChange="handleSizeChange"
  82. @handleCurrentChange="handleCurrentChange"
  83. />
  84. </div>
  85. </template>
  86. <script>
  87. import searchBoxNew from "@/components/searchBoxNew";
  88. import tableList from "@/components/tableList";
  89. import pagination from "@/components/pagination";
  90. export default {
  91. name: "ListOfhoursToBeReviewed",
  92. components: { searchBoxNew, tableList, pagination },
  93. data() {
  94. return {
  95. size: "small",
  96. reviewListNums: 0,
  97. underReiviewNums: 0,
  98. failNums: 0,
  99. loading: false, //当前表单加载是否加载动画
  100. navText: {
  101. title: "学时审核管理",
  102. index: 0,
  103. ch: "条",
  104. num: false,
  105. border: true,
  106. choice: true,
  107. addHide: true,
  108. backFatherBtn: {
  109. status: false,
  110. title: "未定义",
  111. },
  112. },
  113. //搜索
  114. formList: [
  115. {
  116. prop: "educationTypeId",
  117. placeholder: "教育类型",
  118. scope: "educationType",
  119. },
  120. {
  121. prop: "businessId",
  122. placeholder: "业务层次",
  123. scope: "businessLevel",
  124. edu: "educationTypeId",
  125. },
  126. {
  127. prop: "schoolId",
  128. placeholder: "院校",
  129. scope: "schoolList",
  130. edu: "educationTypeId",
  131. },
  132. {
  133. prop: "majorId",
  134. placeholder: "专业",
  135. scope: "Professional",
  136. edu: "educationTypeId",
  137. },
  138. {
  139. prop: "profileStatus",
  140. placeholder: "填写资料审核状态",
  141. scope: "select",
  142. options: [
  143. {
  144. label: "通过",
  145. value: 1,
  146. },
  147. {
  148. label: "不通过",
  149. value: 3,
  150. },
  151. {
  152. label: "待审核",
  153. value: 2,
  154. },
  155. ],
  156. },
  157. {
  158. prop1: "classStartTime",
  159. prop2: "classEndTime",
  160. placeholder1: "班级有效期开始时间",
  161. placeholder2: "班级有效期结束时间",
  162. scope: "moreDataPicker",
  163. Diszing: true,
  164. },
  165. {
  166. prop: "searchKey",
  167. placeholder: "请输入姓名/身份证",
  168. },
  169. {
  170. prop1: "periodStartTime",
  171. prop2: "periodEndTime",
  172. placeholder1: "审核通过开始时间",
  173. placeholder2: "审核通过结束时间",
  174. scope: "moreDataPicker",
  175. Diszing: true,
  176. },
  177. {
  178. prop: "className",
  179. placeholder: "所在班级",
  180. },
  181. ],
  182. formData: {
  183. profileStatus: "",
  184. periodStatus: 2,
  185. status: 1,
  186. pageSize: 10,
  187. pageNum: 1,
  188. },
  189. // 表单
  190. tableSet: [
  191. {
  192. label: "学员编码",
  193. prop: "studentCode",
  194. hidden: false,
  195. },
  196. {
  197. label: "学员姓名",
  198. prop: "realName",
  199. hidden: true,
  200. },
  201. {
  202. label: "学员身份证",
  203. prop: "idCard",
  204. hidden: true,
  205. },
  206. {
  207. label: "绑定手机号码",
  208. prop: "telPhone",
  209. hidden: false,
  210. },
  211. {
  212. label: "所购商品",
  213. prop: "goodsName",
  214. hidden: true,
  215. },
  216. {
  217. label: "所在班级",
  218. prop: "className",
  219. hidden: true,
  220. },
  221. {
  222. label: "班级有效期",
  223. prop1: "classStartTime",
  224. prop2: "classEndTime",
  225. hidden: false,
  226. scope: "TimeLists",
  227. },
  228. {
  229. label: "学时",
  230. prop: "classHours",
  231. hidden: false,
  232. },
  233. {
  234. label: "视频学习进度(节)",
  235. prop1: "stuAllNum",
  236. prop2: "secAllNum",
  237. hidden: false,
  238. scope: "computer",
  239. },
  240. {
  241. label: "做题进度(章卷)",
  242. prop1: "recordNum",
  243. prop2: "examNum",
  244. hidden: false,
  245. scope: "computer",
  246. },
  247. {
  248. label: "学习开始时间",
  249. prop: "startTime",
  250. hidden: true,
  251. scope: "aTimeList",
  252. },
  253. {
  254. label: "学习结束时间",
  255. prop: "endTime",
  256. hidden: true,
  257. scope: "aTimeList",
  258. },
  259. {
  260. label: "学习服务期",
  261. prop1: "serviceStartTime",
  262. prop2: "serviceEndTime",
  263. hidden: false,
  264. Diszing: true,
  265. scope: "TimeLists",
  266. },
  267. {
  268. label: "七大员继教年份",
  269. prop: "sevenYear",
  270. hidden: true,
  271. },
  272. {
  273. label: "填写资料审核状态",
  274. prop: "profileStatus",
  275. hidden: true,
  276. scope: "isOptions",
  277. options: [
  278. {
  279. label: "审核通过",
  280. value: 1,
  281. },
  282. {
  283. label: "待审核",
  284. value: 2,
  285. },
  286. {
  287. label: "审核不通过",
  288. value: 3,
  289. },
  290. ],
  291. },
  292. {
  293. label: "学时审批状态",
  294. prop: "periodStatus",
  295. hidden: true,
  296. scope: "statusPeriod",
  297. },
  298. {
  299. label: "审核通过时间",
  300. prop: "periodTime",
  301. hidden: true,
  302. scope: "aTimeList",
  303. },
  304. {
  305. label: "待重修(视频节和题卷)",
  306. prop: "waitRebuildNum",
  307. prop1: "rebuildNum",
  308. hidden: false,
  309. scope: "againStudent",
  310. },
  311. ],
  312. tableData: [], //表单数据
  313. total: 0, //一共多少条
  314. };
  315. },
  316. mounted() {
  317. if (
  318. this.$route.params.educationId &&
  319. this.$route.params.businessId &&
  320. this.$route.params.type
  321. ) {
  322. this.$set(
  323. this.formData,
  324. "educationTypeId",
  325. this.$route.params.educationId
  326. );
  327. this.$set(this.formData, "businessId", this.$route.params.businessId);
  328. this.$set(this.formData, "periodStatus", this.$route.params.type);
  329. this.$refs.searchBox.changeEducationType(
  330. this.$route.params.educationId,
  331. true
  332. );
  333. this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
  334. }
  335. console.log(
  336. this.$methodsTools.timestampConvert(this.$route.params.timeType)[0]
  337. );
  338. console.log(
  339. this.$methodsTools.timestampConvert(this.$route.params.timeType)[1]
  340. );
  341. if (this.$route.params.timeType >= 0) {
  342. this.$set(
  343. this.formData,
  344. "classStartTime",
  345. this.$methodsTools.timestampConvert(this.$route.params.timeType)[0]
  346. );
  347. this.$set(
  348. this.formData,
  349. "classEndTime",
  350. this.$methodsTools.timestampConvert(this.$route.params.timeType)[1]
  351. );
  352. }
  353. this.search();
  354. this.getInitList();
  355. this.getInitUnderList();
  356. this.getFailList();
  357. },
  358. activated() {
  359. this.search();
  360. this.getInitList();
  361. this.getInitUnderList();
  362. this.getFailList();
  363. },
  364. methods: {
  365. changeBTN(int) {
  366. this.formData.periodStatus = int;
  367. this.search(6);
  368. },
  369. /**
  370. * 待审核数量
  371. */
  372. getInitList() {
  373. this.$api
  374. .inquireGradegradelistUserPeriod({
  375. periodStatus: 2,
  376. status: 1,
  377. })
  378. .then((res) => {
  379. this.reviewListNums = res.rows.length;
  380. });
  381. },
  382. /**
  383. * 审核中数量
  384. */
  385. getInitUnderList() {
  386. this.$api
  387. .inquireGradegradelistUserPeriod({
  388. periodStatus: 3,
  389. status: 1,
  390. })
  391. .then((res) => {
  392. this.underReiviewNums = res.rows.length;
  393. });
  394. },
  395. /**
  396. * 不通过数量
  397. */
  398. getFailList() {
  399. this.$api
  400. .inquireGradegradelistUserPeriod({
  401. periodStatus: 0,
  402. status: 1,
  403. })
  404. .then((res) => {
  405. this.failNums = res.rows.length;
  406. });
  407. },
  408. jumpPage(v) {
  409. this.$api
  410. .inquireGradegradelockPeriodStatus({
  411. gradeId: v.gradeId,
  412. userId: v.userId,
  413. goodsId: v.goodsId,
  414. })
  415. .then((res) => {
  416. if (res.msg) {
  417. this.$message.warning(res.msg + "正在操作");
  418. return;
  419. } else {
  420. let data = {
  421. userId: v.userId,
  422. realName: v.realName,
  423. id: v.gradeId,
  424. className: v.className,
  425. goodsId: v.goodsId,
  426. goodsName: v.goodsName,
  427. orderGoodsId: v.orderGoodsId,
  428. keyId: `${v.userId}-${v.goodsId}-${v.gradeId}-${v.orderGoodsId}`,
  429. };
  430. this.checkSession(data)
  431. .then(() => {
  432. //学员详情
  433. this.$router.push({
  434. path: "classHoursReview",
  435. });
  436. })
  437. .catch(() => {
  438. this.$message.error("存在异常,请联系开发人员");
  439. });
  440. }
  441. });
  442. },
  443. search(int) {
  444. this.loading = true;
  445. if (int === 1) {
  446. this.formData.pageNum = 1;
  447. }
  448. if (int === 2) {
  449. this.formData = {
  450. profileStatus: "",
  451. periodStatus: this.formData.periodStatus,
  452. status: 1,
  453. pageSize: 10,
  454. pageNum: 1,
  455. };
  456. }
  457. if (int === 6) {
  458. this.formData.pageSize = 10;
  459. this.formData.pageNum = 1;
  460. }
  461. var data = JSON.parse(JSON.stringify(this.formData));
  462. if (this.formData.classStartTime) {
  463. data.classStartTime = parseInt(data.classStartTime / 1000);
  464. }
  465. if (this.formData.classEndTime) {
  466. data.classEndTime = parseInt(data.classEndTime / 1000);
  467. }
  468. if (this.formData.periodStartTime) {
  469. data.periodStartTime = parseInt(data.periodStartTime / 1000);
  470. }
  471. if (this.formData.periodEndTime) {
  472. data.periodEndTime = parseInt(data.periodEndTime / 1000);
  473. }
  474. this.$api
  475. .inquireGradegradelistUserPeriods(data)
  476. .then((res) => {
  477. this.tableData = res.rows;
  478. this.total = res.total;
  479. this.navText.index = res.total;
  480. })
  481. .finally(() => {
  482. this.loading = false;
  483. });
  484. },
  485. init() {
  486. this.search(2);
  487. },
  488. handleSizeChange(v) {
  489. this.formData.pageSize = v;
  490. this.formData.pageNum = 1;
  491. this.search();
  492. },
  493. handleCurrentChange(v) {
  494. this.formData.pageNum = v;
  495. this.search();
  496. },
  497. },
  498. };
  499. </script>
  500. <style lang="less" scoped>
  501. /deep/.el-button {
  502. border-radius: 8px;
  503. }
  504. /deep/.el-dialog {
  505. border-radius: 8px;
  506. .el-dialog__header {
  507. padding: 0;
  508. .hearders {
  509. height: 40px;
  510. display: flex;
  511. align-items: center;
  512. justify-content: space-between;
  513. padding: 0px 18px 0px 20px;
  514. border-bottom: 1px solid #e2e2e2;
  515. .leftTitle {
  516. font-size: 14px;
  517. font-weight: bold;
  518. color: #2f4378;
  519. }
  520. .rightBoxs {
  521. display: flex;
  522. align-items: center;
  523. img {
  524. width: 14px;
  525. height: 14px;
  526. margin-left: 13px;
  527. cursor: pointer;
  528. }
  529. }
  530. }
  531. }
  532. .el-dialog__footer {
  533. padding: 0;
  534. .dialog-footer {
  535. padding: 0px 40px;
  536. height: 70px;
  537. border-top: 1px solid #e2e2e2;
  538. display: flex;
  539. align-items: center;
  540. justify-content: flex-end;
  541. }
  542. }
  543. }
  544. .imgBox {
  545. width: 100%;
  546. // height: 210px;
  547. border: 1px solid #e2e2e2;
  548. border-radius: 8px;
  549. padding: 8px 8px 3px;
  550. display: flex;
  551. flex-direction: column;
  552. align-items: center;
  553. .imgLabel {
  554. flex: 1;
  555. width: 100%;
  556. border: 1px dotted #e2e2e2;
  557. color: #999;
  558. font-size: 14px;
  559. cursor: pointer;
  560. border-radius: 8px;
  561. .msPhoto {
  562. display: flex;
  563. justify-content: center;
  564. align-items: center;
  565. max-width: 100%;
  566. max-height: 270px;
  567. img {
  568. max-width: 100%;
  569. max-height: 270px;
  570. }
  571. }
  572. .imgbbx {
  573. display: flex;
  574. flex-direction: column;
  575. align-items: center;
  576. justify-content: center;
  577. width: 100%;
  578. height: 100%;
  579. i {
  580. font-weight: bold;
  581. margin: 14px 0;
  582. font-size: 24px;
  583. }
  584. }
  585. }
  586. p {
  587. margin: 5px 0px;
  588. }
  589. }
  590. </style>