perf(产品管理): 编辑: 产品树+【城市】

perf/export-docx
Lei OT 11 months ago
parent c101d6660c
commit 04552f3f00

@ -69,21 +69,21 @@ const ProductsTree = ({ onNodeSelect, ...props }) => {
children: (agencyProducts[ele.value] || []).map((product) => {
const lgc_map = product.lgc_details.reduce((rlgc, clgc) => ({...rlgc, [clgc.lgc]: clgc}), {});
return {
title: product.info.title || lgc_map?.['2']?.title || lgc_map?.['1']?.title || '',
// title: `${product.info.city_name}` + (product.info.title || lgc_map?.['2']?.title || lgc_map?.['1']?.title || ''),
// title: product.info.title || lgc_map?.['2']?.title || lgc_map?.['1']?.title || '',
title: `${product.info.city_name}` + (product.info.title || lgc_map?.['2']?.title || lgc_map?.['1']?.title || ''),
// key: `${ele.value}-${product.info.id}`,
key: product.info.id,
_raw: product,
isLeaf: true,
}}),
// ``
_children: Object.keys(copyAgencyProducts[ele.value] || []).map(city => {
return {
title: city,
key: `${ele.value}-${city}`,
children: copyAgencyProducts[ele.value][city],
};
}),
// _children: Object.keys(copyAgencyProducts[ele.value] || []).map(city => {
// return {
// title: city,
// key: `${ele.value}-${city}`,
// children: copyAgencyProducts[ele.value][city],
// };
// }),
}));
setTreeData(_show);
setRawTreeData(_show);

Loading…
Cancel
Save