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