Преглед изворни кода

页面配置ureport,报表存数据库

梁欢 пре 1 дан
родитељ
комит
8aac0ddb04

+ 3 - 3
src/main/java/cn/hnthyy/thmz/SpringContextUreport.java

@@ -9,12 +9,12 @@ import org.springframework.context.annotation.ImportResource;
 import javax.servlet.Servlet;
 
 
-/*@Configuration
+@Configuration
 @ImportResource("classpath:ureport-console-context.xml") // 加载ureport对应的xml配置文件
 public class SpringContextUreport {
 
     @Bean
-    public ServletRegistrationBean<Servlet> ureportServlet(){
+    public ServletRegistrationBean<Servlet> ureportServlet() {
         return new ServletRegistrationBean<>(new UReportServlet(), "/ureport/*");
     }
-}*/
+}

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/thmz/MenuMapper.java

@@ -100,7 +100,7 @@ public interface MenuMapper {
             "<when test='name!=null'>",
             ",name =#{name,jdbcType=VARCHAR}",
             "</when>",
-            "<when test='parentId!=null'>",
+            "<when test='parentId!=null and parentId!=-1 '>",
             ",parent_id =#{parentId,jdbcType=BIGINT}",
             "</when>",
             "<when test='parentId == null or parentId==-1 '>",

+ 2 - 2
src/main/resources/static/js/ureport/ureport.js

@@ -88,8 +88,8 @@ $(function() {
             editRuleValidate: {
                 rptCode:{
                     required:true,message:'请输入报表编码',trigger: 'blur'},
-                rptName:{
-                    required:true,message:'请输入报表名称',trigger: 'blur'},
+                // rptName:{
+                //     required:true,message:'请输入报表名称',trigger: 'blur'},
                 sort:{
                     required:true,message:'请输入排序号',trigger: 'blur'}
             },

+ 1 - 1
src/main/resources/config.properties → src/main/resources/ureport.properties

@@ -1,5 +1,5 @@
 # 将ureport.disableFileProvider改成true,即可禁用默认提供的文件存储机制
 ureport.disableHttpSessionReportCache=false
-ureport.disableFileProvider=false
+ureport.disableFileProvider=true
 ureport.fileStoreDir=/WEB-INF/ureportfiles
 ureport.debug=true