batch.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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" @query="handleQuery"
  29. @invalid="handleInvalidQuery"></mx-condition>
  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. requireFields:['location','yearAdmission'],
  56. backimg:
  57. "url(" + require("@/assets/images/career/icon_colleges.png") + ")",
  58. batchData: [],
  59. pageForm: { pageNum: 1, pageSize: 20, total: 0 },
  60. propDefines: {
  61. year: {
  62. label: "年份",
  63. },
  64. location: {
  65. label: "省市",
  66. },
  67. typeName: {
  68. label: "批次/段",
  69. },
  70. course: {
  71. label: "科目",
  72. },
  73. score: {
  74. label: "控制分数线",
  75. },
  76. pressureRange: {
  77. label: "压线分区间",
  78. },
  79. }
  80. };
  81. },
  82. computed:{
  83. ...mapGetters(['currentUser']),
  84. },
  85. created() {
  86. this.getBatchList();
  87. this.queryParams.location = this.currentUser.provinceName
  88. },
  89. methods: {
  90. handleQuery() {
  91. this.getBatchList()
  92. },
  93. handleInvalidQuery() {
  94. console.log('query出错')
  95. this.round = {}
  96. },
  97. onChangePage(page){
  98. this.pageForm.pageSize = page.limit;
  99. this.pageForm.pageNum = page.page;
  100. this.getBatchList();
  101. },
  102. getBatchList() {
  103. pckzxList({
  104. ...this.pageForm,
  105. location: this.queryParams.location,
  106. year: this.queryParams.yearAdmission,
  107. }).then((res) => {
  108. this.batchData = res.rows;
  109. this.pageForm.total = res.total;
  110. console.log(res);
  111. });
  112. },
  113. },
  114. };
  115. </script>
  116. <style lang="scss" scoped>
  117. .layui-bg-orange {
  118. background-color: #47c6a2;
  119. margin-left: 0;
  120. }
  121. </style>
  122. <style lang="scss">
  123. .radioInput {
  124. .el-radio {
  125. .el-radio__input {
  126. display: none;
  127. }
  128. }
  129. }
  130. .radioInput {
  131. display: flex;
  132. .el-radio-button .el-radio-button__inner {
  133. border-radius: 4px !important;
  134. border: none;
  135. padding: 5px 10px !important;
  136. font-weight: 400;
  137. font-family: PingFangSC-Regular, PingFang SC;
  138. }
  139. .el-radio-button__orig-radio:checked + .el-radio-button__inner {
  140. box-shadow: none;
  141. }
  142. .radiaTitle {
  143. display: inline-block;
  144. width: 130px;
  145. font-size: 14px;
  146. text-align: right;
  147. margin-top: 2px;
  148. }
  149. }
  150. .radioInput02 {
  151. display: flex;
  152. align-items: center;
  153. .radiaTitle {
  154. display: inline-block;
  155. width: 130px;
  156. font-size: 14px;
  157. text-align: right;
  158. margin-top: 2px;
  159. }
  160. .el-input--medium .el-input__inner {
  161. border-radius: 50px;
  162. }
  163. }
  164. </style>