Commit f2eb8e14 authored by 皮倩雯's avatar 皮倩雯

fix: 'gis底图新增配置'

parent df5861eb
Pipeline #56153 waiting for manual action with stages
......@@ -6,27 +6,8 @@
/* eslint-disable camelcase */
/* eslint-disable no-unused-expressions */
import React, { useState, useEffect } from 'react';
import {
Drawer,
Form,
Input,
notification,
Row,
Col,
Select,
Button,
Dropdown,
Menu,
Space,
Radio,
Tooltip,
} from 'antd';
import {
PlusOutlined,
DownOutlined,
StepForwardFilled,
InfoCircleOutlined,
} from '@ant-design/icons';
import { Drawer, Form, Input, notification, Row, Col, Select, Button, Space } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import styles from './patrolFeedback.less';
import {
CM_Feedback_LoadFeedbackTables,
......@@ -42,10 +23,6 @@ import ChangeFields from './ChangeFields';
const { Option } = Select;
const AddModal = props => {
const [inputValue, setInputValue] = useState({
feedbackName: '',
doRole: '',
});
const { callBackSubmit = () => {}, visible, type, formObj, keepTableData } = props;
const [filed, setFiled] = useState({}); // 传给子组件列表数据
......@@ -69,7 +46,6 @@ const AddModal = props => {
getRoles();
if (type === 'edit') {
CM_Feedback_QueryPatrolFeedback({ id: formObj.id }).then(res => {
console.log(res.data);
form.setFieldsValue({ ...res.data });
});
}
......@@ -81,7 +57,6 @@ const AddModal = props => {
const getFeedbackTable = () => {
CM_Feedback_LoadFeedbackTables().then(res => {
if (res.code === 0) {
console.log(res.data);
setFeedbackTable(res.data);
}
});
......@@ -96,7 +71,6 @@ const AddModal = props => {
};
const getFields = e => {
console.log(e);
CM_Feedback_LoadFields(e).then(res => {
if (res.code === 0) {
setNu(res.data);
......@@ -203,8 +177,6 @@ const AddModal = props => {
};
const formateArrDataA = (initialArr, name) => {
console.log(initialArr);
console.log(name);
// 判定传参是否符合规则
if (!(initialArr instanceof Array)) {
return '请传入正确格式的数组';
......@@ -219,7 +191,6 @@ const AddModal = props => {
nameArr.push(initialArr[i][`${name}`]);
}
}
console.log(nameArr);
// 新建一个包含多个list的结果对象
let tempObj = {};
// 根据不同的"name"生成多个数组
......@@ -227,32 +198,24 @@ const AddModal = props => {
for (let j in initialArr) {
if (initialArr[j][`${name}`] == nameArr[k]) {
// 每次外循环时新建一个对应"name"的数组, 内循环时当前数组不变
console.log(tempObj[nameArr[k]]);
tempObj[nameArr[k]] = tempObj[nameArr[k]] || [];
console.log(initialArr[j]);
tempObj[nameArr[k]].push(initialArr[j]);
}
}
}
console.log(tempObj);
for (let keys in tempObj) {
let arr = [];
tempObj[keys].map((item, index) => {
console.log(tempObj[keys]);
tempObj[keys] = arr;
item.key = index;
arr.push(item);
});
console.log(arr);
}
Object.keys(tempObj).map((i, j) => {
console.log(tempObj[i]);
tempObj[i].map((k, y) => {
tempObj[i][y] = k.fieldName;
console.log(k);
});
});
console.log(tempObj);
return tempObj;
};
......
......@@ -106,6 +106,8 @@ const AddModal = props => {
url = '//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer';
} else if (obj.type == 'mapbox-i-ia') {
url = '//api.mapbox.com/v4/mapbox.satellite';
} else if (obj.type == 'arcgis-i') {
url = '//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer';
}
arr = {
servicename: obj.servicename,
......@@ -341,6 +343,8 @@ const AddModal = props => {
return 'GeoQ暖色';
case 'mapbox-i-ia':
return 'mapbox影像';
case 'arcgis-i':
return 'arcgis影像';
// case 'google-user':
// return;
// case 'pipenet-tile':
......@@ -533,6 +537,7 @@ const AddModal = props => {
<Option value="streetGray">GeoQ水墨灰(streetGray)</Option>
<Option value="streetWarm">GeoQ暖色(streetWarm)</Option>
<Option value="mapbox-i-ia">mapbox影像(mapbox-i-ia)</Option>
<Option value="arcgis-i">arcgis影像(arcgis-i)</Option>
</Select>
</Item>
<Item
......
......@@ -102,6 +102,8 @@ const NewEditModal = props => {
url = '//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer';
} else if (obj.type == 'mapbox-i-ia') {
url = '//api.mapbox.com/v4/mapbox.satellite';
} else if (obj.type == 'arcgis-i') {
url = '//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer';
}
arr = {
servicename: obj.servicename,
......@@ -498,6 +500,7 @@ const NewEditModal = props => {
<Option value="streetGray">GeoQ水墨灰(streetGray)</Option>
<Option value="streetWarm">GeoQ暖色(streetWarm)</Option>
<Option value="mapbox-i-ia">mapbox影像(mapbox-i-ia)</Option>
<Option value="arcgis-i">arcgis影像(arcgis-i)</Option>
</Select>
</Item>
<Item
......
......@@ -364,6 +364,13 @@ const Integrate = () => {
</Button>
</div>
<div>
<a
target="_blank"
style={{ marginRight: '20px' }}
href={path.join(__dirname, '/civ_logicenter')}
>
集成登录平台
</a>
<Tooltip title="点击查看说明文档">
<a
style={{ display: 'inline-block', marginTop: '5px', marginRight: '20px' }}
......
......@@ -199,7 +199,7 @@ const ProductConfig = props => {
<div onClick={e => e.stopPropagation()}>
<Switch
checked={item.IsUsed}
// disabled
disabled
checkedChildren="启用"
unCheckedChildren="关闭"
onClick={e => {
......
......@@ -189,7 +189,7 @@ export default props => {
return (
<Drawer
title={isEdit ? '查看/编辑网站配置' : '新增网站'}
width={600}
width={550}
onClose={onClose}
visible={visible}
destroyOnClose
......
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