<template>
  <section>
    <article class="group-title">
      <section class="group-title-order">
        <div @click="selectedType(1)" class="group-title-order-item">
          <span>{{selectedAreaName}}</span><img src="../../images/lecturer/select-down.png"/>
        </div>
        <div @click="selectedType(2)" class="group-title-order-item">
          <span>{{selectedLevelName}}</span><img src="../../images/lecturer/select-down.png"/>
        </div>
        <div @click="selectedType(3)" class="group-title-order-item">
          <span>{{selectedDepartName}}</span><img src="../../images/lecturer/select-down.png"/>
        </div>
      </section>
    </article>
  </section>

</template>
<script>
export default {
  data() {
      return {
        selectedTypeIndex: 1
      }
  },
  props: {
    selectedAreaName: {
      type: String,
      default: '全国'
    },
    selectedLevelName: {
      type: String,
      default: '全部等级'
    },
    selectedDepartName: {
      type: String,
      default: '全部科室'
    }
  },
  computed: {
    // ...mapGetters({
    //   // orderNum: 'orderNum'
    // })
  },
  watch: {
    // orderNum(val) {
    //   this.showOrderIndex = 1    
    // }
  },
  methods: {
    selectedType(index) {
      this.selectedTypeIndex = index
      this.$emit('selectedType', index)
    },
  }
}
</script>

<style lang="scss" scoped>
@import '../../style/mixin.scss';

.group-title {
  display: flex;
  flex-direction: row;
  margin: px2rem(6px) px2rem(25px) px2rem(2px);
  &-order {
    display: flex;
    flex-direction: row;
    width: px2rem(325px);
    justify-content: space-between;
    font-size: px2rem(13px);
    &-item {
      span {
        font-size: px2rem(15px);
        color: #333;
      }
      img {
        position: relative;
        top: px2rem(1px);
        left: px2rem(1px);
        height: px2rem(11px);
        width: px2rem(11px);
      }
    }
  }
}
.active {
  color: #449284;
}
</style>
