-
-
-
-
项目设备总览
-
-
-
-
-
-
-
{{ XianYou }}
-
-
- 现有设备
-
-
-
-
{{ DaJian }}
-
-
- 搭建设备
-
+
+
+
+
项目设备总览
+
+
+
+
+
+
+
+ {{ XianYou }}
+
+
+
+ 现有设备
+
+
+
+
{{ DaJian }}
+
+
+ 搭建设备
+
+
-
-
-
-
-
项目设备环比增长
+
+
+
+
项目设备环比增长
+
+
-
-
-
-
-
-
站点实时报警
-
-
-
+
+
+
+
站点实时报警
+
+
+
+
+
暂无报警数据
+
+
+
+ {{
+ item.createTime
+ }}
+ {{
+ item.siteName
+ }}
+ {{ item.warnTypeDesc }}
+
+
+
+
+
+
+
-
-
+
暂无报警数据
+
-
+
-->
-
@@ -364,7 +378,7 @@
export default {
name: "previewOfSiteStatus",
components: { countTo }, //加载数字滚动插件
- data: function() {
+ data: function () {
return {
timer: {}, //定时器
// 顶部中间汇总A
@@ -382,8 +396,8 @@
offLine: 0,
offLinePercentage: 0,
total: 0,
- totalPercentage: 0
- }
+ totalPercentage: 0,
+ },
],
dynamic: 0,
ChecksplatformCode: "", //选取的平台的编号
@@ -400,7 +414,7 @@
// 实时值
EAll: 0,
EOn: 0,
- EOff: 0
+ EOff: 0,
},
Project: {
// 初始值
@@ -410,7 +424,7 @@
// 实时值
EAll: 0,
EOn: 0,
- EOff: 0
+ EOff: 0,
},
// 平台站点数量及状态统计B
// 项目站点覆盖排名A
@@ -439,8 +453,8 @@
namelist: [
{ name: "全部", platform: "", type: "", select: true },
{ name: "合同", platform: "", type: "0", select: false },
- { name: "临测", platform: "", type: "1", select: false }
- ]
+ { name: "临测", platform: "", type: "1", select: false },
+ ],
};
},
methods: {
@@ -455,14 +469,14 @@
"&pageSize=" +
999
)
- .then(response => {
+ .then((response) => {
if (response.status === 200) {
this.ProjectList = this.ProjectList.concat(response.data.data);
} else {
message(response);
}
})
- .catch(response => {
+ .catch((response) => {
message(response);
});
},
@@ -472,9 +486,9 @@
this.$http
.post(this.nozzle.getSiteNum, {
- data: { platform: this.ChecksplatformCode, type: this.platformtype }
+ data: { platform: this.ChecksplatformCode, type: this.platformtype },
})
- .then(response => {
+ .then((response) => {
if (response.status === 200) {
// 将当前数据设置成数字滚动的初始值
this.Site.SAll = this.Site.EAll;
@@ -494,14 +508,14 @@
message(response);
}
})
- .catch(response => {
+ .catch((response) => {
message(response);
});
},
// 单击显示平台站点
allpreview(index, item, event) {
// console.log(index, platform, event.target);
- this.namelist.forEach(item => {
+ this.namelist.forEach((item) => {
item.select = false;
});
this.namelist[index].select = true;
@@ -511,9 +525,9 @@
this.$http
.post(this.nozzle.getSiteNum, {
- data: { platform: this.ChecksplatformCode, type: this.platformtype }
+ data: { platform: this.ChecksplatformCode, type: this.platformtype },
})
- .then(response => {
+ .then((response) => {
if (response.status === 200) {
// 将当前数据设置成数字滚动的初始值
this.Site.SAll = this.Site.EAll;
@@ -533,7 +547,7 @@
message(response);
}
})
- .catch(response => {
+ .catch((response) => {
message(response);
});
},
@@ -541,14 +555,14 @@
loadQuyuPaiMing() {
this.$http
.post(this.nozzle.sysPlatformGetAllSiteCount)
- .then(response => {
+ .then((response) => {
if (response.data.code === 200) {
this.Region = response.data.data;
} else {
message(response);
}
})
- .catch(response => {
+ .catch((response) => {
message(response);
});
},
@@ -557,10 +571,10 @@
this.$http
.post(this.nozzle.platEquipmentGetEquipStatistics, {
data: {
- platform: this.ChecksplatformCode
- }
+ platform: this.ChecksplatformCode,
+ },
})
- .then(response => {
+ .then((response) => {
if (response.data.code === 200) {
this.loadRegionEcharts(
response.data.data.title,
@@ -573,7 +587,7 @@
message(response);
}
})
- .catch(response => {
+ .catch((response) => {
message(response);
});
},
@@ -582,10 +596,10 @@
this.$http
.post(this.nozzle.sysPlatformGetSiteStateStatistics, {
data: {
- platform: this.ChecksplatformCode
- }
+ platform: this.ChecksplatformCode,
+ },
})
- .then(response => {
+ .then((response) => {
if (response.data.code === 200) {
this.loadRegionEcharts2(
response.data.data.xdata,
@@ -598,7 +612,7 @@
message(response);
}
})
- .catch(response => {
+ .catch((response) => {
message(response);
});
},
@@ -614,10 +628,10 @@
platForm: this.ChecksplatformCode,
endTime: "",
startTime: "",
- siteName: ""
- }
+ siteName: "",
+ },
})
- .then(response => {
+ .then((response) => {
if (response.data.code === 200) {
if (response.data.data.total > 0) {
// 没有数据 显示暂无数据的提示
@@ -628,7 +642,7 @@
message(response);
}
})
- .catch(response => {
+ .catch((response) => {
message(response);
});
},
@@ -668,7 +682,7 @@
this.ProjectList[index].longitude,
this.ProjectList[index].latitude,
new esri.SpatialReference({
- wkid: 4326
+ wkid: 4326,
})
);
this.map.centerAndZoom(MapPoint, this.ProjectList[index].zoomLevel);
@@ -677,7 +691,7 @@
// 点击历史搜索的文字
HistoryClick(item) {
this.ChecksplatformCodeTest = item;
- this.ProjectList.forEach(item1 => {
+ this.ProjectList.forEach((item1) => {
if (item1["groupName"] == item) {
this.ChecksplatformCode = item1["groupNo"];
// 根据平台渲染站点数量统计及状态统计
@@ -698,7 +712,7 @@
item1.longitude,
item1.latitude,
new esri.SpatialReference({
- wkid: 4326
+ wkid: 4326,
})
);
this.map.centerAndZoom(MapPoint, item1.zoomLevel);
@@ -735,12 +749,12 @@
this.myChart.setOption({
color: ["red"],
tooltip: {
- trigger: "axis"
+ trigger: "axis",
},
legend: {
x: "center",
data: ["现有设备", "搭建设备"],
- show: false
+ show: false,
},
radar: [
{
@@ -750,17 +764,17 @@
name: {
formatter: "{value}",
textStyle: {
- color: "red"
- }
- }
- }
+ color: "red",
+ },
+ },
+ },
],
series: [
{
type: "radar",
itemStyle: { normal: { areaStyle: { type: "default" } } },
tooltip: {
- trigger: "item"
+ trigger: "item",
},
data: [
{
@@ -768,44 +782,44 @@
value: XianYouData,
areaStyle: {
normal: {
- color: "rgb(255, 217, 0)"
- }
+ color: "rgb(255, 217, 0)",
+ },
},
itemStyle: {
normal: {
color: "rgb(255, 217, 0)",
lineStyle: {
- color: "rgb(255, 217, 0)"
+ color: "rgb(255, 217, 0)",
},
areaStyle: {
- type: "default"
- }
- }
- }
+ type: "default",
+ },
+ },
+ },
},
{
name: "搭建设备",
value: DaJianData,
areaStyle: {
normal: {
- color: "rgb(0, 119, 254)" // 选择项目颜色
- }
+ color: "rgb(0, 119, 254)", // 选择项目颜色
+ },
},
itemStyle: {
normal: {
color: "rgb(0, 119, 254)",
lineStyle: {
- color: "rgb(0, 119, 254)"
+ color: "rgb(0, 119, 254)",
},
areaStyle: {
- type: "default"
- }
- }
- }
- }
- ]
- }
- ]
+ type: "default",
+ },
+ },
+ },
+ },
+ ],
+ },
+ ],
});
},
// 加载项目设备环比增长的ecahrts
@@ -820,24 +834,24 @@
"rgb(140,143,146)",
"rgb(255,214,0)",
"rgb(229,132,12)",
- "rgb(211,22,22)"
+ "rgb(211,22,22)",
],
tooltip: {
- trigger: "axis"
+ trigger: "axis",
},
legend: {
data: ["离线数量", "预警数量", "故障数量", "报警数量"],
textStyle: {
//图例文字的样式
color: "rgb(0, 119, 254)",
- fontSize: 12
- }
+ fontSize: 12,
+ },
},
grid: {
left: "3%",
right: "6%",
bottom: "3%",
- containLabel: true
+ containLabel: true,
},
xAxis: {
type: "category",
@@ -847,13 +861,13 @@
formatter: "{value}",
textStyle: {
//改变刻度字体样式
- color: "rgb(0, 119, 254)"
+ color: "rgb(0, 119, 254)",
},
- fontSize: 12 //字体大小
+ fontSize: 12, //字体大小
},
splitLine: {
- show: false
- }
+ show: false,
+ },
},
yAxis: {
type: "value",
@@ -861,13 +875,13 @@
formatter: "{value}",
textStyle: {
//改变刻度字体样式
- color: "rgb(0, 119, 254)"
+ color: "rgb(0, 119, 254)",
},
- fontSize: 12 //字体大小
+ fontSize: 12, //字体大小
},
splitLine: {
- show: false
- }
+ show: false,
+ },
},
series: [
{
@@ -875,30 +889,30 @@
type: "line",
data: V1,
smooth: true,
- symbol: "none" //取消折点圆圈
+ symbol: "none", //取消折点圆圈
},
{
name: "预警数量",
type: "line",
data: V2,
smooth: true,
- symbol: "none" //取消折点圆圈
+ symbol: "none", //取消折点圆圈
},
{
name: "故障数量",
type: "line",
data: V3,
smooth: true,
- symbol: "none" //取消折点圆圈
+ symbol: "none", //取消折点圆圈
},
{
name: "报警数量",
type: "line",
data: V4,
smooth: true,
- symbol: "none" //取消折点圆圈
- }
- ]
+ symbol: "none", //取消折点圆圈
+ },
+ ],
});
},
// 预警报警信息滚动
@@ -911,6 +925,16 @@
box.scrollTop++;
}
},
+ //鼠标移入事件
+ mouseOver() {
+ if (this.timer) {
+ clearInterval(this.timer);
+ }
+ },
+ //鼠标移出事件
+ mouseLeave() {
+ this.timer = setInterval(this.ScrollUp, 100);
+ },
//初始化地图
createMap() {
let _this = this;
@@ -943,7 +967,7 @@
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
- "dojo/domReady!"
+ "dojo/domReady!",
])
.then(
([
@@ -967,14 +991,14 @@
Point,
webMercatorUtils,
ArcGISTiledMapServiceLayer,
- ClusterLayer
+ ClusterLayer,
]) => {
// create map with the given options at a DOM node w/ id 'mapNode'
_this.map = new Map("previewOfSiteStatusMaps", {
center: [100, 35],
zoom: 5,
logo: false,
- slider: false
+ slider: false,
});
let Main_Map = new ArcGISTiledMapServiceLayer(
"http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer"
@@ -985,20 +1009,20 @@
_this.map.on("click", function(e) {
}); */
- _this.map.on("load", function() {
+ _this.map.on("load", function () {
_this.$http
.post(_this.nozzle.listStationBase, {
- data: {}
+ data: {},
})
- .then(response => {
+ .then((response) => {
if (response.data.code === 200) {
let photoInfo = {};
let wgs = new SpatialReference({
- wkid: 4326
+ wkid: 4326,
});
photoInfo.data = arrayUtils.map(
response.data.data,
- function(p) {
+ function (p) {
/* if(p.lon!=null){
} */
let latlng = new Point(
@@ -1011,12 +1035,12 @@
);
let attributes = {
stName: p.stName,
- stCode: p.stCode
+ stCode: p.stCode,
};
return {
x: webMercator.x,
y: webMercator.y,
- attributes: attributes
+ attributes: attributes,
};
}
);
@@ -1027,14 +1051,14 @@
{
fieldName: "stName",
label: "名称:",
- visible: true
+ visible: true,
},
{
fieldName: "stCode",
label: "编号:",
- visible: true
- }
- ]
+ visible: true,
+ },
+ ],
});
let clusterLayer = new ClusterLayer({
data: photoInfo.data,
@@ -1044,7 +1068,7 @@
labelOffset: 10,
resolution: _this.map.extent.getWidth() / _this.map.width,
singleColor: "#888",
- singleTemplate: popupTemplate
+ singleTemplate: popupTemplate,
});
let defaultSym = new SimpleMarkerSymbol().setSize(4);
let renderer = new ClassBreaksRenderer(
@@ -1075,7 +1099,7 @@
clusterLayer.setRenderer(renderer);
_this.map.addLayer(clusterLayer);
- clusterLayer.on("click", function(res) {
+ clusterLayer.on("click", function (res) {
if (res.graphic._graphicsLayer._singles.length == 0) {
return;
}
@@ -1085,10 +1109,10 @@
data: {
stCode:
d.graphic._graphicsLayer._singles[0].attributes
- .stCode
- }
+ .stCode,
+ },
})
- .then(resP => {
+ .then((resP) => {
let textContent =
"
名称 | " +
d.graphic._graphicsLayer._singles[0].attributes
@@ -1116,19 +1140,25 @@
message(response);
}
})
- .catch(response => {
+ .catch((response) => {
message(response);
});
});
}
)
- .catch(err => {
+ .catch((err) => {
// handle any script or module loading errors
// console.error(err);
});
- }
+ },
+ // 给与gis的方法调动dome
+ REFSFunctionToGis() {
+ console.log(
+ "在index调用到了previewOfSiteStatus中的REFSFunctionToGis方法"
+ );
+ },
},
- mounted: function() {
+ mounted: function () {
// 根据平台渲染站点数量统计及状态统计
this.loadSiteNumForOroject();
// 根据平台渲染项目设备总览
@@ -1147,15 +1177,16 @@
// 默认加载项目站点覆盖排名
this.loadQuyuPaiMing();
- this.$nextTick(function() {
+ this.$nextTick(function () {
this.timer = setInterval(this.ScrollUp, 100);
});
+
// 默认从本地session srotage里面读取历史搜索记录ZZJ
this.getItem();
},
- destroyed: function() {
+ destroyed: function () {
clearInterval(this.timer);
- }
+ },
};
|