添加电压等

jc
fanluyan 1 year ago
parent cddc7c6692
commit 965aec327b

@ -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",

@ -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;

@ -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(

@ -17,7 +17,7 @@
<el-table-column prop="updateTime" label="时间">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers.updateTime !== null">
<span v-if="scope.row.lastWeathers !== null">
{{
$moment(scope.row.lastWeathers.updateTime * 1000).format(
"YYYY-MM-DD HH:mm:ss"
@ -29,7 +29,7 @@
</el-table-column>
<el-table-column label="温度(℃)">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers.airTemperature !== null">{{
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.airTemperature
}}</span>
<span v-else> - </span>
@ -37,7 +37,7 @@
</el-table-column>
<el-table-column prop="humidity" label="湿度(%RH)">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers.humidity !== null">{{
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.humidity
}}</span>
<span v-else> - </span>
@ -45,7 +45,7 @@
</el-table-column>
<el-table-column prop="maxWindSpeed" label="最大风速(m/s)">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers.maxWindSpeed !== null">{{
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.maxWindSpeed
}}</span>
<span v-else> - </span>
@ -53,7 +53,7 @@
</el-table-column>
<el-table-column prop="windDirection" label="瞬时风向(°)">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers.windDirection !== null">{{
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.windDirection
}}</span>
<span v-else> - </span>
@ -61,7 +61,7 @@
</el-table-column>
<el-table-column prop="precipitation" label="雨量(mm/hour)">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers.precipitation !== null">{{
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.precipitation
}}</span>
<span v-else> - </span>
@ -69,7 +69,7 @@
</el-table-column>
<el-table-column prop="airPressure" label="气压(hPa(百帕))">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers.airPressure !== null">{{
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.airPressure
}}</span>
<span v-else> - </span>
@ -77,10 +77,9 @@
</el-table-column>
<el-table-column prop="radiationIntensity" label="日照(W/m2)">
<template slot-scope="scope">
<span
v-if="scope.row.lastWeathers.radiationIntensity !== null"
>{{ scope.row.lastWeathers.radiationIntensity }}</span
>
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.radiationIntensity
}}</span>
<span v-else> - </span>
</template>
</el-table-column>
@ -89,7 +88,7 @@
<el-button
type="text"
@click="moreDataClick(scope.row)"
v-if="scope.row.lastWeathers.updateTime"
v-if="scope.row.lastWeathers !== null"
>更多历史数据</el-button
>
<span v-else> </span>

