Explorar o código

add 可视化

18339543638 %!s(int64=4) %!d(string=hai) anos
pai
achega
18090af0c3
Modificáronse 14 ficheiros con 335 adicións e 91 borrados
  1. 5 0
      jetlinks-components/network-component/network-core/src/main/java/org/jetlinks/community/support/JetlinksExtendTopicMessageCodec.java
  2. 9 0
      jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/entity/DeviceTagEntity.java
  3. 1 0
      jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/entity/geo/GeoProperty.java
  4. 22 31
      jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/service/DeviceMessageBusinessHandler.java
  5. 69 55
      jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/service/DeviceTagsService.java
  6. 1 0
      jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/service/LocalDeviceInstanceService.java
  7. 4 4
      jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/web/DeviceInstanceController.java
  8. 41 0
      jetlinks-manager/visualization-manager/src/main/java/org/jetlinks/community/visualization/entity/VisualizationCategory.java
  9. 26 0
      jetlinks-manager/visualization-manager/src/main/java/org/jetlinks/community/visualization/entity/VisualizationConfigEntity.java
  10. 14 0
      jetlinks-manager/visualization-manager/src/main/java/org/jetlinks/community/visualization/service/VisualizationCategoryService.java
  11. 32 0
      jetlinks-manager/visualization-manager/src/main/java/org/jetlinks/community/visualization/web/SystemController.java
  12. 104 0
      jetlinks-manager/visualization-manager/src/main/java/org/jetlinks/community/visualization/web/VisualizationCategoryController.java
  13. 1 0
      jetlinks-standalone/src/main/java/org/jetlinks/community/standalone/JetLinksApplication.java
  14. 6 1
      jetlinks-standalone/src/main/resources/application.yml

+ 5 - 0
jetlinks-components/network-component/network-core/src/main/java/org/jetlinks/community/support/JetlinksExtendTopicMessageCodec.java

