diff --git a/src/components/site/previewOfSiteStatus.vue b/src/components/site/previewOfSiteStatus.vue
index be5e5ae..5423802 100644
--- a/src/components/site/previewOfSiteStatus.vue
+++ b/src/components/site/previewOfSiteStatus.vue
@@ -339,7 +339,9 @@
effect="dark"
open-delay="300"
:enterable="false"
- :content="`${item.factorsName}${item.warnTypeDesc},${item.warnTypeDesc}值为:${item.warnValue}`"
+ :content="
+ `${item.factorsName}${item.warnTypeDesc},${item.warnTypeDesc}值为:${item.warnValue}`
+ "
placement="top"
>
@@ -378,7 +380,7 @@
export default {
name: "previewOfSiteStatus",
components: { countTo }, //加载数字滚动插件
- data: function () {
+ data: function() {
return {
timer: {}, //定时器
// 顶部中间汇总A
@@ -396,8 +398,8 @@
offLine: 0,
offLinePercentage: 0,
total: 0,
- totalPercentage: 0,
- },
+ totalPercentage: 0
+ }
],
dynamic: 0,
ChecksplatformCode: "", //选取的平台的编号
@@ -414,7 +416,7 @@
// 实时值
EAll: 0,
EOn: 0,
- EOff: 0,
+ EOff: 0
},
Project: {
// 初始值
@@ -424,7 +426,7 @@
// 实时值
EAll: 0,
EOn: 0,
- EOff: 0,
+ EOff: 0
},
// 平台站点数量及状态统计B
// 项目站点覆盖排名A
@@ -453,8 +455,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: {
@@ -469,14 +471,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);
});
},
@@ -486,9 +488,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;
@@ -508,14 +510,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;
@@ -525,9 +527,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;
@@ -547,7 +549,7 @@
message(response);
}
})
- .catch((response) => {
+ .catch(response => {
message(response);
});
},
@@ -555,14 +557,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);
});
},
@@ -571,10 +573,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,
@@ -587,7 +589,7 @@
message(response);
}
})
- .catch((response) => {
+ .catch(response => {
message(response);
});
},
@@ -596,10 +598,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,
@@ -612,7 +614,7 @@
message(response);
}
})
- .catch((response) => {
+ .catch(response => {
message(response);
});
},
@@ -628,10 +630,10 @@
platForm: this.ChecksplatformCode,
endTime: "",
startTime: "",
- siteName: "",
- },
+ siteName: ""
+ }
})
- .then((response) => {
+ .then(response => {
if (response.data.code === 200) {
if (response.data.data.total > 0) {
// 没有数据 显示暂无数据的提示
@@ -642,7 +644,7 @@
message(response);
}
})
- .catch((response) => {
+ .catch(response => {
message(response);
});
},
@@ -682,7 +684,7 @@
this.ProjectList[index].longitude,
this.ProjectList[index].latitude,
new esri.SpatialReference({
- wkid: 4326,
+ wkid: 4326
})
);
this.map.centerAndZoom(MapPoint, this.ProjectList[index].zoomLevel);
@@ -691,7 +693,7 @@
// 点击历史搜索的文字
HistoryClick(item) {
this.ChecksplatformCodeTest = item;
- this.ProjectList.forEach((item1) => {
+ this.ProjectList.forEach(item1 => {
if (item1["groupName"] == item) {
this.ChecksplatformCode = item1["groupNo"];
// 根据平台渲染站点数量统计及状态统计
@@ -712,7 +714,7 @@
item1.longitude,
item1.latitude,
new esri.SpatialReference({
- wkid: 4326,
+ wkid: 4326
})
);
this.map.centerAndZoom(MapPoint, item1.zoomLevel);
@@ -749,12 +751,12 @@
this.myChart.setOption({
color: ["red"],
tooltip: {
- trigger: "axis",
+ trigger: "axis"
},
legend: {
x: "center",
data: ["现有设备", "搭建设备"],
- show: false,
+ show: false
},
radar: [
{
@@ -764,17 +766,17 @@
name: {
formatter: "{value}",
textStyle: {
- color: "red",
- },
- },
- },
+ color: "red"
+ }
+ }
+ }
],
series: [
{
type: "radar",
itemStyle: { normal: { areaStyle: { type: "default" } } },
tooltip: {
- trigger: "item",
+ trigger: "item"
},
data: [
{
@@ -782,44 +784,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
@@ -834,24 +836,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",
@@ -861,13 +863,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",
@@ -875,13 +877,13 @@
formatter: "{value}",
textStyle: {
//改变刻度字体样式
- color: "rgb(0, 119, 254)",
+ color: "rgb(0, 119, 254)"
},
- fontSize: 12, //字体大小
+ fontSize: 12 //字体大小
},
splitLine: {
- show: false,
- },
+ show: false
+ }
},
series: [
{
@@ -889,30 +891,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" //取消折点圆圈
+ }
+ ]
});
},
// 预警报警信息滚动
@@ -967,7 +969,7 @@
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
- "dojo/domReady!",
+ "dojo/domReady!"
])
.then(
([
@@ -991,23 +993,23 @@
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
});
-
- this.arcgiswhiteMap = new ArcGISTiledMapServiceLayer(
+
+ this.arcgiswhiteMap = new ArcGISTiledMapServiceLayer(
//"http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
"http://cache1.arcgisonline.cn/arcgis/rest/services/ChinaOnlineCommunity_Mobile/MapServer"
);
- _this.map.addLayer(this.arcgiswhiteMap);
- this.arcgiswhiteMap.hide()
- this.arcgisMap = new ArcGISTiledMapServiceLayer(
+ _this.map.addLayer(this.arcgiswhiteMap);
+ this.arcgiswhiteMap.hide();
+ this.arcgisMap = new ArcGISTiledMapServiceLayer(
"http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer"
);
_this.map.addLayer(this.arcgisMap);
@@ -1017,20 +1019,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(
@@ -1043,12 +1045,12 @@
);
let attributes = {
stName: p.stName,
- stCode: p.stCode,
+ stCode: p.stCode
};
return {
x: webMercator.x,
y: webMercator.y,
- attributes: attributes,
+ attributes: attributes
};
}
);
@@ -1059,14 +1061,14 @@
{
fieldName: "stName",
label: "名称:",
- visible: true,
+ visible: true
},
{
fieldName: "stCode",
label: "编号:",
- visible: true,
- },
- ],
+ visible: true
+ }
+ ]
});
let clusterLayer = new ClusterLayer({
data: photoInfo.data,
@@ -1076,7 +1078,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(
@@ -1107,7 +1109,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;
}
@@ -1117,10 +1119,10 @@
data: {
stCode:
d.graphic._graphicsLayer._singles[0].attributes
- .stCode,
- },
+ .stCode
+ }
})
- .then((resP) => {
+ .then(resP => {
let textContent =
"
名称 | " +
d.graphic._graphicsLayer._singles[0].attributes
@@ -1148,36 +1150,31 @@
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(type) {
-
if (!type) {
//加载黑色arcgis午夜蓝图
- this.arcgiswhiteMap.hide()
- this.arcgisMap.show()
- }
- else
- {
+ this.arcgiswhiteMap.hide();
+ this.arcgisMap.show();
+ } else {
//加载蓝色底图
- this.arcgisMap.hide()
- this.arcgiswhiteMap.show()
-
+ this.arcgisMap.hide();
+ this.arcgiswhiteMap.show();
}
-
- },
+ }
},
- mounted: function () {
+ mounted: function() {
// 根据平台渲染站点数量统计及状态统计
this.loadSiteNumForOroject();
// 根据平台渲染项目设备总览
@@ -1196,16 +1193,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);
- },
+ }
};
|