Authored by htoooth

Merge remote-tracking branch 'origin/release/1.0' into release/1.0

<template>
<Select v-model="_fieldModel" @on-change="selectChange" clearable>
<Select v-model="brandId" @on-change="selectChange" clearable>
<Option :value="-1">全部</Option>
<Option v-for="option in optionList" :value="option.brandId" :key="option.brandId">
{{option.brandName}}
... ... @@ -14,43 +14,27 @@
export default {
name: 'SelectBrand',
props: {
fieldLabel: {
type: String
},
fieldModel: {
type: [String, Number]
},
labelSpan: {
type: [String, Number],
default: 6
},
fieldSpan: {
type: [String, Number],
default: 18
value: {
type: Number,
default: 0
}
},
data() {
return {
brandId: this.value,
optionList: []
}
},
computed: {
_fieldModel() {
return this.fieldModel;
}
};
},
created() {
const err_msg = '获取品牌列表失败。';
service.getBrand().then((res) => {
let code = _.get(res, 'data.code');
if(code === 200) {
return this.optionList = res.data.data;
if (code === 200) {
this.optionList = res.data.data;
return;
}
return this.$Message.error(err_msg);
}, (error) => {
this.$Message.error(error.message);
... ... @@ -58,10 +42,10 @@
},
methods: {
selectChange(val) {
this.$emit('on-change', val);
this.$emit('input', val);
}
}
}
};
</script>
<style lang="scss" scoped>
... ...
... ... @@ -18,12 +18,7 @@
:placeholder="filters.prodBarCode.holder"></Input>
</FilterItem>
<FilterItem label="选择品牌">
<SelectBrand @on-change="brandChange"
:field-label="filters.brand.label"
:field-model="filters.brand.model"
:label-span="filters.brand.labelSpan"
:field-span="filters.brand.fieldSpan"
:option-list="filters.brand.options">
<SelectBrand v-model="filters.brand.model">
</SelectBrand>
</FilterItem>
<FilterItem label="选择类目">
... ...
// import _ from 'lodash';
import axios from 'axios';
const shopService = {
... ... @@ -25,6 +24,13 @@ const shopService = {
return axios.post('/platform/updateShopBaseInfoById', shop)
.then(result => result.data);
},
/**
* 获取装修店铺列表
*/
getDecoratorShops() {
return axios.get('/platform/queryShopsDecoratorList').then(result => result.data);
}
};
... ...