@@ -49,6 +49,8 @@ public class JetlinksExtendTopicMessageCodec {
         private boolean timeSyncReply;
         private boolean direct;
 
+        private boolean tag;
+
         private boolean log;
         public DecodeResult(String topic) {
             this.topic = topic;
@@ -74,6 +76,7 @@ public class JetlinksExtendTopicMessageCodec {
             } else if (reportFirmware = topic.endsWith("firmware/report")) {
             } else if (readFirmwareReply = topic.endsWith("firmware/read/reply")) {
             } else if (derivedMetadata = topic.endsWith("metadata/derived")) {
+            } else if(  tag= topic.endsWith("/tags")){
             }
             if(timeSync=topic.endsWith("/time-sync")){
 
@@ -215,6 +218,8 @@ public class JetlinksExtendTopicMessageCodec {
             message=object.toJavaObject(TimeSyncReplyMessage.class);
         }else if(result.isLog()){
             message=object.toJavaObject(LogMessage.class);
+        }else if(result.isTag()){
+            message=object.toJavaObject(UpdateTagMessage.class);
         }
 
         if (result.isChild()) {

+ 9 - 0
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/entity/DeviceTagEntity.java

@@ -1,6 +1,7 @@
 package org.jetlinks.community.device.entity;
 
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Getter;
 import lombok.Setter;
@@ -18,6 +19,7 @@ import org.jetlinks.core.metadata.PropertyMetadata;
 import javax.persistence.Column;
 import javax.persistence.Index;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 import javax.validation.constraints.NotBlank;
 import java.util.Date;
 
@@ -65,6 +67,13 @@ public class DeviceTagEntity extends GenericEntity<String> {
     @Schema(description = "说明")
     private String description;
 
+    /**
+     * 插入失败后是否自动更新
+     */
+    @JsonIgnore
+    @Transient
+    private boolean autoUpdate;
+
 
     public static DeviceTagEntity of(PropertyMetadata property) {
        DeviceTagEntity entity = new DeviceTagEntity();

+ 1 - 0
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/entity/geo/GeoProperty.java

@@ -12,6 +12,7 @@ import org.hswebframework.web.validator.CreateGroup;
 import javax.persistence.Column;
 import javax.persistence.Index;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 import javax.validation.constraints.NotBlank;
 import java.sql.JDBCType;
 import java.util.*;

+ 22 - 31
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/service/DeviceMessageBusinessHandler.java

@@ -4,7 +4,6 @@ import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.MapUtils;
 import org.hswebframework.ezorm.rdb.mapping.ReactiveRepository;
-import org.jetlinks.community.dashboard.SimpleMeasurementValue;
 import org.jetlinks.community.device.entity.DeviceInstanceEntity;
 import org.jetlinks.community.device.entity.DeviceTagEntity;
 import org.jetlinks.community.device.enums.DeviceFeature;
@@ -17,6 +16,7 @@ import org.jetlinks.core.event.EventBus;
 import org.jetlinks.core.event.Subscription;
 import org.jetlinks.core.message.*;
 import org.jetlinks.core.metadata.DeviceMetadata;
+import org.jetlinks.core.metadata.types.GeoType;
 import org.jetlinks.core.utils.FluxUtils;
 import org.jetlinks.reactor.ql.utils.CastUtils;
 import org.jetlinks.supports.official.JetLinksDeviceMetadataCodec;
@@ -30,10 +30,8 @@ import reactor.core.scheduler.Schedulers;
 
 import javax.annotation.PostConstruct;
 import java.time.Duration;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.function.Function;
 
 @Component
 @AllArgsConstructor
@@ -50,6 +48,8 @@ public class DeviceMessageBusinessHandler {
 
     private final EventBus eventBus;
 
+    private final DeviceTagsService tagsService;
+
     private Mono<DeviceOperator> doAutoRegister(DeviceRegisterMessage message) {
         //自动注册
         return Mono
@@ -191,32 +191,23 @@ public class DeviceMessageBusinessHandler {
     public Mono<Void> updateDeviceTag(UpdateTagMessage message) {
         Map<String, Object> tags = message.getTags();
         String deviceId = message.getDeviceId();
-
-        return registry
-            .getDevice(deviceId)
-            .flatMap(DeviceOperator::getMetadata)
-            .flatMapMany(metadata -> Flux
-                .fromIterable(tags.entrySet())
-                .map(e -> {
-                    DeviceTagEntity tagEntity = metadata
-                        .getTag(e.getKey())
-                        .map(tagMeta -> DeviceTagEntity.of(tagMeta, e.getValue()))
-                        .orElseGet(() -> {
-                            DeviceTagEntity entity = new DeviceTagEntity();
-                            entity.setKey(e.getKey());
-                            entity.setType("string");
-                            entity.setName(e.getKey());
-                            entity.setCreateTime(new Date());
-                            entity.setDescription("设备上报");
-                            entity.setValue(String.valueOf(e.getValue()));
-                            return entity;
-                        });
-                    tagEntity.setDeviceId(deviceId);
-                    tagEntity.setId(DeviceTagEntity.createTagId(deviceId, tagEntity.getKey()));
-                    return tagEntity;
-                }))
-            .as(tagRepository::save)
-            .then();
+        List<DeviceTagEntity> tagList = new ArrayList<>();
+        tags.forEach((key,value)->{
+            DeviceTagEntity deviceTagEntity = new DeviceTagEntity();
+            deviceTagEntity.setKey(key);
+            deviceTagEntity.setValue(String.valueOf(value));
+            deviceTagEntity.setDeviceId(deviceId);
+            deviceTagEntity.setCreateTime(new Date());
+            if("coordinate".equals(key)){
+                deviceTagEntity.setType(GeoType.ID);
+            }
+            tagList.add(deviceTagEntity);
+        });
+        return Flux.fromStream(tagList.stream())
+            .map(Flux::just)
+            .flatMap(Function.identity())
+            .doOnNext(tag->tag.setAutoUpdate(true))
+            .flatMap(tagsService::saveOrUpdate).then();
     }
 
     @Subscribe("/device/*/*/metadata/derived")

+ 69 - 55
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/service/DeviceTagsService.java

@@ -1,15 +1,13 @@
 package org.jetlinks.community.device.service;
 
-import cn.hutool.core.util.StrUtil;
 import lombok.AllArgsConstructor;
 import org.hswebframework.ezorm.rdb.mapping.ReactiveRepository;
-import org.hswebframework.ezorm.rdb.mapping.defaults.SaveResult;
 import org.hswebframework.web.crud.service.GenericReactiveCrudService;
+import org.hswebframework.web.exception.BusinessException;
 import org.jetlinks.community.device.entity.DeviceTagEntity;
 import org.jetlinks.community.device.entity.geo.GeoProperty;
 import org.jetlinks.community.device.entity.geo.Geometry;
 import org.jetlinks.core.metadata.types.GeoType;
-import org.reactivestreams.Publisher;
 import org.springframework.stereotype.Service;
 import reactor.core.publisher.Mono;
 
@@ -28,58 +26,74 @@ public class DeviceTagsService  extends GenericReactiveCrudService<DeviceTagEnti
     private final LocalDeviceProductService productService;
     private final ReactiveRepository<GeoProperty, String> propertyRepository;
 
-    public Mono<Void> saveOrUpdate(Publisher<DeviceTagEntity> entityPublisher) {
-        return Mono.from(entityPublisher)
-            //判断地理位置
-            .doOnNext(entity->{
-                if (judgementGeo(entity)) {
-                    GeoProperty geoProperty = new GeoProperty();
-                    Geometry geometry = new Geometry();
-                    String[] split = entity.getValue().split(",");
-                    geometry.getCoordinates().add(split[0]);
-                    geometry.getCoordinates().add(split[1]);
-                    geometry.setType("Point");
-                    instanceService.findById(entity.getDeviceId())
-                        .flatMap(device->{
-                            geoProperty.setFrom("tag");
-                            geoProperty.setFromId(entity.getId());
-                            geoProperty.setObjectId(device.getId());
-                            geoProperty.setObjectType("device");
-                            geoProperty.setDeviceName(device.getName());
-                            return productService.findById(device.getProductId());
-                        })
-                        .doOnNext(product->{
-                            geoProperty.setProductName(product.getName());
-                            geoProperty.setProductId(product.getId());
-                            geoProperty.setGeometry(geometry);
-                        })
-                        .subscribe(ignore->{
-                            propertyRepository.createQuery()
-                                .where(GeoProperty::getFrom,"tag")
-                                .where(GeoProperty::getFromId,entity.getId())
-                                .count()
-                                .flatMap(count->{
-                                    if(count==0){
-                                        return propertyRepository.save(geoProperty);
-                                    }else {
-                                        return propertyRepository.createUpdate()
-                                            .where(GeoProperty::getFrom,"tag")
-                                            .where(GeoProperty::getFromId,entity.getId())
-                                            .set(GeoProperty::getGeometry,geometry)
-                                            .execute();
-                                    }
-                                })
-                                .subscribe();
-                        });
-                }
-            })
-            .flatMap(entity->{
-                if(StrUtil.isNotEmpty(entity.getId())){
-                    return this.updateById(entity.getId(),Mono.just(entity));
-                }
-                return this.getRepository().save(entity);
-            })
-            .then();
+    public Mono<Void> saveOrUpdate(DeviceTagEntity entity) {
+        return
+            //先判断是否存在
+            this.createQuery()
+                .where(DeviceTagEntity::getKey,entity.getKey())
+                .where(DeviceTagEntity::getDeviceId,entity.getDeviceId())
+                .count()
+                .flatMap(count->{
+                    if(count==0){
+                        return getRepository()
+                                .save(entity)
+                                .then();
+                    }
+                    else if(!entity.isAutoUpdate()){
+                        //存在且不能自动更新
+                        throw new BusinessException(String.format("标签[%s]已存在",entity.getKey()));
+                    }else {
+                        return this.createUpdate()
+                            .where(DeviceTagEntity::getKey,entity.getKey())
+                            .where(DeviceTagEntity::getDeviceId,entity.getDeviceId())
+                            .set(DeviceTagEntity::getValue,entity.getValue())
+                            .execute()
+                            .then();
+                    }
+                })
+                .doOnNext(ignore->{
+                    if (judgementGeo(entity)) {
+                        GeoProperty geoProperty = new GeoProperty();
+                        Geometry geometry = new Geometry();
+                        String[] split = entity.getValue().split(",");
+                        geometry.getCoordinates().add(split[0]);
+                        geometry.getCoordinates().add(split[1]);
+                        geometry.setType("Point");
+                        instanceService.findById(entity.getDeviceId())
+                            .flatMap(device->{
+                                geoProperty.setFrom("tag");
+                                geoProperty.setFromId(entity.getId());
+                                geoProperty.setObjectId(device.getId());
+                                geoProperty.setObjectType("device");
+                                geoProperty.setDeviceName(device.getName());
+                                return productService.findById(device.getProductId());
+                            })
+                            .doOnNext(product->{
+                                geoProperty.setProductName(product.getName());
+                                geoProperty.setProductId(product.getId());
+                                geoProperty.setGeometry(geometry);
+                            })
+                            .subscribe(ignore0->{
+                                propertyRepository.createQuery()
+                                    .where(GeoProperty::getFrom,"tag")
+                                    .where(GeoProperty::getFromId,entity.getId())
+                                    .count()
+                                    .flatMap(count->{
+                                        if(count==0){
+                                            return propertyRepository.save(geoProperty);
+                                        }else {
+                                            return propertyRepository.createUpdate()
+                                                .where(GeoProperty::getFrom,"tag")
+                                                .where(GeoProperty::getFromId,entity.getId())
+                                                .set(GeoProperty::getGeometry,geometry)
+                                                .execute();
+                                        }
+                                    })
+                                    .subscribe();
+                            });
+                    }
+                })
+                .then();
     }
 
     //判断是否为设备坐标标签

+ 1 - 0
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/service/LocalDeviceInstanceService.java

@@ -37,6 +37,7 @@ import org.jetlinks.core.message.property.ReadPropertyMessageReply;
 import org.jetlinks.core.message.property.ReportPropertyMessage;
 import org.jetlinks.core.message.property.WritePropertyMessageReply;
 import org.jetlinks.core.metadata.*;
+import org.jetlinks.core.metadata.types.GeoType;
 import org.jetlinks.core.metadata.types.StringType;
 import org.jetlinks.supports.official.JetLinksDeviceMetadataCodec;
 import org.reactivestreams.Publisher;

+ 4 - 4
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/web/DeviceInstanceController.java

@@ -340,7 +340,7 @@ public class DeviceInstanceController implements
                     .execute()
                     .subscribe()
             ).filter(tagsService::judgementGeo)
-            .map(tag->
+            .doOnNext(tag->
                 propertyRepository
                     .createDelete()
                     .where(GeoProperty::getFromId,tagId)
@@ -426,14 +426,14 @@ public class DeviceInstanceController implements
     @SaveAction
     @Operation(summary = "保存设备标签")
     public Flux<DeviceTagEntity> saveDeviceTag(@PathVariable @Parameter(description = "设备ID") String deviceId,
-                                               @RequestBody Flux<DeviceTagEntity> tags) {
-        return tags
+                                               @RequestBody DeviceTagEntity tags) {
+        return Flux.just(tags)
             .doOnNext(tag -> {
                 tag.setId(DeviceTagEntity.createTagId(deviceId, tag.getKey()));
                 tag.setDeviceId(deviceId);
                 tag.tryValidate();
             })
-            .as(tagsService::saveOrUpdate)
+            .flatMap(tagsService::saveOrUpdate)
             .onErrorMap(DuplicateKeyException.class, err -> new BusinessException("标签不可重复添加", err))
             .thenMany(getDeviceTags(deviceId));
     }

+ 41 - 0
jetlinks-manager/visualization-manager/src/main/java/org/jetlinks/community/visualization/entity/VisualizationCategory.java

@@ -0,0 +1,41 @@
+package org.jetlinks.community.visualization.entity;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+import org.hswebframework.web.api.crud.entity.GenericTreeSortSupportEntity;
+
+import javax.persistence.Column;
+import javax.persistence.Table;
+import java.util.List;
+
+@Table(name = "visualization_cate")
+@Data
+public class VisualizationCategory extends GenericTreeSortSupportEntity<String> {
+
+    @Schema(description = "ID")
+    @Column(name = "id")
+    private String id;
+
+    @Schema(description = "标识")
+    @Column(name = "key")
+    private String key;
+
+    @Schema(description = "名称")
+    @Column(name = "name")
+    private String name;
+
+    @Schema(description = "父节点标识")
+    @Column(name = "parent_id")
+    private String parentId;
+
+    @Schema(description = "描述")
+    @Column(name = "description")
+    private String description;
+
+    @Schema(description = "子节点")
+    private List<VisualizationCategory> children;
+
+
+}

+ 26 - 0
jetlinks-manager/visualization-manager/src/main/java/org/jetlinks/community/visualization/entity/VisualizationConfigEntity.java

@@ -0,0 +1,26 @@
+package org.jetlinks.community.visualization.entity;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.*;
+/**
+ * @author lifang
+ * @version 1.0.0
+ * @ClassName VisualizationConfigEntity.java
+ * @Description 大屏路径配置
+ * @createTime 2021年10月09日 09:35:00
+ */
+@Data
+@ConfigurationProperties(prefix = "visual")
+public class VisualizationConfigEntity {
+    /**
+     * 后端路径
+     */
+    private String basePath;
+    /**
+     * 大屏前端路径
+     */
+    private Map<String,Object> urls;
+}

+ 14 - 0
jetlinks-manager/visualization-manager/src/main/java/org/jetlinks/community/visualization/service/VisualizationCategoryService.java

@@ -0,0 +1,14 @@
+package org.jetlinks.community.visualization.service;
+
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.hswebframework.web.crud.service.GenericReactiveCrudService;
+import org.jetlinks.community.visualization.entity.VisualizationCategory;
+import org.springframework.stereotype.Service;
+
+@Service
+@Slf4j
+@AllArgsConstructor
+public class VisualizationCategoryService extends GenericReactiveCrudService<VisualizationCategory, String> {
+
+}

+ 32 - 0
jetlinks-manager/visualization-manager/src/main/java/org/jetlinks/community/visualization/web/SystemController.java

@@ -0,0 +1,32 @@
+package org.jetlinks.community.visualization.web;
+
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.AllArgsConstructor;
+import org.hswebframework.web.authorization.annotation.Authorize;
+import org.hswebframework.web.authorization.annotation.QueryAction;
+import org.hswebframework.web.authorization.annotation.Resource;
+import org.jetlinks.community.visualization.entity.VisualizationConfigEntity;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.web.bind.annotation.*;
+import reactor.core.publisher.Mono;
+
+@RequestMapping("/system")
+@RestController
+@Resource(id = "system", name = "大屏系统配置")
+@Authorize
+@Tag(name = "系统配置")
+@AllArgsConstructor
+@EnableConfigurationProperties(VisualizationConfigEntity.class)
+public class SystemController {
+
+    private final VisualizationConfigEntity config;
+    @GetMapping("/apis")
+    @QueryAction
+    @Operation(summary = "获取大屏配置信息")
+    public Mono<VisualizationConfigEntity> getFrontConfig() {
+        return Mono.just(config);
+    }
+
+
+}

+ 104 - 0
jetlinks-manager/visualization-manager/src/main/java/org/jetlinks/community/visualization/web/VisualizationCategoryController.java

@@ -0,0 +1,104 @@
+package org.jetlinks.community.visualization.web;
+
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.hswebframework.web.api.crud.entity.TreeSupportEntity;
+import org.hswebframework.web.crud.service.ReactiveCrudService;
+import org.hswebframework.web.crud.web.reactive.ReactiveServiceCrudController;
+import org.hswebframework.web.exception.BusinessException;
+import org.jetlinks.community.visualization.entity.VisualizationCategory;
+import org.jetlinks.community.visualization.service.VisualizationCategoryService;
+import org.springframework.web.bind.annotation.*;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+@RestController
+@RequestMapping("/visualization/catalog")
+@Slf4j
+@AllArgsConstructor
+@Tag(name = "设备分类目录")
+public class VisualizationCategoryController implements
+    ReactiveServiceCrudController<VisualizationCategory, String> {
+
+    private final VisualizationCategoryService service;
+    @Override
+    public ReactiveCrudService<VisualizationCategory, String> getService() {
+        return service;
+    }
+
+//    @PostMapping
+//    @Operation(summary = "添加目录")
+//    public Mono<?>  add(@RequestBody Mono<DeviceCategory> payload){
+//        return this.service.insert(payload)
+//            .thenReturn(payload)
+//            .onErrorMap(e->new BusinessException("服务器繁忙,请稍后重试",e))
+//            ;
+//    }
+
+    @DeleteMapping("/recursion/{id}")
+    @Operation(summary = "删除目录")
+    public Mono<?> remove(@PathVariable @Parameter(description = "设备ID") String id){
+        return service
+            .createQuery()
+            .where(VisualizationCategory::getParentId,id)
+            .count()
+            .flatMap(count->{
+                //先判断是否有子目录
+                if(count>0){
+                    return Mono.error(new BusinessException("该目录下存在子目录,不可删除"));
+                }else {
+                    return Mono.just(count);
+                }
+            })
+            .onErrorStop()
+//            .flatMap(count->{
+//                //判断是否有绑定产品
+//                return visualizationService
+//                    .createQuery()
+//                    .where(DataVisualizationEntity::getClassifiedId,id)
+//                    .count();
+//            })
+            .flatMap(productCount->{
+                if(productCount>0){
+                    return Mono.error(new BusinessException("该目录已被绑定产品,不可删除"));
+                }else {
+                    return Mono.just(productCount);
+                }
+            })
+            .doOnNext(productCount-> this.service.deleteById(Mono.just(id)))
+            ;
+    }
+
+
+    @GetMapping("/{id}/detail")
+    @Operation(summary = "目录详情")
+    public Mono<?> detail(@PathVariable @Parameter(description = "设备ID") String id){
+        return this.service.createQuery()
+            .where(VisualizationCategory::getId,id)
+            .fetchOne();
+    }
+
+    @GetMapping
+    @Operation(summary = "获取全部分类目录")
+    public Flux<VisualizationCategory> getAllCategory() {
+        return this.service.createQuery()
+            .fetch();
+        //        return Flux.fromIterable(statics);
+    }
+
+
+    @GetMapping("/_query/tree")
+    @Operation(summary = "获取全部分类目录(树结构)")
+    public Flux<VisualizationCategory> getAllCategoryTree() {
+        return this.service
+            .createQuery()
+            .fetch()
+            .collectList()
+            .flatMapMany(data->{
+                return Flux.fromIterable(TreeSupportEntity.list2tree(data, VisualizationCategory::setChildren));
+            });
+    }
+}

+ 1 - 0
jetlinks-standalone/src/main/java/org/jetlinks/community/standalone/JetLinksApplication.java

@@ -6,6 +6,7 @@ import org.hswebframework.web.authorization.events.AuthorizingHandleBeforeEvent;
 import org.hswebframework.web.crud.annotation.EnableEasyormRepository;
 import org.hswebframework.web.logging.aop.EnableAccessLogger;
 import org.hswebframework.web.logging.events.AccessLoggerAfterEvent;
+import org.jetlinks.community.visualization.entity.VisualizationConfigEntity;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cache.annotation.EnableCaching;

+ 6 - 1
jetlinks-standalone/src/main/resources/application.yml

@@ -202,4 +202,9 @@ springdoc:
         - org.hswebframework.web.authorization.basic.web
         - org.jetlinks.community.logging.controller
   cache:
-    disabled: true
+    disabled: true
+visual:
+  base-path: "http://127.0.0.1:8844"
+  urls:
+    big-screen-path: "http://192.168.104.115:8000/"
+    vis-configuration: "http://192.168.104.115:8000/"