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
871cc321
Commit
871cc321
authored
Apr 06, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 组态优化
parent
3b73669f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
63 deletions
+36
-63
HistoryModel.js
...xtend-components/EC_ConfigurationView/src/HistoryModel.js
+3
-32
RealModel.js
...s/extend-components/EC_ConfigurationView/src/RealModel.js
+3
-31
utils.js
...es/extend-components/EC_ConfigurationView/src/js/utils.js
+30
-0
No files found.
packages/extend-components/EC_ConfigurationView/src/HistoryModel.js
View file @
871cc321
...
...
@@ -13,7 +13,7 @@ import TopRotatingTool from './js/RotatingTool';
import
BarLink
from
'./js/BarLink'
;
import
WaterFlowControlView
from
'./js/WaterFlowControlView'
;
import
{
getSketchPadList
,
getSketchPadContent
,
getPointAddress
,
getHistoryInfo
}
from
'./apis'
;
import
{
deepCopy
,
hexToRgba
,
textStyle
,
querySkipUrl
,
isJson
}
from
'./js/utils'
;
import
{
deepCopy
,
hexToRgba
,
textStyle
,
querySkipUrl
,
isJson
,
stationData
}
from
'./js/utils'
;
import
'./index.less'
;
const
goJS
=
go
.
GraphObject
.
make
;
...
...
@@ -37,35 +37,6 @@ let historyParams = {};
const
waterFlow
=
new
WaterFlowControlView
();
const
StationList
=
[
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
,
];
const
ConfigurationView
=
(
props
)
=>
{
const
{
getPrefixCls
}
=
useContext
(
ConfigProvider
.
ConfigContext
);
const
prefixCls
=
getPrefixCls
(
'ec-configuration-view'
);
...
...
@@ -108,9 +79,9 @@ const ConfigurationView = (props) => {
const
round
=
parseInt
(
i
/
26
);
const
remain
=
i
%
26
;
if
(
round
)
{
stationList
.
push
(
StationList
[
remain
]
+
round
);
stationList
.
push
(
stationData
[
remain
]
+
round
);
}
else
{
stationList
.
push
(
StationList
[
remain
]);
stationList
.
push
(
stationData
[
remain
]);
}
}
getDiagramJson
(
data
[
0
],
siteInfo
);
...
...
packages/extend-components/EC_ConfigurationView/src/RealModel.js
View file @
871cc321
...
...
@@ -34,6 +34,7 @@ import {
textStyle
,
querySkipUrl
,
isJson
,
stationData
,
}
from
'./js/utils'
;
import
'./index.less'
;
...
...
@@ -52,35 +53,6 @@ let twoID = '';
const
waterFlow
=
new
WaterFlowControlView
();
const
StationList
=
[
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
,
];
const
ConfigurationView
=
(
props
)
=>
{
let
myDiagram
=
null
;
let
mqttView
=
null
;
...
...
@@ -136,9 +108,9 @@ const ConfigurationView = (props) => {
const
round
=
parseInt
(
i
/
26
);
const
remain
=
i
%
26
;
if
(
round
)
{
stationList
.
push
(
StationList
[
remain
]
+
round
);
stationList
.
push
(
stationData
[
remain
]
+
round
);
}
else
{
stationList
.
push
(
StationList
[
remain
]);
stationList
.
push
(
stationData
[
remain
]);
}
}
getDiagramJson
(
data
[
0
],
siteInfo
);
...
...
packages/extend-components/EC_ConfigurationView/src/js/utils.js
View file @
871cc321
...
...
@@ -119,3 +119,33 @@ export const isJson = (text) => {
return
false
;
}
};
// 站点字母
export
const
stationData
=
[
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
,
];
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