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
f2c099df
Commit
f2c099df
authored
May 10, 2021
by
mayongxin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://g.civnet.cn:8443/ReactWeb5/maintenance
# Conflicts: # .env
parents
c40fbb91
528d33ac
Pipeline
#27300
skipped with stages
Changes
15
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
335 additions
and
178 deletions
+335
-178
policiesIssued.less
src/pages/artificial/policiesIssued/policiesIssued.less
+13
-0
AddModal.jsx
...s/artificial/policiesIssued/predictionConfig/AddModal.jsx
+0
-0
predictionConfig.jsx
...cial/policiesIssued/predictionConfig/predictionConfig.jsx
+97
-68
AddModal.jsx
...ges/artificial/policiesIssued/strategyConfig/AddModal.jsx
+0
-0
strategyConfig.jsx
...tificial/policiesIssued/strategyConfig/strategyConfig.jsx
+73
-44
AddModal.jsx
src/pages/artificial/taskScheduling/AddModal.jsx
+11
-8
taskScheduling.jsx
src/pages/artificial/taskScheduling/taskScheduling.jsx
+55
-33
taskScheduling.less
src/pages/artificial/taskScheduling/taskScheduling.less
+6
-1
SchemeConfig.less
src/pages/platformCenter/schemeConfig/SchemeConfig.less
+7
-2
TileConfig.jsx
...ges/platformCenter/schemeConfig/TileConfig/TileConfig.jsx
+4
-3
VectorData.jsx
...ges/platformCenter/schemeConfig/VectorData/VectorData.jsx
+3
-1
card.jsx
...ormCenter/schemeConfig/projectMessage/components/card.jsx
+1
-1
projectMessage.jsx
...formCenter/schemeConfig/projectMessage/projectMessage.jsx
+3
-1
solutionConfig.jsx
...formCenter/schemeConfig/solutionConfig/solutionConfig.jsx
+13
-16
api.js
src/services/intelligence/api.js
+49
-0
No files found.
src/pages/artificial/policiesIssued/policiesIssued.less
View file @
f2c099df
...
...
@@ -13,6 +13,9 @@
background-color: #ffffff;
color: #000000;
}
.ant-card-body{
padding-bottom: 0 !important;
}
}
.predict{
display: flex;
...
...
@@ -31,4 +34,13 @@
margin-left:1rem;
text-decoration: underline;
width: 8rem;
}
.deviceList{
max-height: 20rem;
overflow-y: scroll;
}
.deleteItem{
position:relative;
right: -100%;
top: -8rem;
}
\ No newline at end of file
src/pages/artificial/policiesIssued/predictionConfig/AddModal.jsx
View file @
f2c099df
This diff is collapsed.
Click to expand it.
src/pages/artificial/policiesIssued/predictionConfig/predictionConfig.jsx
View file @
f2c099df
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
}
from
'antd'
;
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../policiesIssued.less'
import
{
deleteTaskOptions
,
taskOptionsList
,
getIotDeviceType
,
algorithmList
,
getEquipmentInfo
getIotDeviceType
,
getPredictInfo
,
deletePredictOptions
}
from
'@/services/intelligence/api'
;
import
AddModal
from
'./AddModal'
const
VectorData
=
props
=>
{
...
...
@@ -18,56 +18,51 @@ const VectorData = props => {
const
columns
=
[
{
title
:
'序号'
,
dataIndex
:
'serviceName'
,
key
:
'serviceName'
,
align
:
'center'
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
span
>
{
(
index
+
1
)
}
</
span
>
</
Space
>
)
},
{
title
:
'方案名称'
,
dataIndex
:
'
GISServerIP
'
,
key
:
'
GISServerIP
'
,
dataIndex
:
'
PredictName
'
,
key
:
'
PredictName
'
,
align
:
'center'
},
{
title
:
'
算法
名称'
,
dataIndex
:
'
GISServerPort
'
,
key
:
'
GISServerPort
'
,
title
:
'
场景
名称'
,
dataIndex
:
'
SceneName
'
,
key
:
'
SceneName
'
,
align
:
'center'
},
{
title
:
'设备类型'
,
dataIndex
:
'GISServerProjectName'
,
key
:
'GISServerProjectName'
,
align
:
'center'
},
{
title
:
'设备编码'
,
dataIndex
:
'publishTime'
,
key
:
'publishTime'
,
align
:
'center'
},
{
title
:
'指标名称'
,
dataIndex
:
'publishTime'
,
key
:
'publishTime'
,
dataIndex
:
'DeviceType'
,
key
:
'DeviceType'
,
align
:
'center'
},
{
title
:
'预测间隔'
,
dataIndex
:
'publishTime'
,
key
:
'publishTime'
,
align
:
'center'
align
:
'center'
,
render
:
(
record
)
=>
(
<
Space
>
{
record
.
CycleValue
+
record
.
Cycle
}
</
Space
>
)
},
{
title
:
'首次执行时间'
,
dataIndex
:
'
publishTime
'
,
key
:
'
publishTime
'
,
dataIndex
:
'
DateFrom
'
,
key
:
'
DateFrom
'
,
align
:
'center'
},
{
title
:
'描述'
,
dataIndex
:
'
publishTime
'
,
key
:
'
publishTime
'
,
dataIndex
:
'
Remarks
'
,
key
:
'
Remarks
'
,
align
:
'center'
},
{
...
...
@@ -75,10 +70,18 @@ const VectorData = props => {
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
{
changeRecord
(
record
);
}
}
>
编辑
</
Button
>
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
Popconfirm
title=
"是否删除该
矢量数据
?"
title=
"是否删除该
方案
?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
...
...
@@ -97,16 +100,33 @@ const VectorData = props => {
];
const
onSubmit
=
prop
=>
{
setVisible
(
false
);
setFlag
(
flag
+
1
)
setFlag
(
flag
+
1
)
};
const
delConfirm
=
(
record
)
=>
{
deletePredictOptions
(
record
.
ID
).
then
(
res
=>
{
if
(
res
.
errMsg
===
''
)
{
setFlag
(
flag
+
1
)
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
errMsg
,
});
};
})
}
const
handleAdd
=
()
=>
{
setFormObj
({});
setType
(
'add'
);
setVisible
(
true
);
}
...
...
@@ -115,51 +135,59 @@ const VectorData = props => {
},
[
flag
]);
// 获取瓦片数据配置数据
const
renderTile
=
()
=>
{
setTreeLoading
(
true
)
const
getIotDevice
=
getIotDeviceType
()
const
algorithm
=
algorithmList
()
const
taskOption
=
taskOptionsList
()
Promise
.
all
([
getIotDevice
,
algorithm
,
taskOption
]).
then
(
res
=>
{
const
getPredictList
=
getPredictInfo
()
Promise
.
all
([
getIotDevice
,
getPredictList
]).
then
(
res
=>
{
res
[
0
].
getMe
&&
res
[
0
].
getMe
.
length
&&
setDeviceType
(
res
[
0
].
getMe
)
res
[
2
].
getMe
&&
res
[
2
].
getMe
.
length
&&
setTileData
(
res
[
2
].
getMe
)
res
[
1
].
getMe
&&
res
[
1
].
getMe
.
length
&&
setTileData
(
res
[
1
].
getMe
)
setTreeLoading
(
false
)
}).
catch
(
err
=>
{
setTreeLoading
(
false
)
})
};
const
changeRecord
=
(
record
)
=>
{
setType
(
'edit'
);
setFormObj
(
record
);
setVisible
(
true
);
}
return
(
<>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
}
}
>
新增
<
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} 条`
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
tileData
}
bordered
rowKey=
"ID"
scroll=
{
{
y
:
700
}
}
pagination=
{
{
pageSize
:
'10'
,
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
}
}
>
</
Table
>
<
AddModal
visible=
{
visible
}
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
deviceType=
{
deviceType
}
formObj=
{
formObj
}
/>
}
}
>
</
Table
>
<
AddModal
visible=
{
visible
}
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
deviceType=
{
deviceType
}
formObj=
{
formObj
}
/>
</
Spin
>
</>
)
}
export
default
VectorData
\ No newline at end of file
src/pages/artificial/policiesIssued/strategyConfig/AddModal.jsx
View file @
f2c099df
This diff is collapsed.
Click to expand it.
src/pages/artificial/policiesIssued/strategyConfig/strategyConfig.jsx
View file @
f2c099df
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
}
from
'antd'
;
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../policiesIssued.less'
import
{
GetVectorService
,
deleteVectorService
,
getSolutionList
,
updatePublishedMetaData
}
from
'@/services/
webConfig
/api'
;
taskOptionsList
,
getIotDeviceType
,
getStrategyInfo
,
deleteStrategyOptions
}
from
'@/services/
intelligence
/api'
;
import
AddModal
from
'./AddModal'
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
[
tileData
,
setTileData
]
=
useState
([]);
// table表格数据
const
[
visible
,
setVisible
]
=
useState
(
false
);
// 弹窗
const
[
deviceType
,
setDeviceType
]
=
useState
([]);
//设备类型列表
const
columns
=
[
{
title
:
'序号'
,
dataIndex
:
'serviceName'
,
key
:
'serviceName'
,
align
:
'center'
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
span
>
{
(
index
+
1
)
}
</
span
>
</
Space
>
)
},
{
title
:
'
方案
名称'
,
dataIndex
:
'
GISServerIP
'
,
key
:
'
GISServerIP
'
,
title
:
'
策略
名称'
,
dataIndex
:
'
StrategyName
'
,
key
:
'
StrategyName
'
,
align
:
'center'
},
{
title
:
'
方案
类型'
,
dataIndex
:
'
GISServerPort
'
,
key
:
'
GISServerPort
'
,
title
:
'
策略
类型'
,
dataIndex
:
'
StrategyType
'
,
key
:
'
StrategyType
'
,
align
:
'center'
},
{
title
:
'
任务名称
'
,
dataIndex
:
'
GISServerProjectNa
me'
,
key
:
'
GISServerProjectNa
me'
,
title
:
'
创建时间
'
,
dataIndex
:
'
CreateTi
me'
,
key
:
'
CreateTi
me'
,
align
:
'center'
},
{
title
:
'
创建时间
'
,
dataIndex
:
'
publishTim
e'
,
key
:
'
publishTim
e'
,
title
:
'
设备类型
'
,
dataIndex
:
'
DeviceTyp
e'
,
key
:
'
DeviceTyp
e'
,
align
:
'center'
},
{
title
:
'描述'
,
dataIndex
:
'
publishTime
'
,
key
:
'
publishTime
'
,
dataIndex
:
'
StrategyDes
'
,
key
:
'
StrategyDes
'
,
align
:
'center'
},
{
...
...
@@ -58,10 +62,18 @@ const VectorData = props => {
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
{
changeRecord
(
record
);
}
}
>
编辑
</
Button
>
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
Popconfirm
title=
"是否删除该
矢量数据
?"
title=
"是否删除该
方案
?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
...
...
@@ -80,50 +92,63 @@ const VectorData = props => {
];
const
onSubmit
=
prop
=>
{
setVisible
(
false
);
setFlag
(
flag
+
1
)
setFlag
(
flag
+
1
)
};
const
delConfirm
=
(
record
)
=>
{
let
query
=
{
serviceName
:
record
.
serviceName
,
_version
:
9999
,
solution
:
solutionNames
}
deleteVectorService
(
query
).
then
(
res
=>
{
if
(
res
.
success
)
{
deleteStrategyOptions
(
record
.
ID
).
then
(
res
=>
{
if
(
res
.
errMsg
===
''
)
{
setFlag
(
flag
+
1
)
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除
元数据
成功'
,
description
:
'删除成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除元数据失败'
,
description
:
res
.
errMsg
,
});
};
})
}
const
handleAdd
=
()
=>
{
// setType('add');
// setVisible(true);
setFormObj
({});
setType
(
'add'
);
setVisible
(
true
);
}
useEffect
(()
=>
{
renderTile
();
},
[
flag
]);
// 获取瓦片数据配置数据
const
renderTile
=
()
=>
{
setTreeLoading
(
true
)
const
getIotDevice
=
getIotDeviceType
()
const
getStrategy
=
getStrategyInfo
()
Promise
.
all
([
getIotDevice
,
getStrategy
]).
then
(
res
=>
{
console
.
log
(
'res[3].getMe'
,
res
[
1
].
getMe
);
res
[
0
].
getMe
&&
res
[
0
].
getMe
.
length
&&
setDeviceType
(
res
[
0
].
getMe
)
res
[
1
].
getMe
&&
res
[
1
].
getMe
.
length
&&
setTileData
(
res
[
1
].
getMe
)
setTreeLoading
(
false
)
}).
catch
(
err
=>
{
setTreeLoading
(
false
)
})
};
const
changeRecord
=
(
record
)
=>
{
setType
(
'edit'
);
setFormObj
(
record
);
setVisible
(
true
);
}
return
(
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
...
...
@@ -135,9 +160,10 @@ const VectorData = props => {
columns=
{
columns
}
dataSource=
{
tileData
}
bordered
rowKey=
"
createTime
"
scroll=
{
{
y
:
4
00
}
}
rowKey=
"
ID
"
scroll=
{
{
y
:
7
00
}
}
pagination=
{
{
pageSize
:
'10'
,
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
...
...
@@ -149,10 +175,12 @@ const VectorData = props => {
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
deviceType=
{
deviceType
}
formObj=
{
formObj
}
solutionNames=
{
solutionNames
}
/>
</
Spin
>
</>
)
}
export
default
VectorData
\ No newline at end of file
src/pages/artificial/taskScheduling/AddModal.jsx
View file @
f2c099df
...
...
@@ -87,7 +87,9 @@ const AddModal = props => {
const
handleTaskType
=
(
value
)
=>
{
console
.
log
(
value
,
'value'
);
}
const
layout
=
{
layout
:
'horizontal'
,
labelCol
:
{
...
...
@@ -128,18 +130,19 @@ const AddModal = props => {
<
Input
placeholder=
"请输入任务名称"
allowClear
/>
</
Item
>
<
Item
label=
"
方案
类型"
name=
"
t
ype"
label=
"
任务
类型"
name=
"
TaskT
ype"
rules=
{
[{
required
:
true
,
message
:
'请选择类型'
}]
}
>
<
Select
>
<
Select
.
Option
value=
'水龄预测'
>
水龄预测
</
Select
.
Option
>
<
Select
.
Option
value=
'二供泵房'
>
二供泵房
</
Select
.
Option
>
<
Select
onChange=
{
handleTaskType
}
>
<
Select
.
Option
value=
'预测'
>
预测
</
Select
.
Option
>
<
Select
.
Option
value=
'控制'
>
控制
</
Select
.
Option
>
<
Select
.
Option
value=
'http'
>
http
</
Select
.
Option
>
</
Select
>
</
Item
>
<
Item
label=
"方案名称"
name=
"
strategy
"
name=
"
AlgorithmName
"
>
<
Select
>
{
/* {workList.length ? workList.map((item, index) => { return <Option key={index} value={item.name}>{item.name}</Option> }) : ''} */
}
...
...
@@ -157,7 +160,7 @@ const AddModal = props => {
</
Item
>
<
Item
label=
"描述"
name=
"
dec
"
name=
"
Describe
"
>
<
TextArea
placeholder=
"可输入描述信息"
rows=
{
4
}
allowClear
/>
</
Item
>
...
...
src/pages/artificial/taskScheduling/taskScheduling.jsx
View file @
f2c099df
...
...
@@ -18,8 +18,12 @@ const VectorData = props => {
{
title
:
'序号'
,
dataIndex
:
'index'
,
key
:
'serviceName'
,
align
:
'center'
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
span
>
{
(
index
+
1
)
}
</
span
>
</
Space
>
)
},
{
title
:
'场景名称'
,
...
...
@@ -47,8 +51,8 @@ const VectorData = props => {
},
{
title
:
'间隔'
,
dataIndex
:
'
publishTime
'
,
key
:
'
publishTime
'
,
dataIndex
:
'
Interval
'
,
key
:
'
Interval
'
,
align
:
'center'
},
{
...
...
@@ -68,7 +72,15 @@ const VectorData = props => {
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
{
changeRecord
(
record
);
}
}
>
编辑
</
Button
>
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
Popconfirm
title=
"是否删除该矢量数据?"
...
...
@@ -101,7 +113,7 @@ const VectorData = props => {
_version
:
9999
,
solution
:
solutionNames
}
delete
VectorService
(
query
).
then
(
res
=>
{
delete
TaskOptions
(
query
).
then
(
res
=>
{
if
(
res
.
success
)
{
setFlag
(
flag
+
1
)
notification
.
success
({
...
...
@@ -118,6 +130,12 @@ const VectorData = props => {
};
})
}
//编辑任务调度
const
changeRecord
=
(
record
)
=>
{
setType
(
'edit'
);
setFormObj
(
record
);
setVisible
(
true
);
}
const
handleAdd
=
()
=>
{
setType
(
'add'
);
setVisible
(
true
);
...
...
@@ -132,8 +150,9 @@ const VectorData = props => {
const
algorithm
=
algorithmList
()
const
taskOption
=
taskOptionsList
()
Promise
.
all
([
getIotDevice
,
algorithm
,
taskOption
]).
then
(
res
=>
{
console
.
log
(
'res'
,
res
);
res
[
0
].
getMe
&&
res
[
0
].
getMe
.
length
&&
setDeviceType
(
res
[
0
].
getMe
)
res
[
2
].
getMe
&&
res
[
2
].
getMe
.
length
&&
set
DeviceType
(
res
[
2
].
getMe
)
res
[
2
].
getMe
&&
res
[
2
].
getMe
.
length
&&
set
TileData
(
res
[
2
].
getMe
)
setTreeLoading
(
false
)
}).
catch
(
err
=>
{
setTreeLoading
(
false
)
...
...
@@ -143,35 +162,38 @@ const VectorData = props => {
return
(
<>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
}
}
>
新增
<
div
className=
{
styles
.
container
}
>
<
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
}
deviceType=
{
deviceType
}
formObj=
{
formObj
}
solutionNames=
{
solutionNames
}
/>
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
tileData
}
bordered
rowKey=
"createTime"
scroll=
{
{
y
:
400
}
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
}
}
>
</
Table
>
<
AddModal
visible=
{
visible
}
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
deviceType=
{
deviceType
}
formObj=
{
formObj
}
solutionNames=
{
solutionNames
}
/>
</>
)
}
...
...
src/pages/artificial/taskScheduling/taskScheduling.less
View file @
f2c099df
.container{
width: 100%;
height: 100%;
background-color: #ffffff;
}
.predict{
display: flex;
align-items: flex-end;
...
...
@@ -8,7 +13,7 @@
display: flex;
justify-content: flex-end;
width: 100%;
padding:
0 0 2rem
padding:
2rem 1rem 2rem 0;
}
.corn{
cursor: pointer;
...
...
src/pages/platformCenter/schemeConfig/SchemeConfig.less
View file @
f2c099df
.container{
width: 100%;
height: calc(100vh - 100px) ;
background-color: #ffffff;
display: flex;
padding: 0.8rem;
.ant-table-thead tr th {
font-weight: 600;
...
...
@@ -102,6 +103,9 @@
}
.cardItem{
width: 18rem;
height:
18
rem;
height:
26
rem;
margin: 0 2rem;
}
.solutionConfig{
}
\ No newline at end of file
src/pages/platformCenter/schemeConfig/TileConfig/TileConfig.jsx
View file @
f2c099df
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
,
Modal
}
from
'react'
;
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../SchemeConfig.less'
import
{
GetAllConfig
,
...
...
@@ -114,7 +114,6 @@ const TileData = props => {
})
}
const
handleAdd
=
()
=>
{
console
.
log
(
'baseMap'
,
baseMap
);
if
(
baseMap
.
length
){
setType
(
'add'
);
setVisible
(
true
);
...
...
@@ -163,6 +162,7 @@ const TileData = props => {
return
(
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
...
...
@@ -191,6 +191,7 @@ const TileData = props => {
formObj=
{
formObj
}
baseMap
=
{
baseMap
}
/>
</
Spin
>
</>
)
}
...
...
src/pages/platformCenter/schemeConfig/VectorData/VectorData.jsx
View file @
f2c099df
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
}
from
'antd'
;
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../SchemeConfig.less'
import
{
...
...
@@ -194,6 +194,7 @@ const VectorData = props => {
return
(
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
...
...
@@ -227,6 +228,7 @@ const VectorData = props => {
onCancel=
{
()
=>
setPreviewVisible
(
false
)
}
metaData=
{
currentMetaData
}
/>
</
Spin
>
</>
)
}
...
...
src/pages/platformCenter/schemeConfig/projectMessage/components/card.jsx
View file @
f2c099df
...
...
@@ -145,7 +145,7 @@ const CardData = props => {
<
div
className=
{
styles
.
schemeItem
}
><
span
className=
{
styles
.
schemeName
}
>
瓦片
</
span
>
<
Button
className=
{
styles
.
schemeBtn
}
onClick=
{
()
=>
addTile
(
props
.
item
)
}
>
<
PlusOutlined
/>
添加瓦片
</
Button
>
</
div
>
<
div
style=
{
{
overflowY
:
'scroll'
,
height
:
'5.5
rem'
}
}
>
<
div
style=
{
{
overflowY
:
'scroll'
,
maxHeight
:
'11.4
rem'
}
}
>
{
props
.
item
.
baseMap
&&
props
.
item
.
baseMap
.
length
?
props
.
item
.
baseMap
.
map
((
baseMapItem
,
baseindex
)
=>
{
return
<
div
className=
{
styles
.
mapItem
}
key=
{
baseindex
}
>
<
div
className=
{
classnames
({
...
...
src/pages/platformCenter/schemeConfig/projectMessage/projectMessage.jsx
View file @
f2c099df
import
{
Button
}
from
'antd'
;
import
{
Button
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../SchemeConfig.less'
import
{
...
...
@@ -48,6 +48,7 @@ const VectorData = props => {
};
return
(
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
style=
{
{
width
:
'calc(100vw - 265px)'
}
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
...
...
@@ -72,6 +73,7 @@ const VectorData = props => {
formObj=
{
formObj
}
/>
</
div
>
</
Spin
>
</>
)
}
...
...
src/pages/platformCenter/schemeConfig/solutionConfig/solutionConfig.jsx
View file @
f2c099df
...
...
@@ -15,7 +15,6 @@ import AddModal from './AddModal'
const
VectorData
=
props
=>
{
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
schemename
,
setSchemename
]
=
useState
([]);
const
[
initValues
,
setInitValues
]
=
useState
([]);
//角色初始化列表
const
[
record
,
setRecord
]
=
useState
({});
//选中关联角色的方案名
const
[
webCurrent
,
setWebCurrent
]
=
useState
(
0
);
// web列表下标
const
[
handCurrent
,
setHandCurrent
]
=
useState
(
0
);
// hand列表下标
...
...
@@ -25,11 +24,8 @@ const VectorData = props => {
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 更新list
const
[
handStatus
,
setHandStatus
]
=
useState
([]);
// 更新状态
const
[
webStatus
,
setWebStatus
]
=
useState
([]);
// 更新状态
const
[
webIndex
,
setWebIndex
]
=
useState
(
0
);
// web默认选中状态
const
[
handIndex
,
setHandIndex
]
=
useState
(
0
);
// 手持默认选中状态
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
checkLoading
,
setCheckLoading
]
=
useState
(
false
)
const
[
solutionNames
,
setSolutionNames
]
=
useState
(
''
);
const
[
formObj
,
setFormObj
]
=
useState
({
user
:
'admin'
,
password
:
'geoserver'
});
const
columns
=
[
{
...
...
@@ -39,9 +35,9 @@ const VectorData = props => {
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Checkbox
checked=
{
webStatus
[
index
+
webCurrent
*
3
]
}
checked=
{
webStatus
[
index
+
webCurrent
*
5
]
}
onChange=
{
e
=>
{
onChangeCheck
(
e
,
record
,
index
+
webCurrent
*
3
);
onChangeCheck
(
e
,
record
,
index
+
webCurrent
*
5
);
}
}
/>
</
Space
>
...
...
@@ -100,9 +96,9 @@ const VectorData = props => {
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Checkbox
checked=
{
handStatus
[
index
+
handCurrent
*
3
]
}
checked=
{
handStatus
[
index
+
handCurrent
*
5
]
}
onChange=
{
e
=>
{
onChangeHand
(
e
,
record
,
index
+
handCurrent
*
3
);
onChangeHand
(
e
,
record
,
index
+
handCurrent
*
5
);
}
}
/>
</
Space
>
...
...
@@ -167,7 +163,7 @@ const VectorData = props => {
SetServiceConfig
(
query
).
then
(
res
=>
{
if
(
res
.
IsSuccess
)
{
prompt
(
'success'
,
'关联角色成功'
)
setFlag
(
flag
+
1
)
}
else
{
prompt
(
'fail'
,
'关联角色失败'
)
...
...
@@ -175,7 +171,7 @@ const VectorData = props => {
}).
catch
(
err
=>
{
prompt
(
'fail'
,
'网络请求失败'
)
})
setFlag
(
flag
+
1
)
}
...
...
@@ -412,7 +408,7 @@ const VectorData = props => {
},
[
flag
]);
// 获取瓦片数据配置数据
const
renderTile
=
()
=>
{
set
TreeLoading
(
true
);
set
CheckLoading
(
true
)
//查询手持方案
var
schemeConfigQueryRequest
=
GetAllConfig
({
terminalType
:
'phone'
,
...
...
@@ -429,7 +425,6 @@ const VectorData = props => {
res
[
0
].
Result
.
map
((
item
,
index
)
=>
{
if
(
item
.
isDefault
)
{
arr
.
push
(
true
)
setHandIndex
(
index
)
}
else
{
arr
.
push
(
false
)
}
...
...
@@ -446,7 +441,6 @@ const VectorData = props => {
res
[
1
].
Result
.
map
((
item
,
index
)
=>
{
if
(
item
.
type
===
"pipenet"
)
{
arr
.
push
(
true
)
setWebIndex
(
index
)
}
else
{
arr
.
push
(
false
)
}
...
...
@@ -456,6 +450,9 @@ const VectorData = props => {
setWebData
(
res
[
1
].
Result
)
setWebStatus
(
arr
)
}
setCheckLoading
(
false
)
}).
catch
(
e
=>
{
setCheckLoading
(
false
)
})
};
...
...
@@ -465,7 +462,7 @@ const VectorData = props => {
return
(
<>
<
Spin
tip=
"loading..."
spinning=
{
checkLoading
}
>
<
div
>
<
div
className=
{
styles
.
solutionConfig
}
>
<
div
>
<
Divider
orientation=
"left"
><
div
className=
{
styles
.
divider
}
>
Web
<
PlusOutlined
onClick=
{
()
=>
{
addType
(
'add'
)
}
}
...
...
@@ -477,7 +474,7 @@ const VectorData = props => {
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
defaultPageSize
:
3
,
defaultPageSize
:
5
,
onChange
:
(
value
)
=>
{
setWebCurrent
(
value
-
1
)
}
...
...
@@ -500,7 +497,7 @@ const VectorData = props => {
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
defaultPageSize
:
3
,
defaultPageSize
:
10
,
onChange
:
(
value
)
=>
{
setHandCurrent
(
value
-
1
)
}
...
...
src/services/intelligence/api.js
View file @
f2c099df
...
...
@@ -20,6 +20,13 @@ export const algorithmList = () =>
export
const
getEquipmentInfo
=
(
query
)
=>
get
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/AcrossTable/GetEquipmentInfo?equipType=
${
query
}
`
);
//获取指标列表
export
const
getQutaList
=
(
query
)
=>
get
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/AcrossTable/GetQutaList?AcountName=
${
query
.
accountName
}
&&AddrSchemeID=
${
query
.
AddrSchemeID
}
`
);
//获取场景列表
export
const
getSceneNameInfo
=
()
=>
get
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/GetSceneNameInfo`
);
//任务添加
export
const
addTaskOptions
=
(
params
)
=>
...
...
@@ -32,3 +39,44 @@ export const updateTaskOptions = (params) =>
//任务删除
export
const
deleteTaskOptions
=
(
params
)
=>
post
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/DeleteTaskOptions`
,
params
);
//预测列表
export
const
getPredictInfo
=
()
=>
get
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/GetPredictInfo`
);
//预测新增
export
const
addPredictOptions
=
(
params
)
=>
post
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/AddPredictOptions`
,
params
);
//预测编辑
export
const
editPredictOptions
=
(
params
)
=>
post
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/EditPredictOptions`
,
params
);
//预测删除
export
const
deletePredictOptions
=
(
params
)
=>
post
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/DeletePredictOptions?PredictID=
${
params
}
`
);
//策略下发列表
export
const
getStrategyInfo
=
()
=>
get
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/GetStrategyInfo`
);
//策略下发增加
export
const
addStrategyOptions
=
(
params
)
=>
post
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/AddStrategyOptions`
,
params
);
//策略下发编辑
export
const
editStrategyOptions
=
(
params
)
=>
post
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/EditStrategyOptions`
,
params
);
//策略下发删除
export
const
deleteStrategyOptions
=
(
params
)
=>
post
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/DeleteStrategyOptions?StrategyId=
${
params
}
`
);
//获取预测设备
export
const
getPredictDevice
=
(
params
)
=>
get
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/GetPredictDevice?DeviceType=
${
params
}
`
);
//获取预测指标
export
const
getPredictDevicePoint
=
(
params
)
=>
get
(
`
${
CITY_SERVICE
}
/IOTPlatform.svc/WaterAge/GetPredictDevicePoint?DeviceType=
${
params
.
deviceType
}
&DeviceCode=
${
params
.
DeviceCode
}
`
);
\ No newline at end of file
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