Commit 139e53af authored by 皮倩雯's avatar 皮倩雯

fix: '地图配置'

parent 9eca1717
Pipeline #69508 passed with stages
...@@ -167,7 +167,7 @@ const Map = props => { ...@@ -167,7 +167,7 @@ const Map = props => {
const [firstList, setFirstList] = useState({}); const [firstList, setFirstList] = useState({});
const [setttingsSave, setSetttingsSave] = useState({}); const [setttingsSave, setSetttingsSave] = useState({});
const [name, setName] = useState(''); const [name, setName] = useState('');
const [Schemename, setSchemename] = useState(''); const [Schemename, setSchemename] = useState({});
const [radio, setRadio] = useState(); const [radio, setRadio] = useState();
const mapRef = useRef(); const mapRef = useRef();
const styleRef = useRef(); const styleRef = useRef();
...@@ -282,7 +282,7 @@ const Map = props => { ...@@ -282,7 +282,7 @@ const Map = props => {
if (setttings.id) { if (setttings.id) {
setKeep(setttings); setKeep(setttings);
setName(setttings.id); setName(setttings.id);
setSchemename(setttings.schemename); setSchemename(setttings);
} else { } else {
setName(''); setName('');
} }
...@@ -392,7 +392,7 @@ const Map = props => { ...@@ -392,7 +392,7 @@ const Map = props => {
if (setttings.id) { if (setttings.id) {
setKeep(setttings); setKeep(setttings);
setName(setttings.id); setName(setttings.id);
setSchemename(setttings.schemename); setSchemename(setttings);
} else { } else {
setName(''); setName('');
} }
...@@ -590,7 +590,7 @@ const Map = props => { ...@@ -590,7 +590,7 @@ const Map = props => {
item.layerType = 'PipenetLayer'; item.layerType = 'PipenetLayer';
setttings = item; setttings = item;
console.log(item); console.log(item);
setSchemename(item.schemename); setSchemename(item);
setName(item.id); setName(item.id);
setKeep(item); setKeep(item);
} else { } else {
...@@ -1247,14 +1247,12 @@ const Map = props => { ...@@ -1247,14 +1247,12 @@ const Map = props => {
)} )}
{radio == 'arcgis' ? ( {radio == 'arcgis' ? (
<PipenetStylesCenter <PipenetStylesCenter
schemeName={Schemename} schemeName={Schemename.schemename}
mapServerName={name} mapServerName={name}
view={map} view={map}
savaCallback={onSave} savaCallback={onSave}
ref={styleRef} ref={styleRef}
pipenetLayer={ pipenetLayer={Schemename}
firstList.layers && firstList.layers.find(item => item.layerType === 'PipenetLayer')
}
/> />
) : ( ) : (
<></> <></>
......
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