Compare commits
No commits in common. "85c02fd2f36af903988a5cc0eba1a0dc3ede5610" and "29d693dfae6e6407b46eacdae7fc43aca8fa899d" have entirely different histories.
85c02fd2f3
...
29d693dfae
|
@ -34,7 +34,6 @@ layui.use(['laytpl', 'treeTable', 'jquery', 'iconPickerFa', 'form', 'miniTab', '
|
||||||
{type: 'checkbox'},
|
{type: 'checkbox'},
|
||||||
{field: 'name', title: '名称', minWidth: 150, singleLine: true},
|
{field: 'name', title: '名称', minWidth: 150, singleLine: true},
|
||||||
{field: 'name', title: '状态'},
|
{field: 'name', title: '状态'},
|
||||||
{field: 'sort', title: '排序',edit:"text"},
|
|
||||||
{templet: '#row-status',field: 'status', minWidth: 180,align: 'center', title: '状态'},
|
{templet: '#row-status',field: 'status', minWidth: 180,align: 'center', title: '状态'},
|
||||||
]],
|
]],
|
||||||
done: function () {
|
done: function () {
|
||||||
|
@ -54,23 +53,6 @@ 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是行中的工具条
|
//监听工具条 注意区别toolbar和tool toolbar是表头上的工具条 tool是行中的工具条
|
||||||
treeTable.on('toolbar(menu-table)', function (obj) {
|
treeTable.on('toolbar(menu-table)', function (obj) {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<!-- 编辑单元格提交url -->
|
<!-- 编辑单元格提交url -->
|
||||||
<input type="hidden" id="row-modify" data-url="/manager/area/modify">
|
<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">
|
<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' : '' }}>
|
<input type="checkbox" name="status" value="{{d.id}}" lay-skin="switch" lay-text="正常|禁用" lay-filter="changeStatus" {{ d.status == 1 ? 'checked' : '' }}>
|
||||||
|
|
Loading…
Reference in New Issue