From 965aec327b950438842661beff1131929d19bb02 Mon Sep 17 00:00:00 2001
From: fanluyan <754122931@qq.com>
Date: Sun, 28 Apr 2024 10:18:16 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=B5=E5=8E=8B=E7=AD=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Sidebar.vue | 30 +++---
.../dyInformation/components/addDyDialog.vue | 1 +
src/views/iceWeather/components/leftTree.vue | 11 +-
src/views/iceWeather/weather/index.vue | 23 ++--
.../components/addPhotoDialog.vue | 100 +++++++++++-------
.../components/towerDialog.vue | 49 +++++++--
.../components/carouselChart.vue | 10 +-
.../components/setChannelDialog.vue | 7 +-
.../towerInformation/components/addDialog.vue | 49 +++++++--
9 files changed, 192 insertions(+), 88 deletions(-)
diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue
index b33faf0..664e7cf 100644
--- a/src/components/Sidebar.vue
+++ b/src/components/Sidebar.vue
@@ -78,21 +78,21 @@ export default {
index: "/realTimeSearch",
title: "历史图片",
},
- // {
- // icon: "iconfont icon-fubing",
- // index: "/weatherIce",
- // title: "气象覆冰",
- // subs: [
- // {
- // index: "/weather",
- // title: "气象监测",
- // },
- // {
- // index: "/icing",
- // title: "覆冰监测",
- // },
- // ],
- // },
+ {
+ icon: "iconfont icon-fubing",
+ index: "/weatherIce",
+ title: "气象覆冰",
+ subs: [
+ {
+ index: "/weather",
+ title: "气象监测",
+ },
+ {
+ index: "/icing",
+ title: "覆冰监测",
+ },
+ ],
+ },
{
icon: "el-icon-files",
index: "/property",
diff --git a/src/views/dyInformation/components/addDyDialog.vue b/src/views/dyInformation/components/addDyDialog.vue
index 554c8c8..171b80f 100644
--- a/src/views/dyInformation/components/addDyDialog.vue
+++ b/src/views/dyInformation/components/addDyDialog.vue
@@ -55,6 +55,7 @@ export default {
this.$refs.formInfo.validate((valid) => {
if (valid) {
if (this.title == "新增") {
+ this.$set(this.formdata, "dyValue", "220");
addDyJoggle(this.formdata)
.then((res) => {
this.isShow = false;
diff --git a/src/views/iceWeather/components/leftTree.vue b/src/views/iceWeather/components/leftTree.vue
index 8f4fee6..a0633c1 100644
--- a/src/views/iceWeather/components/leftTree.vue
+++ b/src/views/iceWeather/components/leftTree.vue
@@ -136,17 +136,17 @@ export default {
getLineTreeList() {
this.role = localStorage.getItem("role");
console.log(this.role);
- const menuName = localStorage.getItem("menuActive");
+ const menuName = this.$route.path;
console.log(menuName);
this.treeLoading = true;
let devtypeList;
- //气象
+ //微气象
if (menuName == "/weather") {
- devtypeList = [2];
+ devtypeList = [3];
}
- //覆冰
+ //覆冰拉力
if (menuName == "/icing") {
- devtypeList = [3];
+ devtypeList = [2];
}
console.log(devtypeList);
getICEdyTreeList({
@@ -154,6 +154,7 @@ export default {
devtype: devtypeList,
})
.then((res) => {
+ this.lineTreeData = [];
this.lineTreeData = res.data.list;
this.treeLoading = false;
this.icecurrentData = JSON.parse(
diff --git a/src/views/iceWeather/weather/index.vue b/src/views/iceWeather/weather/index.vue
index e78b970..43d08ff 100644
--- a/src/views/iceWeather/weather/index.vue
+++ b/src/views/iceWeather/weather/index.vue
@@ -17,7 +17,7 @@
-
+
{{
$moment(scope.row.lastWeathers.updateTime * 1000).format(
"YYYY-MM-DD HH:mm:ss"
@@ -29,7 +29,7 @@
- {{
+ {{
scope.row.lastWeathers.airTemperature
}}
-
@@ -37,7 +37,7 @@
- {{
+ {{
scope.row.lastWeathers.humidity
}}
-
@@ -45,7 +45,7 @@
- {{
+ {{
scope.row.lastWeathers.maxWindSpeed
}}
-
@@ -53,7 +53,7 @@
- {{
+ {{
scope.row.lastWeathers.windDirection
}}
-
@@ -61,7 +61,7 @@
- {{
+ {{
scope.row.lastWeathers.precipitation
}}
-
@@ -69,7 +69,7 @@
- {{
+ {{
scope.row.lastWeathers.airPressure
}}
-
@@ -77,10 +77,9 @@
- {{ scope.row.lastWeathers.radiationIntensity }}
+ {{
+ scope.row.lastWeathers.radiationIntensity
+ }}
-
@@ -89,7 +88,7 @@
更多历史数据
没有数据
diff --git a/src/views/photographicDevice/components/addPhotoDialog.vue b/src/views/photographicDevice/components/addPhotoDialog.vue
index c695d90..080ab99 100644
--- a/src/views/photographicDevice/components/addPhotoDialog.vue
+++ b/src/views/photographicDevice/components/addPhotoDialog.vue
@@ -13,11 +13,25 @@
:rules="rules"
:model="formInfo"
>
+
+
+
+
+
{
- let reg = /^[0-9A-Za-z_/\\/-]{17}$/;
+ let reg = /^([0-9A-Za-z_\/\\-]{17}|[0-9A-Za-z_\/\\-]{6})$/;
if (!reg.test(value)) {
- callback(new Error("装置id为17位编码"));
+ callback(new Error("装置id为17位编码或者6位编码"));
} else {
callback();
}
@@ -217,8 +231,10 @@ export default {
formInfo: {},
channelOptions: [], //所有通道列表
filterOption: [], //筛选后的通道列表
+
lineOptions: [], //线路
toweridOptions: [], //杆塔
+ dyOptions: [], //电压
//装置类型
devTypeOptions: [
{
@@ -300,10 +316,11 @@ export default {
},
//判断
getdataform(val) {
- this.getLine();
+ this.getSearchdy();
this.getChannel();
if (val == null) {
return (this.formInfo = {
+ dyId: "",
lineId: "",
towerId: "",
cmdid: "",
@@ -340,7 +357,8 @@ export default {
"workingDate",
new Date(this.formInfo.workingDate).getTime()
);
- console.log(this.formInfo.workingDate);
+
+ console.log(this.formInfo);
},
//通道号值改变
changeHandle() {
@@ -441,49 +459,55 @@ export default {
});
},
- //获取所有线路
- getLine() {
- getLineAndGtInfo({ type: 1 }).then((res) => {
- this.lineOptions = res.data.list;
- if (res.data.list.length == 0) {
- this.lineOptions = [];
- this.formInfo.lineId = "";
- } else {
+ //获取电压信息
+ getSearchdy() {
+ getSearchInfo({ type: 1 })
+ .then((res) => {
+ this.dyOptions = res.data.list;
+ if (res.data.list.length == 0) {
+ this.dyOptions = [];
+ this.formInfo.dyId = "";
+ } else {
+ this.dyOptions = res.data.list;
+
+ if (this.photoDialogTitle == "新增") {
+ // this.formInfo.lineId = res.data.list[0].id;
+ this.$set(this.formInfo, "dyId", res.data.list[0].id);
+ }
+ }
+
+ this.getSearchxl();
+ })
+ .catch((err) => {});
+ },
+ //获取线路数据
+ getSearchxl() {
+ getSearchInfo({ type: 2, id: this.formInfo.dyId })
+ .then((res) => {
this.lineOptions = res.data.list;
+
if (this.photoDialogTitle == "新增") {
// this.formInfo.lineId = res.data.list[0].id;
this.$set(this.formInfo, "lineId", res.data.list[0].id);
}
- }
- // this.dyOptions = res.data.list;
- // this.formdata.dyid = res.data.list == [] ? "" : res.data.list[0].id;
- this.getTower();
- });
+ this.getSearchgt();
+ })
+ .catch((err) => {});
},
- //获取所有杆塔
- getTower() {
- getLineAndGtInfo({ type: 2, id: this.formInfo.lineId })
+ //获取杆塔数据
+ getSearchgt() {
+ getSearchInfo({ type: 3, id: this.formInfo.lineId })
.then((res) => {
- if (res.data.list.length == 0) {
- this.toweridOptions = [];
- this.formInfo.towerId = "";
- } else {
- this.toweridOptions = res.data.list;
- if (this.photoDialogTitle == "新增" || this.photoDialogtype == 1) {
- // this.formInfo.towerId = res.data.list[0].id;
- this.$set(this.formInfo, "towerId", res.data.list[0].id);
- this.photoDialogtype = 0;
- }
+ this.toweridOptions = res.data.list;
+
+ if (this.photoDialogTitle == "新增") {
+ // this.formInfo.lineId = res.data.list[0].id;
+ this.$set(this.formInfo, "towerId", res.data.list[0].id);
}
})
.catch((err) => {});
},
- getTowerchange() {
- if (this.photoDialogTitle == "修改") {
- this.photoDialogtype = 1;
- }
- this.getTower();
- },
+
//获取所有通道
getChannel() {
getAllChannelListJoggle()
diff --git a/src/views/photographicDevice/components/towerDialog.vue b/src/views/photographicDevice/components/towerDialog.vue
index a8a50fa..fea596f 100644
--- a/src/views/photographicDevice/components/towerDialog.vue
+++ b/src/views/photographicDevice/components/towerDialog.vue
@@ -13,6 +13,20 @@
:rules="rules"
:model="formdata"
>
+
+
+
+
+