<!--信息查询-->
<template>
  <div class="content-div">
    <a-card class="info-submit" :bordered="false">
        <a-radio-group v-model="defaultValue" button-style="solid" @change="changeContent">
          <a-radio-button v-for="(item, index) in menus" :key="item.action" :value="item.value" :name="item.va">
            {{ item.describe }}
          </a-radio-button>
        </a-radio-group>
    </a-card>
    <a-card :bordered="false">
      <!--省属企业信息管理-->
      <company-info v-show="'ssqyxxgl' == defaultValue"></company-info>
      <!--省直单位信息管理-->
      <depart-info v-show="'szdwxxgl' == defaultValue"></depart-info>
      <!--省属企业地块管理-->
      <company-land v-show="'ssqydkgl' == defaultValue" :year-list="yearList"></company-land>
      <!--省直单位地块管理-->
      <depart-land v-show="'szdwdkgl' == defaultValue" :year-list="yearList"></depart-land>

    </a-card>
  </div>
</template>


<script>
import companyInfo from '../qcsb/qyxx/QcQyxxList_gly.vue'
import departInfo from '../sydwqcsb/sydwxx/QcQyxxList_glyy.vue'
import companyLand from '../qcsb/QcSsgqzysytdqkList_gly.vue'
import departLand from '../sydwqcsb/QcSsgqzysytdqkList_glyy.vue'
import {getyear} from '@/api/api'

export default {
  name: 'landInfo',
  components: {
    companyInfo,
    departInfo,
    companyLand,
    departLand,


  },
  data() {
    return {
      defaultValue: '',
      menus: [],
      yearList: [],
    }
  },
  created() {
    this.menus = this.$store.state.menu.menuList['xxcx'];
    this.defaultValue = this.menus.length > 0 ? this.menus[0].value : '';
    this.getYear();
  },
  methods: {
    changeContent(key) {
      console.log(key);
    },
    getYear() {
      getyear().then((res) => {
        if (res.success) {
          this.yearList = res.result;
          console.table(this.yearList);
        }
      })
    }

  }

}
</script>

<style scoped>
.content-div {
  height: 100%;
}
.ant-card:not(:last-child) {
  margin-bottom: 10px;
}
.ant-card:last-child {
  height: calc(100% - 70px);
  overflow-y: auto;
}
</style>
<style lang="less" scoped>
.info-submit {
  & ::v-deep > .ant-card-body {
    padding: 14px 24px;
  }
  &::v-deep .ant-radio-button-wrapper {
    //border: 1px solid ;
    border-radius: 4px;
    padding-left: 25px;
    padding-right: 25px;
    //border-left: 1px;
    border: 1px solid @primary-color;
    margin-left: 15px;
    color: @primary-color;
  }
  & /deep/ .ant-radio-button-wrapper:not(:first-child)::before {
    width: 0px;
  }
  & .ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
    color: #fff;
  }
}
.content-div {
  &::v-deep .ant-card:last-child .ant-card-body {
    padding: 10px 24px 0;
  }

}

</style>