Commit faa1c9e6 authored by mayongxin's avatar mayongxin
parents f2d2b948 d0186afe
...@@ -127,7 +127,7 @@ const AddModal = props => { ...@@ -127,7 +127,7 @@ const AddModal = props => {
return ( return (
<Modal <Modal
title={`${type === 'add' ? '方案发布' : '编辑'}`} title={`${type === 'add' ? '预测方案新增' : '编辑'}`}
bodyStyle={{ width: '100%', minHeight: '100px' }} bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: '150px' }} style={{ top: '150px' }}
width="700px" width="700px"
...@@ -156,7 +156,9 @@ const AddModal = props => { ...@@ -156,7 +156,9 @@ const AddModal = props => {
name="TaskName" name="TaskName"
rules={[{ required: true, message: '请输入算法名称' }]} rules={[{ required: true, message: '请输入算法名称' }]}
> >
<Input placeholder="请输入算法名称" allowClear /> <Select >
</Select>
</Item> </Item>
<Item <Item
label="设备类型" label="设备类型"
......
...@@ -114,6 +114,7 @@ const TileData = props => { ...@@ -114,6 +114,7 @@ const TileData = props => {
}) })
} }
const handleAdd = () => { const handleAdd = () => {
console.log('baseMap',baseMap);
if(baseMap.length){ if(baseMap.length){
setType('add'); setType('add');
setVisible(true); setVisible(true);
...@@ -139,7 +140,7 @@ const TileData = props => { ...@@ -139,7 +140,7 @@ const TileData = props => {
isBaseMap: true isBaseMap: true
}).then( }).then(
res => { res => {
if (res.Result && res.Result.length > 0) { if (res.IsSuccess) {
setTreeLoading(false); setTreeLoading(false);
setTileData(res.Result); setTileData(res.Result);
res.Result.map( (item) =>{ res.Result.map( (item) =>{
......
...@@ -31,7 +31,7 @@ const AddModal = props => { ...@@ -31,7 +31,7 @@ const AddModal = props => {
basemapName: obj.serverName basemapName: obj.serverName
}).then(res => { }).then(res => {
setLoading(false); setLoading(false);
if (res.IsSuccess) { if (res.code===0) {
form.resetFields(); form.resetFields();
callBackSubmit(); callBackSubmit();
prompt('success', '瓦片新增成功') prompt('success', '瓦片新增成功')
......
...@@ -3,27 +3,26 @@ import classnames from 'classnames' ...@@ -3,27 +3,26 @@ import classnames from 'classnames'
import styles from '../../SchemeConfig.less' import styles from '../../SchemeConfig.less'
import { Popconfirm, notification, Card, Button, message } from 'antd'; import { Popconfirm, notification, Card, Button, message } from 'antd';
import { import {
unbindSchemeBaseMap, GetAllConfig,SetServiceConfig unbindSchemeBaseMap, GetAllConfig, SetServiceConfig,deleteConfig
} from '@/services/webConfig/api'; } from '@/services/webConfig/api';
import { import {
CloseOutlined, PlusOutlined CloseOutlined, PlusOutlined
} from '@ant-design/icons'; } from '@ant-design/icons';
import AddModal from '../AddModal' import AddModal from '../AddModal'
import MapScope from '@/components/MapScope' import MapScope from '@/components/MapScope'
import {createGuid} from '@/utils/transformUtil' import { createGuid } from '@/utils/transformUtil'
const CardData = props => { const CardData = props => {
const { deletebaseMaps = () => { },item } = props; const { deletebaseMaps = () => { }, item } = props;
const [visible, setVisible] = useState(false); // 弹窗 const [visible, setVisible] = useState(false); // 弹窗
const [flag, setFlag] = useState(0); // 状态更新 const [flag, setFlag] = useState(0); // 状态更新
const [type, setType] = useState(''); // 弹窗类型 const [type, setType] = useState(''); // 弹窗类型
const [formObj, setFormObj] = useState({}); const [formObj, setFormObj] = useState({});
const [serviceList, setServiceList] = useState([]); const [serviceList, setServiceList] = useState([]);
const [mapScopeVisible,setMapScopeVisible] = useState(false) const [mapScopeVisible, setMapScopeVisible] = useState(false)
const [currentAreaName,setCurrentAreaName] = useState("")
//删除瓦片 //删除瓦片
const deletebaseMap = (item, baseMapItem) => { const deletebaseMap = (item, baseMapItem) => {
unbindSchemeBaseMap({ schemename: item.schemename, basemapName: baseMapItem }).then(res => { unbindSchemeBaseMap({ schemename: item.schemename, basemapName: baseMapItem }).then(res => {
if (res.IsSuccess) { if (res.code === 0) {
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
...@@ -48,7 +47,7 @@ const CardData = props => { ...@@ -48,7 +47,7 @@ const CardData = props => {
terminalType: 'scheme', terminalType: 'scheme',
isBaseMap: false isBaseMap: false
}).then(res => { }).then(res => {
if (res.IsSuccess) { if (res.code===0) {
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
...@@ -99,25 +98,25 @@ const CardData = props => { ...@@ -99,25 +98,25 @@ const CardData = props => {
} }
const submitExtent = (extent,areaName)=>{ const submitExtent = (extent, areaName) => {
const jsConfig = { const jsConfig = {
extent:extent, extent: extent,
areaName:areaName, areaName: areaName,
boundColor:"#86c8f8", boundColor: "#86c8f8",
boundWidth:"10px", boundWidth: "10px",
backgroundColor:"#000000", backgroundColor: "#000000",
backgroundOpacity:"0.6" backgroundOpacity: "0.6"
} }
SetServiceConfig( SetServiceConfig(
{ {
schemename:item.schemename, schemename: item.schemename,
terminalType:"web", terminalType: "web",
isBaseMap:false, isBaseMap: false,
jsconCfg:JSON.stringify(jsConfig) jsconCfg: JSON.stringify(jsConfig)
} }
).then( ).then(
res =>{ res => {
if(res.IsSuccess == true){ if (res.IsSuccess == true) {
setMapScopeVisible(true) setMapScopeVisible(true)
message.info("范围设置成功") message.info("范围设置成功")
} }
...@@ -139,6 +138,10 @@ const CardData = props => { ...@@ -139,6 +138,10 @@ const CardData = props => {
<CloseOutlined /> <CloseOutlined />
</Popconfirm> </a>} style={{ width: 300 }}> </Popconfirm> </a>} style={{ width: 300 }}>
<p><span className={styles.schemeName}>矢量</span> {props.item.servicename}</p> <p><span className={styles.schemeName}>矢量</span> {props.item.servicename}</p>
<div>
<span className={styles.schemeName}>矢量</span>
<Button style={{ width: '12rem', marginBottom: '0.5rem' }} onClick={() => setMapScopeVisible(true)}>选择范围</Button>
</div>
<div className={styles.schemeItem}><span className={styles.schemeName}>瓦片</span> <div className={styles.schemeItem}><span className={styles.schemeName}>瓦片</span>
<Button className={styles.schemeBtn} onClick={() => addTile(props.item)}> <PlusOutlined />添加瓦片</Button> <Button className={styles.schemeBtn} onClick={() => addTile(props.item)}> <PlusOutlined />添加瓦片</Button>
</div> </div>
...@@ -164,10 +167,7 @@ const CardData = props => { ...@@ -164,10 +167,7 @@ const CardData = props => {
</div> </div>
}) : ''} }) : ''}
</div> </div>
<div>
<span className={styles.schemeName}>矢量</span>
<Button onClick={()=>setMapScopeVisible(true)}>选择范围</Button>
</div>
</Card> </Card>
<AddModal <AddModal
visible={visible} visible={visible}
......
...@@ -161,10 +161,20 @@ export const omsDeleteWebsite = client => ...@@ -161,10 +161,20 @@ export const omsDeleteWebsite = client =>
export const GetAllConfig = query => export const GetAllConfig = query =>
get(`${CITY_SERVICE}/OMS.svc/GetAllConfig`, query); get(`${CITY_SERVICE}/OMS.svc/GetAllConfig`, query);
//获取gis底图列表
// export const GetAllConfig = query =>
// get(`${PUBLISH_SERVICE}/Maplayer/GetMaplayerByTerminalType`, query);
//设置底图数据 //设置底图数据
export const SetServiceConfig = query => export const SetServiceConfig = query =>
get(`${CITY_SERVICE}/OMS.svc/SetServiceConfig`, query); get(`${CITY_SERVICE}/OMS.svc/SetServiceConfig`, query);
// //设置底图数据
// export const SetServiceConfig = query =>
// get(`${PUBLISH_SERVICE}/Maplayer/SetServiceConfig`, query);
//获取方矢量数据列表 //获取方矢量数据列表
export const GetVectorService = () => export const GetVectorService = () =>
get(`${CITY_SERVICE}/OMS.svc/D_GetVectorService`, { _version: 9999 }); get(`${CITY_SERVICE}/OMS.svc/D_GetVectorService`, { _version: 9999 });
...@@ -191,18 +201,29 @@ get(`${CITY_SERVICE}/OMS.svc/D_DeleteVectorService`, query ); ...@@ -191,18 +201,29 @@ get(`${CITY_SERVICE}/OMS.svc/D_DeleteVectorService`, query );
export const updatePublishedMetaData = (query) => export const updatePublishedMetaData = (query) =>
get(`${CITY_SERVICE}/OMS.svc/D_UpdatePublishedMetaData`, query ); get(`${CITY_SERVICE}/OMS.svc/D_UpdatePublishedMetaData`, query );
//删除配置
// export const deleteConfig = (query) =>
// get(`${CITY_SERVICE}/OMS.svc/DeleteConfig`, query );
//删除配置 //删除配置
export const deleteConfig = (query) => export const deleteConfig = (query) =>
get(`${CITY_SERVICE}/OMS.svc/DeleteConfig`, query ); get(`${PUBLISH_SERVICE}/Maplayer/DeletMaplayer`, query );
//增加瓦片
// export const bindSchemeBaseMap = (query) =>
// get(`${CITY_SERVICE}/OMS.svc/BindSchemeBaseMap`, query );
//增加瓦片 //增加瓦片
export const bindSchemeBaseMap = (query) => export const bindSchemeBaseMap = (query) =>
get(`${CITY_SERVICE}/OMS.svc/BindSchemeBaseMap`, query ); get(`${PUBLISH_SERVICE}/Maplayer/BindSchemeBaseMap`, query );
//删除瓦片
// export const unbindSchemeBaseMap = (query) =>
// get(`${CITY_SERVICE}/OMS.svc/UnbindSchemeBaseMap`, query );
//删除瓦片 //删除瓦片
export const unbindSchemeBaseMap = (query) => export const unbindSchemeBaseMap = (query) =>
get(`${CITY_SERVICE}/OMS.svc/UnbindSchemeBaseMap`, query ); get(`${PUBLISH_SERVICE}/Maplayer/UnBindSchemeBaseMap`, query );
//设置web状态 //设置web状态
export const setServiceType = (query) => export const setServiceType = (query) =>
......
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