From a4ca4aeb18ccbf1fe654fa9dba2db37acf250186 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Wed, 29 Jul 2020 17:56:48 +0800 Subject: [PATCH] =?UTF-8?q?Tab=E9=A1=B5=E7=AD=BE=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E6=8E=92=E5=BA=8F=EF=BC=9BGrid=E5=88=97?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=8B=96=E6=8B=BD=E6=8E=92=E5=BA=8F=EF=BC=9B?= =?UTF-8?q?Grid=E5=88=97=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA=E9=9A=90?= =?UTF-8?q?=E8=97=8F=EF=BC=9B=E8=A1=A8=E5=A4=B4=E4=B8=8B=E6=94=BE=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=B7=A5=E5=85=B7=E6=9D=A1=E6=BC=94=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jeesite/common/collect/ListUtils.java | 21 +++++++++++++++++++ .../i18n/core/common_view/i18n_en.properties | 1 + .../core/common_view/i18n_ja_JP.properties | 1 + .../templates/modules/gen/crud/viewList.xml | 1 + .../templates/modules/gen/query/viewList.xml | 1 + .../main/resources/views/include/jslibs.html | 4 +++- .../views/modules/msg/msgInnerList.html | 1 + .../resources/views/modules/sys/areaList.html | 1 + .../views/modules/sys/companyList.html | 1 + .../resources/views/modules/sys/logList.html | 3 ++- .../views/modules/sys/officeList.html | 1 + .../views/modules/sys/onlineList.html | 1 + .../resources/views/modules/sys/postList.html | 1 + .../views/modules/sys/user/corpAdminList.html | 1 + .../views/modules/sys/user/empUserList.html | 3 ++- .../views/modules/sys/user/secAdminList.html | 1 + .../views/modules/test/testDataList.html | 11 +++++++++- 17 files changed, 50 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/jeesite/common/collect/ListUtils.java b/common/src/main/java/com/jeesite/common/collect/ListUtils.java index 0e7080cb..c601d137 100644 --- a/common/src/main/java/com/jeesite/common/collect/ListUtils.java +++ b/common/src/main/java/com/jeesite/common/collect/ListUtils.java @@ -46,6 +46,27 @@ public class ListUtils extends org.apache.commons.collections.ListUtils { return false; } + /** + * 是否包含字符串 + * @param strs 验证字符串组 + * @param strs2 字符串组 + * @return 包含返回true + */ + public static boolean inString(List strs, List strs2){ + if (strs != null && strs2 != null){ + for (String s : strs){ + if (s != null) { + for (String s2 : strs2){ + if (StringUtils.trim(s).equals(StringUtils.trim(s2))){ + return true; + } + } + } + } + } + return false; + } + public static ArrayList newArrayList() { return new ArrayList(); } diff --git a/modules/core/src/main/resources/i18n/core/common_view/i18n_en.properties b/modules/core/src/main/resources/i18n/core/common_view/i18n_en.properties index 0db3d027..8123bbcf 100644 --- a/modules/core/src/main/resources/i18n/core/common_view/i18n_en.properties +++ b/modules/core/src/main/resources/i18n/core/common_view/i18n_en.properties @@ -20,6 +20,7 @@ 操作=Actions 更多=More 更多操作=More action +设置=Setting 基本信息=Basic information 详细信息=Detail information diff --git a/modules/core/src/main/resources/i18n/core/common_view/i18n_ja_JP.properties b/modules/core/src/main/resources/i18n/core/common_view/i18n_ja_JP.properties index ce276568..c0ff8db6 100644 --- a/modules/core/src/main/resources/i18n/core/common_view/i18n_ja_JP.properties +++ b/modules/core/src/main/resources/i18n/core/common_view/i18n_ja_JP.properties @@ -20,6 +20,7 @@ 操作=操作 更多=さらに多 更多操作=他の操作 +设置=設置 基本信息=基本情報 详细信息=詳細情報 diff --git a/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml b/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml index f3d969ee..324ad7eb 100644 --- a/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml +++ b/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml @@ -22,6 +22,7 @@ \<% if(hasPermi('${permissionPrefix}:edit')){ %> \${text('新增')} \<% } %> +
diff --git a/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml b/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml index 0bee5603..a1226315 100644 --- a/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml +++ b/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml @@ -19,6 +19,7 @@ \${text('展开')} \${text('折叠')} <% } %> +
diff --git a/modules/core/src/main/resources/views/include/jslibs.html b/modules/core/src/main/resources/views/include/jslibs.html index 79522054..ca0496eb 100644 --- a/modules/core/src/main/resources/views/include/jslibs.html +++ b/modules/core/src/main/resources/views/include/jslibs.html @@ -7,6 +7,9 @@ <% if (@ListUtils.inString('zTree', libs!)){ %> <% } %> +<% if (@ListUtils.inString(['tabPage', 'dataGrid', 'fileupload'], libs!)){ %> + +<% } %> <% if (@ListUtils.inString('tabPage', libs!)){ %> @@ -34,7 +37,6 @@ - <% } %> <% if (@ListUtils.inString('ueditor', libs!)){ %> diff --git a/modules/core/src/main/resources/views/modules/msg/msgInnerList.html b/modules/core/src/main/resources/views/modules/msg/msgInnerList.html index 494668af..e6ac4681 100644 --- a/modules/core/src/main/resources/views/modules/msg/msgInnerList.html +++ b/modules/core/src/main/resources/views/modules/msg/msgInnerList.html @@ -10,6 +10,7 @@ <% if(hasPermi('msg:msgInner:edit')){ %> ${text('新增')} <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/areaList.html b/modules/core/src/main/resources/views/modules/sys/areaList.html index d43e2f83..6a76d9b9 100644 --- a/modules/core/src/main/resources/views/modules/sys/areaList.html +++ b/modules/core/src/main/resources/views/modules/sys/areaList.html @@ -13,6 +13,7 @@ <% if(hasPermi('sys:area:edit')){ %> 新增 <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/companyList.html b/modules/core/src/main/resources/views/modules/sys/companyList.html index 27f70d1f..5482534c 100644 --- a/modules/core/src/main/resources/views/modules/sys/companyList.html +++ b/modules/core/src/main/resources/views/modules/sys/companyList.html @@ -13,6 +13,7 @@ <% if(hasPermi('sys:company:edit')){ %> ${text('新增')} <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/logList.html b/modules/core/src/main/resources/views/modules/sys/logList.html index d66092f2..46d01a02 100644 --- a/modules/core/src/main/resources/views/modules/sys/logList.html +++ b/modules/core/src/main/resources/views/modules/sys/logList.html @@ -6,7 +6,8 @@ 访问日志
diff --git a/modules/core/src/main/resources/views/modules/sys/officeList.html b/modules/core/src/main/resources/views/modules/sys/officeList.html index 2890365f..699a61e7 100644 --- a/modules/core/src/main/resources/views/modules/sys/officeList.html +++ b/modules/core/src/main/resources/views/modules/sys/officeList.html @@ -13,6 +13,7 @@ <% if(hasPermi('sys:office:edit')){ %> ${text('新增')} <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/onlineList.html b/modules/core/src/main/resources/views/modules/sys/onlineList.html index 99b5813b..10c381e8 100644 --- a/modules/core/src/main/resources/views/modules/sys/onlineList.html +++ b/modules/core/src/main/resources/views/modules/sys/onlineList.html @@ -7,6 +7,7 @@
diff --git a/modules/core/src/main/resources/views/modules/sys/postList.html b/modules/core/src/main/resources/views/modules/sys/postList.html index c026671e..4cecd950 100644 --- a/modules/core/src/main/resources/views/modules/sys/postList.html +++ b/modules/core/src/main/resources/views/modules/sys/postList.html @@ -10,6 +10,7 @@ <% if(hasPermi('sys:post:edit')){ %> ${text('新增')} <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/user/corpAdminList.html b/modules/core/src/main/resources/views/modules/sys/user/corpAdminList.html index 10881915..5681d442 100644 --- a/modules/core/src/main/resources/views/modules/sys/user/corpAdminList.html +++ b/modules/core/src/main/resources/views/modules/sys/user/corpAdminList.html @@ -14,6 +14,7 @@ ${text('新增管理员')} <% } %> <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/user/empUserList.html b/modules/core/src/main/resources/views/modules/sys/user/empUserList.html index 2cc9c31d..3d08d0f4 100644 --- a/modules/core/src/main/resources/views/modules/sys/user/empUserList.html +++ b/modules/core/src/main/resources/views/modules/sys/user/empUserList.html @@ -17,6 +17,7 @@
@@ -126,7 +127,7 @@ $('#dataGrid').dataGrid({ {header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){ return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true); }}, - {header:'${text("操作")}', name:'actions', width:260, sortable:false, title:false, formatter: function(val, obj, row, act){ + {header:'${text("操作")}', name:'actions', width:270, sortable:false, title:false, formatter: function(val, obj, row, act){ var actions = []; <% if(hasPermi('sys:empUser:edit')){ %> actions.push(' '); diff --git a/modules/core/src/main/resources/views/modules/sys/user/secAdminList.html b/modules/core/src/main/resources/views/modules/sys/user/secAdminList.html index 9cd289bf..2525716c 100644 --- a/modules/core/src/main/resources/views/modules/sys/user/secAdminList.html +++ b/modules/core/src/main/resources/views/modules/sys/user/secAdminList.html @@ -9,6 +9,7 @@
diff --git a/web/src/main/resources/views/modules/test/testDataList.html b/web/src/main/resources/views/modules/test/testDataList.html index c9df4393..04830961 100644 --- a/web/src/main/resources/views/modules/test/testDataList.html +++ b/web/src/main/resources/views/modules/test/testDataList.html @@ -11,6 +11,7 @@ ${text('新增')} <% } %> 事务测试 +
@@ -123,7 +124,9 @@ $('#dataGrid').dataGrid({ columnModel: [ {header:'${text("单行文本")}', name:'testInput', index:'a.test_input', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){ return ''+(val||row.id)+''; - }}, + }, searchoptions: { dataInit: function (element) { + $(element).attr('form', 'searchForm').attr('name', 'testInput2'); + }}}, {header:'${text("多行文本")}', name:'testTextarea', index:'a.test_textarea', width:150, align:"left"}, {header:'${text("下拉框")}', name:'testSelect', index:'a.test_select', width:150, align:"center", formatter: function(val, obj, row, act){ return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true); @@ -215,6 +218,12 @@ $('#dataGrid').dataGrid({ // $("#dataGrid").parent().append("
没有符合数据
"); // } } +}) +// 开启表头下放搜索工具条 +//.jqGrid('filterToolbar') +// 列表设置显示隐藏或排序后的事件(可用于设置持久化) +.on('jqGridRemapColumns',function(){ + log($('#dataGrid').dataGrid('getParam', 'columnModel')); }); $("#btnTrunsTest").click(function(){ js.ajaxSubmit("${ctx}/test/testData/transTest", function(data){