output.vue
2.7 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
<template>
<LayoutBody>
<LayoutFilter :no-line="true" :col="1">
<FilterItem label="文件类型">
<Select v-model="fileType.model">
<Option v-for="item in fileType.list" :value="item.id" :key="item">{{ item.label }}</Option>
</Select>
</FilterItem>
<FilterItem label="选择类目">
<SelectCategory @select-change="sortChange">
</SelectCategory>
</FilterItem>
<FilterItem>
<Button type="primary" @click="exportFile">导出</Button>
</FilterItem>
</LayoutFilter>
</LayoutBody>
</template>
<script>
import _ from 'lodash';
import service from 'product-service';
import {SelectCategory} from 'product/filter-select';
export default {
data() {
return {
fileType: {
model: 0,
list: [
{
id: 0,
label: '我的商品表'
}
]
},
sort: {
first: {
label: '选择类目',
holder: '选择一级类目',
labelSpan: 6,
fieldSpan: 18,
model: ''
},
second: {
label: '二级类目',
holder: '选择二级类目',
labelSpan: 6,
fieldSpan: 18,
model: ''
},
third: {
label: '三级类目',
holder: '选择三级类目',
labelSpan: 6,
fieldSpan: 18,
model: ''
}
}
}
},
methods: {
exportFile() {
const max = this.sort.first.model;
const mid = this.sort.second.model;
const min = this.sort.third.model;
const href = "/Api/platform/exportSellerProductList?"
+ `maxSortId=${max}&middleSortId=${mid}&smallSortId=${min}`;
window.open(href, '_blank');
},
sortChange(val) {
console.log(val)
this.sort.first.model = val.max;
this.sort.second.model = val.mid;
this.sort.third.model = val.min;
}
},
components: {
SelectCategory
}
}
</script>
<style lang="scss">
</style>