<template>
  <div>
    <p class="search__label">{{ $t('应用') }}:</p>
    <el-select
        class="inline-24"
        size="small"
        v-model="application"
        :placeholder="$t('请选择范围')"
        @change="applicationChange"
    >
      <el-option
          v-for="item in applicationList"
          :key="item.index"
          :label="$t(item.label)"
          :value="item.value"
      ></el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  name: "index",
  props:{
    application:String
  },
  data(){
    return {
      applicationList:[
        {
          label: '销售线索',
          value: "1",
        },
        {
          label: '客户',
          value: "2",
        },
        {
          label: '合同',
          value: "3",
        },
        {
          label: '项目商机',
          value: "4",
        },
        {
          label: '报价单',
          value: "5",
        },
        {
          label: '合作伙伴',
          value: "6",
        },
        {
          label: '商品',
          value: "7",
        },
        {
          label: '公海线索',
          value: "8",
        }
      ],
    }
  },
  methods:{
    applicationChange(val){
      this.application = val
      this.$emit("changeApplication",val)
    },
  }
}
</script>

<style scoped>

</style>
