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
76d6ebb1
Commit
76d6ebb1
authored
Jun 09, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 组态增加动画及mqtt增加_site
parent
7e59f631
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
index.js
packages/base-components/MqttView/src/index.js
+6
-1
HistoryModel.js
...xtend-components/EC_ConfigurationView/src/HistoryModel.js
+8
-0
RealModel.js
...s/extend-components/EC_ConfigurationView/src/RealModel.js
+8
-0
No files found.
packages/base-components/MqttView/src/index.js
View file @
76d6ebb1
...
@@ -26,7 +26,12 @@ class MqttView {
...
@@ -26,7 +26,12 @@ class MqttView {
userName
=
'admin'
,
userName
=
'admin'
,
password
=
'public'
;
password
=
'public'
;
this
.
saveWaCount
=
0
;
this
.
saveWaCount
=
0
;
this
.
saveWaClient
=
new
MqttClient
.
Client
(
hostname
,
port
,
path
,
clientId
);
this
.
saveWaClient
=
new
MqttClient
.
Client
(
hostname
,
port
,
`
${
path
}
?_site=
${
this
.
siteCode
}
`
,
clientId
,
);
this
.
saveWaOptions
=
{
this
.
saveWaOptions
=
{
invocationContext
:
{
invocationContext
:
{
host
:
hostname
,
host
:
hostname
,
...
...
packages/extend-components/EC_ConfigurationView/src/HistoryModel.js
View file @
76d6ebb1
...
@@ -173,6 +173,8 @@ const ConfigurationView = (props) => {
...
@@ -173,6 +173,8 @@ const ConfigurationView = (props) => {
break
;
break
;
case
'valCase'
:
// 实时值模型
case
'valCase'
:
// 实时值模型
const
division
=
node
.
division
||
false
;
const
division
=
node
.
division
||
false
;
// 动画翻转
myDiagram
.
model
.
setDataProperty
(
node
,
'flip'
,
go
.
GraphObject
.
FlipHorizontal
);
if
(
node
.
shType
===
'值显示'
)
{
if
(
node
.
shType
===
'值显示'
)
{
myDiagram
.
model
.
setDataProperty
(
myDiagram
.
model
.
setDataProperty
(
node
,
node
,
...
@@ -186,6 +188,10 @@ const ConfigurationView = (props) => {
...
@@ -186,6 +188,10 @@ const ConfigurationView = (props) => {
division
?
realVal
.
toLocaleString
()
:
realVal
,
division
?
realVal
.
toLocaleString
()
:
realVal
,
);
);
}
}
// 动画还原
myTimeout
(()
=>
{
myDiagram
.
model
.
setDataProperty
(
node
,
'flip'
,
go
.
GraphObject
.
None
);
},
100
);
if
(
node
.
stateName
)
return
false
;
if
(
node
.
stateName
)
return
false
;
shRule
=
ruleOperation
(
node
,
realVal
);
shRule
=
ruleOperation
(
node
,
realVal
);
myDiagram
.
model
.
setDataProperty
(
myDiagram
.
model
.
setDataProperty
(
...
@@ -1565,6 +1571,7 @@ const ConfigurationView = (props) => {
...
@@ -1565,6 +1571,7 @@ const ConfigurationView = (props) => {
editable: true,
editable: true,
font: 'bold 12px Helvetica, Arial, sans-serif',
font: 'bold 12px Helvetica, Arial, sans-serif',
stroke: '#454545',
stroke: '#454545',
flip: go.GraphObject.None,
},
},
new go.Binding('text', 'showVal'),
new go.Binding('text', 'showVal'),
new go.Binding('font', 'fontStyle'),
new go.Binding('font', 'fontStyle'),
...
@@ -1572,6 +1579,7 @@ const ConfigurationView = (props) => {
...
@@ -1572,6 +1579,7 @@ const ConfigurationView = (props) => {
new go.Binding('textAlign', 'fontAlign'),
new go.Binding('textAlign', 'fontAlign'),
new go.Binding('maxSize', 'textSize'),
new go.Binding('maxSize', 'textSize'),
new go.Binding('minSize', 'textSize'),
new go.Binding('minSize', 'textSize'),
new go.Binding('flip', 'flip'),
),
),
{
{
click(e, node) {
click(e, node) {
...
...
packages/extend-components/EC_ConfigurationView/src/RealModel.js
View file @
76d6ebb1
...
@@ -213,6 +213,8 @@ const ConfigurationView = (props) => {
...
@@ -213,6 +213,8 @@ const ConfigurationView = (props) => {
break
;
break
;
case
'valCase'
:
// 实时值模型
case
'valCase'
:
// 实时值模型
const
division
=
node
.
division
||
false
;
const
division
=
node
.
division
||
false
;
// 动画翻转
myDiagram
.
model
.
setDataProperty
(
node
,
'flip'
,
go
.
GraphObject
.
FlipHorizontal
);
if
(
node
.
shType
===
'值显示'
)
{
if
(
node
.
shType
===
'值显示'
)
{
myDiagram
.
model
.
setDataProperty
(
myDiagram
.
model
.
setDataProperty
(
node
,
node
,
...
@@ -226,6 +228,10 @@ const ConfigurationView = (props) => {
...
@@ -226,6 +228,10 @@ const ConfigurationView = (props) => {
division
?
realVal
.
toLocaleString
()
:
realVal
,
division
?
realVal
.
toLocaleString
()
:
realVal
,
);
);
}
}
// 动画还原
myTimeout
(()
=>
{
myDiagram
.
model
.
setDataProperty
(
node
,
'flip'
,
go
.
GraphObject
.
None
);
},
100
);
// 颜色规则
// 颜色规则
if
(
node
.
stateName
)
return
false
;
if
(
node
.
stateName
)
return
false
;
shRule
=
ruleOperation
(
node
,
realVal
);
shRule
=
ruleOperation
(
node
,
realVal
);
...
@@ -2113,6 +2119,7 @@ const ConfigurationView = (props) => {
...
@@ -2113,6 +2119,7 @@ const ConfigurationView = (props) => {
editable: true,
editable: true,
font: 'bold 12px Helvetica, Arial, sans-serif',
font: 'bold 12px Helvetica, Arial, sans-serif',
stroke: '#454545',
stroke: '#454545',
flip: go.GraphObject.None,
},
},
new go.Binding('text', 'showVal'),
new go.Binding('text', 'showVal'),
new go.Binding('font', 'fontStyle'),
new go.Binding('font', 'fontStyle'),
...
@@ -2120,6 +2127,7 @@ const ConfigurationView = (props) => {
...
@@ -2120,6 +2127,7 @@ const ConfigurationView = (props) => {
new go.Binding('textAlign', 'fontAlign'),
new go.Binding('textAlign', 'fontAlign'),
new go.Binding('maxSize', 'textSize'),
new go.Binding('maxSize', 'textSize'),
new go.Binding('minSize', 'textSize'),
new go.Binding('minSize', 'textSize'),
new go.Binding('flip', 'flip'),
),
),
{
{
click(e, node) {
click(e, node) {
...
...
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