index.vue 8.6 KB

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