Commit dffa4794 authored by shaoan123's avatar shaoan123

更新获取工作空间接口

parent 9f127906
Pipeline #28713 skipped with stages
......@@ -155,10 +155,11 @@ const AddModal = props => {
_version: 9999,
}
GetGISServerMapList(query).then(res => {
if (Array.isArray(res)) {
const defaultValue= res[0].name||''
console.log('res',res);
if (Array.isArray(res.data)) {
const defaultValue= res.data[0]||''
form.setFieldsValue({ name:defaultValue,workname:defaultValue});
setWorkList(res)
setWorkList(res.data)
setWorkSpace(defaultValue)
}
else {
......@@ -255,7 +256,7 @@ const AddModal = props => {
>
<div className={styles.imgList}>
<Select onChange={handleWorkspace} value ={workSpace}>
{workList.length ? workList.map((item, index) => { return <Option key={index} value={item.name}>{item.name}</Option> }) : ''}
{workList.length ? workList.map((item, index) => { return <Option key={index} value={item}>{item}</Option> }) : ''}
</Select>
<Button style={{ marginLeft: '0.5rem' }} onClick={() => { selectWorkspace() }}>选择工作空间</Button>
</div>
......
......@@ -176,7 +176,7 @@ export const GetVectorService = () =>
//获取元数据的工作空间列表
export const GetGISServerMapList = query =>
get(`${CITY_SERVICE}/OMS.svc/D_GetGISServerMapList`, query);
get(`${PUBLISH_SERVICE}/Maplayer/GetGISServerMapList`, 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