index.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <template>
  2. <div id="listOfhoursToBeReviewed">
  3. <search-box-new
  4. ref="searchBox"
  5. :formData="formData"
  6. :formList="formList"
  7. @search="search"
  8. @init="init"
  9. />
  10. <table-list
  11. :tableSets="tableSet"
  12. :tableData="tableData"
  13. :navText="navText"
  14. :loading="loading"
  15. >
  16. <template slot="btn" slot-scope="props">
  17. <el-button type="text" @click="jumpPage(props.scope.row)"
  18. >学时审核</el-button
  19. >
  20. </template>
  21. </table-list>
  22. <pagination
  23. :total="total"
  24. :pageSize="formData.pageSize"
  25. :currentPage="formData.pageNum"
  26. @handleSizeChange="handleSizeChange"
  27. @handleCurrentChange="handleCurrentChange"
  28. />
  29. </div>
  30. </template>
  31. <script>
  32. import searchBoxNew from "@/components/searchBoxNew";
  33. import tableList from "@/components/tableList";
  34. import pagination from "@/components/pagination";
  35. export default {
  36. name: "ListOfhoursToBeReviewed",
  37. components: { searchBoxNew, tableList, pagination },
  38. data() {
  39. return {
  40. loading: false, //当前表单加载是否加载动画
  41. navText: {
  42. title: "学时待审核列表",
  43. index: 0,
  44. ch: "条",
  45. num: false,
  46. border: true,
  47. choice: true,
  48. addHide: true,
  49. backFatherBtn: {
  50. status: false,
  51. title: "未定义",
  52. },
  53. },
  54. //搜索
  55. formList: [
  56. {
  57. prop: "educationTypeId",
  58. placeholder: "教育类型",
  59. scope: "educationType",
  60. },
  61. {
  62. prop: "businessId",
  63. placeholder: "业务层次",
  64. scope: "businessLevel",
  65. edu: "educationTypeId",
  66. },
  67. {
  68. prop: "schoolId",
  69. placeholder: "院校",
  70. scope: "schoolList",
  71. edu: "educationTypeId",
  72. },
  73. {
  74. prop: "majorId",
  75. placeholder: "专业",
  76. scope: "Professional",
  77. edu: "educationTypeId",
  78. },
  79. {
  80. prop: "profileStatus",
  81. placeholder: "填写资料审核状态",
  82. scope: "select",
  83. options: [
  84. {
  85. label: "通过",
  86. value: 1,
  87. },
  88. {
  89. label: "不通过",
  90. value: 3,
  91. },
  92. {
  93. label: "待审核",
  94. value: 2,
  95. },
  96. ],
  97. },
  98. {
  99. prop1: "classStartTime",
  100. prop2: "classEndTime",
  101. placeholder1: "班级有效期开始时间",
  102. placeholder2: "班级有效期结束时间",
  103. scope: "moreDataPicker",
  104. Diszing: true,
  105. },
  106. {
  107. prop: "searchKey",
  108. placeholder: "请输入姓名/身份证",
  109. },
  110. ],
  111. formData: {
  112. profileStatus: "",
  113. periodStatus: 2,
  114. status: 1,
  115. pageSize: 10,
  116. pageNum: 1,
  117. },
  118. // 表单
  119. tableSet: [
  120. {
  121. label: "学员编码",
  122. prop: "studentCode",
  123. hidden: true,
  124. },
  125. {
  126. label: "学员姓名",
  127. prop: "realName",
  128. hidden: true,
  129. },
  130. {
  131. label: "学员身份证",
  132. prop: "idCard",
  133. hidden: true,
  134. },
  135. {
  136. label: "绑定手机号码",
  137. prop: "telPhone",
  138. hidden: true,
  139. },
  140. {
  141. label: "所购商品",
  142. prop: "goodsName",
  143. hidden: true,
  144. },
  145. {
  146. label: "所在班级",
  147. prop: "className",
  148. hidden: true,
  149. },
  150. {
  151. label: "班级有效期",
  152. prop1: "classStartTime",
  153. prop2: "classEndTime",
  154. hidden: true,
  155. scope: "TimeLists",
  156. },
  157. {
  158. label: "学时",
  159. prop: "classHours",
  160. hidden: true,
  161. },
  162. {
  163. label: "视频学习进度(节)",
  164. prop1: "stuAllNum",
  165. prop2: "secAllNum",
  166. hidden: true,
  167. scope: "computer",
  168. },
  169. {
  170. label: "做题进度(章卷)",
  171. prop1: "recordNum",
  172. prop2: "examNum",
  173. hidden: true,
  174. scope: "computer",
  175. },
  176. {
  177. label: "学习开始时间",
  178. prop: "startTime",
  179. hidden: true,
  180. scope: "aTimeList",
  181. },
  182. {
  183. label: "学习结束时间",
  184. prop: "endTime",
  185. hidden: true,
  186. scope: "aTimeList",
  187. },
  188. {
  189. label: "学习有效期",
  190. prop1: "studyStartTime",
  191. prop2: "studyEndTime",
  192. hidden: true,
  193. scope: "TimeLists",
  194. },
  195. {
  196. label: "填写资料审核状态",
  197. prop: "profileStatus",
  198. hidden: true,
  199. scope: "isOptions",
  200. options: [
  201. {
  202. label: "审核通过",
  203. value: 1,
  204. },
  205. {
  206. label: "待审核",
  207. value: 2,
  208. },
  209. {
  210. label: "审核不通过",
  211. value: 3,
  212. },
  213. ],
  214. },
  215. {
  216. label: "学时审批状态",
  217. prop: "allStatus",
  218. hidden: true,
  219. scope: "statusPeriod",
  220. },
  221. {
  222. label: "待重修(视频节和题卷)",
  223. prop: "waitRebuildNum",
  224. prop1: "rebuildNum",
  225. hidden: true,
  226. scope: "againStudent",
  227. },
  228. ],
  229. tableData: [], //表单数据
  230. total: 0, //一共多少条
  231. };
  232. },
  233. mounted() {
  234. this.search();
  235. },
  236. activated() {
  237. this.search();
  238. },
  239. methods: {
  240. jumpPage(v) {
  241. this.$api
  242. .inquireGradegradelockPeriodStatus({
  243. gradeId: v.gradeId,
  244. userId: v.userId,
  245. goodsId: v.goodsId,
  246. })
  247. .then((res) => {
  248. if (res.msg) {
  249. this.$message.warning(res.msg);
  250. return;
  251. } else {
  252. //学员详情
  253. this.$router.push({
  254. path: "classHoursReview",
  255. query: {
  256. id: v.gradeId,
  257. userId: v.userId,
  258. goodsId: v.goodsId,
  259. },
  260. });
  261. }
  262. });
  263. },
  264. search(int) {
  265. this.loading = true;
  266. if (int === 1) {
  267. this.formData.pageNum = 1;
  268. }
  269. if (int === 2) {
  270. this.formData = {
  271. profileStatus: "",
  272. periodStatus: 2,
  273. status: 1,
  274. pageSize: 10,
  275. pageNum: 1,
  276. };
  277. }
  278. if (int === 3) {
  279. this.formData.pageNum = 1;
  280. }
  281. var data = JSON.parse(JSON.stringify(this.formData));
  282. if (this.formData.classStartTime) {
  283. data.classStartTime = data.classStartTime / 1000;
  284. }
  285. if (this.formData.classEndTime) {
  286. data.classEndTime = data.classEndTime / 1000;
  287. }
  288. this.$api
  289. .inquireGradegradelistUserPeriod(data)
  290. .then((res) => {
  291. this.tableData = res.rows;
  292. this.total = res.total;
  293. this.navText.index = res.total;
  294. })
  295. .finally(() => {
  296. this.loading = false;
  297. });
  298. },
  299. init() {
  300. this.search(2);
  301. },
  302. handleSizeChange(v) {
  303. this.formData.pageSize = v;
  304. this.formData.pageNum = 1;
  305. this.search();
  306. },
  307. handleCurrentChange(v) {
  308. this.formData.pageNum = v;
  309. this.search();
  310. },
  311. },
  312. };
  313. </script>
  314. <style lang="less" scoped>
  315. /deep/.el-button {
  316. border-radius: 8px;
  317. }
  318. /deep/.el-dialog {
  319. border-radius: 8px;
  320. .el-dialog__header {
  321. padding: 0;
  322. .hearders {
  323. height: 40px;
  324. display: flex;
  325. align-items: center;
  326. justify-content: space-between;
  327. padding: 0px 18px 0px 20px;
  328. border-bottom: 1px solid #e2e2e2;
  329. .leftTitle {
  330. font-size: 14px;
  331. font-weight: bold;
  332. color: #2f4378;
  333. }
  334. .rightBoxs {
  335. display: flex;
  336. align-items: center;
  337. img {
  338. width: 14px;
  339. height: 14px;
  340. margin-left: 13px;
  341. cursor: pointer;
  342. }
  343. }
  344. }
  345. }
  346. .el-dialog__footer {
  347. padding: 0;
  348. .dialog-footer {
  349. padding: 0px 40px;
  350. height: 70px;
  351. border-top: 1px solid #e2e2e2;
  352. display: flex;
  353. align-items: center;
  354. justify-content: flex-end;
  355. }
  356. }
  357. }
  358. .imgBox {
  359. width: 100%;
  360. // height: 210px;
  361. border: 1px solid #e2e2e2;
  362. border-radius: 8px;
  363. padding: 8px 8px 3px;
  364. display: flex;
  365. flex-direction: column;
  366. align-items: center;
  367. .imgLabel {
  368. flex: 1;
  369. width: 100%;
  370. border: 1px dotted #e2e2e2;
  371. color: #999;
  372. font-size: 14px;
  373. cursor: pointer;
  374. border-radius: 8px;
  375. .msPhoto {
  376. display: flex;
  377. justify-content: center;
  378. align-items: center;
  379. max-width: 100%;
  380. max-height: 270px;
  381. img {
  382. max-width: 100%;
  383. max-height: 270px;
  384. }
  385. }
  386. .imgbbx {
  387. display: flex;
  388. flex-direction: column;
  389. align-items: center;
  390. justify-content: center;
  391. width: 100%;
  392. height: 100%;
  393. i {
  394. font-weight: bold;
  395. margin: 14px 0;
  396. font-size: 24px;
  397. }
  398. }
  399. }
  400. p {
  401. margin: 5px 0px;
  402. }
  403. }
  404. </style>