提交内容

new-v20240713
dshclm 1 week ago
parent 7ca4edbafb
commit b49c8a667a

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -6,6 +6,7 @@
<title>甘肃省人民检察院兰铁分院</title> <title>甘肃省人民检察院兰铁分院</title>
<link th:href="@{/home/base/favicon.ico}" rel="shortcut icon"/> <link th:href="@{/home/base/favicon.ico}" rel="shortcut icon"/>
<link href="/home/lib/css/layui.css" th:href="@{/home/lib/css/layui.css}" rel="stylesheet"/> <link href="/home/lib/css/layui.css" th:href="@{/home/lib/css/layui.css}" rel="stylesheet"/>
<link href="/home/lib/css/elementui.css" th:href="@{/home/lib/css/elementui.css}" rel="stylesheet"/>
<style> <style>
/* 页面整体布局 */ /* 页面整体布局 */
html, body { html, body {
@ -141,8 +142,22 @@
.pag { .pag {
margin-top: 315px; margin-top: 315px;
} }
.el-tree-node {
border-bottom: 1px solid #E1E1E1;
}
.el-tree-node__content {
height: 42px;
}
.el-tree-node__expand-icon {
color: #4774ce;
font-size: 22px;
}
.el-tree-node__label {
font-size: 18px;
}
.el-tree-node__children .el-tree-node__label{
font-size: 16px;
}
</style> </style>
</head> </head>
<body class="layui-bg-gray" style=""> <body class="layui-bg-gray" style="">
@ -162,24 +177,22 @@
<div class="container"> <div class="container">
<div class="main"> <div class="main">
<div class="row"> <div class="row">
<div class="main-left fl"> <div class="main-left fl" id="app">
<h2> <h2>
专题栏目 专题栏目
</h2> </h2>
<ul class="sidebar"> <el-tree
<tbody th:each="columns,status : ${specialColumns}"> ref="treeRef"
<li th:if="${columnId} eq ${columns.columnId}"> :data="treeData"
<a class="active" th:title="${columns.columnName}" th:href="@{/special_view.html(columnId=${columns.columnId})}"> :props="defaultProps"
[[${#strings.abbreviate(columns.columnName,28)}]] node-key="columnId"
</a> :default-expanded-keys="defauleExpandedKeys"
</li> :current-node-key="defaultSelected"
<li th:if="${columnId} ne ${columns.columnId}"> highlight-current
<a th:title="${columns.columnName}" th:href="@{/special_view.html(columnId=${columns.columnId})}"> :expand-on-click-node="false"
[[${#strings.abbreviate(columns.columnName,28)}]] @node-click="handleNodeClick"
</a> >
</li> </el-tree>
</tbody>
</ul>
</div> </div>
<div class="main-right fr common-list"> <div class="main-right fr common-list">
<ul class="list mt10"> <ul class="list mt10">
@ -203,9 +216,11 @@
</div> </div>
</div> </div>
<!--底部--> <!--底部-->
<script th:src="@{/home/lib/vue.js}"></script>
<script th:src="@{/home/lib/elementui.js}"></script>
<th:block th:include="home_footer :: home_footer"/> <th:block th:include="home_footer :: home_footer"/>
<script th:src="@{/home/lib/layui.js}"></script> <script th:src="@{/home/lib/layui.js}"></script>
<script type="text/javascript"> <script th:inline="javascript">
window.addEventListener('DOMContentLoaded', function () { window.addEventListener('DOMContentLoaded', function () {
var currentUrl = location.href; var currentUrl = location.href;
// 获取所有的<a>标签 // 获取所有的<a>标签
@ -218,6 +233,49 @@
} }
} }
}); });
var app = new Vue({
el: '#app',
data(){
return{
treeData: [],
defaultProps: {
children: 'children',
label: 'columnName',
id:'columnId'
},
defaultSelected:[[${columnId}]],
defauleExpandedKeys:[],
};
},
mounted(){
this.getTreeData();
},
methods: {
getTreeData(){
$.ajax({
type: "get",
url: "/columnTree/getTree",
success: function(res) {
if (res.code == 0) {
this.treeData = res.data;
this.$nextTick(()=>{
this.$refs.treeRef.setCurrentKey(this.defaultSelected)
var expandedKeys = JSON.parse(localStorage.getItem('expandedKeys'));
if (expandedKeys) {
this.defauleExpandedKeys.push(expandedKeys)
}
})
}
}.bind(this)
});
},
handleNodeClick(data) {
localStorage.setItem('expandedKeys', JSON.stringify(data.columnId));
redirect("/special_view.html?columnId="+data.columnId);
console.log(data);
},
}
})
function redirect(url) { function redirect(url) {
window.location.href = url; window.location.href = url;
} }

Loading…
Cancel
Save