@@ -76,7 +76,6 @@
position: "bottom-right"
});
}
- this.getCookie();
},
methods: {
detectZoom() {
@@ -136,7 +135,6 @@
setSession("logins", "true");
// 用户在线状态计时
loginTime();
- this.saveInfo();
// 保存cook
this.$router.push("/welcome");
@@ -153,64 +151,6 @@
.catch(response => {
// this.refreshCode();
});
- },
- // 保存Cookie
- saveInfo() {
- try {
- // 保存按键是否选中
- var isSave = document.getElementById("checkbox").checked;
- if (isSave) {
- var username = $("#ZH").val();
- var password = $("#MM").val();
- if (username != "" && password != "") {
- this.SetCookie(username, password);
- }
- } else {
- this.SetCookie("", "");
- }
- } catch (e) {}
- },
-
- // 保存Cookie
- SetCookie(username, password) {
- var Then = new Date();
- Then.setTime(Then.getTime() + 1866240000000);
- document.cookie +=
- "username=" +
- username +
- "%%" +
- password +
- ";expires=" +
- Then.toGMTString();
- },
-
- // 获取登陆的用户名和密码
- getCookie() {
- var nmpsd;
- var nm;
- var psd;
- var cookieString = new String(document.cookie);
- var cookieHeader = "username=";
- var beginPosition = cookieString.indexOf(cookieHeader);
- cookieString = cookieString.substring(beginPosition);
- var ends = cookieString.indexOf(";");
- if (ends != -1) {
- cookieString = cookieString.substring(0, ends);
- }
- if (beginPosition > -1) {
- nmpsd = cookieString.substring(cookieHeader.length);
- if (nmpsd != "") {
- beginPosition = nmpsd.indexOf("%%");
- nm = nmpsd.substring(0, beginPosition);
- psd = nmpsd.substring(beginPosition + 2);
- $("#ZH").val(nm);
- $("#MM").val(psd);
-
- if (nm != "" && psd != "") {
- document.getElementById("checkbox").checked = true;
- }
- }
- }
}
}
};
diff --git a/config/index.js b/config/index.js
index f8b4cc2..ca36d8e 100644
--- a/config/index.js
+++ b/config/index.js
@@ -34,7 +34,7 @@
}
},
"/nfQuery": {
- target: "http://192.168.30.199:7099", //陈迁接口
+ target: "http://192.168.30.199:7099", //陆展接口
changeOrigin: true, //是否跨域
pathRewrite: {
"^/nfQuery": "" //需要rewrite重写的,git
@@ -114,7 +114,7 @@
},
// Various Dev Server settings
- host: "192.168.30.144", // can be overwritten by process.env.HOST
+ host: "192.168.30.113", // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
diff --git a/src/components/login.vue b/src/components/login.vue
index 73996bc..3fdbd37 100644
--- a/src/components/login.vue
+++ b/src/components/login.vue
@@ -28,7 +28,7 @@
+
登录
@@ -76,7 +76,6 @@
position: "bottom-right"
});
}
- this.getCookie();
},
methods: {
detectZoom() {
@@ -136,7 +135,6 @@
setSession("logins", "true");
// 用户在线状态计时
loginTime();
- this.saveInfo();
// 保存cook
this.$router.push("/welcome");
@@ -153,64 +151,6 @@
.catch(response => {
// this.refreshCode();
});
- },
- // 保存Cookie
- saveInfo() {
- try {
- // 保存按键是否选中
- var isSave = document.getElementById("checkbox").checked;
- if (isSave) {
- var username = $("#ZH").val();
- var password = $("#MM").val();
- if (username != "" && password != "") {
- this.SetCookie(username, password);
- }
- } else {
- this.SetCookie("", "");
- }
- } catch (e) {}
- },
-
- // 保存Cookie
- SetCookie(username, password) {
- var Then = new Date();
- Then.setTime(Then.getTime() + 1866240000000);
- document.cookie +=
- "username=" +
- username +
- "%%" +
- password +
- ";expires=" +
- Then.toGMTString();
- },
-
- // 获取登陆的用户名和密码
- getCookie() {
- var nmpsd;
- var nm;
- var psd;
- var cookieString = new String(document.cookie);
- var cookieHeader = "username=";
- var beginPosition = cookieString.indexOf(cookieHeader);
- cookieString = cookieString.substring(beginPosition);
- var ends = cookieString.indexOf(";");
- if (ends != -1) {
- cookieString = cookieString.substring(0, ends);
- }
- if (beginPosition > -1) {
- nmpsd = cookieString.substring(cookieHeader.length);
- if (nmpsd != "") {
- beginPosition = nmpsd.indexOf("%%");
- nm = nmpsd.substring(0, beginPosition);
- psd = nmpsd.substring(beginPosition + 2);
- $("#ZH").val(nm);
- $("#MM").val(psd);
-
- if (nm != "" && psd != "") {
- document.getElementById("checkbox").checked = true;
- }
- }
- }
}
}
};
diff --git a/src/components/newFiber/NewFiberSearch.vue b/src/components/newFiber/NewFiberSearch.vue
index 46439f9..0c65f1a 100644
--- a/src/components/newFiber/NewFiberSearch.vue
+++ b/src/components/newFiber/NewFiberSearch.vue
@@ -166,6 +166,8 @@
? 'online'
: site.status === 1
? 'offline'
+ : site.status === 3
+ ? 'lowvoltage'
: ''
]"
>
@@ -1097,9 +1099,12 @@
case 1:
str = "离线";
break;
- default:
+ case 2:
str = "异常";
break;
+ case 3:
+ str = "低电压";
+ break;
}
return str;
}
@@ -1404,6 +1409,9 @@
&.online {
background-color: rgb(37, 104, 243);
}
+ &.lowvoltage {
+ background-color: rgb(41, 199, 114);
+ }
}
}
}
diff --git a/config/index.js b/config/index.js
index f8b4cc2..ca36d8e 100644
--- a/config/index.js
+++ b/config/index.js
@@ -34,7 +34,7 @@
}
},
"/nfQuery": {
- target: "http://192.168.30.199:7099", //陈迁接口
+ target: "http://192.168.30.199:7099", //陆展接口
changeOrigin: true, //是否跨域
pathRewrite: {
"^/nfQuery": "" //需要rewrite重写的,git
@@ -114,7 +114,7 @@
},
// Various Dev Server settings
- host: "192.168.30.144", // can be overwritten by process.env.HOST
+ host: "192.168.30.113", // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
diff --git a/src/components/login.vue b/src/components/login.vue
index 73996bc..3fdbd37 100644
--- a/src/components/login.vue
+++ b/src/components/login.vue
@@ -28,7 +28,7 @@
账号密码错误
-
+
登录
@@ -76,7 +76,6 @@
position: "bottom-right"
});
}
- this.getCookie();
},
methods: {
detectZoom() {
@@ -136,7 +135,6 @@
setSession("logins", "true");
// 用户在线状态计时
loginTime();
- this.saveInfo();
// 保存cook
this.$router.push("/welcome");
@@ -153,64 +151,6 @@
.catch(response => {
// this.refreshCode();
});
- },
- // 保存Cookie
- saveInfo() {
- try {
- // 保存按键是否选中
- var isSave = document.getElementById("checkbox").checked;
- if (isSave) {
- var username = $("#ZH").val();
- var password = $("#MM").val();
- if (username != "" && password != "") {
- this.SetCookie(username, password);
- }
- } else {
- this.SetCookie("", "");
- }
- } catch (e) {}
- },
-
- // 保存Cookie
- SetCookie(username, password) {
- var Then = new Date();
- Then.setTime(Then.getTime() + 1866240000000);
- document.cookie +=
- "username=" +
- username +
- "%%" +
- password +
- ";expires=" +
- Then.toGMTString();
- },
-
- // 获取登陆的用户名和密码
- getCookie() {
- var nmpsd;
- var nm;
- var psd;
- var cookieString = new String(document.cookie);
- var cookieHeader = "username=";
- var beginPosition = cookieString.indexOf(cookieHeader);
- cookieString = cookieString.substring(beginPosition);
- var ends = cookieString.indexOf(";");
- if (ends != -1) {
- cookieString = cookieString.substring(0, ends);
- }
- if (beginPosition > -1) {
- nmpsd = cookieString.substring(cookieHeader.length);
- if (nmpsd != "") {
- beginPosition = nmpsd.indexOf("%%");
- nm = nmpsd.substring(0, beginPosition);
- psd = nmpsd.substring(beginPosition + 2);
- $("#ZH").val(nm);
- $("#MM").val(psd);
-
- if (nm != "" && psd != "") {
- document.getElementById("checkbox").checked = true;
- }
- }
- }
}
}
};
diff --git a/src/components/newFiber/NewFiberSearch.vue b/src/components/newFiber/NewFiberSearch.vue
index 46439f9..0c65f1a 100644
--- a/src/components/newFiber/NewFiberSearch.vue
+++ b/src/components/newFiber/NewFiberSearch.vue
@@ -166,6 +166,8 @@
? 'online'
: site.status === 1
? 'offline'
+ : site.status === 3
+ ? 'lowvoltage'
: ''
]"
>
@@ -1097,9 +1099,12 @@
case 1:
str = "离线";
break;
- default:
+ case 2:
str = "异常";
break;
+ case 3:
+ str = "低电压";
+ break;
}
return str;
}
@@ -1404,6 +1409,9 @@
&.online {
background-color: rgb(37, 104, 243);
}
+ &.lowvoltage {
+ background-color: rgb(41, 199, 114);
+ }
}
}
}
diff --git a/src/components/site/previewOfSiteStatus.vue b/src/components/site/previewOfSiteStatus.vue
index 70813bc..0391942 100644
--- a/src/components/site/previewOfSiteStatus.vue
+++ b/src/components/site/previewOfSiteStatus.vue
@@ -60,12 +60,14 @@
:key="index"
style="width:260px;height:33px;color: darkslategray;line-height:33px;"
>
-
{{ item.name }}
-
{{ item.value }}
@@ -340,7 +342,7 @@
-
+
![]()
-
项目设备总览
+
设备分类
@@ -374,15 +376,13 @@
alt
class="previewOfSiteStatusTitleImg"
/>
-
项目设备省份地区统计
+
各地区站点统计
{
if (response.status === 200) {
- this.XianYou = response.data.data.total;
- this.loadRegionEcharts(response.data.data.data);
+ // this.XianYou = response.data.data.total;
+ // console.log(response.data.data);
+ this.titlearr = response.data.data.title;
+ this.valuearr = response.data.data.value;
+ this.loadRegionEcharts(this.titlearr, this.valuearr);
} else {
message(response);
}
@@ -955,7 +959,7 @@
message(response);
});
},
- // 加载 项目设备省份地区统计
+ // 加载 各地区站点统计
loadQuYuSheBeiHuanBi() {
this.$http
.post(this.nozzle.getAreaStatistics, {
@@ -1041,7 +1045,7 @@
// 根据平台渲染站点数量统计及状态统计
this.loadSiteNumForOroject();
- // 根据平台渲染项目设备总览
+ // 根据平台渲染设备分类
this.loadQuyuShebei();
// 根据平台渲染项目设备环比增长
this.loadQuYuSheBeiHuanBi();
@@ -1081,7 +1085,7 @@
}
// 根据平台渲染站点数量统计及状态统计
this.loadSiteNumForOroject();
- // 根据平台渲染项目设备总览
+ // 根据平台渲染设备分类
this.loadQuyuShebei();
// 根据平台渲染项目设备环比增长
this.loadQuYuSheBeiHuanBi();
@@ -1123,37 +1127,67 @@
row.includes(id) ? row : row.unshift(id);
return row;
},
- // 加载项目设备总览的ecahrts
- loadRegionEcharts(data) {
+ // 加载设备分类的ecahrts
+ loadRegionEcharts(titlearr, valuearr) {
// console.log(data);
// 基于准备好的dom,初始化echarts实例
- this.myChart = this.$echarts.init(
+ let myChart1 = this.$echarts.init(
document.getElementById("previewOfSiteStatusCentent4eCharts")
);
// 绘制图表
-
- this.myChart.clear();
+ // this.myChart1.clear();
let option = {
- tooltip: {
- trigger: "item"
+ xAxis: {
+ type: "category",
+ data: titlearr,
+ axisLine: {
+ color: "#30919a"
+ },
+ axisLabel: {
+ show: true,
+ textStyle: {
+ color: "#30919a"
+ }
+ }
+ },
+ yAxis: {
+ type: "value",
+ axisLabel: {
+ show: true,
+ textStyle: {
+ color: "#30919a"
+ }
+ }
},
series: [
{
- name: "类型",
- type: "pie",
- radius: "50%",
- data: data,
+ type: "bar",
+ showBackground: true,
+ data: valuearr,
+ itemStyle: {
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ { offset: 0.8, color: "#30919a" },
+ { offset: 0, color: "#5af9f4" },
+ { offset: 1, color: "#081d28" }
+ ])
+ },
emphasis: {
itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: "rgba(0, 0, 0, 0.5)"
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ { offset: 0, color: "#2378f7" },
+ { offset: 0.7, color: "#2378f7" },
+ { offset: 1, color: "#83bff6" }
+ ])
}
}
}
- ]
+ ],
+ calculable: true,
+ tooltip: {
+ trigger: "axis"
+ }
};
- this.myChart.setOption(option);
+ myChart1.setOption(option);
},
// 预警报警信息滚动
@@ -1854,20 +1888,17 @@
//点击的是聚簇图标,展示统计信息
else {
/* console.log("点击了聚簇"+e.coordinate) */
- var cell ;
- var cells = feature.values_.features;
-
- for(var cc=0;cc
diff --git a/config/index.js b/config/index.js
index f8b4cc2..ca36d8e 100644
--- a/config/index.js
+++ b/config/index.js
@@ -34,7 +34,7 @@
}
},
"/nfQuery": {
- target: "http://192.168.30.199:7099", //陈迁接口
+ target: "http://192.168.30.199:7099", //陆展接口
changeOrigin: true, //是否跨域
pathRewrite: {
"^/nfQuery": "" //需要rewrite重写的,git
@@ -114,7 +114,7 @@
},
// Various Dev Server settings
- host: "192.168.30.144", // can be overwritten by process.env.HOST
+ host: "192.168.30.113", // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
diff --git a/src/components/login.vue b/src/components/login.vue
index 73996bc..3fdbd37 100644
--- a/src/components/login.vue
+++ b/src/components/login.vue
@@ -28,7 +28,7 @@
账号密码错误
-
+
登录
@@ -76,7 +76,6 @@
position: "bottom-right"
});
}
- this.getCookie();
},
methods: {
detectZoom() {
@@ -136,7 +135,6 @@
setSession("logins", "true");
// 用户在线状态计时
loginTime();
- this.saveInfo();
// 保存cook
this.$router.push("/welcome");
@@ -153,64 +151,6 @@
.catch(response => {
// this.refreshCode();
});
- },
- // 保存Cookie
- saveInfo() {
- try {
- // 保存按键是否选中
- var isSave = document.getElementById("checkbox").checked;
- if (isSave) {
- var username = $("#ZH").val();
- var password = $("#MM").val();
- if (username != "" && password != "") {
- this.SetCookie(username, password);
- }
- } else {
- this.SetCookie("", "");
- }
- } catch (e) {}
- },
-
- // 保存Cookie
- SetCookie(username, password) {
- var Then = new Date();
- Then.setTime(Then.getTime() + 1866240000000);
- document.cookie +=
- "username=" +
- username +
- "%%" +
- password +
- ";expires=" +
- Then.toGMTString();
- },
-
- // 获取登陆的用户名和密码
- getCookie() {
- var nmpsd;
- var nm;
- var psd;
- var cookieString = new String(document.cookie);
- var cookieHeader = "username=";
- var beginPosition = cookieString.indexOf(cookieHeader);
- cookieString = cookieString.substring(beginPosition);
- var ends = cookieString.indexOf(";");
- if (ends != -1) {
- cookieString = cookieString.substring(0, ends);
- }
- if (beginPosition > -1) {
- nmpsd = cookieString.substring(cookieHeader.length);
- if (nmpsd != "") {
- beginPosition = nmpsd.indexOf("%%");
- nm = nmpsd.substring(0, beginPosition);
- psd = nmpsd.substring(beginPosition + 2);
- $("#ZH").val(nm);
- $("#MM").val(psd);
-
- if (nm != "" && psd != "") {
- document.getElementById("checkbox").checked = true;
- }
- }
- }
}
}
};
diff --git a/src/components/newFiber/NewFiberSearch.vue b/src/components/newFiber/NewFiberSearch.vue
index 46439f9..0c65f1a 100644
--- a/src/components/newFiber/NewFiberSearch.vue
+++ b/src/components/newFiber/NewFiberSearch.vue
@@ -166,6 +166,8 @@
? 'online'
: site.status === 1
? 'offline'
+ : site.status === 3
+ ? 'lowvoltage'
: ''
]"
>
@@ -1097,9 +1099,12 @@
case 1:
str = "离线";
break;
- default:
+ case 2:
str = "异常";
break;
+ case 3:
+ str = "低电压";
+ break;
}
return str;
}
@@ -1404,6 +1409,9 @@
&.online {
background-color: rgb(37, 104, 243);
}
+ &.lowvoltage {
+ background-color: rgb(41, 199, 114);
+ }
}
}
}
diff --git a/src/components/site/previewOfSiteStatus.vue b/src/components/site/previewOfSiteStatus.vue
index 70813bc..0391942 100644
--- a/src/components/site/previewOfSiteStatus.vue
+++ b/src/components/site/previewOfSiteStatus.vue
@@ -60,12 +60,14 @@
:key="index"
style="width:260px;height:33px;color: darkslategray;line-height:33px;"
>
-
{{ item.name }}
-
{{ item.value }}
@@ -340,7 +342,7 @@
-
+
![]()
-
项目设备总览
+
设备分类
@@ -374,15 +376,13 @@
alt
class="previewOfSiteStatusTitleImg"
/>
-
项目设备省份地区统计
+
各地区站点统计
{
if (response.status === 200) {
- this.XianYou = response.data.data.total;
- this.loadRegionEcharts(response.data.data.data);
+ // this.XianYou = response.data.data.total;
+ // console.log(response.data.data);
+ this.titlearr = response.data.data.title;
+ this.valuearr = response.data.data.value;
+ this.loadRegionEcharts(this.titlearr, this.valuearr);
} else {
message(response);
}
@@ -955,7 +959,7 @@
message(response);
});
},
- // 加载 项目设备省份地区统计
+ // 加载 各地区站点统计
loadQuYuSheBeiHuanBi() {
this.$http
.post(this.nozzle.getAreaStatistics, {
@@ -1041,7 +1045,7 @@
// 根据平台渲染站点数量统计及状态统计
this.loadSiteNumForOroject();
- // 根据平台渲染项目设备总览
+ // 根据平台渲染设备分类
this.loadQuyuShebei();
// 根据平台渲染项目设备环比增长
this.loadQuYuSheBeiHuanBi();
@@ -1081,7 +1085,7 @@
}
// 根据平台渲染站点数量统计及状态统计
this.loadSiteNumForOroject();
- // 根据平台渲染项目设备总览
+ // 根据平台渲染设备分类
this.loadQuyuShebei();
// 根据平台渲染项目设备环比增长
this.loadQuYuSheBeiHuanBi();
@@ -1123,37 +1127,67 @@
row.includes(id) ? row : row.unshift(id);
return row;
},
- // 加载项目设备总览的ecahrts
- loadRegionEcharts(data) {
+ // 加载设备分类的ecahrts
+ loadRegionEcharts(titlearr, valuearr) {
// console.log(data);
// 基于准备好的dom,初始化echarts实例
- this.myChart = this.$echarts.init(
+ let myChart1 = this.$echarts.init(
document.getElementById("previewOfSiteStatusCentent4eCharts")
);
// 绘制图表
-
- this.myChart.clear();
+ // this.myChart1.clear();
let option = {
- tooltip: {
- trigger: "item"
+ xAxis: {
+ type: "category",
+ data: titlearr,
+ axisLine: {
+ color: "#30919a"
+ },
+ axisLabel: {
+ show: true,
+ textStyle: {
+ color: "#30919a"
+ }
+ }
+ },
+ yAxis: {
+ type: "value",
+ axisLabel: {
+ show: true,
+ textStyle: {
+ color: "#30919a"
+ }
+ }
},
series: [
{
- name: "类型",
- type: "pie",
- radius: "50%",
- data: data,
+ type: "bar",
+ showBackground: true,
+ data: valuearr,
+ itemStyle: {
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ { offset: 0.8, color: "#30919a" },
+ { offset: 0, color: "#5af9f4" },
+ { offset: 1, color: "#081d28" }
+ ])
+ },
emphasis: {
itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: "rgba(0, 0, 0, 0.5)"
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ { offset: 0, color: "#2378f7" },
+ { offset: 0.7, color: "#2378f7" },
+ { offset: 1, color: "#83bff6" }
+ ])
}
}
}
- ]
+ ],
+ calculable: true,
+ tooltip: {
+ trigger: "axis"
+ }
};
- this.myChart.setOption(option);
+ myChart1.setOption(option);
},
// 预警报警信息滚动
@@ -1854,20 +1888,17 @@
//点击的是聚簇图标,展示统计信息
else {
/* console.log("点击了聚簇"+e.coordinate) */
- var cell ;
- var cells = feature.values_.features;
-
- for(var cc=0;cc
diff --git a/src/main.js b/src/main.js
index 57f0931..2db34b6 100644
--- a/src/main.js
+++ b/src/main.js
@@ -20,6 +20,7 @@
// 引入折线图/柱状图等组件
require("echarts/lib/chart/line");
require("echarts/lib/chart/pie");
+require("echarts/lib/chart/bar");
require("echarts/lib/chart/radar");
// 引入提示框和title组件,图例
require("echarts/lib/component/title");
@@ -27,6 +28,9 @@
require("echarts/lib/component/radar");
require("echarts/lib/component/tooltip");
require("echarts/lib/component/toolbox");
+require("echarts/lib/component/dataZoom");
+require("echarts/lib/component/grid");
+require("echarts/lib/component/graphic");
Vue.prototype.$echarts = echarts;
import moment from "moment";