|
@@ -4,12 +4,20 @@
|
|
|
<!-- 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: 999; 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 +34,29 @@
|
|
|
<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 +68,28 @@
|
|
|
</div>
|
|
|
<div class="column">
|
|
|
<div class="panel currentUsage" style="height: 100%">
|
|
|
- <div class="filterSec">
|
|
|
- <select name="" id="">
|
|
|
+ <div class="filterSec">
|
|
|
+ <!-- <select name="" id="">
|
|
|
<option value="11">日</option>
|
|
|
<option value="22">月</option>
|
|
|
- </select>
|
|
|
+ </select> -->
|
|
|
+ <el-date-picker
|
|
|
+ v-model="value1"
|
|
|
+ type="datetimerange"
|
|
|
+ range-separator="~"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
</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 +102,106 @@ 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 {
|
|
|
+ value1:[new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
|
|
|
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;
|
|
|
+ this.initMap();
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
Overview() {
|
|
|
// this.$router.push({ path: "/Overview" }); //, query: { title: title }
|
|
|
},
|
|
@@ -111,110 +214,97 @@ export default {
|
|
|
// features: [] //清空背景道路等
|
|
|
});
|
|
|
this.initMapUi();
|
|
|
- this.addMarker(
|
|
|
- [
|
|
|
- {
|
|
|
- address: "东川路2988号富康东川木业有限公司3车间西南角",
|
|
|
- detachmentName: "闵行区消防救援支队",
|
|
|
- dutyPerson: null,
|
|
|
- getWaterType: "市政",
|
|
|
- gisBaiDuX: "121.394165",
|
|
|
- gisBaiDuY: "31.011814",
|
|
|
- gisX: "121.382935",
|
|
|
- gisY: "31.00811",
|
|
|
- jurisdictionalAgency: "闵行站",
|
|
|
- phone: "64881840",
|
|
|
- status: "1",
|
|
|
- type: "消火栓",
|
|
|
- waterAdministrative: "单位",
|
|
|
- waterGage: "3.0000",
|
|
|
- waterUnit: "闵行水厂",
|
|
|
- },
|
|
|
- {
|
|
|
- address: "瓶安路1600弄鑫都城宝铭苑34号楼东侧",
|
|
|
- detachmentName: "闵行区消防救援支队",
|
|
|
- dutyPerson: null,
|
|
|
- getWaterType: "市政",
|
|
|
- gisBaiDuX: "121.40705",
|
|
|
- gisBaiDuY: "31.060436",
|
|
|
- gisX: "121.39589",
|
|
|
- gisY: "31.056536",
|
|
|
- jurisdictionalAgency: "光华站",
|
|
|
- phone: "021-64881840",
|
|
|
- status: "1",
|
|
|
- type: "消火栓",
|
|
|
- waterAdministrative: "居民",
|
|
|
- waterGage: "0.3000",
|
|
|
- waterUnit: "闵行自来水公司",
|
|
|
- },
|
|
|
- ],
|
|
|
- "water"
|
|
|
- );
|
|
|
+
|
|
|
+ var con = `<div class="siteModelBox" >
|
|
|
+ <h2>
|
|
|
+ {siteName}
|
|
|
+ </h2>
|
|
|
+ <div >
|
|
|
+ <div class="siteDetailInfo" >
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>站点状态:</span>
|
|
|
+ <p>----</p >
|
|
|
+ </div>
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>设备总数:</span>
|
|
|
+ <p>----</p >
|
|
|
+ </div>
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>告警数:</span>
|
|
|
+ <p>---</p >
|
|
|
+ </div>
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>监控类型:</span>
|
|
|
+ <p>电力、视频</p >
|
|
|
+ </div>
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>电话:</span>
|
|
|
+ <p>{phone}</p >
|
|
|
+ </div>
|
|
|
+ <div class="infoLine">
|
|
|
+ <span>地址:</span>
|
|
|
+ <p>{siteAddress}</p >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>`;
|
|
|
+ var dataList =this.siteList;
|
|
|
+
|
|
|
+ dataList.forEach(function (item) {
|
|
|
+ let conNew = con;
|
|
|
+ // console.log(item.siteAddress);
|
|
|
+ conNew = conNew.replace(/{siteAddress}/g, item.siteAddress);
|
|
|
+ conNew = conNew.replace(/{phone}/g, item.phone);
|
|
|
+ conNew = conNew.replace(/{siteName}/g, item.siteName);
|
|
|
+ item.content = conNew;
|
|
|
+ });
|
|
|
+
|
|
|
+ this.addMarker(dataList, "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,
|
|
|
+ position: new AMap.LngLat(val.longitude, val.latitude),
|
|
|
zIndex: 9,
|
|
|
extData: {
|
|
|
id: ind + 1,
|
|
|
},
|
|
|
});
|
|
|
marker.on("click", async () => {
|
|
|
- console.log([val.gisX, val.gisY], null, val);
|
|
|
- await this.addMarkerInfo([val.gisX, val.gisY], null, val);
|
|
|
- // console.log(222);
|
|
|
+
|
|
|
+ // console.log([val.latitude, val.longitude], null, val);
|
|
|
+ await this.addMarkerInfo(
|
|
|
+ [val.longitude, val.latitude],
|
|
|
+ val.content,
|
|
|
+ val
|
|
|
+ );
|
|
|
});
|
|
|
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({
|
|
|
isCustom: true, //使用自定义窗体
|
|
|
closeWhenClickMap: true,
|
|
|
- content:
|
|
|
- content ||
|
|
|
- `
|
|
|
- <div class="tableTooltip mapTab" >
|
|
|
- <div class="tableTitle">
|
|
|
- <div>${"测试站点1"}</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>`,
|
|
|
+ content: content,
|
|
|
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({
|
|
@@ -242,7 +332,7 @@ export default {
|
|
|
infoWindow.setContent(
|
|
|
"POI信息: <pre>" + JSON.stringify(info, null, 2) + "</pre>"
|
|
|
);
|
|
|
- infoWindow.open(this.map, marker.getPosition());
|
|
|
+ // infoWindow.open(this.map, marker.getPosition());
|
|
|
|
|
|
this.map.setCenter(marker.getPosition());
|
|
|
});
|
|
@@ -252,15 +342,11 @@ 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 +358,37 @@ 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 */
|
|
|
- }
|
|
|
-}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
</style>
|