...
|
...
|
@@ -89,16 +89,18 @@ const handleBrandCheckedData = (params, origin) => { |
|
|
// 分拆品牌参数
|
|
|
let brands = _.split(params.brand, ',');
|
|
|
let intBrands = [];
|
|
|
let brandTotalName = '';
|
|
|
|
|
|
_.forEach(brands, value => {
|
|
|
intBrands.push(parseInt(value, 10));
|
|
|
});
|
|
|
|
|
|
let checkedCount = 0;
|
|
|
let checkedCount = 0,
|
|
|
brandsTotalName = '';
|
|
|
|
|
|
// 遍历品牌数据,如果在参数中,那么加 checked,将此数据加入到 checked 数组中
|
|
|
if (!_.isEmpty(origin)) {
|
|
|
|
|
|
brandsTotalName = _.map(origin, 'name').join('、');
|
|
|
_.forEach(origin, (value) => {
|
|
|
if (typeof _.find(intBrands, o => {
|
|
|
return _.isEqual(o, +value.id);
|
...
|
...
|
@@ -139,10 +141,10 @@ const handleBrandCheckedData = (params, origin) => { |
|
|
|
|
|
// 建议保留,需要品牌可以单个删除时放开注释即可
|
|
|
// dest.push(checked);
|
|
|
brandTotalName += checked.name + '、';
|
|
|
dest[0].totalName = brandTotalName;
|
|
|
dest[0].totalName = brandsTotalName;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
return dest;
|
|
|
};
|
...
|
...
|
|