Merge branch 'test' of http://192.168.0.56:3000/cwchen/ah_jjzhgd_webscreen into test
This commit is contained in:
commit
f1e1ee8e92
|
|
@ -30,10 +30,21 @@ body {
|
|||
#right-box {
|
||||
width: 75.85%;
|
||||
height: 99%;
|
||||
background: url(../../img/alarmMge/alarm.png) no-repeat 0 0 / 100% 100%;
|
||||
background: url(../../img/alarmMge/dataAnalysis.png) no-repeat 0 0 / 100% 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#echarts-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#report-box {
|
||||
width: 35%;
|
||||
height: 90%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#one-echarts {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
@ -61,4 +72,51 @@ body {
|
|||
|
||||
.nocheck {
|
||||
background: url(../../img/alarmMge/dark.png) no-repeat 0 0 / 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#report-box table {
|
||||
width: 96%;
|
||||
height: 100%;
|
||||
margin: 0 2%;
|
||||
table-layout: fixed;
|
||||
text-align: center;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#report-box table tr td {
|
||||
width: 50%;
|
||||
height: 50px;
|
||||
font-size: 16px;
|
||||
border: 1px solid #34b9aa;
|
||||
}
|
||||
#report-box table thead{
|
||||
height: 100px;
|
||||
}
|
||||
#report-box table tbody{
|
||||
height: calc(100% - 100px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar
|
||||
{
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
::-webkit-scrollbar-track-piece
|
||||
{
|
||||
background-color: #0d2225;
|
||||
-webkit-border-radius: 6px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:vertical
|
||||
{
|
||||
height: 5px;
|
||||
background-color: #0d2225;
|
||||
-webkit-border-radius: 6px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:horizontal
|
||||
{
|
||||
width: 5px;
|
||||
background-color: #0d2225;
|
||||
-webkit-border-radius: 6px;
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
|
|
@ -1,5 +1,11 @@
|
|||
let myChart = echarts.init(document.getElementById("one-echarts"));
|
||||
initEcharts();
|
||||
initData();
|
||||
function initData(){
|
||||
const bidCode = parent.$('#bidPro').val();
|
||||
const paramData = 'bidCode=' + bidCode + '&type=' + '1';
|
||||
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
|
||||
loadDataAnalysis(montageParam,1);
|
||||
}
|
||||
|
||||
/* 切换数据 */
|
||||
function changeData(that, type) {
|
||||
|
|
@ -9,17 +15,73 @@ function changeData(that, type) {
|
|||
}
|
||||
});
|
||||
$(that).removeClass("nocheck").addClass("check");
|
||||
if(type !== 10){
|
||||
$('#report-box').css('display','none');
|
||||
$('#echarts-box').css('width','100%');
|
||||
}else{
|
||||
$('#report-box').removeAttr('style');
|
||||
$('#echarts-box').css('width','58%');
|
||||
}
|
||||
myChart.dispose();
|
||||
myChart = echarts.init(document.getElementById("one-echarts"));
|
||||
initEcharts();
|
||||
const bidCode = parent.$('#bidPro').val();
|
||||
const paramData = 'bidCode=' + bidCode + '&type=' + type + '';
|
||||
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
|
||||
loadDataAnalysis(montageParam,type);
|
||||
}
|
||||
|
||||
/* 加载数据分析应用 */
|
||||
function loadDataAnalysis(montageParam,type) {
|
||||
const url = commonUrl + 'screen/largeScreen/dataAnalysis/getDataAnalysisByType?params=' + montageParam;
|
||||
ajaxRequestGet(url, "GET", true, function () {
|
||||
}, function (result) {
|
||||
if (result.code === 200) {
|
||||
setData(result.data);
|
||||
} else if (result.code === 500) {
|
||||
console.error('数据分析应用' + result.msg);
|
||||
} else if (result.code === 401) {
|
||||
loginout(1);
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
errorFn(xhr, status, error)
|
||||
}, aqEnnable);
|
||||
|
||||
/* 项目风险赋值 */
|
||||
function setData(list) {
|
||||
let nameList = [],valueList = [];
|
||||
if(list && list.length > 0){
|
||||
$.each(list,function(index,item){
|
||||
nameList.push(item.name);
|
||||
valueList.push({value:item.num,name:item.name});
|
||||
})
|
||||
}
|
||||
initEcharts(nameList, valueList);
|
||||
if(type === 10){
|
||||
setReportTable(list);
|
||||
}
|
||||
}
|
||||
// 数据分析报告
|
||||
function setReportTable(list){
|
||||
let html = '';
|
||||
$.each(list,function(index,item){
|
||||
let typeName = item.typeName;
|
||||
let typeNameArr = typeName.split(',');
|
||||
$.each(typeNameArr,function(index2,item2){
|
||||
html += '<tr>';
|
||||
if(index2 === 0){
|
||||
html += '<td rowspan="'+typeNameArr.length+'">' + item.name + '</td>';
|
||||
}
|
||||
html += '<td>' + item2 + '</td>';
|
||||
html += '</tr>';
|
||||
})
|
||||
})
|
||||
$('#report-box table tbody').empty().append(html);
|
||||
}
|
||||
}
|
||||
|
||||
/* 初始化echarts */
|
||||
function initEcharts(nameList, valueList) {
|
||||
let fontSize = "16",
|
||||
fontFamily = "Alibaba PuHuiTi R",
|
||||
fontColor = "#fff";
|
||||
var option = {
|
||||
let option = {
|
||||
grid: {
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
|
|
@ -38,26 +100,27 @@ function initEcharts(nameList, valueList) {
|
|||
show: false,
|
||||
// orient: 'vertical',
|
||||
// left: 'left',
|
||||
data: ["直接访问", "邮件营销", "联盟广告", "视频广告", "搜索引擎"],
|
||||
// data: ["直接访问", "邮件营销", "联盟广告", "视频广告", "搜索引擎"],
|
||||
data: nameList,
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "城市管理(社会治理网格)",
|
||||
name: "数据应用分析",
|
||||
type: "pie",
|
||||
radius: "65%",
|
||||
center: ["50%", "50%"],
|
||||
label: {
|
||||
show: true,
|
||||
|
||||
formatter: "{b} {d}%",
|
||||
},
|
||||
data: [
|
||||
data: valueList,
|
||||
/* data: [
|
||||
{ value: 335, name: "直接访问" },
|
||||
{ value: 310, name: "邮件营销" },
|
||||
{ value: 234, name: "联盟广告" },
|
||||
{ value: 135, name: "视频广告" },
|
||||
{ value: 1548, name: "搜索引擎" },
|
||||
],
|
||||
], */
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,11 +33,32 @@
|
|||
<li class="layout nocheck" onclick="changeData(this,7)">环境监测分析</li>
|
||||
<li class="layout nocheck" onclick="changeData(this,8)">项目管理分析</li>
|
||||
<li class="layout nocheck" onclick="changeData(this,9)">整体效能分析</li>
|
||||
<li class="layout nocheck" onclick="changeData(this,10)">数据分析和报告</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="right-box">
|
||||
<div id="one-echarts"></div>
|
||||
<div id="right-box" class="layout">
|
||||
<div id="echarts-box">
|
||||
<div id="one-echarts"></div>
|
||||
</div>
|
||||
<div id="report-box" style="display: none;">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="2">数据分析报告</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<td>类型</td>
|
||||
<td>名称</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../js/pages/dataAnalysis/dataAnalysis.js" type="text/javascript"></script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue