|
@@ -4,12 +4,16 @@
|
|
|
<!-- topBox start -->
|
|
|
<div class="topBox">
|
|
|
<div class="column statisSec">
|
|
|
- <statis-top></statis-top>
|
|
|
+ <statis-top :falarmCount="alarmCount" :fpersonalCount="personalCount" :fsiteCount="siteCount"></statis-top>
|
|
|
<statis-bottom></statis-bottom>
|
|
|
</div>
|
|
|
<div class="column mapBox">
|
|
|
- <div class="map panel" id="mapF" style="height:100%;z-index:999999999999;width:100%">
|
|
|
- <map-static-top></map-static-top>
|
|
|
+ <div
|
|
|
+ class="map panel"
|
|
|
+ id="mapF"
|
|
|
+ style="height: 100%; z-index: 999999999999; width: 100%"
|
|
|
+ >
|
|
|
+ <map-static-top :fsiteCount="siteCount"></map-static-top>
|
|
|
<div id="pickerBox">
|
|
|
<input id="pickerInput" placeholder="输入关键字选取地点" />
|
|
|
<i class="el-icon-search"></i>
|
|
@@ -26,24 +30,23 @@
|
|
|
<option value="4">月</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
- <pie-chart></pie-chart>
|
|
|
+ <pie-chart :fdeviceTypeCount="deviceTypeCount" v-if="this.deviceTypeCount.normalCount"></pie-chart>
|
|
|
<div class="panel-footer"></div>
|
|
|
</div>
|
|
|
<div class="panel line1 operStatus">
|
|
|
- <triangle-chart></triangle-chart>
|
|
|
+ <triangle-chart :frtAnalogData="rtAnalogData" v-if="this.rtAnalogData.heavyLoad"></triangle-chart>
|
|
|
<!-- <div class="chart"></div> -->
|
|
|
<div class="panel-footer"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- topBox end -->
|
|
|
-
|
|
|
+ <!-- topBox end -->
|
|
|
|
|
|
<!-- bottomBox start -->
|
|
|
<div class="bottomBox">
|
|
|
<div class="column">
|
|
|
<div class="panel currentUsage" style="height: 100%">
|
|
|
- <div class="filterSec">
|
|
|
+ <div class="filterSec">
|
|
|
<select name="" id="">
|
|
|
<option value="1">当日用量趋势</option>
|
|
|
<option value="2">当月用量趋势</option>
|
|
@@ -55,19 +58,18 @@
|
|
|
</div>
|
|
|
<div class="column">
|
|
|
<div class="panel currentUsage" style="height: 100%">
|
|
|
- <div class="filterSec">
|
|
|
+ <div class="filterSec">
|
|
|
<select name="" id="">
|
|
|
<option value="11">日</option>
|
|
|
<option value="22">月</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
- <line-chart></line-chart>
|
|
|
+ <line-chart :ftrendIcoCount="trendIcoCount" v-if="this.trendIcoCount[0]"></line-chart>
|
|
|
<div class="panel-footer"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- bottomBox end -->
|
|
|
-
|
|
|
</section>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -80,25 +82,100 @@ import lineChart from "./components/lineChart";
|
|
|
import mapStaticTop from "./components/mapStaticTop";
|
|
|
import triangleChart from "./components/triangleChart";
|
|
|
|
|
|
-
|
|
|
// 地图
|
|
|
import AMap from "AMap";
|
|
|
import AMapUI from "AMapUI";
|
|
|
|
|
|
+import api from "../../api/home/home.js";
|
|
|
|
|
|
export default {
|
|
|
name: "index",
|
|
|
- components: { statisTop, statisBottom, pieChart, barChart, lineChart ,mapStaticTop,triangleChart},
|
|
|
+ components: {
|
|
|
+ statisTop,
|
|
|
+ statisBottom,
|
|
|
+ pieChart,
|
|
|
+ barChart,
|
|
|
+ lineChart,
|
|
|
+ mapStaticTop,
|
|
|
+ triangleChart,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
map: null,
|
|
|
+ alarmCount:{},
|
|
|
+ personalCount:{},
|
|
|
+ siteCount:{},
|
|
|
+ deviceTypeCount:{},
|
|
|
+ trendIcoCount:[],
|
|
|
+ rtAnalogData:{}
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
this.initMap();
|
|
|
+ this.alarmCount_api();
|
|
|
+ this.personalCount_api();
|
|
|
+ this.siteCount_api();
|
|
|
+ this.deviceTypeCount_api()
|
|
|
+ this.trendIcoCount_api();
|
|
|
+ this.rtAnalogData_api();
|
|
|
+ // this.siteList_api();
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
+ //告警总数数据对接
|
|
|
+ alarmCount_api() {
|
|
|
+ api.alarmCount_api().then((requset) => {
|
|
|
+ this.alarmCount=requset.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //运维人员
|
|
|
+ personalCount_api() {
|
|
|
+ api.personalCount_api().then((requset) => {
|
|
|
+ this.personalCount=requset.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //站点总数
|
|
|
+ siteCount_api() {
|
|
|
+ api.siteCount_api().then((requset) => {
|
|
|
+ this.siteCount=requset.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ //设备数量echarts饼图
|
|
|
+ deviceTypeCount_api() {
|
|
|
+ api.deviceTypeCount_api({startTime:'2021-6-12 00:00:00',endTime:'2021-7-16 00:00:00',}).then((requset) => {
|
|
|
+ this.deviceTypeCount=requset.data;
|
|
|
+ // console.log(this.deviceTypeCount)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //故障抢修echarts折线图
|
|
|
+ trendIcoCount_api() {
|
|
|
+ api.trendIco_api({startTime:'2021-6-12 00:00:00',endTime:'2021-7-16 00:00:00'}).then((requset) => {
|
|
|
+ this.trendIcoCount=requset.data;
|
|
|
+ // console.log(this.trendIcoCount)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //重载运行echarts锥形图
|
|
|
+ rtAnalogData_api() {
|
|
|
+ api.rtAnalogData_api().then((requset) => {
|
|
|
+ this.rtAnalogData=requset.data;
|
|
|
+ console.log(this.rtAnalogData)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //地图撒点
|
|
|
+ siteList_api() {
|
|
|
+ api.siteList_api().then((requset) => {
|
|
|
+ this.siteList=requset.data;
|
|
|
+ console.log(this.siteList)
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Overview() {
|
|
|
// this.$router.push({ path: "/Overview" }); //, query: { title: title }
|
|
|
},
|
|
@@ -111,6 +188,8 @@ export default {
|
|
|
// features: [] //清空背景道路等
|
|
|
});
|
|
|
this.initMapUi();
|
|
|
+
|
|
|
+
|
|
|
this.addMarker(
|
|
|
[
|
|
|
{
|
|
@@ -151,42 +230,34 @@ export default {
|
|
|
"water"
|
|
|
);
|
|
|
},
|
|
|
- addMarker(lnglats, type = "") {
|
|
|
+
|
|
|
+
|
|
|
+ addMarker(lnglats) {
|
|
|
// 创建标点和点击事件
|
|
|
// let icon = "";
|
|
|
let markers = lnglats.map((val, ind) => {
|
|
|
- if (type === "water") {
|
|
|
- // icon =
|
|
|
- // val.waterAdministrative === "单位"
|
|
|
- // ? "http://120.55.70.156/image/unitWater.png"
|
|
|
- // : val.waterAdministrative === "市政"
|
|
|
- // ? "http://120.55.70.156/image/szWater.png"
|
|
|
- // : val.waterAdministrative === "社区" ||
|
|
|
- // val.waterAdministrative === "居民"
|
|
|
- // ? "http://120.55.70.156/image/sqWater.png"
|
|
|
- // : "";
|
|
|
- }
|
|
|
let marker = new AMap.Marker({
|
|
|
position: new AMap.LngLat(val.gisX, val.gisY),
|
|
|
- // icon: icon,
|
|
|
zIndex: 9,
|
|
|
extData: {
|
|
|
id: ind + 1,
|
|
|
},
|
|
|
});
|
|
|
marker.on("click", async () => {
|
|
|
- console.log([val.gisX, val.gisY], null, val);
|
|
|
+ // console.log([val.gisX, val.gisY], null, val);
|
|
|
await this.addMarkerInfo([val.gisX, val.gisY], null, val);
|
|
|
- // console.log(222);
|
|
|
});
|
|
|
return marker;
|
|
|
});
|
|
|
this.map.add(new AMap.OverlayGroup(markers));
|
|
|
this.map.setFitView(); // 根据所有点自适应
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
// 添加标点
|
|
|
addMarkerInfo(position, content, value = "") {
|
|
|
// this.map.getIsOpen();
|
|
|
+ // console.log('value');
|
|
|
console.log(value);
|
|
|
this.map.clearInfoWindow();
|
|
|
var infoWindow = new AMap.InfoWindow({
|
|
@@ -195,26 +266,53 @@ export default {
|
|
|
content:
|
|
|
content ||
|
|
|
`
|
|
|
- <div class="tableTooltip mapTab" >
|
|
|
- <div class="tableTitle">
|
|
|
- <div>${"测试站点1"}</div>
|
|
|
+ <div class="siteModelBox" >
|
|
|
+ <h2>
|
|
|
+ 站点信息
|
|
|
+ </h2>
|
|
|
+ <div v-for="item in addMarker" :key="item.id>
|
|
|
+
|
|
|
+ <div class="siteDetailInfo" >
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>站点名称:</span>
|
|
|
+ <p>培训测试</p>
|
|
|
+ </div>
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>站点地址:</span>
|
|
|
+ <p>上海市青浦区徐乐路208号</p>
|
|
|
+ </div>
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>投运时间:</span>
|
|
|
+ <p>2021-06-30</p>
|
|
|
+ </div>
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>监控类型:</span>
|
|
|
+ <p>电力、视频</p>
|
|
|
+ </div>
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>联系人:</span>
|
|
|
+ <p>张三</p>
|
|
|
+ </div>
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>联系电话:</span>
|
|
|
+ <p>13999999999</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
- <el-row class="tableContent">
|
|
|
- <div><a>站点状态:</a>${"正常"}</div>
|
|
|
- <div><a>设备总数:</a>${"5"}</div>
|
|
|
- <div><a>告警数:</a>${"3"}</div>
|
|
|
- <div><a>监控类型:</a>${"电力,视频"}</div>
|
|
|
- <div><a> 电话:</a>${"18888888888"}</div>
|
|
|
- <div><a> 地址:</a>${"XX路135弄"}</div>
|
|
|
- <bottom onclick="${this.Overview()}">11111</bottom>
|
|
|
- </el-row>
|
|
|
+
|
|
|
</div>`,
|
|
|
offset: new AMap.Pixel(16, -30),
|
|
|
});
|
|
|
infoWindow.open(this.map, position);
|
|
|
},
|
|
|
poiPickerReady(poiPicker) {
|
|
|
- console.log(poiPicker);
|
|
|
+ // console.log(poiPicker);
|
|
|
var marker = new AMap.Marker();
|
|
|
|
|
|
var infoWindow = new AMap.InfoWindow({
|
|
@@ -252,15 +350,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
initMapUi() {
|
|
|
- console.log(22);
|
|
|
AMapUI.load(["ui/misc/PoiPicker"], (PoiPicker) => {
|
|
|
- console.log(PoiPicker);
|
|
|
+ // console.log(PoiPicker);
|
|
|
let poiPickers = new PoiPicker({
|
|
|
- //city:'北京',
|
|
|
input: "pickerInput",
|
|
|
});
|
|
|
|
|
|
- //初始化poiPicker
|
|
|
this.poiPickerReady(poiPickers);
|
|
|
});
|
|
|
},
|
|
@@ -272,98 +367,95 @@ export default {
|
|
|
#pickerBox {
|
|
|
position: absolute;
|
|
|
z-index: 9999;
|
|
|
- top:.15rem;
|
|
|
- right:.15rem;
|
|
|
- width: 3rem;
|
|
|
- height:.425rem;
|
|
|
- font-size:.15rem
|
|
|
-
|
|
|
+ top: 0.15rem;
|
|
|
+ right: 0.15rem;
|
|
|
+ width: 3rem;
|
|
|
+ height: 0.425rem;
|
|
|
+ font-size: 0.15rem;
|
|
|
}
|
|
|
- .el-icon-search{
|
|
|
+.el-icon-search {
|
|
|
position: absolute;
|
|
|
- right: .1375rem;
|
|
|
- top: .1rem;
|
|
|
- font-size: .2125rem;color: #00f4fd
|
|
|
+ right: 0.1375rem;
|
|
|
+ top: 0.1rem;
|
|
|
+ font-size: 0.2125rem;
|
|
|
+ color: #00f4fd;
|
|
|
}
|
|
|
|
|
|
#pickerInput {
|
|
|
width: 3rem;
|
|
|
- line-height:.425rem;
|
|
|
- padding:0 .125rem;
|
|
|
- outline:none;
|
|
|
+ line-height: 0.425rem;
|
|
|
+ padding: 0 0.125rem;
|
|
|
+ outline: none;
|
|
|
border: 1px solid #00f4fd;
|
|
|
-border-radius: 18px;
|
|
|
-background:rgba(0,0,0,0);
|
|
|
-color:#fff;
|
|
|
-
|
|
|
+ border-radius: 18px;
|
|
|
+ background: rgba(0, 0, 0, 0);
|
|
|
+ color: #fff;
|
|
|
}
|
|
|
|
|
|
#poiInfo {
|
|
|
background: #fff;
|
|
|
}
|
|
|
/* 地图弹窗 */
|
|
|
-.mapTab {
|
|
|
- background: transparent;
|
|
|
- border-radius: 3%;
|
|
|
- box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
|
|
|
- background: rgba(0, 44, 110, 0.5);
|
|
|
- // box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
|
|
|
- // background: rgba(0, 44, 110, 0.8);
|
|
|
- font-size: 0.2rem;
|
|
|
- padding: 0.1875rem;
|
|
|
- width: 5rem;
|
|
|
- font-size: 0.1875rem;
|
|
|
- font-family: Microsoft YaHei Regular, Microsoft YaHei Regular-Regular;
|
|
|
- width: 3.5rem;
|
|
|
- scrollbar-width: none;
|
|
|
- /* firefox */
|
|
|
- -ms-overflow-style: none;
|
|
|
- /* IE 10+ */
|
|
|
- overflow-x: hidden;
|
|
|
- overflow-y: auto;
|
|
|
- .tableTitle {
|
|
|
- // background: url('~@a/img/comprehensive/title.png');
|
|
|
- background-size: 100% 100%;
|
|
|
- & > div {
|
|
|
- line-height: 0.4rem;
|
|
|
- background-image: linear-gradient(#caf6ff, #56d1ed);
|
|
|
- -webkit-background-clip: text;
|
|
|
- color: transparent;
|
|
|
- -webkit-text-fill-color: transparent;
|
|
|
- font-weight: 900;
|
|
|
- }
|
|
|
- }
|
|
|
- .tableContent {
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- margin-top: 0.125rem;
|
|
|
- div {
|
|
|
- width: 100%;
|
|
|
- padding-right: 0.25rem;
|
|
|
- line-height: 0.275rem;
|
|
|
- box-sizing: border-box;
|
|
|
- // margin: 0.0625rem 0;
|
|
|
- a {
|
|
|
- width: 0.875rem;
|
|
|
- font-size: 0.175rem;
|
|
|
- text-align: right;
|
|
|
- display: inline-block;
|
|
|
- color: #00f4fd;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- }
|
|
|
- .max {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
- .divTitle {
|
|
|
- color: #04f2f4;
|
|
|
- }
|
|
|
- }
|
|
|
- &::-webkit-scrollbar {
|
|
|
- display: none;
|
|
|
- /* Chrome Safari */
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
+// .mapTab {
|
|
|
+// background: transparent;
|
|
|
+// border-radius: 3%;
|
|
|
+// box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
|
|
|
+// background: rgba(0, 44, 110, 0.5);
|
|
|
+// // box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
|
|
|
+// // background: rgba(0, 44, 110, 0.8);
|
|
|
+// font-size: 0.2rem;
|
|
|
+// padding: 0.1875rem;
|
|
|
+// width: 5rem;
|
|
|
+// font-size: 0.1875rem;
|
|
|
+// font-family: Microsoft YaHei Regular, Microsoft YaHei Regular-Regular;
|
|
|
+// width: 3.5rem;
|
|
|
+// scrollbar-width: none;
|
|
|
+// /* firefox */
|
|
|
+// -ms-overflow-style: none;
|
|
|
+// /* IE 10+ */
|
|
|
+// overflow-x: hidden;
|
|
|
+// overflow-y: auto;
|
|
|
+// .tableTitle {
|
|
|
+// // background: url('~@a/img/comprehensive/title.png');
|
|
|
+// background-size: 100% 100%;
|
|
|
+// & > div {
|
|
|
+// line-height: 0.4rem;
|
|
|
+// background-image: linear-gradient(#caf6ff, #56d1ed);
|
|
|
+// -webkit-background-clip: text;
|
|
|
+// color: transparent;
|
|
|
+// -webkit-text-fill-color: transparent;
|
|
|
+// font-weight: 900;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// .tableContent {
|
|
|
+// display: flex;
|
|
|
+// flex-wrap: wrap;
|
|
|
+// margin-top: 0.125rem;
|
|
|
+// div {
|
|
|
+// width: 100%;
|
|
|
+// padding-right: 0.25rem;
|
|
|
+// line-height: 0.275rem;
|
|
|
+// box-sizing: border-box;
|
|
|
+// // margin: 0.0625rem 0;
|
|
|
+// a {
|
|
|
+// width: 0.875rem;
|
|
|
+// font-size: 0.175rem;
|
|
|
+// text-align: right;
|
|
|
+// display: inline-block;
|
|
|
+// color: #00f4fd;
|
|
|
+// cursor: pointer;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// .max {
|
|
|
+// width: 100%;
|
|
|
+// }
|
|
|
+// .divTitle {
|
|
|
+// color: #04f2f4;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// &::-webkit-scrollbar {
|
|
|
+// display: none;
|
|
|
+// /* Chrome Safari */
|
|
|
+// }
|
|
|
+// }
|
|
|
</style>
|