Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ce3eb94fa | ||
|
|
83de9b91c0 | ||
|
|
3f2f00b6f6 | ||
|
|
6beec711b6 | ||
|
|
0352fff7e6 | ||
|
|
9dc99927b3 | ||
|
|
d7d5ef01ed | ||
|
|
53abddef44 | ||
|
|
fe17f43f3a | ||
|
|
4090a655e9 | ||
|
|
a660a8e912 | ||
|
|
22e1a6d7ea | ||
|
|
2abe3348fb | ||
|
|
8d7c499321 | ||
|
|
7ad0379066 |
@@ -43,6 +43,8 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
||||
|
||||
大家都在用 Spring,也在学习 Spring 的优点,Spring 提供了较好的扩展性,可又有多少人去修改它的源代码呢,退一步说,大家去修改了 Spring 的源码,反而会对未来升级造成很大困扰,您说不是呢?这样的例子很多,所以不要纠结,我们非常注重这一点,JeeSite 也一样具备强大的扩展性。
|
||||
|
||||
为什么说 JeeSite 比较易于学习?JeeSite 很好的把握了设计的 “度”,避免过度设计的情况。过度设计是在产品设计过程中忽略了产品和用户的实际需求,反而带来了不必要的复杂性,而忽略了系统的学习、开发和维护成本。
|
||||
|
||||
* 至今 JeeSite 平台架构已经非常稳定。
|
||||
* JeeSite 精益求精,用心打磨每一个细节。
|
||||
* JeeSite 是一个专业的平台,是一个让你使用放心的平台。
|
||||
@@ -72,11 +74,12 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
||||
|
||||
## 生态系统
|
||||
|
||||
* 分布式微服务系统(Spring Cloud):<https://gitee.com/thinkgem/jeesite4-cloud>
|
||||
* 分布式微服务(Spring Cloud):<https://gitee.com/thinkgem/jeesite4-cloud>
|
||||
* Flowable业务流程引擎(BPM):<http://jeesite.com/docs/bpm/>
|
||||
* JFlow工作流引擎:<https://gitee.com/thinkgem/jeesite4-jflow> :<http://ccflow.org>
|
||||
* Flowable业务流程模块(BPM):<http://jeesite.com/docs/bpm/>
|
||||
* 内容管理模块(CMS):<https://gitee.com/thinkgem/jeesite4-cms>
|
||||
* 内容管理模块(CMS):<https://gitee.com/thinkgem/jeesite4/tree/v5.3/modules/cms>
|
||||
* 手机端移动端:<https://gitee.com/thinkgem/jeesite4-uniapp>
|
||||
* PC客户端程序:<https://gitee.com/thinkgem/jeesite-client>
|
||||
* Vue3分离版本:<https://gitee.com/thinkgem/jeesite-vue>
|
||||
|
||||
## 快速体验
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.6.1-SNAPSHOT</version>
|
||||
<version>4.6.2-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.6.1-SNAPSHOT</version>
|
||||
<version>4.6.2-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ import com.jeesite.modules.cms.entity.Article;
|
||||
@MyBatisDao
|
||||
public interface ArticleDao extends CrudDao<Article> {
|
||||
|
||||
public long updateExpiredWeight(Article article);
|
||||
long updateExpiredWeight(Article article);
|
||||
|
||||
public long updateHitsAddOne(String id);
|
||||
long updateHitsAddOne(String id);
|
||||
|
||||
}
|
||||
@@ -4,13 +4,6 @@
|
||||
*/
|
||||
package com.jeesite.modules.cms.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jeesite.common.entity.BaseEntity;
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
@@ -20,6 +13,11 @@ import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
import com.jeesite.modules.cms.utils.CmsUtils;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文章表Entity
|
||||
* @author 长春叭哥、ThinkGem
|
||||
@@ -45,7 +43,12 @@ import com.jeesite.modules.cms.utils.CmsUtils;
|
||||
@Column(name = "word_count", attrName = "wordCount", label = "字数", comment = "字数(不包含html)"),
|
||||
@Column(name = "custom_content_view", attrName = "customContentView", label = "自定义内容视图"),
|
||||
@Column(name = "view_config", attrName = "viewConfig", label = "视图配置"),
|
||||
@Column(includeEntity = DataEntity.class),
|
||||
@Column(name="status", attrName="status", label="状态", isUpdate=false),
|
||||
@Column(name="create_by", attrName="createBy", label="创建者", isUpdate=true),
|
||||
@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
|
||||
@Column(name="update_by", attrName="updateBy", label="更新者", isUpdate=true),
|
||||
@Column(name="update_date", attrName="updateDate", label="更新时间", isUpdate=true, isQuery=false),
|
||||
@Column(name="remarks", attrName="remarks", label="备注信息", queryType=QueryType.LIKE),
|
||||
@Column(includeEntity = BaseEntity.class),
|
||||
}, joinTable = {
|
||||
@JoinTable(entity = Category.class, alias = "c",
|
||||
@@ -83,12 +86,13 @@ public class Article extends DataEntity<Article> {
|
||||
private Integer wordCount; // 字数(不包含html)
|
||||
private String customContentView; // 自定义内容视图
|
||||
private String viewConfig; // 视图配置
|
||||
|
||||
private ArticleData articleData; //文章副表
|
||||
private Boolean isQueryArticleData; // 是否查询文章内容
|
||||
|
||||
private Date beginDate; // 开始时间
|
||||
private Date endDate; // 结束时间
|
||||
|
||||
private Boolean isQueryArticleData; // 是否查询文章内容
|
||||
|
||||
public Article() {
|
||||
super();
|
||||
//this.weight = 0;
|
||||
@@ -223,8 +227,6 @@ public class Article extends DataEntity<Article> {
|
||||
this.hits = hits;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getHitsPlus() {
|
||||
return hitsPlus;
|
||||
}
|
||||
@@ -275,6 +277,18 @@ public class Article extends DataEntity<Article> {
|
||||
this.articleData = articleData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否查询文章内容
|
||||
* @return
|
||||
*/
|
||||
public Boolean getIsQueryArticleData() {
|
||||
return isQueryArticleData;
|
||||
}
|
||||
|
||||
public void setIsQueryArticleData(Boolean isQueryArticleData) {
|
||||
this.isQueryArticleData = isQueryArticleData;
|
||||
}
|
||||
|
||||
public Date getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
@@ -291,20 +305,6 @@ public class Article extends DataEntity<Article> {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否查询文章内容
|
||||
* @return
|
||||
*/
|
||||
public Boolean getIsQueryArticleData() {
|
||||
return isQueryArticleData;
|
||||
}
|
||||
|
||||
public void setIsQueryArticleData(Boolean isQueryArticleData) {
|
||||
this.isQueryArticleData = isQueryArticleData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getUrl() {
|
||||
return CmsUtils.getUrlDynamic(this);
|
||||
}
|
||||
|
||||
@@ -4,19 +4,6 @@
|
||||
*/
|
||||
package com.jeesite.modules.cms.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
@@ -31,8 +18,19 @@ import com.jeesite.modules.cms.entity.Category;
|
||||
import com.jeesite.modules.cms.utils.CmsUtils;
|
||||
import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
|
||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 文章表Service
|
||||
@@ -81,7 +79,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param article 查询条件
|
||||
* @param article.page 分页对象
|
||||
* @param article page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -4,16 +4,18 @@
|
||||
*/
|
||||
package com.jeesite.modules.cms.service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.jeesite.modules.cms.entity.FileTemplete;
|
||||
import com.jeesite.modules.cms.entity.Site;
|
||||
import com.jeesite.modules.cms.utils.CmsUtils;
|
||||
import com.jeesite.modules.cms.utils.FileTempleteUtils;
|
||||
import com.jeesite.modules.sys.entity.DictData;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 模版文件Service
|
||||
|
||||
@@ -4,14 +4,6 @@
|
||||
*/
|
||||
package com.jeesite.modules.cms.utils;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.jeesite.common.cache.CacheUtils;
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
@@ -26,6 +18,12 @@ import com.jeesite.modules.cms.entity.Site;
|
||||
import com.jeesite.modules.cms.service.ArticleService;
|
||||
import com.jeesite.modules.cms.service.CategoryService;
|
||||
import com.jeesite.modules.cms.service.SiteService;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* CmsUtils
|
||||
@@ -191,7 +189,7 @@ public class CmsUtils {
|
||||
* @param siteCode 站点编号
|
||||
* @param categoryCode 分类编号
|
||||
* @param number 获取数目
|
||||
* @param param 预留参数,例: key1:'value1', key2:'value2' ...<br>
|
||||
* @param params 预留参数,例: key1:'value1', key2:'value2' ...<br>
|
||||
* posid : 推荐位(1:首页焦点图;2:栏目页文章推荐;)<br>
|
||||
* image : 文章图片(1:有图片的文章)<br>
|
||||
* isQueryArticleData : 是否查询文章详情信息,查询会影响效率<br>
|
||||
|
||||
@@ -4,22 +4,6 @@
|
||||
*/
|
||||
package com.jeesite.modules.cms.web;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
@@ -33,6 +17,20 @@ import com.jeesite.modules.cms.service.CategoryService;
|
||||
import com.jeesite.modules.cms.service.FileTempleteService;
|
||||
import com.jeesite.modules.cms.utils.CmsUtils;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章表Controller
|
||||
|
||||
@@ -4,20 +4,6 @@
|
||||
*/
|
||||
package com.jeesite.modules.cms.web;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.collect.MapUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
@@ -33,6 +19,20 @@ import com.jeesite.modules.cms.utils.CmsUtils;
|
||||
import com.jeesite.modules.sys.entity.Office;
|
||||
import com.jeesite.modules.sys.utils.DictUtils;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 栏目表Controller
|
||||
@@ -252,7 +252,7 @@ public class CategoryController extends BaseController {
|
||||
* @param isShowCode 是否显示编码(true or 1:显示在左侧;2:显示在右侧;false or null:不显示)
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("cms:category:view")
|
||||
@RequiresPermissions(value = {"cms:category:view", "cms:article:view"}, logical = Logical.OR)
|
||||
@RequestMapping(value = "treeData")
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> treeData(String siteCode, String module, String excludeCode, Boolean isAll, String isShowCode) {
|
||||
|
||||
@@ -4,37 +4,27 @@
|
||||
*/
|
||||
package com.jeesite.modules.cmsfront.web;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.lang.ObjectUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.cms.entity.Article;
|
||||
import com.jeesite.modules.cms.entity.ArticleData;
|
||||
import com.jeesite.modules.cms.entity.Category;
|
||||
import com.jeesite.modules.cms.entity.Comment;
|
||||
import com.jeesite.modules.cms.entity.Site;
|
||||
import com.jeesite.modules.cms.entity.*;
|
||||
import com.jeesite.modules.cms.service.ArticleService;
|
||||
import com.jeesite.modules.cms.service.CategoryService;
|
||||
import com.jeesite.modules.cms.service.CommentService;
|
||||
import com.jeesite.modules.cms.utils.CmsUtils;
|
||||
import com.jeesite.modules.sys.utils.ValidCodeUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站Controller
|
||||
@@ -310,8 +300,8 @@ public class FrontController extends BaseController {
|
||||
/**
|
||||
* 内容评论
|
||||
*/
|
||||
@RequestMapping(value = "comment", method = RequestMethod.GET)
|
||||
public String comment(Comment comment, String theme, HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestMapping(value = "comment-{theme}", method = RequestMethod.GET)
|
||||
public String comment(Comment comment, @PathVariable String theme, HttpServletRequest request, HttpServletResponse response,
|
||||
Model model) {
|
||||
Page<Comment> page = new Page<Comment>(request, response);
|
||||
Comment c = new Comment();
|
||||
|
||||
@@ -15,4 +15,5 @@
|
||||
4.4.1
|
||||
4.5.0
|
||||
4.6.0
|
||||
4.6.1
|
||||
4.6.1
|
||||
4.6.2
|
||||
@@ -2,15 +2,23 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jeesite.modules.cms.dao.ArticleDao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="CmsArticle">
|
||||
<!-- 查询数据 -->
|
||||
<select id="findList" resultType="Article">
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
<if test="isQueryArticleData">,
|
||||
ad.content AS "articleData.content",
|
||||
ad.relation AS "articleData.relation",
|
||||
ad.is_can_comment AS "articleData.isCanComment"
|
||||
</if>
|
||||
FROM ${sqlMap.table.toSql()}
|
||||
<if test="isQueryArticleData">
|
||||
JOIN ${_prefix}cms_article_data ad ON ad.id = a.id
|
||||
</if>
|
||||
<where>
|
||||
${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY ${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
</select>
|
||||
|
||||
<update id="updateExpiredWeight">
|
||||
update ${_prefix}cms_article SET weight = 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
body{padding-top:50px;font-size:14px;}
|
||||
body{padding-top:50px;font-size:15px;background:#f7f8f9;}
|
||||
body>.navbar{-webkit-transition:background-color .3s ease-in;transition:background-color .3s ease-in}
|
||||
@media (min-width:768px){
|
||||
body>.navbar-transparent{background-color:transparent}
|
||||
@@ -51,20 +51,34 @@ footer p{clear:left;margin-bottom:0}
|
||||
#banner{margin-bottom:2em;text-align:center}
|
||||
}
|
||||
|
||||
.jumbotron {background:#f1f1f1;margin:48px auto;}
|
||||
.panel-title small .more {padding-top:4px;}
|
||||
.breadcrumb {border-radius:8px;background:transparent;padding:0;margin:2px 15px 21px 15px;}
|
||||
|
||||
.jumbotron {background:#fff;margin:48px auto;border:1px solid #ededed;box-shadow:0 1px 4px 0 rgb(0 0 0 / 5%);border-radius:8px!important;}
|
||||
.jumbotron h1, .jumbotron .h1 {font-size:43px;margin: 0 0 30px;}
|
||||
.jumbotron .btn-sm {font-size:17px;}
|
||||
|
||||
.panel {border-radius:8px}
|
||||
.panel-heading {border-radius:8px 8px 0 0}
|
||||
.panel-footer {border-radius:0 0 8px 8px}
|
||||
.panel-title {font-size:18px;}
|
||||
.panel-title small .more {padding-top:4px;font-size:14px}
|
||||
|
||||
.nav-search {margin-top:9px;}
|
||||
.nav-search .form-control {height:30px;padding:5px;}
|
||||
.nav-search .btn {height:31px;padding:5px 10px;}
|
||||
|
||||
.main {background:#fff;box-shadow:0 1px 4px 0 rgb(0 0 0 / 8%);border-radius:0 0 8px 8px;padding:20px 10px;margin:0 -1px}
|
||||
.main-list {border-radius:8px;}
|
||||
.main-right::before {content:'';border-left:1px solid #e6e6e6;position:absolute;height:100%;left:-20px;}
|
||||
|
||||
.article-list {padding:5px;margin:0;}
|
||||
.article-list li {list-style:none;padding:8px 0;}
|
||||
|
||||
.article-title {color:#555555;font-size:20px;text-align:center;border-bottom:1px solid #ddd;padding:15px 20px 20px 20px;margin-bottom:30px;}
|
||||
.article-info {border-top:1px solid #ddd;padding:10px;margin:25px 0 0;}
|
||||
.article-desc {padding:8px 10px 8px;margin:10px 20px 20px 35px;font-size:13px;}
|
||||
.article-content {padding-top:10px;}
|
||||
.article-view {border-radius:8px;padding:30px 50px;}
|
||||
.article-title {color:#333;font-size:30px;text-align:center;border-bottom:1px solid #ddd;padding:15px 20px 20px 20px;margin-bottom:30px;}
|
||||
.article-info {border-top:1px solid #ddd;padding:10px;margin:30px 0 0;}
|
||||
.article-desc {padding:8px 10px 8px;margin:10px 20px 20px 35px;font-size:14px;}
|
||||
.article-content {padding-top:20px;}
|
||||
|
||||
.pagination {margin:8px 0;display:block;/* text-align:center; */font-size:13px;} /* .pagination .controls a{border:0;} */
|
||||
.pagination>li>a, .pagination>li>span {min-width:37px;text-align:center;padding:6px;border:1px solid #ddd;background:transparent;/* border-radius:3px; */}
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<!--<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">${text('推荐位')}:</label>
|
||||
<div class="col-sm-8">
|
||||
@@ -162,14 +162,14 @@
|
||||
<#form:select path="state" dictType="sys_status" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('可修改发布时间,不填则使用当前时间')}">
|
||||
${text('发布时间')}: <i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="createDate" readonly="true" maxlength="20" class="form-control Wdate"
|
||||
dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
|
||||
<#form:input path="createDate" readonly="true" maxlength="20" class="form-control laydate"
|
||||
dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -208,7 +208,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<#form:extend collapsed="true" />
|
||||
<#form:extend collapsed="true" pathPrefix="articleData"/>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
@@ -129,7 +129,7 @@ $('#dataGrid').dataGrid({
|
||||
}},
|
||||
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
//<% if(hasPermi('cms:comment:edit')){ %>
|
||||
<% if(hasPermi('cms:comment:edit')){ %>
|
||||
actions.push('<a href="${ctx}/cms/comment/form?id='+row.id+'" class="btnList" title="${text('编辑文章评论表')}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/cms/comment/disable?id='+row.id+'" class="btnList" title="${text('停用文章评论表')}" data-confirm="${text('确认要停用该文章评论表吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
@@ -138,7 +138,7 @@ $('#dataGrid').dataGrid({
|
||||
actions.push('<a href="${ctx}/cms/comment/enable?id='+row.id+'" class="btnList" title="${text('启用文章评论表')}" data-confirm="${text('确认要启用该文章评论表吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/cms/comment/delete?id='+row.id+'" class="btnList" title="${text('删除文章评论表')}" data-confirm="${text('确认要删除该文章评论表吗?')}"><i class="fa fa-trash-o"></i></a> ');
|
||||
//<% } %>
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
<meta content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
|
||||
<title>${(isNotBlank(title!) ? title! + ' - ' : '') + @Global.getConfig('productName')}</title>
|
||||
<script src="${ctxPath}/global.min.js?ctx=${ctx}"></script>
|
||||
<script src="${ctxStatic}/jquery/jquery-1.12.4.min.js"></script>
|
||||
<script src="${ctxStatic}/jquery/jquery-migrate-1.4.1.min.js"></script>
|
||||
<script src="${ctxStatic}/jquery/jquery-3.5.0.min.js"></script>
|
||||
<script src="${ctxStatic}/jquery/jquery-migrate-3.2.0.min.js"></script>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
href="${ctx}/list-${c.categoryCode}">${c.categoryName}</a></li>
|
||||
</#html:if>
|
||||
</#html:foreach>
|
||||
<li><a href="http://jeesite.com" target="_blank">官方网站</a></li>
|
||||
<li><a href="http://s.jeesite.com" target="_blank">技术服务</a></li>
|
||||
<li id="siteSwitch" class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="站点">子站切换 <span class="caret"></span></a>
|
||||
@@ -36,7 +35,7 @@
|
||||
</ul>
|
||||
</li> -->
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<ul class="nav navbar-nav navbar-right hidden-xs hidden-sm">
|
||||
<form class="navbar-form navbar-left nav-search" action="${ctx}/search">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="全站搜索...">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% layout('layouts/default.html', {title: '列表页面', libs: []}){ %>
|
||||
<% include('include/banner.html'){} %>
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<div class="row main main-list">
|
||||
<div class="col-sm-2 col-xs-12 main-left">
|
||||
<h4>栏目列表</h4>
|
||||
<ul class="article-list">
|
||||
<#html:foreach items="${qmark(categoryList! != null, categoryList!, categoryList(site.siteCode, category.parentCode, 50, ''))}" var="category,status">
|
||||
@@ -9,7 +9,7 @@
|
||||
</#html:foreach>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<div class="col-sm-10 col-xs-12 main-right">
|
||||
<h4>${category.categoryName}</h4>
|
||||
<#html:if test="${page! != null && category.moduleType == 'article'}">
|
||||
<ul class="article-list">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% layout('layouts/default.html', {title: '列表页面', libs: []}){ %>
|
||||
<% include('include/banner.html'){} %>
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<div class="row main main-list">
|
||||
<div class="col-sm-2 col-xs-12 main-left">
|
||||
<h4>栏目列表</h4>
|
||||
<ul class="article-list">
|
||||
<#html:foreach items="${qmark(categoryList! != null, categoryList!, categoryList(site.siteCode, category.parentCode, 50, ''))}" var="category,status">
|
||||
@@ -9,7 +9,7 @@
|
||||
</#html:foreach>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<div class="col-sm-10 col-xs-12 main-right">
|
||||
<h4>${category.categoryName}</h4>
|
||||
<div class="row"><br/>
|
||||
<#html:foreach items="${qmark(categoryList! != null, categoryList!, [])}" var="category,status">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% layout('layouts/default.html', {title: '站点地图', libs: []}){ %>
|
||||
<style type="text/css">
|
||||
h2 {padding-left:10px;}
|
||||
h2 {padding-left:10px;text-align:center;}
|
||||
h3.title {padding:5px 5px;margin:15px 8px 10px;}
|
||||
dl.map{border:1px solid #ddd;border-top:0;margin:10px 8px 8px;}
|
||||
dl.map dt{border-top:1px solid #ddd;padding:10px 15px;} dl.map dd{margin:20px 30px 30px;}
|
||||
@@ -8,7 +8,7 @@
|
||||
dl.map span:hover{border:1px solid #bbb;background:#f1f1f1;}
|
||||
dl.map span a:hover{text-decoration:none;color:#333;}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="row main">
|
||||
<h2>站点地图</h2>
|
||||
<#html:foreach items="${siteList()}" var="site">
|
||||
<h3 class="title breadcrumb">${site.siteName}</h3>
|
||||
|
||||
@@ -37,7 +37,7 @@ $(function(){
|
||||
laydate.render({elem:'#ed', type:'date', format:'yyyy-MM-dd'});
|
||||
});
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="row main">
|
||||
<form id="searchForm" method="get" class="search">
|
||||
<input type="hidden" id="pageNo" name="pageNo" value="${page.pageNo!}"/>
|
||||
<input type="hidden" id="t" name="t" value="${isNotBlank(t)?t:'article'}"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% layout('layouts/default.html', {title:'文章查看',libs: []}){ %>
|
||||
<% include('include/banner.html'){} %>
|
||||
<div class="row article-view">
|
||||
<div class="row main article-view">
|
||||
<h3 class="article-title">${article.title}</h3>
|
||||
<blockquote class="article-desc">摘要:${article.description}</blockquote>
|
||||
<div class="article-content uparse">${article.articleData.content}</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.6.1-SNAPSHOT</version>
|
||||
<version>4.6.2-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
*/
|
||||
package com.jeesite.common.shiro.filter;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.jeesite.common.lang.ExceptionUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.shiro.realm.BaseAuthorizingRealm;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
import org.apache.shiro.authc.AuthenticationException;
|
||||
import org.apache.shiro.authc.AuthenticationToken;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.apache.shiro.web.util.WebUtils;
|
||||
|
||||
import com.jeesite.common.lang.ExceptionUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.shiro.realm.BaseAuthorizingRealm;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* CAS过滤器
|
||||
@@ -25,12 +25,15 @@ import com.jeesite.common.shiro.realm.BaseAuthorizingRealm;
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class CasFilter extends org.apache.shiro.cas.CasFilter {
|
||||
|
||||
|
||||
private BaseAuthorizingRealm authorizingRealm;
|
||||
|
||||
/**
|
||||
* 登录成功调用事件
|
||||
*/
|
||||
@Override
|
||||
protected boolean onLoginSuccess(AuthenticationToken token, Subject subject, ServletRequest request, ServletResponse response) throws Exception {
|
||||
authorizingRealm.onLoginSuccess(UserUtils.getLoginInfo(), (HttpServletRequest)request);
|
||||
return FormFilter.onLoginSuccess((HttpServletRequest)request, (HttpServletResponse)response);
|
||||
}
|
||||
|
||||
@@ -66,7 +69,7 @@ public class CasFilter extends org.apache.shiro.cas.CasFilter {
|
||||
}
|
||||
|
||||
public void setAuthorizingRealm(BaseAuthorizingRealm authorizingRealm) {
|
||||
|
||||
this.authorizingRealm = authorizingRealm;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,15 +4,14 @@
|
||||
*/
|
||||
package com.jeesite.common.shiro.filter;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import org.apache.shiro.web.filter.AccessControlFilter;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.shiro.web.filter.AccessControlFilter;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* 内部系统访问过滤器
|
||||
* @author ThinkGem
|
||||
@@ -29,7 +28,7 @@ public class InnerFilter extends AccessControlFilter {
|
||||
"shiro.innerFilterAllowRemoteAddrs", "127.0.0.1"), ",");
|
||||
}
|
||||
if (prefixes != null && request instanceof HttpServletRequest){
|
||||
String ip = ((HttpServletRequest)request).getRemoteAddr();
|
||||
String ip = request.getRemoteAddr();
|
||||
for (String prefix : prefixes){
|
||||
result = StringUtils.startsWithIgnoreCase(ip, StringUtils.trim(prefix));
|
||||
if (result){
|
||||
|
||||
@@ -4,22 +4,6 @@
|
||||
*/
|
||||
package com.jeesite.common.shiro.realm;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.ValidationException;
|
||||
|
||||
import org.apache.shiro.authc.AuthenticationException;
|
||||
import org.apache.shiro.authc.AuthenticationInfo;
|
||||
import org.apache.shiro.authc.AuthenticationToken;
|
||||
import org.apache.shiro.cas.CasToken;
|
||||
import org.jasig.cas.client.authentication.AttributePrincipal;
|
||||
import org.jasig.cas.client.validation.Assertion;
|
||||
import org.jasig.cas.client.validation.Cas20ServiceTicketValidator;
|
||||
import org.jasig.cas.client.validation.TicketValidationException;
|
||||
import org.jasig.cas.client.validation.TicketValidator;
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.collect.MapUtils;
|
||||
import com.jeesite.common.lang.ObjectUtils;
|
||||
@@ -35,6 +19,20 @@ import com.jeesite.modules.sys.service.EmpUserService;
|
||||
import com.jeesite.modules.sys.service.UserService;
|
||||
import com.jeesite.modules.sys.utils.LogUtils;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
import org.apache.shiro.authc.AuthenticationException;
|
||||
import org.apache.shiro.authc.AuthenticationInfo;
|
||||
import org.apache.shiro.authc.AuthenticationToken;
|
||||
import org.apache.shiro.cas.CasToken;
|
||||
import org.jasig.cas.client.authentication.AttributePrincipal;
|
||||
import org.jasig.cas.client.validation.Assertion;
|
||||
import org.jasig.cas.client.validation.Cas20ServiceTicketValidator;
|
||||
import org.jasig.cas.client.validation.TicketValidationException;
|
||||
import org.jasig.cas.client.validation.TicketValidator;
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.ValidationException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 系统认证授权实现类
|
||||
@@ -181,20 +179,11 @@ public class CasAuthorizingRealm extends BaseAuthorizingRealm {
|
||||
|
||||
@Override
|
||||
public void onLoginSuccess(LoginInfo loginInfo, HttpServletRequest request) {
|
||||
super.onLoginSuccess(loginInfo, request);
|
||||
|
||||
// 单点登录登出句柄(登录时注入session),在这之前必须获取下授权信息
|
||||
String ticket = loginInfo.getParam("ticket");
|
||||
casOutHandler.recordSession(request, ticket);
|
||||
//System.out.print("__sid: "+request.getSession().getId());
|
||||
//System.out.println(" == "+UserUtils.getSession().getId());
|
||||
|
||||
// 更新登录IP、时间、会话ID等
|
||||
User user = UserUtils.get(loginInfo.getId());
|
||||
getUserService().updateUserLoginInfo(user);
|
||||
|
||||
// 记录用户登录日志
|
||||
LogUtils.saveLog(user, ServletUtils.getRequest(), "系统登录", Log.TYPE_LOGIN_LOGOUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -82,7 +82,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param ${className} 查询条件
|
||||
* @param ${className}.page 分页对象
|
||||
* @param ${className} page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -88,7 +88,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param ${className} 查询条件
|
||||
* @param ${className}.page 分页对象
|
||||
* @param ${className} page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<% } %>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">\${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">\${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">\${text('重置')}</button>
|
||||
</div>
|
||||
</${'#'}form:form>
|
||||
<% /* 查询表单 end // 此行是为了去除空行 */ %>
|
||||
@@ -61,7 +61,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Query'}Ser
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param ${className} 查询条件
|
||||
* @param ${className}.page 分页对象
|
||||
* @param ${className} page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -14,6 +14,10 @@ if (isBlank(message)){
|
||||
message = message + '☆ ' + text(e.defaultMessage) + ' (' + e.objectName + ')<br/>';
|
||||
}
|
||||
for (var e in ex.fieldErrors){
|
||||
if (@StringUtils.inString(e.field, 'pageNo', 'pageSize')){
|
||||
message = text('提交的分页参数,超出有效范围');
|
||||
break;
|
||||
}
|
||||
message = message + '☆ ' + text(e.defaultMessage) + ' (' + e.field + ')<br/>';
|
||||
}
|
||||
}else if (type.fullName(ex) == 'javax.validation.ConstraintViolationException'){
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">查询</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">重置</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">重置</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -732,7 +732,9 @@ $(function(){
|
||||
var footerHeight = $('.main-footer').outerHeight() || 0;
|
||||
var windowHeight = $(window).height();
|
||||
$('.content').css('min-height', windowHeight - footerHeight);
|
||||
myChart1.resize(); myChart2.resize(); myChart3.resize();
|
||||
if(myChart1) myChart1.resize();
|
||||
if(myChart2) myChart2.resize();
|
||||
if(myChart3) myChart3.resize();
|
||||
}).resize();
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
$(window).resize();
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
© ${@DateUtils.getYear()} ${@Global.getConfig('productName')} - Powered By <a
|
||||
id="loginKey" data-key="${@Global.getConfig('shiro.loginSubmit.secretKey')}"
|
||||
href="http://jeesite.com" target="_blank">JeeSite ${@Global.getProperty('jeesiteVersion')}</a>
|
||||
- <a href="https://gitee.com/thinkgem/jeesite-client" target="_blank">客户端下载</a>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<!-- <div class="form-row"></div> -->
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
<button type="button" class="btn btn-default btn-sm btnFormMore">${text('更多')}<i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="form-more">
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">查询</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">重置</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">重置</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<div class="col-xs-10 p0 pr10">
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<div class="row">
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.7.8</version>
|
||||
<version>2.7.10</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.6.1-SNAPSHOT</version>
|
||||
<version>4.6.2-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite Parent</name>
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite</artifactId>
|
||||
<version>4.6.1-SNAPSHOT</version>
|
||||
<version>4.6.2-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite</name>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-root</artifactId>
|
||||
<version>4.6.1-SNAPSHOT</version>
|
||||
<version>4.6.2-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite Root</name>
|
||||
|
||||
23
web/pom.xml
23
web/pom.xml
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.6.1-SNAPSHOT</version>
|
||||
<version>4.6.2-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -46,6 +46,20 @@
|
||||
<artifactId>jeesite-module-swagger</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 内容管理模块 -->
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-module-cms</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 移动端模块 -->
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-module-app</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 文件管理共享(标准版)
|
||||
<dependency>
|
||||
@@ -61,13 +75,6 @@
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- 内容管理模块
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-module-cms</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- Spring Boot Tomcat
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -38,19 +38,25 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
||||
*/
|
||||
@Override
|
||||
public TestData get(TestData testData) {
|
||||
TestData entity = super.get(testData);
|
||||
if (entity != null){
|
||||
TestDataChild testDataChild = new TestDataChild(entity);
|
||||
return super.get(testData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载子表数据
|
||||
*/
|
||||
public TestData loadChildData(TestData testData) {
|
||||
if (testData != null && !testData.getIsNewRecord()){
|
||||
TestDataChild testDataChild = new TestDataChild(testData);
|
||||
testDataChild.setStatus(TestDataChild.STATUS_NORMAL);
|
||||
entity.setTestDataChildList(testDataChildDao.findList(testDataChild));
|
||||
testData.setTestDataChildList(testDataChildDao.findList(testDataChild));
|
||||
}
|
||||
return entity;
|
||||
return testData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param testData
|
||||
* @param testData page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
*/
|
||||
package com.jeesite.modules.test.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
import com.jeesite.modules.test.entity.TestDataChild;
|
||||
import com.jeesite.modules.test.service.TestDataService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@@ -19,12 +21,9 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
import com.jeesite.modules.test.entity.TestDataChild;
|
||||
import com.jeesite.modules.test.service.TestDataService;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试数据Controller
|
||||
@@ -83,9 +82,10 @@ public class TestDataController extends BaseController {
|
||||
*/
|
||||
@RequiresPermissions("test:testData:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(TestData testData, Model model) {
|
||||
public String form(TestData testData, String flag, Model model) {
|
||||
testDataService.loadChildData(testData);
|
||||
model.addAttribute("testData", testData);
|
||||
return "modules/test/testDataForm";
|
||||
return "modules/test/testDataForm"+ StringUtils.defaultString(flag, "");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">查询</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">重置</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">重置</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal table-form">
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">查询</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">重置</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">重置</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
data-order-by="${parameter.orderBy!'post_code desc'}">
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="button" id="search" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
478
web/src/main/resources/views/modules/test/testDataForm2.html
Normal file
478
web/src/main/resources/views/modules/test/testDataForm2.html
Normal file
@@ -0,0 +1,478 @@
|
||||
<% layout('/layouts/default.html', {title: '数据管理', libs: ['validate','fileupload','dataGrid']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-note"></i> ${text(testData.isNewRecord ? '新增数据' : '编辑数据')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">${text('基本信息')}</div>
|
||||
<#form:hidden path="id"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('单行文本')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:input path="testInput" maxlength="200" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('多行文本')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="testTextarea" rows="4" maxlength="200" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('下拉框')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="testSelect" dictType="sys_menu_type" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('下拉多选')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="testSelectMultiple" dictType="sys_menu_type" multiple="true" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('单选框')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="testRadio" dictType="sys_menu_type" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('复选框')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:checkbox path="testCheckbox" dictType="sys_menu_type" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('日期选择')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="testDate" readonly="true" maxlength="20" class="form-control laydate"
|
||||
dataFormat="date" data-type="date" data-format="yyyy-MM-dd"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('日期时间')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="testDatetime" readonly="true" maxlength="20" class="form-control laydate"
|
||||
dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('用户选择')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="testUser" title="${text('用户选择')}"
|
||||
path="testUser.userCode" labelPath="testUser.userName"
|
||||
url="${ctx}/sys/office/treeData?isLoadUser=true"
|
||||
class="" allowClear="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('机构选择')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="testOffice" title="${text('机构选择')}"
|
||||
path="testOffice.officeCode" labelPath="testOffice.officeName"
|
||||
url="${ctx}/sys/office/treeData"
|
||||
class="" allowClear="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('区域选择')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="testAreaCode" title="${text('区域选择')}"
|
||||
path="testAreaCode" labelPath="testAreaName"
|
||||
url="${ctx}/sys/area/treeData"
|
||||
class="" allowClear="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('备注信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">${text('图片上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage" bizKey="${testData.id}" bizType="testData_image"
|
||||
uploadType="image" class="" readonly="false" preview="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">${text('附件上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadFile" bizKey="${testData.id}" bizType="testData_file"
|
||||
uploadType="all" class="" readonly="false" preview="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-unit">${text('子表数据')}</h4>
|
||||
<div class="ml10 mr10 table-form">
|
||||
<table id="testDataChildDataGrid"></table>
|
||||
<% if (hasPermi('test:testData:edit')){ %>
|
||||
<a href="#" id="testDataChildDataGridAddRowBtn" class="btn btn-primary btn-sm mt10 mb10"><i class="fa fa-plus"></i> ${text('增行')}</a>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('test:testData:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script id="treeselectTpl" type="text/template">//<!--<div>
|
||||
<#form:treeselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
|
||||
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
|
||||
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true" readonly="{{d.readonly}}"/>
|
||||
</div>//--></script>
|
||||
<script id="listselectTpl" type="text/template">//<!--<div>
|
||||
<#form:listselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
|
||||
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
|
||||
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true" readonly="{{d.readonly}}"
|
||||
itemCode="{{d.itemCode}}" itemName="{{d.itemName}}"/>
|
||||
</div>//--></script>
|
||||
<script id="fileuploadTpl" type="text/template">//<!--<div>
|
||||
<#form:fileupload id="{{d.id}}" bizKey="{{d.bizKey}}" bizType="{{d.bizType}}" uploadType="all"
|
||||
class="{{d.cssClass}}" isMini="true" preview="true" readonly="{{d.readonly}}"/>
|
||||
</div>//--></script>
|
||||
<script>
|
||||
//初始化测试数据子表DataGrid对象
|
||||
$("#testDataChildDataGrid").dataGrid({
|
||||
|
||||
data: ${toJson(testData.testDataChildList)},
|
||||
datatype: "local", // 设置本地数据
|
||||
autoGridHeight: function(){return 'auto'}, // 设置自动高度
|
||||
|
||||
// 设置数据表格列
|
||||
columnModel: [
|
||||
|
||||
{header:'${text("操作")}', name:'actions', width:40, align:"center", formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
if (val == 'new'){
|
||||
actions.push('<a href="#" onclick="js.confirm(\'${text("你确认要删除这条数据吗?")}\', function(){$(\'#testDataChildDataGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a> ');
|
||||
}else{
|
||||
actions.push('<a href="#" onclick="js.confirm(\'${text("你确认要删除这条数据吗?")}\', function(){$(\'#testDataChildDataGrid\').dataGrid(\'setRowData\',\''+obj.rowId+'\',null,{display:\'none\'});$(\'#'+obj.rowId+'_status\').val(\''+Global.STATUS_DELETE+'\');});return false;"><i class="fa fa-trash-o"></i></a> ');
|
||||
}
|
||||
//actions.push('<a href="#" onclick="$(\'#testDataChildDataGrid\').dataGrid(\'editRow\',\''+obj.rowId+'\',{keys:true,focusField:true});return false;"><i class="fa fa-pencil"></i></a> ');
|
||||
return actions.join('');
|
||||
}, editoptions: {defaultValue: 'new'}},
|
||||
|
||||
{header:'状态', name:'status', editable:true, hidden:true},
|
||||
{header:'主键', name:'id', editable:true, hidden:true},
|
||||
{header:'${text("排序号")}', name:'testSort', width:100, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits'}},
|
||||
{header:'${text("父表主键")}', name:'testData.id', editable:true, hidden:true},
|
||||
{header:'${text("单行文本")}', name:'testInput', width:100, editable:true, edittype:'text', editoptions:{'maxlength':'200', 'class':'form-control'}},
|
||||
{header:'${text("多行文本")}', name:'testTextarea', width:100, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
|
||||
{header:'${text("下拉框")}', name:'testSelect', width:100,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(obj.colModel.editoptions.items, val, '${text("未知")}', true);
|
||||
},
|
||||
unformat: function(val, obj, cell){
|
||||
return val;
|
||||
},
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("下拉多选")}', name:'testSelectMultiple', width:90, fixed: true,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(obj.colModel.editoptions.items, val, '${text("未知")}', true);
|
||||
},
|
||||
unformat: function(val, obj, cell){
|
||||
return val;
|
||||
},
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("单选框")}', name:'testRadio', width:135, fixed: true,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(obj.colModel.editoptions.items, val, '${text("未知")}', true);
|
||||
},
|
||||
unformat: function(val, obj, cell){
|
||||
return val;
|
||||
},
|
||||
editable:true, edittype:'radio', editoptions:{'class':'form-control icheck',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("复选框")}', name:'testCheckbox', width:135, fixed: true,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
},
|
||||
unformat: function(val, obj, cell){
|
||||
return val;
|
||||
},
|
||||
editable:true, edittype:'checkbox', editoptions:{'class':'form-control icheck',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("日期选择")}', name:'testDate', width:120,
|
||||
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d'},
|
||||
editable:true, edittype:'text', editoptions:{'class':'form-control laydate', 'readonly':'true',
|
||||
dataInit: function(element){
|
||||
laydate.render({elem:element, type:'date', format:'yyyy-MM-dd', done: function(){
|
||||
// 选择日期后,自动给下一个输入框赋值(联动实例)
|
||||
// $(element).closest('td').next().find('.form-control').val('2020-11-26 10:10');
|
||||
}});
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("日期时间")}', name:'testDatetime', width:155,
|
||||
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d H:i'},
|
||||
editable:true, edittype:'text', editoptions:{'class':'form-control laydate', 'readonly':'true',
|
||||
dataInit: function(element){
|
||||
laydate.render({elem:element, type:'datetime', format:'yyyy-MM-dd HH:mm'});
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("用户选择")}', name:'testUser', width:100,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.val(row, 'testUser.userName');
|
||||
},
|
||||
unformat: function(val, obj, cell){
|
||||
return js.val(obj.colModel.data[obj.rowId], 'userCode')
|
||||
+ '|' + js.val(obj.colModel.data[obj.rowId], 'userName');
|
||||
},
|
||||
editable: true, edittype: "custom", editoptions: {
|
||||
custom_element: function(val, editOptions) {
|
||||
return js.template('treeselectTpl', {
|
||||
id: 'user_'+editOptions.id, title: '用户选择',
|
||||
name: 'testUser.userCode', value: val.split('|')[0],
|
||||
labelName: 'testUser.userName', labelValue: val.split('|')[1],
|
||||
url: '${ctx}/sys/office/treeData?isLoadUser=true', cssClass: '', readonly: false
|
||||
});
|
||||
},
|
||||
custom_value: function(element, act){
|
||||
return {userCode: element.find('[type=hidden]').val(),
|
||||
userName: element.find('[type=text]').val()};
|
||||
},
|
||||
dataInit: function(element){
|
||||
// 初始化控件后设置只读模式(实例)
|
||||
// $(element).find('.form-control, .btn').addClass('disabled');
|
||||
}
|
||||
},
|
||||
},
|
||||
{header:'${text("列表选择")}', name:'testUser2', width:100,
|
||||
formatter: function(val, obj, row, act){
|
||||
obj.colModel.data[obj.rowId] = row.testUser;
|
||||
return js.val(row, 'testUser.userName');
|
||||
},
|
||||
unformat: function(val, obj, cell){
|
||||
return js.val(obj.colModel.data[obj.rowId], 'userCode')
|
||||
+ '|' + js.val(obj.colModel.data[obj.rowId], 'userName');
|
||||
},
|
||||
editable: true, edittype: "custom", editoptions: {
|
||||
custom_element: function(val, editOptions) {
|
||||
return js.template('listselectTpl', {
|
||||
id: 'user_'+editOptions.id, title: '用户选择',
|
||||
name: 'testUser2.userCode', value: val.split('|')[0],
|
||||
labelName: 'testUser2.userName', labelValue: val.split('|')[1],
|
||||
url: '${ctx}/sys/empUser/empUserSelect', cssClass: '', readonly: false,
|
||||
itemCode: 'userCode', itemName: 'userName'
|
||||
});
|
||||
},
|
||||
custom_value: function(element, act){
|
||||
return {userCode2: element.find('[type=hidden]').val(),
|
||||
userName2: element.find('[type=text]').val()};
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("机构选择")}', name:'testOffice', width:100, title:false,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.val(row, 'testOffice.officeName');
|
||||
},
|
||||
unformat: function(val, obj, cell){
|
||||
return js.val(obj.colModel.data[obj.rowId], 'officeCode')
|
||||
+ '|' + js.val(obj.colModel.data[obj.rowId], 'officeName');
|
||||
},
|
||||
editable: true, edittype: "custom", editoptions: {
|
||||
custom_element: function(val, editOptions) {
|
||||
return js.template('treeselectTpl', {
|
||||
id: 'office_'+editOptions.id, title: '机构选择',
|
||||
name: 'testOffice.officeCode', value: val.split('|')[0],
|
||||
labelName: 'testOffice.officeName', labelValue: val.split('|')[1],
|
||||
url: '${ctx}/sys/office/treeData?officeTypes=1,2', cssClass: '', readonly: false
|
||||
});
|
||||
},
|
||||
custom_value: function(element, act){
|
||||
return {officeCode: element.find('[type=hidden]').val(),
|
||||
officeName: element.find('[type=text]').val()};
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("区域选择")}', name:'testAreaCode', width:100,
|
||||
formatter: function(val, obj, row, act){
|
||||
obj.colModel.data[obj.rowId] = {
|
||||
testAreaCode: row.testAreaCode,
|
||||
testAreaName: row.testAreaName
|
||||
};
|
||||
return js.val(row, 'testAreaName');
|
||||
},
|
||||
unformat: function(val, obj, cell){
|
||||
return js.val(obj.colModel.data[obj.rowId], 'testAreaCode')
|
||||
+ '|' + js.val(obj.colModel.data[obj.rowId], 'testAreaName');
|
||||
},
|
||||
editable: true, edittype: "custom", editoptions: {
|
||||
custom_element: function(val, editOptions) {
|
||||
return js.template('treeselectTpl', {
|
||||
id: 'area_'+editOptions.id, title: '区域选择',
|
||||
name: 'testAreaCode', value: val.split('|')[0],
|
||||
labelName: 'testAreaName', labelValue: val.split('|')[1],
|
||||
url: '${ctx}/sys/area/treeData', cssClass: '', readonly: false
|
||||
});
|
||||
},
|
||||
custom_value: function(element, act){
|
||||
return {areaCode: element.find('[type=hidden]').val(),
|
||||
areaName: element.find('[type=text]').val()};
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("文件上传")}', name:'id', width:200, classes:'editable',
|
||||
formatter: function(val, obj, row, act){
|
||||
return '<button type="button" class="btn btn-xs btn-default uploaderFile" data-val="'
|
||||
+(obj.rowId)+'">查看文件</button>';
|
||||
},
|
||||
editable: true, edittype: "custom", editoptions: {
|
||||
custom_element: function(val, editOptions) {
|
||||
log(val, editOptions)
|
||||
return js.template('fileuploadTpl', {
|
||||
id: 'fileupload_'+editOptions.rowId, bizKey: editOptions.rowId,
|
||||
bizType: 'testDataChild_file', cssClass: '', readonly: false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
onSelectRow: function(id, stat, e) {
|
||||
if (id && e && !$(e.target).hasClass('btn')){
|
||||
$('#testDataChildDataGrid').dataGrid('editRow', id,{keys:true,focusField:true});
|
||||
}
|
||||
},
|
||||
shrinkToFit: false, // 是否按百分比自动调整列宽
|
||||
|
||||
// 编辑表格参数
|
||||
editGrid: true, // 是否是编辑表格
|
||||
editGridInitRowNum: 1, // 编辑表格的初始化新增行数
|
||||
editGridInitAllRowEdit: false, // 是否初始化就编辑所有行(*** 重点 ***)
|
||||
editGridAddRowBtn: $('#testDataChildDataGridAddRowBtn'), // 子表增行按钮
|
||||
editGridAddRowBtnToHeader: true, // 子表增行按钮是否显示到表头上 v4.1.7
|
||||
editGridAddRowInitData: {id: '', status: Global.STATUS_NORMAL}, // 新增行的时候初始化的数据
|
||||
|
||||
// 编辑表格的提交数据参数
|
||||
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
|
||||
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,'
|
||||
+'testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testUser.userName,testOffice.officeCode,'
|
||||
+'testOffice.officeName,testAreaCode,testAreaName,testDataChild_file,testDataChild_file__del', // 提交数据列表的属性字段
|
||||
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
// $('#jqgh_testDataChildDataGrid_rn').append('<a href="javascript:" onclick="'
|
||||
// + '$(\'#testDataChildDataGridAddRowBtn\').click();">'
|
||||
// + '<i class="fa fa-plus"></i></a>');
|
||||
}
|
||||
});
|
||||
$('#testDataChildDataGrid').on('click', '.uploaderFile', function(){
|
||||
var val = $(this).data('val'); layer.open({ title: '查看文件',
|
||||
content: '文件列表:' + js.template('fileuploadTpl', {
|
||||
id: 'fileupload_'+val, bizKey: val, bizType: 'testDataChild_file', cssClass: '', readonly: true
|
||||
})
|
||||
});
|
||||
});
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
<button type="button" class="btn btn-default btn-sm btnFormMore">${text('更多')}<i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="form-more">
|
||||
@@ -123,7 +123,7 @@ $('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text("单行文本")}', name:'testInput', index:'a.test_input', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" data-title="${text("编辑数据")}">'+(val||row.id)+'</a>';
|
||||
return '<a href="${ctx}/test/testData/form?id='+row.id+'&flag=2" class="btnList" data-title="${text("编辑数据")}">'+(val||row.id)+'</a>';
|
||||
}, searchoptions: { dataInit: function (element) {
|
||||
$(element).attr('form', 'searchForm').attr('name', 'testInput2');
|
||||
}}},
|
||||
@@ -150,7 +150,7 @@ $('#dataGrid').dataGrid({
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', firstsortorder:'desc', width:150, align:"center"},
|
||||
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text("备注")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text("操作")}', name:'actions', width:100, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
//<% if(hasPermi('test:testData:edit')){ %>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
|
||||
Reference in New Issue
Block a user