master
wangxinglong 2022-04-21 11:52:31 +08:00
parent 7b4eed29e5
commit 85c02fd2f3
2 changed files with 18 additions and 1 deletions

View File

@ -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) {

View File

@ -18,7 +18,7 @@
<!-- 编辑单元格提交url -->
<input type="hidden" id="row-modify" data-url="/manager/area/modify">
<div id="table-container-sort" data-url="/manager/area/sort" ></div>
<!---状态变更 -->
<script type="text/html" id="row-status">
<input type="checkbox" name="status" value="{{d.id}}" lay-skin="switch" lay-text="正常|禁用" lay-filter="changeStatus" {{ d.status == 1 ? 'checked' : '' }}>