zjf
2023-02-24 2126cd24b8a0174ac0597340917c0a4595f72254
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
  <el-select
    v-model="dataValue"
    :disabled="disabled"
    style="width: 100%;"
    placeholder="请选择"
    @change="valueChange">
    <el-option
      v-for="item in options"
      :key="item.typeId"
      :label="item.name"
      :value="item.typeId"/>
  </el-select>
</template>
<script type="text/javascript">
import stringMixin from './stringMixin'
// import { crmBusinessStatusList } from '@/api/clients/business'
 
export default {
  name: 'XhBusinessStatus', // 商机状态
  components: {},
  mixins: [stringMixin],
  props: {},
  data () {
    return {
      options: []
    }
  },
  computed: {},
  mounted () {
    this.getBusinessStatusList()
  },
  methods: {
    /** 获取商机状态组 */
    getBusinessStatusList () {
      // crmBusinessStatusList({})
      //   .then(res => {
      //     this.options = res.data
      //     if (this.dataValue) {
      //       for (const item of this.options) {
      //         if (item.typeId === this.dataValue) {
      //           this.$emit('value-change', {
      //             index: this.index,
      //             value: this.dataValue,
      //             data: this.options,
      //             type: 'init' // 初始化下不更改阶段值
      //           })
      //         }
      //       }
      //     }
      //   })
      //   .catch(() => {})
    },
    // 输入的值
    valueChange (val) {
      /** 商机组顺便回调筛选数据 */
      this.$emit('value-change', {
        index: this.index,
        value: val,
        data: this.options
      })
    }
  }
}
</script>
<style lang="less" scoped>
</style>