feat:集成积木仪表盘
This commit is contained in:
parent
0b98ef4ecf
commit
4fb4af2c5c
@ -585,10 +585,15 @@
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimureport-spring-boot3-starter-fastjson2</artifactId>
|
||||
<version>${jimureport.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimubi-spring-boot3-starter</artifactId>
|
||||
<version>${jimureport.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<groupId>com.github.jsqlparser</groupId>
|
||||
<artifactId>jsqlparser</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
@ -64,6 +64,10 @@
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimureport-spring-boot3-starter-fastjson2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimubi-spring-boot3-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
|
@ -1,13 +1,15 @@
|
||||
package cn.iocoder.yudao.module.report.framework.jmreport.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.security.config.SecurityProperties;
|
||||
import cn.iocoder.yudao.module.system.api.oauth2.OAuth2TokenApi;
|
||||
import cn.iocoder.yudao.module.report.framework.jmreport.core.service.JmOnlDragExternalServiceImpl;
|
||||
import cn.iocoder.yudao.module.report.framework.jmreport.core.service.JmReportTokenServiceImpl;
|
||||
import cn.iocoder.yudao.module.system.api.oauth2.OAuth2TokenApi;
|
||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
||||
import org.jeecg.modules.jmreport.api.JmReportTokenServiceI;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
|
||||
/**
|
||||
* 积木报表的配置类
|
||||
@ -19,11 +21,16 @@ import org.springframework.context.annotation.Configuration;
|
||||
public class JmReportConfiguration {
|
||||
|
||||
@Bean
|
||||
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
|
||||
public JmReportTokenServiceI jmReportTokenService(OAuth2TokenApi oAuth2TokenApi,
|
||||
PermissionApi permissionApi,
|
||||
SecurityProperties securityProperties) {
|
||||
return new JmReportTokenServiceImpl(oAuth2TokenApi, permissionApi, securityProperties);
|
||||
}
|
||||
|
||||
@Bean // 暂时注释:可以按需实现后打开
|
||||
@Primary
|
||||
public JmOnlDragExternalServiceImpl jmOnlDragExternalService2() {
|
||||
return new JmOnlDragExternalServiceImpl();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,68 @@
|
||||
package cn.iocoder.yudao.module.report.framework.jmreport.core.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.jeecg.modules.drag.service.IOnlDragExternalService;
|
||||
import org.jeecg.modules.drag.vo.DragDictModel;
|
||||
import org.jeecg.modules.drag.vo.DragLogDTO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* {@link IOnlDragExternalService} 实现类,提供积木仪表盘的查询等功能
|
||||
*
|
||||
* 实现可参考:
|
||||
* 1. <a href="https://github.com/jeecgboot/jimureport/blob/master/jimureport-example/src/main/java/com/jeecg/modules/jmreport/extend/JimuDragExternalServiceImpl.java">jimureport-example</a>
|
||||
* 2. <a href="https://gitee.com/jeecg/JeecgBoot/blob/master/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/config/jimureport/JimuDragExternalServiceImpl.java">JeecgBoot 集成</a>
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public class JmOnlDragExternalServiceImpl implements IOnlDragExternalService {
|
||||
|
||||
// ========== DictItem 相关 ==========
|
||||
|
||||
@Override
|
||||
public Map<String, List<DragDictModel>> getManyDictItems(List<String> codeList, List<JSONObject> tableDictList) {
|
||||
return IOnlDragExternalService.super.getManyDictItems(codeList, tableDictList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DragDictModel> getDictItems(String dictCode) {
|
||||
return IOnlDragExternalService.super.getDictItems(dictCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DragDictModel> getTableDictItems(String dictTable, String dictText, String dictCode) {
|
||||
return IOnlDragExternalService.super.getTableDictItems(dictTable, dictText, dictCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DragDictModel> getCategoryTreeDictItems(List<String> ids) {
|
||||
return IOnlDragExternalService.super.getCategoryTreeDictItems(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DragDictModel> getUserDictItems(List<String> ids) {
|
||||
return IOnlDragExternalService.super.getUserDictItems(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DragDictModel> getDeptsDictItems(List<String> ids) {
|
||||
return IOnlDragExternalService.super.getDeptsDictItems(ids);
|
||||
}
|
||||
|
||||
// ========== Log 相关 ==========
|
||||
|
||||
@Override
|
||||
public void addLog(DragLogDTO dto) {
|
||||
IOnlDragExternalService.super.addLog(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLog(String logMsg, int logType, int operateType) {
|
||||
IOnlDragExternalService.super.addLog(logMsg, logType, operateType);
|
||||
}
|
||||
|
||||
}
|
@ -18,7 +18,11 @@ public class SecurityConfiguration {
|
||||
|
||||
@Override
|
||||
public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) {
|
||||
registry.requestMatchers("/jmreport/**").permitAll(); // 积木报表
|
||||
// 积木报表
|
||||
registry.requestMatchers("/jmreport/**").permitAll();
|
||||
// 积木仪表盘
|
||||
registry.requestMatchers("/drag/**").permitAll();
|
||||
registry.requestMatchers("/jimubi/**").permitAll();
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user