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 @@ - +