From 5de8789629ee157b3f97393b7e04653387aa268b Mon Sep 17 00:00:00 2001 From: wangbing Date: Wed, 6 May 2020 17:31:48 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81Ajax=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: bfdc8f73520b52705665e4b56f531c9b02adaead --- .../SpringBoot/resources/templates/control/nav.ftl | 4 ++++ .../templates/screen/module/system/dept.ftl | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl b/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl index cd2b4d21..2a367b99 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl @@ -198,6 +198,10 @@ this.mTarget = target; this.mMethod = method; + this.method = function (method) { + this.mMethod = method; + return this; + }; this.post = function (data, callback) { switch (this.mMethod) { case "upload": diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl index 66a80019..d88bc501 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl @@ -29,7 +29,8 @@ 搜索 - 重置 + 重置 + @@ -177,8 +178,10 @@ :expand-on-click-node="false">
- - {{ data.label }}[{{data.value}}] + + {{ data.label }}[{{data.value}}]
@@ -302,7 +305,7 @@ cancelButtonText: '取消', type: 'warning' }).then(function () { - new Ajax("system", "dept", "delete",{id: item.id}).post((function (response) { + new Ajax("system", "dept", "delete").post({id: item.id}, function (response) { if (response.errors.length > 0) { nav.e(response.errors[0].message); } else { @@ -341,7 +344,7 @@ return data.deptName.indexOf(value) !== -1; }, onLoadTree: function () { - new Ajax("system","dept","tree").post(function (response) { + new Ajax("system", "dept", "tree").post(function (response) { if (response.errors.length > 0) { nav.e(response.errors[0].message); } else {