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
6e3514a8
Commit
6e3514a8
authored
Mar 18, 2025
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 组态控制增加首次验证
parent
041e129c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
RealModel.js
...s/extend-components/EC_ConfigurationView/src/RealModel.js
+7
-3
Basic.tsx
...xtend-components/EC_ConfigurationView/src/demos/Basic.tsx
+9
-9
No files found.
packages/extend-components/EC_ConfigurationView/src/RealModel.js
View file @
6e3514a8
...
...
@@ -501,6 +501,9 @@ const ConfigurationView = (props) => {
message
.
warning
(
`
${
guid
.
tag
}
控制失败,
${
controlInfo
.
message
}
!`
);
}
else
{
message
.
success
(
`
${
guid
.
tag
}
控制下发成功。`
);
if
(
guid
?.
node
&&
guid
?.
node
?.
verify
&&
guid
?.
node
?.
isControl
===
'是'
)
{
myDiagram
.
model
.
setDataProperty
(
guid
?.
node
,
'isVerify'
,
true
);
}
}
delete
guidAggre
[
code
];
}
...
...
@@ -1451,6 +1454,7 @@ const ConfigurationView = (props) => {
guidAggre[guid] = {
tag,
code,
node,
};
const flag = isNumber(value);
mqttView &&
...
...
@@ -1519,7 +1523,7 @@ const ConfigurationView = (props) => {
const guid = createGuid();
setIsModalVisible(false);
const ctRule = JSON.parse(node.ctRule);
if (node.isControl === '
是
') {
if (node.isControl === '
是
'
&& !node?.isVerify
) {
authoMethod(code, tag, node, guid, ctRule[0].val);
return false;
}
...
...
@@ -1571,7 +1575,7 @@ const ConfigurationView = (props) => {
if (hexfrom && hexto) value = hexSwitch(value, hexfrom, hexto);
const guid = createGuid();
setIsModalVisible(false);
if (node.isControl === '
是
') {
if (node.isControl === '
是
'
&& !node?.isVerify
) {
authoMethod(code, tag, node, guid, isNumber(value * 1) ? value * 1 : value, '
输入控制
');
return false;
}
...
...
@@ -1591,7 +1595,7 @@ const ConfigurationView = (props) => {
const moreControlMethod = (code, tag, node, value) => {
const guid = createGuid();
setIsModalVisible(false);
if (node.isControl === '
是
') {
if (node.isControl === '
是
'
&& !node?.isVerify
) {
authoMethod(code, tag, node, guid, value);
return false;
}
...
...
packages/extend-components/EC_ConfigurationView/src/demos/Basic.tsx
View file @
6e3514a8
...
...
@@ -9,8 +9,8 @@ import { Button } from 'antd';
import
PandaConfiguration
from
'../index'
;
// import PandaConfigurationView from '../../es/index';
const
Demo
=
()
=>
{
const
[
name
,
setName
]
=
useState
(
'
泵房报警展示
'
);
const
[
devices
,
setDevices
]
=
useState
(
'E
GBF00000039
'
);
const
[
name
,
setName
]
=
useState
(
'
水厂工艺流程段
'
);
const
[
devices
,
setDevices
]
=
useState
(
'E
QZT00000008
'
);
const
[
messaged
,
setMessaged
]
=
useState
({
age
:
'运行监控1'
,
});
...
...
@@ -59,18 +59,18 @@ export default Demo;
const
globalConfig
=
{
token
:
'a1372ef0ce7b4e4884d31cfd99fe92f6'
,
mqtt_iotIP
:
'
192.168.10.174:808
3'
,
mqtt_iotIP
:
'
emqttd10.panda-water.cn:44
3'
,
mqtt_path
:
'/mqtt'
,
mqtt_IsSSL
:
fals
e
,
mqtt_site_code
:
'site_d
v4034ma
'
,
mqtt_IsSSL
:
tru
e
,
mqtt_site_code
:
'site_d
c8302ni
'
,
mqtt_mess
:
{
MessageLevel
:
'1.0'
,
TcpIP
:
'
192.168.10.174
'
,
TcpPort
:
808
3
,
site_code
:
'site_d
v4034ma
'
,
TcpIP
:
'
emqttd10.panda-water.cn
'
,
TcpPort
:
44
3
,
site_code
:
'site_d
c8302ni
'
,
},
userInfo
:
{
LocalSite
:
'site_d
v4034ma
'
,
LocalSite
:
'site_d
c8302ni
'
,
site
:
''
,
},
};
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