Commit 8089202e authored by 皮倩雯's avatar 皮倩雯

fix: '优化地图配置'

parent b9af3258
Pipeline #67270 waiting for manual action with stages
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
"@wisdom-cesium/cesium": "^1.0.78", "@wisdom-cesium/cesium": "^1.0.78",
"@wisdom-cesium/krpano": "^1.0.29-20", "@wisdom-cesium/krpano": "^1.0.29-20",
"@wisdom-map/amap": "1.1.0-beta.45", "@wisdom-map/amap": "1.1.0-beta.45",
"@wisdom-map/arcgismap": "1.4.0-119", "@wisdom-map/arcgismap": "1.4.0-121",
"@wisdom-map/basemap": "1.1.0-20", "@wisdom-map/basemap": "1.1.0-20",
"ace-builds": "^1.4.12", "ace-builds": "^1.4.12",
"antd-img-crop": "^3.13.2", "antd-img-crop": "^3.13.2",
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
"js-calendar-converter": "0.0.4", "js-calendar-converter": "0.0.4",
"lodash": "4.17.11", "lodash": "4.17.11",
"minimist": "1.2.0", "minimist": "1.2.0",
"panda-xform": "^1.5.9",
"parseForm": "^1.8.3", "parseForm": "^1.8.3",
"prop-types": "15.7.2", "prop-types": "15.7.2",
"quill": "^1.3.7", "quill": "^1.3.7",
......
...@@ -169,6 +169,7 @@ const Map = props => { ...@@ -169,6 +169,7 @@ const Map = props => {
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 mapInfo = useRef(null); const mapInfo = useRef(null);
const [keep, setKeep] = useState(''); const [keep, setKeep] = useState('');
const [keepSave, setKeepSave] = useState(''); const [keepSave, setKeepSave] = useState('');
...@@ -240,6 +241,7 @@ const Map = props => { ...@@ -240,6 +241,7 @@ const Map = props => {
setKeepNameArea(setttings.areaName); setKeepNameArea(setttings.areaName);
setKeepBorderArea(setttings.customPointExtent); setKeepBorderArea(setttings.customPointExtent);
console.log(setttings.customPointExtent);
if (setttings.customPointExtent) { if (setttings.customPointExtent) {
let aa = JSON.parse(setttings.customPointExtent); let aa = JSON.parse(setttings.customPointExtent);
let data = {}; let data = {};
...@@ -257,6 +259,7 @@ const Map = props => { ...@@ -257,6 +259,7 @@ const Map = props => {
hh.rings = rings; hh.rings = rings;
console.log(hh); console.log(hh);
data.geometry = geomUtils.toGeometry(hh); data.geometry = geomUtils.toGeometry(hh);
console.log(data);
setResultData({ ...data }); setResultData({ ...data });
} }
} else { } else {
...@@ -729,9 +732,14 @@ const Map = props => { ...@@ -729,9 +732,14 @@ const Map = props => {
}); });
return; return;
} }
if (radio == 'arcgis' && keepSave != 'success') { if (radio == 'arcgis') {
message.error('请先保存管网前端绘制方案'); let style = styleRef.current.stylesCompare();
return; if (JSON.stringify(style.originalStyle) == JSON.stringify(style.newStyle)) {
console.log(123);
} else {
message.error('请先保存管网前端绘制方案');
return;
}
} }
if (!area) { if (!area) {
notification.error({ notification.error({
...@@ -1238,6 +1246,7 @@ const Map = props => { ...@@ -1238,6 +1246,7 @@ const Map = props => {
mapServerName={name} mapServerName={name}
view={map} view={map}
savaCallback={onSave} savaCallback={onSave}
ref={styleRef}
/> />
) : ( ) : (
<></> <></>
......
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