Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
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
wisdom-components
Commits
e0be017d
Commit
e0be017d
authored
Apr 12, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 替换组态服务及历史回放修改
parent
71d3bf70
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
HistoryModel.js
...xtend-components/EC_ConfigurationView/src/HistoryModel.js
+10
-1
index.js
.../extend-components/EC_ConfigurationView/src/apis/index.js
+4
-4
index.less
...ges/extend-components/EC_ConfigurationView/src/index.less
+12
-0
No files found.
packages/extend-components/EC_ConfigurationView/src/HistoryModel.js
View file @
e0be017d
...
...
@@ -42,6 +42,7 @@ const ConfigurationView = (props) => {
const
prefixCls
=
getPrefixCls
(
'ec-configuration-view'
);
const
[
isHIModalVisible
,
setIsHIModalVisible
]
=
useState
(
false
);
// 历史曲线模态框
const
[
spinning
,
setSpinning
]
=
useState
(
true
);
// 画板loading
const
[
spinLoad
,
setSpinLoad
]
=
useState
(
false
);
const
[
isEmpty
,
setIsEmpty
]
=
useState
(
false
);
// 画板无数据状态
const
[
description
,
setDescription
]
=
useState
(
''
);
// 画板无数据描述
...
...
@@ -573,6 +574,8 @@ const ConfigurationView = (props) => {
/** ************************************历史数据获取******************************* */
const getHistoryData = async (flag) => {
try {
if (!myDiagram) return false;
setSpinLoad(true);
speed = 0;
const json = JSON.parse(myDiagram.model.toJson());
const jsonCopy = JSON.parse(JSON.stringify(json));
...
...
@@ -618,7 +621,10 @@ const ConfigurationView = (props) => {
});
chartHistoryDataRender(historyData);
if (flag) historyTimeRender();
} catch (err) {}
setSpinLoad(false);
} catch (err) {
setSpinLoad(false);
}
};
/** ****************************************数据去重******************************* */
...
...
@@ -1909,6 +1915,9 @@ const ConfigurationView = (props) => {
<LoadBox spinning={spinning} />
{isEmpty && <Empty theme={'dark'} description={description} />}
</div>
<div className={classNames('configurationLoad')}>
<LoadBox spinning={spinLoad} />
</div>
{/* 历史曲线 */}
{isHIModalVisible && (
<Modal
...
...
packages/extend-components/EC_ConfigurationView/src/apis/index.js
View file @
e0be017d
...
...
@@ -7,7 +7,7 @@ const baseURI = typeof DUMI_TYPE !== 'undefined' && DUMI_TYPE === 'dumi' ? '/api
// 获取画板列表接口
export
function
getSketchPadList
(
params
)
{
return
request
({
url
:
`
${
baseURI
}
/Panda
Core/GCK
/SketchPad/List`
,
url
:
`
${
baseURI
}
/Panda
Monitor/Monitor
/SketchPad/List`
,
method
:
REQUEST_METHOD_GET
,
header
:
{
'content-type'
:
'application/x-www-form-urlencoded'
},
params
,
...
...
@@ -17,7 +17,7 @@ export function getSketchPadList(params) {
// 获取画板JSON
export
function
getSketchPadContent
(
params
)
{
return
request
({
url
:
`
${
baseURI
}
/Panda
Core/GCK
/SketchPad/SketchContent`
,
url
:
`
${
baseURI
}
/Panda
Monitor/Monitor
/SketchPad/SketchContent`
,
method
:
REQUEST_METHOD_GET
,
params
,
});
...
...
@@ -26,7 +26,7 @@ export function getSketchPadContent(params) {
// 获取点表地址信息
export
function
getPointAddress
(
params
)
{
return
request
({
url
:
`
${
baseURI
}
/Panda
Core/GCK
/PointAddress/GetPointAddress`
,
url
:
`
${
baseURI
}
/Panda
Monitor/Monitor
/PointAddress/GetPointAddress`
,
method
:
REQUEST_METHOD_GET
,
params
,
});
...
...
@@ -44,7 +44,7 @@ export function getDictionaryList(params) {
// 获取设备实时数据
export
function
getDeviceRealInfo
(
data
)
{
return
request
({
url
:
`
${
baseURI
}
/Panda
Core/GCK
/Device/DeviceRealInfo`
,
url
:
`
${
baseURI
}
/Panda
Monitor/Monitor
/Device/DeviceRealInfo`
,
method
:
REQUEST_METHOD_POST
,
data
,
});
...
...
packages/extend-components/EC_ConfigurationView/src/index.less
View file @
e0be017d
...
...
@@ -3,6 +3,7 @@
@ec-configuration-view-prefix-cls: ~'@{ant-prefix}-ec-configuration-view';
.@{ec-configuration-view-prefix-cls} {
position: relative;
width: 100%;
height: 100%;
...
...
@@ -271,4 +272,15 @@
outline: none;
}
}
.configurationLoad {
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
}
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