index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. <template>
  2. <div id="sevenExamData">
  3. <search-box-new
  4. ref="searchBox"
  5. :formData="formData"
  6. :formList="formList"
  7. @search="search"
  8. @init="init"
  9. >
  10. <template slot="month">
  11. <el-select
  12. size="small"
  13. v-model="formData.month"
  14. placeholder="请选择考试月份"
  15. >
  16. <el-option
  17. v-for="item in monthList"
  18. :key="item.value"
  19. :label="item.label"
  20. :value="item.value"
  21. >
  22. </el-option>
  23. </el-select>
  24. </template>
  25. </search-box-new>
  26. <table-list
  27. rowKey="subscribeId"
  28. :tableSets="tableSet"
  29. :tableData="tableData"
  30. :navText="navText"
  31. @addClick="addClick"
  32. :loading="loading"
  33. ref="tableList"
  34. >
  35. <template slot="name" slot-scope="props">
  36. <div>
  37. 姓名:{{props.scope.row["userName"]}}
  38. </div>
  39. <div>
  40. 手机:{{props.scope.row["userPhone"]}}
  41. </div>
  42. <div>
  43. 身份证:{{props.scope.row["userCard"]}}
  44. </div>
  45. </template>
  46. <template slot="applyResult" slot-scope="props">
  47. <div>
  48. 考试时间:{{$methodsTools.onlyForma(props.scope.row["applyTime"],false)}}({{props.scope.row["applyStartTime"]}}-{{props.scope.row["applyEndTime"]}})
  49. </div>
  50. <div>
  51. 考试地点:{{props.scope.row["applyAddress"]}}
  52. </div>
  53. <div>
  54. 备注:自带文具、身份证
  55. </div>
  56. </template>
  57. <template slot="receipt" slot-scope="props">
  58. <div>
  59. 出考情况:{{props.scope.row["examStatus"] == 1 ? "出席":""}}
  60. </div>
  61. <div>
  62. 分数登记:{{props.scope.row["performance"]}}
  63. </div>
  64. <div>
  65. 证书编号:{{props.scope.row["certificateCode"]}}
  66. </div>
  67. <div>
  68. 发证时间:{{$methodsTools.onlyForma(props.scope.row["certificateStartTime"],false)}}
  69. </div>
  70. <div>
  71. 到期时间:{{$methodsTools.onlyForma(props.scope.row["certificateEndTime"],false)}}
  72. </div>
  73. </template>
  74. </table-list>
  75. <pagination
  76. :total="total"
  77. :pageSize="formData.pageSize"
  78. :currentPage="formData.pageNum"
  79. @handleSizeChange="handleSizeChange"
  80. @handleCurrentChange="handleCurrentChange"
  81. />
  82. </div>
  83. </template>
  84. <script>
  85. import * as baseUrls from "@/utils/request.js";
  86. import searchBoxNew from "@/components/searchBoxNew";
  87. import tableList from "@/components/tableList";
  88. import pagination from "@/components/pagination";
  89. export default {
  90. name: "SevenExamData",
  91. components: { searchBoxNew, tableList, pagination },
  92. data() {
  93. return {
  94. month: "",
  95. monthList: [
  96. { label: "一月", value: "01" },
  97. { label: "二月", value: "02" },
  98. { label: "三月", value: "03" },
  99. { label: "四月", value: "04" },
  100. { label: "五月", value: "05" },
  101. { label: "六月", value: "06" },
  102. { label: "七月", value: "07" },
  103. { label: "八月", value: "08" },
  104. { label: "九月", value: "09" },
  105. { label: "十月", value: "10" },
  106. { label: "十一月", value: "11" },
  107. { label: "十二月", value: "12" },
  108. ],
  109. loading: false, //当前表单加载是否加载动画
  110. navText: {
  111. border: true,
  112. title: "计划",
  113. index: 0,
  114. ch: "条",
  115. num: false,
  116. tableHide: true,
  117. choice: true,
  118. changeWidth: "240px",
  119. openCheckMore: true,
  120. addHide: true,
  121. custom: false,
  122. backFatherBtn: {
  123. status: false,
  124. title: "未定义",
  125. },
  126. },
  127. //搜索
  128. formList: [
  129. {
  130. prop: "subscribeStatus",
  131. placeholder: "预约状态",
  132. scope: "select",
  133. options: [
  134. { label: "正常", value: 1 },
  135. { label: "取消", value: 2 },
  136. { label: "已过期", value: 3 },
  137. ],
  138. },
  139. {
  140. prop: "applyStatus",
  141. placeholder: "考试状态",
  142. scope: "select",
  143. options: [
  144. { label: "待考试", value: 1 },
  145. { label: "通过", value: 2 },
  146. { label: "未通过", value: 3 },
  147. ],
  148. },
  149. {
  150. prop: "newApply",
  151. placeholder: "是否新考",
  152. scope: "select",
  153. options: [
  154. { label: "是", value: 1 },
  155. { label: "否", value: 2 },
  156. ],
  157. },
  158. {
  159. prop: "keyWord",
  160. placeholder: "姓名 身份证",
  161. },
  162. {
  163. prop: "applyTime",
  164. placeholder: "选择考试月份",
  165. scope: "slot",
  166. slotName: "month",
  167. },
  168. {
  169. prop: "examTime",
  170. placeholder: "选择考试时间",
  171. scope: "select",
  172. options: [
  173. { label: "09:00", value: "09:00" },
  174. { label: "11:10", value: "11:10" },
  175. { label: "14:00", value: "14:00" },
  176. { label: "16:10", value: "16:10" },
  177. ],
  178. },
  179. ],
  180. formData: {
  181. pageSize: 10,
  182. pageNum: 1,
  183. },
  184. // 表单
  185. tableSet: [
  186. {
  187. label: "姓名",
  188. hidden: true,
  189. slotName: "name",
  190. scope: "slot",
  191. dontCenter:'left'
  192. },
  193. {
  194. label: "课程",
  195. prop: "goodsName",
  196. hidden: true,
  197. },
  198. {
  199. label: "岗位",
  200. prop: "majorName",
  201. hidden: true,
  202. },
  203. {
  204. label: "公司名",
  205. prop: "companyName",
  206. hidden: true,
  207. },
  208. {
  209. label: "所属机构",
  210. prop: "tenantName",
  211. hidden: true,
  212. },
  213. {
  214. label: "创建时间",
  215. prop: "createTime",
  216. hidden: true,
  217. scope: "aTimeList",
  218. },
  219. {
  220. label: "预约状态",
  221. prop: "subscribeStatus",
  222. hidden: true,
  223. scope: "isOptions",
  224. options: [
  225. {
  226. label: "正常",
  227. value: 1,
  228. },
  229. {
  230. label: "取消",
  231. value: 2,
  232. },
  233. {
  234. label: "已过期",
  235. value: 3,
  236. },
  237. ],
  238. },
  239. {
  240. label: "预约结果",
  241. hidden: true,
  242. slotName: "applyResult",
  243. scope: "slot",
  244. dontCenter:'left'
  245. },
  246. {
  247. label: "是否开通题库",
  248. prop: "questionStatus",
  249. hidden: true,
  250. scope: "isOptions",
  251. options: [
  252. {
  253. label: "是",
  254. value: 1,
  255. },
  256. {
  257. label: "否",
  258. value: 2,
  259. },
  260. ],
  261. },
  262. {
  263. label: "是否新考",
  264. prop: "newApply",
  265. hidden: true,
  266. scope: "isOptions",
  267. options: [
  268. {
  269. label: "是",
  270. value: 1,
  271. },
  272. {
  273. label: "否",
  274. value: 2,
  275. },
  276. ],
  277. },
  278. {
  279. label: "剩余考试次数",
  280. prop: "applyNum",
  281. hidden: true,
  282. },
  283. {
  284. label: "考试状态",
  285. prop: "applyStatus",
  286. hidden: true,
  287. scope: "isOptions",
  288. options: [
  289. {
  290. label: "待考试",
  291. value: 1,
  292. },
  293. {
  294. label: "通过",
  295. value: 2,
  296. },
  297. {
  298. label: "未通过",
  299. value: 3,
  300. },
  301. ],
  302. },
  303. {
  304. label: "考试回执",
  305. hidden: true,
  306. slotName: "receipt",
  307. scope: "slot",
  308. dontCenter:'left'
  309. },
  310. ],
  311. tableData: [], //表单数据
  312. total: 0, //一共多少条
  313. };
  314. },
  315. mounted() {
  316. this.search();
  317. this.getQP();
  318. },
  319. activated() {
  320. this.search();
  321. this.getQP();
  322. },
  323. methods: {
  324. /**
  325. * 默认选择考前培训-施工七大员
  326. */
  327. moRenBus() {
  328. },
  329. getQP() {
  330. this.$api.inquiresystembefore({ status: 1 }).then((res) => {
  331. this.optionsList = res.rows;
  332. });
  333. },
  334. search() {
  335. this.loading = true;
  336. this.$api
  337. .inquiresystemsevensublist(this.formData)
  338. .then((res) => {
  339. this.tableData = res.rows;
  340. this.total = res.total;
  341. this.navText.index = res.total;
  342. })
  343. .finally(() => {
  344. this.loading = false;
  345. });
  346. },
  347. init() {
  348. this.month = "";
  349. this.search();
  350. },
  351. addClick(v, int) {
  352. // int = 2详情 3学员管理
  353. if (v === undefined) {
  354. // 添加班级
  355. this.$router.push({
  356. path: "addClass",
  357. });
  358. } else {
  359. if (int === 2) {
  360. //班级详情
  361. this.$router.push({
  362. path: "manageClass",
  363. query: {
  364. id: v.gradeId,
  365. },
  366. });
  367. }
  368. if (int === 3) {
  369. // 学员管理
  370. this.$router.push({
  371. path: "studentMenu",
  372. query: {
  373. id: v.gradeId,
  374. goodsId: v.goodsList[0].goodsId,
  375. },
  376. });
  377. }
  378. }
  379. },
  380. handleSizeChange(v) {
  381. this.formData.pageSize = v;
  382. this.formData.pageNum = 1;
  383. this.search();
  384. },
  385. handleCurrentChange(v) {
  386. this.formData.pageNum = v;
  387. this.search();
  388. },
  389. },
  390. };
  391. </script>
  392. <style lang="less" scoped>
  393. /deep/.el-button {
  394. border-radius: 8px;
  395. }
  396. /deep/.el-dialog {
  397. border-radius: 8px;
  398. .el-dialog__header {
  399. padding: 0;
  400. .hearders {
  401. height: 40px;
  402. display: flex;
  403. align-items: center;
  404. justify-content: space-between;
  405. padding: 0px 18px 0px 20px;
  406. border-bottom: 1px solid #e2e2e2;
  407. .leftTitle {
  408. font-size: 14px;
  409. font-weight: bold;
  410. color: #2f4378;
  411. }
  412. .rightBoxs {
  413. display: flex;
  414. align-items: center;
  415. img {
  416. width: 14px;
  417. height: 14px;
  418. margin-left: 13px;
  419. cursor: pointer;
  420. }
  421. }
  422. }
  423. }
  424. .el-dialog__footer {
  425. padding: 0;
  426. .dialog-footer {
  427. padding: 0px 40px;
  428. height: 70px;
  429. border-top: 1px solid #e2e2e2;
  430. display: flex;
  431. align-items: center;
  432. justify-content: flex-end;
  433. }
  434. }
  435. }
  436. .imgBox {
  437. width: 100%;
  438. // height: 210px;
  439. border: 1px solid #e2e2e2;
  440. border-radius: 8px;
  441. padding: 8px 8px 3px;
  442. display: flex;
  443. flex-direction: column;
  444. align-items: center;
  445. .imgLabel {
  446. flex: 1;
  447. width: 100%;
  448. border: 1px dotted #e2e2e2;
  449. color: #999;
  450. font-size: 14px;
  451. cursor: pointer;
  452. border-radius: 8px;
  453. .msPhoto {
  454. display: flex;
  455. justify-content: center;
  456. align-items: center;
  457. max-width: 100%;
  458. max-height: 270px;
  459. img {
  460. max-width: 100%;
  461. max-height: 270px;
  462. }
  463. }
  464. .imgbbx {
  465. display: flex;
  466. flex-direction: column;
  467. align-items: center;
  468. justify-content: center;
  469. width: 100%;
  470. height: 100%;
  471. i {
  472. font-weight: bold;
  473. margin: 14px 0;
  474. font-size: 24px;
  475. }
  476. }
  477. }
  478. p {
  479. margin: 5px 0px;
  480. }
  481. }
  482. .aListBottom {
  483. margin-left: 20px;
  484. padding: 0px 6px;
  485. border: 1px solid #999;
  486. border-radius: 4px;
  487. height: 30px;
  488. line-height: 30px;
  489. display: inline-block;
  490. }
  491. .liBVS {
  492. margin-right: 20px;
  493. margin-bottom: 12px;
  494. padding: 0px 6px;
  495. border: 1px solid #999;
  496. border-radius: 4px;
  497. height: 30px;
  498. line-height: 30px;
  499. display: inline-block;
  500. float: left;
  501. }
  502. .clsw {
  503. margin-left: 4px;
  504. cursor: pointer;
  505. color: #f56c6c;
  506. }
  507. .swq {
  508. text-align: center;
  509. border-bottom: 1px solid #eee;
  510. }
  511. .dowmStys {
  512. color: blue;
  513. cursor: pointer;
  514. }
  515. </style>