123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <template>
- <div>
- <div>
- <!-- 录取年份 -->
- <el-row class="radioInput">
- <div>
- <span class="radiaTitle">录取年份:</span>
- </div>
- <el-radio-group v-model="universityParams.year">
- <el-radio-button v-for="item in years" :key="item" :label="item"
- style="margin-bottom:10px"></el-radio-button>
- </el-radio-group>
- </el-row>
- <!-- 科类 -->
- <el-row class="radioInput">
- <div>
- <span class="radiaTitle">科类:</span>
- </div>
- <el-radio-group v-model="universityParams.liberalScience">
- <el-radio-button label="">所有</el-radio-button>
- <el-radio-button v-for="item in types" :key="item" :label="item"
- style="margin-bottom:10px"></el-radio-button>
- </el-radio-group>
- </el-row>
- <!-- 院校过滤条件 -->
- <filter-form :filter="filter_form"></filter-form>
- <mx-search-group class="mb10" justify="end" :span="6" v-model="name" placeholder="搜索" @search="clickSuffix"
- ></mx-search-group>
- <!-- 表格数据 -->
- <universities-line-table :universityParams="all_form"></universities-line-table>
- </div>
- </div>
- </template>
- <script>
- import {
- selectUniversityTypes,
- selectUniversityYears
- } from '@/api/webApi/shiftLine'
- import UniversitiesLineTable from '@/views/career/components/UniversitiesLineTable'
- import FilterForm from '@/views/career/components/FilterForm'
- import MxSearchGroup from '@/components/MxSearch/mx-search-group'
- export default {
- name: "UniversitiesLine",
- components: {UniversitiesLineTable,FilterForm,MxSearchGroup},
- data() {
- return {
- types: [],
- years: [],
- filter_form:{
- location:'',
- natureTypeCN:'',
- type:'',
- level:'',
- features:'',
- name:''
- },
- name:'',
- universityParams: {
- liberalScience: '',
- year: ''
- }
- }
- },
- computed:{
- all_form(){
- return {
- ...this.filter_form,
- ...this.universityParams,
- }
- }
- },
- watch: {
- 'universityParams.year': {
- immediate: false,
- handler(val) {
- this.getUniversityTypes()
- }
- }
- },
- created() {
- this.getUniversityYears()
- },
- methods: {
- clickSuffix() {
- this.filter_form.name = this.name
- },
- getUniversityTypes() {
- const params = {
- year: this.universityParams.year,
- }
- selectUniversityTypes(params).then(res => {
- this.types = res.rows
- })
- },
- getUniversityYears() {
- selectUniversityYears().then(res => {
- this.universityParams.year = res.rows[0]
- this.years = res.rows
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .radioInput ::v-deep {
- background-color: #ffffff;
- font-size: 14px;
- padding:5px;
- .el-radio {
- .el-radio__input {
- display: none;
- }
- }
- }
- .radioInput ::v-deep {
- display: flex;
- .el-radio-button .el-radio-button__inner {
- border-radius: 4px !important;
- border: none;
- padding: 5px 10px !important;
- font-weight: 400;
- font-family: PingFangSC-Regular, PingFang SC;
- }
- .el-radio-button__orig-radio:checked + .el-radio-button__inner {
- box-shadow: none;
- }
- .radiaTitle {
- display: inline-block;
- width: 80px;
- font-size: 14px;
- text-align: right;
- margin-top: 2px;
- margin-right: 10px;
- }
- }
- </style>
|