From 09cd7b1f8dd4e72d1589e2426fcab46f39491265 Mon Sep 17 00:00:00 2001 From: wangbing Date: Wed, 25 Nov 2020 14:33:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/screen/module/mgr.ftl | 18 +++---- .../templates/screen/module/wsys/dept.ftl | 10 ++-- .../templates/screen/module/wsys/dict.ftl | 4 +- .../templates/screen/module/wsys/dictItem.ftl | 6 +-- .../templates/screen/module/wsys/file.ftl | 6 +-- .../templates/screen/module/wsys/logerr.ftl | 2 +- .../templates/screen/module/wsys/logtask.ftl | 4 +- .../templates/screen/module/wsys/profiles.ftl | 4 +- .../templates/screen/module/wsys/res.ftl | 32 ++++++------- .../templates/screen/module/wsys/role.ftl | 47 +++++++++++-------- .../templates/screen/module/wsys/schedule.ftl | 4 +- .../templates/screen/module/wsys/taskSql.ftl | 4 +- .../templates/screen/module/wsys/tokens.ftl | 8 ++-- .../templates/screen/module/wsys/user.ftl | 8 ++-- .../templates/screen/module/wsys/visitor.ftl | 6 +-- 15 files changed, 86 insertions(+), 77 deletions(-) diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl index 49b61c6b..27620bda 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl @@ -13,31 +13,31 @@ <#elseif item.getFieldTypeJava() =="Byte" && item.isQuery> - + <#elseif item.getFieldTypeJava() =="Character" && item.isQuery> - + <#elseif item.getFieldTypeJava() =="Short" && item.isQuery> - + <#elseif item.getFieldTypeJava() =="Integer" && item.isQuery> - + <#elseif item.getFieldTypeJava() =="Long" && item.isQuery> - + <#elseif item.getFieldTypeJava() =="Float" && item.isQuery> - + <#elseif item.getFieldTypeJava() =="Double" && item.isQuery> - + <#elseif item.getFieldTypeJava() =="Date" && item.isQuery> @@ -68,12 +68,12 @@ <#elseif item.getFieldTypeJava() =="String" && item.isQuery> - + <#if item.getFieldTypeJava() =="String" && item.isLike> - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dept.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dept.ftl index 7ea1684d..9904a49a 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dept.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dept.ftl @@ -3,19 +3,19 @@ - + - + - + - + - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dict.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dict.ftl index 41f53dec..f42c60bf 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dict.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dict.ftl @@ -3,10 +3,10 @@ - + - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dictItem.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dictItem.ftl index 7424fe3c..a1cd7dcb 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dictItem.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dictItem.ftl @@ -3,13 +3,13 @@ - + - + - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/file.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/file.ftl index fa8a092c..6078277e 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/file.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/file.ftl @@ -3,7 +3,7 @@ - + @@ -12,10 +12,10 @@ - + - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/logerr.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/logerr.ftl index 3d1b7125..c5967e8c 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/logerr.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/logerr.ftl @@ -9,7 +9,7 @@ - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/logtask.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/logtask.ftl index 71d7539e..0c94bb1d 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/logtask.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/logtask.ftl @@ -2,7 +2,7 @@ - + - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/profiles.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/profiles.ftl index 9d884a1a..509bc0d9 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/profiles.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/profiles.ftl @@ -8,10 +8,10 @@ - + - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/res.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/res.ftl index 8662b5e9..3d768000 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/res.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/res.ftl @@ -2,10 +2,10 @@ - + - + @@ -14,7 +14,7 @@ - + @@ -235,7 +235,7 @@ :close-on-press-escape="true" :modal-append-to-body="true" :append-to-body="true" - @opened="onTreeOpened" + @opened="onTreeLoad" size="600px"> @@ -257,12 +257,12 @@ 查询 - - 删除 - 刷新 + + 删除 + @@ -271,23 +271,23 @@ + :default-expanded-keys="treeExpand">
{{ data.resName }} - [{{data.resCode}}] + [{{data.resCode}}] [免费] - 新增 - 删除 + 新增 + 编辑 + 删除
@@ -363,6 +363,7 @@ }, treeShow: false, treeFilter: '', + treeExpand: [], treeData: [] }, methods: { @@ -470,11 +471,10 @@ nav.e(response.errors[0].message); } else { this.treeData = response.result; + // 默认展开第一个节点 + this.treeExpand = [response.result[0].id]; } }.bind(this)) - }, - onTreeOpened: function () { - this.onTreeLoad(); } }, mounted: function () { diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/role.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/role.ftl index 198f82fe..5a7d7ebd 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/role.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/role.ftl @@ -2,13 +2,13 @@ - + - + - + @@ -166,25 +166,28 @@ - + + @keyup.enter.native="$refs.tree.filter(treeFilter)"/> - 查询 + 查询 + + + 刷新 - 关联 - 关联 + 关联 + 关联 @@ -192,16 +195,22 @@ + :expand-on-click-node="true" + :filter-node-method="onTreeFilter" + :default-expanded-keys="treeExpand">
- {{ data.resName }}[{{data.resCode}}] + + {{ data.resName }} + [{{data.resCode}}] + [免费] +
@@ -257,9 +266,10 @@ dialog: false, roleId: null, roleCode: null, - treeFilter: '', - strictly:true//是否严格遵循复制不关联 }, + treeFilter: '', + treeExpand: [], + treeStrictly:true,//是否严格遵循复制不关联 treeData: [] }, methods: { @@ -364,22 +374,21 @@ || data.resCode.indexOf(value) !== -1 || data.resValue.indexOf(value) !== -1; }, - onLoadTree: function () { + onTreeLoad: function () { new Ajax("wsys", "res", "tree").post({}, function (response) { if (response.errors.length > 0) { nav.e(response.errors[0].message); } else { this.treeData = response.result; - this.treeData.forTree(function (item) { - item.disabled = item.free; - }); + // 默认展开第一个节点 + this.treeExpand = [response.result[0].id]; } }.bind(this)) }, }, mounted: function () { this.onFind(); - this.onLoadTree(); + this.onTreeLoad(); } }) diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/schedule.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/schedule.ftl index 09907af2..90c721a7 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/schedule.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/schedule.ftl @@ -2,10 +2,10 @@ - + - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/taskSql.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/taskSql.ftl index 53c6edfa..bb20ba48 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/taskSql.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/taskSql.ftl @@ -2,10 +2,10 @@ - + - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/tokens.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/tokens.ftl index cea1033d..e211fda3 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/tokens.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/tokens.ftl @@ -3,13 +3,13 @@ - + - + - + - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/user.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/user.ftl index c35b0be2..cdae46d1 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/user.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/user.ftl @@ -3,13 +3,13 @@ - + - + - + @@ -19,7 +19,7 @@ - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/visitor.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/visitor.ftl index d1b455f8..cabb61c7 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/visitor.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/visitor.ftl @@ -2,13 +2,13 @@ - + - + - +