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

fix: 'gis底图新增配置'

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