...
|
...
|
@@ -60,32 +60,18 @@ |
|
|
|
|
|
<script>
|
|
|
import _ from 'lodash';
|
|
|
import ProductService from 'services/product/product-service';
|
|
|
import vipStore from './store';
|
|
|
import ProductService from 'services/product/product-service';
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
columns: [],
|
|
|
dataList: {},
|
|
|
page: {},
|
|
|
filters: {},
|
|
|
batchRows: [],
|
|
|
submitting: false,
|
|
|
enableFilter: false,
|
|
|
categoryValue: []
|
|
|
};
|
|
|
return vipStore.apply(this);
|
|
|
},
|
|
|
created() {
|
|
|
this.productService = new ProductService();
|
|
|
const vip = vipStore.apply(this);
|
|
|
const params = this.filterValues();
|
|
|
|
|
|
this.productService = new ProductService();
|
|
|
this.productList(params);
|
|
|
this.filters = vip.filterFields;
|
|
|
this.columns = vip.tableCols;
|
|
|
this.dataList = vip.tableData;
|
|
|
this.page = vip.pageData;
|
|
|
},
|
|
|
methods: {
|
|
|
filterValues() {
|
...
|
...
|
@@ -132,12 +118,18 @@ |
|
|
},
|
|
|
clearFilter() {
|
|
|
let params = {};
|
|
|
const store = vipStore.apply(this);
|
|
|
|
|
|
this.filters = store.filterFields;
|
|
|
|
|
|
this.reset();
|
|
|
this.enableFilter = false;
|
|
|
params = this.filterValues();
|
|
|
this.productList(params);
|
|
|
},
|
|
|
reset() {
|
|
|
_.each(this.filters, item => {
|
|
|
if (_.has(item, 'model')) {
|
|
|
item.model = '';
|
|
|
}
|
|
|
});
|
|
|
this.page.current = 1;
|
|
|
this.categoryValue = [];
|
|
|
},
|
...
|
...
|
|