|
@@ -16,7 +16,9 @@
|
|
</div>
|
|
</div>
|
|
<div class="left-content">
|
|
<div class="left-content">
|
|
<dv-border-box-13>
|
|
<dv-border-box-13>
|
|
- <Border-Item title="设备型号总览"><Left-Chart-1 /></Border-Item>
|
|
|
|
|
|
+ <Border-Item title="设备型号总览"
|
|
|
|
+ ><Left-Chart-1 v-if="deviceTypeflag" :datalist="deviceTypeList"
|
|
|
|
+ /></Border-Item>
|
|
</dv-border-box-13>
|
|
</dv-border-box-13>
|
|
</div>
|
|
</div>
|
|
<div class="left-under">
|
|
<div class="left-under">
|
|
@@ -81,7 +83,6 @@ import LeftChart2 from "./LeftChart2";
|
|
import LeftChartUnder from "./LeftChartUnder";
|
|
import LeftChartUnder from "./LeftChartUnder";
|
|
import equMap from "./Maps";
|
|
import equMap from "./Maps";
|
|
|
|
|
|
-
|
|
|
|
import BorderItem from "./BottomCharts";
|
|
import BorderItem from "./BottomCharts";
|
|
import aaa from "./aaa";
|
|
import aaa from "./aaa";
|
|
import bbb from "./bbb";
|
|
import bbb from "./bbb";
|
|
@@ -89,7 +90,17 @@ import bbb from "./bbb";
|
|
import RightBottom from "./RightBottom";
|
|
import RightBottom from "./RightBottom";
|
|
import MiddleChart from "./MiddleChart";
|
|
import MiddleChart from "./MiddleChart";
|
|
|
|
|
|
-import { deviceView,userAgeAll,count,deviceOver,alarmStatusList,addDevice,addUser } from "@/api/system/equdata";
|
|
|
|
|
|
+import {
|
|
|
|
+ deviceView,
|
|
|
|
+ userAgeAll,
|
|
|
|
+ count,
|
|
|
|
+ deviceOver,
|
|
|
|
+ alarmStatusList,
|
|
|
|
+ addDevice,
|
|
|
|
+ addUser,
|
|
|
|
+ mapGpsView,
|
|
|
|
+ deviceType,
|
|
|
|
+} from "@/api/system/equdata";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "DataView",
|
|
name: "DataView",
|
|
@@ -110,48 +121,82 @@ export default {
|
|
mapLoading: false,
|
|
mapLoading: false,
|
|
equTotalData: {},
|
|
equTotalData: {},
|
|
equDataFlag: false,
|
|
equDataFlag: false,
|
|
- userAgeFlag:false,
|
|
|
|
- userTotalFlag:false,
|
|
|
|
- userDataFlag:false,
|
|
|
|
- alarmListFlag:false,
|
|
|
|
- xylistFlag:false,
|
|
|
|
- xyUserFlag:false,
|
|
|
|
- userAgeList:[],
|
|
|
|
- alarmList:[],
|
|
|
|
- xDataList:[],
|
|
|
|
- yDataList:[],
|
|
|
|
- xUserList:[],
|
|
|
|
- yUserList:[],
|
|
|
|
- userTotalData:0,
|
|
|
|
|
|
+ userAgeFlag: false,
|
|
|
|
+ userTotalFlag: false,
|
|
|
|
+ userDataFlag: false,
|
|
|
|
+ alarmListFlag: false,
|
|
|
|
+ xylistFlag: false,
|
|
|
|
+ xyUserFlag: false,
|
|
|
|
+ deviceTypeflag: false,
|
|
|
|
+ userAgeList: [],
|
|
|
|
+ alarmList: [],
|
|
|
|
+ xDataList: [],
|
|
|
|
+ yDataList: [],
|
|
|
|
+ xUserList: [],
|
|
|
|
+ yUserList: [],
|
|
|
|
+ userTotalData: 0,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.deviceView();
|
|
this.deviceView();
|
|
this.userAgeAll();
|
|
this.userAgeAll();
|
|
- this.userTotal()
|
|
|
|
- this.getUserData()
|
|
|
|
- this.getAlarmStatusList()
|
|
|
|
|
|
+ this.userTotal();
|
|
|
|
+ this.getUserData();
|
|
|
|
+ this.getAlarmStatusList();
|
|
this.getEquData();
|
|
this.getEquData();
|
|
- this.getAddUser()
|
|
|
|
|
|
+ this.getAddUser();
|
|
|
|
+ this.getDeviceType();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- getAddUser(){
|
|
|
|
- addUser().then(res=>{
|
|
|
|
- let xlist=res.data.map(item=>item.month)
|
|
|
|
- let ylist=res.data.map(item=>item.count)
|
|
|
|
- this.xUserList=xlist
|
|
|
|
- this.yUserList=ylist
|
|
|
|
- this.xyUserFlag=true
|
|
|
|
- })
|
|
|
|
|
|
+ toggleFullscreen() {
|
|
|
|
+ if (this.isFullscreen) {
|
|
|
|
+ // 退出全屏模式
|
|
|
|
+ if (document.exitFullscreen) {
|
|
|
|
+ document.exitFullscreen();
|
|
|
|
+ } else if (document.mozCancelFullScreen) {
|
|
|
|
+ document.mozCancelFullScreen();
|
|
|
|
+ } else if (document.webkitExitFullscreen) {
|
|
|
|
+ document.webkitExitFullscreen();
|
|
|
|
+ }
|
|
|
|
+ this.isFullscreen = false;
|
|
|
|
+ } else {
|
|
|
|
+ // 进入全屏模式
|
|
|
|
+ const content = document.querySelector("#data-view-container");
|
|
|
|
+ // console.log(content,888);
|
|
|
|
+ // return
|
|
|
|
+ if (content.requestFullscreen) {
|
|
|
|
+ content.requestFullscreen();
|
|
|
|
+ } else if (content.mozRequestFullScreen) {
|
|
|
|
+ content.mozRequestFullScreen();
|
|
|
|
+ } else if (content.webkitRequestFullscreen) {
|
|
|
|
+ content.webkitRequestFullscreen();
|
|
|
|
+ }
|
|
|
|
+ this.isFullscreen = true;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getDeviceType() {
|
|
|
|
+ deviceType().then((res) => {
|
|
|
|
+ this.deviceTypeList = res.data.list;
|
|
|
|
+ this.deviceTypeflag = true;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getAddUser() {
|
|
|
|
+ addUser().then((res) => {
|
|
|
|
+ let xlist = res.data.map((item) => item.month);
|
|
|
|
+ let ylist = res.data.map((item) => item.count);
|
|
|
|
+ this.xUserList = xlist;
|
|
|
|
+ this.yUserList = ylist;
|
|
|
|
+ this.xyUserFlag = true;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
getEquData() {
|
|
getEquData() {
|
|
- addDevice().then(res=>{
|
|
|
|
- let xlist=res.data.map(item=>item.month)
|
|
|
|
- let ylist=res.data.map(item=>item.count)
|
|
|
|
- this.xDataList=xlist
|
|
|
|
- this.yDataList=ylist
|
|
|
|
- this.xylistFlag=true
|
|
|
|
- })
|
|
|
|
|
|
+ addDevice().then((res) => {
|
|
|
|
+ let xlist = res.data.map((item) => item.month);
|
|
|
|
+ let ylist = res.data.map((item) => item.count);
|
|
|
|
+ this.xDataList = xlist;
|
|
|
|
+ this.yDataList = ylist;
|
|
|
|
+ this.xylistFlag = true;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
deviceView() {
|
|
deviceView() {
|
|
deviceView().then((res) => {
|
|
deviceView().then((res) => {
|
|
@@ -159,29 +204,38 @@ export default {
|
|
this.equDataFlag = true;
|
|
this.equDataFlag = true;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- userTotal(){
|
|
|
|
|
|
+ userTotal() {
|
|
count().then((res) => {
|
|
count().then((res) => {
|
|
- this.userTotalData=res.data
|
|
|
|
- this.userTotalFlag=true
|
|
|
|
|
|
+ this.userTotalData = res.data;
|
|
|
|
+ this.userTotalFlag = true;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- getUserData(){
|
|
|
|
- deviceOver().then(res=>{
|
|
|
|
- this.userData=res.data
|
|
|
|
- this.userDataFlag=true
|
|
|
|
- })
|
|
|
|
|
|
+ getUserData() {
|
|
|
|
+ deviceOver().then((res) => {
|
|
|
|
+ this.userData = res.data;
|
|
|
|
+ this.userDataFlag = true;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- userAgeAll(){
|
|
|
|
- userAgeAll().then(res=>{
|
|
|
|
- this.userAgeList=res.data.list
|
|
|
|
- this.userAgeFlag=true
|
|
|
|
- })
|
|
|
|
|
|
+ userAgeAll() {
|
|
|
|
+ userAgeAll().then((res) => {
|
|
|
|
+ this.userAgeList = res.data.list;
|
|
|
|
+ this.userAgeFlag = true;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- getAlarmStatusList(){
|
|
|
|
- alarmStatusList().then(res=>{
|
|
|
|
- this.alarmList=res.data
|
|
|
|
- this.alarmListFlag=true
|
|
|
|
- })
|
|
|
|
|
|
+ getAlarmStatusList() {
|
|
|
|
+ alarmStatusList().then((res) => {
|
|
|
|
+ this.alarmList = res.data.map((item) => {
|
|
|
|
+ let hideName = "";
|
|
|
|
+ if (item.name.length >= 2) {
|
|
|
|
+ hideName = item.name[0] + "*" + item.name.substring(2);
|
|
|
|
+ }
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ name: hideName,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ this.alarmListFlag = true;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
initMap(AMap) {
|
|
initMap(AMap) {
|
|
this.AMap = AMap;
|
|
this.AMap = AMap;
|
|
@@ -190,14 +244,62 @@ export default {
|
|
// viewMode: "3D", // 是否为3D地图模式
|
|
// viewMode: "3D", // 是否为3D地图模式
|
|
zoom: 3.85, // 初始化地图级别
|
|
zoom: 3.85, // 初始化地图级别
|
|
center: [101.835078, 42.90488], // 初始化地图中心点位置
|
|
center: [101.835078, 42.90488], // 初始化地图中心点位置
|
|
|
|
+ mapStyle: "amap://styles/darkblue", //地图样式
|
|
|
|
+ });
|
|
|
|
+ var cluster;
|
|
|
|
+ const gridSize = 60;
|
|
|
|
+ // 数据中需包含经纬度信息字段 lnglat
|
|
|
|
+ var points = [
|
|
|
|
+ // { lnglat: ["116.86846822500229", "33.904682432073166"] },
|
|
|
|
+ // { lnglat: ["116.85693472623825", "33.88754011287255"] },
|
|
|
|
+ // { lnglat: ["116.85693472623825", "33.88754011287255"] },
|
|
|
|
+ // { lnglat: ["116.85668259859085", "33.88756039064183"] },
|
|
|
|
+ // { lnglat: ["116.8569615483284", "33.887618689228496"] },
|
|
|
|
+ // { lnglat: ["116.85713320970535", "33.887466605958934"] },
|
|
|
|
+ // { lnglat: ["116.85698837041855", "33.88756546008415"] },
|
|
|
|
+ // { lnglat: ["116.85688644647598", "33.88763389755545"] },
|
|
|
|
+ // { lnglat: ["108.7104383111", "34.03344626696758"] },
|
|
|
|
+ // { lnglat: ["108.70837301015854", "34.03073918476941"] },
|
|
|
|
+ // { lnglat: ["108.70164602994919", "34.00430204307751"] },
|
|
|
|
+ // { lnglat: ["108.70918840169907", "34.02465331926583"] },
|
|
|
|
+ // { lnglat: ["108.70991796255112", "34.02430859718817"] },
|
|
|
|
+ // { lnglat: ["108.70207518339157", "34.00304228666131"] },
|
|
|
|
+ // { lnglat: ["108.70090574026108", "34.00421586255809"] },
|
|
|
|
+ // { lnglat: ["108.70879143476486", "34.0323538021479"] },
|
|
|
|
+ ];
|
|
|
|
+ mapGpsView().then((res) => {
|
|
|
|
+ points = res.data;
|
|
|
|
+ if (cluster) {
|
|
|
|
+ cluster.setMap(null);
|
|
|
|
+ }
|
|
|
|
+ //默认样式
|
|
|
|
+ cluster = new AMap.MarkerCluster(this.map, points, {
|
|
|
|
+ gridSize: gridSize,
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
+
|
|
// this.mapLoading = false;
|
|
// this.mapLoading = false;
|
|
// this.secherPlace(AMap);
|
|
// this.secherPlace(AMap);
|
|
// this.districtSearch(AMap);
|
|
// this.districtSearch(AMap);
|
|
// this.ruler(AMap);
|
|
// this.ruler(AMap);
|
|
- this.mapZoomChange();
|
|
|
|
- this.aaa();
|
|
|
|
|
|
+ // this.mapZoomChange();
|
|
|
|
+ // this.aaa();
|
|
},
|
|
},
|
|
|
|
+ // initMap(AMap) {
|
|
|
|
+ // this.AMap = AMap;
|
|
|
|
+ // this.map = new AMap.Map("map", {
|
|
|
|
+ // resizeEnable: true,
|
|
|
|
+ // // viewMode: "3D", // 是否为3D地图模式
|
|
|
|
+ // zoom: 3.85, // 初始化地图级别
|
|
|
|
+ // center: [101.835078, 42.90488], // 初始化地图中心点位置
|
|
|
|
+ // });
|
|
|
|
+ // // this.mapLoading = false;
|
|
|
|
+ // // this.secherPlace(AMap);
|
|
|
|
+ // // this.districtSearch(AMap);
|
|
|
|
+ // // this.ruler(AMap);
|
|
|
|
+ // this.mapZoomChange();
|
|
|
|
+ // this.aaa();
|
|
|
|
+ // },
|
|
// 索引点聚合
|
|
// 索引点聚合
|
|
// drawCluster(isCheck, isCheck2) {
|
|
// drawCluster(isCheck, isCheck2) {
|
|
// // console.log(this.$refs.tree.getCheckedKeys(true));
|
|
// // console.log(this.$refs.tree.getCheckedKeys(true));
|