|
@@ -161,9 +161,14 @@
|
|
|
|
|
|
.paging div.active {
|
|
|
border: none;
|
|
|
- background-color: rgb(78, 216, 250);
|
|
|
+ background-color: #1989fa;
|
|
|
color: #fff;
|
|
|
}
|
|
|
+
|
|
|
+ .bm li,
|
|
|
+ #dLabel {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
|
|
@@ -216,14 +221,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="panel panel-default">
|
|
|
- <div class="panel-heading">
|
|
|
+ <div class="panel-heading" style="padding-right: 110px;">
|
|
|
任务统计
|
|
|
- <div class="dropdown" style="float: right;color: #2e2e2e;margin-right: 100px;">
|
|
|
+ <div class="dropdown" style="float: right;color: #2e2e2e;">
|
|
|
<div id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
- 全部
|
|
|
+ <span class="bmTitle"></span>
|
|
|
<span class="caret"></span>
|
|
|
</div>
|
|
|
- <ul class="dropdown-menu" aria-labelledby="dLabel">
|
|
|
+ <ul class="dropdown-menu bm" aria-labelledby="dLabel">
|
|
|
+
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -249,7 +255,7 @@
|
|
|
<script src="./js/loading.js"></script>
|
|
|
<script>
|
|
|
let linechart = null, barchart = null, piechart = null, type = "ALL";
|
|
|
- let page = 1, pageSize = 10, paging = null;
|
|
|
+ let page = 1, pageSize = 10, paging = null, bm = { id: undefined, depName: '全部' };
|
|
|
let searchObj = getsearch();
|
|
|
function line1(li) {
|
|
|
if (linechart) linechart.destroy();
|
|
@@ -505,7 +511,6 @@
|
|
|
}
|
|
|
|
|
|
function getdetail() {
|
|
|
- console.log('--',$('body').loading)
|
|
|
$('body').loading({
|
|
|
loadingWidth: 240,
|
|
|
title: '请稍等!',
|
|
@@ -521,14 +526,15 @@
|
|
|
smallLoading: false,
|
|
|
loadingMaskBg: 'rgba(0,0,0,0.2)'
|
|
|
});
|
|
|
+ const p = {
|
|
|
+ page,
|
|
|
+ pageSize,
|
|
|
+ title: searchObj.topic,
|
|
|
+ }
|
|
|
+ if (bm.depName && bm.depName !== '全部') p.depName = bm.depName;
|
|
|
require('POST', {
|
|
|
url: "/topic/detail",
|
|
|
- data: {
|
|
|
- depRange: "ALL",
|
|
|
- page,
|
|
|
- pageSize,
|
|
|
- title: searchObj.topic
|
|
|
- }
|
|
|
+ data: p
|
|
|
}).then(data => {
|
|
|
const li = (data.data || []).sort((a, b) => {
|
|
|
return b.readTotal - a.readTotal
|
|
@@ -545,7 +551,7 @@
|
|
|
paging = new Paging({
|
|
|
total: data.total,
|
|
|
pageChange(p) {
|
|
|
- console.log(p)
|
|
|
+ if(p == page) return
|
|
|
page = p;
|
|
|
getdetail()
|
|
|
}
|
|
@@ -553,6 +559,26 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ function getbm() {
|
|
|
+ require('GET', {
|
|
|
+ url: "/topic/dep-dict",
|
|
|
+ data: {
|
|
|
+ depRange: "ALL",
|
|
|
+ page,
|
|
|
+ pageSize,
|
|
|
+ title: searchObj.topic
|
|
|
+ }
|
|
|
+ }).then(data => {
|
|
|
+ let li = data || [];
|
|
|
+ $('.bm').append($(" <li><a href='##' id='-1'>全部</a></li>"))
|
|
|
+ for (let i = 0; i < li.length; i++) {
|
|
|
+ const v = li[i];
|
|
|
+ $('.bm').append($(" <li><a href='##' id='" + v.id + "'>" + v.depName + "</a></li>"))
|
|
|
+ }
|
|
|
+ $('.bmTitle').text(bm.depName)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
function init() {
|
|
|
let h = $('.panel-body').width() * 9 / 16;
|
|
|
$('.panel-body').height(h);
|
|
@@ -566,6 +592,16 @@
|
|
|
getread();
|
|
|
})
|
|
|
|
|
|
+ $('.bm').on("click", "li", function (e) {
|
|
|
+ bm = {
|
|
|
+ id: $(e.target).attr("id"), depName: $(this).text()
|
|
|
+ }
|
|
|
+ $('.bmTitle').text(bm.depName);
|
|
|
+ paging = null;
|
|
|
+ $('.paging').html("")
|
|
|
+ getdetail()
|
|
|
+ })
|
|
|
+
|
|
|
$('.' + type).addClass("btn-primary")
|
|
|
|
|
|
|
|
@@ -574,6 +610,7 @@
|
|
|
getread();
|
|
|
getstart();
|
|
|
getdetail();
|
|
|
+ getbm();
|
|
|
}
|
|
|
init();
|
|
|
|