batch.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <div class="simulation">
  3. <el-card class="mt20 mb20">
  4. <div
  5. :style="{ 'background-image': backimg }"
  6. style="
  7. padding: 30px;
  8. margin: 10px 0;
  9. background-color: white;
  10. background-repeat: no-repeat;
  11. background-position: bottom right;
  12. "
  13. >
  14. <p style="color: #a6a6a6; font-size: 24px; font-weight: bold">
  15. BATCH CONTROL LINE
  16. </p>
  17. <p style="color: #414141; font-size: 24px; font-weight: bold">
  18. 批次控制线
  19. </p>
  20. <hr
  21. class="layui-bg-orange"
  22. style="width: 40px; height: 4px; margin-top: 10px"
  23. />
  24. </div>
  25. </el-card>
  26. <el-card>
  27. <div>
  28. <mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields" :invisible-fields="invisibleFields"
  29. use-alias-mapping @query="handleQuery" />
  30. </div>
  31. <div class="content">
  32. <mx-table :rows="batchData" :propDefines="propDefines"> </mx-table>
  33. <pagination :total="pageForm.total" :autoScroll="false" @pagination="onChangePage" :page.sync="pageForm.pageNum"
  34. :limit.sync="pageForm.pageSize"></pagination>
  35. </div>
  36. </el-card>
  37. </div>
  38. </template>
  39. <script>
  40. import { pckzxList } from "@/api/webApi/career-other";
  41. import MxCondition from '@/components/MxCondition/mx-condition'
  42. import Pagination from '@/components/Pagination/index'
  43. import { mapGetters } from 'vuex'
  44. export default {
  45. components: {
  46. MxCondition,
  47. Pagination
  48. },
  49. data() {
  50. return {
  51. queryParams: {
  52. location: '',
  53. yearAdmission: '',
  54. },
  55. firedParams: null,
  56. requireFields:['location', 'yearAdmission'],
  57. invisibleFields: ['location'],
  58. backimg:
  59. "url(" + require("@/assets/images/career/icon_colleges.png") + ")",
  60. batchData: [],
  61. pageForm: { pageNum: 1, pageSize: 20, total: 0 },
  62. propDefines: {
  63. year: {
  64. label: "年份",
  65. },
  66. location: {
  67. label: "省市",
  68. },
  69. typeName: {
  70. label: "批次/段",
  71. },
  72. course: {
  73. label: "科目",
  74. },
  75. score: {
  76. label: "控制分数线",
  77. },
  78. // pressureRange: {
  79. // label: "压线分区间",
  80. // },
  81. }
  82. };
  83. },
  84. computed:{
  85. ...mapGetters(['currentUser']),
  86. },
  87. created() {
  88. this.queryParams.location = this.currentUser.provinceName
  89. },
  90. methods: {
  91. handleQuery(model) {
  92. this.firedParams = model
  93. this.pageForm.pageNum = 1;
  94. this.getBatchList()
  95. },
  96. onChangePage(){
  97. this.getBatchList();
  98. },
  99. getBatchList() {
  100. pckzxList({
  101. ...this.firedParams,
  102. ...this.pageForm
  103. }).then((res) => {
  104. this.batchData = res.rows;
  105. this.pageForm.total = res.total;
  106. });
  107. },
  108. },
  109. };
  110. </script>
  111. <style lang="scss" scoped>
  112. .layui-bg-orange {
  113. background-color: #47c6a2;
  114. margin-left: 0;
  115. }
  116. </style>