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

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

parent 041e129c
...@@ -501,6 +501,9 @@ const ConfigurationView = (props) => { ...@@ -501,6 +501,9 @@ const ConfigurationView = (props) => {
message.warning(`${guid.tag}控制失败,${controlInfo.message}!`); message.warning(`${guid.tag}控制失败,${controlInfo.message}!`);
} else { } else {
message.success(`${guid.tag}控制下发成功。`); message.success(`${guid.tag}控制下发成功。`);
if (guid?.node && guid?.node?.verify && guid?.node?.isControl === '是') {
myDiagram.model.setDataProperty(guid?.node, 'isVerify', true);
}
} }
delete guidAggre[code]; delete guidAggre[code];
} }
...@@ -1451,6 +1454,7 @@ const ConfigurationView = (props) => { ...@@ -1451,6 +1454,7 @@ const ConfigurationView = (props) => {
guidAggre[guid] = { guidAggre[guid] = {
tag, tag,
code, code,
node,
}; };
const flag = isNumber(value); const flag = isNumber(value);
mqttView && mqttView &&
...@@ -1519,7 +1523,7 @@ const ConfigurationView = (props) => { ...@@ -1519,7 +1523,7 @@ const ConfigurationView = (props) => {
const guid = createGuid(); const guid = createGuid();
setIsModalVisible(false); setIsModalVisible(false);
const ctRule = JSON.parse(node.ctRule); const ctRule = JSON.parse(node.ctRule);
if (node.isControl === '') { if (node.isControl === '' && !node?.isVerify) {
authoMethod(code, tag, node, guid, ctRule[0].val); authoMethod(code, tag, node, guid, ctRule[0].val);
return false; return false;
} }
...@@ -1571,7 +1575,7 @@ const ConfigurationView = (props) => { ...@@ -1571,7 +1575,7 @@ const ConfigurationView = (props) => {
if (hexfrom && hexto) value = hexSwitch(value, hexfrom, hexto); if (hexfrom && hexto) value = hexSwitch(value, hexfrom, hexto);
const guid = createGuid(); const guid = createGuid();
setIsModalVisible(false); setIsModalVisible(false);
if (node.isControl === '') { if (node.isControl === '' && !node?.isVerify) {
authoMethod(code, tag, node, guid, isNumber(value * 1) ? value * 1 : value, '输入控制'); authoMethod(code, tag, node, guid, isNumber(value * 1) ? value * 1 : value, '输入控制');
return false; return false;
} }
...@@ -1591,7 +1595,7 @@ const ConfigurationView = (props) => { ...@@ -1591,7 +1595,7 @@ const ConfigurationView = (props) => {
const moreControlMethod = (code, tag, node, value) => { const moreControlMethod = (code, tag, node, value) => {
const guid = createGuid(); const guid = createGuid();
setIsModalVisible(false); setIsModalVisible(false);
if (node.isControl === '') { if (node.isControl === '' && !node?.isVerify) {
authoMethod(code, tag, node, guid, value); authoMethod(code, tag, node, guid, value);
return false; return false;
} }
......
...@@ -9,8 +9,8 @@ import { Button } from 'antd'; ...@@ -9,8 +9,8 @@ import { Button } from 'antd';
import PandaConfiguration from '../index'; import PandaConfiguration from '../index';
// import PandaConfigurationView from '../../es/index'; // import PandaConfigurationView from '../../es/index';
const Demo = () => { const Demo = () => {
const [name, setName] = useState('泵房报警展示'); const [name, setName] = useState('水厂工艺流程段');
const [devices, setDevices] = useState('EGBF00000039'); const [devices, setDevices] = useState('EQZT00000008');
const [messaged, setMessaged] = useState({ const [messaged, setMessaged] = useState({
age: '运行监控1', age: '运行监控1',
}); });
...@@ -59,18 +59,18 @@ export default Demo; ...@@ -59,18 +59,18 @@ export default Demo;
const globalConfig = { const globalConfig = {
token: 'a1372ef0ce7b4e4884d31cfd99fe92f6', token: 'a1372ef0ce7b4e4884d31cfd99fe92f6',
mqtt_iotIP: '192.168.10.174:8083', mqtt_iotIP: 'emqttd10.panda-water.cn:443',
mqtt_path: '/mqtt', mqtt_path: '/mqtt',
mqtt_IsSSL: false, mqtt_IsSSL: true,
mqtt_site_code: 'site_dv4034ma', mqtt_site_code: 'site_dc8302ni',
mqtt_mess: { mqtt_mess: {
MessageLevel: '1.0', MessageLevel: '1.0',
TcpIP: '192.168.10.174', TcpIP: 'emqttd10.panda-water.cn',
TcpPort: 8083, TcpPort: 443,
site_code: 'site_dv4034ma', site_code: 'site_dc8302ni',
}, },
userInfo: { userInfo: {
LocalSite: 'site_dv4034ma', LocalSite: 'site_dc8302ni',
site: '', 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