Commit 049dfc13 authored by 皮倩雯's avatar 皮倩雯

fix: '地图配置新增底图'

parent 83c807cd
Pipeline #53865 passed with stages
...@@ -97,6 +97,14 @@ const AddModal = props => { ...@@ -97,6 +97,14 @@ const AddModal = props => {
}), }),
}; };
} else { } else {
let url = '';
if (obj.type == 'streetPurplishBlue') {
url = '//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer';
} else if (obj.type == 'streetGray') {
url = '//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer';
} else if (obj.type == 'streetWarm') {
url = '//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer';
}
arr = { arr = {
servicename: obj.servicename, servicename: obj.servicename,
terminalType: 'base', terminalType: 'base',
...@@ -104,7 +112,7 @@ const AddModal = props => { ...@@ -104,7 +112,7 @@ const AddModal = props => {
jsonCfg: JSON.stringify({ jsonCfg: JSON.stringify({
alpha: alpha, alpha: alpha,
label: obj.label, label: obj.label,
url: obj.url, url: url,
icon: obj.icon, icon: obj.icon,
type: obj.type, type: obj.type,
}), }),
...@@ -168,6 +176,7 @@ const AddModal = props => { ...@@ -168,6 +176,7 @@ const AddModal = props => {
break; break;
case 'edit': case 'edit':
console.log(formObj);
form.setFieldsValue({ ...formObj }); form.setFieldsValue({ ...formObj });
let index = formObj.icon.lastIndexOf('/'); let index = formObj.icon.lastIndexOf('/');
let str = formObj.icon.substring(index + 1, formObj.icon.length); let str = formObj.icon.substring(index + 1, formObj.icon.length);
...@@ -322,6 +331,12 @@ const AddModal = props => { ...@@ -322,6 +331,12 @@ const AddModal = props => {
return '天地图影像'; return '天地图影像';
case 'tianditu-v-va': case 'tianditu-v-va':
return '天地图地形'; return '天地图地形';
case 'streetPurplishBlue':
return 'GeoQ午夜蓝';
case 'streetGray':
return 'GeoQ水墨灰';
case 'streetWarm':
return 'GeoQ暖色';
// case 'google-user': // case 'google-user':
// return; // return;
// case 'pipenet-tile': // case 'pipenet-tile':
...@@ -510,6 +525,9 @@ const AddModal = props => { ...@@ -510,6 +525,9 @@ const AddModal = props => {
<Option value="tianditu-i-ia">天地图影像(tianditu-i-ia)</Option> <Option value="tianditu-i-ia">天地图影像(tianditu-i-ia)</Option>
<Option value="pipenet-tile">矢量底图切片(pipenet-tile)</Option> <Option value="pipenet-tile">矢量底图切片(pipenet-tile)</Option>
<Option value="google-user">自定义底图(google-user)</Option> <Option value="google-user">自定义底图(google-user)</Option>
<Option value="streetPurplishBlue">GeoQ午夜蓝(streetPurplishBlue)</Option>
<Option value="streetGray">GeoQ水墨灰(streetGray)</Option>
<Option value="streetWarm">GeoQ暖色(streetWarm)</Option>
</Select> </Select>
</Item> </Item>
<Item <Item
......
...@@ -180,6 +180,7 @@ const NewEditModal = props => { ...@@ -180,6 +180,7 @@ const NewEditModal = props => {
switch (type) { switch (type) {
case 'edit': case 'edit':
console.log(formObj);
form.setFieldsValue({ form.setFieldsValue({
...formObj, ...formObj,
IP: formObj.m_Ip, IP: formObj.m_Ip,
...@@ -192,6 +193,7 @@ const NewEditModal = props => { ...@@ -192,6 +193,7 @@ const NewEditModal = props => {
User: formObj.m_User, User: formObj.m_User,
Pwd: formObj.m_Pwd, Pwd: formObj.m_Pwd,
workSpance: aa, workSpance: aa,
// type: `${formObj.servicename}(${formObj.type})`,
}); });
let index = formObj.icon.lastIndexOf('/'); let index = formObj.icon.lastIndexOf('/');
console.log(index); console.log(index);
...@@ -482,6 +484,9 @@ const NewEditModal = props => { ...@@ -482,6 +484,9 @@ const NewEditModal = props => {
<Option value="tianditu-i-ia">天地图影像(tianditu-i-ia)</Option> <Option value="tianditu-i-ia">天地图影像(tianditu-i-ia)</Option>
<Option value="pipenet-tile">矢量底图切片(pipenet-tile)</Option> <Option value="pipenet-tile">矢量底图切片(pipenet-tile)</Option>
<Option value="google-user">自定义底图(google-user)</Option> <Option value="google-user">自定义底图(google-user)</Option>
<Option value="streetPurplishBlue">GeoQ午夜蓝(streetPurplishBlue)</Option>
<Option value="streetGray">GeoQ水墨灰(streetGray)</Option>
<Option value="streetWarm">GeoQ暖色(streetWarm)</Option>
</Select> </Select>
</Item> </Item>
<Item <Item
......
...@@ -92,8 +92,8 @@ const AddModal = props => { ...@@ -92,8 +92,8 @@ const AddModal = props => {
const onFinish = value => {}; const onFinish = value => {};
useEffect(() => { useEffect(() => {
console.log(keepData);
if (visible) { if (visible) {
console.log(keepData);
switch (type) { switch (type) {
case 'add': case 'add':
addTile(); addTile();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: * @Description:
* @Author: leizhe * @Author: leizhe
* @Date: 2022-01-13 10:47:32 * @Date: 2022-01-13 10:47:32
* @LastEditTime: 2022-06-10 15:13:28 * @LastEditTime: 2022-06-22 11:56:59
* @LastEditors: leizhe * @LastEditors: leizhe
*/ */
/* eslint-disable indent */ /* eslint-disable indent */
...@@ -46,18 +46,21 @@ const VectorData = props => { ...@@ -46,18 +46,21 @@ const VectorData = props => {
terminalType: 'scheme', terminalType: 'scheme',
isBaseMap: false, isBaseMap: false,
}).then(resdata => { }).then(resdata => {
if (resdata.msg === 'Ok') { console.log(123);
if (resdata.code == 0) {
console.log(333);
setTreeLoading(false); setTreeLoading(false);
GettMaplayer({ terminalType: 'base', isBaseMap: true }).then(res => { GettMaplayer({ terminalType: 'base', isBaseMap: true }).then(res => {
if (res.msg === 'Ok') { if (res.code == 0) {
console.log(666);
let arr = [];
res.data.general.baseMap.layers.map(i => {
console.log(i);
arr.push(i.servicename);
});
console.log(arr);
setKeepData(arr);
resdata.data.scheme.optionalLayer.layers.map((j, index) => { resdata.data.scheme.optionalLayer.layers.map((j, index) => {
let arr = [];
res.data.general.baseMap.layers.map(i => {
console.log(i);
arr.push(i.servicename);
});
console.log(arr);
setKeepData(arr);
let data = []; let data = [];
let aa = []; let aa = [];
j.baseMap.map(k => { j.baseMap.map(k => {
...@@ -77,6 +80,7 @@ const VectorData = props => { ...@@ -77,6 +80,7 @@ const VectorData = props => {
} }
}); });
} else { } else {
console.log(3456);
setTreeLoading(false); setTreeLoading(false);
} }
}); });
......
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