|
|
<template>
|
|
|
<div class="batch-page">
|
|
|
<Row class-name="row-space">
|
|
|
<LayoutBody>
|
|
|
<LayoutFilter :no-line="true" :col="1">
|
|
|
<h3>导出</h3>
|
|
|
</Row>
|
|
|
<Row :gutter="24" class-name="row-space">
|
|
|
<Col :span="6">
|
|
|
<Row>
|
|
|
<Col span="6">
|
|
|
<span class="field-label">文件类型:</span>
|
|
|
</Col>
|
|
|
<Col span="18">
|
|
|
<Select v-model="fileType.model">
|
|
|
<Option v-for="item in fileType.list" :value="item.id" :key="item">{{ item.label }}</Option>
|
|
|
</Select>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row class-name="row-space">
|
|
|
<SelectCategory :field-sort="sort" @on-change="sortChange">
|
|
|
<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>
|
|
|
</SelectCategory>
|
|
|
</Row>
|
|
|
</div>
|
|
|
</FilterItem>
|
|
|
</LayoutFilter>
|
|
|
</LayoutBody>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
...
|
...
|
@@ -69,22 +62,20 @@ |
|
|
},
|
|
|
methods: {
|
|
|
exportFile() {
|
|
|
const params = {
|
|
|
maxSortId: this.sort.first.model,
|
|
|
middleSortId: this.sort.second.model,
|
|
|
smallSortId: this.sort.third.model
|
|
|
};
|
|
|
const max = this.sort.first.model;
|
|
|
const mid = this.sort.second.model;
|
|
|
const min = this.sort.third.model;
|
|
|
|
|
|
service.exportProductFile(params)
|
|
|
.then(res => {
|
|
|
// todo 接口开发中
|
|
|
});
|
|
|
const href = "/Api/platform/exportSellerProductList?"
|
|
|
+ `maxSortId=${max}&middleSortId=${mid}&smallSortId=${min}`;
|
|
|
|
|
|
window.open(href, '_blank');
|
|
|
},
|
|
|
sortChange(val) {
|
|
|
this.sort.first.model = val.first;
|
|
|
this.sort.second.model = val.second;
|
|
|
this.sort.third.model = val.third;
|
|
|
console.log(val)
|
|
|
this.sort.first.model = val.max;
|
|
|
this.sort.second.model = val.mid;
|
|
|
this.sort.third.model = val.min;
|
|
|
}
|
|
|
},
|
|
|
components: {
|
...
|
...
|
@@ -94,11 +85,4 @@ |
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
.field-label {
|
|
|
line-height: 32px;
|
|
|
}
|
|
|
|
|
|
.row-space {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
</style> |
...
|
...
|
|