Commit f158c508 authored by suhuiguang's avatar suhuiguang

1.xiugaiquexian

parent 9b62e283
...@@ -17,8 +17,10 @@ export const getObjFromNet = (url, callback) => { ...@@ -17,8 +17,10 @@ export const getObjFromNet = (url, callback) => {
return { return {
basePath, basePath,
...rest, ...rest,
objName: encodeUrl(objName), objName,
mtlName: encodeUrl(mtlName) mtlName
// objName: encodeUrl(objName),
// mtlName: encodeUrl(mtlName)
}; };
}); });
......
...@@ -85,9 +85,10 @@ class PointLeftTree extends Component { ...@@ -85,9 +85,10 @@ class PointLeftTree extends Component {
const { pointType = '' } = this.props; const { pointType = '' } = this.props;
if (data.length > 0) { if (data.length > 0) {
return data.map((item) => { return data.map((item) => {
const index = item.name.indexOf(searchValue); const label = item.name ? item.name : item.code;
const beforeStr = item.name.substr(0, index); const index = label.indexOf(searchValue);
const afterStr = item.name.substr(index + searchValue.length); const beforeStr = label.substr(0, index);
const afterStr = label.substr(index + searchValue.length);
const title = const title =
index > -1 ? ( index > -1 ? (
<span> <span>
...@@ -96,7 +97,7 @@ class PointLeftTree extends Component { ...@@ -96,7 +97,7 @@ class PointLeftTree extends Component {
{afterStr} {afterStr}
</span> </span>
) : ( ) : (
<span>{item.name}</span> <span>{label}</span>
); );
if (item.children) { if (item.children) {
return ( 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