2020-05-13 17:39:29 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
|
|
<title>FTP</title>
|
|
|
|
<link rel="stylesheet" href="/layui/css/layui.css">
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
<div class="layui-layout layui-layout-admin">
|
|
|
|
<div id="header"></div>
|
|
|
|
<div class="layui-body" style="top: 100px; ">
|
2020-05-13 17:39:29 +08:00
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
<div id="side"></div>
|
|
|
|
<blockquote class="layui-elem-quote"><span id="ip">SFTP</span></blockquote>
|
|
|
|
<div id="sftp"></div>
|
2020-05-13 17:39:29 +08:00
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
<div id="footer"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script src="/layui/layui.js"></script>
|
|
|
|
<script src="/js/jquery-3.2.1.js"></script>
|
2020-05-13 17:39:29 +08:00
|
|
|
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
<script>
|
|
|
|
$('#header').load("/html/header.html");
|
|
|
|
$('#footer').load("/html/footer.html");
|
|
|
|
$('#side').load("/html/body/nas/side.html");
|
|
|
|
layui.use('tree', function () {
|
|
|
|
let tree = layui.tree;
|
2020-05-13 17:39:29 +08:00
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
//渲染
|
|
|
|
let inst1 = tree.render({
|
|
|
|
elem: '#sftp' //绑定元素
|
|
|
|
, edit: ['add', 'update', 'del'] //操作节点的图标
|
|
|
|
, data: [{
|
|
|
|
title: '江西' //一级菜单
|
|
|
|
, children: [{
|
|
|
|
title: '南昌' //二级菜单
|
|
|
|
, children: [{
|
|
|
|
title: '高新区' //三级菜单
|
|
|
|
//…… //以此类推,可无限层级
|
2020-05-13 17:39:29 +08:00
|
|
|
}]
|
2020-10-21 18:05:33 +08:00
|
|
|
}]
|
|
|
|
}, {
|
|
|
|
title: '陕西' //一级菜单
|
|
|
|
, children: [{
|
|
|
|
title: '西安' //二级菜单
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
, click: function (obj) {
|
|
|
|
console.log(obj.data)
|
|
|
|
if (!obj.data.children) {
|
|
|
|
obj.data = {
|
|
|
|
"title": obj.data.title,
|
|
|
|
"children": [
|
|
|
|
{"title": 'a'}
|
|
|
|
]
|
2020-05-13 17:39:29 +08:00
|
|
|
}
|
2020-10-21 18:05:33 +08:00
|
|
|
inst1.reload({
|
|
|
|
data: obj.data,
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$.ajax({cache: false})
|
2020-05-13 17:39:29 +08:00
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
</script>
|
2020-05-13 17:39:29 +08:00
|
|
|
</body>
|
|
|
|
<style>
|
|
|
|
#icon {
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
#rss + .layui-table-view tbody > tr > td > .layui-table-cell {
|
2020-05-13 17:39:29 +08:00
|
|
|
height: 100px;
|
|
|
|
line-height: 100px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
</html>
|