Commit 6e3514a8 authored by 李纪文's avatar 李纪文

feat: 组态控制增加首次验证

parent 041e129c
......@@ -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;
}
......
......@@ -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('EGBF00000039');
const [name, setName] = useState('水厂工艺流程段');
const [devices, setDevices] = useState('EQZT00000008');
const [messaged, setMessaged] = useState({
age: '运行监控1',
});
......@@ -59,18 +59,18 @@ export default Demo;
const globalConfig = {
token: 'a1372ef0ce7b4e4884d31cfd99fe92f6',
mqtt_iotIP: '192.168.10.174:8083',
mqtt_iotIP: 'emqttd10.panda-water.cn:443',
mqtt_path: '/mqtt',
mqtt_IsSSL: false,
mqtt_site_code: 'site_dv4034ma',
mqtt_IsSSL: true,
mqtt_site_code: 'site_dc8302ni',
mqtt_mess: {
MessageLevel: '1.0',
TcpIP: '192.168.10.174',
TcpPort: 8083,
site_code: 'site_dv4034ma',
TcpIP: 'emqttd10.panda-water.cn',
TcpPort: 443,
site_code: 'site_dc8302ni',
},
userInfo: {
LocalSite: 'site_dv4034ma',
LocalSite: 'site_dc8302ni',
site: '',
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment