<template>
<!-- 分公司下拉框 -->
  <div class="col-sm-3 form-group form-input-group drop-down-box" style="width: 20%">
    <label class="font_normal_body" style="color: #fff;">分公司</label>
    <v-select
      placeholder='请选择分公司'
      :value-single="true"
      v-model='f_orgstr'
      :value.sync="f_orgstr"
      :options='orgstrs'
      close-on-select clear-button>
    </v-select>
  </div>


</template>

<script>

export default {
  name: "DropDownBox",
  data(){
    return{
      f_orgstr: '23145',
      orgstrs:[
        {label: '夏津中邑燃气有限公司', value: '21131'},
        {label: '临邑中邑燃气有限公司', value: '21137'},
        {label: '山东彤运天燃气有限公司', value: '21143'},
        {label: '庆云浩通天燃气有限公司', value: '21155'},
        {label: '山东中邑燃气有限公司', value: '23145'}
      ]
    }
  },
  computed:{
  },
  ready(){

  },
  methods:{

  },
  watch: {
    'f_orgstr': {
      handler(val){
        for (const orgstr of this.orgstrs) {
          if (orgstr.value == val){
            this.$emit('select',orgstr)
            break
          }
        }

      },
      immediate: true
    }
  },
}
</script>

<style scoped>
.drop-down-box{
  position: absolute;
  top: 76px;
}
</style>
