diff --git a/das/src/main/java/com/das/modules/equipment/service/impl/SysIotModelServiceImpl.java b/das/src/main/java/com/das/modules/equipment/service/impl/SysIotModelServiceImpl.java index 09b86505..801a19b0 100644 --- a/das/src/main/java/com/das/modules/equipment/service/impl/SysIotModelServiceImpl.java +++ b/das/src/main/java/com/das/modules/equipment/service/impl/SysIotModelServiceImpl.java @@ -28,6 +28,7 @@ import com.das.modules.equipment.mapper.SysIotModelMapper; import com.das.modules.equipment.mapper.SysIotModelServiceMapper; import com.das.modules.equipment.service.SysIotModelService; import com.das.modules.data.service.TDEngineService; +import com.das.modules.record.service.SysRecordLogService; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; @@ -61,6 +62,9 @@ public class SysIotModelServiceImpl implements SysIotModelService { @Autowired private DataServiceImpl dataService; + @Autowired + SysRecordLogService sysRecordLogService; + public SysIotModelVo creatSysIotModel(SysIotModelDto sysIotModelDto) { SysIotModel sysIotModel = new SysIotModel(); BeanCopyUtils.copy(sysIotModelDto, sysIotModel); @@ -174,9 +178,10 @@ public class SysIotModelServiceImpl implements SysIotModelService { if (sysIotModelFieldDto.getAttributeType() == 140) { sysIotModelField.setDataType("tinyint"); } - sysIotModelFieldMapper.insert(sysIotModelField); //动态执行创建td超级表,字段 createTdStableOrColumn(sysIotModelField); + + sysIotModelFieldMapper.insert(sysIotModelField); //新增物模型属性缓存 addModelFieldCache(sysIotModelField); SysIotModelFieldVo sysIotModelFieldVo = new SysIotModelFieldVo(); @@ -206,12 +211,13 @@ public class SysIotModelServiceImpl implements SysIotModelService { if (oldSysIotField == null) { throw new ServiceException("未查找到该条记录"); } - sysIotModelFieldMapper.updateById(sysIotModelField); + if (!oldSysIotField.getAttributeCode().equals(sysIotModelField.getAttributeCode()) || !oldSysIotField.getDataType().equals(sysIotModelField.getDataType()) || Objects.equals(oldSysIotField.getHighSpeed(), sysIotModelField.getHighSpeed())) { //更新td表结构 updateTDStableOrColumn(sysIotModelField, oldSysIotField); updateModelFieldCache(sysIotModelField, oldSysIotField); } + sysIotModelFieldMapper.updateById(sysIotModelField); SysIotModelFieldVo sysIotModelFieldVo = new SysIotModelFieldVo(); BeanCopyUtils.copy(sysIotModelField, sysIotModelFieldVo); return sysIotModelFieldVo; @@ -220,9 +226,10 @@ public class SysIotModelServiceImpl implements SysIotModelService { @Override public void deleteSysIotModelField(SysIotModelFieldDto sysIotModelFieldDto) { SysIotModelField sysIotModelField = sysIotModelFieldMapper.selectById(sysIotModelFieldDto.getId()); - sysIotModelFieldMapper.deleteById(sysIotModelFieldDto.getId()); //删除td表结构字段 deleteTDStableOrColumn(sysIotModelField); + + sysIotModelFieldMapper.deleteById(sysIotModelFieldDto.getId()); //删除物模型属性缓存 deleteModelFieldCache(sysIotModelField); } @@ -453,6 +460,7 @@ public class SysIotModelServiceImpl implements SysIotModelService { map.put(sysIotModelField.getAttributeCode(), sysIotModelField.getDataType()); //创建低频超级表 tdEngineService.addStableColumn(sysIotModel.getIotModelCode(), "l_", map); + sysRecordLogService.createRecordLog("/系统管理/物模型配置","新增低频TD超级表字段,"+"表名:l_" +sysIotModel.getIotModelCode()+",字段:"+map); addModelFieldCache(lowCreateList.get(i)); } } @@ -468,6 +476,7 @@ public class SysIotModelServiceImpl implements SysIotModelService { map.put(sysIotModelField.getAttributeCode(), sysIotModelField.getDataType()); //创建高频超级表 tdEngineService.addStableColumn(sysIotModel.getIotModelCode(), "h_", map); + sysRecordLogService.createRecordLog("/系统管理/物模型配置","新增低频TD超级表字段,"+"表名:h_" +sysIotModel.getIotModelCode()+",字段:"+map); addModelFieldCache(highCreateList.get(i)); } } @@ -535,6 +544,7 @@ public class SysIotModelServiceImpl implements SysIotModelService { if (sysIotModelField.getAttributeType() == 199) { String modelCode = dataService.iotModelMap.get(sysIotModelField.getIotModelId().toString()); tdEngineService.createCalStable(modelCode, sysIotModelField.getAttributeCode(), sysIotModelField.getDataType()); + sysRecordLogService.createRecordLog("/系统管理/物模型配置","创建计算超级表"+"c_" + modelCode + "_" + sysIotModelField.getAttributeCode()); } else { //创建type为138 139 140的超级表 //如果新增的是第一条记录 创建tdengine超级表 分为高频和低频 @@ -549,6 +559,7 @@ public class SysIotModelServiceImpl implements SysIotModelService { map.put(sysIotModelField.getAttributeCode(), sysIotModelField.getDataType()); //创建低频超级表 tdEngineService.createStable(sysIotModel.getIotModelCode(), "l_", map); + sysRecordLogService.createRecordLog("/系统管理/物模型配置","创建低频TD超级表"+"l_" +sysIotModel.getIotModelCode()); } if (sysIotModelField.getHighSpeed() == 1) { SysIotModel sysIotModel = sysIotModelMapper.selectById(sysIotModelField.getIotModelId()); @@ -556,6 +567,7 @@ public class SysIotModelServiceImpl implements SysIotModelService { map.put(sysIotModelField.getAttributeCode(), sysIotModelField.getDataType()); //创建高频超级表 tdEngineService.createStable(sysIotModel.getIotModelCode(), "h_", map); + sysRecordLogService.createRecordLog("/系统管理/物模型配置","创建高频TD超级表"+"h_" +sysIotModel.getIotModelCode()); } } else { //stable已经存在,新增stable列 @@ -565,6 +577,7 @@ public class SysIotModelServiceImpl implements SysIotModelService { map.put(sysIotModelField.getAttributeCode(), sysIotModelField.getDataType()); //创建低频超级表 tdEngineService.addStableColumn(sysIotModel.getIotModelCode(), "l_", map); + sysRecordLogService.createRecordLog("/系统管理/物模型配置","新增低频TD超级表字段,"+"表名:l_" +sysIotModel.getIotModelCode()+",字段:"+map); } if (sysIotModelField.getHighSpeed() == 1) { SysIotModel sysIotModel = sysIotModelMapper.selectById(sysIotModelField.getIotModelId()); @@ -572,6 +585,7 @@ public class SysIotModelServiceImpl implements SysIotModelService { map.put(sysIotModelField.getAttributeCode(), sysIotModelField.getDataType()); //创建高频超级表 tdEngineService.addStableColumn(sysIotModel.getIotModelCode(), "h_", map); + sysRecordLogService.createRecordLog("/系统管理/物模型配置","新增高频TD超级表字段,"+"表名:h_" +sysIotModel.getIotModelCode()+",字段:"+map); } } } @@ -587,6 +601,7 @@ public class SysIotModelServiceImpl implements SysIotModelService { Long iotModelId = sysIotModelField.getIotModelId(); String modelCode = dataService.iotModelMap.get(iotModelId.toString()); tdEngineService.deleteStable("c_" + modelCode + "_" + sysIotModelField.getAttributeCode()); + sysRecordLogService.createRecordLog("/系统管理/物模型配置","删除TD超级表"+"c_" + modelCode + "_" + sysIotModelField.getAttributeCode()); } else { String stableName = null; SysIotModel sysIotModel = sysIotModelMapper.selectById(sysIotModelField.getIotModelId()); @@ -602,10 +617,12 @@ public class SysIotModelServiceImpl implements SysIotModelService { List sysIotModelFields = sysIotModelFieldMapper.selectList(queryWrapper); if (CollectionUtils.isNotEmpty(sysIotModelFields) && sysIotModelFields.size() > 1) { tdEngineService.deleteColumn(stableName, sysIotModelField.getAttributeCode()); + sysRecordLogService.createRecordLog("/系统管理/物模型配置","删除TD超级表"+ stableName +"中字段:"+ sysIotModelField.getAttributeCode()); } //物模型属性只剩下最后一个删除表 if (CollectionUtils.isNotEmpty(sysIotModelFields) && sysIotModelFields.size() == 1) { tdEngineService.deleteStable(stableName); + sysRecordLogService.createRecordLog("/系统管理/物模型配置","删除TD超级表"+ stableName); } } diff --git a/das/src/main/java/com/das/modules/fdr/controller/FaultRecorderController.java b/das/src/main/java/com/das/modules/fdr/controller/FaultRecorderController.java index 3f0af781..9c844598 100644 --- a/das/src/main/java/com/das/modules/fdr/controller/FaultRecorderController.java +++ b/das/src/main/java/com/das/modules/fdr/controller/FaultRecorderController.java @@ -51,7 +51,7 @@ public class FaultRecorderController { String code = jsonObject.getString("deviceCode"); String startTime = jsonObject.getString("startTime"); String endTime = jsonObject.getString("endTime"); - List result = faultRecorderService.getDirOrFileList("故障录波",code,startTime,endTime); + List result = faultRecorderService.getDirOrFileList("Tracelog",code,startTime,endTime); return R.success(result); } diff --git a/das/src/main/java/com/das/modules/fdr/service/MinioViewsServcie.java b/das/src/main/java/com/das/modules/fdr/service/MinioViewsServcie.java index f42ef18c..af3372af 100644 --- a/das/src/main/java/com/das/modules/fdr/service/MinioViewsServcie.java +++ b/das/src/main/java/com/das/modules/fdr/service/MinioViewsServcie.java @@ -135,9 +135,9 @@ public class MinioViewsServcie { try { if (StringUtils.isBlank(directoryName)) { - build = ListObjectsArgs.builder().bucket(minioProperties.getBucket()).recursive(false).build(); + build = ListObjectsArgs.builder().bucket(minioProperties.getBucket()).recursive(true).build(); } else { - build = ListObjectsArgs.builder().bucket(minioProperties.getBucket()).prefix(directoryName+"/").recursive(false).build(); + build = ListObjectsArgs.builder().bucket(minioProperties.getBucket()).prefix(directoryName+"/").recursive(true).build(); } Iterable> results = minioClient.listObjects(build); for (Result result : results) { @@ -161,7 +161,7 @@ public class MinioViewsServcie { lastModifyTime = zonedDateTime.format(dateFormat); } if (parts.length > 0) { - String nodeName = parts[1]; + String nodeName = parts[2]; int type = isDir ? 0 : 1; itemName= isDir ? itemName.substring(0,itemName.lastIndexOf("/")) : itemName; FileNode node = new FileNode(nodeName, type,size,lastModifyTime,"/"+itemName); diff --git a/das/src/main/java/com/das/modules/plc/controller/PlcLogsController.java b/das/src/main/java/com/das/modules/plc/controller/PlcLogsController.java index 0c61e2b8..0e62697b 100644 --- a/das/src/main/java/com/das/modules/plc/controller/PlcLogsController.java +++ b/das/src/main/java/com/das/modules/plc/controller/PlcLogsController.java @@ -44,7 +44,7 @@ public class PlcLogsController { String code = jsonObject.getString("deviceCode"); String startTime = jsonObject.getString("startTime"); String endTime = jsonObject.getString("endTime"); - List result = plcLogService.getDirOrFileList("日志",code,startTime,endTime); + List result = plcLogService.getDirOrFileList("Statuscode",code,startTime,endTime); return R.success(result); } diff --git a/das/src/main/java/com/das/modules/record/domain/SysRecordLog.java b/das/src/main/java/com/das/modules/record/domain/SysRecordLog.java new file mode 100644 index 00000000..55a1e326 --- /dev/null +++ b/das/src/main/java/com/das/modules/record/domain/SysRecordLog.java @@ -0,0 +1,40 @@ +package com.das.modules.record.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +@TableName("sys_record_log") +@Data +@NoArgsConstructor +@AllArgsConstructor +public class SysRecordLog { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + @TableField("user_id") + private String userId; + + @TableField("user_name") + private String username; + + @TableField("group_by") + private String groupBy; + + @TableField("ip_address") + private String ipAddress; + + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField("opt_time") + private Date optTime; + + @TableField("opt_desc") + private String optDesc; +} diff --git a/das/src/main/java/com/das/modules/record/mapper/SysRecordLogMapper.java b/das/src/main/java/com/das/modules/record/mapper/SysRecordLogMapper.java new file mode 100644 index 00000000..d195464c --- /dev/null +++ b/das/src/main/java/com/das/modules/record/mapper/SysRecordLogMapper.java @@ -0,0 +1,10 @@ +package com.das.modules.record.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.das.modules.record.domain.SysRecordLog; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface SysRecordLogMapper extends BaseMapper { + +} diff --git a/das/src/main/java/com/das/modules/record/service/SysRecordLogService.java b/das/src/main/java/com/das/modules/record/service/SysRecordLogService.java new file mode 100644 index 00000000..92f35765 --- /dev/null +++ b/das/src/main/java/com/das/modules/record/service/SysRecordLogService.java @@ -0,0 +1,7 @@ +package com.das.modules.record.service; + +public interface SysRecordLogService { + + void createRecordLog(String group, String desc); + +} diff --git a/das/src/main/java/com/das/modules/record/service/impl/SysRecordLogServiceImpl.java b/das/src/main/java/com/das/modules/record/service/impl/SysRecordLogServiceImpl.java new file mode 100644 index 00000000..583ea5cb --- /dev/null +++ b/das/src/main/java/com/das/modules/record/service/impl/SysRecordLogServiceImpl.java @@ -0,0 +1,32 @@ +package com.das.modules.record.service.impl; + +import cn.dev33.satoken.stp.StpUtil; +import com.das.common.config.SessionUtil; +import com.das.modules.auth.domain.vo.SysUserVo; +import com.das.modules.plc.mapper.SysRunLogDescMapper; +import com.das.modules.record.domain.SysRecordLog; +import com.das.modules.record.mapper.SysRecordLogMapper; +import com.das.modules.record.service.SysRecordLogService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; + +@Service +public class SysRecordLogServiceImpl implements SysRecordLogService { + + @Autowired + private SysRecordLogMapper sysRecordLogMapper; + + @Override + public void createRecordLog(String group, String desc) { + SysRecordLog sysRecordLog = new SysRecordLog(); + SysUserVo sysUserVo = (SysUserVo) StpUtil.getTokenSession().get(SessionUtil.SESSION_USER_KEY); + sysRecordLog.setUsername(sysUserVo.getAccount()); + sysRecordLog.setUserId(sysUserVo.getAccount()); + sysRecordLog.setOptTime(new Date()); + sysRecordLog.setGroupBy(group); + sysRecordLog.setOptDesc(desc); + sysRecordLogMapper.insert(sysRecordLog); + } +} diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 2dbc8451..b367dba9 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -13,5 +13,5 @@ - [报表管理](api/pages/report.md) - [数据采集](datacollect/) - [系统部署](deploy/) - - [Linux系统部署](deploy/linux.md) - - [TDEngine3部署](deploy/tdengine3.md) \ No newline at end of file + - [OpenEuler系统安装](deploy/linux.md) + - [DAS部署](deploy/das.md) \ No newline at end of file diff --git a/docs/datacollect/README.md b/docs/datacollect/README.md index 5b440a43..106f3c71 100644 --- a/docs/datacollect/README.md +++ b/docs/datacollect/README.md @@ -98,7 +98,9 @@ PS: 同一节点只允许建立一条连接。 //限值2上限 "limit2High": 999.0, //限值2下限 - "limit2Low": 0.0 + "limit2Low": 0.0, + //强制归档,default: 0 + "forceArchive": 1 } }, { @@ -106,7 +108,9 @@ PS: 同一节点只允许建立一条连接。 "type": "yx", "params": { //是否取反,default: 0 - "invert": 0 + "invert": 0, + //强制归档,default: 0 + "forceArchive": 1 } } ], diff --git a/docs/deploy/asserts/image-4.png b/docs/deploy/asserts/image-diskmgr.png similarity index 100% rename from docs/deploy/asserts/image-4.png rename to docs/deploy/asserts/image-diskmgr.png diff --git a/docs/deploy/asserts/image-10.png b/docs/deploy/asserts/image-language.png similarity index 100% rename from docs/deploy/asserts/image-10.png rename to docs/deploy/asserts/image-language.png diff --git a/docs/deploy/asserts/image-3.png b/docs/deploy/asserts/image-mainmenu.png similarity index 100% rename from docs/deploy/asserts/image-3.png rename to docs/deploy/asserts/image-mainmenu.png diff --git a/docs/deploy/asserts/image-5.png b/docs/deploy/asserts/image-partitions.png similarity index 100% rename from docs/deploy/asserts/image-5.png rename to docs/deploy/asserts/image-partitions.png diff --git a/docs/deploy/asserts/image-6.png b/docs/deploy/asserts/image-partitions01.png similarity index 100% rename from docs/deploy/asserts/image-6.png rename to docs/deploy/asserts/image-partitions01.png diff --git a/docs/deploy/asserts/image-7.png b/docs/deploy/asserts/image-partitions02.png similarity index 100% rename from docs/deploy/asserts/image-7.png rename to docs/deploy/asserts/image-partitions02.png diff --git a/docs/deploy/asserts/image-9.png b/docs/deploy/asserts/image-partitions03.png similarity index 100% rename from docs/deploy/asserts/image-9.png rename to docs/deploy/asserts/image-partitions03.png diff --git a/docs/deploy/asserts/image-11.png b/docs/deploy/asserts/image-software.png similarity index 100% rename from docs/deploy/asserts/image-11.png rename to docs/deploy/asserts/image-software.png diff --git a/docs/deploy/asserts/image1.png b/docs/deploy/asserts/image-tdinst01.png similarity index 100% rename from docs/deploy/asserts/image1.png rename to docs/deploy/asserts/image-tdinst01.png diff --git a/docs/deploy/asserts/image2.png b/docs/deploy/asserts/image-tdinst02.png similarity index 100% rename from docs/deploy/asserts/image2.png rename to docs/deploy/asserts/image-tdinst02.png diff --git a/docs/deploy/asserts/image.png b/docs/deploy/asserts/image-tdinst03.png similarity index 100% rename from docs/deploy/asserts/image.png rename to docs/deploy/asserts/image-tdinst03.png diff --git a/docs/deploy/asserts/image-1.png b/docs/deploy/asserts/image-tdinst04.png similarity index 100% rename from docs/deploy/asserts/image-1.png rename to docs/deploy/asserts/image-tdinst04.png diff --git a/docs/deploy/asserts/image-2.png b/docs/deploy/asserts/image-welcome.png similarity index 100% rename from docs/deploy/asserts/image-2.png rename to docs/deploy/asserts/image-welcome.png diff --git a/docs/deploy/das.md b/docs/deploy/das.md new file mode 100644 index 00000000..73850206 --- /dev/null +++ b/docs/deploy/das.md @@ -0,0 +1,174 @@ +# DAS系统部署 + +## TDEngine3 安装部署 + +> 当前版本: 3.3.2.0 + +### 安装包确认 + +请确认安装包是否已经在`/das/install`目录下 + +`TDengine-server-3.3.2.0-Linux-x64.tar.gz` - TDEngine 3.3.2.0 官方安装包 [下载地址](https://oss.jsspisoft.com/public/software/tdengine3/TDengine-server-3.3.2.0-Linux-x64.tar.gz) + +可以通过下面的命令获取安装包 + +```shell +wget https://oss.jsspisoft.com/public/software/tdengine3/TDengine-server-3.3.2.0-Linux-x64.tar.gz +``` + +`td3.3.2.13_openeuler_patch.tar.gz` - TDEngine 3.3.2.13 OpenEuler补丁包 [下载地址](https://oss.jsspisoft.com/public/software/tdengine3/td3.3.2.13_openeuler_patch.tar.gz) + +可以通过下面的命令获取安装包 + +```shell +wget https://oss.jsspisoft.com/public/software/tdengine3/td3.3.2.13_openeuler_patch.tar.gz +``` + + + +### TDEngine3安装 + +1. 先解压TDEngine3官方安装包 + +```shell +cd /das/install/ + +tar zxvf TDengine-server-3.3.2.0-Linux-x64.tar.gz +``` + +2. 运行安装脚本 + +```shell +cd TDengine-server-3.3.2.0 + +./install.sh +``` + +![alt text](asserts/image-tdinst01.png) + +这里输入服务器的IP地址。 + +![alt text](asserts/image-tdinst02.png) + +这里直接回车即可。 + +![alt text](asserts/image-tdinst03.png) + +继续回车。 + +![alt text](asserts/image-tdinst04.png) + +看到上图的内容,TDEngine官方安装包就安装完毕了,下面运行补丁。 + +```shell +cd /das/install + +tar zxvf td3.3.2.13_openeuler_patch.tar.gz +``` + +执行补丁脚本 + +```shell +cd patch + +./apply_patch.sh +``` + +> PS. 此脚本会更改TDEngine的默认数据目录为/das/data/tddata + +### TDEngine3启停 + +```sh +systemctl start taosd + +systemctl stop taosd + +systemctl restart taosd +``` + +开机自启 + +```shell +systemctl enable taosd +``` + +### + +这样就完成了TDEngine3.3.2.13的安装。 + +## PostgreSQL 安装配置 + +```shell +yum install postgresql-server -y +mkdir /das/data/pgdata +chown postgres:postgres /das/data/pgdata +```` + +### 修改数据文件位置 +编辑`/usr/lib/systemd/system/postgresql.service`文件 + +将PGDATA改为下面的内容 +```systemdS +Environment=PGDATA=/das/data/pgdata +``` + +### 初始话数据库 + +```shell +postgresql-setup initdb +systemctl start postgresql +``` + +### 配置文件修改 + +修改访问权限配置, 编辑文件`/das/data/pgdata/pg_hba.conf`,修改为 +![alt text](image.png) + +修改数据监听端口,编辑文件`/das/data/pgdata/postgresql.conf`,修改为 +![alt text](image-1.png) + +### 服务自启 +```shell +systemctl enable postgresql +``` + +### 数据库初始化 + +```shell +su - postgres +``` + +### Redis安装配置 + +```shell +yum install redis6 -y +``` + +### 配置文件修改 +编辑文件`/etc/redis/redis.conf`,修改为 +![alt text](image-2.png) +第一处修改数据文件dump位置 + +![alt text](image-3.png) +第二处修改redis密码 + +![alt text](image-4.png) +第三处修改redis监听端口 + +### 服务启动与自启 + +```shell +systemctl start redis +systemctl enable redis +``` + +### 防火墙配置 + +```shell +firewall-cmd --zone=public --add-port=6379/tcp --permanent +firewall-cmd --reload +``` + + +## minio安装配置 + diff --git a/docs/deploy/image-1.png b/docs/deploy/image-1.png new file mode 100644 index 00000000..a411a4bb Binary files /dev/null and b/docs/deploy/image-1.png differ diff --git a/docs/deploy/image-2.png b/docs/deploy/image-2.png new file mode 100644 index 00000000..05d5664a Binary files /dev/null and b/docs/deploy/image-2.png differ diff --git a/docs/deploy/image-3.png b/docs/deploy/image-3.png new file mode 100644 index 00000000..8e655b6d Binary files /dev/null and b/docs/deploy/image-3.png differ diff --git a/docs/deploy/image-4.png b/docs/deploy/image-4.png new file mode 100644 index 00000000..b9fa038a Binary files /dev/null and b/docs/deploy/image-4.png differ diff --git a/docs/deploy/image.png b/docs/deploy/image.png new file mode 100644 index 00000000..a32cc3d8 Binary files /dev/null and b/docs/deploy/image.png differ diff --git a/docs/deploy/linux.md b/docs/deploy/linux.md index 60ba4e0a..c729cdce 100644 --- a/docs/deploy/linux.md +++ b/docs/deploy/linux.md @@ -4,11 +4,11 @@ OpenEuler的安装和Centos差不多,这里不详细说明了,就把几个建议步骤说下,这样可以减少后期手动配置的麻烦。 -![alt text](asserts/image-2.png) +![alt text](asserts/image-welcome.png) > 语言这里选 `English`。 -![alt text](asserts/image-3.png) +![alt text](asserts/image-mainmenu.png) > `Keyboard` 不修改。 @@ -16,29 +16,29 @@ OpenEuler的安装和Centos差不多,这里不详细说明了,就把几个 > `Installation Destination` 这里要配置磁盘分区。(不是一定要这样配置,会的随意配置) -![alt text](asserts/image-4.png) +![alt text](asserts/image-diskmgr.png) -![alt text](asserts/image-5.png) +![alt text](asserts/image-partitions.png) -![alt text](asserts/image-6.png) +![alt text](asserts/image-partitions01.png) 点左下角的`+`,新建分区 -![alt text](asserts/image-7.png) +![alt text](asserts/image-partitions02.png) `Mount Point`填: /das, 大小不用填,默认会使用剩余所有空间。 -![alt text](asserts/image-9.png) +![alt text](asserts/image-partitions03.png) 点击 `Done`完成分区配置。 > `Language Support` 这个需要勾上中文。 -![alt text](asserts/image-10.png) +![alt text](asserts/image-language.png) > `Software Selection` 这里基础环境选择"Server", 右侧再勾上一个开发工具包,以防后续内网环境下编译安装程序时需要。 -![alt text](asserts/image-11.png) +![alt text](asserts/image-software.png) > `Network & Hostname` 根据实际情况配置。 @@ -49,7 +49,15 @@ OpenEuler的安装和Centos差不多,这里不详细说明了,就把几个 ## 系统配置 ### 更新系统(不能访问外网请忽略) - +首先切换系统yum源为国内地址,加快更新速度。 +```bash +sed -e 's|http://repo.openeuler.org/|https://mirrors.ustc.edu.cn/openeuler/|g' \ -e 's|https://mirrors.openeuler.org/|https://mirrors.ustc.edu.cn/openeuler/|g' \ -i.bak \ /etc/yum.repos.d/openEuler.repo +``` +创建索引缓存 +```bash +yum makecache +``` +执行更新操作 ```bash yum update -y ``` @@ -67,9 +75,10 @@ setenforce 0 sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config ``` -### 关闭防火墙 +### 关闭防火墙(根据情况) ```bash systemctl stop firewalld systemctl disable firewalld -``` \ No newline at end of file +``` + diff --git a/docs/deploy/tdengine3.md b/docs/deploy/tdengine3.md deleted file mode 100644 index 25164801..00000000 --- a/docs/deploy/tdengine3.md +++ /dev/null @@ -1,63 +0,0 @@ -# TDEngine3 安装部署 - -> 当前版本: 3.3.2.0 - -## 安装包确认 - -请确认安装包是否已经在`/das/install`目录下 - -`TDengine-server-3.3.2.0-Linux-x64.tar.gz` - TDEngine 3.3.2.0 官方安装包 - -`td3.3.2.13_openeuler_patch.tar.gz` - TDEngine 3.3.2.13 OpenEuler补丁包 - -## TDEngine3安装 - -1. 先解压TDEngine3官方安装包 - -```shell -cd /das/install/ - -tar zxvf TDengine-server-3.3.2.0-Linux-x64.tar.gz -``` - -2. 运行安装脚本 - -```shell -cd TDengine-server-3.3.2.0 - -./install.sh -``` - -![alt text](asserts/image1.png) - -这里输入服务器的IP地址。 - -![alt text](asserts/image2.png) - -这里直接回车即可。 - -![alt text](asserts/image.png) - -继续回车。 - -![alt text](asserts/image-1.png) - -看到上图的内容,TDEngine官方安装包就安装完毕了,下面运行补丁。 - -```shell -cd /das/install - -tar zxvf td3.3.2.13_openeuler_patch.tar.gz -``` - -执行补丁脚本 - -```shell -cd patch - -./apply_patch.sh -``` - -> PS. 此脚本会更改TDEngine的默认数据目录为/das/data/tddata - -这样就完成了TDEngine3.3.2.13的安装。 \ No newline at end of file diff --git a/ui/dasadmin/src/views/backend/statAnalysis/powerCurveAnalysis.vue b/ui/dasadmin/src/views/backend/statAnalysis/powerCurveAnalysis.vue index 8994d7be..7f7709cb 100644 --- a/ui/dasadmin/src/views/backend/statAnalysis/powerCurveAnalysis.vue +++ b/ui/dasadmin/src/views/backend/statAnalysis/powerCurveAnalysis.vue @@ -338,7 +338,6 @@ const statAnalysisOperate = () => { type: 'scatter', data: seriesData, name: '实际值', - smooth: true, symbolSize: 5, symbol: 'circle', } diff --git a/ui/dasadmin/src/views/backend/statAnalysis/trendAnalysis.vue b/ui/dasadmin/src/views/backend/statAnalysis/trendAnalysis.vue index f6da1260..62b711d9 100644 --- a/ui/dasadmin/src/views/backend/statAnalysis/trendAnalysis.vue +++ b/ui/dasadmin/src/views/backend/statAnalysis/trendAnalysis.vue @@ -512,6 +512,7 @@ const historyDataReq = (promises: any) => { data: yData.map((value: any) => ({ value: getCutDecimalsValue(value, 2), })), + smooth: true, symbolSize: 5, symbol: 'circle', } diff --git a/ui/dasadmin/src/views/backend/statAnalysis/trendComparison.vue b/ui/dasadmin/src/views/backend/statAnalysis/trendComparison.vue index 2705f4ef..6f463df2 100644 --- a/ui/dasadmin/src/views/backend/statAnalysis/trendComparison.vue +++ b/ui/dasadmin/src/views/backend/statAnalysis/trendComparison.vue @@ -37,7 +37,7 @@
- +
风机列表 @@ -49,23 +49,35 @@ v-model:selection="selectedLeft" @selection-change="handleSelectionChange" row-key="irn" + class="windtable" > - - + + + + + + - - + +
- +
可添加的测点 @@ -83,7 +95,7 @@ row-key="id" class="attrtable" > - + @@ -202,9 +214,11 @@ onMounted(() => { }) const tableDataLeft = ref([]) const tableDataRight = ref([]) +const tableDataMid = ref([]) const iotModelId = ref('') const selectedLeft = ref([]) const selectedRight = ref([]) +const selectedMid = ref([]) const radioActiveName = ref(138) const attributeTableRef = ref() @@ -225,9 +239,10 @@ const queryWindTurbines = () => { }) if (resData.length) { iotModelId.value = resData[0]['modelId'] - const middleIndex = Math.ceil(resData.length / 2) + const middleIndex = Math.floor(resData.length / 3) tableDataLeft.value = resData.slice(0, middleIndex) - tableDataRight.value = resData.slice(middleIndex) + tableDataMid.value = resData.slice(middleIndex, middleIndex * 2) + tableDataRight.value = resData.slice(middleIndex * 2) } resolve(resData[0]) } else { @@ -388,6 +403,9 @@ const openMeasure = () => { const handleSelectionChange1 = (val: any) => { selectedRight.value = val } +const handleSelectionChange2 = (val: any) => { + selectedMid.value = val +} const handleSelectionChange = (val: any) => { selectedLeft.value = val } @@ -404,7 +422,7 @@ function generateDeviceAttributes(devices: any, attributes: any) { } const statAnalysisOperate = () => { - const allDevices = [...selectedLeft.value, ...selectedRight.value] + const allDevices = [...selectedLeft.value, ...selectedMid.value, ...selectedRight.value] if (!statAnalysisTime.value) { ElMessage.info('请选择查询时间!') return @@ -425,7 +443,7 @@ const statAnalysisOperate = () => { } const calculate: any = ref([{ max: '', min: '', average: '' }]) const historyDataReq = (data: any) => { - const selectAllDevices = [...selectedLeft.value, ...selectedRight.value].sort((a: any, b: any) => { + const selectAllDevices = [...selectedLeft.value, ...selectedMid.value, ...selectedRight.value].sort((a: any, b: any) => { return a.index - b.index }) historyReq(data) @@ -459,6 +477,7 @@ const historyDataReq = (data: any) => { value: getCutDecimalsValue(value, 2), unit: unit, // 将单位添加到每个数据点 })), + smooth: true, symbolSize: 5, symbol: 'circle', } @@ -506,7 +525,7 @@ const statAnalysisExport = () => { } const getRequestData = () => { - const devices = generateDeviceAttributes([...selectedLeft.value, ...selectedRight.value], multipleSelection.value) + const devices = generateDeviceAttributes([...selectedLeft.value, ...selectedMid.value, ...selectedRight.value], multipleSelection.value) const requestData = { devices: devices, interval: statAnalysisInterval.value || '5m', @@ -673,7 +692,9 @@ const timestampToTime = (timestamp: any) => { border-bottom: 1px solid #e1edf6; border-radius: 6px 6px 0 0; } - + .windtable { + height: 721px; + } .mainPart { display: flex; padding: 10px;