Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc10f8670b | ||
|
|
f429bf1c83 | ||
|
|
3086736d4e | ||
|
|
5562a98a0e | ||
|
|
cd4fc57eb8 | ||
|
|
bdfd9d8b28 | ||
|
|
8336b993ac | ||
|
|
6757958342 | ||
|
|
b40de7ec25 | ||
|
|
c2e71cb80a | ||
|
|
8b0453b0c0 | ||
|
|
532a20ed6f | ||
|
|
f3b2e2204b | ||
|
|
09a57cb928 | ||
|
|
c59564b393 | ||
|
|
0a2c29abc3 | ||
|
|
3b04eff399 | ||
|
|
ee3adf6fee | ||
|
|
b9f614479b | ||
|
|
563fa84f49 | ||
|
|
513fd4ca50 | ||
|
|
1e4c9914fa |
@@ -23,6 +23,9 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
* 源码仓库地址:<https://gitee.com/thinkgem/jeesite4>
|
||||||
|
* 分离版前端源码仓库:<https://gitee.com/thinkgem/jeesite-vue>
|
||||||
|
|
||||||
## 平台介绍
|
## 平台介绍
|
||||||
|
|
||||||
JeeSite 快速开发平台,不仅仅是一个后台开发框架,它是一个企业级快速开发解决方案,后端基于经典组合 Spring Boot、Shiro、MyBatis,前端采用 Beetl、Bootstrap、AdminLTE 经典开发模式,或者分离版 Vue3、Vite、Ant Design Vue、TypeScript、Vben Admin 最先进技术栈。提供在线代码生成功能,可自动创建业务模块工程和微服务模块工程,自动生成前端代码和后端代码;包括功能模块如:组织机构、角色用户、菜单及按钮授权、数据权限、系统参数、内容管理、工作流等。采用松耦合设计,微内核和插件架构,模块增减便捷;界面无刷新,一键换肤;众多账号安全设置,密码策略;文件在线预览;消息推送;多元化第三方登录;在线定时任务配置;支持集群,支持SAAS;支持多数据源;支持读写分离、分库分表;支持微服务应用。
|
JeeSite 快速开发平台,不仅仅是一个后台开发框架,它是一个企业级快速开发解决方案,后端基于经典组合 Spring Boot、Shiro、MyBatis,前端采用 Beetl、Bootstrap、AdminLTE 经典开发模式,或者分离版 Vue3、Vite、Ant Design Vue、TypeScript、Vben Admin 最先进技术栈。提供在线代码生成功能,可自动创建业务模块工程和微服务模块工程,自动生成前端代码和后端代码;包括功能模块如:组织机构、角色用户、菜单及按钮授权、数据权限、系统参数、内容管理、工作流等。采用松耦合设计,微内核和插件架构,模块增减便捷;界面无刷新,一键换肤;众多账号安全设置,密码策略;文件在线预览;消息推送;多元化第三方登录;在线定时任务配置;支持集群,支持SAAS;支持多数据源;支持读写分离、分库分表;支持微服务应用。
|
||||||
@@ -43,6 +46,8 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
|||||||
|
|
||||||
大家都在用 Spring,也在学习 Spring 的优点,Spring 提供了较好的扩展性,可又有多少人去修改它的源代码呢,退一步说,大家去修改了 Spring 的源码,反而会对未来升级造成很大困扰,您说不是呢?这样的例子很多,所以不要纠结,我们非常注重这一点,JeeSite 也一样具备强大的扩展性。
|
大家都在用 Spring,也在学习 Spring 的优点,Spring 提供了较好的扩展性,可又有多少人去修改它的源代码呢,退一步说,大家去修改了 Spring 的源码,反而会对未来升级造成很大困扰,您说不是呢?这样的例子很多,所以不要纠结,我们非常注重这一点,JeeSite 也一样具备强大的扩展性。
|
||||||
|
|
||||||
|
为什么说 JeeSite 比较易于学习?JeeSite 很好的把握了设计的 “度”,避免过度设计的情况。过度设计是在产品设计过程中忽略了产品和用户的实际需求,反而带来了不必要的复杂性,而忽略了系统的学习、开发和维护成本。
|
||||||
|
|
||||||
* 至今 JeeSite 平台架构已经非常稳定。
|
* 至今 JeeSite 平台架构已经非常稳定。
|
||||||
* JeeSite 精益求精,用心打磨每一个细节。
|
* JeeSite 精益求精,用心打磨每一个细节。
|
||||||
* JeeSite 是一个专业的平台,是一个让你使用放心的平台。
|
* JeeSite 是一个专业的平台,是一个让你使用放心的平台。
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.jeesite</groupId>
|
<groupId>com.jeesite</groupId>
|
||||||
<artifactId>jeesite-parent</artifactId>
|
<artifactId>jeesite-parent</artifactId>
|
||||||
<version>5.3.0-SNAPSHOT</version>
|
<version>5.3.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent/pom.xml</relativePath>
|
<relativePath>../parent/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -65,17 +65,26 @@ public class ListUtils extends org.apache.commons.collections.ListUtils {
|
|||||||
|
|
||||||
@SafeVarargs
|
@SafeVarargs
|
||||||
public static <E> ArrayList<E> newArrayList(E... elements) {
|
public static <E> ArrayList<E> newArrayList(E... elements) {
|
||||||
|
if (elements == null) {
|
||||||
|
return newArrayList();
|
||||||
|
}
|
||||||
ArrayList<E> list = new ArrayList<E>(elements.length);
|
ArrayList<E> list = new ArrayList<E>(elements.length);
|
||||||
Collections.addAll(list, elements);
|
Collections.addAll(list, elements);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <E> ArrayList<E> newArrayList(Iterable<? extends E> elements) {
|
public static <E> ArrayList<E> newArrayList(Iterable<? extends E> elements) {
|
||||||
|
if (elements == null) {
|
||||||
|
return newArrayList();
|
||||||
|
}
|
||||||
return (elements instanceof Collection) ? new ArrayList<E>(cast(elements))
|
return (elements instanceof Collection) ? new ArrayList<E>(cast(elements))
|
||||||
: newArrayList(elements.iterator());
|
: newArrayList(elements.iterator());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <E> ArrayList<E> newArrayList(Iterator<? extends E> elements) {
|
public static <E> ArrayList<E> newArrayList(Iterator<? extends E> elements) {
|
||||||
|
if (elements == null) {
|
||||||
|
return newArrayList();
|
||||||
|
}
|
||||||
ArrayList<E> list = newArrayList();
|
ArrayList<E> list = newArrayList();
|
||||||
addAll(list, elements);
|
addAll(list, elements);
|
||||||
return list;
|
return list;
|
||||||
@@ -86,6 +95,9 @@ public class ListUtils extends org.apache.commons.collections.ListUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static <E> LinkedList<E> newLinkedList(Iterable<? extends E> elements) {
|
public static <E> LinkedList<E> newLinkedList(Iterable<? extends E> elements) {
|
||||||
|
if (elements == null) {
|
||||||
|
return newLinkedList();
|
||||||
|
}
|
||||||
LinkedList<E> list = newLinkedList();
|
LinkedList<E> list = newLinkedList();
|
||||||
addAll(list, elements);
|
addAll(list, elements);
|
||||||
return list;
|
return list;
|
||||||
@@ -96,6 +108,9 @@ public class ListUtils extends org.apache.commons.collections.ListUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static <E> CopyOnWriteArrayList<E> newCopyOnWriteArrayList(Iterable<? extends E> elements) {
|
public static <E> CopyOnWriteArrayList<E> newCopyOnWriteArrayList(Iterable<? extends E> elements) {
|
||||||
|
if (elements == null) {
|
||||||
|
return new CopyOnWriteArrayList<E>();
|
||||||
|
}
|
||||||
Collection<? extends E> elementsCollection = (elements instanceof Collection)
|
Collection<? extends E> elementsCollection = (elements instanceof Collection)
|
||||||
? cast(elements) : newArrayList(elements);
|
? cast(elements) : newArrayList(elements);
|
||||||
return new CopyOnWriteArrayList<E>(elementsCollection);
|
return new CopyOnWriteArrayList<E>(elementsCollection);
|
||||||
@@ -106,6 +121,9 @@ public class ListUtils extends org.apache.commons.collections.ListUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static <T> boolean addAll(Collection<T> addTo, Iterator<? extends T> iterator) {
|
private static <T> boolean addAll(Collection<T> addTo, Iterator<? extends T> iterator) {
|
||||||
|
if (addTo == null || iterator == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
boolean wasModified = false;
|
boolean wasModified = false;
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
wasModified |= addTo.add(iterator.next());
|
wasModified |= addTo.add(iterator.next());
|
||||||
@@ -114,6 +132,9 @@ public class ListUtils extends org.apache.commons.collections.ListUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static <T> boolean addAll(Collection<T> addTo, Iterable<? extends T> elementsToAdd) {
|
public static <T> boolean addAll(Collection<T> addTo, Iterable<? extends T> elementsToAdd) {
|
||||||
|
if (addTo == null || elementsToAdd == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (elementsToAdd instanceof Collection) {
|
if (elementsToAdd instanceof Collection) {
|
||||||
Collection<? extends T> c = cast(elementsToAdd);
|
Collection<? extends T> c = cast(elementsToAdd);
|
||||||
return addTo.addAll(c);
|
return addTo.addAll(c);
|
||||||
|
|||||||
@@ -4,25 +4,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.jeesite.common.collect;
|
package com.jeesite.common.collect;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import com.jeesite.common.lang.StringUtils;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.EnumMap;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.IdentityHashMap;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.SortedMap;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
import java.util.concurrent.ConcurrentMap;
|
|
||||||
|
|
||||||
import org.apache.commons.beanutils.BeanUtils;
|
import org.apache.commons.beanutils.BeanUtils;
|
||||||
import org.apache.commons.beanutils.PropertyUtils;
|
import org.apache.commons.beanutils.PropertyUtils;
|
||||||
|
|
||||||
import com.jeesite.common.lang.StringUtils;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.concurrent.ConcurrentMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map工具类,实现 Map <-> Bean 互相转换
|
* Map工具类,实现 Map <-> Bean 互相转换
|
||||||
@@ -85,8 +74,7 @@ public class MapUtils extends org.apache.commons.collections.MapUtils {
|
|||||||
* @param clazz
|
* @param clazz
|
||||||
* @param list
|
* @param list
|
||||||
*/
|
*/
|
||||||
public static <T, V> List<T> toObjectList(Class<T> clazz, List<HashMap<String, V>> list) throws Exception,
|
public static <T, V> List<T> toObjectList(Class<T> clazz, List<HashMap<String, V>> list) throws Exception {
|
||||||
InvocationTargetException, NoSuchMethodException, InstantiationException {
|
|
||||||
List<T> retList = new ArrayList<T>();
|
List<T> retList = new ArrayList<T>();
|
||||||
if (list != null && !list.isEmpty()) {
|
if (list != null && !list.isEmpty()) {
|
||||||
for (HashMap<String, V> m : list) {
|
for (HashMap<String, V> m : list) {
|
||||||
@@ -101,8 +89,7 @@ public class MapUtils extends org.apache.commons.collections.MapUtils {
|
|||||||
* @param clazz 目标对象的类
|
* @param clazz 目标对象的类
|
||||||
* @param map 待转换Map
|
* @param map 待转换Map
|
||||||
*/
|
*/
|
||||||
public static <T, V> T toObject(Class<T> clazz, Map<String, V> map) throws Exception,
|
public static <T, V> T toObject(Class<T> clazz, Map<String, V> map) throws Exception {
|
||||||
InvocationTargetException {
|
|
||||||
T object = clazz.getDeclaredConstructor().newInstance();
|
T object = clazz.getDeclaredConstructor().newInstance();
|
||||||
return toObject(object, map);
|
return toObject(object, map);
|
||||||
}
|
}
|
||||||
@@ -113,15 +100,13 @@ public class MapUtils extends org.apache.commons.collections.MapUtils {
|
|||||||
* @param map 待转换Map
|
* @param map 待转换Map
|
||||||
* @param toCamelCase 是否去掉下划线
|
* @param toCamelCase 是否去掉下划线
|
||||||
*/
|
*/
|
||||||
public static <T, V> T toObject(Class<T> clazz, Map<String, V> map, boolean toCamelCase) throws Exception,
|
public static <T, V> T toObject(Class<T> clazz, Map<String, V> map, boolean toCamelCase) throws Exception {
|
||||||
InvocationTargetException {
|
|
||||||
T object = clazz.getDeclaredConstructor().newInstance();
|
T object = clazz.getDeclaredConstructor().newInstance();
|
||||||
return toObject(object, map, toCamelCase);
|
return toObject(object, map, toCamelCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将Map转换为Object
|
* 将Map转换为Object
|
||||||
* @param clazz 目标对象的类
|
|
||||||
* @param map 待转换Map
|
* @param map 待转换Map
|
||||||
*/
|
*/
|
||||||
public static <T, V> T toObject(T object, Map<String, V> map) throws InstantiationException, IllegalAccessException, InvocationTargetException {
|
public static <T, V> T toObject(T object, Map<String, V> map) throws InstantiationException, IllegalAccessException, InvocationTargetException {
|
||||||
@@ -203,9 +188,7 @@ public class MapUtils extends org.apache.commons.collections.MapUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 转换成Map并提供字段命名驼峰转平行
|
* 转换成Map并提供字段命名驼峰转平行
|
||||||
* @param clazz 目标对象所在类
|
|
||||||
* @param object 目标对象
|
* @param object 目标对象
|
||||||
* @param map 待转换Map
|
|
||||||
* @throws NoSuchMethodException
|
* @throws NoSuchMethodException
|
||||||
* @throws InvocationTargetException
|
* @throws InvocationTargetException
|
||||||
* @throws IllegalAccessException
|
* @throws IllegalAccessException
|
||||||
|
|||||||
@@ -4,36 +4,26 @@
|
|||||||
*/
|
*/
|
||||||
package com.jeesite.common.io;
|
package com.jeesite.common.io;
|
||||||
|
|
||||||
import java.io.File;
|
import com.jeesite.common.codec.EncodeUtils;
|
||||||
import java.io.FileInputStream;
|
import com.jeesite.common.collect.ListUtils;
|
||||||
import java.io.FileNotFoundException;
|
import com.jeesite.common.lang.StringUtils;
|
||||||
import java.io.FileOutputStream;
|
import net.sf.jmimemagic.Magic;
|
||||||
import java.io.IOException;
|
import net.sf.jmimemagic.MagicMatch;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.io.RandomAccessFile;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.zip.ZipEntry;
|
|
||||||
import java.util.zip.ZipFile;
|
|
||||||
import java.util.zip.ZipOutputStream;
|
|
||||||
|
|
||||||
import javax.activation.MimetypesFileTypeMap;
|
|
||||||
import javax.servlet.ServletOutputStream;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
|
||||||
import com.jeesite.common.codec.EncodeUtils;
|
import javax.activation.MimetypesFileTypeMap;
|
||||||
import com.jeesite.common.collect.ListUtils;
|
import javax.servlet.ServletOutputStream;
|
||||||
import com.jeesite.common.lang.StringUtils;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import net.sf.jmimemagic.Magic;
|
import java.io.*;
|
||||||
import net.sf.jmimemagic.MagicMatch;
|
import java.util.Enumeration;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipFile;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件操作工具类
|
* 文件操作工具类
|
||||||
@@ -41,6 +31,7 @@ import net.sf.jmimemagic.MagicMatch;
|
|||||||
* @author ThinkGem
|
* @author ThinkGem
|
||||||
* @version 2015-3-16
|
* @version 2015-3-16
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class FileUtils extends org.apache.commons.io.FileUtils {
|
public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||||
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(FileUtils.class);
|
private static Logger logger = LoggerFactory.getLogger(FileUtils.class);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import java.security.ProtectionDomain;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
|
|
||||||
|
@SuppressWarnings({"restriction", "rawtypes", "unchecked"})
|
||||||
class AccessClassLoader extends ClassLoader {
|
class AccessClassLoader extends ClassLoader {
|
||||||
// Weak-references to class loaders, to avoid perm gen memory leaks, for example in app servers/web containters if the
|
// Weak-references to class loaders, to avoid perm gen memory leaks, for example in app servers/web containters if the
|
||||||
// reflectasm library (including this class) is loaded outside the deployed applications (WAR/EAR) using ReflectASM/Kryo (exts,
|
// reflectasm library (including this class) is loaded outside the deployed applications (WAR/EAR) using ReflectASM/Kryo (exts,
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import static org.springframework.asm.Opcodes.*;
|
import static org.springframework.asm.Opcodes.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public abstract class FieldAccess {
|
public abstract class FieldAccess {
|
||||||
private String[] fieldNames;
|
private String[] fieldNames;
|
||||||
private Class[] fieldTypes;
|
private Class[] fieldTypes;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import static org.springframework.asm.Opcodes.*;
|
import static org.springframework.asm.Opcodes.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public abstract class MethodAccess {
|
public abstract class MethodAccess {
|
||||||
private String[] methodNames;
|
private String[] methodNames;
|
||||||
private Class[][] parameterTypes;
|
private Class[][] parameterTypes;
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public class ExcelExport implements Closeable{
|
|||||||
*/
|
*/
|
||||||
private Map<Class<? extends FieldType>, FieldType> fieldTypes = MapUtils.newHashMap();
|
private Map<Class<? extends FieldType>, FieldType> fieldTypes = MapUtils.newHashMap();
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
private static Class dictUtilsClass = null;
|
private static Class dictUtilsClass = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ public class ExcelImport implements Closeable {
|
|||||||
*/
|
*/
|
||||||
private Map<Class<? extends FieldType>, FieldType> fieldTypes = MapUtils.newHashMap();
|
private Map<Class<? extends FieldType>, FieldType> fieldTypes = MapUtils.newHashMap();
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
private static Class dictUtilsClass = null;
|
private static Class dictUtilsClass = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -183,7 +183,6 @@ public class ServletUtils {
|
|||||||
* 返回结果JSON字符串(支持JsonP,请求参数加:__callback=回调函数名)
|
* 返回结果JSON字符串(支持JsonP,请求参数加:__callback=回调函数名)
|
||||||
* @param result Global.TRUE or Globle.False
|
* @param result Global.TRUE or Globle.False
|
||||||
* @param message 执行消息
|
* @param message 执行消息
|
||||||
* @param data 消息数据
|
|
||||||
* @return JSON字符串:{result:'true',message:''}
|
* @return JSON字符串:{result:'true',message:''}
|
||||||
*/
|
*/
|
||||||
public static String renderResult(String result, String message) {
|
public static String renderResult(String result, String message) {
|
||||||
@@ -304,7 +303,6 @@ public class ServletUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 将对象转换为JSON、XML、JSONP字符串渲染到客户端(JsonP,请求参数加:__callback=回调函数名)
|
* 将对象转换为JSON、XML、JSONP字符串渲染到客户端(JsonP,请求参数加:__callback=回调函数名)
|
||||||
* @param request 请求对象,用来得到输出格式的指令:JSON、XML、JSONP
|
|
||||||
* @param response 渲染对象
|
* @param response 渲染对象
|
||||||
* @param object 待转换JSON并渲染的对象
|
* @param object 待转换JSON并渲染的对象
|
||||||
* @return null
|
* @return null
|
||||||
@@ -315,7 +313,6 @@ public class ServletUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 将对象转换为JSON、XML、JSONP字符串渲染到客户端(JsonP,请求参数加:__callback=回调函数名)
|
* 将对象转换为JSON、XML、JSONP字符串渲染到客户端(JsonP,请求参数加:__callback=回调函数名)
|
||||||
* @param request 请求对象,用来得到输出格式的指令:JSON、XML、JSONP
|
|
||||||
* @param response 渲染对象
|
* @param response 渲染对象
|
||||||
* @param object 待转换JSON并渲染的对象
|
* @param object 待转换JSON并渲染的对象
|
||||||
* @param jsonView 根据 JsonView 过滤
|
* @param jsonView 根据 JsonView 过滤
|
||||||
|
|||||||
@@ -868,7 +868,7 @@ layer.iframeAuto = function(index, diffVal, $this){
|
|||||||
var layero = $('#'+ doms[0] + index);
|
var layero = $('#'+ doms[0] + index);
|
||||||
var titHeight = layero.find(doms[1]).outerHeight() || 0;
|
var titHeight = layero.find(doms[1]).outerHeight() || 0;
|
||||||
var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
|
var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
|
||||||
// var heg = layer.getChildFrame('html', index).outerHeight();
|
//var heg = layer.getChildFrame('html', index).outerHeight();
|
||||||
var heg = iframeWin.document.body.scrollHeight;
|
var heg = iframeWin.document.body.scrollHeight;
|
||||||
var layerHeight = heg + titHeight + btnHeight;
|
var layerHeight = heg + titHeight + btnHeight;
|
||||||
var layerTop = ($(window).height() - layerHeight) / 2;
|
var layerTop = ($(window).height() - layerHeight) / 2;
|
||||||
@@ -876,7 +876,7 @@ layer.iframeAuto = function(index, diffVal, $this){
|
|||||||
var $iframe = layero.find('iframe');
|
var $iframe = layero.find('iframe');
|
||||||
if (Math.abs($iframe.height() - heg) < (diffVal || 9000)){
|
if (Math.abs($iframe.height() - heg) < (diffVal || 9000)){
|
||||||
layero.animate({height: layerHeight, top: layerTop}, 20);
|
layero.animate({height: layerHeight, top: layerTop}, 20);
|
||||||
$iframe.animate({height: heg}, 20);
|
$iframe.animate({height: heg + 1}, 20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.jeesite</groupId>
|
<groupId>com.jeesite</groupId>
|
||||||
<artifactId>jeesite-parent</artifactId>
|
<artifactId>jeesite-parent</artifactId>
|
||||||
<version>5.3.0-SNAPSHOT</version>
|
<version>5.3.1-SNAPSHOT</version>
|
||||||
<relativePath>../../parent/pom.xml</relativePath>
|
<relativePath>../../parent/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -4,20 +4,20 @@
|
|||||||
*/
|
*/
|
||||||
package com.jeesite.modules.cms.entity;
|
package com.jeesite.modules.cms.entity;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import com.jeesite.common.config.Global;
|
import com.jeesite.common.config.Global;
|
||||||
import com.jeesite.common.entity.DataEntity;
|
import com.jeesite.common.entity.DataEntity;
|
||||||
import com.jeesite.common.lang.StringUtils;
|
import com.jeesite.common.lang.StringUtils;
|
||||||
import com.jeesite.common.mybatis.annotation.Column;
|
import com.jeesite.common.mybatis.annotation.Column;
|
||||||
import com.jeesite.common.mybatis.annotation.Table;
|
import com.jeesite.common.mybatis.annotation.Table;
|
||||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||||
|
import com.jeesite.modules.cms.utils.CmsUtils;
|
||||||
import com.jeesite.modules.sys.utils.CorpUtils;
|
import com.jeesite.modules.sys.utils.CorpUtils;
|
||||||
import com.jeesite.modules.sys.utils.UserUtils;
|
import com.jeesite.modules.sys.utils.UserUtils;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 站点表Entity
|
* 站点表Entity
|
||||||
* @author 长春叭哥、ThinkGem
|
* @author 长春叭哥、ThinkGem
|
||||||
@@ -209,9 +209,6 @@ public class Site extends DataEntity<Site> {
|
|||||||
this.categoryList = categoryList;
|
this.categoryList = categoryList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断是否为当前站点
|
* 判断是否为当前站点
|
||||||
*/
|
*/
|
||||||
@@ -219,6 +216,10 @@ public class Site extends DataEntity<Site> {
|
|||||||
return getCurrentSiteCode().equals(siteCode);
|
return getCurrentSiteCode().equals(siteCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return CmsUtils.getUrlDynamic(this);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断是否为默认(主站)站点
|
* 判断是否为默认(主站)站点
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ public class CmsUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得当前站点信息
|
* 获得当前站点信息
|
||||||
* @param siteCode 站点编号
|
|
||||||
*/
|
*/
|
||||||
public static Site getCurrentSite() {
|
public static Site getCurrentSite() {
|
||||||
return getSite(Site.getCurrentSiteCode());
|
return getSite(Site.getCurrentSiteCode());
|
||||||
@@ -296,6 +295,26 @@ public class CmsUtils {
|
|||||||
return str.toString();
|
return str.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得站点动态URL地址
|
||||||
|
* @param site
|
||||||
|
* @return url
|
||||||
|
*/
|
||||||
|
public static String getUrlDynamic(Site site) {
|
||||||
|
StringBuilder str = new StringBuilder();
|
||||||
|
str.append(Static.context.getContextPath()).append(Global.getFrontPath());
|
||||||
|
if (StringUtils.isNotBlank(site.getDomain())) {
|
||||||
|
if (site.getDomain().contains("://")) {
|
||||||
|
return site.getDomain();
|
||||||
|
} else {
|
||||||
|
str.append(site.getDomain());
|
||||||
|
return str.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
str.append("/index-").append(site.getSiteCode()).append(".html");
|
||||||
|
return str.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得栏目动态URL地址
|
* 获得栏目动态URL地址
|
||||||
* @param category
|
* @param category
|
||||||
|
|||||||
@@ -15,3 +15,4 @@
|
|||||||
5.2.0
|
5.2.0
|
||||||
5.2.1
|
5.2.1
|
||||||
5.3.0
|
5.3.0
|
||||||
|
5.3.1
|
||||||
@@ -129,7 +129,7 @@ $('#dataGrid').dataGrid({
|
|||||||
}},
|
}},
|
||||||
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
||||||
var actions = [];
|
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> ');
|
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){
|
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> ');
|
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/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> ');
|
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('');
|
return actions.join('');
|
||||||
}}
|
}}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<div class="row"><br/>
|
<div class="row"><br/>
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li><span style="color:#999;">当前位置:</span><a href="${ctx}/index-${site.siteCode}">首页</a></li>
|
<li><span style="color:#999;">当前位置:</span><a href="${site.url}">首页</a></li>
|
||||||
<%
|
<%
|
||||||
var pcs = @StringUtils.split(category.parentCodes, ',');
|
var pcs = @StringUtils.split(category.parentCodes, ',');
|
||||||
var tns = @StringUtils.split(category.treeNames, '/');
|
var tns = @StringUtils.split(category.treeNames, '/');
|
||||||
for(var i = 0; i < pcs.~size - 1; i++){
|
for(var i = 0; i < pcs.~size - 1; i++){
|
||||||
%>
|
%>
|
||||||
<li><a href="${ctx}/list-${pcs[i+1]}">${tns[i]}</a></li>
|
<li><a href="${ctx}/list-${pcs[i+1]}.html">${tns[i]}</a></li>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
<li><a href="${ctx}/list-${category.categoryCode}">${category.categoryName}</a></li>
|
<li><a href="${category.url}">${category.categoryName}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<a href="${ctx}/index-${site.siteCode}" class="navbar-brand">${site.title}</a>
|
<a href="${site.url}" class="navbar-brand">${site.title}</a>
|
||||||
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
|
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<#html:foreach items="${categoryList(site.siteCode, '0', 4, '')}" var="c">
|
<#html:foreach items="${categoryList(site.siteCode, '0', 4, '')}" var="c">
|
||||||
<#html:if test="${c.inMenu == @Global.YES}">
|
<#html:if test="${c.inMenu == @Global.YES}">
|
||||||
<li class="${c.categoryCode == category.categoryCode! ? 'active' : ''}"><a
|
<li class="${c.categoryCode == category.categoryCode! ? 'active' : ''}"><a
|
||||||
href="${ctx}/list-${c.categoryCode}">${c.categoryName}</a></li>
|
href="${c.url}">${c.categoryName}</a></li>
|
||||||
</#html:if>
|
</#html:if>
|
||||||
</#html:foreach>
|
</#html:foreach>
|
||||||
<li><a href="http://s.jeesite.com" target="_blank">技术服务</a></li>
|
<li><a href="http://s.jeesite.com" target="_blank">技术服务</a></li>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="站点">子站切换 <span class="caret"></span></a>
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="站点">子站切换 <span class="caret"></span></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<#html:foreach items="${siteList()}" var="site,status">
|
<#html:foreach items="${siteList()}" var="site,status">
|
||||||
<li><a href="#" onclick="location='${ctx}/index-${site.id}'">${site.title}</a></li>
|
<li><a href="#" onclick="location='${site.url}'">${site.title}</a></li>
|
||||||
</#html:foreach>
|
</#html:foreach>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<div class="bs-component">
|
<div class="bs-component">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title"><small><a href="${ctx}/list-${category.categoryCode}" class="pull-right more">更多>></a></small>${category.categoryName}</h3>
|
<h3 class="panel-title"><small><a href="${category.url}" class="pull-right more">更多>></a></small>${category.categoryName}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<ul class="article-list">
|
<ul class="article-list">
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<div class="pagination">${@page.toHtml()}</div>
|
<div class="pagination">${@page.toHtml()}</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function page(n,s){
|
function page(n,s){
|
||||||
location="${ctx}/list-${category.categoryCode}?pageNo="+n+"&pageSize="+s;
|
location="${category.url}?pageNo="+n+"&pageSize="+s;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</#html:if>
|
</#html:if>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<div class="bs-component">
|
<div class="bs-component">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title"><small><a href="${ctx}/list-${category.categoryCode}" class="pull-right more">更多>></a></small>${category.categoryName}</h3>
|
<h3 class="panel-title"><small><a href="${category.url}" class="pull-right more">更多>></a></small>${category.categoryName}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<ul class="article-list">
|
<ul class="article-list">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.jeesite</groupId>
|
<groupId>com.jeesite</groupId>
|
||||||
<artifactId>jeesite-parent</artifactId>
|
<artifactId>jeesite-parent</artifactId>
|
||||||
<version>5.3.0-SNAPSHOT</version>
|
<version>5.3.1-SNAPSHOT</version>
|
||||||
<relativePath>../../parent/pom.xml</relativePath>
|
<relativePath>../../parent/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -40,11 +40,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.oracle.ojdbc</groupId>
|
<groupId>com.oracle.ojdbc</groupId>
|
||||||
<artifactId>ojdbc8</artifactId>
|
<artifactId>ojdbc8</artifactId>
|
||||||
|
<version>19.3.0.0</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.oracle.ojdbc</groupId>
|
<groupId>com.oracle.ojdbc</groupId>
|
||||||
<artifactId>orai18n</artifactId>
|
<artifactId>orai18n</artifactId>
|
||||||
|
<version>19.3.0.0</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency> -->
|
</dependency> -->
|
||||||
<!-- SqlServer 2008 -->
|
<!-- SqlServer 2008 -->
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ public class FormFilter extends org.apache.shiro.web.filter.authc.FormAuthentica
|
|||||||
authorizingRealm.onLoginSuccess(UserUtils.getLoginInfo(), request);
|
authorizingRealm.onLoginSuccess(UserUtils.getLoginInfo(), request);
|
||||||
// 跳转到登录成功页面
|
// 跳转到登录成功页面
|
||||||
String successUrl = getSuccessUrl(); // shiro.successUrl in application.yml
|
String successUrl = getSuccessUrl(); // shiro.successUrl in application.yml
|
||||||
if (StringUtils.contains((request).getRequestURI(), "/oauth2/")) {
|
if (StringUtils.contains((request).getRequestURI(), "/oauth2/callback/")) {
|
||||||
successUrl = Global.getConfig("oauth2.successUrl", successUrl);
|
successUrl = Global.getConfig("oauth2.successUrl", successUrl);
|
||||||
}
|
}
|
||||||
ServletUtils.redirectUrl(request, (HttpServletResponse)response, successUrl);
|
ServletUtils.redirectUrl(request, (HttpServletResponse)response, successUrl);
|
||||||
|
|||||||
@@ -4,12 +4,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.jeesite.common.shiro.realm;
|
package com.jeesite.common.shiro.realm;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import org.apache.shiro.authc.AuthenticationException;
|
|
||||||
import org.apache.shiro.authc.AuthenticationInfo;
|
|
||||||
import org.apache.shiro.authc.AuthenticationToken;
|
|
||||||
|
|
||||||
import com.jeesite.common.codec.EncodeUtils;
|
import com.jeesite.common.codec.EncodeUtils;
|
||||||
import com.jeesite.common.codec.Sha1Utils;
|
import com.jeesite.common.codec.Sha1Utils;
|
||||||
import com.jeesite.common.shiro.authc.FormToken;
|
import com.jeesite.common.shiro.authc.FormToken;
|
||||||
@@ -19,6 +13,11 @@ import com.jeesite.modules.sys.entity.User;
|
|||||||
import com.jeesite.modules.sys.service.UserService;
|
import com.jeesite.modules.sys.service.UserService;
|
||||||
import com.jeesite.modules.sys.utils.LogUtils;
|
import com.jeesite.modules.sys.utils.LogUtils;
|
||||||
import com.jeesite.modules.sys.utils.UserUtils;
|
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 javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统认证授权实现类
|
* 系统认证授权实现类
|
||||||
@@ -51,12 +50,13 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 用于用户根据登录信息获取用户信息<br>
|
* 用于用户根据登录信息获取用户信息<br>
|
||||||
* 1、默认根据登录账号登录信息,如:UserUtils.getByLoginCode(token.getUsername(), token.getParam("corpCode"));<br>
|
* 1、默认根据登录账号登录信息,如:UserUtils.getByLoginCode(formToken.getUsername(), formToken.getParam("corpCode"));<br>
|
||||||
* 2、如果增加其它登录,请重写此方法,如根据手机号或邮箱登录返回用户信息。
|
* 2、中断操作,可抛出异常提示用户 throw new AuthenticationException("msg:登录失败");<br>
|
||||||
|
* 3、如果增加其它登录方式,请重写此方法,如根据手机号或邮箱登录返回用户信息。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected User getUserInfo(FormToken token) {
|
protected User getUserInfo(FormToken formToken) {
|
||||||
return super.getUserInfo(token);
|
return super.getUserInfo(formToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
|
||||||
* No deletion without permission, or be held responsible to law.
|
|
||||||
*/
|
|
||||||
package com.jeesite.modules.config.web;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面缓存,如果需要,则加入如下依赖并取消下面注释
|
|
||||||
|
|
||||||
1、pom.xml:
|
|
||||||
<dependency>
|
|
||||||
<groupId>net.sf.ehcache</groupId>
|
|
||||||
<artifactId>ehcache-web</artifactId>
|
|
||||||
<version>2.0.4</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
2、application.yml:
|
|
||||||
# 页面缓存配置
|
|
||||||
ehcache:
|
|
||||||
pageCaching:
|
|
||||||
enabled: false
|
|
||||||
urlPatterns: "*.html"
|
|
||||||
|
|
||||||
* @author ThinkGem
|
|
||||||
* @version 2017年11月30日
|
|
||||||
*/
|
|
||||||
//@Configuration
|
|
||||||
public class PageCacheConfig {
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * PageCache Filter, cache .html suffix.
|
|
||||||
// */
|
|
||||||
// @Bean
|
|
||||||
// @Order(2000)
|
|
||||||
// @ConditionalOnProperty(name = "ehcache.pageCaching.enabled", havingValue = "true")
|
|
||||||
// @ConditionalOnMissingBean(name="pageCachingFilter")
|
|
||||||
// public FilterRegistrationBean<PageCachingFilter> pageCachingFilter(EhCacheManagerFactoryBean ehCacheManager) {
|
|
||||||
// FilterRegistrationBean<PageCachingFilter> bean = new FilterRegistrationBean<>();
|
|
||||||
// SimplePageCachingFilter pageCachingFilter = new SimplePageCachingFilter();
|
|
||||||
// pageCachingFilter.setCacheManager(ehCacheManager.getObject());
|
|
||||||
// bean.setFilter(pageCachingFilter);
|
|
||||||
// bean.addInitParameter("cacheName", "pageCachingFilter");
|
|
||||||
// bean.addUrlPatterns(StringUtils.split(Global.getProperty(
|
|
||||||
// "ehcache.pageCaching.urlPatterns"), ","));
|
|
||||||
// return bean;
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -26,7 +26,7 @@ public interface EmpUserService extends CrudServiceApi<EmpUser> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加数据权限过滤条件
|
* 添加数据权限过滤条件
|
||||||
* @param entity 控制对象
|
* @param empUser 控制对象
|
||||||
* @param ctrlPermi 控制权限类型(拥有的数据权限:DataScope.CTRL_PERMI_HAVE、可管理的数据权限:DataScope.CTRL_PERMI_HAVE)
|
* @param ctrlPermi 控制权限类型(拥有的数据权限:DataScope.CTRL_PERMI_HAVE、可管理的数据权限:DataScope.CTRL_PERMI_HAVE)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -461,7 +461,7 @@ session:
|
|||||||
# 会话超时时间,单位:毫秒,10m=600000, 20m=1200000ms, 30m=1800000ms, 60m=3600000ms, 12h=43200000ms, 1day=86400000ms
|
# 会话超时时间,单位:毫秒,10m=600000, 20m=1200000ms, 30m=1800000ms, 60m=3600000ms, 12h=43200000ms, 1day=86400000ms
|
||||||
# 注意:如果超时超过30m,你还需要同步修改当前配置文件的属性:j2cache.caffeine.region.sessionCache 超时时间,大于这个值。
|
# 注意:如果超时超过30m,你还需要同步修改当前配置文件的属性:j2cache.caffeine.region.sessionCache 超时时间,大于这个值。
|
||||||
|
|
||||||
# 游客会话超时时间:只访问了系统,但未登录系统的用户为游客,游客默认超时时间为10分钟,如:未登录系统时的图片验证码有效时间。
|
# 游客会话超时时间:只访问了系统,但未登录系统的用户为游客,游客默认超时时间为3分钟,如:未登录系统时的图片验证码有效时间。
|
||||||
sessionTimeout: 180000
|
sessionTimeout: 180000
|
||||||
|
|
||||||
# 登录系统后的用户超时时间(不明确 param_deviceType 参数的,默认设备为 pc 登录)
|
# 登录系统后的用户超时时间(不明确 param_deviceType 参数的,默认设备为 pc 登录)
|
||||||
@@ -533,8 +533,11 @@ j2cache:
|
|||||||
# MyBatis 相关
|
# MyBatis 相关
|
||||||
mybatis:
|
mybatis:
|
||||||
|
|
||||||
# @MyBatisDao、Aliases 扫描基础包,如果多个,用“,”分隔
|
# @MyBatisDao 扫描基础包,如果多个,用“,”分隔
|
||||||
scanBasePackage: com.jeesite.modules
|
#scanBasePackage: com.jeesite.modules.**.dao
|
||||||
|
|
||||||
|
# TypeAliases 扫描基础包,如果多个,用“,”分隔 v5.3.1
|
||||||
|
#scanTypeAliasesBasePackage: com.jeesite.modules.**.entity
|
||||||
|
|
||||||
# TypeHandlers 扫描基础包,如果多个,用“,”分隔
|
# TypeHandlers 扫描基础包,如果多个,用“,”分隔
|
||||||
scanTypeHandlersPackage: ~
|
scanTypeHandlersPackage: ~
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
# =========== 登录登出相关 ===========
|
# =========== 登录登出相关 ===========
|
||||||
|
|
||||||
sys.login.notLongIn=No login or login timeout.Please login again, thank you!
|
sys.login.notLongIn=Your login information has expired. Please log in again.
|
||||||
sys.login.success=Login successful!
|
sys.login.success=Login successful!
|
||||||
sys.login.getInfo=Get info successful!
|
sys.login.getInfo=Get info successful!
|
||||||
sys.login.failure=Account or password error, please try again.
|
sys.login.failure=Account or password error, please try again.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
# =========== 登录登出相关 ===========
|
# =========== 登录登出相关 ===========
|
||||||
|
|
||||||
sys.login.notLongIn=ログインしていないか、またはログインがタイムアウトしました。もう一度ログインしてください
|
sys.login.notLongIn=ログイン情報が期限切れになっています。再度ログインしてください。
|
||||||
sys.login.success=ログイン成功!
|
sys.login.success=ログイン成功!
|
||||||
sys.login.getInfo=情報取得成功!
|
sys.login.getInfo=情報取得成功!
|
||||||
sys.login.failure=ログインID或いはパスワードに誤りがあります。もう一度にゅうしてください。
|
sys.login.failure=ログインID或いはパスワードに誤りがあります。もう一度にゅうしてください。
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
# =========== 登录登出相关 ===========
|
# =========== 登录登出相关 ===========
|
||||||
|
|
||||||
sys.login.notLongIn=未登录或登录超时。请重新登录,谢谢!
|
sys.login.notLongIn=您的登录信息已过期,请重新登录。
|
||||||
sys.login.success=登录成功!
|
sys.login.success=登录成功!
|
||||||
sys.login.getInfo=获取信息成功!
|
sys.login.getInfo=获取信息成功!
|
||||||
sys.login.failure=账号或密码错误,请重试。
|
sys.login.failure=账号或密码错误,请重试。
|
||||||
|
|||||||
@@ -233,6 +233,7 @@
|
|||||||
<template>module_cloud/web/src/main/webapp/WEB-INF/startup.bat.xml</template>
|
<template>module_cloud/web/src/main/webapp/WEB-INF/startup.bat.xml</template>
|
||||||
<template>module_cloud/web/src/main/webapp/WEB-INF/startup.sh.xml</template>
|
<template>module_cloud/web/src/main/webapp/WEB-INF/startup.sh.xml</template>
|
||||||
<template>module_cloud/web/pom.xml</template>
|
<template>module_cloud/web/pom.xml</template>
|
||||||
|
<template>module_cloud/pom.xml</template>
|
||||||
</category>
|
</category>
|
||||||
</moduleTplCategory>
|
</moduleTplCategory>
|
||||||
</config>
|
</config>
|
||||||
@@ -104,7 +104,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
|
|||||||
/**
|
/**
|
||||||
* 查询子表分页数据
|
* 查询子表分页数据
|
||||||
* @param ${@StringUtils.uncap(child.className)}
|
* @param ${@StringUtils.uncap(child.className)}
|
||||||
* @param ${@StringUtils.uncap(child.className)}.page 分页对象
|
* @param ${@StringUtils.uncap(child.className)} page 分页对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Page<${@StringUtils.cap(child.className)}> findSubPage(${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)}) {
|
public Page<${@StringUtils.cap(child.className)}> findSubPage(${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)}) {
|
||||||
|
|||||||
@@ -545,7 +545,7 @@ for (c in table.columnList){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!${@StringUtils.uncap(child.className)}ListValid) {
|
if (!${@StringUtils.uncap(child.className)}ListValid) {
|
||||||
throw new Error('${@StringUtils.uncap(child.className)}List valid.');
|
throw { errorFields: [{ name: ['${@StringUtils.uncap(child.className)}List'] }] };
|
||||||
}
|
}
|
||||||
return ${@StringUtils.uncap(child.className)}List;
|
return ${@StringUtils.uncap(child.className)}List;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
|
|||||||
/**
|
/**
|
||||||
* 查询子表分页数据
|
* 查询子表分页数据
|
||||||
* @param ${@StringUtils.uncap(child.className)}
|
* @param ${@StringUtils.uncap(child.className)}
|
||||||
* @param ${@StringUtils.uncap(child.className)}.page 分页对象
|
* @param ${@StringUtils.uncap(child.className)} page 分页对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Page<${@StringUtils.cap(child.className)}> findSubPage(${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)}) {
|
public Page<${@StringUtils.cap(child.className)}> findSubPage(${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)}) {
|
||||||
|
|||||||
@@ -89,11 +89,7 @@ $('#btnDraft').click(function(){
|
|||||||
});
|
});
|
||||||
// 流程按钮操作事件
|
// 流程按钮操作事件
|
||||||
BpmButton = window.BpmButton || {};
|
BpmButton = window.BpmButton || {};
|
||||||
BpmButton.init = function(task){
|
BpmButton.init = function(task){}
|
||||||
if (task && task.priority){
|
|
||||||
$('#bpm_priority').val(task.priority).trigger('change'); // 设置下一个任务的优先级
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BpmButton.complete = function($this, task){
|
BpmButton.complete = function($this, task){
|
||||||
$('#status').val(Global.STATUS_AUDIT);
|
$('#status').val(Global.STATUS_AUDIT);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||||
|
No deletion without permission, or be held responsible to law. -->
|
||||||
|
<template>
|
||||||
|
<name>pom</name>
|
||||||
|
<filePath>${baseDir}/${moduleCode}</filePath>
|
||||||
|
<fileName>pom.xml</fileName>
|
||||||
|
<charset></charset>
|
||||||
|
<content><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.jeesite</groupId>
|
||||||
|
<artifactId>jeesite-cloud-module-${moduleCode}</artifactId>
|
||||||
|
<version>${jeesiteVersion}-SNAPSHOT</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>JeeSite Cloud Module ${moduleName}</name>
|
||||||
|
<url>http://jeesite.com</url>
|
||||||
|
<inceptionYear>2013-Now</inceptionYear>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>${moduleCode}</module>
|
||||||
|
<module>${moduleCode}-client</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>thinkgem</id>
|
||||||
|
<name>WangZhen</name>
|
||||||
|
<email>thinkgem at 163.com</email>
|
||||||
|
<roles><role>Project lead</role></roles>
|
||||||
|
<timezone>+8</timezone>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
<organization>
|
||||||
|
<name>JeeSite</name>
|
||||||
|
<url>http://jeesite.com</url>
|
||||||
|
</organization>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
]]>
|
||||||
|
</content>
|
||||||
|
</template>
|
||||||
@@ -18,10 +18,10 @@
|
|||||||
<relativePath>../../../parent/web/pom.xml</relativePath>
|
<relativePath>../../../parent/web/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>jeesite-cloud-module-${moduleCode}</artifactId>
|
<artifactId>jeesite-cloud-module-${moduleCode}-web</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<name>JeeSite Cloud Module ${moduleName}</name>
|
<name>JeeSite Cloud Module ${moduleName} Web</name>
|
||||||
<url>http://jeesite.com</url>
|
<url>http://jeesite.com</url>
|
||||||
<inceptionYear>2013-Now</inceptionYear>
|
<inceptionYear>2013-Now</inceptionYear>
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ eureka:
|
|||||||
# 客户端设置
|
# 客户端设置
|
||||||
client:
|
client:
|
||||||
# 注册中心地址(集群时指定另外一个注册中心地址)
|
# 注册中心地址(集群时指定另外一个注册中心地址)
|
||||||
serviceUrl.defaultZone: http://127.0.0.1:8970/eureka/
|
serviceUrl:
|
||||||
|
defaultZone: http://127.0.0.1:8970/eureka/
|
||||||
|
|
||||||
#======================================#
|
#======================================#
|
||||||
#========== Spring settings ===========#
|
#========== Spring settings ===========#
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
No deletion without permission, or be held responsible to law. -->
|
No deletion without permission, or be held responsible to law. -->
|
||||||
<template>
|
<template>
|
||||||
<name>run-web</name>
|
<name>run-web</name>
|
||||||
<filePath>${module.moduleCode}/${module.moduleCode}/src/main/webapp/WEB-INF</filePath>
|
<filePath>${baseDir}/${moduleCode}/${moduleCode}/src/main/webapp/WEB-INF</filePath>
|
||||||
<fileName>startup.bat</fileName>
|
<fileName>startup.bat</fileName>
|
||||||
<content><![CDATA[chcp 65001
|
<content><![CDATA[chcp 65001
|
||||||
@echo off
|
@echo off
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
No deletion without permission, or be held responsible to law. -->
|
No deletion without permission, or be held responsible to law. -->
|
||||||
<template>
|
<template>
|
||||||
<name>run-web</name>
|
<name>run-web</name>
|
||||||
<filePath>${module.moduleCode}/${module.moduleCode}/src/main/webapp/WEB-INF</filePath>
|
<filePath>${baseDir}/${moduleCode}/${moduleCode}/src/main/webapp/WEB-INF</filePath>
|
||||||
<fileName>startup.sh</fileName>
|
<fileName>startup.sh</fileName>
|
||||||
<content><![CDATA[#!/bin/sh
|
<content><![CDATA[#!/bin/sh
|
||||||
# /**
|
# /**
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Query'}Ser
|
|||||||
/**
|
/**
|
||||||
* 查询子表分页数据
|
* 查询子表分页数据
|
||||||
* @param ${@StringUtils.uncap(child.className)}
|
* @param ${@StringUtils.uncap(child.className)}
|
||||||
* @param ${@StringUtils.uncap(child.className)}.page 分页对象
|
* @param ${@StringUtils.uncap(child.className)} page 分页对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Page<${@StringUtils.cap(child.className)}> findSubPage(${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)}) {
|
public Page<${@StringUtils.cap(child.className)}> findSubPage(${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)}) {
|
||||||
|
|||||||
@@ -732,7 +732,9 @@ $(function(){
|
|||||||
var footerHeight = $('.main-footer').outerHeight() || 0;
|
var footerHeight = $('.main-footer').outerHeight() || 0;
|
||||||
var windowHeight = $(window).height();
|
var windowHeight = $(window).height();
|
||||||
$('.content').css('min-height', windowHeight - footerHeight);
|
$('.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();
|
}).resize();
|
||||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||||
$(window).resize();
|
$(window).resize();
|
||||||
|
|||||||
35
modules/pom.xml
Normal file
35
modules/pom.xml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.jeesite</groupId>
|
||||||
|
<artifactId>jeesite-modules</artifactId>
|
||||||
|
<version>5.3.1-SNAPSHOT</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>JeeSite Modules</name>
|
||||||
|
<url>http://jeesite.com</url>
|
||||||
|
<inceptionYear>2013-Now</inceptionYear>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>core</module>
|
||||||
|
<module>cms</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>thinkgem</id>
|
||||||
|
<name>WangZhen</name>
|
||||||
|
<email>thinkgem at 163.com</email>
|
||||||
|
<roles><role>Project lead</role></roles>
|
||||||
|
<timezone>+8</timezone>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
<organization>
|
||||||
|
<name>JeeSite</name>
|
||||||
|
<url>http://jeesite.com</url>
|
||||||
|
</organization>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -6,13 +6,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.7.9</version>
|
<version>2.7.10</version>
|
||||||
<relativePath />
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>com.jeesite</groupId>
|
<groupId>com.jeesite</groupId>
|
||||||
<artifactId>jeesite-parent</artifactId>
|
<artifactId>jeesite-parent</artifactId>
|
||||||
<version>5.3.0-SNAPSHOT</version>
|
<version>5.3.1-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>JeeSite Parent</name>
|
<name>JeeSite Parent</name>
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.jeesite</groupId>
|
<groupId>com.jeesite</groupId>
|
||||||
<artifactId>jeesite</artifactId>
|
<artifactId>jeesite</artifactId>
|
||||||
<version>5.3.0-SNAPSHOT</version>
|
<version>5.3.1-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>JeeSite</name>
|
<name>JeeSite</name>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.jeesite</groupId>
|
<groupId>com.jeesite</groupId>
|
||||||
<artifactId>jeesite-root</artifactId>
|
<artifactId>jeesite-root</artifactId>
|
||||||
<version>5.3.0-SNAPSHOT</version>
|
<version>5.3.1-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>JeeSite Root</name>
|
<name>JeeSite Root</name>
|
||||||
@@ -15,8 +15,7 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>../parent</module>
|
<module>../parent</module>
|
||||||
<module>../common</module>
|
<module>../common</module>
|
||||||
<module>../modules/core</module>
|
<module>../modules</module>
|
||||||
<module>../modules/cms</module>
|
|
||||||
<module>../web</module>
|
<module>../web</module>
|
||||||
<module>../web-api</module>
|
<module>../web-api</module>
|
||||||
<module>../web-fast</module>
|
<module>../web-fast</module>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.jeesite</groupId>
|
<groupId>com.jeesite</groupId>
|
||||||
<artifactId>jeesite-parent</artifactId>
|
<artifactId>jeesite-parent</artifactId>
|
||||||
<version>5.3.0-SNAPSHOT</version>
|
<version>5.3.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent/pom.xml</relativePath>
|
<relativePath>../parent/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${finalName}</finalName>
|
<finalName>${finalName}</finalName>
|
||||||
<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>
|
<!--<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>-->
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
||||||
<!-- Spring Boot -->
|
<!-- Spring Boot -->
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分页数据
|
* 查询分页数据
|
||||||
* @param page 分页对象
|
* @param testData page 分页对象
|
||||||
* @param testData
|
* @param testData 查询条件
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -70,8 +70,8 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询子表分页数据
|
* 查询子表分页数据
|
||||||
* @param page 分页对象
|
* @param testData 查询条件
|
||||||
* @param testData
|
* @param testData page 分页对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<TestDataChild> findSubList(TestDataChild testData) {
|
public List<TestDataChild> findSubList(TestDataChild testData) {
|
||||||
|
|||||||
@@ -625,7 +625,7 @@ session:
|
|||||||
# 会话超时时间,单位:毫秒,10m=600000, 20m=1200000ms, 30m=1800000ms, 60m=3600000ms, 12h=43200000ms, 1day=86400000ms
|
# 会话超时时间,单位:毫秒,10m=600000, 20m=1200000ms, 30m=1800000ms, 60m=3600000ms, 12h=43200000ms, 1day=86400000ms
|
||||||
# 注意:如果超时超过30m,你还需要同步修改当前配置文件的属性:j2cache.caffeine.region.sessionCache 超时时间,大于这个值。
|
# 注意:如果超时超过30m,你还需要同步修改当前配置文件的属性:j2cache.caffeine.region.sessionCache 超时时间,大于这个值。
|
||||||
|
|
||||||
# 游客会话超时时间:只访问了系统,但未登录系统的用户为游客,游客默认超时时间为10分钟,如:未登录系统时的图片验证码有效时间。
|
# 游客会话超时时间:只访问了系统,但未登录系统的用户为游客,游客默认超时时间为3分钟,如:未登录系统时的图片验证码有效时间。
|
||||||
sessionTimeout: 180000
|
sessionTimeout: 180000
|
||||||
|
|
||||||
# 登录系统后的用户超时时间(不明确 param_deviceType 参数的,默认设备为 pc 登录)
|
# 登录系统后的用户超时时间(不明确 param_deviceType 参数的,默认设备为 pc 登录)
|
||||||
@@ -697,8 +697,11 @@ session:
|
|||||||
# MyBatis 相关
|
# MyBatis 相关
|
||||||
mybatis:
|
mybatis:
|
||||||
|
|
||||||
# @MyBatisDao、Aliases 扫描基础包,如果多个,用“,”分隔
|
# @MyBatisDao 扫描基础包,如果多个,用“,”分隔
|
||||||
scanBasePackage: com.jeesite.modules
|
scanBasePackage: com.jeesite.modules.**.dao
|
||||||
|
|
||||||
|
# TypeAliases 扫描基础包,如果多个,用“,”分隔 v5.3.1
|
||||||
|
scanTypeAliasesBasePackage: com.jeesite.modules.**.entity
|
||||||
|
|
||||||
# # TypeHandlers 扫描基础包,如果多个,用“,”分隔
|
# # TypeHandlers 扫描基础包,如果多个,用“,”分隔
|
||||||
# scanTypeHandlersPackage: ~
|
# scanTypeHandlersPackage: ~
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.jeesite</groupId>
|
<groupId>com.jeesite</groupId>
|
||||||
<artifactId>jeesite-parent</artifactId>
|
<artifactId>jeesite-parent</artifactId>
|
||||||
<version>5.3.0-SNAPSHOT</version>
|
<version>5.3.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent/pom.xml</relativePath>
|
<relativePath>../parent/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${finalName}</finalName>
|
<finalName>${finalName}</finalName>
|
||||||
<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>
|
<!--<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>-->
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
||||||
<!-- Spring Boot -->
|
<!-- Spring Boot -->
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分页数据
|
* 查询分页数据
|
||||||
* @param page 分页对象
|
* @param testData 查询条件
|
||||||
* @param testData
|
* @param testData page 分页对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ $('#dataGrid').dataGrid({
|
|||||||
{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:120, formatter: function(val, obj, row, act){
|
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
||||||
var actions = [];
|
var actions = [];
|
||||||
<% if(hasPermi('test:testTree:edit')){ %>
|
//<% if(hasPermi('test:testTree:edit')){ %>
|
||||||
actions.push('<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a> ');
|
actions.push('<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a> ');
|
||||||
if (row.status == Global.STATUS_NORMAL){
|
if (row.status == Global.STATUS_NORMAL){
|
||||||
actions.push('<a href="${ctx}/test/testTree/disable?treeCode='+row.treeCode+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
actions.push('<a href="${ctx}/test/testTree/disable?treeCode='+row.treeCode+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||||
@@ -73,7 +73,7 @@ $('#dataGrid').dataGrid({
|
|||||||
}
|
}
|
||||||
actions.push('<a href="${ctx}/test/testTree/delete?treeCode='+row.treeCode+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据及所有子数据吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
actions.push('<a href="${ctx}/test/testTree/delete?treeCode='+row.treeCode+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据及所有子数据吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||||
actions.push('<a href="${ctx}/test/testTree/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级数据")}"><i class="fa fa-plus-square"></i></a> ');
|
actions.push('<a href="${ctx}/test/testTree/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级数据")}"><i class="fa fa-plus-square"></i></a> ');
|
||||||
<% } %>
|
//<% } %>
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}}
|
}}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.jeesite</groupId>
|
<groupId>com.jeesite</groupId>
|
||||||
<artifactId>jeesite-parent</artifactId>
|
<artifactId>jeesite-parent</artifactId>
|
||||||
<version>5.3.0-SNAPSHOT</version>
|
<version>5.3.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent/pom.xml</relativePath>
|
<relativePath>../parent/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${finalName}</finalName>
|
<finalName>${finalName}</finalName>
|
||||||
<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>
|
<!--<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>-->
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
||||||
<!-- Spring Boot -->
|
<!-- Spring Boot -->
|
||||||
|
|||||||
@@ -38,19 +38,25 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public TestData get(TestData testData) {
|
public TestData get(TestData testData) {
|
||||||
TestData entity = super.get(testData);
|
return super.get(testData);
|
||||||
if (entity != null){
|
}
|
||||||
TestDataChild testDataChild = new TestDataChild(entity);
|
|
||||||
|
/**
|
||||||
|
* 加载子表数据
|
||||||
|
*/
|
||||||
|
public TestData loadChildData(TestData testData) {
|
||||||
|
if (testData != null && !testData.getIsNewRecord()){
|
||||||
|
TestDataChild testDataChild = new TestDataChild(testData);
|
||||||
testDataChild.setStatus(TestDataChild.STATUS_NORMAL);
|
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
|
||||||
|
* @param testData page 分页对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -70,8 +76,8 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询子表分页数据
|
* 查询子表分页数据
|
||||||
* @param page 分页对象
|
* @param testData 查询条件
|
||||||
* @param testData
|
* @param testData page 分页对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<TestDataChild> findSubList(TestDataChild testData) {
|
public List<TestDataChild> findSubList(TestDataChild testData) {
|
||||||
@@ -146,7 +152,7 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
|||||||
/**
|
/**
|
||||||
* 事务测试,若 Child 报错,则回滚
|
* 事务测试,若 Child 报错,则回滚
|
||||||
*/
|
*/
|
||||||
@Transactional//(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional//(propagation=Propagation.NOT_SUPPORTED)
|
||||||
public void transTest(TestData testData) {
|
public void transTest(TestData testData) {
|
||||||
testData.setTestInput("transTest");
|
testData.setTestInput("transTest");
|
||||||
testData.setTestTextarea(IdGen.randomBase62(5));
|
testData.setTestTextarea(IdGen.randomBase62(5));
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.jeesite.modules.test.web;
|
package com.jeesite.modules.test.web;
|
||||||
|
|
||||||
import java.util.List;
|
import com.jeesite.common.config.Global;
|
||||||
|
import com.jeesite.common.entity.Page;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import com.jeesite.common.lang.StringUtils;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
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.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
import com.jeesite.common.config.Global;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.jeesite.common.entity.Page;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.jeesite.common.web.BaseController;
|
import java.util.List;
|
||||||
import com.jeesite.modules.test.entity.TestData;
|
|
||||||
import com.jeesite.modules.test.entity.TestDataChild;
|
|
||||||
import com.jeesite.modules.test.service.TestDataService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 测试数据Controller
|
* 测试数据Controller
|
||||||
@@ -83,9 +82,10 @@ public class TestDataController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequiresPermissions("test:testData:view")
|
@RequiresPermissions("test:testData:view")
|
||||||
@RequestMapping(value = "form")
|
@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);
|
model.addAttribute("testData", testData);
|
||||||
return "modules/test/testDataForm";
|
return "modules/test/testDataForm"+ StringUtils.defaultString(flag, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -625,7 +625,7 @@ session:
|
|||||||
# 会话超时时间,单位:毫秒,10m=600000, 20m=1200000ms, 30m=1800000ms, 60m=3600000ms, 12h=43200000ms, 1day=86400000ms
|
# 会话超时时间,单位:毫秒,10m=600000, 20m=1200000ms, 30m=1800000ms, 60m=3600000ms, 12h=43200000ms, 1day=86400000ms
|
||||||
# 注意:如果超时超过30m,你还需要同步修改当前配置文件的属性:j2cache.caffeine.region.sessionCache 超时时间,大于这个值。
|
# 注意:如果超时超过30m,你还需要同步修改当前配置文件的属性:j2cache.caffeine.region.sessionCache 超时时间,大于这个值。
|
||||||
|
|
||||||
# 游客会话超时时间:只访问了系统,但未登录系统的用户为游客,游客默认超时时间为10分钟,如:未登录系统时的图片验证码有效时间。
|
# 游客会话超时时间:只访问了系统,但未登录系统的用户为游客,游客默认超时时间为3分钟,如:未登录系统时的图片验证码有效时间。
|
||||||
sessionTimeout: 180000
|
sessionTimeout: 180000
|
||||||
|
|
||||||
# 登录系统后的用户超时时间(不明确 param_deviceType 参数的,默认设备为 pc 登录)
|
# 登录系统后的用户超时时间(不明确 param_deviceType 参数的,默认设备为 pc 登录)
|
||||||
@@ -697,8 +697,11 @@ session:
|
|||||||
# MyBatis 相关
|
# MyBatis 相关
|
||||||
mybatis:
|
mybatis:
|
||||||
|
|
||||||
# @MyBatisDao、Aliases 扫描基础包,如果多个,用“,”分隔
|
# @MyBatisDao 扫描基础包,如果多个,用“,”分隔
|
||||||
scanBasePackage: com.jeesite.modules
|
scanBasePackage: com.jeesite.modules.**.dao
|
||||||
|
|
||||||
|
# TypeAliases 扫描基础包,如果多个,用“,”分隔 v5.3.1
|
||||||
|
scanTypeAliasesBasePackage: com.jeesite.modules.**.entity
|
||||||
|
|
||||||
# # TypeHandlers 扫描基础包,如果多个,用“,”分隔
|
# # TypeHandlers 扫描基础包,如果多个,用“,”分隔
|
||||||
# scanTypeHandlersPackage: ~
|
# scanTypeHandlersPackage: ~
|
||||||
|
|||||||
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>
|
||||||
@@ -123,7 +123,7 @@ $('#dataGrid').dataGrid({
|
|||||||
searchForm: $("#searchForm"),
|
searchForm: $("#searchForm"),
|
||||||
columnModel: [
|
columnModel: [
|
||||||
{header:'${text("单行文本")}', name:'testInput', index:'a.test_input', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
{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) {
|
}, searchoptions: { dataInit: function (element) {
|
||||||
$(element).attr('form', 'searchForm').attr('name', 'testInput2');
|
$(element).attr('form', 'searchForm').attr('name', 'testInput2');
|
||||||
}}},
|
}}},
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ $('#dataGrid').dataGrid({
|
|||||||
{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:120, formatter: function(val, obj, row, act){
|
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
||||||
var actions = [];
|
var actions = [];
|
||||||
<% if(hasPermi('test:testTree:edit')){ %>
|
//<% if(hasPermi('test:testTree:edit')){ %>
|
||||||
actions.push('<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a> ');
|
actions.push('<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a> ');
|
||||||
if (row.status == Global.STATUS_NORMAL){
|
if (row.status == Global.STATUS_NORMAL){
|
||||||
actions.push('<a href="${ctx}/test/testTree/disable?treeCode='+row.treeCode+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
actions.push('<a href="${ctx}/test/testTree/disable?treeCode='+row.treeCode+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||||
@@ -73,7 +73,7 @@ $('#dataGrid').dataGrid({
|
|||||||
}
|
}
|
||||||
actions.push('<a href="${ctx}/test/testTree/delete?treeCode='+row.treeCode+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据及所有子数据吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
actions.push('<a href="${ctx}/test/testTree/delete?treeCode='+row.treeCode+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据及所有子数据吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||||
actions.push('<a href="${ctx}/test/testTree/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级数据")}"><i class="fa fa-plus-square"></i></a> ');
|
actions.push('<a href="${ctx}/test/testTree/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级数据")}"><i class="fa fa-plus-square"></i></a> ');
|
||||||
<% } %>
|
//<% } %>
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}}
|
}}
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user