Commit f158c508 authored by suhuiguang's avatar suhuiguang

1.xiugaiquexian

parent 9b62e283
......@@ -17,8 +17,10 @@ export const getObjFromNet = (url, callback) => {
return {
basePath,
...rest,
objName: encodeUrl(objName),
mtlName: encodeUrl(mtlName)
objName,
mtlName
// objName: encodeUrl(objName),
// mtlName: encodeUrl(mtlName)
};
});
......
......@@ -85,9 +85,10 @@ class PointLeftTree extends Component {
const { pointType = '' } = this.props;
if (data.length > 0) {
return data.map((item) => {
const index = item.name.indexOf(searchValue);
const beforeStr = item.name.substr(0, index);
const afterStr = item.name.substr(index + searchValue.length);
const label = item.name ? item.name : item.code;
const index = label.indexOf(searchValue);
const beforeStr = label.substr(0, index);
const afterStr = label.substr(index + searchValue.length);
const title =
index > -1 ? (
<span>
......@@ -96,7 +97,7 @@ class PointLeftTree extends Component {
{afterStr}
</span>
) : (
<span>{item.name}</span>
<span>{label}</span>
);
if (item.children) {
return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment