Merge branch 'main' of https://git.jsspisoft.com/ry-das
38
Jenkinsfile
vendored
@ -1,15 +1,17 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
parameters {
|
parameters {
|
||||||
choice choices: ['all', 'ui', 'service'], description: 'all - 前端和后端 ; ui - 仅发版前端 ; service - 仅发版后端', name: 'publish_type'
|
choice choices: ['all', 'ui', 'dn', 'service'], description: 'all - 前端和后端 ; ui - 仅发版前端 ; dn - 采集程序 service - 仅发版后端', name: 'publish_type'
|
||||||
}
|
}
|
||||||
agent any
|
agent none
|
||||||
stages {
|
stages {
|
||||||
stage('拉取源码') {
|
stage('拉取源码') {
|
||||||
|
agent any
|
||||||
steps {
|
steps {
|
||||||
checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[credentialsId: 'd62224c5-69cf-474a-8845-c2c2bbe1fc00', url: 'https://git.jsspisoft.com/ry-das.git']])
|
checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[credentialsId: 'd62224c5-69cf-474a-8845-c2c2bbe1fc00', url: 'https://git.jsspisoft.com/ry-das.git']])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('编译UI') {
|
stage('编译UI') {
|
||||||
|
agent any
|
||||||
when {
|
when {
|
||||||
expression { params.publish_type == "ui" || params.publish_type == "all" }
|
expression { params.publish_type == "ui" || params.publish_type == "all" }
|
||||||
}
|
}
|
||||||
@ -23,6 +25,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('编译后端') {
|
stage('编译后端') {
|
||||||
|
agent any
|
||||||
when {
|
when {
|
||||||
expression { params.publish_type == "service" || params.publish_type == "all" }
|
expression { params.publish_type == "service" || params.publish_type == "all" }
|
||||||
}
|
}
|
||||||
@ -34,8 +37,24 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('编译采集程序') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'docker.jsspisoft.com/common/openeuler:24.03-builder'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
when {
|
||||||
|
expression { params.publish_type == "dn" || params.publish_type == "all" }
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
dir("$WORKSPACE/das-dn") {
|
||||||
|
sh 'cmake --preset default'
|
||||||
|
sh 'cmake --build build'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('发版前端') {
|
stage('发版前端') {
|
||||||
|
agent any
|
||||||
when {
|
when {
|
||||||
expression { params.publish_type == "ui" || params.publish_type == "all" }
|
expression { params.publish_type == "ui" || params.publish_type == "all" }
|
||||||
}
|
}
|
||||||
@ -46,6 +65,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('发版后端') {
|
stage('发版后端') {
|
||||||
|
agent any
|
||||||
when {
|
when {
|
||||||
expression { params.publish_type == "service" || params.publish_type == "all" }
|
expression { params.publish_type == "service" || params.publish_type == "all" }
|
||||||
}
|
}
|
||||||
@ -56,5 +76,17 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('发版采集程序') {
|
||||||
|
agent any
|
||||||
|
when {
|
||||||
|
expression { params.publish_type == "dn" || params.publish_type == "all" }
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
dir("$WORKSPACE/das-dn") {
|
||||||
|
sh 'sudo rsync -av build/application root@192.168.109.187:/das/app/das-dn/bin/'
|
||||||
|
sh 'sudo ssh -t root@192.168.109.187 systemctl restart das-dn'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,6 +11,8 @@ public class DeviceEventInfo {
|
|||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long eventId;
|
private Long eventId;
|
||||||
|
|
||||||
|
private String attributeCode;
|
||||||
|
|
||||||
private Integer eventType;
|
private Integer eventType;
|
||||||
|
|
||||||
private Integer eventLevel;
|
private Integer eventLevel;
|
||||||
|
@ -255,7 +255,7 @@ public class TDEngineService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//初始化event_info
|
//初始化event_info
|
||||||
String eventInfo = "create stable IF NOT EXISTS event_info (event_time timestamp,event_id bigint primary key,event_type tinyint,event_level tinyint,event_text varchar(256),confirmed tinyint,confirm_account varchar(32),confirm_time timestamp) tags (device_id bigint,device_code varchar(64),device_name varchar(192))";
|
String eventInfo = "create stable IF NOT EXISTS event_info (event_time timestamp,event_id bigint primary key,attributecode varchar(64),event_type tinyint,event_level tinyint,event_text varchar(256),confirmed tinyint,confirm_account varchar(32),confirm_time timestamp) tags (device_id bigint,device_code varchar(64),device_name varchar(192))";
|
||||||
try {
|
try {
|
||||||
pstmt.executeUpdate(eventInfo);
|
pstmt.executeUpdate(eventInfo);
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
@ -399,7 +399,9 @@ public class TDEngineService {
|
|||||||
sb.append(dv.getEventTime());
|
sb.append(dv.getEventTime());
|
||||||
sb.append(",");
|
sb.append(",");
|
||||||
sb.append(dv.getEventId());
|
sb.append(dv.getEventId());
|
||||||
sb.append(",");
|
sb.append(",'");
|
||||||
|
sb.append(dv.getAttributeCode());
|
||||||
|
sb.append("',");
|
||||||
sb.append(dv.getEventType());
|
sb.append(dv.getEventType());
|
||||||
sb.append(",");
|
sb.append(",");
|
||||||
sb.append(dv.getEventLevel());
|
sb.append(dv.getEventLevel());
|
||||||
@ -417,7 +419,7 @@ public class TDEngineService {
|
|||||||
pstmt.executeUpdate(sb.toString());
|
pstmt.executeUpdate(sb.toString());
|
||||||
log.info("告警信息入库:{}",sb.toString());
|
log.info("告警信息入库:{}",sb.toString());
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
log.error("save yc error", ex);
|
log.error("save deviceEvent error", ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
|
@ -218,7 +218,7 @@ public class DataServiceImpl implements DataService {
|
|||||||
Map<String, String> HighModelFieldList = allIotModelField.stream().filter(field -> field.getHighSpeed() == 1 && field.getAttributeType() != 199).collect(Collectors.toMap(SysIotModelField::getAttributeCode, SysIotModelField::getDataType, (value1, value2) -> value1));
|
Map<String, String> HighModelFieldList = allIotModelField.stream().filter(field -> field.getHighSpeed() == 1 && field.getAttributeType() != 199).collect(Collectors.toMap(SysIotModelField::getAttributeCode, SysIotModelField::getDataType, (value1, value2) -> value1));
|
||||||
Map<String, String> calculateFieldList = allIotModelField.stream().filter(field -> field.getAttributeType() == 199).collect(Collectors.toMap(SysIotModelField::getAttributeCode, SysIotModelField::getDataType, (value1, value2) -> value1));
|
Map<String, String> calculateFieldList = allIotModelField.stream().filter(field -> field.getAttributeType() == 199).collect(Collectors.toMap(SysIotModelField::getAttributeCode, SysIotModelField::getDataType, (value1, value2) -> value1));
|
||||||
Map<String, String> fieldCodeNameList = allIotModelField.stream().collect(Collectors.toMap(SysIotModelField::getAttributeCode, SysIotModelField::getAttributeName, (value1, value2) -> value1));
|
Map<String, String> fieldCodeNameList = allIotModelField.stream().collect(Collectors.toMap(SysIotModelField::getAttributeCode, SysIotModelField::getAttributeName, (value1, value2) -> value1));
|
||||||
Map<String, Integer> eventLevelList = allIotModelField.stream().filter(field -> field.getAttributeType() == 140 && field.getLevel() != null).collect(Collectors.toMap(SysIotModelField::getAttributeCode, SysIotModelField::getLevel, (value1, value2) -> value1));
|
Map<String, Integer> eventLevelList = allIotModelField.stream().collect(Collectors.toMap(SysIotModelField::getAttributeCode, SysIotModelField::getLevel, (value1, value2) -> value1));
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
for (String field : HighModelFieldList.keySet()) {
|
for (String field : HighModelFieldList.keySet()) {
|
||||||
map.put(field, HighModelFieldList.get(field));
|
map.put(field, HighModelFieldList.get(field));
|
||||||
|
@ -161,8 +161,6 @@ public class SysEnumServiceImpl implements SysEnumService {
|
|||||||
PageQuery pageQuery = new PageQuery();
|
PageQuery pageQuery = new PageQuery();
|
||||||
pageQuery.setPageNum(sysEnumValuesDto.getPageNum());
|
pageQuery.setPageNum(sysEnumValuesDto.getPageNum());
|
||||||
pageQuery.setPageSize(sysEnumValuesDto.getPageSize());
|
pageQuery.setPageSize(sysEnumValuesDto.getPageSize());
|
||||||
//只返回有效的数据
|
|
||||||
sysEnumValuesDto.setIsActive(1);
|
|
||||||
IPage<SysEnumValuesVo> iPage =
|
IPage<SysEnumValuesVo> iPage =
|
||||||
sysEnumValuesMapper.queryEnumValuesList(pageQuery.build(), sysEnumValuesDto);
|
sysEnumValuesMapper.queryEnumValuesList(pageQuery.build(), sysEnumValuesDto);
|
||||||
return PageDataInfo.build(iPage.getRecords(), iPage.getTotal());
|
return PageDataInfo.build(iPage.getRecords(), iPage.getTotal());
|
||||||
|
@ -622,6 +622,17 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
|||||||
else {
|
else {
|
||||||
fieldCodeNameMap.put(sysIotModelField.getAttributeCode(), sysIotModelField.getAttributeName());
|
fieldCodeNameMap.put(sysIotModelField.getAttributeCode(), sysIotModelField.getAttributeName());
|
||||||
}
|
}
|
||||||
|
if (sysIotModelField.getLevel() != null){
|
||||||
|
Map<String, Integer> levelMap = dataService.eventLevelMap.get(modelCode);
|
||||||
|
if (levelMap == null) {
|
||||||
|
Map<String, Integer> calMap = new HashMap<>();
|
||||||
|
calMap.put(sysIotModelField.getAttributeCode(), sysIotModelField.getLevel());
|
||||||
|
dataService.eventLevelMap.put(modelCode, calMap);
|
||||||
|
} else {
|
||||||
|
levelMap.put(sysIotModelField.getAttributeCode(), sysIotModelField.getLevel());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
if (sysIotModelField.getAttributeType() == 199) {
|
if (sysIotModelField.getAttributeType() == 199) {
|
||||||
Map<String, String> map = dataService.calculateIotFieldMap.get(modelCode);
|
Map<String, String> map = dataService.calculateIotFieldMap.get(modelCode);
|
||||||
if (map == null) {
|
if (map == null) {
|
||||||
@ -670,6 +681,9 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
|||||||
String modelCode = dataService.iotModelMap.get(sysIotModelField.getIotModelId().toString());
|
String modelCode = dataService.iotModelMap.get(sysIotModelField.getIotModelId().toString());
|
||||||
Map<String, String> fieldCodeName = dataService.fieldCodeNameMap.get(modelCode);
|
Map<String, String> fieldCodeName = dataService.fieldCodeNameMap.get(modelCode);
|
||||||
fieldCodeName.remove(sysIotModelField.getAttributeCode());
|
fieldCodeName.remove(sysIotModelField.getAttributeCode());
|
||||||
|
if (sysIotModelField.getLevel() != null){
|
||||||
|
dataService.eventLevelMap.remove(sysIotModelField.getAttributeCode());
|
||||||
|
}
|
||||||
if (sysIotModelField.getAttributeType() == 199) {
|
if (sysIotModelField.getAttributeType() == 199) {
|
||||||
Map<String, String> map = dataService.calculateIotFieldMap.get(modelCode);
|
Map<String, String> map = dataService.calculateIotFieldMap.get(modelCode);
|
||||||
map.remove(sysIotModelField.getAttributeCode());
|
map.remove(sysIotModelField.getAttributeCode());
|
||||||
|
@ -346,6 +346,7 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node
|
|||||||
DeviceEventInfo deviceEventInfo = new DeviceEventInfo();
|
DeviceEventInfo deviceEventInfo = new DeviceEventInfo();
|
||||||
deviceEventInfo.setEventTime(item.getEventTime());
|
deviceEventInfo.setEventTime(item.getEventTime());
|
||||||
deviceEventInfo.setEventId(IdWorker.getId());
|
deviceEventInfo.setEventId(IdWorker.getId());
|
||||||
|
deviceEventInfo.setAttributeCode(item.getAttrCode());
|
||||||
deviceEventInfo.setDeviceId(item.getDeviceId());
|
deviceEventInfo.setDeviceId(item.getDeviceId());
|
||||||
deviceEventInfo.setDeviceName(deviceInfoCache.getDeviceName());
|
deviceEventInfo.setDeviceName(deviceInfoCache.getDeviceName());
|
||||||
deviceEventInfo.setDeviceCode(deviceInfoCache.getDeviceCode());
|
deviceEventInfo.setDeviceCode(deviceInfoCache.getDeviceCode());
|
||||||
@ -363,10 +364,14 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node
|
|||||||
if (!StringUtils.isEmpty(eventType) && eventType.equals("遥信变位")) {
|
if (!StringUtils.isEmpty(eventType) && eventType.equals("遥信变位")) {
|
||||||
if (item.getAttrValue().equals(0)) {
|
if (item.getAttrValue().equals(0)) {
|
||||||
deviceEventInfo.setEventText(fieldName + " 复归");
|
deviceEventInfo.setEventText(fieldName + " 复归");
|
||||||
|
|
||||||
deviceEventInfo.setEventLevel(0);
|
deviceEventInfo.setEventLevel(0);
|
||||||
} else {
|
} else {
|
||||||
deviceEventInfo.setEventText(fieldName + " 动作");
|
deviceEventInfo.setEventText(fieldName + " 动作");
|
||||||
deviceEventInfo.setEventLevel(dataService.eventLevelMap.get(model).get(fieldName));
|
Integer level = dataService.eventLevelMap.get(model).get(item.getAttrCode());
|
||||||
|
log.info("level:{}",level);
|
||||||
|
log.info("fieldname{}",fieldName);
|
||||||
|
deviceEventInfo.setEventLevel( level == null ? 0 : level);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
deviceEventInfo.setEventText(fieldName + eventType + ",属性值为:" + item.getAttrValue() + ",越限值为:" + item.getLimitValue());
|
deviceEventInfo.setEventText(fieldName + eventType + ",属性值为:" + item.getAttrValue() + ",越限值为:" + item.getLimitValue());
|
||||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class WindFarmRealDataDto implements Serializable {
|
public class WindFarmRealDataDto implements Serializable {
|
||||||
@ -21,4 +22,9 @@ public class WindFarmRealDataDto implements Serializable {
|
|||||||
* 风场名称
|
* 风场名称
|
||||||
*/
|
*/
|
||||||
private String WindFarmName;
|
private String WindFarmName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物模型属性
|
||||||
|
*/
|
||||||
|
private List<String> attributesList;
|
||||||
}
|
}
|
||||||
|
@ -122,24 +122,8 @@ public class HomeServiceImpl implements HomeService {
|
|||||||
windFarmId = defaultWindFarmId;
|
windFarmId = defaultWindFarmId;
|
||||||
}
|
}
|
||||||
List<SnapshotValueQueryParam> paramList = new ArrayList<>();
|
List<SnapshotValueQueryParam> paramList = new ArrayList<>();
|
||||||
//构建需要查询的物模型属 性
|
//构建需要查询的物模型属
|
||||||
List<String> attributesList = new ArrayList<>();
|
List<String> attributesList = windFarmRealDataDto.getAttributesList();
|
||||||
//功率
|
|
||||||
attributesList.add("windfarmactivepower");
|
|
||||||
//平均风速
|
|
||||||
attributesList.add("windfarmavgwindspeed");
|
|
||||||
//日利用小时
|
|
||||||
attributesList.add("windfarmdayoperationhours");
|
|
||||||
//月利用小时
|
|
||||||
attributesList.add("windfarmmonthoperationhours");
|
|
||||||
//日发电量
|
|
||||||
attributesList.add("windfarmdayprodenergy");
|
|
||||||
//月发电量
|
|
||||||
attributesList.add("windfarmmonthprodenergy");
|
|
||||||
//年发电量
|
|
||||||
attributesList.add("windfarmyearprodenergy");
|
|
||||||
//总发电量
|
|
||||||
attributesList.add("windfarmtotalprodenergy");
|
|
||||||
//构建查询属性参数
|
//构建查询属性参数
|
||||||
SnapshotValueQueryParam snapshotValueQueryParam = new SnapshotValueQueryParam();
|
SnapshotValueQueryParam snapshotValueQueryParam = new SnapshotValueQueryParam();
|
||||||
snapshotValueQueryParam.setAttributes(attributesList);
|
snapshotValueQueryParam.setAttributes(attributesList);
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<if test="sysEnumValuesDto.enumTypeId != null and sysEnumValuesDto.enumTypeId != ''">
|
<if test="sysEnumValuesDto.enumTypeId != null and sysEnumValuesDto.enumTypeId != ''">
|
||||||
and e.enum_type_id =#{sysEnumValuesDto.enumTypeId}
|
and e.enum_type_id =#{sysEnumValuesDto.enumTypeId}
|
||||||
</if>
|
</if>
|
||||||
<if test="sysEnumValuesDto.isActive != null and sysEnumValuesDto.isActive != ''">
|
<if test="sysEnumValuesDto.isActive != null ">
|
||||||
and e.is_active =#{sysEnumValuesDto.isActive}
|
and e.is_active =#{sysEnumValuesDto.isActive}
|
||||||
</if>
|
</if>
|
||||||
order by e.order_number asc
|
order by e.order_number asc
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
where se.id = #{id}
|
where se.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
<select id="getAllIotModelField" resultType="com.das.modules.equipment.entity.SysIotModelField">
|
<select id="getAllIotModelField" resultType="com.das.modules.equipment.entity.SysIotModelField">
|
||||||
select simf.attribute_name as attributeName, simf.attribute_code as attributeCode,simf.highspeed as highSpeed,simf.datatype as dataType,simf.attribute_type as attributeType from sys_iot_model_field simf where simf.iot_model_id = #{id} order by simf.attribute_code
|
select simf.attribute_name as attributeName, simf.attribute_code as attributeCode,simf.highspeed as highSpeed,simf.datatype as dataType,simf.attribute_type as attributeType,simf.level as level from sys_iot_model_field simf where simf.iot_model_id = #{id} order by simf.attribute_code
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,12 +63,7 @@ PS: 同一节点只允许建立一条连接。
|
|||||||
"protocol": 1,
|
"protocol": 1,
|
||||||
//协议参数
|
//协议参数
|
||||||
"params": {},
|
"params": {},
|
||||||
"devices": ["11234131","1234123"]
|
"devices": [ {
|
||||||
}
|
|
||||||
],
|
|
||||||
//物模型信息
|
|
||||||
"equipments": [
|
|
||||||
{
|
|
||||||
//设备ID
|
//设备ID
|
||||||
"id": "11234131",
|
"id": "11234131",
|
||||||
//设备IOT地址
|
//设备IOT地址
|
||||||
@ -128,9 +123,204 @@ PS: 同一节点只允许建立一条连接。
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}, {
|
||||||
|
//设备ID
|
||||||
|
"id": "11234131",
|
||||||
|
//设备IOT地址
|
||||||
|
"addr": "12341235",
|
||||||
|
//属性列表
|
||||||
|
"attrs":[
|
||||||
|
{
|
||||||
|
//属性名
|
||||||
|
"name": "Ia",
|
||||||
|
//属性类型
|
||||||
|
"type": "yc",
|
||||||
|
//是否高频属性, 0 - 不是, 1 - 是
|
||||||
|
"highSpeed": 1,
|
||||||
|
//属性参数
|
||||||
|
"params": {
|
||||||
|
//上界
|
||||||
|
"upBound": 9999,
|
||||||
|
//下界
|
||||||
|
"lowBound": 0,
|
||||||
|
//基值, default: 0
|
||||||
|
"base": 0,
|
||||||
|
//系数, default: 1
|
||||||
|
"coef": 1,
|
||||||
|
//限值1, default: 0
|
||||||
|
"limit1Enable": 0,
|
||||||
|
//限值1下限
|
||||||
|
"limit1Low": 123.0,
|
||||||
|
//限值1上限
|
||||||
|
"limit1High": 999.0,
|
||||||
|
//限值2, default: 0
|
||||||
|
"limit2Enable": 0,
|
||||||
|
//限值2上限
|
||||||
|
"limit2High": 999.0,
|
||||||
|
//限值2下限
|
||||||
|
"limit2Low": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Switch01",
|
||||||
|
"type": "yx",
|
||||||
|
"params": {
|
||||||
|
//是否取反,default: 0
|
||||||
|
"invert": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
//服务列表
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
//服务名
|
||||||
|
"name": "start",
|
||||||
|
//服务类型
|
||||||
|
"type": "yk",
|
||||||
|
//服务参数
|
||||||
|
"params": {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//链路ID
|
||||||
|
"linkId": "1235112",
|
||||||
|
//链路名称
|
||||||
|
"linkName": "2#风机",
|
||||||
|
//协议号
|
||||||
|
"protocol": 12,
|
||||||
|
//协议参数
|
||||||
|
"params": {},
|
||||||
|
"devices": [ {
|
||||||
|
//设备ID
|
||||||
|
"id": "11234131",
|
||||||
|
//设备IOT地址
|
||||||
|
"addr": "12341235",
|
||||||
|
//属性列表
|
||||||
|
"attrs":[
|
||||||
|
{
|
||||||
|
//属性名
|
||||||
|
"name": "Ia",
|
||||||
|
//属性类型
|
||||||
|
"type": "yc",
|
||||||
|
//是否高频属性, 0 - 不是, 1 - 是
|
||||||
|
"highSpeed": 1,
|
||||||
|
//属性参数
|
||||||
|
"params": {
|
||||||
|
//上界
|
||||||
|
"upBound": 9999,
|
||||||
|
//下界
|
||||||
|
"lowBound": 0,
|
||||||
|
//基值, default: 0
|
||||||
|
"base": 0,
|
||||||
|
//系数, default: 1
|
||||||
|
"coef": 1,
|
||||||
|
//限值1, default: 0
|
||||||
|
"limit1Enable": 0,
|
||||||
|
//限值1下限
|
||||||
|
"limit1Low": 123.0,
|
||||||
|
//限值1上限
|
||||||
|
"limit1High": 999.0,
|
||||||
|
//限值2, default: 0
|
||||||
|
"limit2Enable": 0,
|
||||||
|
//限值2上限
|
||||||
|
"limit2High": 999.0,
|
||||||
|
//限值2下限
|
||||||
|
"limit2Low": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Switch01",
|
||||||
|
"type": "yx",
|
||||||
|
"params": {
|
||||||
|
//是否取反,default: 0
|
||||||
|
"order": 0,
|
||||||
|
"invert": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
//服务列表
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
//服务名
|
||||||
|
"name": "start",
|
||||||
|
//服务类型
|
||||||
|
"type": "yk",
|
||||||
|
//服务参数
|
||||||
|
"params": {
|
||||||
|
"order": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}, {
|
||||||
|
//设备ID
|
||||||
|
"id": "11234131",
|
||||||
|
//设备IOT地址
|
||||||
|
"addr": "12341235",
|
||||||
|
//属性列表
|
||||||
|
"attrs":[
|
||||||
|
{
|
||||||
|
//属性名
|
||||||
|
"name": "Ia",
|
||||||
|
//属性类型
|
||||||
|
"type": "yc",
|
||||||
|
//是否高频属性, 0 - 不是, 1 - 是
|
||||||
|
"highSpeed": 1,
|
||||||
|
//属性参数
|
||||||
|
"params": {
|
||||||
|
"order": 0
|
||||||
|
//上界
|
||||||
|
"upBound": 9999,
|
||||||
|
//下界
|
||||||
|
"lowBound": 0,
|
||||||
|
//基值, default: 0
|
||||||
|
"base": 0,
|
||||||
|
//系数, default: 1
|
||||||
|
"coef": 1,
|
||||||
|
//限值1, default: 0
|
||||||
|
"limit1Enable": 0,
|
||||||
|
//限值1下限
|
||||||
|
"limit1Low": 123.0,
|
||||||
|
//限值1上限
|
||||||
|
"limit1High": 999.0,
|
||||||
|
//限值2, default: 0
|
||||||
|
"limit2Enable": 0,
|
||||||
|
//限值2上限
|
||||||
|
"limit2High": 999.0,
|
||||||
|
//限值2下限
|
||||||
|
"limit2Low": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Switch01",
|
||||||
|
"type": "yx",
|
||||||
|
"params": {
|
||||||
|
//是否取反,default: 0
|
||||||
|
"invert": 0,
|
||||||
|
"order": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
//服务列表
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
//服务名
|
||||||
|
"name": "start",
|
||||||
|
//服务类型
|
||||||
|
"type": "yk",
|
||||||
|
//服务参数
|
||||||
|
"params": {
|
||||||
|
"order": 0
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
BIN
ui/dasadmin/src/assets/dashboard/alert01.png
Normal file
After Width: | Height: | Size: 979 B |
BIN
ui/dasadmin/src/assets/dashboard/bg2.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
ui/dasadmin/src/assets/dashboard/overview01.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
ui/dasadmin/src/assets/dashboard/overview02.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
ui/dasadmin/src/assets/dashboard/overview03.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
ui/dasadmin/src/assets/dashboard/overview04.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
ui/dasadmin/src/assets/dashboard/overview05.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
ui/dasadmin/src/assets/dashboard/overview06.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
@ -184,12 +184,16 @@ function createAxios<Data = any, T = ApiPromise<Data>>(axiosConfig: AxiosRequest
|
|||||||
error.config && removePending(error.config)
|
error.config && removePending(error.config)
|
||||||
options.loading && closeLoading(options) // 关闭loading
|
options.loading && closeLoading(options) // 关闭loading
|
||||||
options.showErrorMessage && httpErrorStatusHandle(error) // 处理错误状态码
|
options.showErrorMessage && httpErrorStatusHandle(error) // 处理错误状态码
|
||||||
if (error.response.status == 401) {
|
|
||||||
let routerPath = adminBaseRoute.path
|
if (error.response){
|
||||||
adminInfo.removeToken()
|
if (error.response.status == 401) {
|
||||||
routerPath += '/login'
|
let routerPath = adminBaseRoute.path
|
||||||
router.push({ path: routerPath })
|
adminInfo.removeToken()
|
||||||
|
routerPath += '/login'
|
||||||
|
router.push({ path: routerPath })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.reject(error) // 错误继续返回给到具体页面
|
return Promise.reject(error) // 错误继续返回给到具体页面
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -1,25 +1,117 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main" ref="HomeHight">
|
<div class="default-main" ref="HomeHight">
|
||||||
<el-row style="margin: 0px;">
|
<el-row style="margin: 0px;">
|
||||||
|
<el-col :md="24" :lg="24" class="col-top">
|
||||||
|
<el-row class="overview">
|
||||||
|
<el-col :xs="12" :sm="8" :md="8" :lg="4">
|
||||||
|
<div class="overviewItem" style="margin-left: 0px;">
|
||||||
|
<img class="small-panel-pic" src="~assets/dashboard/overview01.png" alt="" />
|
||||||
|
<div class="small-base">
|
||||||
|
<div class="small-title">全场平均风速</div>
|
||||||
|
<div class="small-value">
|
||||||
|
<span class="content-number">{{realData.attributeMap.windfarmavgwindspeed}}</span>
|
||||||
|
<span>m/s</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="12" :sm="8" :md="8" :lg="4">
|
||||||
|
<div class="overviewItem">
|
||||||
|
<img class="small-panel-pic" src="~assets/dashboard/overview02.png" alt="" />
|
||||||
|
<div class="small-base">
|
||||||
|
<div class="small-title">全场实时有功</div>
|
||||||
|
<div class="small-value">
|
||||||
|
<span class="content-number">{{realData.attributeMap.windfarmactivepower}}</span>
|
||||||
|
<span>MW</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :xs="12" :sm="8" :md="8" :lg="4">
|
||||||
|
<div class="overviewItem">
|
||||||
|
<img class="small-panel-pic" src="~assets/dashboard/overview03.png" alt="" />
|
||||||
|
<div class="small-base">
|
||||||
|
<div class="small-title">全场实时无功</div>
|
||||||
|
<div class="small-value">
|
||||||
|
<span class="content-number">{{realData.attributeMap.windfarmreactivepower}}</span>
|
||||||
|
<span>kvar</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :xs="12" :sm="8" :md="8" :lg="4">
|
||||||
|
<div class="overviewItem">
|
||||||
|
<img class="small-panel-pic" src="~assets/dashboard/overview04.png" alt="" />
|
||||||
|
<div class="small-base">
|
||||||
|
<div class="small-title">日发电量</div>
|
||||||
|
<div class="small-value">
|
||||||
|
<span class="content-number">{{realData.attributeMap.windfarmdayprodenergy}}</span>
|
||||||
|
<span>kWh</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :xs="12" :sm="8" :md="8" :lg="4">
|
||||||
|
<div class="overviewItem">
|
||||||
|
<img class="small-panel-pic" src="~assets/dashboard/overview05.png" alt="" />
|
||||||
|
<div class="small-base">
|
||||||
|
<div class="small-title">本月发电量</div>
|
||||||
|
<div class="small-value">
|
||||||
|
<span class="content-number">{{realData.attributeMap.windfarmmonthprodenergy}}</span>
|
||||||
|
<span>kWh</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="12" :sm="8" :md="8" :lg="4">
|
||||||
|
<div class="overviewItem" style="margin-right: 0px;">
|
||||||
|
<img class="small-panel-pic" src="~assets/dashboard/overview06.png" alt="" />
|
||||||
|
<div class="small-base">
|
||||||
|
<div class="small-title">年发电量</div>
|
||||||
|
<div class="small-value">
|
||||||
|
<span class="content-number">{{realData.attributeMap.windfarmyearprodenergy}}</span>
|
||||||
|
<span>kWh</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="24" :lg="24">
|
||||||
|
<div class="AlertPart">
|
||||||
|
<div class="AlertPic">
|
||||||
|
<img src="~assets/dashboard/alert01.png" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="realAlert"
|
||||||
|
ref="scrollRef"
|
||||||
|
@mouseover.native="clearScroll"
|
||||||
|
@mouseleave.native="createScroll"
|
||||||
|
>
|
||||||
|
<p v-for="(item,index) in tableData"
|
||||||
|
:key="index"
|
||||||
|
@mouseover="showButton"
|
||||||
|
@mouseout="hideButton"
|
||||||
|
>
|
||||||
|
<span>{{item.eventTimeFormate}}</span>
|
||||||
|
<span>{{item.deviceCode}}</span>
|
||||||
|
<span>{{item.eventText}}</span>
|
||||||
|
<span v-show="showConfirmButton" >
|
||||||
|
<a style="color: #0277b3; cursor: pointer;" @click="open(item)" >确认</a>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
<el-col :md="24" :lg="24" class="col-center" style="padding-right: 10px;">
|
<el-col :md="24" :lg="24" class="col-center" style="padding-right: 10px;">
|
||||||
<div class="grid-content ep-bg-purple-light">
|
<div class="grid-content ep-bg-purple-light">
|
||||||
<!--风机矩阵-->
|
<!--风机矩阵-->
|
||||||
<div class="matrix panelBg">
|
<div class="matrix panelBg">
|
||||||
<div class="homeHeader">
|
<div class="homeHeader">
|
||||||
<div class="cardLabel">风机矩阵</div>
|
<div class="cardLabel">风机矩阵</div>
|
||||||
<div class="realAlert"
|
|
||||||
ref="scrollRef"
|
|
||||||
@mouseover.native="clearScroll"
|
|
||||||
@mouseleave.native="createScroll">
|
|
||||||
<p v-for="(item,index) in tableData"
|
|
||||||
:key="index"
|
|
||||||
@click="open(item)" >
|
|
||||||
<span>{{item.deviceCode}}、</span>
|
|
||||||
<span>{{item.eventText}}、</span>
|
|
||||||
<span>{{item.eventTimeFormate}}</span>
|
|
||||||
</p>
|
|
||||||
<!-- <span v-if="tableData.length==0">暂无告警</span>-->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
@ -28,29 +120,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :md="24" :lg="8" style="padding: 0px">
|
|
||||||
<div class="grid-content ep-bg-purple cardContentRight">
|
|
||||||
<!–实时告警–>
|
|
||||||
<div class="realPart panelBg" style="margin-bottom: 0">
|
|
||||||
<el-text class="mx-1 homelabel">实时告警</el-text>
|
|
||||||
<div class="realAlert"
|
|
||||||
ref="scrollRef"
|
|
||||||
@mouseover.native="clearScroll"
|
|
||||||
@mouseleave.native="createScroll">
|
|
||||||
<ul>
|
|
||||||
<li v-for="(item,index) in tableData"
|
|
||||||
:key="index"
|
|
||||||
@click="open(item)"
|
|
||||||
>
|
|
||||||
<span>{{item.deviceCode}}、</span>
|
|
||||||
<span>{{item.eventText}}、</span>
|
|
||||||
<span>{{item.eventTimeFormate}}</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>-->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -79,6 +148,17 @@ const realData = ref({
|
|||||||
attributeMap: {},
|
attributeMap: {},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const attributeList = ref({
|
||||||
|
attributesList:[
|
||||||
|
'windfarmactivepower',
|
||||||
|
'windfarmreactivepower',
|
||||||
|
'windfarmavgwindspeed',
|
||||||
|
'windfarmdayprodenergy',
|
||||||
|
'windfarmmonthprodenergy',
|
||||||
|
'windfarmyearprodenergy',
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
const formatAttributeValue = (value: any) => {
|
const formatAttributeValue = (value: any) => {
|
||||||
if (value === undefined) {
|
if (value === undefined) {
|
||||||
return '-'
|
return '-'
|
||||||
@ -89,27 +169,23 @@ const formatAttributeValue = (value: any) => {
|
|||||||
return value % 1 === 0 ? value : value.toFixed(2)
|
return value % 1 === 0 ? value : value.toFixed(2)
|
||||||
}
|
}
|
||||||
const overviewList = () => {
|
const overviewList = () => {
|
||||||
getWindFarmRealData().then((res) => {
|
getWindFarmRealData(attributeList.value).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
res.data.attributeMap.windfarmactivepower = formatAttributeValue(res.data.attributeMap.windfarmactivepower)
|
||||||
|
res.data.attributeMap.windfarmreactivepower = formatAttributeValue(res.data.attributeMap.windfarmreactivepower)
|
||||||
|
res.data.attributeMap.windfarmavgwindspeed = formatAttributeValue(res.data.attributeMap.windfarmavgwindspeed)
|
||||||
res.data.attributeMap.windfarmdayprodenergy = formatAttributeValue(res.data.attributeMap.windfarmdayprodenergy)
|
res.data.attributeMap.windfarmdayprodenergy = formatAttributeValue(res.data.attributeMap.windfarmdayprodenergy)
|
||||||
res.data.attributeMap.windfarmmonthprodenergy = formatAttributeValue(res.data.attributeMap.windfarmmonthprodenergy)
|
res.data.attributeMap.windfarmmonthprodenergy = formatAttributeValue(res.data.attributeMap.windfarmmonthprodenergy)
|
||||||
res.data.attributeMap.windfarmactivepower = formatAttributeValue(res.data.attributeMap.windfarmactivepower)
|
|
||||||
res.data.attributeMap.windfarmavgwindspeed = formatAttributeValue(res.data.attributeMap.windfarmavgwindspeed)
|
|
||||||
res.data.attributeMap.windfarmdayoperationhours = formatAttributeValue(res.data.attributeMap.windfarmdayoperationhours)
|
|
||||||
res.data.attributeMap.windfarmmonthoperationhours = formatAttributeValue(res.data.attributeMap.windfarmmonthoperationhours)
|
|
||||||
res.data.attributeMap.windfarmyearprodenergy = formatAttributeValue(res.data.attributeMap.windfarmyearprodenergy)
|
res.data.attributeMap.windfarmyearprodenergy = formatAttributeValue(res.data.attributeMap.windfarmyearprodenergy)
|
||||||
res.data.attributeMap.windfarmtotalprodenergy = formatAttributeValue(res.data.attributeMap.windfarmtotalprodenergy)
|
|
||||||
const data: any = {
|
const data: any = {
|
||||||
windFarmId: res.data.windFarmId,
|
windFarmId: res.data.windFarmId,
|
||||||
attributeMap: {
|
attributeMap: {
|
||||||
|
windfarmactivepower: res.data.attributeMap.windfarmactivepower,
|
||||||
|
windfarmreactivepower: res.data.attributeMap.windfarmreactivepower,
|
||||||
|
windfarmavgwindspeed: res.data.attributeMap.windfarmavgwindspeed,
|
||||||
windfarmdayprodenergy: res.data.attributeMap.windfarmdayprodenergy,
|
windfarmdayprodenergy: res.data.attributeMap.windfarmdayprodenergy,
|
||||||
windfarmmonthprodenergy: res.data.attributeMap.windfarmmonthprodenergy,
|
windfarmmonthprodenergy: res.data.attributeMap.windfarmmonthprodenergy,
|
||||||
windfarmactivepower: res.data.attributeMap.windfarmactivepower,
|
windfarmyearprodenergy: res.data.attributeMap.windfarmyearprodenergy
|
||||||
windfarmavgwindspeed: res.data.attributeMap.windfarmavgwindspeed,
|
|
||||||
windfarmdayoperationhours: res.data.attributeMap.windfarmdayoperationhours,
|
|
||||||
windfarmmonthoperationhours: res.data.attributeMap.windfarmmonthoperationhours,
|
|
||||||
windfarmyearprodenergy: res.data.attributeMap.windfarmyearprodenergy,
|
|
||||||
windfarmtotalprodenergy: res.data.attributeMap.windfarmtotalprodenergy,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,17 +342,13 @@ const timestampToTime = (timestamp: any) => {
|
|||||||
const tableData = ref()
|
const tableData = ref()
|
||||||
|
|
||||||
const getTableData = (deviceCode) => {
|
const getTableData = (deviceCode) => {
|
||||||
const today = new Date()
|
|
||||||
const threeDaysAgo = new Date(today)
|
|
||||||
threeDaysAgo.setDate(today.getDate() - 3)
|
|
||||||
const startTime = threeDaysAgo.getTime()
|
|
||||||
const data: any = {
|
const data: any = {
|
||||||
startTime: startTime,
|
startTime: new Date(new Date().toLocaleDateString()).getTime(),
|
||||||
endTime: Date.now(),
|
endTime: Date.now(),
|
||||||
deviceCode: deviceCode,
|
deviceCode: deviceCode,
|
||||||
limit: 100,
|
limit: 100,
|
||||||
|
eventLevel:2
|
||||||
}
|
}
|
||||||
console.log(JSON.stringify(data))
|
|
||||||
getAlarmListReq(data).then((res) => {
|
getAlarmListReq(data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
//tableData.value = res.rows
|
//tableData.value = res.rows
|
||||||
@ -332,6 +404,13 @@ const okSubmit = (val: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const scrollRef=ref()
|
const scrollRef=ref()
|
||||||
|
const showConfirmButton = ref(false)
|
||||||
|
const showButton = () => {
|
||||||
|
showConfirmButton.value = true;
|
||||||
|
}
|
||||||
|
const hideButton = () => {
|
||||||
|
showConfirmButton.value = false;
|
||||||
|
}
|
||||||
const clearScroll = () => {
|
const clearScroll = () => {
|
||||||
clearInterval(timer)
|
clearInterval(timer)
|
||||||
}
|
}
|
||||||
@ -374,12 +453,12 @@ const computedHeight = reactive({
|
|||||||
const sizeChange = () => {
|
const sizeChange = () => {
|
||||||
const rect = HomeHight.value?.getBoundingClientRect()
|
const rect = HomeHight.value?.getBoundingClientRect()
|
||||||
if (!rect) return
|
if (!rect) return
|
||||||
computedHeight.powerHeight = rect.height - 630 + 'px'
|
computedHeight.centerHeight = rect.height - 190 + 'px'
|
||||||
computedHeight.alarmHeight = rect.height - 5 + 'px'
|
|
||||||
computedHeight.centerHeight = rect.height - 0 + 'px'
|
|
||||||
if (window.screen.width < 1360) {
|
if (window.screen.width < 1360) {
|
||||||
computedHeight.alarmHeight = '300px'
|
computedHeight.centerHeight = rect.height - 0 + 'px'
|
||||||
computedHeight.powerHeight = '200px'
|
}
|
||||||
|
if (rect.width < 1360) {
|
||||||
|
computedHeight.centerHeight = rect.height - 0 + 'px'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,7 +467,7 @@ onMounted(() => {
|
|||||||
sizeChange()
|
sizeChange()
|
||||||
//getAllChartData()
|
//getAllChartData()
|
||||||
createScroll()
|
createScroll()
|
||||||
// overviewList()
|
overviewList()
|
||||||
StatusListData()
|
StatusListData()
|
||||||
autoUpdate()
|
autoUpdate()
|
||||||
|
|
||||||
@ -448,7 +527,7 @@ $labelHeight: 30px;
|
|||||||
}
|
}
|
||||||
.content-number {
|
.content-number {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 20px;
|
font-size: 28px;
|
||||||
}
|
}
|
||||||
.homelabel {
|
.homelabel {
|
||||||
font-family: PingFangSC-Semibold;
|
font-family: PingFangSC-Semibold;
|
||||||
@ -460,6 +539,54 @@ $labelHeight: 30px;
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
.overview {
|
||||||
|
width: calc(100% - 10px);
|
||||||
|
height: 100%;
|
||||||
|
.overviewItem{
|
||||||
|
height: 100px;
|
||||||
|
display: flex;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin: 5px;
|
||||||
|
align-items: center;
|
||||||
|
color: #4E5969;
|
||||||
|
.small-panel-pic{
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.AlertPart{
|
||||||
|
width: calc(100% - 10px);
|
||||||
|
height: 60px;
|
||||||
|
margin: 10px 0;
|
||||||
|
background-image: linear-gradient(90deg, #FFE3E3 0%, #FBFDFF 100%);
|
||||||
|
border: 2px solid #FFFFFF;
|
||||||
|
border-radius: 6px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.AlertPic{
|
||||||
|
width: 50px;
|
||||||
|
text-align: center;
|
||||||
|
img{
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.realAlert{
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #333333;
|
||||||
|
width: 100%;
|
||||||
|
p{
|
||||||
|
padding-right: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.grid-content {
|
.grid-content {
|
||||||
/* overflow-x: hidden;*/
|
/* overflow-x: hidden;*/
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -470,83 +597,11 @@ $labelHeight: 30px;
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.overview {
|
|
||||||
/* @include cardDefaultStyle;
|
|
||||||
@include cardlabel;*/
|
|
||||||
min-height: 216px;
|
|
||||||
.small-panel {
|
|
||||||
display: flex;
|
|
||||||
border: 1px solid #e1edf6;
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 10px;
|
|
||||||
.small-panel-pic {
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
}
|
|
||||||
.small-base {
|
|
||||||
word-break: keep-all;
|
|
||||||
margin-left: 10px;
|
|
||||||
color: #2c3f5d;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.status {
|
|
||||||
/* @include cardDefaultStyle;
|
|
||||||
@include cardlabel;*/
|
|
||||||
min-height: 374px;
|
|
||||||
.statusrow {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.status-con {
|
|
||||||
padding-left: 20px !important;
|
|
||||||
background: #f0f6ff;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
.status-panel {
|
|
||||||
display: flex;
|
|
||||||
padding: 10px;
|
|
||||||
font-size: 12px;
|
|
||||||
.status-panel-pic {
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
}
|
|
||||||
.status-base-main {
|
|
||||||
word-break: keep-all;
|
|
||||||
margin-left: 10px;
|
|
||||||
line-height: 23px;
|
|
||||||
padding-top: 6px;
|
|
||||||
}
|
|
||||||
.status-base {
|
|
||||||
margin-left: 10px;
|
|
||||||
line-height: 23px;
|
|
||||||
padding: 6px 10px 0 10px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.status-panel-piczt {
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.power {
|
|
||||||
@include cardDefaultStyle;
|
|
||||||
@include cardlabel;
|
|
||||||
width: 100%;
|
|
||||||
min-height: 290px;
|
|
||||||
height: v-bind('computedHeight.powerHeight');
|
|
||||||
.chartBox {
|
|
||||||
height: calc(100% - $labelHeight);
|
|
||||||
.power-chart {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.matrix {
|
.matrix {
|
||||||
@include cardlabel;
|
@include cardlabel;
|
||||||
background: url('/@/assets/dashboard/bg1.png') no-repeat #ffffff;
|
background: url('/@/assets/dashboard/bg2.png') no-repeat #ffffff;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
/* min-height: 900px;*/
|
/* min-height: 900px;*/
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -561,170 +616,23 @@ $labelHeight: 30px;
|
|||||||
width: 100px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.realAlert{
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
cursor: pointer;
|
|
||||||
line-height: 30px;
|
|
||||||
width: 100%;
|
|
||||||
font-size: 16px;
|
|
||||||
p{
|
|
||||||
padding-right: 30px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.summarize {
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 10px;
|
|
||||||
background-color: #fff;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
word-break: keep-all;
|
|
||||||
@include cardlabel;
|
|
||||||
min-height: 224px;
|
|
||||||
.summarize-panel-list {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
.summarize-panel {
|
|
||||||
margin: 5px;
|
|
||||||
width: 25%;
|
|
||||||
display: flex;
|
|
||||||
padding: 20px 0;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #f0f6ff;
|
|
||||||
border-radius: 10px;
|
|
||||||
.summarize-panel-base {
|
|
||||||
width: 100%;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
div {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 14px;
|
|
||||||
color: rgb(78, 89, 105);
|
|
||||||
.content-number {
|
|
||||||
color: #333333;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.trend {
|
|
||||||
min-height: 300px;
|
|
||||||
height: 335px;
|
|
||||||
overflow: hidden;
|
|
||||||
.trend-tabs {
|
|
||||||
:deep(.el-tabs__item) {
|
|
||||||
border: none;
|
|
||||||
text-align: center;
|
|
||||||
width: 40px;
|
|
||||||
padding: 0;
|
|
||||||
line-height: 24px;
|
|
||||||
height: 24px;
|
|
||||||
}
|
|
||||||
:deep(.el-tabs__header .el-tabs__nav) {
|
|
||||||
border-radius: 0;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
:deep(.el-tabs__header) {
|
|
||||||
border-bottom: 0;
|
|
||||||
float: right;
|
|
||||||
margin-top: -43px;
|
|
||||||
}
|
|
||||||
:deep(.el-tabs__content) {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
:deep(.el-tabs__item.is-active) {
|
|
||||||
background: rgba(2, 119, 179, 0.2);
|
|
||||||
border-radius: 4px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
:deep(.el-tabs__nav-wrap:after) {
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
:deep(.el-tabs__active-bar) {
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.trend-chart {
|
|
||||||
width: 100%;
|
|
||||||
height: 260px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.realPart {
|
|
||||||
height: v-bind('computedHeight.alarmHeight');
|
|
||||||
.realAlert{
|
|
||||||
height: calc(100% - 20px);
|
|
||||||
overflow: hidden;
|
|
||||||
ul li{
|
|
||||||
list-style: none;
|
|
||||||
line-height: 30px;
|
|
||||||
border-bottom: 1px #dddddd dashed;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1920px) {
|
|
||||||
.default-main {
|
|
||||||
.trend {
|
|
||||||
height: 315px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media screen and (max-width: 1280px) {
|
|
||||||
.default-main {
|
|
||||||
/*height: auto !important;*/
|
|
||||||
.windtitle {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.summarize {
|
|
||||||
.summarize-panel {
|
|
||||||
margin: 2px !important;
|
|
||||||
.summarize-panel-base {
|
|
||||||
white-space: normal !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media screen and (max-width: 1360px) {
|
@media screen and (max-width: 1360px) {
|
||||||
.default-main {
|
.default-main {
|
||||||
font-size: 11px !important;
|
font-size: 11px !important;
|
||||||
.summarize {
|
|
||||||
word-break: break-all !important;
|
|
||||||
}
|
|
||||||
.overview {
|
|
||||||
.small-panel {
|
|
||||||
.small-base {
|
|
||||||
margin-left: 0px !important;
|
|
||||||
font-size: 11px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 1480px) {
|
@media screen and (max-width: 1480px) {
|
||||||
.default-main {
|
.default-main {
|
||||||
font-size: 12px !important;
|
font-size: 12px !important;
|
||||||
.overview {
|
.content-number {
|
||||||
.small-panel {
|
font-size: 16px !important;
|
||||||
padding: 13px 0px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.status {
|
|
||||||
.status-panel {
|
|
||||||
.status-base-main {
|
|
||||||
margin-left: 5px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -732,7 +640,7 @@ $labelHeight: 30px;
|
|||||||
.default-main {
|
.default-main {
|
||||||
/*font-size: 12px !important;*/
|
/*font-size: 12px !important;*/
|
||||||
.content-number {
|
.content-number {
|
||||||
font-size: 16px !important;
|
font-size: 18px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.homelabel {
|
.homelabel {
|
||||||
@ -747,26 +655,6 @@ $labelHeight: 30px;
|
|||||||
/* padding: 10px !important;*/
|
/* padding: 10px !important;*/
|
||||||
margin-bottom: 10px !important;
|
margin-bottom: 10px !important;
|
||||||
}
|
}
|
||||||
.summarize {
|
|
||||||
margin-bottom: 10px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.toal-panel {
|
|
||||||
padding: 0 !important;
|
|
||||||
padding-bottom: 10px !important;
|
|
||||||
}
|
|
||||||
// .matrix {
|
|
||||||
// height: 900px !important;
|
|
||||||
// }
|
|
||||||
:deep(.el-tabs__header) {
|
|
||||||
margin-top: -33px !important;
|
|
||||||
}
|
|
||||||
.overview {
|
|
||||||
.small-panel {
|
|
||||||
.small-base {
|
|
||||||
margin-left: 5px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="FanList-content">
|
<div class="FanList-content">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="4" v-for="(item, index) in props.parentData" style="margin-bottom: 5px">
|
<el-col :xs="12" :sm="8" :md="8" :lg="4" :xl="3" v-for="(item, index) in props.parentData" style="margin-bottom: 5px">
|
||||||
<div class="grid-content ep-bg-purple" @dblclick="handleDoubleClick(item)">
|
<div class="grid-content ep-bg-purple" @dblclick="handleDoubleClick(item)">
|
||||||
<div class="FanList-panel" :class="item.standard == true ? 'wind-mark' : 'wind-default'">
|
<div class="FanList-panel" :class="item.standard == true ? 'wind-mark' : 'wind-default'">
|
||||||
<div class="fanlist-top">
|
<div class="fanlist-top">
|
||||||
@ -42,9 +42,6 @@
|
|||||||
<div class="leaf_3"><img src="~assets/dashboard/leaf1.png" alt="" /></div>
|
<div class="leaf_3"><img src="~assets/dashboard/leaf1.png" alt="" /></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <img src="~assets/dashboard/fanlist1.png" alt="">-->
|
|
||||||
<!-- <img class="fc" src="~assets/dashboard/fanlist1.png" alt=""></img>-->
|
|
||||||
<!-- <img :style="{ transform: `rotate(${rotationDegrees}deg)` }" src="~assets/dashboard/fanlist1.png" alt="">-->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="fanlist-pic">
|
<div class="fanlist-pic">
|
||||||
<img src="~assets/dashboard/fanlist2.png" alt="" />
|
<img src="~assets/dashboard/fanlist2.png" alt="" />
|
||||||
@ -52,27 +49,22 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="fanlist-data">
|
<el-row class="fanlist-data">
|
||||||
<el-col :span="8">
|
<div class="fanlist-text">
|
||||||
<div class="fanlist-text">
|
<span class="content-number">{{ item.attributeMap.iwindspeed }}</span>
|
||||||
<span class="content-number">{{ item.attributeMap.iwindspeed }}</span
|
<span>m/s</span>
|
||||||
><span>风速m/s</span>
|
</div>
|
||||||
</div>
|
<div class="fanlist-text">
|
||||||
</el-col>
|
<span class="content-number">{{ item.attributeMap.igenpower }}</span>
|
||||||
<el-col :span="8">
|
<span>kW</span>
|
||||||
<div class="fanlist-text">
|
</div>
|
||||||
<span class="content-number">{{ item.attributeMap.igenpower }}</span
|
<div class="fanlist-text">
|
||||||
><span>功率MW</span>
|
<span class="content-number">{{ item.attributeMap.ikwhthisday }}</span>
|
||||||
</div>
|
<span>kWh</span>
|
||||||
</el-col>
|
</div>
|
||||||
<el-col :span="8">
|
|
||||||
<div class="fanlist-text">
|
|
||||||
<span class="content-number">{{ item.attributeMap.ikwhthisday }}</span
|
|
||||||
><span>日发电量kWh</span>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="fanlist-bottom">
|
<div class="fanlist-bottom">
|
||||||
|
<!-- <el-tag class="tag-panel is-danger">已锁定</el-tag>-->
|
||||||
<el-tag v-if="item.attributeMap.locked === 1" class="tag-panel is-danger">已锁定</el-tag>
|
<el-tag v-if="item.attributeMap.locked === 1" class="tag-panel is-danger">已锁定</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -97,13 +89,20 @@ const props = defineProps({
|
|||||||
|
|
||||||
const getAnimationStyle = (item) => {
|
const getAnimationStyle = (item) => {
|
||||||
const irotorspeed = item.attributeMap?.irotorspeed ?? 0
|
const irotorspeed = item.attributeMap?.irotorspeed ?? 0
|
||||||
const animationDuration = (1 / irotorspeed) * 10
|
const animationDuration = 60 / irotorspeed
|
||||||
return {
|
return {
|
||||||
'animation-duration': `${animationDuration}s`,
|
'animation-duration': `${animationDuration}s`,
|
||||||
'animation-timing-function': 'linear',
|
'animation-timing-function': 'linear',
|
||||||
'animation-iteration-count': 'infinite',
|
'animation-iteration-count': 'infinite',
|
||||||
'animation-direction': 'normaL',
|
'animation-direction': 'normaL',
|
||||||
|
//'animation-fill-mode': 'forwards'
|
||||||
}
|
}
|
||||||
|
/* const animationDuration = 60 / irotorspeed
|
||||||
|
const iterationCount = Math.floor(10) // 迭代次数取整
|
||||||
|
return {
|
||||||
|
'animation': `leafRotate ${animationDuration}s ${iterationCount}`
|
||||||
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDoubleClick = (row) => {
|
const handleDoubleClick = (row) => {
|
||||||
@ -234,8 +233,8 @@ const handleDoubleClick = (row) => {
|
|||||||
.fanlist-main {
|
.fanlist-main {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
/*padding: 10px;*/
|
justify-content: space-between;
|
||||||
padding: 10px 10px 0 10px;
|
padding: 5px 10px 0 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.fanlist-pic {
|
.fanlist-pic {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -293,12 +292,13 @@ const handleDoubleClick = (row) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.fanlist-text {
|
.fanlist-text {
|
||||||
margin-top: 15px;
|
margin-top: 5px;
|
||||||
display: flex;
|
width: 100%;
|
||||||
flex-direction: column;
|
text-align: right;
|
||||||
.content-number {
|
.content-number {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.fanlist-text span {
|
.fanlist-text span {
|
||||||
@ -309,7 +309,6 @@ const handleDoubleClick = (row) => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
margin-top: -7px;
|
|
||||||
.tag-panel {
|
.tag-panel {
|
||||||
border-radius: 0 0 8px 0;
|
border-radius: 0 0 8px 0;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<el-col
|
<el-col
|
||||||
v-if="!itemChild.data.showKey || formData[itemChild.data.showKey] === itemChild.data.showValue"
|
v-if="!itemChild.data.showKey || formData[itemChild.data.showKey] === itemChild.data.showValue"
|
||||||
:offset="1"
|
:offset="1"
|
||||||
:span="11"
|
:span="itemChild.data.singleRow ? 23 : 11"
|
||||||
>
|
>
|
||||||
<el-form-item :label="itemChild.data.label" :prop="itemChild.key">
|
<el-form-item :label="itemChild.data.label" :prop="itemChild.key">
|
||||||
<el-input
|
<el-input
|
||||||
@ -98,7 +98,7 @@ const emits = defineEmits(['update:visible', 'submit'])
|
|||||||
|
|
||||||
const formRef = ref<FormInstance>()
|
const formRef = ref<FormInstance>()
|
||||||
const formData = ref<any>({})
|
const formData = ref<any>({})
|
||||||
// const formData = ref<protocolFormType>({})
|
// const formData = ref<protocolFormType>({})
|
||||||
// #region
|
// #region
|
||||||
// const cardTitle: ['网络设置', '超时设置'] = ['网络设置', '超时设置']
|
// const cardTitle: ['网络设置', '超时设置'] = ['网络设置', '超时设置']
|
||||||
// const netWorkOption = {
|
// const netWorkOption = {
|
||||||
@ -959,6 +959,7 @@ const formColumnList: formColumnType[] = [
|
|||||||
value: '',
|
value: '',
|
||||||
showKey: 'ftpMode',
|
showKey: 'ftpMode',
|
||||||
showValue: '1',
|
showValue: '1',
|
||||||
|
singleRow: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1077,6 +1078,7 @@ const formColumnList: formColumnType[] = [
|
|||||||
value: '',
|
value: '',
|
||||||
showKey: 'ftpMode',
|
showKey: 'ftpMode',
|
||||||
showValue: '1',
|
showValue: '1',
|
||||||
|
singleRow: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -122,6 +122,7 @@ type paramsType = {
|
|||||||
showKey?: string
|
showKey?: string
|
||||||
showValue?: string | number
|
showValue?: string | number
|
||||||
isSeconds?: boolean
|
isSeconds?: boolean
|
||||||
|
singleRow?: boolean
|
||||||
list?: { label: string; value: string | number }[]
|
list?: { label: string; value: string | number }[]
|
||||||
cardTitle?: ['网络设置', '超时设置']
|
cardTitle?: ['网络设置', '超时设置']
|
||||||
}
|
}
|
||||||
|
@ -424,7 +424,11 @@ const saveMappingList = (data: any[]) => {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
ElMessage.success('保存成功!')
|
ElMessage.success('保存成功!')
|
||||||
resetExcel()
|
resetExcel()
|
||||||
|
}else{
|
||||||
|
ElMessage.warning(res.msg ?? '保存失败!')
|
||||||
}
|
}
|
||||||
|
}).catch(()=>{
|
||||||
|
ElMessage.error('保存失败!')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const uploadRef = ref<UploadInstance>()
|
const uploadRef = ref<UploadInstance>()
|
||||||
|
@ -706,6 +706,7 @@ export const createUpLoadExcelData = (workbookData: any) => {
|
|||||||
sheetData.linkId = workbookData.name
|
sheetData.linkId = workbookData.name
|
||||||
sheetData[sheetkeyMap[fieldKey]] = sheets[item].cellData[key][fieldKey]?.v ?? ''
|
sheetData[sheetkeyMap[fieldKey]] = sheets[item].cellData[key][fieldKey]?.v ?? ''
|
||||||
sheetData.type = sheets[item].cellData[key][fieldKey].custom.type
|
sheetData.type = sheets[item].cellData[key][fieldKey].custom.type
|
||||||
|
sheetData.protocol = sheets[item].cellData[key][fieldKey].custom.protocol
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if (fieldKey === '1') {
|
if (fieldKey === '1') {
|
||||||
@ -713,7 +714,7 @@ export const createUpLoadExcelData = (workbookData: any) => {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
params[sheetkeyMap[fieldKey]] = sheets[item].cellData[key][fieldKey]?.v ?? ''
|
params[sheetkeyMap[fieldKey]] = sheets[item].cellData[key][fieldKey]?.v ?? ''
|
||||||
}
|
}
|
||||||
sheetData.params = JSON.stringify(params)
|
sheetData.params = JSON.stringify(params)
|
||||||
data.push(sheetData)
|
data.push(sheetData)
|
||||||
}
|
}
|
||||||
@ -723,9 +724,7 @@ export const createUpLoadExcelData = (workbookData: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const createSheetData = (data: any, protocol: string | number) => {
|
export const createSheetData = (data: any, protocol: string | number) => {
|
||||||
console.log('createSheetData')
|
|
||||||
if (!protocol) return {}
|
if (!protocol) return {}
|
||||||
|
|
||||||
const excelCellDataMap: any = {}
|
const excelCellDataMap: any = {}
|
||||||
const headerData = createHeaderData(protocol)
|
const headerData = createHeaderData(protocol)
|
||||||
const resultData: any = {}
|
const resultData: any = {}
|
||||||
@ -747,6 +746,7 @@ export const createSheetData = (data: any, protocol: string | number) => {
|
|||||||
if (col === '0') {
|
if (col === '0') {
|
||||||
custom = {}
|
custom = {}
|
||||||
custom.type = item
|
custom.type = item
|
||||||
|
custom.protocol = Number(protocol)
|
||||||
custom.otherData = obj
|
custom.otherData = obj
|
||||||
}
|
}
|
||||||
result[row][col] = { v: obj[field], s: '1', custom }
|
result[row][col] = { v: obj[field], s: '1', custom }
|
||||||
@ -754,8 +754,7 @@ export const createSheetData = (data: any, protocol: string | number) => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
resultData[item] = result
|
resultData[item] = result
|
||||||
})
|
})
|
||||||
|
|
||||||
return resultData
|
return resultData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,10 +234,10 @@ const tableItem1: any = [
|
|||||||
{
|
{
|
||||||
label: '限电原因',
|
label: '限电原因',
|
||||||
unit: ' ',
|
unit: ' ',
|
||||||
prop: '',
|
prop: 'powerlimitsource',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
custom: 'header',
|
custom: 'header',
|
||||||
name:'',
|
name:'PowerLimitSource',
|
||||||
title: '限电原因'
|
title: '限电原因'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -317,7 +317,7 @@ const defaultdeviceQuery = () => {
|
|||||||
if(attributeCodeLower!='name'){
|
if(attributeCodeLower!='name'){
|
||||||
if (attributeCodeLower) {
|
if (attributeCodeLower) {
|
||||||
const value=tsnapshotVoItem[attributeCodeLower];
|
const value=tsnapshotVoItem[attributeCodeLower];
|
||||||
let formattedValue = value !== undefined ? (value % 1 === 0 ? value : value.toFixed(3)) : '-';
|
let formattedValue = value !== undefined ? (value % 1 === 0 ? value : value.toFixed(1)) : '-';
|
||||||
if (enumStore.keys.includes(item1.name)) {
|
if (enumStore.keys.includes(item1.name)) {
|
||||||
formattedValue = enumStore.data[item1.name][formattedValue]?enumStore.data[item1.name][formattedValue]:'-'
|
formattedValue = enumStore.data[item1.name][formattedValue]?enumStore.data[item1.name][formattedValue]:'-'
|
||||||
}
|
}
|
||||||
@ -575,7 +575,7 @@ const getTableData = () => {
|
|||||||
if (item.id === itemKey) {
|
if (item.id === itemKey) {
|
||||||
const attributeCodeLower = item1.attributeCode?.toLowerCase();
|
const attributeCodeLower = item1.attributeCode?.toLowerCase();
|
||||||
const value = tsnapshotVoObject[itemKey]?.[attributeCodeLower];
|
const value = tsnapshotVoObject[itemKey]?.[attributeCodeLower];
|
||||||
let formattedValue = value !== undefined ? (value % 1 === 0 ? value : value.toFixed(3)) : '-';
|
let formattedValue = value !== undefined ? (value % 1 === 0 ? value : value.toFixed(1)) : '-';
|
||||||
if (enumStore.keys.includes(item1.attributeCode)) {
|
if (enumStore.keys.includes(item1.attributeCode)) {
|
||||||
formattedValue = enumStore.data[item1.attributeCode][formattedValue]?enumStore.data[item1.attributeCode][formattedValue]:'-'
|
formattedValue = enumStore.data[item1.attributeCode][formattedValue]?enumStore.data[item1.attributeCode][formattedValue]:'-'
|
||||||
}
|
}
|
||||||
@ -608,22 +608,17 @@ const downFun=(tableColumn,tableData)=>{
|
|||||||
}
|
}
|
||||||
const columnSet = new Set(tableColumn.map(item => item.prop));
|
const columnSet = new Set(tableColumn.map(item => item.prop));
|
||||||
const result = [];
|
const result = [];
|
||||||
try {
|
itemsWithoutAge.forEach((item) => {
|
||||||
itemsWithoutAge.forEach((item) => {
|
const newItem = {};
|
||||||
const newItem = {};
|
for (const itemKey in item) {
|
||||||
for (const itemKey in item) {
|
if (columnSet.has(itemKey)) {
|
||||||
if (columnSet.has(itemKey)) {
|
newItem[itemKey] = item[itemKey];
|
||||||
newItem[itemKey] = item[itemKey];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (Object.keys(newItem).length > 0) {
|
}
|
||||||
result.push(newItem);
|
if (Object.keys(newItem).length > 0) {
|
||||||
}
|
result.push(newItem);
|
||||||
});
|
}
|
||||||
} catch (error) {
|
});
|
||||||
console.error('Error in code execution:', error);
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
let addobj = {}
|
let addobj = {}
|
||||||
tableColumn.map((v, i) => {
|
tableColumn.map((v, i) => {
|
||||||
addobj['rowData' + i] = v.label
|
addobj['rowData' + i] = v.label
|
||||||
|