diff --git a/das-dn/cmg/ry.cpp b/das-dn/cmg/ry.cpp index 5efbec3f..4e471b60 100644 --- a/das-dn/cmg/ry.cpp +++ b/das-dn/cmg/ry.cpp @@ -2849,13 +2849,6 @@ bool CRYDevice::publishinitDeviceData(int uid) { if (uid < 0 || uid >= UNIT_NUM) return false; - if ((config.units[uid].state & 0x80) != 0x80) { - return false; - } - if ((config.units[uid].state & 0x40) == 0x40) { //该设备已经发送过初始化 - return false; - } - Json::Value root; Json::Value values; @@ -2882,7 +2875,6 @@ bool CRYDevice::publishinitDeviceData(int uid) root["deviceId"] = static_units[uid].deviceId; root["values"] = values; - config.units[uid].state |= 0x40; return publish_sensor_data("", "initDeviceData", root); } return false; @@ -2919,7 +2911,6 @@ bool CRYDevice::publishAnalogData(int uid) datatime *= 1000; root["dataTime"] = datatime; root["deviceId"] = static_units[uid].deviceId; -// root["isStore"] = config.units[uid].state & 0x20 ? false : true; if (values.size()) { root["values"] = values; @@ -2927,6 +2918,7 @@ bool CRYDevice::publishAnalogData(int uid) if (archiveValues.size()) { root["archiveValues"] = archiveValues; } + return publish_sensor_data("", "analogData", root); } @@ -3019,12 +3011,26 @@ bool CRYDevice::publishdeviceEventData(void) return FALSE; } -void CRYDevice::releaseAllUnits(void) +int CRYDevice::sendMsg(std::string sMessage) { - for (int i = 0; i < UNIT_NUM; i++) { - if ((config.units[i].state & 0x01) != 0x01) continue; - config.units[i].state &= 0xBF; //0x40取反 + if (NULL != m_ws && m_ws->getReadyState() == easywsclient::WebSocket::OPEN) + { + pthread_mutex_lock(&m_SendQueueMutex); + m_SendQueue.push(sMessage); + pthread_mutex_unlock(&m_SendQueueMutex); + + return (int)sMessage.length(); } + return 0; +} + +int CRYDevice::recvMsg(std::string sMessage) +{ + pthread_mutex_lock(&m_RecvQueueMutex); + m_recvMsgQueue.push(sMessage); + pthread_mutex_unlock(&m_RecvQueueMutex); + + return (int)sMessage.length(); } BOOLEAN CRYDevice::ry_init(const char *host, const int port, const char *nodeId, const char *version) @@ -3034,7 +3040,8 @@ BOOLEAN CRYDevice::ry_init(const char *host, const int port, const char *nodeId, snprintf(m_version, sizeof(m_version), "%s", version); m_port = port; - status = 2; //0 - 离线, 1 - 在线, 2 - 未配置 + m_nCurUnit = 0; + m_status = 2; //0 - 离线, 1 - 在线, 2 - 未配置 m_dataAcquisitionReload = false; unitname2service_map.clear(); @@ -3075,7 +3082,7 @@ BOOLEAN CRYDevice::ry_init(const char *host, const int port, const char *nodeId, vLog(LOG_WARN, "系统配置了两个相同的设备ID<%s>,请检查。\n", unit_id.c_str()); } } - status = 1; + m_status = 1; #ifndef USE_NOPOLL_WEBSOCKET char url[560]; @@ -3093,7 +3100,6 @@ BOOLEAN CRYDevice::ry_init(const char *host, const int port, const char *nodeId, snprintf(url, sizeof(url), "/node/%s/%s", m_nodeId, m_version); snprintf(cPort, sizeof(cPort), "%d", m_port); vLog(LOG_DEBUG, "%d here to connect:%s:%s.\n", __LINE__, m_host, cPort); - releaseAllUnits(); conn = nopoll_conn_new(ctx, m_host, cPort, NULL, url, NULL, NULL); g_conn = conn; } @@ -3101,28 +3107,6 @@ BOOLEAN CRYDevice::ry_init(const char *host, const int port, const char *nodeId, return TRUE; } -int CRYDevice::sendMsg(std::string sMessage) -{ - if (NULL != m_ws && m_ws->getReadyState() == easywsclient::WebSocket::OPEN) - { - pthread_mutex_lock(&m_SendQueueMutex); - m_SendQueue.push(sMessage); - pthread_mutex_unlock(&m_SendQueueMutex); - - return (int)sMessage.length(); - } - return 0; -} - -int CRYDevice::recvMsg(std::string sMessage) -{ - pthread_mutex_lock(&m_RecvQueueMutex); - m_recvMsgQueue.push(sMessage); - pthread_mutex_unlock(&m_RecvQueueMutex); - - return (int)sMessage.length(); -} - bool CRYDevice::ry_run(void) { #ifndef USE_NOPOLL_WEBSOCKET @@ -3220,7 +3204,6 @@ bool CRYDevice::ry_run(void) snprintf(url, sizeof(url), "/node/%s/%s", m_nodeId, m_version); snprintf(cPort, sizeof(cPort), "%d", m_port); vLog(LOG_DEBUG, "%d here to connect:%s:%s.\n", __LINE__, m_host, cPort); - releaseAllUnits(); conn = nopoll_conn_new(ctx, m_host, cPort, NULL, url, NULL, NULL); g_conn = conn; last_connect_sec = system32.timers; @@ -3234,19 +3217,30 @@ bool CRYDevice::ry_run(void) } if (sec_changed) { if ((last_sec % 20) == 0) { - heart_beat(status); + heart_beat(m_status); } } publishdeviceEventData(); - for (int i = 0; i < UNIT_NUM; i++) { +// int i = 0; +#if 1 + for (int i = 0; i < UNIT_NUM; i++) + { +#else + i = m_nCurUnit; + m_nCurUnit++; + if (m_nCurUnit >= UNIT_NUM) m_nCurUnit = 0; +#endif if ((config.units[i].state & 0x01) != TRUE) continue; + if (config.units[i].type != MASTER_UNIT) continue; MakeYKFrame(i); MakeYTFrame(i); if (sec_changed) { publishAnalogData(i); publishStateData(i); } +#if 1 } +#endif return m_dataAcquisitionReload; } diff --git a/das-dn/cmg/ry.h b/das-dn/cmg/ry.h index df6dced6..354e9380 100644 --- a/das-dn/cmg/ry.h +++ b/das-dn/cmg/ry.h @@ -119,8 +119,9 @@ private: int msg_count = 0; #endif - DWORD last_connect_sec = 0; - int status; + DWORD last_connect_sec = 0; + int m_status; + int m_nCurUnit; bool m_dataAcquisitionReload = false; diff --git a/das-dn/comm/public.cpp b/das-dn/comm/public.cpp index c5322338..166e494b 100644 --- a/das-dn/comm/public.cpp +++ b/das-dn/comm/public.cpp @@ -2315,25 +2315,11 @@ void* idle_process(void* param) config.units[i].softdog++; if (config.units[i].softdog > UNIT_WATCHDOG_TIME) { config.units[i].softdog = UNIT_WATCHDOG_TIME; - config.units[i].value = SPI_ON; + //config.units[i].value = SPI_ON; + config.units[i].value |= SPI_ON; } else { - config.units[i].value = SPI_OFF; - if ((config.units[i].state & 0x80) != 0x80) { - int j = 0; - for (j = 0; j < config.units[i].yxcount; j++) { - if ((config.units[i].yxs[j].qds & 0x80) == 0x80) break; - } - if (j < config.units[i].yxcount) { - continue; - } - for (j = 0; j < config.units[i].yccount; j++) { - if ((config.units[i].ycs[j].qds & 0x80) == 0x80) break; - } - if (j < config.units[i].yccount) { - continue; - } - config.units[i].state |= 0x80; - } + //config.units[i].value = SPI_OFF; + config.units[i].value &= ~SPI_ON; } } } diff --git a/das-dn/hostadsbf/hostadsbf.cpp b/das-dn/hostadsbf/hostadsbf.cpp index 48b819f8..1a0de13e 100644 --- a/das-dn/hostadsbf/hostadsbf.cpp +++ b/das-dn/hostadsbf/hostadsbf.cpp @@ -408,10 +408,9 @@ static void* ryftp_process(void* param) m_datalen2mbaddr_map.insert(datalen2mbaddrmap::value_type(m_datalen_mbaddr[i].address, i + 1)); } - int len = 0; //struRYDeviceData t_data; FIELDDES fields[1024]; - len = calcFields(fields); + calcFields(fields); //判断是否链接单元 int uid = mbt->GetUnitID(0); //默认只接一个设备 @@ -486,6 +485,7 @@ static void* ryftp_process(void* param) if (result == CURLE_OK) { //成功,处理文件 vLog(LOG_DEBUG, "%s get %s to local memory, with name: %s, and password: %s okay, and file length is: %d.\n", processName, remote, user, password, chunk.size); + config.units[uid].value &= ~0x02; ftpget_retry_count = 0; if (chunk.size <= (int)(sizeof(struRYDeviceData) << 5)) { vLog(LOG_DEBUG, "%s PLC文件生成未完成!\n", processName); @@ -602,6 +602,7 @@ static void* ryftp_process(void* param) mbt->m_iv = 0; mbt->m_currentDirNo = -1; mbt->m_currentFileNo = -1; + config.units[uid].value |= 0x02; // } //此处空闲读取未读的文件 if (mbt->m_bHaveUnReadFile) { @@ -842,6 +843,7 @@ BOOLEAN CHostADSBFProcess::OnPreCreate(int id) //vLog(LOG_DEBUG, "%s local ip is: %s, netid is: %s, remote ip is: %s, and netid is: %s\n", m_pidName.c_str(), m_localIp.c_str(), m_localNetId.c_str(), m_remoteIp.c_str(), m_remoteNetId.c_str()); m_turbine = NULL; + m_bRouteAdded = FALSE; SetLocalAmsNetId(AmsNetId(m_localNetId)); #if 0 m_threadRun = TRUE; @@ -930,15 +932,20 @@ BOOLEAN CHostADSBFProcess::OnTimer(void) } #else //先添加一条路由 - long ret = AddRemoteRoute(m_remoteIp, m_localNetId, m_localIp, std::string("isoftstone"), std::string("admin"), std::string("admin")); - vLog(LOG_DEBUG, "bbb %s add route return value is: %d\n", m_pidName.c_str(), ret); - if (ret != 0) return TRUE; + if (m_bRouteAdded == FALSE) + { + long ret = AddRemoteRoute(m_remoteIp, m_localNetId, m_localIp, std::string("isoftstone"), std::string("admin"), std::string("admin")); + vLog(LOG_DEBUG, "%s add route(%s to %s) return value is: %d\n", m_localIp.c_str(), m_remoteIp.c_str(), m_pidName.c_str(), ret); + if (ret != 0) return TRUE; + } + m_bRouteAdded = TRUE; //添加成功 + vLog(LOG_DEBUG, "%s start to connect(%s:%d)\n", m_pidName.c_str(), m_remoteIp.c_str(), m_remotePort); m_turbine = new AdsDevice{m_remoteIp, AmsNetId(m_remoteNetId), m_remotePort}; const auto state = m_turbine->GetState(); if ((uint16_t)state.ads >= ADSSTATE::ADSSTATE_MAXSTATES || (uint16_t)state.device >= ADSSTATE::ADSSTATE_MAXSTATES) { - vLog(LOG_DEBUG, "read device state error.\n"); + vLog(LOG_DEBUG, "%s read device state error.\n", m_pidName.c_str()); delete m_turbine; m_turbine = NULL; } @@ -955,6 +962,7 @@ BOOLEAN CHostADSBFProcess::OnTimer(void) } } readRealData(); + FeedDog(); // } catch (const AdsException& ex) { // vLog(LOG_ERROR, "%s AdsException message: %s, remote is: %s:%d\n", m_pidName.c_str(), ex.what(), m_remoteIp.c_str(), m_remotePort); // } catch (const std::runtime_error& ex) { @@ -1061,6 +1069,7 @@ BOOLEAN CHostADSBFProcess::readRealData() DWORD nValue = 0; int point; + UnitFeedDog(uid); for (int i = 0; i < MAX_BLOCKF_SIZE;) { //vLog(LOG_DEBUG, "registerAddr is: %d\n", registerAddr); diff --git a/das-dn/hostadsbf/hostadsbf.h b/das-dn/hostadsbf/hostadsbf.h index 2bf22ed9..ed16c27b 100644 --- a/das-dn/hostadsbf/hostadsbf.h +++ b/das-dn/hostadsbf/hostadsbf.h @@ -45,6 +45,7 @@ private: std::string m_remoteNetId; AdsDevice *m_turbine; + BOOLEAN m_bRouteAdded; //路由是否添加成功 int m_total_length; DWORD last_sec; diff --git a/das-dn/hostmodbustcpbf/host_modbus_tcp_bf.cpp b/das-dn/hostmodbustcpbf/host_modbus_tcp_bf.cpp index a0454f3c..ae35dfe2 100644 --- a/das-dn/hostmodbustcpbf/host_modbus_tcp_bf.cpp +++ b/das-dn/hostmodbustcpbf/host_modbus_tcp_bf.cpp @@ -447,11 +447,10 @@ static void* ryftp_process(void* param) m_datalen2mbaddr_map.insert(datalen2mbaddrmap::value_type(m_datalen_mbaddr[i].address, i + 1)); } - int len = 0; //struRYDeviceData t_data; FIELDDES fields[1024]; - len = calcFields(fields); + calcFields(fields); //判断是否链接单元 int uid = mbt->GetUnitID(0); //默认只接一个设备 @@ -525,6 +524,7 @@ static void* ryftp_process(void* param) if (result == CURLE_OK) { //成功,处理文件 vLog(LOG_DEBUG, "%s get %s to local memory, with name: %s, and password: %s okay, and file length is: %d.\n", processName, remote, user, password, chunk.size); + config.units[uid].value &= ~0x02; ftpget_retry_count = 0; if (chunk.size <= (int)(sizeof(struRYDeviceData) << 5)) { vLog(LOG_DEBUG, "%s PLC文件生成未完成!\n", processName); @@ -641,6 +641,7 @@ static void* ryftp_process(void* param) mbt->m_iv = 0; mbt->m_currentDirNo = -1; mbt->m_currentFileNo = -1; + config.units[uid].value |= 0x02; // } //此处空闲读取未读的文件 if (mbt->m_bHaveUnReadFile) { diff --git a/das-dn/rtustatusproc/rtustatus.cpp b/das-dn/rtustatusproc/rtustatus.cpp index 99a4b976..fc3ca81b 100644 --- a/das-dn/rtustatusproc/rtustatus.cpp +++ b/das-dn/rtustatusproc/rtustatus.cpp @@ -52,11 +52,11 @@ BOOLEAN CRTUStatusProcess::OnTimer(void) for (i = 0; i < UNIT_NUM; i++) { //单元状态在idle_process中计算,此处刷新单元状态 - if (GetUnitYX(uid, i + PROCESSES_NUM) != config.units[i].value) + if (GetUnitYX(uid, i + PROCESSES_NUM) != (config.units[i].value & 0x01)) { - SetUnitSOE(uid, i + PROCESSES_NUM, config.units[i].value, system32.now); + SetUnitSOE(uid, i + PROCESSES_NUM, (config.units[i].value & 0x01), system32.now); } - SetUnitYX(uid, i + PROCESSES_NUM, config.units[i].value); //单元通讯中断,设置单元数据无效 + SetUnitYX(uid, i + PROCESSES_NUM, (config.units[i].value & 0x01)); //单元通讯中断,设置单元数据无效 } } UnitFeedDog(uid); diff --git a/das-dn/third_party/AdsLib/AdsDevice.cpp b/das-dn/third_party/AdsLib/AdsDevice.cpp index 40fad4a3..4d3c20fe 100644 --- a/das-dn/third_party/AdsLib/AdsDevice.cpp +++ b/das-dn/third_party/AdsLib/AdsDevice.cpp @@ -33,7 +33,7 @@ AdsDevice::AdsDevice(const std::string& ipV4, AmsNetId amsNetId, uint16_t port) m_LocalPort(new long { OpenLocalPort() }, { CloseLocalPort }), m_Connected(false) { - if(*m_NetId.get() == amsNetId) { + if (*m_NetId.get() == amsNetId) { m_Connected = true; } } @@ -47,6 +47,15 @@ AdsDevice::~AdsDevice() } } +void AdsDevice::DisconnectDevice() +{ + if (m_Connected == true) + { + DisconnectTarget(*m_NetId.get()); + m_Connected = false; + } +} + long AdsDevice::DeleteNotificationHandle(uint32_t handle) const { if (handle) { @@ -239,8 +248,7 @@ AdsHandle AdsDevice::OpenFile(const std::string& filename, const uint32_t flags) long AdsDevice::ReadReqEx2(uint32_t group, uint32_t offset, size_t length, void* buffer, uint32_t* bytesRead) const { - if(m_Connected == false) - return ROUTERERR_HOSTDENY; + if (m_Connected == false) return ROUTERERR_HOSTDENY; if (length > std::numeric_limits::max()) { return ADSERR_DEVICE_INVALIDSIZE; diff --git a/das-dn/third_party/AdsLib/AdsDevice.h b/das-dn/third_party/AdsLib/AdsDevice.h index 8aad1bbf..61e31dbe 100644 --- a/das-dn/third_party/AdsLib/AdsDevice.h +++ b/das-dn/third_party/AdsLib/AdsDevice.h @@ -100,6 +100,7 @@ struct AdsDevice { const AmsAddr m_Addr; bool IsConnected() const { return m_Connected; } + void DisconnectDevice(); private: AdsResource m_LocalPort; long CloseFile(uint32_t handle) const; diff --git a/das-dn/third_party/AdsLib/AdsVariable.h b/das-dn/third_party/AdsLib/AdsVariable.h index ae82b050..fbb48d93 100644 --- a/das-dn/third_party/AdsLib/AdsVariable.h +++ b/das-dn/third_party/AdsLib/AdsVariable.h @@ -63,6 +63,7 @@ struct AdsVariable { if (error || (size != bytesRead)) { LOG_ERROR("AdsVariable read failed: "<< std::dec << error); + ((AdsDevice&)m_Route).DisconnectDevice(); //throw AdsException(error); } } @@ -73,6 +74,7 @@ struct AdsVariable { auto error = m_Route.WriteReqEx(m_IndexGroup, *m_Handle, size, data); if (error) { LOG_ERROR("AdsVariable write failed:" << std::dec << error); + ((AdsDevice&)m_Route).DisconnectDevice(); //throw AdsException(error); } } diff --git a/das-dn/third_party/AdsLib/Sockets.cpp b/das-dn/third_party/AdsLib/Sockets.cpp index 5f3dd79b..3488877b 100644 --- a/das-dn/third_party/AdsLib/Sockets.cpp +++ b/das-dn/third_party/AdsLib/Sockets.cpp @@ -111,8 +111,8 @@ bool IpV4::operator==(const IpV4& ref) const return value == ref.value; } -Socket::Socket(const struct addrinfo* const host, const int type) - : m_WSAInitialized(!InitSocketLibrary()), +Socket::Socket(const struct addrinfo* const host, const int type) : + m_WSAInitialized(!InitSocketLibrary()), m_DestAddr(SOCK_DGRAM == type ? reinterpret_cast(&m_SockAddress) : nullptr), m_DestAddrLen(0), m_LastError(0), diff --git a/das-dn/third_party/AdsLib/Sockets.h b/das-dn/third_party/AdsLib/Sockets.h index 54224905..027fc99c 100644 --- a/das-dn/third_party/AdsLib/Sockets.h +++ b/das-dn/third_party/AdsLib/Sockets.h @@ -50,7 +50,7 @@ struct Socket { bool IsConnectedTo(const struct addrinfo* targetAddresses) const; protected: - bool m_Connected; + bool m_Connected; int m_WSAInitialized; int m_LastError; SOCKET m_Socket; diff --git a/das-dn/third_party/AdsLib/Standalone/AmsConnection.cpp b/das-dn/third_party/AdsLib/Standalone/AmsConnection.cpp index b54e3cb9..31f6c8fb 100644 --- a/das-dn/third_party/AdsLib/Standalone/AmsConnection.cpp +++ b/das-dn/third_party/AdsLib/Standalone/AmsConnection.cpp @@ -153,8 +153,7 @@ AmsResponse* AmsConnection::Write(AmsRequest& request, const AmsAddr srcAddr) long AmsConnection::SendRequest(AmsRequest& request, const uint32_t timeout) { - if(IsConnected() == false) - return -1; + if (IsConnected() == false) return -1; AmsAddr srcAddr; const auto status = router.GetAmsAddr(request.srcPort, &srcAddr); diff --git a/das/src/main/java/com/das/modules/node/service/impl/NodeMessageServiceImpl.java b/das/src/main/java/com/das/modules/node/service/impl/NodeMessageServiceImpl.java index 8dc312f0..daec5399 100644 --- a/das/src/main/java/com/das/modules/node/service/impl/NodeMessageServiceImpl.java +++ b/das/src/main/java/com/das/modules/node/service/impl/NodeMessageServiceImpl.java @@ -238,6 +238,7 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node @Override public void handleData(TerminalMessage data) { JsonNode jsonNode = data.getData(); + log.info("收到消息:{}",data.getData()); String deviceId = jsonNode.get("deviceId").asText(); JsonNode values = jsonNode.get("values"); JsonNode archiveValues = jsonNode.get("archiveValues"); @@ -250,23 +251,30 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node Map lowSpeedValueMap = new HashMap<>(); //数据入redis - Iterator keysHigh = values.fieldNames(); - while (keysHigh.hasNext()) { - String fieldName = keysHigh.next(); - String key = String.format("RT:%s:%s", deviceId, fieldName.toLowerCase()); - keyValueMap.put(key, values.get(fieldName)); + if (values != null){ + Iterator keysHigh = values.fieldNames(); + while (keysHigh.hasNext()) { + String fieldName = keysHigh.next(); + String key = String.format("RT:%s:%s", deviceId, fieldName.toLowerCase()); + keyValueMap.put(key, values.get(fieldName)); + } + log.info("values解析成功"); } - Iterator archiveKeys = archiveValues.fieldNames(); - while (archiveKeys.hasNext()) { - String fieldName = archiveKeys.next(); - String key = String.format("RT:%s:%s", deviceId, fieldName.toLowerCase()); - keyValueMap.put(key, values.get(fieldName)); - if (highKey.contains(fieldName)) { - highSpeedValueMap.put(fieldName, values.get(fieldName)); - } - if (lowKey.contains(fieldName)) { - lowSpeedValueMap.put(fieldName, values.get(fieldName)); + + if (archiveValues != null){ + Iterator archiveKeys = archiveValues.fieldNames(); + while (archiveKeys.hasNext()) { + String fieldName = archiveKeys.next(); + String key = String.format("RT:%s:%s", deviceId, fieldName.toLowerCase()); + keyValueMap.put(key, archiveValues.get(fieldName)); + if (highKey.contains(fieldName)) { + highSpeedValueMap.put(fieldName, archiveValues.get(fieldName)); + } + if (lowKey.contains(fieldName)) { + lowSpeedValueMap.put(fieldName, archiveValues.get(fieldName)); + } } + log.info("archive解析成功"); } //更新td if (!highSpeedValueMap.isEmpty()) { diff --git a/ui/dasadmin/src/views/backend/dashboard.vue b/ui/dasadmin/src/views/backend/dashboard.vue index eab68704..726d2645 100644 --- a/ui/dasadmin/src/views/backend/dashboard.vue +++ b/ui/dasadmin/src/views/backend/dashboard.vue @@ -341,6 +341,23 @@ const currentDayStatus = ref({ }) const deviceCode = ref([]) const FanList = ref([]) +const getRealTimeState = (data: any) => { + if (data.iturbineoperationmode) { + if (data.iturbineoperationmode > 1 && data.iturbineoperationmode < 6) { + return 2 + } + if (data.iturbineoperationmode === 21) { + return 20 + } + return data.iturbineoperationmode + } else if (data.iyplevel === 10) { + return 1110 + } else if (data.gridlostdetected === 1) { + return 1111 + } else if (data.ibplevel === 200) { + return 1112 + } +} const StatusListData = () => { getWindTurbineMatrixData().then((res) => { if (res.code == 200) { @@ -437,6 +454,7 @@ const StatusListData = () => { igenpower: item.attributeMap.igenpower, ikwhthisday: item.attributeMap.ikwhthisday, iturbineoperationmode: state, + processedoperationmode: state, locked: item.attributeMap.locked, irotorspeed: item.attributeMap.irotorspeed, }, diff --git a/ui/dasadmin/src/views/backend/home/windMatrix.vue b/ui/dasadmin/src/views/backend/home/windMatrix.vue index 2b359490..5d0ae852 100644 --- a/ui/dasadmin/src/views/backend/home/windMatrix.vue +++ b/ui/dasadmin/src/views/backend/home/windMatrix.vue @@ -12,24 +12,24 @@ {{ item.name }} - 并网 - 待机 - 启动 - 并网 + 待机 + 启动 + 维护 - 离线 - 限功率运行 - 正常停机 - 离线 + 限功率运行 + 正常停机 + 外部因素导致停机 - 停机 - 解缆状态 - 停机 + 解缆状态 + 电网故障停机 - 安全链停机 @@ -82,7 +82,7 @@ class="control-btn" type="primary" @click="sendCommand('setTurbineFastStart')" - v-if="realTimeData.iturbineoperationmode !== 16" + v-if="realTimeData.processedoperationmode !== 16" >启动 停机 复位 @@ -160,7 +160,7 @@ const contextMenuPos = ref({ y: 0, }) const realTimeData = ref({ - iturbineoperationmode: 1111, + processedoperationmode: 1111, locked: 0, deviceId: '', name:'' @@ -168,7 +168,7 @@ const realTimeData = ref({ const windContextMenu = (event: any,curnodeData) => { contextMenuPos.value.x = event.pageX contextMenuPos.value.y = event.pageY - realTimeData.value.iturbineoperationmode=curnodeData.attributeMap.iturbineoperationmode + realTimeData.value.processedoperationmode=curnodeData.attributeMap.processedoperationmode realTimeData.value.locked=curnodeData.attributeMap.locked realTimeData.value.deviceId=curnodeData.irn realTimeData.value.name=curnodeData.name