|
|
|
@ -26,6 +26,9 @@ |
|
|
|
<option value="m">月度</option> |
|
|
|
</select>年度</span> |
|
|
|
<span><select id="year" name="year" onchange="selectDate()"> |
|
|
|
<option value="2027">2027</option> |
|
|
|
<option value="2026">2026</option> |
|
|
|
<option value="2025">2025</option> |
|
|
|
<option value="2024">2024</option> |
|
|
|
<option value="2023">2023</option> |
|
|
|
<option value="2022">2022</option> |
|
|
|
@ -99,9 +102,29 @@ |
|
|
|
<script th:inline="javascript"> |
|
|
|
var prefix = ctx + "statistical"; |
|
|
|
|
|
|
|
var currId = "con_one_1"; |
|
|
|
window.onload = function () { |
|
|
|
selectDate(); |
|
|
|
var date = new Date(); |
|
|
|
$("#year").val(date.getFullYear()); |
|
|
|
var currentQuarter = getCurrentQuarter(); |
|
|
|
if(currentQuarter == 1){ |
|
|
|
$("#quarter").val("q1"); |
|
|
|
}else if(currentQuarter == 2){ |
|
|
|
$("#quarter").val("q2"); |
|
|
|
}else if(currentQuarter == 3){ |
|
|
|
$("#quarter").val("q3"); |
|
|
|
}else if(currentQuarter == 4){ |
|
|
|
$("#quarter").val("q4"); |
|
|
|
} |
|
|
|
// 初始化月份 |
|
|
|
var month = date.getMonth() + 1; |
|
|
|
if(month <= 9){ |
|
|
|
$("#month").val("0" + month); |
|
|
|
}else{ |
|
|
|
$("#month").val(month); |
|
|
|
} |
|
|
|
selectDate(); |
|
|
|
}; |
|
|
|
|
|
|
|
function setTab(name, cursel, n) { |
|
|
|
for (i = 1; i <= n; i++) { |
|
|
|
@ -110,6 +133,21 @@ |
|
|
|
menu.className = i == cursel ? "actit" : ""; |
|
|
|
con.style.display = i == cursel ? "block" : "none"; |
|
|
|
} |
|
|
|
currId = "con_" + name + "_" + cursel; |
|
|
|
selectDate(); |
|
|
|
} |
|
|
|
|
|
|
|
function getCurrentQuarter() { |
|
|
|
var currentMonth = new Date().getMonth() + 1; // 获取当前月份,从1开始 |
|
|
|
if (currentMonth <= 3) { |
|
|
|
return 1; // 第一季度 |
|
|
|
} else if (currentMonth <= 6) { |
|
|
|
return 2; // 第二季度 |
|
|
|
} else if (currentMonth <= 9) { |
|
|
|
return 3; // 第三季度 |
|
|
|
} else { |
|
|
|
return 4; // 第四季度 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function queryCaseAnalysis(qorm, year, quarter, month, month) { |
|
|
|
@ -120,6 +158,8 @@ |
|
|
|
"year": year, |
|
|
|
"quarter": quarter, |
|
|
|
"month": month, |
|
|
|
"lawField": $('#lawField').val(), |
|
|
|
"checkCategory": $('#checkCategory').val(), |
|
|
|
}, |
|
|
|
type: "GET", |
|
|
|
dataType: 'json', |
|
|
|
@ -179,7 +219,7 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
/*function queryEnterpriseAnalysis(qorm, year, quarter, month, month) { |
|
|
|
function queryEnterpriseAnalysis(qorm, year, quarter, month, month) { |
|
|
|
$.ajax({ |
|
|
|
url: prefix + '/enterpriseAnalysis', //后台url |
|
|
|
data: { |
|
|
|
@ -203,7 +243,7 @@ |
|
|
|
error: function (er) { //失败,回调函数 |
|
|
|
} |
|
|
|
}); |
|
|
|
}*/ |
|
|
|
} |
|
|
|
function queryEnterpriseSortAnalysis(qorm, year, quarter, month, month) { |
|
|
|
$.ajax({ |
|
|
|
url: prefix + '/enterpriseSortAnalysis', //后台url |
|
|
|
@ -216,9 +256,9 @@ |
|
|
|
type: "GET", |
|
|
|
dataType: 'json', |
|
|
|
success: function (data) { //成功,回调函数 |
|
|
|
console.log("==========") |
|
|
|
console.log(data) |
|
|
|
console.log("==========") |
|
|
|
console.log("=========="); |
|
|
|
console.log(data); |
|
|
|
console.log("=========="); |
|
|
|
var dates = []; |
|
|
|
for (var i=0; i<data.data.dates.length; i++) { |
|
|
|
dates.push(data.data.dates[i]); |
|
|
|
@ -234,7 +274,7 @@ |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function queryEnterpriseAnalysis(obj) { |
|
|
|
/* function queryEnterpriseAnalysis(obj) { |
|
|
|
console.log(obj) |
|
|
|
$.ajax({ |
|
|
|
url: prefix + '/enterpriseSortAnalysis', //后台url |
|
|
|
@ -258,7 +298,7 @@ |
|
|
|
error: function (er) { //失败,回调函数 |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
function selectDate() { |
|
|
|
@ -270,12 +310,26 @@ |
|
|
|
var quarterValue = quarterElement.options[quarterElement.selectedIndex].value; |
|
|
|
var monthElement = document.getElementById("month"); |
|
|
|
var monthValue = monthElement.options[monthElement.selectedIndex].value; |
|
|
|
|
|
|
|
if(currId == 'con_one_1'){ |
|
|
|
queryCaseAnalysis(qormValue, yearValue, quarterValue, monthValue); |
|
|
|
} |
|
|
|
if(currId == 'con_one_2'){ |
|
|
|
queryEnforcerAnalysis(qormValue, yearValue, quarterValue, monthValue); |
|
|
|
} |
|
|
|
if(currId == 'con_one_3'){ |
|
|
|
queryItemAnalysis(qormValue, yearValue, quarterValue, monthValue); |
|
|
|
// queryEnterpriseAnalysis(qormValue, yearValue, quarterValue, monthValue); |
|
|
|
} |
|
|
|
if(currId == 'con_one_4'){ |
|
|
|
queryEnterpriseAnalysis(qormValue, yearValue, quarterValue, monthValue); |
|
|
|
} |
|
|
|
if(currId == 'con_one_5'){ |
|
|
|
queryEnterpriseSortAnalysis(qormValue, yearValue, quarterValue, monthValue); |
|
|
|
// queryEnterpriseLawFieldAnalysis(qormValue, yearValue, quarterValue, monthValue); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
function queryData() { |
|
|
|
var div = document.getElementById('searchDiv'); |
|
|
|
@ -290,11 +344,11 @@ |
|
|
|
obj[name] = value; |
|
|
|
} |
|
|
|
|
|
|
|
queryEnterpriseAnalysis(obj) |
|
|
|
// queryEnterpriseAnalysis(obj) |
|
|
|
} |
|
|
|
|
|
|
|
function caseAnalysis(dataList) { |
|
|
|
console.log(dataList) |
|
|
|
console.log(dataList); |
|
|
|
var arr = []; |
|
|
|
var arrName = []; |
|
|
|
var total = 0; |
|
|
|
@ -321,6 +375,10 @@ |
|
|
|
echartUtil.dataPercent = arrPercent; |
|
|
|
echartUtil.dataSum = new Array(arrName.length).fill(100); |
|
|
|
echartUtil.initSchedule("echartLine"); |
|
|
|
var myChart = echarts.init(document.getElementById("echartLine")); |
|
|
|
window.addEventListener("resize", function () { |
|
|
|
myChart.resize(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function bar_across(targetId, names, values) { |
|
|
|
@ -346,7 +404,9 @@ |
|
|
|
// 使用刚指定的配置项和数据显示图表。 |
|
|
|
myChart.setOption(option); |
|
|
|
myChart.resize(); |
|
|
|
window.addEventListener('resize', () => { myChart.resize(); }); |
|
|
|
window.addEventListener("resize", function () { |
|
|
|
myChart.resize(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function pie_rose(targetId, datas) { |
|
|
|
@ -362,7 +422,7 @@ |
|
|
|
calculable : true, |
|
|
|
series : [ |
|
|
|
{ |
|
|
|
name:'面积模式', |
|
|
|
name:'统计数据', |
|
|
|
type:'pie', |
|
|
|
roseType : 'area', |
|
|
|
data: datas |
|
|
|
@ -372,7 +432,9 @@ |
|
|
|
// 使用刚指定的配置项和数据显示图表。 |
|
|
|
myChart.setOption(option); |
|
|
|
myChart.resize(); |
|
|
|
window.addEventListener('resize', () => { myChart.resize(); }); |
|
|
|
window.addEventListener("resize", function () { |
|
|
|
myChart.resize(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function line_across(targetId, dates, nums) { |
|
|
|
@ -384,8 +446,12 @@ |
|
|
|
}; |
|
|
|
// 使用刚指定的配置项和数据显示图表。 |
|
|
|
myChart.setOption(option); |
|
|
|
// myChart.resize(); |
|
|
|
// window.addEventListener('resize', () => { myChart.resize(); }); |
|
|
|
myChart.resize(); |
|
|
|
window.addEventListener('resize', () => { myChart.resize(); }); |
|
|
|
// window.addEventListener("resize", function () { |
|
|
|
// myChart.resize(); |
|
|
|
// }); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|