@ -13,11 +13,25 @@
:rules="rules"
:model="formInfo"
>
<el-form-item label="电压等级:" prop="dyId">
<el-select
v-model="formInfo.dyId"
placeholder="请选择"
@change="getSearchxl"
>
<el-option
v-for="item in dyOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="线路名称:" prop="lineId">
<el-select
v-model="formInfo.lineId"
placeholder="请选择"
@change="getTowerchange"
@change="getSearchgt"
>
<el-option
v-for="item in lineOptions"
@ -189,8 +203,8 @@ import {
addTerminalJoggle,
updateTerminalJoggle,
getAllChannelListJoggle,
getLineAndGtInfo,
getProtocolList,
getSearchInfo,
} from "@/utils/api/index";
export default {
props: {
@ -205,9 +219,9 @@ export default {
data() {
let validCmid = (rule, value, callback) => {
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()

@ -13,6 +13,20 @@
:rules="rules"
:model="formdata"
>
<el-form-item label="电压等级:" prop="dyId">
<el-select
v-model="formdata.dyId"
placeholder="请选择"
@change="getSearchxl"
>
<el-option
v-for="item in dyOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="线路名称:" prop="lineId">
<el-select v-model="formdata.lineId" placeholder="请选择">
<el-option
@ -44,15 +58,22 @@
</el-dialog>
</template>
<script>
import { getLineListApi, addTowerApi, updateTowerApi } from "@/utils/api/index";
import {
getLineListApi,
addTowerApi,
updateTowerApi,
getSearchInfo,
} from "@/utils/api/index";
export default {
data() {
return {
isShow: false,
lineOptions: [],
dyOptions: [],
formdata: {},
rules: {
dyId: [{ required: true, message: "请选择电压", trigger: "blur" }],
towerName: [
{ required: true, message: "请输入杆塔名称", trigger: "blur" },
],
@ -66,17 +87,32 @@ export default {
},
};
},
mounted() {
this.getLineListdata();
},
mounted() {},
methods: {
getLineListdata() {
getLineListApi({ pageindex: 1, pagesize: 100 })
//
getSearchdy() {
getSearchInfo({ type: 1 })
.then((res) => {
this.dyOptions = res.data.list;
this.getSearchxl();
})
.catch((err) => {});
},
//线
getSearchxl() {
getSearchInfo({ type: 2, id: this.formdata.dyId })
.then((res) => {
this.lineOptions = res.data.list;
})
.catch((err) => {});
},
// getLineListdata() {
// getLineListApi({ pageindex: 1, pagesize: 100 })
// .then((res) => {
// this.lineOptions = res.data.list;
// })
// .catch((err) => {});
// },
//
getdataform(val) {
//this.formdata = val;
@ -123,6 +159,7 @@ export default {
},
display() {
this.isShow = true;
this.getSearchdy();
},
hide() {
this.isShow = false;

@ -24,9 +24,8 @@
class="bigPic"
v-else-if="currentPicPath && mediaType == 0"
v-loading="picLoading"
@click="handleBigPicbox(currentPicPath)"
>
<!-- :preview-src-list="srcList" -->
<!-- :preview-src-list="srcList" @click="handleBigPicbox(currentPicPath)" -->
<el-image
:src="currentPicPath + '!1366x768'"
@load="loadImage"
@ -35,6 +34,7 @@
id="alarmPic"
width="100%"
height="100%"
:preview-src-list="srcList"
>
<template slot="error">
<img src="../../../assets/img/nodatapic2.jpg" />
@ -176,7 +176,7 @@
</div>
<!-- 点击出现大图 -->
<div v-if="showBigpic" class="showPic" @click="closePic($event)">
<!-- <div v-if="showBigpic" class="showPic" @click="closePic($event)">
<div class="picboxI">
<img
id="bigimg2"
@ -186,13 +186,13 @@
width="100%"
height="100%"
/>
<!-- <canvas id="bigCanvas2" class="mybigCanvas" ref="myCanvasbig2"></canvas> -->
<canvas id="bigCanvas2" class="mybigCanvas" ref="myCanvasbig"></canvas>
</div>
<div class="viewClose" @click="closePic($event)">
<i class="el-icon-close"></i>
</div>
</div>
</div> -->
</div>
</template>

@ -49,7 +49,12 @@
</el-radio-group>
</el-form-item>
<el-form-item label="放大倍数" class="zoomBox">
<el-slider v-model="channelForm.zoomVal"></el-slider>
<el-slider
v-model="channelForm.zoomVal"
:min="1"
:max="4"
:step="0.1"
></el-slider>
<el-tag type="info">{{ channelForm.zoomVal }}</el-tag>
</el-form-item>

@ -13,6 +13,20 @@
:rules="rules"
:model="formdata"
>
<el-form-item label="电压等级:" prop="dyId">
<el-select
v-model="formdata.dyId"
placeholder="请选择"
@change="getSearchxl"
>
<el-option
v-for="item in dyOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="线路名称:" prop="lineId">
<el-select v-model="formdata.lineId" placeholder="请选择">
<el-option
@ -44,7 +58,12 @@
</el-dialog>
</template>
<script>
import { getLineListApi, addTowerApi, updateTowerApi } from "@/utils/api/index";
import {
getLineListApi,
addTowerApi,
updateTowerApi,
getSearchInfo,
} from "@/utils/api/index";
export default {
props: {
@ -54,8 +73,10 @@ export default {
return {
isShow: false,
lineOptions: [],
dyOptions: [],
formdata: {},
rules: {
dyId: [{ required: true, message: "请选择电压", trigger: "blur" }],
name: [{ required: true, message: "请输入杆塔名称", trigger: "blur" }],
lineId: [
{ required: true, message: "请选择线路编号", trigger: "blur" },
@ -67,17 +88,32 @@ export default {
},
};
},
mounted() {
this.getLineListdata();
},
mounted() {},
methods: {
getLineListdata() {
getLineListApi({ pageindex: 1, pagesize: 100 })
//
getSearchdy() {
getSearchInfo({ type: 1 })
.then((res) => {
this.dyOptions = res.data.list;
this.getSearchxl();
})
.catch((err) => {});
},
//线
getSearchxl() {
getSearchInfo({ type: 2, id: this.formdata.dyId })
.then((res) => {
this.lineOptions = res.data.list;
})
.catch((err) => {});
},
// getLineListdata() {
// getLineListApi({ pageindex: 1, pagesize: 100 })
// .then((res) => {
// this.lineOptions = res.data.list;
// })
// .catch((err) => {});
// },
//
getdataform(val) {
if (val == null) {
@ -147,6 +183,7 @@ export default {
},
display() {
this.isShow = true;
this.getSearchdy();
},
hide() {
this.isShow = false;

Loading…
Cancel
Save