JEECG 4.0版本发布

pull/51/head
zhangdaiscott@163.com 2019-08-02 16:08:30 +08:00
parent e76e9914dc
commit c2aaef5e9e
119 changed files with 1972 additions and 5238 deletions

View File

@ -4,7 +4,7 @@
JEECG 微云快速开发平台
===============
当前最新版本: 3.8发布日期20181024
当前最新版本: 4.0发布日期20190805
JEECG全新版本已经发布强烈建议(Spring2.x+Vue+Antd 前后端分离) [jeecg-boot](https://github.com/zhangdaiscott/jeecg-boot)
@ -83,7 +83,7 @@ JEECG 功能特点
* <b>技术点二十五:</b>支持二级管理员,权限细化管理</br>
* <b>技术点二十六:</b>代码生成器支持resutful接口生成</br>
* JEECG V3.7.8, 经过了专业压力测试,性能测试,保证后台数据的准确性和页面访问速度</br>
* JEECG V4.0, 经过了专业压力测试,性能测试,保证后台数据的准确性和页面访问速度</br>
* 支持多种浏览器: IE, 火狐, Google 等</br>
* 支持数据库: Mysql,Oracle,Postgre,SqlServer等</br>
* 基础权限: 用户,角色,菜单权限,按钮权限,数据权限</br>

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,9 @@
1.oracle 导入命令
说明: jeecg脚本导出用户是scott
imp scott/tiger@orcl file=jeecg_3.8_oracle11g.dmp
imp scott/tiger@orcl file=jeecg_4.0_oracle11g.dmp
导入其他用户的表
imp jeecgos/jeecgos@orcl file=/opt/datatmp/jeecg_3.8_oracle11g.dmp fromuser=scott touser=jeecgos ignore=y commit=y buffer=300000000 feedback=10000
imp jeecgos/jeecgos@orcl file=/opt/datatmp/jeecg_4.0_oracle11g.dmp fromuser=scott touser=jeecgos ignore=y commit=y buffer=300000000 feedback=10000
2. oracle、SqlServer脚步索引会有部分丢失为了系统性能请自行补加索引。
@ -16,6 +16,6 @@
4.老版本数据库增量升级
执行老版本升级SQL脚本
3.7.8升级到3.8
docs/老版本增量升级/jeecg_mysql-3.7.8-update-3.8.sql
3.8升级到4.0
docs/老版本增量升级/jeecg_mysql-3.8-update-4.0.sql

View File

@ -1,19 +0,0 @@
INSERT INTO `t_s_function`(`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('40288102653ced6601653cee431c0001', NULL, 1, '面板拖拽', '37', 'jeecgListDemoController.do?goDraggablePanels', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', 0, 'fa-clone', 'admin', '管理员', 'admin', '2018-08-15 18:17:15', '2018-08-15 17:32:52', '管理员');
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('402881026560c0a0016560e2bd800007', 'common.position.name', 'Position Name', 'en', '2018-08-22 17:06:37', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('402881026560c0a0016560e237d50005', 'common.position.name', '职务', 'zh-cn', '2018-08-22 17:06:03', 'admin', '管理员', NULL, NULL, NULL);
update cgform_ftl SET FTL_CONTENT = replace(FTL_CONTENT, 'plug-in/uploadify/jquery.uploadify-3.1.js', 'plug-in/plupload/plupload.full.min.js');
UPDATE `jform_graphreport_head` SET `cgr_sql` = 'select a.userid, count(*) ct, sum(CASE WHEN a.logcontent like \'%\' or a.logcontent like \'%cess\' THEN 1 ELSE 0 END) login_count from t_s_log a where {operatetime} group by a.userid order by ct desc' WHERE `id` = '402881e64ca71152014ca71152480000';
ALTER TABLE `cgform_enhance_java`
ADD COLUMN `event` varchar(10) NOT NULL COMMENT '事件状态(end:结束start:开始)' AFTER `active_status`;
alter table cgform_enhance_java alter column event set default 'end';
update cgform_enhance_java set event = 'end' where event is null;
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657927c401657947f3f90003', 'common.event', 'Event State', 'en', '2018-08-27 10:48:03', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657927c401657947644c0001', 'common.event', '事件状态', 'zh-cn', '2018-08-27 10:47:27', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657951ed01657954835f0007', 'common.end', 'End', 'en', '2018-08-27 11:01:46', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657951ed0165795465070005', 'common.end', '结束', 'zh-cn', '2018-08-27 11:01:39', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657951ed0165795414370003', 'common.begin', 'Begin', 'en', '2018-08-27 11:01:18', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657951ed016579537e400001', 'common.begin', '开始', 'zh-cn', '2018-08-27 11:00:40', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('4028f681658063000165806aa21c0001', NULL, '1', 'jxls导出excel', '99', 'jeecgDemoExcelController.do?jxls', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', '0', 'fa-file-excel-o', 'admin', '管理员', 'admin', '2018-08-28 20:07:29', '2018-08-28 20:03:16', '管理员');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('4028f68165a8fe350165a90f06d50001', NULL, '1', '下拉多选demo', '100', 'jeecgFormDemoController.do?multiSelect', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', '0', 'fa-list-ol', 'admin', '管理员', 'admin', '2018-09-05 17:28:15', '2018-09-05 17:27:38', '管理员');
update t_s_muti_lang set lang_context = '3.8' where lang_key ='system.version.number';

View File

@ -0,0 +1,2 @@
UPDATE t_s_type SET typecode = 'sqlserver', typename = 'common.sqlserver' WHERE ID = '8a8ab0ba487c527201487c78aefc001d';
update t_s_muti_lang set lang_context = '4.0' where lang_key ='system.version.number';

12
pom.xml
View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jeecgframework</groupId>
<artifactId>jeecg</artifactId>
<version>3.8</version>
<version>4.0</version>
<packaging>war</packaging>
<properties>
@ -47,14 +47,14 @@
<!-- json start -->
<jackson.version>1.8.4</jackson.version>
<json-lib.version>2.1</json-lib.version>
<fastjson-lib.version>1.2.6</fastjson-lib.version>
<fastjson-lib.version>1.2.31</fastjson-lib.version>
<gson.version>2.2.4</gson.version>
<!-- dom4j -->
<dom4j.version>1.6.1</dom4j.version>
<commons-codec.version>1.9</commons-codec.version>
<commons-io.version>1.3.2</commons-io.version>
<commons-beanutils.version>1.7.0</commons-beanutils.version>
<commons-fileupload.version>1.2.1</commons-fileupload.version>
<commons-fileupload.version>1.3.3</commons-fileupload.version>
<commons-lang.version>2.6</commons-lang.version>
<commons-lang3.version>3.1</commons-lang3.version>
<commons-email.version>1.2</commons-email.version>
@ -89,7 +89,7 @@
<jedis.version>2.9.0</jedis.version>
<!--swagger2-->
<springfox-swagger2.version>2.4.0</springfox-swagger2.version>
<jackson-databind.version>2.5.1</jackson-databind.version>
<jackson-databind.version>2.9.9</jackson-databind.version>
<!-- jjwt -->
<jjwt.version>0.9.0</jjwt.version>
@ -119,7 +119,7 @@
<repository>
<id>jeecg</id>
<name>jeecg Repository</name>
<url>http://maven.jeecg.org/nexus/content/repositories/jeecg</url>
<url>http://maven.jeewx.com/nexus/content/repositories/jeecg</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
@ -127,7 +127,7 @@
<repository>
<id>jeecg-snapshots</id>
<name>jeecg-snapshots Repository</name>
<url>http://maven.jeecg.org/nexus/content/repositories/snapshots</url>
<url>http://maven.jeewx.com/nexus/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>

View File

@ -361,7 +361,7 @@ public class JeecgDemoExcelController extends BaseController {
Map<String,Object> beans =new HashMap<String,Object>();
beans.put("datac",list);
XLSTransformer transformer = new XLSTransformer();
String srcFilePath = request.getServletContext().getRealPath("/")+"export/template/jxls.xls";
String srcFilePath = request.getSession().getServletContext().getRealPath("/")+"export/template/jxls.xls";
InputStream is = new BufferedInputStream(new FileInputStream(srcFilePath));
org.apache.poi.ss.usermodel.Workbook workbook = transformer.transformXLS(is, beans);
//设置导出
@ -439,7 +439,7 @@ public class JeecgDemoExcelController extends BaseController {
Map<String,Object> beans =new HashMap<String,Object>();
beans.put("datac",pageList);
String repeat = request.getParameter("repeat");
String templateFilePath = request.getServletContext().getRealPath("/")+"export/template/jxlsone2many-"+repeat+".xls";
String templateFilePath = request.getSession().getServletContext().getRealPath("/")+"export/template/jxlsone2many-"+repeat+".xls";
String exportFileName = "jxls导出excel-demo(一对多).xls";
JxlsExcelExportUtil.export(beans,exportFileName,templateFilePath, request, response);
}catch (Exception e) {

View File

@ -30,7 +30,7 @@ public boolean onSave(Object entity, Serializable id, Object[] state,
try {
currentUser = ResourceUtil.getSessionUser();
} catch (RuntimeException e) {
//logger.warn("当前session为空,无法获取用户");
logger.warn(" --- 当前session为空无法获取用户 ---- ");
}
if(currentUser==null){
return true;
@ -118,7 +118,7 @@ public boolean onFlushDirty(Object entity, Serializable id,
try {
currentUser = ResourceUtil.getSessionUser();
} catch (RuntimeException e1) {
//logger.warn("当前session为空,无法获取用户");
logger.warn(" --- 当前session为空无法获取用户 --- ");
}
if(currentUser==null){
return true;

View File

@ -4,9 +4,7 @@ import org.jeecgframework.core.util.oConvertUtils;
/**
* ,code (add addOne)
*
* @author taoYan
* @since 20171225
* ERP
*/
//addSingle,editSingle,batchDel,save,reject,template,importe,export,filter
public enum MenuButtonsEnum {

View File

@ -10,7 +10,9 @@ import org.jeecgframework.core.util.StringUtil;
public enum SysDatabaseEnum {
MYSQL("mysql","jdbc:mysql://SERVERADDRESS:PORT/YOURDATABASENAME?useUnicode=true&characterEncoding=UTF-8","com.mysql.jdbc.Driver"),
SQLSERVER2008("sqlserver2008","jdbc:sqlserver://SERVERADDRESS:PORT;DatabaseName=YOURDATABASENAME","com.microsoft.sqlserver.jdbc.SQLServerDriver"),
SQLSERVER("sqlserver","jdbc:sqlserver://SERVERADDRESS:PORT;DatabaseName=YOURDATABASENAME","com.microsoft.sqlserver.jdbc.SQLServerDriver"),
ORACLE("oracle","jdbc:oracle:thin:@SERVERADDRESS:PORT:YOURDATABASENAME","oracle.jdbc.driver.OracleDriver");

View File

@ -101,7 +101,9 @@ public class CgReportQueryParamUtil{
if(!StringUtil.isEmpty(end)){
// String re = CgReportConstant.OP_LQ+end;
String re = CgReportConstant.OP_LQ+":"+filedName+"_end";
pageSearchFields.put(filedName, re);
pageSearchFields.put(new String(filedName), re);
paramData.put(filedName+"_end", covertData(filedType,end,false));
}

View File

@ -1,9 +1,8 @@
package org.jeecgframework.core.util;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@ -15,7 +14,6 @@ import org.springframework.web.context.request.ServletRequestAttributes;
*
*/
public class ContextHolderUtils {
private static final Map<String, HttpSession> sessionMap = new HashMap<String, HttpSession>();
/**
* SpringMvcrequest
@ -35,30 +33,7 @@ public class ContextHolderUtils {
*/
public static HttpSession getSession() {
HttpServletRequest request = getRequest();
String tempSessionId = request.getParameter("sessionId");
HttpSession session = request.getSession();
String sessionId = session.getId();
if(StringUtil.isNotEmpty(tempSessionId) && !tempSessionId.equals(sessionId)){
sessionId = tempSessionId;
if(sessionMap.containsKey(sessionId)){
session = sessionMap.get(sessionId);
}
}
if(!sessionMap.containsKey(sessionId)){
sessionMap.put(sessionId, session);
}
return session;
}
public static HttpSession getSession(String sessionId){
HttpSession session = sessionMap.get(sessionId);
return session == null ? getSession() : session;
}
public static void removeSession(String sessionId){
if(sessionMap.containsKey(sessionId)){
sessionMap.remove(sessionId);
}
}
}

View File

@ -165,14 +165,16 @@ public class ResourceUtil {
if(clientManager.getClient(session.getId())!=null){
return clientManager.getClient(session.getId()).getUser();
}else{
TSUser u = (TSUser) session.getAttribute(ResourceUtil.LOCAL_CLINET_USER);
Client client = new Client();
client.setIp("");
client.setLogindatetime(new Date());
client.setUser(u);
clientManager.addClinet(session.getId(), client);
}
// else{
// TSUser u = (TSUser) session.getAttribute(ResourceUtil.LOCAL_CLINET_USER);
// Client client = new Client();
// client.setIp("");
// client.setLogindatetime(new Date());
// client.setUser(u);
// clientManager.addClinet(session.getId(), client);
// }
return null;
}

View File

@ -75,7 +75,10 @@ public class SqlUtil {
*/
public static String getCountSql(String sql, Map params) {
String querySql = getFullSql(sql,params);
querySql = "SELECT COUNT(*) FROM ("+querySql+") t2";
//若要兼容数据库,SQL中取别名一律用大写
querySql = "SELECT COUNT(*) COUNT FROM ("+querySql+") t2";
return querySql;
}

View File

@ -27,9 +27,12 @@ public class SysThemesUtil {
if (cookie == null || StringUtils.isEmpty(cookie.getName())) {
continue;
}
if (cookie.getName().equalsIgnoreCase("JEECGINDEXSTYLE")) {
indexStyle = cookie.getValue();
break;
}
}
} catch (Exception e) {
}

View File

@ -19,6 +19,9 @@ import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.log4j.Logger;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
/**
*
@ -26,6 +29,8 @@ import org.apache.commons.lang.StringEscapeUtils;
*
*/
public class oConvertUtils {
private static final Logger logger = Logger.getLogger(oConvertUtils.class);
public static boolean isEmpty(Object object) {
if (object == null) {
return (true);
@ -237,6 +242,12 @@ public class oConvertUtils {
* IP
*/
public static String getIp() {
HttpServletRequest request = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
logger.info("----------------获取spring线程request-------------------"+request);
if(oConvertUtils.isNotEmpty(request)){
logger.info("----------------通过 spring线程request 获取 getIpAddr------------------"+IpUtil.getIpAddr(request));
return IpUtil.getIpAddr(request);
}
String ip = null;
try {
InetAddress address = InetAddress.getLocalHost();

View File

@ -2189,6 +2189,8 @@ public class DataGridTag extends TagSupport {
for (DataGridColumn col : columnList) {
if (col.isQuery()) {
String searchControlAttr= extendAttribute(col.getExtend());//获取extend属性对应的HTML
sb.append("<span style=\"display:-moz-inline-box;display:inline-block;margin-bottom:2px;text-align:justify;\">");
if(i==0){
@ -2200,7 +2202,12 @@ public class DataGridTag extends TagSupport {
if("single".equals(col.getQueryMode())){
if(!StringUtil.isEmpty(col.getReplace())){
sb.append("<select name=\""+col.getField().replaceAll("_","\\.")+"\" WIDTH=\"120\" style=\"width: 120px\"> ");
if(oConvertUtils.isEmpty(searchControlAttr)){
searchControlAttr = " style=\"width: 120px\" ";
}
sb.append("<select name=\""+col.getField().replaceAll("_","\\.")+"\" "+searchControlAttr+"> ");
sb.append(StringUtil.replaceAll("<option value =\"\" >{0}</option>", "{0}", MutiLangUtil.getLang("common.please.select")));
String[] test = col.getReplace().split(",");
String text = "";
@ -2237,10 +2244,13 @@ public class DataGridTag extends TagSupport {
//System.out.println(dic[0]+"--"+dic[1]+"--"+dic[2]);
// <input type="text" name="order_code" style="width: 100px" class="searchbox-inputtext" value="" onClick="inputClick(this,'account','user_msg');" />
if(oConvertUtils.isEmpty(searchControlAttr)){
searchControlAttr = " style=\"width: 120px\" ";
}
if(col.getDefaultVal()!=null&&!col.getDefaultVal().trim().equals("")){
sb.append("<input type=\"text\" name=\""+col.getField().replaceAll("_","\\.")+"\" style=\"width: 120px\" class=\"searchbox-inputtext\" value=\"\" onClick=\"popupClick(this,'"+dic[2].replaceAll("@", ",")+"','"+dic[1].replaceAll("@", ",")+"','"+dic[0]+"');\" value=\""+col.getDefaultVal()+"\"/> ");
sb.append("<input type=\"text\" name=\""+col.getField().replaceAll("_","\\.")+"\" "+searchControlAttr+" class=\"searchbox-inputtext\" onClick=\"popupClick(this,'"+dic[2].replaceAll("@", ",")+"','"+dic[1].replaceAll("@", ",")+"','"+dic[0]+"');\" value=\""+col.getDefaultVal()+"\"/> ");
}else{
sb.append("<input type=\"text\" name=\""+col.getField().replaceAll("_","\\.")+"\" style=\"width: 120px\" class=\"searchbox-inputtext\" value=\"\" onClick=\"popupClick(this,'"+dic[2].replaceAll("@", ",")+"','"+dic[1].replaceAll("@", ",")+"','"+dic[0]+"');\" /> ");
sb.append("<input type=\"text\" name=\""+col.getField().replaceAll("_","\\.")+"\" "+searchControlAttr+" class=\"searchbox-inputtext\" value=\"\" onClick=\"popupClick(this,'"+dic[2].replaceAll("@", ",")+"','"+dic[1].replaceAll("@", ",")+"','"+dic[0]+"');\" /> ");
}
}else if(col.getDictionary().contains(",")&&(!col.isPopup())){
@ -2265,12 +2275,12 @@ public class DataGridTag extends TagSupport {
for (Map<String, Object> map : list){ //
if(col.getDefaultVal()!=null && col.getDefaultVal().trim().equals(map.get("field"))){
sb.append(" <input type=\"radio\" name=\""+field+"_radio\" onclick=\"javascrpt:$('#"+field+"_radio').val('"+map.get("field")+"');\" value=\""+map.get("field")+"\" checked=\"checked\" />");
sb.append(" <input "+searchControlAttr+" type=\"radio\" name=\""+field+"_radio\" onclick=\"javascrpt:$('#"+field+"_radio').val('"+map.get("field")+"');\" value=\""+map.get("field")+"\" checked=\"checked\" />");
sb.append(" <script type=\"text/javascript\">");
sb.append(" $('#"+ field+"_radio').val(\""+map.get("field")+"\");");
sb.append(" </script>");
}else{
sb.append(" <input type=\"radio\" name=\""+field+"_radio\" onclick=\"javascrpt:$('#"+field+"_radio').val('"+map.get("field")+"');\" value=\""+map.get("field")+"\" />");
sb.append(" <input "+searchControlAttr+" type=\"radio\" name=\""+field+"_radio\" onclick=\"javascrpt:$('#"+field+"_radio').val('"+map.get("field")+"');\" value=\""+map.get("field")+"\" />");
}
sb.append(map.get("text"));
@ -2280,17 +2290,22 @@ public class DataGridTag extends TagSupport {
sb.append("<input type=\"hidden\" name=\""+field+"\" id=\""+field+"_checkbox\" value=\"\" />");
for (Map<String, Object> map : list){ //
if(col.getDefaultVal()!=null && col.getDefaultVal().trim().equals(map.get("field"))){
sb.append(" <input type=\"checkbox\" onclick=\"javascript:if(this.checked)$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val()+',"+map.get("field")+",');else{$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val().replace(',"+map.get("field")+",',''));}\" value=\"" + map.get("field") + "\" name=\"" + field +"_checkbox\" class=\"" + field + "_checkbox\" checked=\"checked\" />");
sb.append(" <input "+searchControlAttr+" type=\"checkbox\" onclick=\"javascript:if(this.checked)$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val()+',"+map.get("field")+",');else{$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val().replace(',"+map.get("field")+",',''));}\" value=\"" + map.get("field") + "\" name=\"" + field +"_checkbox\" class=\"" + field + "_checkbox\" checked=\"checked\" />");
sb.append(" <script type=\"text/javascript\">");
sb.append(" $(\"#"+ field +"_checkbox\").val($(\"#"+ field +"_checkbox\").val()+,"+map.get("field")+",);");
sb.append(" </script>");
}else{
sb.append(" <input type=\"checkbox\" onclick=\"javascript:if(this.checked)$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val()+',"+map.get("field")+",');else{$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val().replace(',"+map.get("field")+",',''));}\" value=\"" + map.get("field") + "\" name=\"" + field +"_checkbox\" class=\"" + field + "_checkbox\" />");
sb.append(" <input "+searchControlAttr+" type=\"checkbox\" onclick=\"javascript:if(this.checked)$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val()+',"+map.get("field")+",');else{$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val().replace(',"+map.get("field")+",',''));}\" value=\"" + map.get("field") + "\" name=\"" + field +"_checkbox\" class=\"" + field + "_checkbox\" />");
}
sb.append(map.get("text"));
}
}else{
sb.append("<select name=\""+col.getField().replaceAll("_","\\.")+"\" WIDTH=\"120\" style=\"width: 120px\"> ");
if(oConvertUtils.isEmpty(searchControlAttr)){
searchControlAttr = " style=\"width: 120px\" ";
}
sb.append("<select name=\""+col.getField().replaceAll("_","\\.")+"\" "+searchControlAttr+"> ");
sb.append(StringUtil.replaceAll("<option value =\"\" >{0}</option>", "{0}", MutiLangUtil.getLang("common.please.select")));
for (Map<String, Object> map : list){
@ -2319,12 +2334,12 @@ public class DataGridTag extends TagSupport {
String typeCode = type.getTypecode();
if(col.getDefaultVal()!=null&&col.getDefaultVal().trim().equals(typeCode)){
sb.append(" <input type=\"radio\" value=\"" + typeCode + "\" name=\""+field+"_radio\" onclick=\"javascrpt:#('#"+ field+"_radio').val('" + typeCode + "');\" checked=\"checked\" />");
sb.append(" <input "+searchControlAttr+" type=\"radio\" value=\"" + typeCode + "\" name=\""+field+"_radio\" onclick=\"javascrpt:#('#"+ field+"_radio').val('" + typeCode + "');\" checked=\"checked\" />");
sb.append(" <script type=\"text/javascript\">");
sb.append(" $('#"+ field+"_radio').val('"+typeCode+"');");
sb.append(" </script>");
}else{
sb.append(" <input type=\"radio\" value=\"" + typeCode + "\" name=\""+field+"_radio\" onclick=\"javascrpt:$('#"+ field+"_radio').val('" + typeCode + "');\" />");
sb.append(" <input "+searchControlAttr+" type=\"radio\" value=\"" + typeCode + "\" name=\""+field+"_radio\" onclick=\"javascrpt:$('#"+ field+"_radio').val('" + typeCode + "');\" />");
}
sb.append(MutiLangUtil.getLang(type.getTypename()));
@ -2337,18 +2352,23 @@ public class DataGridTag extends TagSupport {
for (TSType type : types) {
String typeCode = type.getTypecode();
if(col.getDefaultVal()!=null&&col.getDefaultVal().trim().equals(typeCode)){
sb.append(" <input type=\"checkbox\" onclick=\"javascript:if(this.checked)$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val()+',"+typeCode+",');else{$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val().replace(',"+typeCode+",',''));}\" value=\"" + typeCode + "\" name=\"" + field +"_checkbox\" class=\"" + field + "_checkbox\" checked=\"checked\" />");
sb.append(" <input "+searchControlAttr+" type=\"checkbox\" onclick=\"javascript:if(this.checked)$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val()+',"+typeCode+",');else{$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val().replace(',"+typeCode+",',''));}\" value=\"" + typeCode + "\" name=\"" + field +"_checkbox\" class=\"" + field + "_checkbox\" checked=\"checked\" />");
sb.append(" <script type=\"text/javascript\">");
sb.append(" $(\"#"+ field +"_checkbox\").val($(\"#"+ field +"_checkbox\").val()+,"+typeCode+",);");
sb.append(" </script>");
}else{
sb.append(" <input type=\"checkbox\" onclick=\"javascript:if(this.checked)$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val()+',"+typeCode+",');else{$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val().replace(',"+typeCode+",',''));}\" value=\"" + typeCode + "\" name=\"" + field +"_checkbox\" class=\"" + field + "_checkbox\" />");
sb.append(" <input "+searchControlAttr+" type=\"checkbox\" onclick=\"javascript:if(this.checked)$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val()+',"+typeCode+",');else{$('#"+ field +"_checkbox').val($('#"+ field +"_checkbox').val().replace(',"+typeCode+",',''));}\" value=\"" + typeCode + "\" name=\"" + field +"_checkbox\" class=\"" + field + "_checkbox\" />");
}
sb.append(MutiLangUtil.getLang(type.getTypename()));
}
}
}else{
sb.append("<select name=\""+col.getField().replaceAll("_","\\.")+"\" WIDTH=\"120\" style=\"width: 120px\"> ");
if(oConvertUtils.isEmpty(searchControlAttr)){
searchControlAttr = " style=\"width: 120px\" ";
}
sb.append("<select name=\""+col.getField().replaceAll("_","\\.")+"\" "+searchControlAttr+"> ");
sb.append(StringUtil.replaceAll("<option value =\"\" >{0}</option>", "{0}", MutiLangUtil.getLang("common.please.select")));
if (types != null) {
for (TSType type : types) {
@ -2375,14 +2395,25 @@ public class DataGridTag extends TagSupport {
sb.append(getAutoSpan(col.getField().replaceAll("_","\\."),extendAttribute(col.getExtend())));
}else{
sb.append("<input onkeypress=\"EnterPress(event)\" onkeydown=\"EnterPress()\" type=\"text\" name=\""+col.getField().replaceAll("_","\\.")+"\" "+extendAttribute(col.getExtend())+" ");
sb.append("<input onkeypress=\"EnterPress(event)\" onkeydown=\"EnterPress()\" type=\"text\" name=\""+col.getField().replaceAll("_","\\.")+"\" ");
if(this.DATE_FORMATTER.equals(col.getFormatter())){
sb.append(" style=\"width: 120px\" class=\"Wdate\" onClick=\"WdatePicker()\" ");
if(oConvertUtils.isEmpty(searchControlAttr)){
searchControlAttr = " style=\"width: 120px\" ";
}
sb.append(searchControlAttr+"class=\"Wdate\" onClick=\"WdatePicker()\" ");
}else if(this.DATETIME_FORMATTER.equals(col.getFormatter())){
sb.append(" style=\"width: 160px\" class=\"Wdate\" onClick=\"WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})\" ");
if(oConvertUtils.isEmpty(searchControlAttr)){
searchControlAttr = " style=\"width: 160px\" ";
}
sb.append(searchControlAttr+"class=\"Wdate\" onClick=\"WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})\" ");
}else{
sb.append(" style=\"width: 120px\" class=\"inuptxt\" ");
if(oConvertUtils.isEmpty(searchControlAttr)){
searchControlAttr = " style=\"width: 120px\" ";
}
sb.append(searchControlAttr+"class=\"inuptxt\" ");
}
if(oConvertUtils.isNotEmpty(col.getDefaultVal())){
sb.append(" value=\""+col.getDefaultVal()+"\" ");
}
@ -2395,17 +2426,26 @@ public class DataGridTag extends TagSupport {
}else if("group".equals(col.getQueryMode())){
if(this.DATE_FORMATTER.equals(col.getFormatter())){
sb.append("<input type=\"text\" name=\""+col.getField()+"_begin\" style=\"width: 100px\" "+extendAttribute(col.getExtend())+" class=\"Wdate\" onClick=\"WdatePicker()\"/>");
if(oConvertUtils.isEmpty(searchControlAttr)){
searchControlAttr = " style=\"width: 100px\" ";
}
sb.append("<input type=\"text\" name=\""+col.getField()+"_begin\" "+searchControlAttr+" class=\"Wdate\" onClick=\"WdatePicker()\"/>");
sb.append("<span style=\"display:-moz-inline-box;display:inline-block;width: 8px;text-align:right;\">~</span>");
sb.append("<input type=\"text\" name=\""+col.getField()+"_end\" style=\"width: 100px\" "+extendAttribute(col.getExtend())+" class=\"Wdate\" onClick=\"WdatePicker()\"/>");
sb.append("<input type=\"text\" name=\""+col.getField()+"_end\" "+searchControlAttr+" class=\"Wdate\" onClick=\"WdatePicker()\"/>");
}else if(this.DATETIME_FORMATTER.equals(col.getFormatter())){
sb.append("<input type=\"text\" name=\""+col.getField()+"_begin\" style=\"width: 140px\" "+extendAttribute(col.getExtend())+" class=\"Wdate\" onClick=\"WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})\"/>");
if(oConvertUtils.isEmpty(searchControlAttr)){
searchControlAttr = " style=\"width: 140px\" ";
}
sb.append("<input type=\"text\" name=\""+col.getField()+"_begin\" "+searchControlAttr+" class=\"Wdate\" onClick=\"WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})\"/>");
sb.append("<span style=\"display:-moz-inline-box;display:inline-block;width: 8px;text-align:right;\">~</span>");
sb.append("<input type=\"text\" name=\""+col.getField()+"_end\" style=\"width: 140px\" "+extendAttribute(col.getExtend())+" class=\"Wdate\" onClick=\"WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})\"/>");
sb.append("<input type=\"text\" name=\""+col.getField()+"_end\" "+searchControlAttr+" class=\"Wdate\" onClick=\"WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})\"/>");
}else{
sb.append("<input type=\"text\" name=\""+col.getField()+"_begin\" style=\"width: 100px\" "+extendAttribute(col.getExtend())+" class=\"inuptxt\"/>");
if(oConvertUtils.isEmpty(searchControlAttr)){
searchControlAttr = " style=\"width: 100px\" ";
}
sb.append("<input type=\"text\" name=\""+col.getField()+"_begin\" "+searchControlAttr+" class=\"inuptxt\"/>");
sb.append("<span style=\"display:-moz-inline-box;display:inline-block;width: 8px;text-align:right;\">~</span>");
sb.append("<input type=\"text\" name=\""+col.getField()+"_end\" style=\"width: 100px\" "+extendAttribute(col.getExtend())+" class=\"inuptxt\"/>");
sb.append("<input type=\"text\" name=\""+col.getField()+"_end\" "+searchControlAttr+" class=\"inuptxt\"/>");
}
}

View File

@ -507,17 +507,26 @@ public class TagUtil {
* @param response
* @param dataGrid
*/
public static void treegrid(HttpServletResponse response,DataGrid dg) {
public static void treegrid(HttpServletResponse response,DataGrid dg,Boolean isSubTree) {
response.setContentType("application/json");
response.setHeader("Cache-Control", "no-store");
String jsonStr = TagUtil.getJson(dg);
JSONObject object = JSONObject.parseObject(jsonStr);
JSONArray rows = object.getJSONArray("rows");
try {
PrintWriter pw = response.getWriter();
pw.write(rows.toString());
pw.flush();
pw.close();
if(isSubTree) {
JSONArray rows = object.getJSONArray("rows");
PrintWriter pw = response.getWriter();
pw.write(rows.toString());
pw.flush();
pw.close();
} else {
PrintWriter pw = response.getWriter();
pw.write(jsonStr.toString());
pw.flush();
pw.close();
}
} catch (IOException e) {
e.printStackTrace();
}finally{

View File

@ -27,7 +27,7 @@ public class UserSelectTag extends TagSupport {
private boolean hasLabel = false; //是否显示lable,默认不显示
private String userNamesDefalutVal; //用户名默认值
private String userIdsDefalutVal; //用户ID默认值
private String readonly = "readonly"; // 只读属性
private String readonly = "false"; // 只读属性
private String inputWidth; //输入框宽度
private String windowWidth; //弹出窗口宽度
private String windowHeight; //弹出窗口高度
@ -162,7 +162,12 @@ public class UserSelectTag extends TagSupport {
if(hasLabel && oConvertUtils.isNotEmpty(title)){
sb.append(title + "");
}
sb.append("<input class=\"inuptxt\" readonly=\""+readonly+"\" type=\"text\" id=\"" + selectedNamesInputId + "\" name=\"" + selectedNamesInputId + "\" style=\"width: "+inputWidth+"\" onclick=\"openUserSelect()\" ");
sb.append("<input class=\"inuptxt\" readonly=\"readonly\" type=\"text\" id=\"" + selectedNamesInputId + "\" name=\"" + selectedNamesInputId + "\" style=\"width: "+inputWidth+"\" ");
if(!("true".equals(readonly)||"readonly".equals(readonly.toLowerCase()))){
sb.append("onclick=\"openUserSelect()\"");
}
if(StringUtils.isNotBlank(userNamesDefalutVal)){
sb.append(" value=\""+userNamesDefalutVal+"\"");
}

View File

@ -149,8 +149,9 @@ public class WebUploaderTag extends TagSupport {
sb.append("$list.append('<table class=\"temptable\"></table>');\r\n");
//增加进度条方法
//进度条加载延迟duration设置太小则出现大文件则会瞬间达到一个值然后卡在那个点上,效果太假
sb.append("var showUploadProgress = function(progress,mycallback,obj){if(!obj){obj = $('#"+name+"_progress_bar').find('.progress-ty');}if(!$('#"+name+"_progress_bar').hasClass('active')){$('#"+name+"_progress_bar').addClass('active');}obj.animate({width:progress+'%'},{duration:100,easing:'swing',complete:function(scope,i,elem){if(!!mycallback){mycallback();}}})};");
sb.append("var showUploadProgress = function(progress,mycallback,obj){if(!obj){obj = $('#"+name+"_progress_bar').find('.progress-ty');}if(!$('#"+name+"_progress_bar').hasClass('active')){$('#"+name+"_progress_bar').addClass('active');}obj.animate({width:progress+'%'},{duration:150,easing:'swing',complete:function(scope,i,elem){if(!!mycallback){mycallback();}}})};");
//判断是否支持base64
sb.append(" var isSupportBase64 = function() {var data = new Image();var support = true;data.onload = data.onerror = function() {if( this.width != 1 || this.height != 1 ){support = false;}}//data['src'] = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';\r\nreturn support;};");
//缩略图大小暂时写死,也可以修改css

View File

@ -231,12 +231,13 @@ public class CgDynamGraphController extends BaseController {
map=(Map)DynamicDBUtil.findOne(dbKey,SqlUtil.getCountSql(querySql,null));
}
if(map.get("COUNT(*)") instanceof BigDecimal){
BigDecimal count = (BigDecimal)map.get("COUNT(*)");
if(map.get("COUNT") instanceof BigDecimal){
BigDecimal count = (BigDecimal)map.get("COUNT");
size = count.longValue();
}else{
size=(Long)map.get("COUNT(*)");
size=Long.valueOf(map.get("COUNT")+"");
}
}else{
result= cgDynamGraphService.queryByCgDynamGraphSql(querySql, pageSearchFields,paramData);

View File

@ -29,6 +29,7 @@ import org.jeecgframework.core.util.SqlInjectionUtil;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.core.util.SysThemesUtil;
import org.jeecgframework.core.util.oConvertUtils;
import org.jeecgframework.tag.core.easyui.TagUtil;
import org.jeecgframework.web.cgform.common.CgAutoListConstant;
import org.jeecgframework.web.cgform.entity.config.CgFormFieldEntity;
import org.jeecgframework.web.cgform.entity.config.CgFormHeadEntity;
@ -248,7 +249,7 @@ public class CgAutoListController extends BaseController{
//step.3 进行查询返回结果如果为tree的下级数据则不需要分页
List<Map<String, Object>> result = null;
if(isTree && treeId !=null) {
if(isTree && oConvertUtils.isNotEmpty(treeId)) {
//防止下级数据太大最大只取500条
result=cgTableService.querySingle(table, field.toString(), params,sort,order, 1, 500);
}else {
@ -313,28 +314,16 @@ public class CgAutoListController extends BaseController{
}
Long size = cgTableService.getQuerySingleSize(table, field, params);
dealDic(result,beans);
response.setContentType("application/json");
response.setHeader("Cache-Control", "no-store");
PrintWriter writer = null;
try {
writer = response.getWriter();
if(isTree && treeId !=null) {
//下级列表
writer.println(QueryParamUtil.getJson(result));
}else {
writer.println(QueryParamUtil.getJson(result,size));
}
writer.flush();
} catch (IOException e) {
e.printStackTrace();
}finally{
try {
writer.close();
} catch (Exception e2) {
}
DataGrid datagrid = dataGrid;
datagrid.setTotal(size.intValue());
datagrid.setResults(result);
if(oConvertUtils.isEmpty(treeId)) {
TagUtil.treegrid(response, datagrid, false);
} else {
TagUtil.treegrid(response, datagrid, true);
}
long end = System.currentTimeMillis();
log.debug("动态列表查询耗时:"+(end-start)+" ms");
}

View File

@ -500,6 +500,9 @@ public class CgFormBuildController extends BaseController {
file.put("fileKey", fileKey);
file.put("path", path);
file.put("field", field==null?"":field);
file.put("extend", b.getExtend());
files.add(file);
}
data.put("filesList", files);

View File

@ -65,9 +65,6 @@ import org.springframework.web.servlet.ModelAndView;
@Controller
@RequestMapping("/cgformTemplateController")
public class CgformTemplateController extends BaseController {
/**
* Logger for this class
*/
private static final Logger logger = Logger.getLogger(CgformTemplateController.class);
@Autowired
@ -147,14 +144,17 @@ public class CgformTemplateController extends BaseController {
j.setMsg(message);
return j;
}
private void delTemplate(HttpServletRequest request,String code){
String dirPath=getUploadBasePath(request)+File.separator+code;
logger.info("---------【演示系统不允许删除模板】删除online模板-----------"+dirPath);
try {
org.apache.commons.io.FileUtils.deleteDirectory(new File(dirPath));
} catch (IOException e) {
e.printStackTrace();
}
}
/**
*
*
@ -168,9 +168,7 @@ public class CgformTemplateController extends BaseController {
message = "自定义模板删除成功";
try{
for(String id:ids.split(",")){
CgformTemplateEntity cgformTemplate = systemService.getEntity(CgformTemplateEntity.class,
id
);
CgformTemplateEntity cgformTemplate = systemService.getEntity(CgformTemplateEntity.class,id);
cgformTemplateService.delete(cgformTemplate);
if(cgformTemplate.getTemplateCode()!=null){
delTemplate(request,cgformTemplate.getTemplateCode());

View File

@ -213,6 +213,8 @@ public class CgUploadController extends BaseController {
attributes.put("swfpath", attachment.getSwfpath());
attributes.put("fileid", attachment.getId());
attributes.put("extend", attachment.getExtend());
}
}
ajaxJson.setAttributes(attributes);

View File

@ -5,6 +5,7 @@ import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@ -242,7 +243,8 @@ public class CgReportController extends BaseController {
//SQL参数
List<String> paramList = (List<String>) cgReportMap.get(CgReportConstant.PARAMS);
//页面参数查询字段SQL条件语句片段
Map<String,Object> pageSearchFields = new LinkedHashMap<String,Object>();
Map<String,Object> pageSearchFields = new IdentityHashMap<String,Object>();
//获取查询条件数据
Map<String,Object> paramData = new HashMap<String, Object>();
@ -290,12 +292,13 @@ public class CgReportController extends BaseController {
}
if(map.get("COUNT(*)") instanceof BigDecimal){
BigDecimal count = (BigDecimal)map.get("COUNT(*)");
if(map.get("COUNT") instanceof BigDecimal){
BigDecimal count = (BigDecimal)map.get("COUNT");
size = count.longValue();
}else{
size=(Long)map.get("COUNT(*)");
size=Long.valueOf(map.get("COUNT")+"");
}
}else{
result= cgReportService.queryByCgReportSql(querySql, pageSearchFields,paramData, p, r);

View File

@ -204,26 +204,49 @@ function showReport(data, tabName) {
</#if>
//数据转换成报表格式
var series = new Array();
<#-- update-begin-author:taoyan date:20181109 foronline图表配置 饼图无文字提示 全部显示slice -->
<#assign pietooltip="1">
<#list graphList as x>
<#if (tabList?size > 1)>
if(tabName || $.trim(tabName)) {
if("${x['tab_name']!''}" == tabName) {
<#if x['graph_type'] =='pie'>
var piearr = [];
$.map(data, function(n) {
piearr.push([n["${main['categories']}"],n["${x['field_name']}"] * 1 || 0]);
});
series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data:piearr });
<#else>
<#assign pietooltip="0">
series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data: $.map(data, function(n) {
return n["${x['field_name']}"] * 1 || 0;
})});
</#if>
}
}
<#else>
series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data: $.map(data, function(n) {
return n["${x['field_name']}"] * 1 || 0;
})});
<#if x['graph_type'] =='pie'>
var piearr = [];
$.map(data, function(n) {
piearr.push([n["${main['categories']}"],n["${x['field_name']}"] * 1 || 0]);
});
series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data:piearr });
<#else>
<#assign pietooltip="0">
series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data: $.map(data, function(n) {
return n["${x['field_name']}"] * 1 || 0;
})});
</#if>
</#if>
</#list>
var options = reportUtil.getSplineOptions(categories, series, "${main['ytext']}");
//options.tooltip.headerFormat = '<span style="font-size: 10px">{point.key}人</span><br/>';
<#if pietooltip =="1">
options.tooltip = {pointFormat: '{point.y}, <b>{point.percentage:.1f}%</b>' };
</#if>
<#-- update-end-author:taoyan date:20181109 foronline图表配置 饼图无文字提示 全部显示slice -->
//执行扩展js
if(typeof(xFixedOptions) == 'function') {
xFixedOptions(options, tabName);

View File

@ -509,7 +509,7 @@ public class LoginController extends BaseController{
mailConfig.put("title", ResourceUtil.getConfigByName("resetpwd.mail.title"));
mailConfig.put("content",content);
mailConfig.put("url",url);
mailConfig.put("commentUrl","http://www.jeecg.org");
mailConfig.put("commentUrl","http://www.jeecg.com");
String mailContent = new FreemarkerHelper().parseTemplate("export/mail/password_reset.ftl", mailConfig);

View File

@ -602,38 +602,19 @@ public class UserController extends BaseController {
public AjaxJson del(TSUser user, HttpServletRequest req) {
String message = null;
AjaxJson j = new AjaxJson();
if("admin".equals(user.getUserName())){
message = "超级管理员[admin]不可删除";
j.setMsg(message);
return j;
}
user = systemService.getEntity(TSUser.class, user.getId());
// List<TSRoleUser> roleUser = systemService.findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
if (!user.getStatus().equals(Globals.User_ADMIN)) {
if(!"admin".equals(user.getUserName())){
user.setDeleteFlag(Globals.Delete_Forbidden);
userService.updateEntitie(user);
message = "用户:" + user.getUserName() + "删除成功";
logger.info("["+IpUtil.getIpAddr(req)+"][逻辑删除用户]"+message);
/**
if (roleUser.size()>0) {
// 删除用户时先删除用户和角色关系表
delRoleUser(user);
systemService.executeSql("delete from t_s_user_org where user_id=?", user.getId()); // 删除 用户-机构 数据
userService.delete(user);
message = "用户:" + user.getUserName() + "删除成功";
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
} else {
userService.delete(user);
message = "用户:" + user.getUserName() + "删除成功";
}
**/
} else {
message = "超级管理员不可删除";
message = "超级管理员[admin]不可删除";
j.setMsg(message);
return j;
}
j.setMsg(message);
@ -657,24 +638,6 @@ public class UserController extends BaseController {
return j;
}
user = systemService.getEntity(TSUser.class, user.getId());
/*List<TSRoleUser> roleUser = systemService.findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
if (!user.getStatus().equals(Globals.User_ADMIN)) {
if (roleUser.size()>0) {
// 删除用户时先删除用户和角色关系表
delRoleUser(user);
systemService.executeSql("delete from t_s_user_org where user_id=?", user.getId()); // 删除 用户-机构 数据
userService.delete(user);
message = "用户:" + user.getUserName() + "删除成功";
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
} else {
userService.delete(user);
message = "用户:" + user.getUserName() + "删除成功";
}
} else {
message = "超级管理员不可删除";
}*/
try {
message = userService.trueDel(user);
logger.info("["+IpUtil.getIpAddr(req)+"][真实删除用户]"+message);
@ -683,20 +646,10 @@ public class UserController extends BaseController {
message ="删除失败";
}
j.setMsg(message);
return j;
}
/*public void delRoleUser(TSUser user) {
// 同步删除用户角色关联表
List<TSRoleUser> roleUserList = systemService.findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
if (roleUserList.size() >= 1) {
for (TSRoleUser tRoleUser : roleUserList) {
systemService.delete(tRoleUser);
}
}
}*/
/**
*
*

View File

@ -94,10 +94,6 @@ public class ClientManager {
* sessionId
*/
public void removeClinet(String sessionId){
try {
ContextHolderUtils.removeSession(sessionId);
} catch (Exception e) {}
try {
HttpSession session = ContextHolderUtils.getSession();
session.removeAttribute(sessionId);

View File

@ -88,17 +88,17 @@ public class UserServiceImpl extends CommonServiceImpl implements UserService {
public String trueDel(TSUser user) {
String message = "";
List<TSRoleUser> roleUser = this.commonDao.findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
if (!user.getStatus().equals(Globals.User_ADMIN)) {
if(!"admin".equals(user.getUserName())){
if (roleUser.size()>0) {
// 删除用户时先删除用户和角色关系表
delRoleUser(user);
this.commonDao.executeSql("delete from t_s_user_org where user_id=?", user.getId()); // 删除 用户-机构 数据
this.commonDao.delete(user);
message = "用户:" + user.getUserName() + "删除成功";
message = user.getUserName() + " 用户真实删除成功";
this.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
} else {
this.commonDao.delete(user);
message = "用户:" + user.getUserName() + "删除成功";
message = user.getUserName() + " 用户真实删除成功";
}
} else {
message = "超级管理员不可删除";

View File

@ -20,7 +20,7 @@ import org.apache.log4j.Logger;
* @description:Mini Bean Scan
* @author
* @mail zhangdaiscott@163.com
* @category www.jeecg.org
* @category www.jeecg.com
* @date 20130817
* @version V1.0
*/

View File

@ -8,7 +8,7 @@ import java.sql.SQLOutput;
/**
*
* @author
* @site www.jeecg.org
* @site www.jeecg.com
*
*/
public class JeecgOneGUI {

View File

@ -11,7 +11,7 @@ import org.jeecgframework.codegenerate.pojo.onetomany.SubTableEntity;
/**
*
* @author
* @site www.jeecg.org
* @site www.jeecg.com
*
*/
public class JeecgOneToMainUtil {

View File

@ -163,11 +163,13 @@ public class ${entityName}Controller extends BaseController {
public void datagrid(${entityName}Entity ${entityName?uncap_first},HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(${entityName}Entity.class, dataGrid);
<#if cgformConfig.cgFormHead.isTree == 'Y'>
boolean isSubTree = false;
if(StringUtil.isEmpty(${entityName?uncap_first}.getId())){
cq.isNull("${cgformConfig.cgFormHead.treeParentIdFieldNamePage}");
}else{
cq.eq("${cgformConfig.cgFormHead.treeParentIdFieldNamePage}", ${entityName?uncap_first}.getId());
${entityName?uncap_first}.setId(null);
isSubTree = true;
}
</#if>
//查询条件组装器
@ -178,12 +180,15 @@ public class ${entityName}Controller extends BaseController {
throw new BusinessException(e.getMessage());
}
cq.add();
this.${entityName?uncap_first}Service.getDataGridReturn(cq, true);
<#-- update-begin-author:taoyan date:20181106 for:树形列表子节点查询不分页 -->
<#if cgformConfig.cgFormHead.isTree == 'Y'>
TagUtil.treegrid(response, dataGrid);
this.${entityName?uncap_first}Service.getDataGridReturn(cq, !isSubTree);
TagUtil.treegrid(response, dataGrid, isSubTree);
<#else>
this.${entityName?uncap_first}Service.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
</#if>
<#-- update-end-author:taoyan date:20181106 for:树形列表子节点查询不分页 -->
}
/**

View File

@ -162,11 +162,13 @@ public class ${entityName}Controller extends BaseController {
public void datagrid(${entityName}Entity ${entityName?uncap_first},HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(${entityName}Entity.class, dataGrid);
<#if cgformConfig.cgFormHead.isTree == 'Y'>
boolean isSubTree = false;
if(StringUtil.isEmpty(${entityName?uncap_first}.getId())){
cq.isNull("${cgformConfig.cgFormHead.treeParentIdFieldNamePage}");
}else{
cq.eq("${cgformConfig.cgFormHead.treeParentIdFieldNamePage}", ${entityName?uncap_first}.getId());
${entityName?uncap_first}.setId(null);
isSubTree = true;
}
</#if>
//查询条件组装器
@ -177,12 +179,15 @@ public class ${entityName}Controller extends BaseController {
throw new BusinessException(e.getMessage());
}
cq.add();
this.${entityName?uncap_first}Service.getDataGridReturn(cq, true);
<#-- update-begin-author:taoyan date:20181106 for:树形列表子节点查询不分页 -->
<#if cgformConfig.cgFormHead.isTree == 'Y'>
TagUtil.treegrid(response, dataGrid);
this.${entityName?uncap_first}Service.getDataGridReturn(cq, !isSubTree);
TagUtil.treegrid(response, dataGrid, isSubTree);
<#else>
this.${entityName?uncap_first}Service.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
</#if>
<#-- update-end-author:taoyan date:20181106 for:树形列表子节点查询不分页 -->
}
/**

View File

@ -169,11 +169,13 @@ public class ${entityName}Controller extends BaseController {
public void datagrid(${entityName}Entity ${entityName?uncap_first},HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(${entityName}Entity.class, dataGrid);
<#if cgformConfig.cgFormHead.isTree == 'Y'>
boolean isSubTree = false;
if(StringUtil.isEmpty(${entityName?uncap_first}.getId())){
cq.isNull("${cgformConfig.cgFormHead.treeParentIdFieldNamePage}");
}else{
cq.eq("${cgformConfig.cgFormHead.treeParentIdFieldNamePage}", ${entityName?uncap_first}.getId());
${entityName?uncap_first}.setId(null);
isSubTree = true;
}
</#if>
//查询条件组装器
@ -184,12 +186,15 @@ public class ${entityName}Controller extends BaseController {
throw new BusinessException(e.getMessage());
}
cq.add();
this.${entityName?uncap_first}Service.getDataGridReturn(cq, true);
<#-- update-begin-author:taoyan date:20181106 for:树形列表子节点查询不分页 -->
<#if cgformConfig.cgFormHead.isTree == 'Y'>
TagUtil.treegrid(response, dataGrid);
this.${entityName?uncap_first}Service.getDataGridReturn(cq, !isSubTree);
TagUtil.treegrid(response, dataGrid, isSubTree);
<#else>
this.${entityName?uncap_first}Service.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
</#if>
<#-- update-end-author:taoyan date:20181106 for:树形列表子节点查询不分页 -->
}
/**

View File

@ -200,12 +200,19 @@ function createDataGrid${config_id}(){
}
]
],
<#--update-begin--Author:taoyan Date:20181106 for树形列表分页bug+行点击事件报错 -->
onLoadSuccess:function(data){
$("#${config_id}List").<#if config_istree=="Y">treegrid<#else>datagrid</#if>("clearSelections");
delete $("#${config_id}List").treegrid('options').queryParams['id'];
},
onClickRow:function(rowIndex,rowData)
{rowid=rowData.id;gridname='${config_id}List';}
<#if config_istree=="Y">
{rowid=rowIndex.id;gridname='${config_id}List';}
<#else>
{rowid=rowData.id;gridname='${config_id}List';}
</#if>
});
<#--update-end--Author:taoyan Date:20181106 for树形列表分页bug+行点击事件报错 -->
$('#${config_id}List').<#if config_istree=="Y">treegrid<#else>datagrid</#if>('getPager').pagination({beforePageText:'',afterPageText:'/{pages}',displayMsg:'{from}-{to}共{total}条',showPageList:true,showRefresh:true});
$('#${config_id}List').<#if config_istree=="Y">treegrid<#else>datagrid</#if>('getPager').pagination({onBeforeRefresh:function(pageNumber, pageSize){ $(this).pagination('loading');$(this).pagination('loaded'); }});
//将没有权限的按钮屏蔽掉

View File

@ -268,11 +268,20 @@ function createDataGrid${config_id}(){
}
]
],
<#--update-begin--Author:taoyan Date:20181106 for树形列表分页bug+行点击事件报错 -->
onLoadSuccess:function(data){
$("#${config_id}List").<#if config_istree=="Y">treegrid<#else>datagrid</#if>("clearSelections");
console.log($("#${config_id}List").treegrid('options').queryParams['id']);
delete $("#${config_id}List").treegrid('options').queryParams['id'];
},
onClickRow:function(rowIndex,rowData)
{rowid=rowData.id;gridname='${config_id}List';}
onClickRow:function(rowIndex,rowData){
<#if config_istree=="Y">
{rowid=rowIndex.id;gridname='${config_id}List';}
<#else>
{rowid=rowData.id;gridname='${config_id}List';}
</#if>
}
<#--update-end--Author:taoyan Date:20181106 for树形列表分页bug+行点击事件报错 -->
});
$('#${config_id}List').<#if config_istree=="Y">treegrid<#else>datagrid</#if>('getPager').pagination({beforePageText:'',afterPageText:'/{pages}',displayMsg:'{from}-{to}共{total}条',showPageList:true,showRefresh:true});
$('#${config_id}List').<#if config_istree=="Y">treegrid<#else>datagrid</#if>('getPager').pagination({onBeforeRefresh:function(pageNumber, pageSize){ $(this).pagination('loading');$(this).pagination('loaded'); }});

View File

@ -41,7 +41,9 @@
<#-- update-begin-Author:LiShaoQing date:20180829 for:TASK #3127 删除时没有添加 validtype_str校验-->
function resetTrNum(tableId) {
$tbody = $("#"+tableId+"");
<#-- update-begin-Author:LiShaoQing date:20181023 for:Online EASY默认表单样式不显示序号问题 -->
$tbody.find('tr').each(function(i){
<#-- update-end-Author:LiShaoQing date:20181023 for:Online EASY默认表单样式不显示序号问题 -->
$(':input, select,button,a', this).each(function(){
var $this = $(this),validtype_str = $this.attr('validType'), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
if(name!=null){
@ -93,7 +95,9 @@
$this.attr("class",class_str.replace(/i-checks-tpl/,"i-checks"));
}
});
<#-- update-begin-Author:LiShaoQing date:20181023 for:Online EASY默认表单样式不显示序号问题 -->
$(this).find('div[name=\'xh\']').html(i+1);
<#-- update-end-Author:LiShaoQing date:20181023 for:Online EASY默认表单样式不显示序号问题 -->
});
}
<#-- update-end-Author:LiShaoQing date:20180829 for:TASK #3127 删除时没有添加 validtype_str校验-->

View File

@ -271,6 +271,9 @@ function createDataGrid${config_id}(){
],
onLoadSuccess:function(data){
$("#${config_id}List").<#if config_istree=="Y">treegrid<#else>datagrid</#if>("clearSelections");
<#--update-begin--Author:taoyan Date:20181106 for树形列表分页bug -->
delete $("#${config_id}List").treegrid('options').queryParams['id'];
<#--update-end--Author:taoyan Date:20181106 for树形列表分页bug -->
},
onClickRow:function(rowIndex,rowData)
{

View File

@ -182,12 +182,19 @@ function createDataGrid${config_id}(){
}
]
],
<#--update-begin--Author:taoyan Date:20181106 for树形列表分页bug+行点击事件报错 -->
onLoadSuccess:function(data){
$("#${config_id}List").<#if config_istree=="Y">treegrid<#else>datagrid</#if>("clearSelections");
delete $("#${config_id}List").treegrid('options').queryParams['id'];
},
onClickRow:function(rowIndex,rowData)
{rowid=rowData.id;gridname='${config_id}List';}
<#if config_istree=="Y">
{rowid=rowIndex.id;gridname='${config_id}List';}
<#else>
{rowid=rowData.id;gridname='${config_id}List';}
</#if>
});
<#--update-end--Author:taoyan Date:20181106 for树形列表分页bug+行点击事件报错 -->
$('#${config_id}List').<#if config_istree=="Y">treegrid<#else>datagrid</#if>('getPager').pagination({beforePageText:'',afterPageText:'/{pages}',displayMsg:'{from}-{to}共{total}条',showPageList:true,showRefresh:true});
$('#${config_id}List').<#if config_istree=="Y">treegrid<#else>datagrid</#if>('getPager').pagination({onBeforeRefresh:function(pageNumber, pageSize){ $(this).pagination('loading');$(this).pagination('loaded'); }});
//将没有权限的按钮屏蔽掉

View File

@ -227,12 +227,19 @@ function createDataGrid${config_id}(){
}
]
],
<#--update-begin--Author:taoyan Date:20181106 for树形列表分页bug+行点击事件报错 -->
onLoadSuccess:function(data){
$("#${config_id}List").<#if config_istree=="Y">treegrid<#else>datagrid</#if>("clearSelections");
delete $("#${config_id}List").treegrid('options').queryParams['id'];
},
onClickRow:function(rowIndex,rowData)
{rowid=rowData.id;gridname='${config_id}List';}
<#if config_istree=="Y">
{rowid=rowIndex.id;gridname='${config_id}List';}
<#else>
{rowid=rowData.id;gridname='${config_id}List';}
</#if>
});
<#--update-end--Author:taoyan Date:20181106 for树形列表分页bug+行点击事件报错 -->
$('#${config_id}List').<#if config_istree=="Y">treegrid<#else>datagrid</#if>('getPager').pagination({beforePageText:'',afterPageText:'/{pages}',displayMsg:'{from}-{to}共{total}条',showPageList:true,showRefresh:true});
$('#${config_id}List').<#if config_istree=="Y">treegrid<#else>datagrid</#if>('getPager').pagination({onBeforeRefresh:function(pageNumber, pageSize){ $(this).pagination('loading');$(this).pagination('loaded'); }});
//将没有权限的按钮屏蔽掉

View File

@ -72,7 +72,51 @@
clear:none !important;
float:left;
}
</style>
/*update-begin-author:toayan date:20181112 for:TASK #3153 JEECG 问题确认处理 -->4.Online 单表移动模板,文件上 传格式太丑*/
.uploadify-button{
width: 100% !important;
background-color: #3598dc !important;
background-image: -webkit-gradient(linear, 0% 100%, 0% 0%, from(#3598dc), to(#5cade2));
border: 1px solid #3598dc;
color: #fff !important;
font-size: 14px;
font-family: Hiragino Sans GB;
height: 28px !important;
line-height: 28px !important;
border-radius: 4px;
}
.list-li{
-webkit-transform: translateX(0px);
border:1px solid #ddd;
border-right:none;
}
.os-file-type {
background-size:36px 36px;
display: inline-block;
width: 36px;
height: 36px;
vertical-align:middle;
}
.os-file-name{
display: inline-block;
height: 36px;
width: 100px;
vertical-align:middle;
font-size: 12px;
}
.os-file-del{
position: absolute;
top: -2px; right: -80px;
text-align: center;
font-family: Hiragino Sans GB;
font-size:14px;
background: #ffcb20; color: #fff;
width: 80px;
height: 40px;
line-height: 40px;
}
/*update-end-author:toayan date:20181112 for:TASK #3153 JEECG 问题确认处理 -->4.Online 单表移动模板,文件上 传格式太丑*/
</style>
</head>
<body class="wallpaper wallpaperm">
<div id="container" class="container" mobile="1">

View File

@ -206,12 +206,19 @@ function createDataGrid${config_id}(){
}
]
],
<#--update-begin--Author:taoyan Date:20181106 for树形列表分页bug+行点击事件报错 -->
onLoadSuccess:function(data){
$("#${config_id}List").<#if config_istree=="Y">treegrid<#else>datagrid</#if>("clearSelections");
delete $("#${config_id}List").treegrid('options').queryParams['id'];
},
onClickRow:function(rowIndex,rowData)
{rowid=rowData.id;gridname='${config_id}List';}
<#if config_istree=="Y">
{rowid=rowIndex.id;gridname='${config_id}List';}
<#else>
{rowid=rowData.id;gridname='${config_id}List';}
</#if>
});
<#--update-end--Author:taoyan Date:20181106 for树形列表分页bug+行点击事件报错 -->
$('#${config_id}List').<#if config_istree=="Y">treegrid<#else>datagrid</#if>('getPager').pagination({beforePageText:'',afterPageText:'/{pages}',displayMsg:'{from}-{to}共{total}条',showPageList:true,showRefresh:true});
$('#${config_id}List').<#if config_istree=="Y">treegrid<#else>datagrid</#if>('getPager').pagination({onBeforeRefresh:function(pageNumber, pageSize){ $(this).pagination('loading');$(this).pagination('loaded'); }});
//将没有权限的按钮屏蔽掉

View File

@ -98,7 +98,9 @@ function createDataGrid${config_id}(){
idField: 'id', <#if config_istree=="Y">treeField:"${tree_fieldname}",</#if>
title: '<@mutiLang langKey="${config_name}"/>',
fit:true,
fitColumns:true,
<#--update-begin--Author:taoyan date:20181105 for:TASK #3143 【论坛问题】[UI标签] 折叠标签之未铺满-->
//fitColumns:true,
<#--update-end--Author:taoyan date:20181105 for:TASK #3143 【论坛问题】[UI标签] 折叠标签之未铺满-->
striped:true,
autoRowHeight: true,
pageSize: 10,

View File

@ -100,8 +100,8 @@ $("#${po.field_name}thelist").on("click",".pic_close",function(eve){
var itemObj = $(eve.target).closest(".uploadify-queue-item");
var id = itemObj.attr("id");
$.dialog.setting.zIndex = getzIndex();
$.dialog.confirm("确认删除该条记录?", function(){
$.ajax({
<#-- update-begin-author:taoyan date:20181112 for:TASK #3153 JEECG 问题确认处理 ->3.Online 单表移动模板,删除图 片不需要确认 -->
$.ajax({
async : false,
cache : false,
url:"cgUploadController.do?delAttachment",
@ -126,8 +126,8 @@ $("#${po.field_name}thelist").on("click",".pic_close",function(eve){
tip(data.msg);
}
}
});
}, function(){});
});
<#-- update-end-author:taoyan date:20181112 for:TASK #3153 JEECG 问题确认处理 ->3.Online 单表移动模板,删除图 片不需要确认 -->
});
});
</script>
@ -137,35 +137,6 @@ $("#${po.field_name}thelist").on("click",".pic_close",function(eve){
<#-- 文件上传 -->
<#macro uploadFile po height = "18" width = "80">
<div class="iuploader">
<div id = "${po.field_name}thelist" class="uploader-list">
<table class="temptable">
<tbody>
<#list filesList as fileB>
<#if fileB['field']?lower_case == po.field_name>
<tr class="upload_generate history uploadify-queue-item" id="${fileB['fileKey']}">
<td title="${fileB['title']}">
<#if fileB['title']?length gt 20>
${fileB['title']?substring(0,15)}...
<#else>
${fileB['title']}
</#if>
</td>
<td>
<a title="删除" href="javascript:void(0)" class="jeecgDetail file_close" style="margin:0 8px;text-decoration: none;">删除</a>
</td>
<td>
<a title="预览" href="javascript:void(0);" onclick="openwindow('预览','${basePath}/commonController.do?openViewFile&fileid=${fileB['fileKey']}&subclassname=org.jeecgframework.web.cgform.entity.upload.CgUploadEntity','fList',700,500)" style="margin:0 8px;text-decoration: none;">预览</a>
</td>
<td>
<a title="下载" href="${basePath}/commonController.do?viewFile&fileid=${fileB['fileKey']}&subclassname=org.jeecgframework.web.cgform.entity.upload.CgUploadEntity" style="margin:0 8px;text-decoration: none;">下载</a>
</td>
<td style="display:none"><input type="hidden" name="${po.field_name}" value="${fileB['path']}"/></td>
</tr>
</#if>
</#list>
</tbody>
</table>
</div>
<#if !(po.operationCodesReadOnly ??)>
<div class="plupload-btns">
<div id="${po.field_name}Upselector" class="uploadify-button " style="cursor:pointer;height:${height}px; line-height:${height}px; width:${width}px; position: relative; z-index: 1;">
@ -176,6 +147,38 @@ $("#${po.field_name}thelist").on("click",".pic_close",function(eve){
<input type="button" id = "${po.field_name}" style="display:none"/>
</div>
</#if>
<div id = "${po.field_name}thelist" class="uploader-list">
<table class="online-file-block" style="width: 100%;overflow: hidden;">
<tbody>
<#list filesList as fileB>
<#if fileB['field']?lower_case == po.field_name>
<tr class="os-single-file-line history uploadify-queue-item" id="${fileB['fileKey']}">
<td class="list-li">
<div style="position: relative;">
<#assign osFileTypeImg = "default">
<#if fileB['extend']?default("")?length gt 1>
<#assign osFileTypeImg = "${fileB['extend']}">
</#if>
<span class="os-file-type" style="background-image: url(plug-in/plupload/filetype/${osFileTypeImg}.png);"></span>
<span class="os-file-name">
<#if fileB['title']?length gt 20>
${fileB['title']?substring(0,20)}...${fileB['extend']}
<#else>
${fileB['title']}.${fileB['extend']}
</#if>
</span>
<div class="os-file-del file_close">删除</div>
<input type="hidden" name="${po.field_name}" value="${fileB['path']}"/>
</div>
</td>
</tr>
</#if>
</#list>
</tbody>
</table>
</div>
<div class="form" id="filediv_${po.field_name}"> </div>
</div>
<#if !(po.operationCodesReadOnly ??)>
@ -187,7 +190,7 @@ var serverMsg = "";
var addtrFile = function(file) {
var fileName = file.name;
if (fileName.length > 20) {
fileName = fileName.substring(0, 15) + '...';
fileName = fileName.substring(0, 20) + '...';
}
var fileSize = Math.ceil(file.size/1024);
var html = '<div id="'+file.id+'" class="uploadify-queue-item">';
@ -204,20 +207,25 @@ var addtrFile = function(file) {
$("#imagediv_${po.field_name}").append(html);
</#if>
}
var addSuccessFile = function(file) {
var path = file['url'],fileid = file['fileid'],title = file['name'];
var html = '<tr class="uploadify-queue-item upload_generate" id="'+fileid+'"><td title="'+title+'">';
if(title.length>20){
html+=title.substring(0,15)+'...';
}else{
html+=title;
var path = file['url'],fileid = file['fileid'],title = file['name'],extend=file['extend'];
var html = '<tr class="os-single-file-line uploadify-queue-item" id="'+fileid+'"><td class="list-li">';
html+='<div style="position: relative;">';
html+='';
var osFileTypeImg = "default";
if(!!extend){
osFileTypeImg = extend;
}
html+='</td>';
html+='<td><a title="删除" class="jeecgDetail file_close" href="javascript:void(0)" style="margin:0 8px;text-decoration: none;">删除</a></td>';
//html+='<td><a title="预览" href="javascript:void(0);" onclick="openwindow(\'预览\',\'${basePath}/commonController.do?openViewFile&fileid='+fileid+'&subclassname=org.jeecgframework.web.cgform.entity.upload.CgUploadEntity\',\'fList\',700,500)" style="margin:0 8px;text-decoration: none;">预览</a></td>';
//html+='<td><a title="下载" href="${basePath}/commonController.do?viewFile&fileid='+fileid+'&subclassname=org.jeecgframework.web.cgform.entity.upload.CgUploadEntity" style="margin:0 8px;text-decoration: none;">下载</a></td>';
html+='<td style="display:none"><input type="hidden" name="${po.field_name}" value="'+path+'"/></td></tr>';
html+='<span class="os-file-type" style="background-image: url(plug-in/plupload/filetype/'+osFileTypeImg+'.png);"></span>';
html+='<span class="os-file-name">';
if(title.length>20){
html+=title.substring(0,20)+'...'+extend;
}else{
html+=title+"."+extend;
}
html+='</span><div class="os-file-del file_close">删除</div>';
html+='<input type="hidden" name="${po.field_name}" value="'+path+'"/>';
html+='</div></td></tr>';
$("#${po.field_name}thelist").children('table').append(html);
}
var uploader = new plupload.Uploader({
@ -283,8 +291,8 @@ $("#${po.field_name}thelist").on("click",".file_close",function(eve){
var itemObj = $(eve.target).closest(".uploadify-queue-item");
var id = itemObj.attr("id");
$.dialog.setting.zIndex = getzIndex();
$.dialog.confirm("确认删除该条记录?", function(){
$.ajax({
<#-- update-begin-author:taoyan date:20181112 for:TASK #3153 JEECG 问题确认处理 ->3.Online 单表移动模板,删除图 片不需要确认 -->
$.ajax({
async : false,
cache : false,
url:"cgUploadController.do?delAttachment",
@ -309,10 +317,90 @@ $("#${po.field_name}thelist").on("click",".file_close",function(eve){
tip(data.msg);
}
}
});
}, function(){});
});
<#-- update-end-author:taoyan date:20181112 for:TASK #3153 JEECG 问题确认处理 ->3.Online 单表移动模板,删除图 片不需要确认 -->
});
});
</script>
<#-- update-begin-author:taoyan date:20181112 for:TASK #3153 JEECG 问题确认处理 ->4.Online 单表移动模板,文件上 传格式太丑 -->
<script>
//滑动删除JS
window.addEventListener('load',function(){
var initX;
var moveX;
var X = 0;
var objX = 0;
document.getElementById("${po.field_name}thelist").addEventListener('touchstart',function(event){
if(!!event.target.className && event.target.className.indexOf("os-file-del")>=0){
$(event.target).click();
return;
}
event.preventDefault();
var obj = event.target.parentNode;
if(obj.className == "list-li"){console.log(event.targetTouches[0].pageX);
initX = event.targetTouches[0].pageX;
objX =(obj.style.WebkitTransform.replace(/translateX\(/g,"").replace(/px\)/g,""))*1;
}
if( objX == 0){
console.log('objX == 0)');
document.getElementById("${po.field_name}thelist").addEventListener('touchmove',function(event) {
event.preventDefault();
var obj = event.target.parentNode;
if (obj.className == "list-li") {
moveX = event.targetTouches[0].pageX;
X = moveX - initX;
if (X > 0) {
obj.style.WebkitTransform = "translateX(" + 0 + "px)";
}
else if (X < 0) {
var l = Math.abs(X);
obj.style.WebkitTransform = "translateX(" + -l + "px)";
if(l>80){
l=80;
obj.style.WebkitTransform = "translateX(" + -l + "px)";
}
}
}
});
}
else if(objX<0){console.log('objX 《 0)');
document.getElementById("${po.field_name}thelist").addEventListener('touchmove',function(event) {
event.preventDefault();
var obj = event.target.parentNode;
if (obj.className == "list-li") {
moveX = event.targetTouches[0].pageX;
X = moveX - initX;
if (X > 0) {
var r = -80 + Math.abs(X);
obj.style.WebkitTransform = "translateX(" + r + "px)";
if(r>0){
r=0;
obj.style.WebkitTransform = "translateX(" + r + "px)";
}
}
else { //向左滑动
obj.style.WebkitTransform = "translateX(" + -80 + "px)";
}
}
});
}
})
document.getElementById("${po.field_name}thelist").addEventListener('touchend',function(event){
event.preventDefault();
var obj = event.target.parentNode;
if(obj.className == "list-li"){
objX =(obj.style.WebkitTransform.replace(/translateX\(/g,"").replace(/px\)/g,""))*1;
if(objX>-40){
obj.style.WebkitTransform = "translateX(" + 0 + "px)";
}else{
obj.style.WebkitTransform = "translateX(" + -80 + "px)";
}
}
})
})
</script>
<#-- update-end-author:taoyan date:20181112 for:TASK #3153 JEECG 问题确认处理 ->4.Online 单表移动模板,文件上 传格式太丑 -->
</#if>
</#macro>

View File

@ -6,7 +6,7 @@
<display-name>Jeecg 微云快速开发平台</display-name>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>jeecg-3.8</param-value>
<param-value>jeecg-4.0</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>

Binary file not shown.

Binary file not shown.

View File

@ -903,7 +903,9 @@ a:hover {
}
a.l-btn span.l-btn-left .icon-ok{
/* update-begin-Author:LiShaoQing Date:20181022 for: 黑名单管理下的高级查询构造器图表样式问题-----*/
/*background-image:none;*/
/* update-end-Author:LiShaoQing Date:20181022 for: 黑名单管理下的高级查询构造器图表样式问题-----*/
}
.button:hover,a.l-btn:hover span.l-btn-left {

View File

@ -7398,7 +7398,9 @@ body.boxed-layout.skin-3 #wrapper {
}
.skin-3 .nav-header {
/* update-begin-Author:LiShaoQing date:20181023 for: H+其他皮肤切换左上角LOGO变大*/
padding:0;
/* update-end-Author:LiShaoQing date:20181023 for: H+其他皮肤切换左上角LOGO变大*/
background: #ecba52;
background: url('patterns/header-profile-skin-3.png');
}

View File

@ -222,7 +222,7 @@ a.cancel-row-btn:hover{color:#c8615d;} */
}
/**上传行编辑小图标-end-*/
/* 船舶风格页面行编辑默认上传按钮样式 */
/* erp上下布局风格页面行编辑默认上传按钮样式 */
.rowedit-file-control{
color: #fff;
background-color: #18a689;
@ -265,4 +265,19 @@ a.cancel-row-btn:hover{color:#c8615d;} */
-webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
}
/* 船舶风格页面行编辑默认上传按钮样式 */
/* erp上下布局风格页面行编辑默认上传按钮样式 */
/* update-begin-author:taoyan date:20181112 for:TASK #3153 JEECG 问题确认处理 ->7.时间输入框的高度,跟普通文 本框的不一致 */
table td>.datebox{
height:auto !important;
padding: 0 !important;
}
table td>.datebox>.combo-text{
height:26px !important;
line-height:26px !important;
padding:2px
}
table td>.datebox .combo-arrow{
height:26px !important;
}
/* update-end-author:taoyan date:20181112 for:TASK #3153 JEECG 问题确认处理 ->7.时间输入框的高度,跟普通文 本框的不一致 */

View File

@ -396,7 +396,9 @@ a span.accordion-collapse.accordion-expand:hover {
}
/*---------------高级查询器---------------*/
#accDiv{border:0}
#accDiv>.panel{border:1px solid #ddd;border-bottom:0}
/*update-begin-author:taoyan date:20181112 for:TASK #3153 JEECG 问题确认处理 ->6.ERP风格生成的代码 感觉边线有点粗 */
#accDiv>.panel{/*border:1px solid #ddd;*/border-bottom:0}
/*update-end-author:taoyan date:20181112 for:TASK #3153 JEECG 问题确认处理 ->6.ERP风格生成的代码 感觉边线有点粗 */
/*-----------拖动css-----------*/
.resize-y-border{

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -1957,6 +1957,7 @@ var addTabs = function (options) {
var $tabPanel = $('<div role="tabpanel" class="tab-pane"></div>').attr(pageIdField, pageId);
if($('.page_tab_title').length>10){
layer.open({
title: ['', 'font-size:16px;']
@ -1972,6 +1973,7 @@ var addTabs = function (options) {
});
return false;
}
if (options.content) {
//是否指定TAB内容
$tabPanel.append(options.content);

View File

@ -154,7 +154,7 @@ a, a:focus, a:hover {
<div >
<label class="Validform_label" style="font-size: 1.1rem;"> 二维码内容: </label>
<input type="text" name="content" class="form-control form-control-lg" style="width:80%;font-size: 1.1rem;" id="content" value="http://www.jeecg.org" />
<input type="text" name="content" class="form-control form-control-lg" style="width:80%;font-size: 1.1rem;" id="content" value="http://www.jeecg.com" />
<a id="downloadLink"></a>
</div>
<div>

Some files were not shown because too many files have changed in this diff Show More