Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
d0f77ef8
Commit
d0f77ef8
authored
Jan 13, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '修改样式'
parent
b810613d
Pipeline
#42517
skipped with stages
Changes
24
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1517 additions
and
1722 deletions
+1517
-1722
AppDic.js
src/pages/dataCenter/dictionary/AppDic.js
+0
-0
AppDic.less
src/pages/dataCenter/dictionary/AppDic.less
+0
-0
WebDic.js
src/pages/dataCenter/dictionary/WebDic.js
+27
-27
WebDic.less
src/pages/dataCenter/dictionary/WebDic.less
+0
-0
index.js
src/pages/dataCenter/dictionary/index.js
+18
-328
index.less
src/pages/dataCenter/dictionary/index.less
+5
-45
index.js
src/pages/dataCenter/dictionary1/index.js
+0
-34
index.less
src/pages/dataCenter/dictionary1/index.less
+0
-6
AddModal.jsx
src/pages/platformCenter/bsmanager/maintenance/AddModal.jsx
+10
-31
ChangeAdd.jsx
src/pages/platformCenter/bsmanager/maintenance/ChangeAdd.jsx
+60
-33
maintenance.jsx
...ages/platformCenter/bsmanager/maintenance/maintenance.jsx
+160
-18
maintenance.less
...ges/platformCenter/bsmanager/maintenance/maintenance.less
+71
-72
AddModal.jsx
...s/platformCenter/dimensionsConfig/VectorData/AddModal.jsx
+200
-155
VectorData.jsx
...platformCenter/dimensionsConfig/VectorData/VectorData.jsx
+200
-206
dimensionsConfig.jsx
...ages/platformCenter/dimensionsConfig/dimensionsConfig.jsx
+27
-30
dimensionsConfig.less
...ges/platformCenter/dimensionsConfig/dimensionsConfig.less
+108
-110
BaseConfig.jsx
...ages/platformCenter/hostmanager/baseConfig/BaseConfig.jsx
+0
-1
TemplateManage.jsx
...ormCenter/messageManage/templateManage/TemplateManage.jsx
+33
-12
AddModal.jsx
...nter/messageManage/templateManage/components/AddModal.jsx
+215
-231
SchemeConfig.jsx
src/pages/platformCenter/schemeConfig/SchemeConfig.jsx
+24
-30
AddModal.jsx
...pages/platformCenter/schemeConfig/VectorData/AddModal.jsx
+103
-100
VectorData.jsx
...ges/platformCenter/schemeConfig/VectorData/VectorData.jsx
+229
-226
VideoModal.jsx
src/pages/platformCenter/videoManager/VideoModal.jsx
+26
-19
config.js
src/routes/config.js
+1
-8
No files found.
src/pages/dataCenter/dictionary
1
/AppDic.js
→
src/pages/dataCenter/dictionary/AppDic.js
View file @
d0f77ef8
File moved
src/pages/dataCenter/dictionary
1
/AppDic.less
→
src/pages/dataCenter/dictionary/AppDic.less
View file @
d0f77ef8
File moved
src/pages/dataCenter/dictionary
1
/WebDic.js
→
src/pages/dataCenter/dictionary/WebDic.js
View file @
d0f77ef8
...
...
@@ -948,34 +948,34 @@ const WebDic = () => {
fieldKey
=
{[
fieldKey
,
'frist'
]}
rules
=
{[
{
required
:
true
,
message
:
'不能为空'
},
//
{
//
validator: (rule, value, callback) => {
//
const nodeName = addForm.getFieldsValue().nodeName1; // 第一项的nodeName
//
const nodeName1 = addForm.getFieldsValue();
//
console.log(nodeName);
//
let result = nodeName1.users;
//
let arr = [];
//
// eslint-disable-next-line array-callback-return
//
result.map(item => {
//
if (item) {
//
let a = item.nodeName;
//
if (a !== '') {
//
arr.push(a);
//
}
//
}
//
});
//
if (nodeName !== undefined) {
//
arr.unshift(nodeName);
//
}
{
validator
:
(
rule
,
value
,
callback
)
=>
{
const
nodeName
=
addForm
.
getFieldsValue
().
nodeName1
;
// 第一项的nodeName
const
nodeName1
=
addForm
.
getFieldsValue
();
console
.
log
(
nodeName
);
let
result
=
nodeName1
.
users
;
let
arr
=
[];
// eslint-disable-next-line array-callback-return
result
.
map
(
item
=>
{
if
(
item
)
{
let
a
=
item
.
nodeName
;
if
(
a
!==
''
)
{
arr
.
push
(
a
);
}
}
});
if
(
nodeName
!==
undefined
)
{
arr
.
unshift
(
nodeName
);
}
//
console.log(arr);
//
if (new Set(arr).size !== arr.length) {
//
arr = [...new Set(arr)];
//
console.log(arr);
//
callback('用户名重复');
//
}
//
},
//
},
console
.
log
(
arr
);
if
(
new
Set
(
arr
).
size
!==
arr
.
length
)
{
arr
=
[...
new
Set
(
arr
)];
console
.
log
(
arr
);
callback
(
'用户名重复'
);
}
},
},
]}
>
<
Input
placeholder
=
"请输入名称"
/>
...
...
src/pages/dataCenter/dictionary
1
/WebDic.less
→
src/pages/dataCenter/dictionary/WebDic.less
View file @
d0f77ef8
File moved
src/pages/dataCenter/dictionary/index.js
View file @
d0f77ef8
/* eslint-disable react-hooks/rules-of-hooks */
/*
* @Description:
* @Author: leizhe
* @Date: 2021-0
5-27 16:31:05
* @LastEditTime: 202
1-11-26 16:43:17
* @Date: 2021-0
7-13 16:32:28
* @LastEditTime: 202
2-01-11 15:57:28
* @LastEditors: leizhe
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Table
,
Tooltip
,
Spin
,
Modal
,
Form
,
Input
,
Space
,
Popconfirm
,
notification
,
message
,
Button
,
Upload
,
Search
,
}
from
'antd'
;
import
React
from
'react'
;
import
{
Tabs
,
Card
}
from
'antd'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
EditTwoTone
,
RollbackOutlined
,
DeleteOutlined
,
}
from
'@ant-design/icons'
;
import
{
SearchDataDictionaryList
,
EditDataDictionary
,
DeleteDataDictionary
,
}
from
'@/services/dataCenter/api'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
WebDic
from
'./WebDic'
;
import
AppDic
from
'./AppDic'
;
import
styles
from
'./index.less'
;
// import VersionPublish from './VersionPublish';
const
dictionary
=
()
=>
{
const
[
searchData
,
setSearchData
]
=
useState
([]);
// 搜索框表格数据
// eslint-disable-next-line react-hooks/rules-of-hooks
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
const
[
editVisible
,
setEditVisible
]
=
useState
(
false
);
// 编辑二级条目
const
[
editVisible1
,
setEditVisible1
]
=
useState
(
false
);
// 编辑一级条目
const
[
select
,
setSelect
]
=
useState
({});
// 当前选中条目,可以是一级/二级,修改/删除时设置
const
history
=
useHistory
();
const
[
editForm
]
=
Form
.
useForm
();
const
[
title
,
setTitle
]
=
useState
(
''
);
// eslint-disable-next-line no-shadow
const
{
Search
}
=
Input
;
const
columns2
=
[
{
title
:
()
=>
<
span
className
=
{
styles
.
font
}
>
名称
<
/span>
,
dataIndex
:
'nodeName'
,
key
:
'nodeName'
,
width
:
'45%'
,
},
{
title
:
()
=>
<
span
className
=
{
styles
.
font
}
>
值
<
/span>
,
dataIndex
:
'nodeValue'
,
key
:
'nodeValue'
,
render
:
record
=>
{
if
(
!
record
)
{
return
'-'
;
}
return
record
;
},
},
{
title
:
()
=>
<
span
className
=
{
styles
.
font
}
>
操作
<
/span>
,
key
:
'action'
,
width
:
100
,
align
:
'center'
,
render
:
record
=>
(
<
Space
>
<
Tooltip
title
=
"编辑"
>
<
EditTwoTone
onClick
=
{()
=>
{
setSelect
(
record
);
if
(
record
.
parentID
===
'-1'
||
record
.
parentID
===
null
)
{
setEditVisible1
(
true
);
}
else
{
setEditVisible
(
true
);
}
editForm
.
setFieldsValue
({
nodeName
:
record
.
nodeName
,
nodeValue
:
record
.
nodeValue
,
});
}}
style
=
{{
fontSize
:
'16px'
}}
/
>
<
/Tooltip
>
<
div
onClick
=
{
e
=>
e
.
stopPropagation
()}
>
<
Tooltip
title
=
"删除"
>
<
Popconfirm
title
=
{
title
}
okText
=
"确认"
cancelText
=
"取消"
onConfirm
=
{
submitDelete
}
placement
=
"left"
>
<
DeleteOutlined
onClick
=
{()
=>
{
setSelect
(
record
);
if
(
record
.
parentID
===
'-1'
||
record
.
parentID
===
null
)
{
setTitle
(
'确认删除一级目录数据,删除一级目录数据会将其二级目录子数据一起删除'
,
);
}
else
{
setTitle
(
'确认删除二级条目数据'
);
}
}}
style
=
{{
fontSize
:
'16px'
,
margin
:
'0px 10px'
,
color
:
'#e86060'
,
}}
/
>
<
/Popconfirm
>
<
/Tooltip
>
<
/div
>
<
/Space
>
),
},
];
// 修改
const
submitEdit
=
()
=>
{
const
nodeName
=
editForm
.
getFieldValue
(
'nodeName'
);
const
nodeValue
=
editForm
.
getFieldValue
(
'nodeValue'
);
if
(
nodeName
)
{
EditDataDictionary
({
nodeID
:
select
.
nodeID
,
nodeName
,
nodeValue
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setEditVisible
(
false
);
sumbitSearch
();
// getData(select.parentID === '-1' ? null : select.parentID);
notification
.
success
({
message
:
'提交成功'
,
});
// if (flag1 === 1) {
// sumbitSearch()
// }
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
res
.
msg
,
});
}
});
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'名称不能为空'
,
});
}
};
const
submitEdit1
=
()
=>
{
const
nodeName
=
editForm
.
getFieldValue
(
'nodeName'
);
if
(
nodeName
)
{
EditDataDictionary
({
nodeID
:
select
.
nodeID
,
nodeName
,
nodeValue
:
'-'
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setEditVisible1
(
false
);
sumbitSearch
();
// getData(select.parentID === '-1' ? null : select.parentID);
notification
.
success
({
message
:
'提交成功'
,
});
// if (flag1 === 1) {
// sumbitSearch()
// }
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
res
.
msg
,
});
}
});
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'名称不能为空'
,
});
}
};
const
sumbitSearch
=
()
=>
{
SearchDataDictionaryList
({
key
:
searchWord
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setSearchData
(
res
.
data
);
}
// else {
// notification.error({
// message: '提交失败',
// description: res.message,
// })
// }
});
};
const
submitDelete
=
()
=>
{
console
.
log
(
select
);
DeleteDataDictionary
({
nodeID
:
select
.
nodeID
,
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
// if (flag1 === 1) {
// sumbitSearch()
// }
sumbitSearch
();
notification
.
success
({
message
:
'删除成功'
,
});
}
else
{
notification
.
error
({
message
:
'删除失败'
,
description
:
res
.
message
,
});
}
})
.
catch
(
err
=>
{
message
.
error
(
err
);
});
};
// 获取搜索框的值
const
handleSearch
=
e
=>
{
setSearchWord
(
e
.
target
.
value
);
};
const
pagenation
=
{
showTotal
:
(
total
,
range
)
=>
`第
${
range
[
0
]}
-
${
range
[
1
]}
条/共
${
total
}
条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
'20'
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
};
const
back
=
()
=>
{
history
.
push
({
pathname
:
'/dataCenter/dictionary1'
,
});
};
const
{
TabPane
}
=
Tabs
;
return
(
<
PageContainer
className
=
{
styles
.
dictionaryContainer
}
>
<
div
className
=
{
styles
.
containerBox
}
>
<
div
className
=
{
styles
.
config
}
>
<
div
className
=
{
styles
.
title
}
>
<
Search
style
=
{{
width
:
500
,
marginBottom
:
25
}}
placeholder
=
"输入关键字"
onSearch
=
{
sumbitSearch
}
onChange
=
{
e
=>
handleSearch
(
e
)}
enterButton
value
=
{
searchWord
}
/
>
<
/div
>
<
div
className
=
{
styles
.
btn
}
>
<
Button
type
=
"primary"
icon
=
{
<
RollbackOutlined
/>
}
onClick
=
{()
=>
back
()}
>
返回
<
/Button
>
<
/div
>
<
/div
>
<
Table
size
=
"small"
bordered
key
=
""
columns
=
{
columns2
}
dataSource
=
{
searchData
}
scroll
=
{{
y
:
'calc(100vh - 280px)'
}}
pagination
=
{
pagenation
}
onRow
=
{
record
=>
({
onClick
:
()
=>
{
setSelect
(
record
);
},
})}
/
>
<
/div
>
{
/* 修改一级条目 */
}
<
Modal
title
=
"修改一级条目"
visible
=
{
editVisible1
}
onOk
=
{
submitEdit1
}
onCancel
=
{()
=>
{
setEditVisible1
(
false
);
}}
okText
=
"确认"
cancelText
=
"取消"
>
<
Form
form
=
{
editForm
}
labelCol
=
{{
span
:
3
}}
>
<
Form
.
Item
name
=
"nodeName"
label
=
"名称"
rules
=
{[{
required
:
true
,
message
:
'不能为空'
}]}
>
<
Input
placeholder
=
"请输入名称"
style
=
{{
width
:
'90%'
}}
/
>
<
/Form.Item
>
<
/Form
>
<
/Modal
>
{
/* 修改二级条目 */
}
<
Modal
title
=
"修改二级条目"
visible
=
{
editVisible
}
onOk
=
{
submitEdit
}
onCancel
=
{()
=>
{
setEditVisible
(
false
);
}}
okText
=
"确认"
cancelText
=
"取消"
>
<
Form
form
=
{
editForm
}
labelCol
=
{{
span
:
3
}}
>
<
Form
.
Item
name
=
"nodeName"
label
=
"名称"
rules
=
{[{
required
:
true
,
message
:
'不能为空'
}]}
>
<
Input
placeholder
=
"请输入名称"
style
=
{{
width
:
'90%'
}}
/
>
<
/Form.Item
>
<
Form
.
Item
name
=
"nodeValue"
label
=
"值"
>
<
Input
placeholder
=
"请输入值"
style
=
{{
width
:
'90%'
}}
/
>
<
/Form.Item
>
<
/Form
>
<
/Modal
>
<
Card
>
<
Tabs
defaultActiveKey
=
"1"
>
<
TabPane
tab
=
"通用数据字典"
key
=
"1"
>
<
WebDic
/>
<
/TabPane
>
<
TabPane
tab
=
"App数据字典"
key
=
"2"
>
<
AppDic
/>
<
/TabPane
>
<
/Tabs
>
<
/Card
>
<
/PageContainer
>
);
};
...
...
src/pages/dataCenter/dictionary/index.less
View file @
d0f77ef8
.dictionaryContainer{
.font {
font-weight: bold;
}
.containerBox {
width: 100vm;
height: calc(100vh - 70px) ;
background: #ffffff;
.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table{
margin-left: 0;
}
.ant-table.ant-table-bordered > .ant-table-container{
border: none;
}
.clickRowStyle{
background: #cfe7fd;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
}
.config{
display: flex;
padding: 1rem 0 0.5rem 0.5rem;
justify-content: space-between;
width: calc(100% - 10px);
.title{
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
}
.btn{
display: flex;
justify-content: flex-end;
width: 20rem;
}
.ant-btn{
display: flex;
align-items: center;
margin-left: 20px;
}
}
}
\ No newline at end of file
.dictionaryContainer {
.ant-card-body {
padding: 0px 24px 24px 17px;
}
}
src/pages/dataCenter/dictionary1/index.js
deleted
100644 → 0
View file @
b810613d
/*
* @Description:
* @Author: leizhe
* @Date: 2021-07-13 16:32:28
* @LastEditTime: 2021-10-26 16:38:27
* @LastEditors: leizhe
*/
import
React
from
'react'
;
import
{
Tabs
,
Card
}
from
'antd'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
WebDic
from
'./WebDic'
;
import
AppDic
from
'./AppDic'
;
import
styles
from
'./index.less'
;
// import VersionPublish from './VersionPublish';
const
dictionary1
=
()
=>
{
const
{
TabPane
}
=
Tabs
;
return
(
<
PageContainer
className
=
{
styles
.
dictionary1Container
}
>
<
Card
>
<
Tabs
defaultActiveKey
=
"1"
>
<
TabPane
tab
=
"通用数据字典"
key
=
"1"
>
<
WebDic
/>
<
/TabPane
>
<
TabPane
tab
=
"App数据字典"
key
=
"2"
>
<
AppDic
/>
<
/TabPane
>
<
/Tabs
>
<
/Card
>
<
/PageContainer
>
);
};
export
default
dictionary1
;
src/pages/dataCenter/dictionary1/index.less
deleted
100644 → 0
View file @
b810613d
.dictionary1Container{
.ant-card-body {
padding: 0px 24px 24px 17px;
}
}
\ No newline at end of file
src/pages/platformCenter/bsmanager/maintenance/AddModal.jsx
View file @
d0f77ef8
...
...
@@ -21,11 +21,7 @@ import {
CM_XWBPlan_DataList
,
}
from
'@/services/maintenance/api'
;
import
{
CM_Event_LoadDepartmentAndRoles
}
from
'@/services/standingBook/api'
;
import
{
PlusOutlined
,
DownOutlined
,
StepForwardFilled
,
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
DownOutlined
,
StepForwardFilled
}
from
'@ant-design/icons'
;
import
ChangeAdd
from
'./ChangeAdd'
;
const
{
Option
}
=
Select
;
...
...
@@ -45,9 +41,9 @@ const AddModal = props => {
const
[
filed
,
setFiled
]
=
useState
({});
// 传给子组件列表数据
const
[
filed1
,
setFiled1
]
=
useState
({});
// 传给子组件列表数据
const
[
types
,
setTypes
]
=
useState
(
''
);
// 弹窗类型
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
//复选框数据填入项
const
[
checkedList1
,
setCheckedList1
]
=
useState
([]);
//最新选择数据
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
);
//打开弹框之前数据
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
//
复选框数据填入项
const
[
checkedList1
,
setCheckedList1
]
=
useState
([]);
//
最新选择数据
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
);
//
打开弹框之前数据
const
[
ff
,
setFf
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -368,10 +364,7 @@ const AddModal = props => {
</
Menu
>
}
>
<
div
className=
{
styles
.
linkDrowp
}
onClick=
{
e
=>
e
.
preventDefault
()
}
>
<
div
className=
{
styles
.
linkDrowp
}
onClick=
{
e
=>
e
.
preventDefault
()
}
>
<
DownOutlined
style=
{
{
fontSize
:
'12px'
,
...
...
@@ -396,11 +389,7 @@ const AddModal = props => {
},
]
}
>
<
Select
placeholder=
"选择计划执行周期"
onChange=
{
changTable
}
value=
{
selectValue
}
>
<
Select
placeholder=
"选择计划执行周期"
onChange=
{
changTable
}
value=
{
selectValue
}
>
<
Option
value=
"一周一次"
>
一周一次
</
Option
>
<
Option
value=
"半月一次"
>
半月一次
</
Option
>
<
Option
value=
"一月一次"
>
一月一次
</
Option
>
...
...
@@ -468,10 +457,7 @@ const AddModal = props => {
</
Menu
>
}
>
<
div
className=
{
styles
.
linkDrowp
}
onClick=
{
e
=>
e
.
preventDefault
()
}
>
<
div
className=
{
styles
.
linkDrowp
}
onClick=
{
e
=>
e
.
preventDefault
()
}
>
<
DownOutlined
style=
{
{
fontSize
:
'12px'
,
...
...
@@ -613,22 +599,14 @@ const AddModal = props => {
},
]
}
>
<
Select
placeholder=
"是否送审"
onChange=
{
changTable1
}
value=
{
selectValue1
}
>
<
Select
placeholder=
"是否送审"
onChange=
{
changTable1
}
value=
{
selectValue1
}
>
<
Option
value=
"否"
>
否
</
Option
>
<
Option
value=
"是"
>
是
</
Option
>
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"台账过滤条件"
name=
"filterCondition"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"台账过滤条件"
name=
"filterCondition"
labelCol=
{
{
span
:
4
}
}
>
<
TextArea
placeholder=
"设备对应的Scada台账名称,可多选"
/>
</
Item
>
</
Col
>
...
...
@@ -641,6 +619,7 @@ const AddModal = props => {
newCheckedList=
{
checkedList1
}
isType=
{
types
}
filed=
{
filed
}
type=
{
type
}
filed1=
{
filed1
}
ff=
{
ff
}
pickItem=
{
pickItem
}
...
...
src/pages/platformCenter/bsmanager/maintenance/ChangeAdd.jsx
View file @
d0f77ef8
/* eslint-disable no-lonely-if */
/* eslint-disable eqeqeq */
import
React
,
{
useState
,
useEffect
,
PureComponent
}
from
'react'
;
import
{
Modal
,
Divider
,
Checkbox
,
Space
,
Button
}
from
'antd'
;
import
styles
from
'./maintenance.less'
;
...
...
@@ -14,6 +16,7 @@ const ChangeAdd = props => {
pickItem
,
characterValue
,
ff
,
type
,
}
=
props
;
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
// 选中的复选框内容
const
[
indeterminate
,
setIndeterminate
]
=
useState
(
true
);
// 全选样式控制
...
...
@@ -47,9 +50,7 @@ const ChangeAdd = props => {
const
onSubmit
=
()
=>
{
isType
===
'rule'
?
callBackSubmit
(
`
${
value
===
'无'
||
value
===
''
?
''
:
`
${
value
}
,`
}${
checkValue
.
join
(
','
)}
`
,
`
${
value
===
'无'
||
value
===
''
?
''
:
`
${
value
}
,`
}${
checkValue
.
join
(
','
)}
`
,
)
:
callBackSubmit
({
checkedList
,
...
...
@@ -85,36 +86,62 @@ const ChangeAdd = props => {
useEffect
(()
=>
{
console
.
log
(
indeterminate
);
if
(
isType
!=
''
&&
isType
===
'add'
)
{
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed
.
includes
(
checkItem
))
{
checkArr
.
push
(
checkItem
);
}
});
setCheckedList
(
checkArr
);
setIndeterminate
(
!!
newCheckedList
.
length
&&
newCheckedList
.
length
<
filed
.
length
,
);
setCheckAll
(
newCheckedList
.
length
===
filed
.
length
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
else
if
(
isType
===
'app'
)
{
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
if
(
ff
.
includes
(
checkItem
))
{
checkArr
.
push
(
checkItem
);
}
});
setCheckedList
(
checkArr
);
setIndeterminate
(
!!
newCheckedList
.
length
&&
newCheckedList
.
length
<
ff
.
length
,
);
setCheckAll
(
newCheckedList
.
length
===
ff
.
length
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
if
(
type
==
'edit'
)
{
if
(
isType
!=
''
&&
isType
===
'add'
)
{
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed
.
includes
(
checkItem
))
{
checkArr
.
push
(
checkItem
);
}
});
setCheckedList
(
checkArr
);
setIndeterminate
(
!!
newCheckedList
.
length
&&
newCheckedList
.
length
<
filed
.
length
);
setCheckAll
(
newCheckedList
.
length
===
filed
.
length
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
else
if
(
isType
===
'app'
)
{
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
if
(
ff
.
includes
(
checkItem
))
{
checkArr
.
push
(
checkItem
);
}
});
setCheckedList
(
checkArr
);
setIndeterminate
(
!!
newCheckedList
.
length
&&
newCheckedList
.
length
<
ff
.
length
);
setCheckAll
(
newCheckedList
.
length
===
ff
.
length
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
}
else
{
if
(
isType
!=
''
&&
isType
===
'add'
)
{
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed
.
includes
(
checkItem
))
{
checkArr
.
push
(
checkItem
);
}
});
setCheckedList
(
checkArr
);
setIndeterminate
(
false
);
setCheckAll
(
false
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
else
if
(
isType
===
'app'
)
{
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
if
(
ff
.
includes
(
checkItem
))
{
checkArr
.
push
(
checkItem
);
}
});
setCheckedList
(
checkArr
);
setIndeterminate
(
false
);
setCheckAll
(
false
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
}
},
[
visible
]);
...
...
src/pages/platformCenter/bsmanager/maintenance/maintenance.jsx
View file @
d0f77ef8
...
...
@@ -2,10 +2,7 @@
/* eslint-disable camelcase */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Space
,
Table
,
Popconfirm
,
Tooltip
,
Button
,
notification
}
from
'antd'
;
import
{
CM_XWBPlan_DataList
,
CM_XWBPlan_RemovePlan
,
}
from
'@/services/maintenance/api'
;
import
{
CM_XWBPlan_DataList
,
CM_XWBPlan_RemovePlan
}
from
'@/services/maintenance/api'
;
import
{
EditTwoTone
,
DeleteOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
styles
from
'./maintenance.less'
;
import
AddModal
from
'./AddModal'
;
...
...
@@ -24,82 +21,231 @@ const maintenance = () => {
dataIndex
:
'businessName'
,
key
:
'businessName'
,
width
:
100
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'业务类型'
,
dataIndex
:
'businessType'
,
key
:
'businessType'
,
width
:
100
,
ellipsis
:
true
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'执行周期'
,
dataIndex
:
'docycle'
,
key
:
'docycle'
,
width
:
100
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'台账名称'
,
dataIndex
:
'accountName'
,
key
:
'accountName'
,
width
:
200
,
ellipsis
:
true
,
width
:
100
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'反馈名称'
,
dataIndex
:
'feedbackName'
,
key
:
'feedbackName'
,
width
:
200
,
width
:
100
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'台账过滤条件'
,
dataIndex
:
'filterCondition'
,
key
:
'filterCondition'
,
width
:
200
,
ellipsis
:
true
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
200
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'是否送审'
,
dataIndex
:
'isSubmit'
,
key
:
'isSubmit'
,
width
:
100
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'执行角色'
,
dataIndex
:
'doRole'
,
key
:
'doRole'
,
width
:
200
,
ellipsis
:
true
,
width
:
300
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
300
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'预生成天数'
,
dataIndex
:
'produceDays'
,
key
:
'produceDays'
,
width
:
100
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'在线任务量'
,
dataIndex
:
'onLines'
,
key
:
'onLines'
,
width
:
100
,
ellipsis
:
true
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'启停'
,
dataIndex
:
'doNot'
,
key
:
'doNot'
,
width
:
100
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
100
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
align
:
'center'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'操作'
,
...
...
@@ -109,10 +255,7 @@ const maintenance = () => {
render
:
(
text
,
record
)
=>
(
<
Space
>
<
Tooltip
title=
"修改"
>
<
EditTwoTone
onClick=
{
()
=>
editEventType
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
<
EditTwoTone
onClick=
{
()
=>
editEventType
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
</
Tooltip
>
<
Tooltip
title=
"删除"
>
<
Popconfirm
...
...
@@ -206,8 +349,7 @@ const maintenance = () => {
dataSource=
{
tableData
}
scroll=
{
{
y
:
'calc(100vh - 215px)'
,
x
:
'max-content'
}
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
...
...
src/pages/platformCenter/bsmanager/maintenance/maintenance.less
View file @
d0f77ef8
.maintenanceContainer{
.ant-card-body {
padding: 12px 24px 24px 24px;
}
.pickItem{
background-color: #F5F6F9;
}
.maintenanceContainer {
.ant-card-body {
padding: 12px 24px 24px 24px;
}
.pickItem {
background-color: #f5f6f9;
}
}
.formData{
height: 38rem;
overflow-y: scroll;
.ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before{
display: none;
}
.formData_label{
display: flex;
align-items: center;
}
.filed_listItem{
display: flex;
height: 3.6rem;
.ant-btn-icon-only {
width: 32px;
height: 32px;
/* padding: 2.4px 0; */
font-size: 16px;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.linkDrowp{
position: absolute;
top: 0px;
left: 93.5%;
width: 1rem;
height: 100%;
.formData {
height: 38rem;
overflow-y: scroll;
.ant-form-item-label
> label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
display: none;
}
.formData_label {
display: flex;
align-items: center;
}
.listItem
{
}
.filed_listItem
{
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414E65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
height: 3.6rem;
.ant-btn-icon-only {
width: 32px;
height: 32px;
/* padding: 2.4px 0; */
font-size: 16px;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.linkDrowp {
position: absolute;
top: 0px;
left: 93.5%;
width: 1rem;
height: 100%;
display: flex;
align-items: center;
}
.listItem {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414e65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
}
.ant-select-arrow .anticon {
vertical-align: middle;
vertical-align: middle;
}
.listCard{
display: flex;
.cardItem
{
padding: 0.5rem;
}
.cardContent
{
height: 30rem;
overflow-y: scroll;
width: 100%;
}
.cardItemData
{
display:
inline-block;
padding: 0.5rem;
border: 1px solid #b5b8c8;
width:
100%;
// height: 30rem;
overflow-y: scroll;
}
.listCard
{
display: flex;
.cardItem
{
padding: 0.5rem;
}
.cardContent
{
height: 30rem;
overflow-y: scroll;
width: 100%;
}
.cardItemData
{
display:
inline-block;
padding: 0.5rem;
border: 1px solid #b5b8c8;
width:
100%;
// height: 30rem;
overflow-y: scroll;
}
}
.ant-modal-body {
padding: 10px 24px 0px 24px;
padding: 10px 24px 0px 24px;
}
.ant-modal-footer {
padding: 0px 48px 10px 40px;
padding: 0px 48px 10px 40px;
}
.ant-table-pagination.ant-pagination {
margin: 5px 0;
margin: 5px 0;
}
src/pages/platformCenter/dimensionsConfig/VectorData/AddModal.jsx
View file @
d0f77ef8
/* eslint-disable indent */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Modal
,
Input
,
Select
,
AutoComplete
,
Button
,
notification
,
message
,
Card
}
from
'antd'
;
import
styles
from
'../dimensionsConfig.less'
import
{
AddVectorData
,
publisService
,
GetProjectNames
}
from
'@/services/webConfig/api'
;
Form
,
Modal
,
Input
,
Select
,
AutoComplete
,
Button
,
notification
,
message
,
Card
,
Space
,
}
from
'antd'
;
import
styles
from
'../dimensionsConfig.less'
;
import
{
AddVectorData
,
publisService
,
GetProjectNames
}
from
'@/services/webConfig/api'
;
import
{
PlusCircleOutlined
,
CloseCircleOutlined
PlusCircleOutlined
,
CloseCircleOutlined
,
PlusOutlined
,
MinusCircleOutlined
,
}
from
'@ant-design/icons'
;
const
{
Option
}
=
Select
;
const
AddModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{
},
type
,
formObj
,
visible
}
=
props
;
const
{
callBackSubmit
=
()
=>
{},
type
,
formObj
,
visible
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
attributes
,
setAttributes
]
=
useState
([])
const
[
attributes
,
setAttributes
]
=
useState
([])
;
const
[
workList
,
setWorkList
]
=
useState
([]);
const
[
allData
,
setAllData
]
=
useState
([]);
const
[
gsIp
,
setGsIp
]
=
useState
([]);
const
[
ports
,
setPorts
]
=
useState
(
''
);
const
[
ports
,
setPorts
]
=
useState
(
''
);
const
[
projectNmme
,
setProjectNmme
]
=
useState
([]);
const
[
loadingProject
,
setLoadingProject
]
=
useState
(
false
)
const
[
loadingProject
,
setLoadingProject
]
=
useState
(
false
);
const
[
form
]
=
Form
.
useForm
();
const
{
Item
}
=
Form
;
// 提交
...
...
@@ -29,22 +41,26 @@ const AddModal = props => {
if
(
validate
)
{
setLoading
(
true
);
let
obj
=
form
.
getFieldsValue
();
let
attributesObj
=
{}
let
attributesObj
=
{}
;
attributes
.
map
((
item
,
index
)
=>
{
let
key
=
obj
[
`key
${
index
}
`
]
attributesObj
[
`
${
key
}
`
]
=
obj
[
`value
${
index
}
`
]
})
let
key
=
obj
[
`key
${
index
}
`
]
;
attributesObj
[
`
${
key
}
`
]
=
obj
[
`value
${
index
}
`
]
;
})
;
if
(
type
===
'add'
)
{
let
url
=
allData
[
obj
.
name
].
fileName
?
`http://
${
obj
.
ip
}
:
${
obj
.
port
}
/
${
obj
.
projectName
}
/
${
obj
.
name
}
/
${
allData
[
obj
.
name
].
fileName
}
`
:
`http://
${
obj
.
ip
}
:
${
obj
.
port
}
/
${
obj
.
projectName
}
/
${
obj
.
name
}
`
let
url
=
allData
[
obj
.
name
].
fileName
?
`http://
${
obj
.
ip
}
:
${
obj
.
port
}
/
${
obj
.
projectName
}
/
${
obj
.
name
}
/
${
allData
[
obj
.
name
].
fileName
}
`
:
`http://
${
obj
.
ip
}
:
${
obj
.
port
}
/
${
obj
.
projectName
}
/
${
obj
.
name
}
`
;
let
query
=
{
type
:
obj
.
type
,
projectName
:
obj
.
projectName
,
name
:
obj
.
name
,
url
,
attributes
:
attributesObj
||
{},
attributes
:
attributesObj
||
{},
ip
:
obj
.
ip
,
port
:
obj
.
port
}
port
:
obj
.
port
,
}
;
AddVectorData
(
query
)
.
then
(
res
=>
{
setLoading
(
false
);
...
...
@@ -56,7 +72,7 @@ const AddModal = props => {
duration
:
3
,
description
:
'新增成功'
,
});
handlelocalStorage
(
'add'
,
obj
.
ip
,
obj
.
projectName
)
handlelocalStorage
(
'add'
,
obj
.
ip
,
obj
.
projectName
)
;
}
else
{
notification
.
error
({
message
:
'提示'
,
...
...
@@ -78,9 +94,7 @@ const AddModal = props => {
});
};
const
onFinish
=
value
=>
{
};
const
onFinish
=
value
=>
{};
useEffect
(()
=>
{
switch
(
type
)
{
case
'add'
:
...
...
@@ -89,16 +103,16 @@ const AddModal = props => {
if
(
localStorageData
)
{
gsIp
=
localStorageData
.
map
(
item
=>
({
value
:
item
.
gsIp
,
item
:
item
.
gsIp
item
:
item
.
gsIp
,
}));
}
setGsIp
(
gsIp
)
setAttributes
([])
setProjectNmme
([])
setWorkList
([])
setPorts
(
''
)
let
localIps
=
[
'192.168.12.97'
]
let
port
=
localIps
.
includes
(
gsIp
)
?
'8083'
:
'8088'
setGsIp
(
gsIp
)
;
setAttributes
([])
;
setProjectNmme
([])
;
setWorkList
([])
;
setPorts
(
''
)
;
let
localIps
=
[
'192.168.12.97'
]
;
let
port
=
localIps
.
includes
(
gsIp
)
?
'8083'
:
'8088'
;
form
.
resetFields
();
break
;
case
'edit'
:
...
...
@@ -112,7 +126,7 @@ const AddModal = props => {
//存储到localstorage
const
handlelocalStorage
=
(
type
,
gsIp
,
gisAppName
)
=>
{
if
(
!
localStorage
)
return
null
;
let
result
=
JSON
.
parse
(
localStorage
.
getItem
(
'metaData'
))
let
result
=
JSON
.
parse
(
localStorage
.
getItem
(
'metaData'
))
;
if
(
type
==
'get'
)
{
return
result
;
}
...
...
@@ -120,22 +134,24 @@ const AddModal = props => {
if
(
!
result
)
result
=
[];
result
.
push
({
gsIp
,
gisAppName
:
[{
value
:
gisAppName
,
item
:
gisAppName
}]
})
localStorage
.
setItem
(
'metaData'
,
JSON
.
stringify
(
result
))
return
gisAppName
:
[
{
value
:
gisAppName
,
item
:
gisAppName
,
},
],
});
localStorage
.
setItem
(
'metaData'
,
JSON
.
stringify
(
result
));
return
;
}
let
data
=
result
.
find
(
item
=>
item
.
gsIp
==
gsIp
)
let
data
=
result
.
find
(
item
=>
item
.
gsIp
==
gsIp
)
;
let
isHasGisAppName
=
data
.
gisAppName
.
find
(
item
=>
item
.
value
==
gisAppName
);
if
(
isHasGisAppName
)
return
;
data
.
gisAppName
.
push
({
value
:
gisAppName
,
item
:
gisAppName
})
localStorage
.
setItem
(
'metaData'
,
JSON
.
stringify
(
result
))
item
:
gisAppName
,
})
;
localStorage
.
setItem
(
'metaData'
,
JSON
.
stringify
(
result
))
;
};
const
layout
=
{
...
...
@@ -144,92 +160,89 @@ const AddModal = props => {
span
:
4
,
},
wrapperCol
:
{
span
:
1
6
,
span
:
1
7
,
},
};
const
selectIp
=
(
value
)
=>
{
let
localIps
=
[
'192.168.12.97'
]
let
port
=
localIps
.
includes
(
value
)
?
'8083'
:
'8088'
const
selectIp
=
value
=>
{
let
localIps
=
[
'192.168.12.97'
]
;
let
port
=
localIps
.
includes
(
value
)
?
'8083'
:
'8088'
;
form
.
setFieldsValue
({
port
,
serviceadress
:
value
});
setPorts
(
port
)
}
setPorts
(
port
);
};
// 获取项目名
const
getProject
=
()
=>
{
const
obj
=
form
.
getFieldsValue
();
if
(
obj
.
ip
&&
obj
.
port
)
{
setLoadingProject
(
true
)
GetProjectNames
({
ip
:
obj
.
ip
,
port
:
obj
.
port
}).
then
(
res
=>
{
setLoadingProject
(
false
)
if
(
res
.
msg
===
'Ok'
)
{
if
(
res
.
data
==
'{}'
){
notification
.
info
({
message
:
'提示'
,
duration
:
3
,
description
:
'该地址下项目为空'
,
});
}
else
{
notification
.
success
({
setLoadingProject
(
true
);
GetProjectNames
({
ip
:
obj
.
ip
,
port
:
obj
.
port
})
.
then
(
res
=>
{
setLoadingProject
(
false
);
if
(
res
.
msg
===
'Ok'
)
{
if
(
res
.
data
==
'{}'
)
{
notification
.
info
({
message
:
'提示'
,
duration
:
3
,
description
:
'该地址下项目为空'
,
});
}
else
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'获取成功'
,
});
let
data
=
Object
.
values
(
JSON
.
parse
(
res
.
data
));
setProjectNmme
(
data
);
if
(
data
.
length
)
{
form
.
setFieldsValue
({
projectName
:
data
[
0
]
});
selectProject
(
data
[
0
]);
}
}
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'获取
成功
'
,
description
:
'获取
失败
'
,
});
let
data
=
Object
.
values
(
JSON
.
parse
(
res
.
data
))
setProjectNmme
(
data
)
if
(
data
.
length
)
{
form
.
setFieldsValue
({
projectName
:
data
[
0
]
});
selectProject
(
data
[
0
])
}
}
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'获取失败'
,
});
}
}).
catch
(
e
=>
{
console
.
log
(
'e'
,
e
);
})
})
.
catch
(
e
=>
{
console
.
log
(
'e'
,
e
);
});
}
else
{
message
.
warning
(
"未输入ip或port"
)
message
.
warning
(
'未输入ip或port'
);
}
}
const
selectProject
=
(
value
)
=>
{
}
;
const
selectProject
=
value
=>
{
const
obj
=
form
.
getFieldsValue
();
GetProjectNames
({
ip
:
obj
.
ip
,
port
:
obj
.
port
,
projectname
:
value
}).
then
(
response
=>
{
let
newArr
=
JSON
.
parse
(
response
.
data
)
let
workArr
=
Object
.
keys
(
newArr
.
data
)
console
.
log
(
'newArr'
,
newArr
);
console
.
log
(
'workArr'
,
workArr
);
setAllData
(
newArr
.
data
)
let
newArr
=
JSON
.
parse
(
response
.
data
)
;
let
workArr
=
Object
.
keys
(
newArr
.
data
)
;
console
.
log
(
'newArr'
,
newArr
);
console
.
log
(
'workArr'
,
workArr
);
setAllData
(
newArr
.
data
)
;
if
(
workArr
.
length
)
{
setWorkList
(
workArr
)
setWorkList
(
workArr
)
;
form
.
setFieldsValue
({
name
:
workArr
[
0
],
type
:
newArr
.
data
[
workArr
[
0
]].
type
});
}
})
}
const
selectName
=
(
value
)
=>
{
});
};
const
selectName
=
value
=>
{
form
.
setFieldsValue
({
type
:
allData
[
value
].
type
});
}
}
;
const
addExtra
=
()
=>
{
let
attributesArr
=
[...
attributes
]
attributesArr
.
push
({})
setAttributes
(
attributesArr
)
}
const
deleteExtr
=
(
index
)
=>
{
let
attributesArr
=
[...
attributes
]
let
attributesArr
=
[...
attributes
]
;
attributesArr
.
push
({})
;
setAttributes
(
attributesArr
)
;
}
;
const
deleteExtr
=
index
=>
{
let
attributesArr
=
[...
attributes
]
;
attributesArr
.
splice
(
index
,
1
);
setAttributes
(
attributesArr
)
}
const
inputPort
=
(
e
)
=>
{
setPorts
(
e
.
target
.
value
)
}
setAttributes
(
attributesArr
)
;
}
;
const
inputPort
=
e
=>
{
setPorts
(
e
.
target
.
value
)
;
}
;
return
(
<
Modal
title=
{
`${type === 'add' ? '元数据发布' : '编辑'}`
}
...
...
@@ -247,27 +260,18 @@ const AddModal = props => {
getContainer=
{
false
}
>
{
visible
&&
(
<
Form
form=
{
form
}
{
...
layout
}
onFinish=
{
onFinish
}
>
<
Item
label=
"IP"
name=
"ip"
rules=
{
[{
required
:
true
,
message
:
'请选择ip地址'
}]
}
>
<
AutoComplete
placeholder=
"请输入IP"
options=
{
gsIp
}
onSelect=
{
selectIp
}
/>
<
Form
form=
{
form
}
{
...
layout
}
onFinish=
{
onFinish
}
style=
{
{
marginBottom
:
'20px'
}
}
>
<
Item
label=
"IP"
name=
"ip"
rules=
{
[{
required
:
true
,
message
:
'请选择ip地址'
}]
}
>
<
AutoComplete
placeholder=
"请输入IP"
options=
{
gsIp
}
onSelect=
{
selectIp
}
/>
</
Item
>
<
Item
label=
"端口"
name=
"port"
rules=
{
[{
required
:
true
,
message
:
'请输入端口'
}]
}
>
<
Item
label=
"端口"
name=
"port"
rules=
{
[{
required
:
true
,
message
:
'请输入端口'
}]
}
>
<
div
className=
{
styles
.
imgList
}
>
<
Input
placeholder=
"请输入GIS服务器端口"
allowClear
value=
{
ports
}
onChange=
{
inputPort
}
/>
<
Button
style=
{
{
marginLeft
:
'0.5rem'
}
}
onClick=
{
getProject
}
loading=
{
loadingProject
}
>
获取项目名
</
Button
>
<
Input
placeholder=
"请输入GIS服务器端口"
allowClear
value=
{
ports
}
onChange=
{
inputPort
}
/>
</
div
>
</
Item
>
<
Item
...
...
@@ -275,9 +279,20 @@ const AddModal = props => {
name=
"projectName"
rules=
{
[{
required
:
true
,
message
:
'请选择项目名'
}]
}
>
<
Select
onChange=
{
selectProject
}
>
{
projectNmme
.
length
?
projectNmme
.
map
((
item
,
index
)
=>
{
return
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
})
:
''
}
<
Select
onChange=
{
selectProject
}
style=
{
{
width
:
'351px'
}
}
>
{
projectNmme
.
length
?
projectNmme
.
map
((
item
,
index
)
=>
{
return
(
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
);
})
:
''
}
</
Select
>
<
Button
style=
{
{
marginLeft
:
'0.5rem'
}
}
onClick=
{
getProject
}
loading=
{
loadingProject
}
>
获取项目名
</
Button
>
</
Item
>
<
Item
label=
"数据源名"
...
...
@@ -285,7 +300,15 @@ const AddModal = props => {
rules=
{
[{
required
:
true
,
message
:
'请选择数据源名'
}]
}
>
<
Select
onChange=
{
selectName
}
>
{
workList
.
length
?
workList
.
map
((
item
,
index
)
=>
{
return
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
})
:
''
}
{
workList
.
length
?
workList
.
map
((
item
,
index
)
=>
{
return
(
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
);
})
:
''
}
</
Select
>
</
Item
>
<
Item
...
...
@@ -295,34 +318,56 @@ const AddModal = props => {
>
<
Input
placeholder=
"请输入数据类型"
allowClear
disabled
/>
</
Item
>
<
Button
size=
"small"
onClick=
{
()
=>
{
addExtra
()
}
}
>
<
Button
size=
"small"
style=
{
{
width
:
'71%'
,
marginLeft
:
'109px'
,
lineHeight
:
'32px'
,
height
:
'32px'
}
}
onClick=
{
()
=>
{
addExtra
();
}
}
>
新增额外属性
</
Button
>
<
div
style=
{
{
maxHeight
:
'14rem'
,
overflowY
:
'scroll'
,
marginTop
:
'0.2rem'
}
}
>
{
attributes
.
length
?
attributes
.
map
((
item
,
index
)
=>
{
return
<
div
key=
{
index
}
className=
{
styles
.
containerFileds
}
>
<
Item
label=
"键"
name=
{
`key${index}`
}
style=
{
{
width
:
'45%'
,
marginTop
:
'24px'
}
}
>
<
Input
placeholder=
""
allowClear
/>
</
Item
>
<
Item
label=
"值"
name=
{
`value${index}`
}
style=
{
{
width
:
'45%'
,
marginTop
:
'24px'
}
}
>
<
Input
placeholder=
""
allowClear
/>
</
Item
>
<
CloseCircleOutlined
onClick=
{
()
=>
{
deleteExtr
(
index
)
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'red'
,
cursor
:
'pointer'
}
}
/>
</
div
>
})
:
''
}
<
div
style=
{
{
maxHeight
:
'14rem'
,
overflowY
:
'scroll'
,
marginTop
:
'0.2rem'
,
marginLeft
:
'66px'
,
width
:
'88%'
,
}
}
>
{
attributes
.
length
?
attributes
.
map
((
item
,
index
)
=>
{
return
(
<
div
key=
{
index
}
className=
{
styles
.
containerFileds
}
>
<
Item
label=
"键"
name=
{
`key${index}`
}
style=
{
{
width
:
'100%'
,
marginTop
:
'24px'
}
}
>
<
Input
placeholder=
""
allowClear
/>
</
Item
>
<
Item
label=
"值"
name=
{
`value${index}`
}
style=
{
{
width
:
'100%'
,
marginTop
:
'24px'
}
}
>
<
Input
placeholder=
""
allowClear
/>
</
Item
>
<
CloseCircleOutlined
onClick=
{
()
=>
{
deleteExtr
(
index
);
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'red'
,
cursor
:
'pointer'
,
}
}
/>
</
div
>
);
})
:
''
}
</
div
>
</
Form
>
)
}
...
...
src/pages/platformCenter/dimensionsConfig/VectorData/VectorData.jsx
View file @
d0f77ef8
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../dimensionsConfig.less'
import
{
GetVectorDataList
,
DeleteVectorData
,
RefreshVectorData
}
from
'@/services/webConfig/api'
;
import
AddModal
from
'./AddModal'
import
styles
from
'../dimensionsConfig.less'
;
import
{
GetVectorDataList
,
DeleteVectorData
,
RefreshVectorData
}
from
'@/services/webConfig/api'
;
import
AddModal
from
'./AddModal'
;
// import PreviewModal from './VectorPreviewModal'
const
VectorData
=
props
=>
{
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
tileData
,
setTileData
]
=
useState
([]);
// table表格数据
const
[
visible
,
setVisible
]
=
useState
(
false
);
// 弹窗
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 更新list
const
[
loading
,
setLoading
]
=
useState
([]);
// 更新状态
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
formObj
,
setFormObj
]
=
useState
({
user
:
'admin'
,
password
:
'geoserver'
});
const
columns
=
[
{
title
:
'项目名'
,
dataIndex
:
'projectName'
,
key
:
'projectName'
,
align
:
'center'
},
{
title
:
'IP'
,
dataIndex
:
'ip'
,
key
:
'ip'
,
align
:
'center'
},
{
title
:
'端口'
,
dataIndex
:
'port'
,
key
:
'port'
,
align
:
'center'
},
{
title
:
'数据源名'
,
dataIndex
:
'name'
,
key
:
'name'
,
align
:
'center'
},
{
title
:
'类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
align
:
'center'
},
{
title
:
'发布时间'
,
dataIndex
:
'publishDatetime'
,
key
:
'publishDatetime'
,
align
:
'center'
},
{
title
:
'编辑'
,
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Button
type=
"primary"
size=
"small"
loading=
{
loading
[
index
]
}
onClick=
{
()
=>
enterLoading
(
record
,
index
)
}
>
更新
</
Button
>
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
Popconfirm
title=
"是否删除该矢量数据?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
delConfirm
(
record
);
}
}
>
<
Button
size=
"small"
danger
>
删除
</
Button
>
</
Popconfirm
>
</
div
>
</
Space
>
),
},
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
tileData
,
setTileData
]
=
useState
([]);
// table表格数据
const
[
visible
,
setVisible
]
=
useState
(
false
);
// 弹窗
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 更新list
const
[
loading
,
setLoading
]
=
useState
([]);
// 更新状态
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
formObj
,
setFormObj
]
=
useState
({
user
:
'admin'
,
password
:
'geoserver'
});
const
columns
=
[
{
title
:
'项目名'
,
dataIndex
:
'projectName'
,
key
:
'projectName'
,
align
:
'center'
,
},
{
title
:
'IP'
,
dataIndex
:
'ip'
,
key
:
'ip'
,
align
:
'center'
,
},
{
title
:
'端口'
,
dataIndex
:
'port'
,
key
:
'port'
,
align
:
'center'
,
},
{
title
:
'数据源名'
,
dataIndex
:
'name'
,
key
:
'name'
,
align
:
'center'
,
},
{
title
:
'类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
align
:
'center'
,
},
{
title
:
'发布时间'
,
dataIndex
:
'publishDatetime'
,
key
:
'publishDatetime'
,
align
:
'center'
,
},
{
title
:
'编辑'
,
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Button
type=
"primary"
size=
"small"
loading=
{
loading
[
index
]
}
onClick=
{
()
=>
enterLoading
(
record
,
index
)
}
>
更新
</
Button
>
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
Popconfirm
title=
"是否删除该矢量数据?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
delConfirm
(
record
);
}
}
>
<
Button
size=
"small"
danger
>
删除
</
Button
>
</
Popconfirm
>
</
div
>
</
Space
>
),
},
];
// 更新
const
enterLoading
=
(
record
,
index
)
=>
{
const
newLoadings
=
[...
loading
];
newLoadings
[
index
]
=
true
;
setLoading
(
newLoadings
);
let
query
=
{
id
:
record
.
id
,
};
];
//更新
const
enterLoading
=
(
record
,
index
)
=>
{
RefreshVectorData
(
query
)
.
then
(
res
=>
{
const
newLoadings
=
[...
loading
];
newLoadings
[
index
]
=
true
setLoading
(
newLoadings
)
let
query
=
{
id
:
record
.
id
,
newLoadings
[
index
]
=
false
;
setLoading
(
newLoadings
);
if
(
res
.
msg
===
''
)
{
setFlag
(
flag
+
1
);
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'更新元数据成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
}
})
.
catch
(
err
=>
{
const
newLoadings
=
[...
loading
];
newLoadings
[
index
]
=
false
;
setLoading
(
newLoadings
);
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'服务无法访问'
,
});
});
};
RefreshVectorData
(
query
).
then
(
res
=>
{
const
newLoadings
=
[...
loading
];
newLoadings
[
index
]
=
false
setLoading
(
newLoadings
)
if
(
res
.
msg
===
''
)
{
setFlag
(
flag
+
1
)
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'更新元数据成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
};
}).
catch
(
err
=>
{
const
newLoadings
=
[...
loading
];
newLoadings
[
index
]
=
false
setLoading
(
newLoadings
)
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'服务无法访问'
,
});
})
}
const
onSubmit
=
prop
=>
{
setVisible
(
false
);
setFlag
(
flag
+
1
)
};
const
delConfirm
=
(
record
)
=>
{
DeleteVectorData
(
record
.
id
).
then
(
res
=>
{
if
(
res
.
msg
===
''
)
{
setFlag
(
flag
+
1
)
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除元数据成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除元数据失败'
,
});
};
})
}
const
handleAdd
=
()
=>
{
setType
(
'add'
);
setVisible
(
true
);
}
useEffect
(()
=>
{
renderTile
();
},
[
flag
]);
// 获取瓦片数据配置数据
const
renderTile
=
()
=>
{
setTreeLoading
(
true
);
GetVectorDataList
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
let
arr
=
[]
res
.
data
.
map
(
item
=>
{
arr
.
push
(
false
)
})
setLoading
(
arr
)
setTreeLoading
(
false
);
setTileData
(
res
.
data
);
}
else
{
setTreeLoading
(
false
);
notification
.
error
({
message
:
'获取失败'
,
description
:
res
.
message
,
});
}
}
)
};
return
(
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
}
}
>
新增
</
Button
>
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
tileData
}
bordered
rowKey=
'id'
scroll=
{
{
y
:
400
}
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
}
}
>
</
Table
>
<
AddModal
visible=
{
visible
}
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
formObj=
{
formObj
}
/>
const
onSubmit
=
prop
=>
{
setVisible
(
false
);
setFlag
(
flag
+
1
);
};
const
delConfirm
=
record
=>
{
DeleteVectorData
(
record
.
id
).
then
(
res
=>
{
if
(
res
.
msg
===
''
)
{
setFlag
(
flag
+
1
);
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除元数据成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除元数据失败'
,
});
}
});
};
const
handleAdd
=
()
=>
{
setType
(
'add'
);
setVisible
(
true
);
};
useEffect
(()
=>
{
renderTile
();
},
[
flag
]);
// 获取瓦片数据配置数据
const
renderTile
=
()
=>
{
setTreeLoading
(
true
);
GetVectorDataList
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
let
arr
=
[];
res
.
data
.
map
(
item
=>
{
arr
.
push
(
false
);
});
setLoading
(
arr
);
setTreeLoading
(
false
);
setTileData
(
res
.
data
);
}
else
{
setTreeLoading
(
false
);
notification
.
error
({
message
:
'获取失败'
,
description
:
res
.
message
,
});
}
});
};
</
Spin
>
</>
)
}
export
default
VectorData
\ No newline at end of file
return
(
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
}
}
>
新增
</
Button
>
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
tileData
}
bordered
rowKey=
"id"
scroll=
{
{
y
:
400
}
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
}
}
/>
<
AddModal
visible=
{
visible
}
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
formObj=
{
formObj
}
/>
</
Spin
>
</>
);
};
export
default
VectorData
;
src/pages/platformCenter/dimensionsConfig/dimensionsConfig.jsx
View file @
d0f77ef8
import
{
Tabs
,
Button
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
styles
from
'./dimensionsConfig.less'
import
styles
from
'./dimensionsConfig.less'
;
import
TileConfig
from
'./TileConfig/TileConfig'
;
import
VectorData
from
'./VectorData/VectorData'
;
import
ProjectMessage
from
'./projectMessage/projectMessage'
;
...
...
@@ -10,32 +10,30 @@ import SolutionConfig from './solutionConfig/solutionConfig';
const
{
TabPane
}
=
Tabs
;
const
SchemeConfig
=
()
=>
{
const
[
activekey
,
setActiveKey
]
=
useState
(
'1'
)
const
callback
=
(
index
)
=>
{
setActiveKey
(
index
)
}
const
[
activekey
,
setActiveKey
]
=
useState
(
'1'
);
const
callback
=
index
=>
{
setActiveKey
(
index
);
};
return
(
<
PageContainer
>
<
div
className=
{
styles
.
container3d
}
activekey=
{
activekey
}
>
<
Tabs
onChange=
{
callback
}
type=
"card"
>
<
TabPane
tab=
"瓦片数据配置"
key=
"1"
>
{
activekey
===
'1'
?<
TileConfig
/>:
''
}
</
TabPane
>
<
TabPane
tab=
"数据源配置"
key=
"2"
>
{
activekey
===
'2'
?<
VectorData
/>:
''
}
</
TabPane
>
<
TabPane
tab=
"方案管理"
key=
"3"
>
{
activekey
===
'3'
?<
ProjectMessage
/>:
''
}
</
TabPane
>
<
TabPane
tab=
"方案配置"
key=
"4"
>
{
activekey
===
'4'
?<
SolutionConfig
/>:
''
}
</
TabPane
>
</
Tabs
>
</
div
>
</
PageContainer
>
)
}
export
default
SchemeConfig
;
\ No newline at end of file
return
(
<
PageContainer
>
<
div
className=
{
styles
.
container3d
}
activekey=
{
activekey
}
>
<
Tabs
onChange=
{
callback
}
type=
"card"
>
<
TabPane
tab=
"瓦片数据配置"
key=
"1"
>
{
activekey
===
'1'
?
<
TileConfig
/>
:
''
}
</
TabPane
>
<
TabPane
tab=
"数据源配置"
key=
"2"
>
{
activekey
===
'2'
?
<
VectorData
/>
:
''
}
</
TabPane
>
<
TabPane
tab=
"方案管理"
key=
"3"
>
{
activekey
===
'3'
?
<
ProjectMessage
/>
:
''
}
</
TabPane
>
<
TabPane
tab=
"方案配置"
key=
"4"
>
{
activekey
===
'4'
?
<
SolutionConfig
/>
:
''
}
</
TabPane
>
</
Tabs
>
</
div
>
</
PageContainer
>
);
};
export
default
SchemeConfig
;
src/pages/platformCenter/dimensionsConfig/dimensionsConfig.less
View file @
d0f77ef8
.container3d{
width: 100%;
.container3d
{
width: 100%;
background-color: #ffffff;
display: flex;
.ant-table {
min-height: 15rem !important;
}
padding: 0.8rem;
.ant-table-thead tr th {
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
overflow-y: scroll;
.ant-input-number-input {
background-color: #ffffff;
display: flex;
.ant-table {
min-height: 15rem !important;
}
padding: 0.8rem;
.ant-table-thead tr th {
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
overflow-y: scroll;
.ant-input-number-input{
background-color: #ffffff;
color: #000000;
}
.ant-card-body {
padding: 12px 24px 24px 25px;
}
}
.imgList{
display: flex;
flex-wrap: wrap;
}
.imgItem{
display: flex;
flex-direction: column;
align-items: center;
margin:0 1rem 1rem 0;
}
.tileBtn{
display: flex;
justify-content: flex-end;
width: 100%;
padding: 0 0 2rem
}
.schemeName{
margin-right: 0.8rem;
font-weight: bold;
color: #000000;
}
.ant-card-body {
padding: 12px 24px 24px 25px;
}
}
.imgList {
display: flex;
flex-wrap: wrap;
}
.imgItem {
display: flex;
flex-direction: column;
align-items: center;
margin: 0 1rem 1rem 0;
}
.tileBtn {
display: flex;
justify-content: flex-end;
width: 100%;
padding: 0 0 2rem;
}
.schemeName {
margin-right: 0.8rem;
font-weight: bold;
}
.schemeItem,.schemeBtn{
display: flex;
align-items: center;
}
.schemeBtn{
width: 12rem;
justify-content: center;
}
.mapItem{
display: flex;
border: 1px solid #ccc;
border-radius: 4px;
height: 2.2rem;
align-items: center;
margin: 0.5rem 0;
width: 14.5rem;
}
.defaultTile{
background: #ccc;
color: white;
cursor: pointer;
height: 100%;
display: flex;
align-items: center;
width: 3rem;
justify-content: center;
.schemeItem,
.schemeBtn {
display: flex;
align-items: center;
}
.
mapText
{
width: 10
rem;
text-align
: center;
.
schemeBtn
{
width: 12
rem;
justify-content
: center;
}
.mapIcon{
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
.mapItem {
display: flex;
border: 1px solid #ccc;
border-radius: 4px;
height: 2.2rem;
align-items: center;
margin: 0.5rem 0;
width: 14.5rem;
}
.activeTile{
background-color: #4699f4
.defaultTile {
background: #ccc;
color: white;
cursor: pointer;
height: 100%;
display: flex;
align-items: center;
width: 3rem;
justify-content: center;
}
.mapText {
width: 10rem;
text-align: center;
}
.mapIcon {
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
.activeTile {
background-color: #4699f4;
}
.dropList {
position: absolute;
right: 2%;
top: 25%;
color: rgba(0, 0, 0, 0.25);
z-index: 99;
}
.divider{
display: flex;
align-items: center;
line-height: 100%;
padding: 0.5rem;
.dividerIcon{
margin-left: 0.8rem;
color: #4699f4;
cursor: pointer;
}
position: absolute;
right: 2%;
top: 25%;
color: rgba(0, 0, 0, 0.25);
z-index: 99;
}
.cardsList{
display: flex
;
flex-wrap: wrap
;
}
.
cardItem
{
width: 1
8rem;
height: 26rem
;
margin: 0 2rem
;
.divider {
display: flex;
align-items: center
;
line-height: 100%
;
padding: 0.5rem;
.
dividerIcon
{
margin-left: 0.
8rem;
color: #4699f4
;
cursor: pointer
;
}
.containerFileds{
display: flex;
justify-content: space-between;
width: 98%;
border:1px solid #f0f0f0;
margin-top: 1rem;
}
\ No newline at end of file
}
.cardsList {
display: flex;
flex-wrap: wrap;
}
.cardItem {
width: 18rem;
height: 26rem;
margin: 0 2rem;
}
.containerFileds {
display: flex;
justify-content: space-between;
width: 98%;
border: 1px solid #f0f0f0;
margin-top: 0.5rem;
}
src/pages/platformCenter/hostmanager/baseConfig/BaseConfig.jsx
View file @
d0f77ef8
...
...
@@ -69,7 +69,6 @@ const BaseConfig = () => {
</
div
>
)
}
<
br
/>
<
Button
style=
{
{
marginLeft
:
'116px'
,
marginTop
:
'10px'
}
}
>
生成编号
</
Button
>
<
div
style=
{
{
marginTop
:
'50px'
,
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
img
src=
{
servie
}
style=
{
{
height
:
'16px'
}
}
alt=
""
/>
<
span
style=
{
{
marginLeft
:
'10px'
,
fontWeight
:
'bold'
}
}
>
服务器链接
</
span
>
...
...
src/pages/platformCenter/messageManage/templateManage/TemplateManage.jsx
View file @
d0f77ef8
...
...
@@ -17,11 +17,7 @@ import {
notification
,
Spin
,
}
from
'antd'
;
import
{
PlusCircleOutlined
,
EditTwoTone
,
DeleteOutlined
,
}
from
'@ant-design/icons'
;
import
{
PlusCircleOutlined
,
EditTwoTone
,
DeleteOutlined
}
from
'@ant-design/icons'
;
const
{
Search
}
=
Input
;
const
{
Option
}
=
Select
;
...
...
@@ -148,6 +144,21 @@ const TemplateManage = () => {
dataIndex
:
'third_id'
,
key
:
'third_id'
,
align
:
'center'
,
width
:
150
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
150
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'模板参数1.0'
,
...
...
@@ -172,6 +183,21 @@ const TemplateManage = () => {
dataIndex
:
'analysis_params'
,
key
:
'analysis_params'
,
align
:
'center'
,
width
:
150
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
150
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
{
title
:
'操作'
,
...
...
@@ -203,9 +229,7 @@ const TemplateManage = () => {
delTemplate
(
record
);
}
}
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Popconfirm
>
</
div
>
</
Tooltip
>
...
...
@@ -218,10 +242,7 @@ const TemplateManage = () => {
const
searchStyle
=
val
=>
{
let
n
;
if
(
showSearchStyle
)
{
n
=
val
.
replace
(
new
RegExp
(
value
,
'g'
),
`<span style='color:red'>
${
value
}
</span>`
,
);
n
=
val
.
replace
(
new
RegExp
(
value
,
'g'
),
`<span style='color:red'>
${
value
}
</span>`
);
}
else
{
n
=
val
;
}
...
...
src/pages/platformCenter/messageManage/templateManage/components/AddModal.jsx
View file @
d0f77ef8
import
React
,
{
useState
,
useEffect
}
from
'react'
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
SiteModal
from
'@/components/Modal/SiteModa'
;
import
{
Form
,
Input
,
notification
,
Select
,
Row
,
Col
}
from
'antd'
import
{
Form
,
Input
,
notification
,
Select
,
Row
,
Col
}
from
'antd'
;
const
{
Item
}
=
Form
;
const
{
TextArea
}
=
Input
;
const
AddModal
=
props
=>
{
const
{
option
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
templateName
,
setTemplateName
]
=
useState
([]);
const
onSubmit
=
()
=>
{
form
.
submit
()
}
const
onSubmitSuccess
=
()
=>
{
const
result
=
form
.
getFieldValue
()
props
.
onSubmit
&
props
.
onSubmit
({
Id
:
props
.
template
.
Id
,
...
result
})
form
.
resetFields
()
}
useEffect
(()
=>
{
if
(
option
)
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
'公众号'
))
form
.
setFieldsValue
({
type
:
'公众号'
})
}
},
[
props
])
const
layout
=
{
layout
:
'horizontal'
,
labelCol
:
{
span
:
4
,
},
wrapperCol
:
{
span
:
19
,
},
};
// useEffect(()=>{
const
{
option
}
=
props
;
// },[props.template])
const
onChange
=
(
value
,
option
)
=>
{
form
.
setFieldsValue
({
third_id
:
option
.
code
})
// setTemplateName(option.filter(item => item.Type === value))
}
;
const
onChangeType
=
(
value
)
=>
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
value
))
console
.
log
(
option
.
filter
(
item
=>
item
.
Type
===
value
))
}
const
onChangeType1
=
(
value
)
=>
{
form
.
setFieldsValue
({
third_id
:
value
})
const
[
form
]
=
Form
.
useForm
();
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
templateName
,
setTemplateName
]
=
useState
([]);
const
onSubmit
=
()
=>
{
form
.
submit
();
};
const
onSubmitSuccess
=
()
=>
{
const
result
=
form
.
getFieldValue
()
;
props
.
onSubmit
&
props
.
onSubmit
({
Id
:
props
.
template
.
Id
,
...
result
});
form
.
resetFields
();
};
useEffect
(()
=>
{
if
(
option
)
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
'公众号'
));
form
.
setFieldsValue
({
type
:
'公众号'
,
});
}
},
[
props
]);
const
layout
=
{
layout
:
'horizontal'
,
labelCol
:
{
span
:
4
,
},
wrapperCol
:
{
span
:
19
,
},
};
// useEffect(()=>{
return
(
<
SiteModal
{
...
props
}
title=
"模板添加"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
style=
{
{
top
:
200
,
borderRadius
:
'20px'
}
}
width=
"820px"
destroyOnClose
cancelText=
"取消"
okText=
"确认"
onOk=
{
()
=>
onSubmit
()
}
confirmLoading=
{
loading
}
>
<
div
style=
{
{
width
:
"750px"
,
height
:
"500px"
,
overflowY
:
"scroll"
,
overflowX
:
"hidden"
}
}
>
<
Form
form=
{
form
}
{
...
layout
}
onFinish=
{
onSubmitSuccess
}
>
<
Item
label=
"模板名称"
wrapperCol=
{
{
span
:
17
}
}
labelCol=
{
{
span
:
6
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
Item
label=
""
name=
"name"
rules=
{
[
{
required
:
true
,
message
:
'请输入模板名称'
,
},
]
}
>
<
Input
style=
{
{
width
:
'12rem'
}
}
placeholder=
"请输入模板名称"
/>
</
Item
>
<
Item
label=
"模板类型"
name=
"type"
rules=
{
[
{
required
:
true
,
message
:
'请选择模板类型'
,
},
]
}
>
<
Select
style=
{
{
width
:
'10rem'
}
}
onChange=
{
(
value
)
=>
onChangeType
(
value
)
}
>
<
Select
.
Option
value=
"公众号"
>
公众号
</
Select
.
Option
>
<
Select
.
Option
value=
"短信"
>
短信
</
Select
.
Option
>
<
Select
.
Option
value=
"企业微信"
>
企业微信
</
Select
.
Option
>
</
Select
>
</
Item
>
</
div
>
</
Item
>
{
form
.
getFieldsValue
().
type
!==
'企业微信'
?
<>
<
Item
label=
"请选择第三方模板名称"
wrapperCol=
{
{
span
:
17
}
}
labelCol=
{
{
span
:
6
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
Item
label=
""
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请选择第三方模板名称'
,
},
]
}
>
{
/* <Input placeholder="请输入模板名称" /> */
}
<
Select
placeholder=
"请选择模板名称"
style=
{
{
width
:
'12rem'
}
}
onChange=
{
(
value
,
option
)
=>
onChange
(
value
,
option
)
}
>
{
templateName
&&
templateName
.
length
>
0
&&
templateName
.
map
((
item
,
index
)
=>
(
<
Select
.
Option
value=
{
item
.
Name
}
key=
{
index
}
code=
{
item
.
Code
}
>
{
item
.
Name
}
</
Select
.
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"第三方模板编号"
name=
"third_id"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板编号'
,
},
]
}
>
<
Input
disabled
placeholder=
"请输入第三方模板编号"
/>
</
Item
>
</
div
>
</
Item
>
</>
:
<>
<
Item
label=
"请选择第三方模板名称"
wrapperCol=
{
{
span
:
17
}
}
labelCol=
{
{
span
:
6
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
Item
label=
""
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请选择第三方模板名称'
,
},
]
}
>
<
Select
style=
{
{
width
:
'12rem'
}
}
onChange=
{
(
value
)
=>
onChangeType1
(
value
)
}
placeholder=
"请选择模板名称"
>
<
Select
.
Option
value=
"普通文本"
>
普通文本
</
Select
.
Option
>
<
Select
.
Option
value=
"文字卡片"
>
文字卡片
</
Select
.
Option
>
<
Select
.
Option
value=
"图片消息"
>
图片消息
</
Select
.
Option
>
<
Select
.
Option
value=
"图片"
>
图片
</
Select
.
Option
>
</
Select
>
</
Item
>
<
Item
label=
"企业微信应用id"
labelCol=
{
{
span
:
11
}
}
name=
"weixin"
rules=
{
[
{
required
:
true
,
message
:
'请输入企业微信号'
,
},
]
}
>
<
Input
placeholder=
"请输入企业微信号"
/>
</
Item
>
</
div
>
</
Item
>
</>
}
// },[props.template])
const
onChange
=
(
value
,
option
)
=>
{
form
.
setFieldsValue
({
third_id
:
option
.
code
,
});
// setTemplateName(option.filter(item => item.Type === value))
};
const
onChangeType
=
value
=>
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
value
));
console
.
log
(
option
.
filter
(
item
=>
item
.
Type
===
value
));
};
const
onChangeType1
=
value
=>
{
form
.
setFieldsValue
({
third_id
:
value
,
});
};
return
(
<
SiteModal
{
...
props
}
title=
"模板添加"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
style=
{
{
top
:
200
,
borderRadius
:
'20px'
}
}
width=
"820px"
destroyOnClose
cancelText=
"取消"
okText=
"确认"
onOk=
{
()
=>
onSubmit
()
}
confirmLoading=
{
loading
}
>
<
div
style=
{
{
width
:
'750px'
,
height
:
'500px'
,
overflowY
:
'scroll'
,
overflowX
:
'hidden'
}
}
>
<
Form
form=
{
form
}
{
...
layout
}
onFinish=
{
onSubmitSuccess
}
>
<
Item
label=
"模板名称"
wrapperCol=
{
{
span
:
17
}
}
labelCol=
{
{
span
:
6
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
Item
label=
""
name=
"name"
rules=
{
[
{
required
:
true
,
message
:
'请输入模板名称'
,
},
]
}
>
<
Input
style=
{
{
width
:
'12rem'
}
}
placeholder=
"请输入模板名称"
/>
</
Item
>
<
Item
label=
"模板类型"
name=
"type"
rules=
{
[
{
required
:
true
,
message
:
'请选择模板类型'
,
},
]
}
>
<
Select
style=
{
{
width
:
'10rem'
}
}
onChange=
{
value
=>
onChangeType
(
value
)
}
>
<
Select
.
Option
value=
"公众号"
>
公众号
</
Select
.
Option
>
<
Select
.
Option
value=
"短信"
>
短信
</
Select
.
Option
>
<
Select
.
Option
value=
"企业微信"
>
企业微信
</
Select
.
Option
>
</
Select
>
</
Item
>
</
div
>
</
Item
>
<
Item
label=
"模板参数1.0"
labelCol=
{
{
span
:
6
}
}
name=
"params"
{
form
.
getFieldsValue
().
type
!==
'企业微信'
?
(
<>
<
Item
label=
"请选择第三方模板名称"
wrapperCol=
{
{
span
:
17
}
}
labelCol=
{
{
span
:
6
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
Item
label=
""
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请选择第三方模板名称'
,
},
]
}
>
{
/* <Input placeholder="请输入模板名称" /> */
}
<
Select
placeholder=
"请选择模板名称"
style=
{
{
width
:
'12rem'
}
}
onChange=
{
(
value
,
option
)
=>
onChange
(
value
,
option
)
}
>
<
TextArea
rows=
{
2
}
style=
{
{
width
:
'96%'
}
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
<
Item
label=
"模板参数2.0"
labelCol=
{
{
span
:
6
}
}
name=
"param1"
{
templateName
&&
templateName
.
length
>
0
&&
templateName
.
map
((
item
,
index
)
=>
(
<
Select
.
Option
value=
{
item
.
Name
}
key=
{
index
}
code=
{
item
.
Code
}
>
{
item
.
Name
}
</
Select
.
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"第三方模板编号"
name=
"third_id"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板编号'
,
},
]
}
>
<
Input
disabled
placeholder=
"请输入第三方模板编号"
/>
</
Item
>
</
div
>
</
Item
>
</>
)
:
(
<>
<
Item
label=
"请选择第三方模板名称"
wrapperCol=
{
{
span
:
17
}
}
labelCol=
{
{
span
:
6
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
Item
label=
""
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请选择第三方模板名称'
,
},
]
}
>
<
Select
style=
{
{
width
:
'12rem'
}
}
onChange=
{
value
=>
onChangeType1
(
value
)
}
placeholder=
"请选择模板名称"
>
<
TextArea
rows=
{
2
}
style=
{
{
width
:
'96%'
}
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
<
Item
label=
"参数说明"
name=
"desc"
labelCol=
{
{
span
:
6
}
}
>
<
TextArea
style=
{
{
width
:
'96%'
}
}
rows=
{
4
}
placeholder=
"first: 标题信息|Second: 展示内容|Third: 时间|Four: 备注信息"
/>
</
Item
>
<
Item
label=
"解析规则"
name=
"analysis_params"
labelCol=
{
{
span
:
6
}
}
>
<
TextArea
rows=
{
2
}
style=
{
{
width
:
'96%'
}
}
placeholder=
"param1|param2|param3|param4"
/>
</
Item
>
</
Form
>
</
div
>
<
Select
.
Option
value=
"普通文本"
>
普通文本
</
Select
.
Option
>
<
Select
.
Option
value=
"文字卡片"
>
文字卡片
</
Select
.
Option
>
<
Select
.
Option
value=
"图片消息"
>
图片消息
</
Select
.
Option
>
<
Select
.
Option
value=
"图片"
>
图片
</
Select
.
Option
>
</
Select
>
</
Item
>
<
Item
label=
"企业微信应用id"
labelCol=
{
{
span
:
11
}
}
name=
"weixin"
rules=
{
[
{
required
:
true
,
message
:
'请输入企业微信号'
,
},
]
}
>
<
Input
placeholder=
"请输入企业微信号"
/>
</
Item
>
</
div
>
</
Item
>
</>
)
}
</
SiteModal
>
)
}
export
default
AddModal
;
\ No newline at end of file
<
Item
label=
"模板参数1.0"
labelCol=
{
{
span
:
6
}
}
name=
"params"
>
<
TextArea
rows=
{
2
}
style=
{
{
width
:
'96%'
}
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
<
Item
label=
"模板参数2.0"
labelCol=
{
{
span
:
6
}
}
name=
"param1"
>
<
TextArea
rows=
{
2
}
style=
{
{
width
:
'96%'
}
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
<
Item
label=
"参数说明"
name=
"desc"
labelCol=
{
{
span
:
6
}
}
>
<
TextArea
style=
{
{
width
:
'96%'
}
}
rows=
{
4
}
placeholder=
"first: 标题信息|Second: 展示内容|Third: 时间|Four: 备注信息"
/>
</
Item
>
<
Item
label=
"解析规则"
name=
"analysis_params"
labelCol=
{
{
span
:
6
}
}
>
<
TextArea
rows=
{
2
}
style=
{
{
width
:
'96%'
}
}
placeholder=
"param1|param2|param3|param4"
/>
</
Item
>
</
Form
>
</
div
>
</
SiteModal
>
);
};
export
default
AddModal
;
src/pages/platformCenter/schemeConfig/SchemeConfig.jsx
View file @
d0f77ef8
import
{
Tabs
,
Button
}
from
'antd'
;
import
React
from
'react'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
styles
from
'./SchemeConfig.less'
import
styles
from
'./SchemeConfig.less'
;
import
TileConfig
from
'./TileConfig/TileConfig'
;
import
VectorData
from
'./VectorData/VectorData'
;
import
ProjectMessage
from
'./projectMessage/projectMessage'
;
...
...
@@ -10,32 +10,27 @@ import SolutionConfig from './solutionConfig/solutionConfig';
const
{
TabPane
}
=
Tabs
;
const
SchemeConfig
=
()
=>
{
const
callback
=
()
=>
{};
const
callback
=
()
=>
{
}
return
(
<
PageContainer
>
<
div
className=
{
styles
.
container
}
>
<
Tabs
onChange=
{
callback
}
type=
"card"
>
<
TabPane
tab=
"瓦片数据配置"
key=
"1"
>
<
TileConfig
/>
</
TabPane
>
<
TabPane
tab=
"矢量数据配置"
key=
"2"
>
<
VectorData
/>
</
TabPane
>
<
TabPane
tab=
"方案管理"
key=
"3"
>
<
ProjectMessage
/>
</
TabPane
>
<
TabPane
tab=
"方案配置"
key=
"4"
>
<
SolutionConfig
/>
</
TabPane
>
</
Tabs
>
</
div
>
</
PageContainer
>
)
}
export
default
SchemeConfig
;
\ No newline at end of file
return
(
<
PageContainer
>
<
div
className=
{
styles
.
container
}
>
<
Tabs
onChange=
{
callback
}
type=
"card"
>
<
TabPane
tab=
"瓦片数据配置"
key=
"1"
>
<
TileConfig
/>
</
TabPane
>
<
TabPane
tab=
"矢量数据配置"
key=
"2"
>
<
VectorData
/>
</
TabPane
>
<
TabPane
tab=
"方案管理"
key=
"3"
>
<
ProjectMessage
/>
</
TabPane
>
<
TabPane
tab=
"方案配置"
key=
"4"
>
<
SolutionConfig
/>
</
TabPane
>
</
Tabs
>
</
div
>
</
PageContainer
>
);
};
export
default
SchemeConfig
;
src/pages/platformCenter/schemeConfig/VectorData/AddModal.jsx
View file @
d0f77ef8
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Modal
,
Input
,
Select
,
AutoComplete
,
Button
,
notification
}
from
'antd'
;
import
styles
from
'../SchemeConfig.less'
import
{
GetGISServerMapList
,
publisService
}
from
'@/services/webConfig/api'
;
import
styles
from
'../SchemeConfig.less'
;
import
{
GetGISServerMapList
,
publisService
}
from
'@/services/webConfig/api'
;
const
{
Option
}
=
Select
;
const
AddModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{
},
type
,
formObj
,
visible
,
solutionNames
}
=
props
;
const
{
callBackSubmit
=
()
=>
{
},
type
,
formObj
,
visible
,
solutionNames
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
workSpace
,
setWorkSpace
]
=
useState
(
''
);
const
[
serviceName
,
setServicename
]
=
useState
([{
value
:
'geoserver'
,
item
:
'geoserver'
}]);
const
[
serviceName
,
setServicename
]
=
useState
([
{
value
:
'geoserver'
,
item
:
'geoserver'
,
},
]);
const
[
workList
,
setWorkList
]
=
useState
([]);
const
[
gsIp
,
setGsIp
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -28,18 +26,18 @@ const AddModal = props => {
setLoading
(
true
);
let
obj
=
form
.
getFieldsValue
();
if
(
type
===
'add'
)
{
let
query
=
{
_version
:
9999
,
gsIP
:
obj
.
serviceadress
,
gsPort
:
obj
.
port
,
gsAppName
:
obj
.
servicename
,
gsUser
:
obj
.
user
,
gsWorkspaceName
:
obj
.
workname
,
gsPwd
:
obj
.
password
,
serviceName
:
obj
.
name
,
solution
:
solutionNames
,
}
publisService
(
query
,
{
timeout
:
120000
})
let
query
=
{
_version
:
9999
,
gsIP
:
obj
.
serviceadress
,
gsPort
:
obj
.
port
,
gsAppName
:
obj
.
servicename
,
gsUser
:
obj
.
user
,
gsWorkspaceName
:
obj
.
workname
,
gsPwd
:
obj
.
password
,
serviceName
:
obj
.
name
,
solution
:
solutionNames
,
};
publisService
(
query
,
{
timeout
:
120000
})
.
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
success
)
{
...
...
@@ -48,15 +46,15 @@ const AddModal = props => {
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'新增成功'
,
description
:
'新增成功'
,
});
setWorkList
([])
handlelocalStorage
(
'add'
,
obj
.
serviceadress
,
obj
.
servicename
)
setWorkList
([])
;
handlelocalStorage
(
'add'
,
obj
.
serviceadress
,
obj
.
servicename
);
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'新增失败'
,
description
:
'新增失败'
,
});
}
})
...
...
@@ -64,7 +62,7 @@ const AddModal = props => {
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'新增失败'
,
description
:
'新增失败'
,
});
setLoading
(
false
);
});
...
...
@@ -73,9 +71,7 @@ const AddModal = props => {
});
};
const
onFinish
=
value
=>
{
};
const
onFinish
=
value
=>
{};
useEffect
(()
=>
{
switch
(
type
)
{
case
'add'
:
...
...
@@ -84,12 +80,12 @@ const AddModal = props => {
if
(
localStorageData
)
{
gsIp
=
localStorageData
.
map
(
item
=>
({
value
:
item
.
gsIp
,
item
:
item
.
gsIp
item
:
item
.
gsIp
,
}));
}
setGsIp
(
gsIp
)
let
localIps
=
[
'192.168.12.7'
,
'192.168.19.100'
]
let
port
=
localIps
.
includes
(
gsIp
)
?
8080
:
8088
setGsIp
(
gsIp
)
;
let
localIps
=
[
'192.168.12.7'
,
'192.168.19.100'
]
;
let
port
=
localIps
.
includes
(
gsIp
)
?
8080
:
8088
;
form
.
setFieldsValue
({
servicename
:
serviceName
[
0
].
value
,
port
,
...
formObj
});
break
;
case
'edit'
:
...
...
@@ -103,7 +99,7 @@ const AddModal = props => {
//存储到localstorage
const
handlelocalStorage
=
(
type
,
gsIp
,
gisAppName
)
=>
{
if
(
!
localStorage
)
return
null
;
let
result
=
JSON
.
parse
(
localStorage
.
getItem
(
'metaData'
))
let
result
=
JSON
.
parse
(
localStorage
.
getItem
(
'metaData'
))
;
if
(
type
==
'get'
)
{
return
result
;
}
...
...
@@ -111,22 +107,24 @@ const AddModal = props => {
if
(
!
result
)
result
=
[];
result
.
push
({
gsIp
,
gisAppName
:
[{
value
:
gisAppName
,
item
:
gisAppName
}]
})
localStorage
.
setItem
(
'metaData'
,
JSON
.
stringify
(
result
))
return
gisAppName
:
[
{
value
:
gisAppName
,
item
:
gisAppName
,
},
],
});
localStorage
.
setItem
(
'metaData'
,
JSON
.
stringify
(
result
));
return
;
}
let
data
=
result
.
find
(
item
=>
item
.
gsIp
==
gsIp
)
let
data
=
result
.
find
(
item
=>
item
.
gsIp
==
gsIp
)
;
let
isHasGisAppName
=
data
.
gisAppName
.
find
(
item
=>
item
.
value
==
gisAppName
);
if
(
isHasGisAppName
)
return
;
data
.
gisAppName
.
push
({
value
:
gisAppName
,
item
:
gisAppName
})
localStorage
.
setItem
(
'metaData'
,
JSON
.
stringify
(
result
))
item
:
gisAppName
,
})
;
localStorage
.
setItem
(
'metaData'
,
JSON
.
stringify
(
result
))
;
};
const
layout
=
{
...
...
@@ -139,55 +137,52 @@ const AddModal = props => {
},
};
//选择工作空间
const
selectWorkspace
=
()
=>
{
let
obj
=
form
.
getFieldsValue
();
form
.
validateFields
([
'serviceadress'
,
'port'
,
'servicename'
,
'user'
,
'password'
]).
then
(
validate
=>
{
if
(
validate
)
{
let
query
=
{
GISServerIP
:
obj
.
serviceadress
,
GISServerPort
:
obj
.
port
,
gsAppName
:
obj
.
servicename
,
gsUser
:
obj
.
user
,
gsPwd
:
obj
.
password
,
isGeoServer
:
true
,
_version
:
9999
,
form
.
validateFields
([
'serviceadress'
,
'port'
,
'servicename'
,
'user'
,
'password'
])
.
then
(
validate
=>
{
if
(
validate
)
{
let
query
=
{
GISServerIP
:
obj
.
serviceadress
,
GISServerPort
:
obj
.
port
,
gsAppName
:
obj
.
servicename
,
gsUser
:
obj
.
user
,
gsPwd
:
obj
.
password
,
isGeoServer
:
true
,
_version
:
9999
,
};
GetGISServerMapList
(
query
).
then
(
res
=>
{
if
(
Array
.
isArray
(
res
.
data
))
{
const
defaultValue
=
res
.
data
[
0
]
||
''
;
form
.
setFieldsValue
({
name
:
defaultValue
,
workname
:
defaultValue
});
setWorkList
(
res
.
data
);
setWorkSpace
(
defaultValue
);
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'获取工作空间失败'
,
});
}
});
}
GetGISServerMapList
(
query
).
then
(
res
=>
{
if
(
Array
.
isArray
(
res
.
data
))
{
const
defaultValue
=
res
.
data
[
0
]
||
''
form
.
setFieldsValue
({
name
:
defaultValue
,
workname
:
defaultValue
});
setWorkList
(
res
.
data
)
setWorkSpace
(
defaultValue
)
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'获取工作空间失败'
,
});
}
})
}
})
});
};
//选择工作空间
const
handleWorkspace
=
(
value
)
=>
{
const
handleWorkspace
=
value
=>
{
form
.
setFieldsValue
({
workname
:
value
,
name
:
value
})
setWorkSpace
(
value
)
}
const
selectIp
=
(
value
)
=>
{
let
localIps
=
[
'192.168.12.7'
,
'192.168.19.100'
]
let
port
=
localIps
.
includes
(
value
)
?
8080
:
8088
form
.
setFieldsValue
({
port
,
serviceadress
:
value
});
}
name
:
value
,
});
setWorkSpace
(
value
);
};
const
selectIp
=
value
=>
{
let
localIps
=
[
'192.168.12.7'
,
'192.168.19.100'
];
let
port
=
localIps
.
includes
(
value
)
?
8080
:
8088
;
form
.
setFieldsValue
({
port
,
serviceadress
:
value
});
};
return
(
<
Modal
title=
{
`${type === 'add' ? '元数据发布' : '编辑'}`
}
...
...
@@ -211,11 +206,7 @@ const AddModal = props => {
name=
"serviceadress"
rules=
{
[{
required
:
true
,
message
:
'请选择服务名'
}]
}
>
<
AutoComplete
placeholder=
"请输入GIS服务器地址"
options=
{
gsIp
}
onSelect=
{
selectIp
}
/>
<
AutoComplete
placeholder=
"请输入GIS服务器地址"
options=
{
gsIp
}
onSelect=
{
selectIp
}
/>
</
Item
>
<
Item
label=
"GIS服务器端口"
...
...
@@ -230,10 +221,7 @@ const AddModal = props => {
name=
"servicename"
rules=
{
[{
required
:
true
,
message
:
'请输入GIS服务器名'
}]
}
>
<
AutoComplete
placeholder=
"Email"
options=
{
serviceName
}
/>
<
AutoComplete
placeholder=
"Email"
options=
{
serviceName
}
/>
</
Item
>
<
Item
label=
"用户名称"
...
...
@@ -255,10 +243,25 @@ const AddModal = props => {
rules=
{
[{
required
:
true
,
message
:
'请选择工作空间名称'
}]
}
>
<
div
className=
{
styles
.
imgList
}
>
<
Select
onChange=
{
handleWorkspace
}
value
={
workSpace
}
>
{
workList
.
length
?
workList
.
map
((
item
,
index
)
=>
{
return
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
})
:
''
}
<
Select
onChange=
{
handleWorkspace
}
value=
{
workSpace
}
style=
{
{
width
:
'310px'
}
}
>
{
workList
.
length
?
workList
.
map
((
item
,
index
)
=>
{
return
(
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
);
})
:
''
}
</
Select
>
<
Button
style=
{
{
marginLeft
:
'0.5rem'
}
}
onClick=
{
()
=>
{
selectWorkspace
()
}
}
>
选择工作空间
</
Button
>
<
Button
style=
{
{
marginLeft
:
'0.5rem'
}
}
onClick=
{
()
=>
{
selectWorkspace
();
}
}
>
选择工作空间
</
Button
>
</
div
>
</
Item
>
<
Item
...
...
src/pages/platformCenter/schemeConfig/VectorData/VectorData.jsx
View file @
d0f77ef8
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../SchemeConfig.less'
import
styles
from
'../SchemeConfig.less'
;
import
{
GetVectorService
,
deleteVectorService
,
getSolutionList
,
updatePublishedMetaData
GetVectorService
,
deleteVectorService
,
getSolutionList
,
updatePublishedMetaData
,
}
from
'@/services/webConfig/api'
;
import
AddModal
from
'./AddModal'
import
PreviewModal
from
'./VectorPreviewModal'
import
AddModal
from
'./AddModal'
;
import
PreviewModal
from
'./VectorPreviewModal'
;
const
VectorData
=
props
=>
{
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
tileData
,
setTileData
]
=
useState
([]);
// table表格数据
const
[
visible
,
setVisible
]
=
useState
(
false
);
// 弹窗
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
);
// 预览弹窗
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 更新list
const
[
loading
,
setLoading
]
=
useState
([]);
// 更新状态
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
solutionNames
,
setSolutionNames
]
=
useState
(
''
);
const
[
formObj
,
setFormObj
]
=
useState
({
user
:
'admin'
,
password
:
'geoserver'
});
const
[
currentMetaData
,
setCurrentMetaData
]
=
useState
(
null
)
const
columns
=
[
{
title
:
'服务名'
,
dataIndex
:
'ServiceName'
,
key
:
'ServiceName'
,
align
:
'center'
},
{
title
:
'IP'
,
dataIndex
:
'GISServerIP'
,
key
:
'GISServerIP'
,
align
:
'center'
},
{
title
:
'端口'
,
dataIndex
:
'GISServerPort'
,
key
:
'GISServerPort'
,
align
:
'center'
},
{
title
:
'工程名'
,
dataIndex
:
'GISServerProjectName'
,
key
:
'GISServerProjectName'
,
align
:
'center'
},
{
title
:
'发布时间'
,
dataIndex
:
'publishTime'
,
key
:
'publishTime'
,
align
:
'center'
},
{
title
:
'编辑'
,
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
previewMetaData
(
record
,
index
)
}
>
预览
</
Button
>
<
Button
type=
"primary"
size=
"small"
loading=
{
loading
[
index
]
}
onClick=
{
()
=>
enterLoading
(
record
,
index
)
}
>
更新
</
Button
>
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
Popconfirm
title=
"是否删除该矢量数据?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
delConfirm
(
record
);
}
}
>
<
Button
size=
"small"
danger
>
删除
</
Button
>
</
Popconfirm
>
</
div
>
</
Space
>
),
},
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
tileData
,
setTileData
]
=
useState
([]);
// table表格数据
const
[
visible
,
setVisible
]
=
useState
(
false
);
// 弹窗
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
);
// 预览弹窗
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 更新list
const
[
loading
,
setLoading
]
=
useState
([]);
// 更新状态
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
solutionNames
,
setSolutionNames
]
=
useState
(
''
);
const
[
formObj
,
setFormObj
]
=
useState
({
user
:
'admin'
,
password
:
'geoserver'
});
const
[
currentMetaData
,
setCurrentMetaData
]
=
useState
(
null
);
const
columns
=
[
{
title
:
'服务名'
,
dataIndex
:
'ServiceName'
,
key
:
'ServiceName'
,
align
:
'center'
,
},
{
title
:
'IP'
,
dataIndex
:
'GISServerIP'
,
key
:
'GISServerIP'
,
align
:
'center'
,
},
{
title
:
'端口'
,
dataIndex
:
'GISServerPort'
,
key
:
'GISServerPort'
,
align
:
'center'
,
},
{
title
:
'工程名'
,
dataIndex
:
'GISServerProjectName'
,
key
:
'GISServerProjectName'
,
align
:
'center'
,
},
{
title
:
'发布时间'
,
dataIndex
:
'publishTime'
,
key
:
'publishTime'
,
align
:
'center'
,
},
{
title
:
'编辑'
,
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
previewMetaData
(
record
,
index
)
}
>
预览
</
Button
>
<
Button
type=
"primary"
size=
"small"
loading=
{
loading
[
index
]
}
onClick=
{
()
=>
enterLoading
(
record
,
index
)
}
>
更新
</
Button
>
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
Popconfirm
title=
"是否删除该矢量数据?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
delConfirm
(
record
);
}
}
>
<
Button
size=
"small"
danger
>
删除
</
Button
>
</
Popconfirm
>
</
div
>
</
Space
>
),
},
];
//更新
const
enterLoading
=
(
record
,
index
)
=>
{
const
newLoadings
=
[...
loading
];
newLoadings
[
index
]
=
true
;
setLoading
(
newLoadings
);
let
query
=
{
serviceName
:
record
.
ServiceName
,
_version
:
9999
,
solution
:
solutionNames
,
};
];
//更新
const
enterLoading
=
(
record
,
index
)
=>
{
updatePublishedMetaData
(
query
)
.
then
(
res
=>
{
const
newLoadings
=
[...
loading
];
newLoadings
[
index
]
=
true
setLoading
(
newLoadings
)
let
query
=
{
serviceName
:
record
.
ServiceName
,
_version
:
9999
,
solution
:
solutionNames
newLoadings
[
index
]
=
false
;
setLoading
(
newLoadings
);
if
(
res
.
success
)
{
setFlag
(
flag
+
1
);
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'更新元数据成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'更新元数据失败'
,
});
}
})
.
catch
(
err
=>
{
const
newLoadings
=
[...
loading
];
newLoadings
[
index
]
=
false
;
setLoading
(
newLoadings
);
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'服务无法访问'
,
});
});
};
const
previewMetaData
=
record
=>
{
setCurrentMetaData
(
record
);
setPreviewVisible
(
true
);
};
updatePublishedMetaData
(
query
).
then
(
res
=>
{
const
newLoadings
=
[...
loading
];
newLoadings
[
index
]
=
false
setLoading
(
newLoadings
)
if
(
res
.
success
)
{
setFlag
(
flag
+
1
)
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'更新元数据成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'更新元数据失败'
,
});
};
}).
catch
(
err
=>
{
const
newLoadings
=
[...
loading
];
newLoadings
[
index
]
=
false
setLoading
(
newLoadings
)
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'服务无法访问'
,
});
})
}
const
previewMetaData
=
(
record
)
=>
{
setCurrentMetaData
(
record
)
setPreviewVisible
(
true
)
}
const
solutionName
=
()
=>
{
getSolutionList
({
_version
:
9999
}).
then
(
res
=>
{
setSolutionNames
(
res
.
currentSolution
)
})
}
const
onSubmit
=
prop
=>
{
setVisible
(
false
);
setFlag
(
flag
+
1
)
const
solutionName
=
()
=>
{
getSolutionList
({
_version
:
9999
,
}).
then
(
res
=>
{
setSolutionNames
(
res
.
currentSolution
);
});
};
const
onSubmit
=
prop
=>
{
setVisible
(
false
);
setFlag
(
flag
+
1
);
};
const
delConfirm
=
record
=>
{
console
.
log
(
' record.ServiceName'
,
record
.
ServiceName
.
split
(
'.'
));
let
query
=
{
serviceName
:
record
.
ServiceName
.
split
(
'.'
)[
0
],
_version
:
9999
,
solution
:
solutionNames
,
};
const
delConfirm
=
(
record
)
=>
{
console
.
log
(
' record.ServiceName'
,
record
.
ServiceName
.
split
(
"."
));
let
query
=
{
serviceName
:
record
.
ServiceName
.
split
(
"."
)[
0
],
_version
:
9999
,
solution
:
solutionNames
}
deleteVectorService
(
query
).
then
(
res
=>
{
if
(
res
.
success
)
{
setFlag
(
flag
+
1
)
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除元数据成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除元数据失败'
,
});
};
})
}
const
handleAdd
=
()
=>
{
setType
(
'add'
);
setVisible
(
true
);
}
useEffect
(()
=>
{
renderTile
();
},
[
flag
]);
// 获取瓦片数据配置数据
const
renderTile
=
()
=>
{
setTreeLoading
(
true
);
solutionName
();
GetVectorService
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
let
arr
=
[]
res
.
data
.
VectorList
.
map
(
item
=>
{
arr
.
push
(
false
)
})
setLoading
(
arr
)
setTreeLoading
(
false
);
setTileData
(
res
.
data
.
VectorList
);
}
else
{
setTreeLoading
(
false
);
notification
.
error
({
message
:
'获取失败'
,
description
:
res
.
message
,
});
}
}
)
};
return
(
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
}
}
>
新增
</
Button
>
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
tileData
}
bordered
rowKey=
"CreateTime"
scroll=
{
{
y
:
400
}
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
deleteVectorService
(
query
).
then
(
res
=>
{
if
(
res
.
success
)
{
setFlag
(
flag
+
1
);
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除元数据成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除元数据失败'
,
});
}
});
};
const
handleAdd
=
()
=>
{
setType
(
'add'
);
setVisible
(
true
);
};
useEffect
(()
=>
{
renderTile
();
},
[
flag
]);
// 获取瓦片数据配置数据
const
renderTile
=
()
=>
{
setTreeLoading
(
true
);
solutionName
();
GetVectorService
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
let
arr
=
[];
res
.
data
.
VectorList
.
map
(
item
=>
{
arr
.
push
(
false
);
});
setLoading
(
arr
);
setTreeLoading
(
false
);
setTileData
(
res
.
data
.
VectorList
);
}
else
{
setTreeLoading
(
false
);
notification
.
error
({
message
:
'获取失败'
,
description
:
res
.
message
,
});
}
});
};
}
}
>
</
Table
>
<
AddModal
visible=
{
visible
}
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
formObj=
{
formObj
}
solutionNames=
{
solutionNames
}
/>
<
PreviewModal
visible=
{
previewVisible
}
onCancel=
{
()
=>
setPreviewVisible
(
false
)
}
metaData=
{
currentMetaData
}
/>
</
Spin
>
</>
)
}
export
default
VectorData
\ No newline at end of file
return
(
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
}
}
>
新增
</
Button
>
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
tileData
}
bordered
rowKey=
"CreateTime"
scroll=
{
{
y
:
400
}
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
}
}
/>
<
AddModal
visible=
{
visible
}
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
formObj=
{
formObj
}
solutionNames=
{
solutionNames
}
/>
<
PreviewModal
visible=
{
previewVisible
}
onCancel=
{
()
=>
setPreviewVisible
(
false
)
}
metaData=
{
currentMetaData
}
/>
</
Spin
>
</>
);
};
export
default
VectorData
;
src/pages/platformCenter/videoManager/VideoModal.jsx
View file @
d0f77ef8
...
...
@@ -2,22 +2,30 @@ import React, { useEffect, useState } from 'react';
import
{
Form
,
Modal
,
Row
,
Col
,
Input
,
Select
,
notification
}
from
'antd'
;
const
VideoModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{
},
visible
,
onCancel
,
obj
}
=
props
;
const
{
callBackSubmit
=
()
=>
{
},
visible
,
onCancel
,
obj
}
=
props
;
return
(
<
Modal
visible=
{
visible
}
title=
{
obj
.
Name
}
onCancel=
{
onCancel
}
destroyOnClose
width=
"1000px"
maskClosable=
{
false
}
footer=
{
[]
}
>
<
div
className=
"pp"
>
<
iframe
style=
{
{
border
:
0
,
width
:
"100%"
,
height
:
630
,
}
}
src=
{
window
.
location
.
origin
+
`/web4/video/indexAll.html?ID=${obj.EquipmentCode}&skipCheck=true&name=${obj.Name}&disk=${obj.RecorderName}&site=null`
}
/>
</
div
>
</
Modal
>
)
}
export
default
VideoModal
\ No newline at end of file
return
(
<
Modal
visible=
{
visible
}
title=
{
obj
.
Name
}
onCancel=
{
onCancel
}
destroyOnClose
width=
"1000px"
maskClosable=
{
false
}
footer=
{
[]
}
>
<
div
className=
"pp"
>
<
iframe
style=
{
{
border
:
0
,
width
:
'100%'
,
height
:
630
}
}
src=
{
window
.
location
.
origin
+
`/web4/video/indexAll.html?ID=${obj.EquipmentCode}&skipCheck=true&name=${
obj.Name
}&disk=${obj.RecorderName}&site=null`
}
/>
</
div
>
</
Modal
>
);
};
export
default
VideoModal
;
src/routes/config.js
View file @
d0f77ef8
...
...
@@ -25,7 +25,6 @@ import RoleManage from '@/pages/userCenter/roleManage/RoleManage';
import
SiteManage
from
'../pages/userCenter/siteManage/SiteManage'
;
import
Dictionary
from
'../pages/dataCenter/dictionary'
;
import
Dictionary1
from
'../pages/dataCenter/dictionary1'
;
// import Search from '../pages/dataCenter/search';
import
ServiceLog
from
'../pages/log/serviceLog'
;
import
LoginLog
from
'../pages/log/loginLog'
;
...
...
@@ -381,14 +380,8 @@ export default {
routes
:
[
{
path
:
'/dataCenter/dictionary'
,
name
:
'数据字典1'
,
hideMenu
:
true
,
component
:
Dictionary
,
},
{
path
:
'/dataCenter/dictionary1'
,
name
:
'数据字典'
,
component
:
Dictionary
1
,
component
:
Dictionary
,
},
// {
// path: '/dataCenter/search',
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment