mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-11 14:17:24 +08:00
加入开门册数
This commit is contained in:
parent
536c54aff1
commit
5d76b0c69d
@ -1,73 +1,81 @@
|
||||
var dom = document.getElementById("box3_right");
|
||||
var myChart = echarts.init(dom);
|
||||
var app = {};
|
||||
option = null;
|
||||
option = {
|
||||
tooltip : {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
backgroundColor: '#6a7985'
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
textStyle:{//图例文字的样式
|
||||
color:'#fff',
|
||||
fontSize:12
|
||||
},
|
||||
data:['门禁开门次数']
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
saveAsImage: {}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
textStyle:{//图例文字的样式
|
||||
color:'#fff',
|
||||
fontSize:12
|
||||
},
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
boundaryGap : false,
|
||||
data : ['周一','周二','周三','周四','周五','周六','周日']
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value'
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'门禁开门次数',
|
||||
type:'line',
|
||||
stack: '总量',
|
||||
areaStyle: {},
|
||||
data:[120, 132, 101, 134, 90, 230, 210]
|
||||
}
|
||||
]
|
||||
};
|
||||
;
|
||||
if (option && typeof option === "object") {
|
||||
myChart.setOption(option, true);
|
||||
}
|
||||
|
||||
function _initOpenDoorChart(_data) {
|
||||
var dom = document.getElementById("box3_right");
|
||||
var myChart = echarts.init(dom);
|
||||
let _createTime = [];
|
||||
let _openDoorCount = [];
|
||||
_data.forEach(item => {
|
||||
_createTime.push(item.createTime);
|
||||
_openDoorCount.push(item.count);
|
||||
});
|
||||
var app = {};
|
||||
option = null;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
backgroundColor: '#6a7985'
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
textStyle: {//图例文字的样式
|
||||
color: '#fff',
|
||||
fontSize: 12
|
||||
},
|
||||
data: ['门禁开门次数']
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
saveAsImage: {}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
textStyle: {//图例文字的样式
|
||||
color: '#fff',
|
||||
fontSize: 12
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: _createTime
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value'
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '门禁开门次数',
|
||||
type: 'line',
|
||||
stack: '总量',
|
||||
areaStyle: {},
|
||||
data: _openDoorCount
|
||||
}
|
||||
]
|
||||
};
|
||||
;
|
||||
if (option && typeof option === "object") {
|
||||
myChart.setOption(option, true);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 查询 资产信息
|
||||
*/
|
||||
function _loadAssets(){
|
||||
function _loadAssets() {
|
||||
let param = {
|
||||
params:{
|
||||
communityId:vc.getCurrentCommunity().communityId
|
||||
params: {
|
||||
communityId: vc.getCurrentCommunity().communityId
|
||||
}
|
||||
}
|
||||
vc.http.apiGet(
|
||||
@ -79,10 +87,10 @@ function _loadAssets(){
|
||||
if (_json.code == 0) {
|
||||
|
||||
let _data = _json.data;
|
||||
document.getElementById("floorCount").innerHTML = _data.floorCount +"栋";
|
||||
document.getElementById("roomCount").innerHTML = _data.roomCount +"个";
|
||||
document.getElementById("parkingSpaceCount").innerHTML = _data.parkingSpaceCount +"个";
|
||||
document.getElementById("machineCount").innerHTML = _data.machineCount +"台";
|
||||
document.getElementById("floorCount").innerHTML = _data.floorCount + "栋";
|
||||
document.getElementById("roomCount").innerHTML = _data.roomCount + "个";
|
||||
document.getElementById("parkingSpaceCount").innerHTML = _data.parkingSpaceCount + "个";
|
||||
document.getElementById("machineCount").innerHTML = _data.machineCount + "台";
|
||||
|
||||
return;
|
||||
}
|
||||
@ -95,4 +103,39 @@ function _loadAssets(){
|
||||
});
|
||||
}
|
||||
|
||||
_loadAssets();
|
||||
|
||||
/**
|
||||
* 查询 资产信息
|
||||
*/
|
||||
function _getAssetOpenDoor() {
|
||||
let param = {
|
||||
params: {
|
||||
communityId: vc.getCurrentCommunity().communityId
|
||||
}
|
||||
}
|
||||
vc.http.apiGet(
|
||||
'/bigScreen/getAssetOpenDoor',
|
||||
param,
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
|
||||
let _data = _json.data;
|
||||
_initOpenDoorChart(_data);
|
||||
|
||||
return;
|
||||
}
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.toast(errInfo);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
_loadAssets();
|
||||
|
||||
_getAssetOpenDoor();
|
||||
Loading…
Reference in New Issue
Block a user