From 85c02fd2f36af903988a5cc0eba1a0dc3ede5610 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Thu, 21 Apr 2022 11:52:31 +0800 Subject: [PATCH] setter --- public/static/manager/js/area.js | 17 +++++++++++++++++ view/manager/area/index.html | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/public/static/manager/js/area.js b/public/static/manager/js/area.js index e949586..9d540df 100644 --- a/public/static/manager/js/area.js +++ b/public/static/manager/js/area.js @@ -54,6 +54,23 @@ layui.use(['laytpl', 'treeTable', 'jquery', 'iconPickerFa', 'form', 'miniTab', ' } }) }); + let sort = $('#table-container-sort').data('url'); + treeTable.on('edit(menu-table)', function (obj) { + let id = obj.data.id; + if (obj.field == 'sort') { + $.ajax(sort, { + data: { + "sort": obj.value, + "id": id + } + ,dataType : 'json' + ,type: 'POST' + }) + .done(function () { + insTb.reload(); + }) + } + }); //监听工具条 注意区别toolbar和tool toolbar是表头上的工具条 tool是行中的工具条 treeTable.on('toolbar(menu-table)', function (obj) { diff --git a/view/manager/area/index.html b/view/manager/area/index.html index fbc3c1e..faa85c6 100644 --- a/view/manager/area/index.html +++ b/view/manager/area/index.html @@ -18,7 +18,7 @@ - +