ContractorSelect.vue
1.84 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<template>
<el-select v-model="contractor" @change="contractorChange" :disabled="disabled" placeholder="请选择" size="small" style="width:100px;">
<el-option
v-for="item in contractors"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</template>
<script>
export default{
props:['label', 'prop', 'notPrepend', 'defaultValue', 'disabled'],
data(){
return {
contractor: this.defaultValue,
contractors: [
{
value: '康凯斯',
label: '康凯斯'
},
{
value: '博实结',
label: '博实结'
}, {
value: '华宝',
label: '华宝'
}, {
value: '有方',
label: '有方'
}, {
value: '睿讯通',
label: '睿讯通'
}, {
value: '恒泰',
label: '恒泰'
}, {
value: '好的货',
label: '好的货'
}, {
value: '富创',
label: '富创'
}, {
value: '广益汇佳',
label: '广益汇佳'
},{
value: '易图',
label: '易图'
},{
value: '鲁诺',
label: '鲁诺'
},{
value: '零零智能',
label: '零零智能'
},{
value: '移柯',
label: '移柯'
},{
value: '沃达孚',
label: '沃达孚'
},
]
}
},
mounted(){
if(!this.notPrepend){
this.contractors.unshift({
value: '',
label: '全部'
})
}
},
watch: {
defaultValue(newVal){
this.contractor = newVal
}
},
methods: {
contractorChange(){
this.$emit('contractorChange', this.contractor)
}
}
}
</script>
<style scoped>
</style>