index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  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. >待审核
  10. <i
  11. class="el-icon-warning-outline"
  12. :style="
  13. reviewListNums >= 200
  14. ? 'color:red;'
  15. : reviewListNums < 200 && reviewListNums > 99
  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. >审核中
  28. <i
  29. class="el-icon-warning-outline"
  30. :style="
  31. underReiviewNums >= 200
  32. ? 'color:red;'
  33. : underReiviewNums < 200 && underReiviewNums > 99
  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. >不通过</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. loading: false, //当前表单加载是否加载动画
  99. navText: {
  100. title: "学时待审核列表",
  101. index: 0,
  102. ch: "条",
  103. num: false,
  104. border: true,
  105. choice: true,
  106. addHide: true,
  107. backFatherBtn: {
  108. status: false,
  109. title: "未定义",
  110. },
  111. },
  112. //搜索
  113. formList: [
  114. {
  115. prop: "educationTypeId",
  116. placeholder: "教育类型",
  117. scope: "educationType",
  118. },
  119. {
  120. prop: "businessId",
  121. placeholder: "业务层次",
  122. scope: "businessLevel",
  123. edu: "educationTypeId",
  124. },
  125. {
  126. prop: "schoolId",
  127. placeholder: "院校",
  128. scope: "schoolList",
  129. edu: "educationTypeId",
  130. },
  131. {
  132. prop: "majorId",
  133. placeholder: "专业",
  134. scope: "Professional",
  135. edu: "educationTypeId",
  136. },
  137. {
  138. prop: "profileStatus",
  139. placeholder: "填写资料审核状态",
  140. scope: "select",
  141. options: [
  142. {
  143. label: "通过",
  144. value: 1,
  145. },
  146. {
  147. label: "不通过",
  148. value: 3,
  149. },
  150. {
  151. label: "待审核",
  152. value: 2,
  153. },
  154. ],
  155. },
  156. {
  157. prop1: "classStartTime",
  158. prop2: "classEndTime",
  159. placeholder1: "班级有效期开始时间",
  160. placeholder2: "班级有效期结束时间",
  161. scope: "moreDataPicker",
  162. Diszing: true,
  163. },
  164. {
  165. prop: "searchKey",
  166. placeholder: "请输入姓名/身份证",
  167. },
  168. ],
  169. formData: {
  170. profileStatus: "",
  171. periodStatus: 2,
  172. status: 1,
  173. pageSize: 10,
  174. pageNum: 1,
  175. },
  176. // 表单
  177. tableSet: [
  178. {
  179. label: "学员编码",
  180. prop: "studentCode",
  181. hidden: false,
  182. },
  183. {
  184. label: "学员姓名",
  185. prop: "realName",
  186. hidden: true,
  187. },
  188. {
  189. label: "学员身份证",
  190. prop: "idCard",
  191. hidden: true,
  192. },
  193. {
  194. label: "绑定手机号码",
  195. prop: "telPhone",
  196. hidden: false,
  197. },
  198. {
  199. label: "所购商品",
  200. prop: "goodsName",
  201. hidden: true,
  202. },
  203. {
  204. label: "所在班级",
  205. prop: "className",
  206. hidden: true,
  207. },
  208. {
  209. label: "班级有效期",
  210. prop1: "classStartTime",
  211. prop2: "classEndTime",
  212. hidden: false,
  213. scope: "TimeLists",
  214. },
  215. {
  216. label: "学时",
  217. prop: "classHours",
  218. hidden: false,
  219. },
  220. {
  221. label: "视频学习进度(节)",
  222. prop1: "stuAllNum",
  223. prop2: "secAllNum",
  224. hidden: false,
  225. scope: "computer",
  226. },
  227. {
  228. label: "做题进度(章卷)",
  229. prop1: "recordNum",
  230. prop2: "examNum",
  231. hidden: false,
  232. scope: "computer",
  233. },
  234. {
  235. label: "学习开始时间",
  236. prop: "startTime",
  237. hidden: true,
  238. scope: "aTimeList",
  239. },
  240. {
  241. label: "学习结束时间",
  242. prop: "endTime",
  243. hidden: true,
  244. scope: "aTimeList",
  245. },
  246. {
  247. label: "学习服务期",
  248. prop1: "serviceStartTime",
  249. prop2: "serviceEndTime",
  250. hidden: false,
  251. Diszing: true,
  252. scope: "TimeLists",
  253. },
  254. {
  255. label: "填写资料审核状态",
  256. prop: "profileStatus",
  257. hidden: true,
  258. scope: "isOptions",
  259. options: [
  260. {
  261. label: "审核通过",
  262. value: 1,
  263. },
  264. {
  265. label: "待审核",
  266. value: 2,
  267. },
  268. {
  269. label: "审核不通过",
  270. value: 3,
  271. },
  272. ],
  273. },
  274. {
  275. label: "学时审批状态",
  276. prop: "periodStatus",
  277. hidden: true,
  278. scope: "statusPeriod",
  279. },
  280. {
  281. label: "待重修(视频节和题卷)",
  282. prop: "waitRebuildNum",
  283. prop1: "rebuildNum",
  284. hidden: false,
  285. scope: "againStudent",
  286. },
  287. ],
  288. tableData: [], //表单数据
  289. total: 0, //一共多少条
  290. };
  291. },
  292. mounted() {
  293. this.search();
  294. this.getInitList();
  295. this.getInitUnderList();
  296. },
  297. activated() {
  298. this.search();
  299. this.getInitList();
  300. this.getInitUnderList();
  301. },
  302. methods: {
  303. changeBTN(int) {
  304. this.formData.periodStatus = int;
  305. this.search(6);
  306. },
  307. /**
  308. * 待审核数量
  309. */
  310. getInitList() {
  311. this.$api
  312. .inquireGradegradelistUserPeriod({
  313. periodStatus: 2,
  314. status: 1,
  315. })
  316. .then((res) => {
  317. console.log(res.rows.length);
  318. this.reviewListNums = res.rows.length;
  319. });
  320. },
  321. /**
  322. * 审核中数量
  323. */
  324. getInitUnderList() {
  325. this.$api
  326. .inquireGradegradelistUserPeriod({
  327. periodStatus: 3,
  328. status: 1,
  329. })
  330. .then((res) => {
  331. console.log(res.rows.length);
  332. this.underReiviewNums = res.rows.length;
  333. });
  334. },
  335. jumpPage(v) {
  336. this.$api
  337. .inquireGradegradelockPeriodStatus({
  338. gradeId: v.gradeId,
  339. userId: v.userId,
  340. goodsId: v.goodsId,
  341. })
  342. .then((res) => {
  343. if (res.msg) {
  344. this.$message.warning(res.msg + "正在操作");
  345. return;
  346. } else {
  347. //学员详情
  348. this.$router.push({
  349. path: "classHoursReview",
  350. query: {
  351. id: v.gradeId,
  352. userId: v.userId,
  353. goodsId: v.goodsId,
  354. },
  355. });
  356. }
  357. });
  358. },
  359. search(int) {
  360. this.loading = true;
  361. if (int === 1) {
  362. this.formData.pageNum = 1;
  363. }
  364. if (int === 2) {
  365. this.formData = {
  366. profileStatus: "",
  367. periodStatus: this.formData.periodStatus,
  368. status: 1,
  369. pageSize: 10,
  370. pageNum: 1,
  371. };
  372. }
  373. if (int === 6) {
  374. this.formData = {
  375. profileStatus: "",
  376. periodStatus: this.formData.periodStatus,
  377. status: 1,
  378. pageSize: 10,
  379. pageNum: 1,
  380. };
  381. }
  382. var data = JSON.parse(JSON.stringify(this.formData));
  383. if (this.formData.classStartTime) {
  384. data.classStartTime = data.classStartTime / 1000;
  385. }
  386. if (this.formData.classEndTime) {
  387. data.classEndTime = data.classEndTime / 1000;
  388. }
  389. this.$api
  390. .inquireGradegradelistUserPeriods(data)
  391. .then((res) => {
  392. this.tableData = res.rows;
  393. this.total = res.total;
  394. this.navText.index = res.total;
  395. })
  396. .finally(() => {
  397. this.loading = false;
  398. });
  399. },
  400. init() {
  401. this.search(2);
  402. },
  403. handleSizeChange(v) {
  404. this.formData.pageSize = v;
  405. this.formData.pageNum = 1;
  406. this.search();
  407. },
  408. handleCurrentChange(v) {
  409. this.formData.pageNum = v;
  410. this.search();
  411. },
  412. },
  413. };
  414. </script>
  415. <style lang="less" scoped>
  416. /deep/.el-button {
  417. border-radius: 8px;
  418. }
  419. /deep/.el-dialog {
  420. border-radius: 8px;
  421. .el-dialog__header {
  422. padding: 0;
  423. .hearders {
  424. height: 40px;
  425. display: flex;
  426. align-items: center;
  427. justify-content: space-between;
  428. padding: 0px 18px 0px 20px;
  429. border-bottom: 1px solid #e2e2e2;
  430. .leftTitle {
  431. font-size: 14px;
  432. font-weight: bold;
  433. color: #2f4378;
  434. }
  435. .rightBoxs {
  436. display: flex;
  437. align-items: center;
  438. img {
  439. width: 14px;
  440. height: 14px;
  441. margin-left: 13px;
  442. cursor: pointer;
  443. }
  444. }
  445. }
  446. }
  447. .el-dialog__footer {
  448. padding: 0;
  449. .dialog-footer {
  450. padding: 0px 40px;
  451. height: 70px;
  452. border-top: 1px solid #e2e2e2;
  453. display: flex;
  454. align-items: center;
  455. justify-content: flex-end;
  456. }
  457. }
  458. }
  459. .imgBox {
  460. width: 100%;
  461. // height: 210px;
  462. border: 1px solid #e2e2e2;
  463. border-radius: 8px;
  464. padding: 8px 8px 3px;
  465. display: flex;
  466. flex-direction: column;
  467. align-items: center;
  468. .imgLabel {
  469. flex: 1;
  470. width: 100%;
  471. border: 1px dotted #e2e2e2;
  472. color: #999;
  473. font-size: 14px;
  474. cursor: pointer;
  475. border-radius: 8px;
  476. .msPhoto {
  477. display: flex;
  478. justify-content: center;
  479. align-items: center;
  480. max-width: 100%;
  481. max-height: 270px;
  482. img {
  483. max-width: 100%;
  484. max-height: 270px;
  485. }
  486. }
  487. .imgbbx {
  488. display: flex;
  489. flex-direction: column;
  490. align-items: center;
  491. justify-content: center;
  492. width: 100%;
  493. height: 100%;
  494. i {
  495. font-weight: bold;
  496. margin: 14px 0;
  497. font-size: 24px;
  498. }
  499. }
  500. }
  501. p {
  502. margin: 5px 0px;
  503. }
  504. }
  505. </style>