storelevelOption.vue
2.2 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
<template>
<div class="condition-item">
<li class="condition-item">
<span class="condition-item-text">店铺层级: </span>
<div class="condition-item-option">
<el-select v-model="storeLevel" :placeholder="$t('pholder.gateLevel')" class="floor-sel-box">
<el-option v-for="item in storeLevelList" :key="item.value" :label="$t('asisTab.' + item.label)" :value="item.value"></el-option>
</el-select>
<el-select v-if="storeLevel === 'floor'" v-model="storeFloorVal" filterable :placeholder="$t('pholder.floorSelect')" class="floor-sel-box">
<el-option v-for="item in shopFloorData" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</li>
<format-option-content v-if="storeLevel === 'format'" :storeLevel="true" :objectVal="2" @formatValWatch="storeFormatValReceive"></format-option-content>
</div>
</template>
<script>
export default {
props: {
shopFloorData: {
type: Array
},
shopFloorVal: {
}
},
data() {
return {
storeLevelList: [
{
label: 'floor',
value: 'floor',
},
{
label: 'format',
value: 'format',
}
],
storeFloorVal: '',
storeLevel: '',
storemutiFormatVal: [],
storemutiFormatTwoVal: [],
storeformatLevel: null,
}
},
watch: {
storeLevel(val) {
let obj = {
Level: val
}
this.$emit('storelevel',obj)
},
storeFloorVal(val) {
let obj = {
FloorVal: val
}
this.$emit('storelevel',obj)
}
},
created() {
this.storeLevel = 'floor';
this.storeformatLevel = 1;
},
mounted() {
this.storeFloorVal = JSON.parse(JSON.stringify(this.shopFloorVal));
},
methods: {
storeFormatValReceive(valObj) {
this.$emit('storelevel', valObj)
},
}
}
</script>
<style scoped>
</style>