添加电压等

jc
fanluyan 1 year ago
parent cddc7c6692
commit 965aec327b

@ -78,21 +78,21 @@ export default {
index: "/realTimeSearch", index: "/realTimeSearch",
title: "历史图片", title: "历史图片",
}, },
// { {
// icon: "iconfont icon-fubing", icon: "iconfont icon-fubing",
// index: "/weatherIce", index: "/weatherIce",
// title: "", title: "气象覆冰",
// subs: [ subs: [
// { {
// index: "/weather", index: "/weather",
// title: "", title: "气象监测",
// }, },
// { {
// index: "/icing", index: "/icing",
// title: "", title: "覆冰监测",
// }, },
// ], ],
// }, },
{ {
icon: "el-icon-files", icon: "el-icon-files",
index: "/property", index: "/property",

@ -55,6 +55,7 @@ export default {
this.$refs.formInfo.validate((valid) => { this.$refs.formInfo.validate((valid) => {
if (valid) { if (valid) {
if (this.title == "新增") { if (this.title == "新增") {
this.$set(this.formdata, "dyValue", "220");
addDyJoggle(this.formdata) addDyJoggle(this.formdata)
.then((res) => { .then((res) => {
this.isShow = false; this.isShow = false;

@ -136,17 +136,17 @@ export default {
getLineTreeList() { getLineTreeList() {
this.role = localStorage.getItem("role"); this.role = localStorage.getItem("role");
console.log(this.role); console.log(this.role);
const menuName = localStorage.getItem("menuActive"); const menuName = this.$route.path;
console.log(menuName); console.log(menuName);
this.treeLoading = true; this.treeLoading = true;
let devtypeList; let devtypeList;
// //
if (menuName == "/weather") { if (menuName == "/weather") {
devtypeList = [2]; devtypeList = [3];
} }
// //
if (menuName == "/icing") { if (menuName == "/icing") {
devtypeList = [3]; devtypeList = [2];
} }
console.log(devtypeList); console.log(devtypeList);
getICEdyTreeList({ getICEdyTreeList({
@ -154,6 +154,7 @@ export default {
devtype: devtypeList, devtype: devtypeList,
}) })
.then((res) => { .then((res) => {
this.lineTreeData = [];
this.lineTreeData = res.data.list; this.lineTreeData = res.data.list;
this.treeLoading = false; this.treeLoading = false;
this.icecurrentData = JSON.parse( this.icecurrentData = JSON.parse(

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

@ -13,11 +13,25 @@
:rules="rules" :rules="rules"
:model="formInfo" :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-form-item label="线路名称:" prop="lineId">
<el-select <el-select
v-model="formInfo.lineId" v-model="formInfo.lineId"
placeholder="请选择" placeholder="请选择"
@change="getTowerchange" @change="getSearchgt"
> >
<el-option <el-option
v-for="item in lineOptions" v-for="item in lineOptions"
@ -189,8 +203,8 @@ import {
addTerminalJoggle, addTerminalJoggle,
updateTerminalJoggle, updateTerminalJoggle,
getAllChannelListJoggle, getAllChannelListJoggle,
getLineAndGtInfo,
getProtocolList, getProtocolList,
getSearchInfo,
} from "@/utils/api/index"; } from "@/utils/api/index";
export default { export default {
props: { props: {
@ -205,9 +219,9 @@ export default {
data() { data() {
let validCmid = (rule, value, callback) => { 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)) { if (!reg.test(value)) {
callback(new Error("装置id为17位编码")); callback(new Error("装置id为17位编码或者6位编码"));
} else { } else {
callback(); callback();
} }
@ -217,8 +231,10 @@ export default {
formInfo: {}, formInfo: {},
channelOptions: [], // channelOptions: [], //
filterOption: [], // filterOption: [], //
lineOptions: [], //线 lineOptions: [], //线
toweridOptions: [], // toweridOptions: [], //
dyOptions: [], //
// //
devTypeOptions: [ devTypeOptions: [
{ {
@ -300,10 +316,11 @@ export default {
}, },
// //
getdataform(val) { getdataform(val) {
this.getLine(); this.getSearchdy();
this.getChannel(); this.getChannel();
if (val == null) { if (val == null) {
return (this.formInfo = { return (this.formInfo = {
dyId: "",
lineId: "", lineId: "",
towerId: "", towerId: "",
cmdid: "", cmdid: "",
@ -340,7 +357,8 @@ export default {
"workingDate", "workingDate",
new Date(this.formInfo.workingDate).getTime() new Date(this.formInfo.workingDate).getTime()
); );
console.log(this.formInfo.workingDate);
console.log(this.formInfo);
}, },
// //
changeHandle() { changeHandle() {
@ -441,49 +459,55 @@ export default {
}); });
}, },
//线 //
getLine() { getSearchdy() {
getLineAndGtInfo({ type: 1 }).then((res) => { getSearchInfo({ type: 1 })
this.lineOptions = res.data.list; .then((res) => {
if (res.data.list.length == 0) { this.dyOptions = res.data.list;
this.lineOptions = []; if (res.data.list.length == 0) {
this.formInfo.lineId = ""; this.dyOptions = [];
} else { 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; this.lineOptions = res.data.list;
if (this.photoDialogTitle == "新增") { if (this.photoDialogTitle == "新增") {
// this.formInfo.lineId = res.data.list[0].id; // this.formInfo.lineId = res.data.list[0].id;
this.$set(this.formInfo, "lineId", res.data.list[0].id); this.$set(this.formInfo, "lineId", res.data.list[0].id);
} }
} this.getSearchgt();
// this.dyOptions = res.data.list; })
// this.formdata.dyid = res.data.list == [] ? "" : res.data.list[0].id; .catch((err) => {});
this.getTower();
});
}, },
// //
getTower() { getSearchgt() {
getLineAndGtInfo({ type: 2, id: this.formInfo.lineId }) getSearchInfo({ type: 3, id: this.formInfo.lineId })
.then((res) => { .then((res) => {
if (res.data.list.length == 0) { this.toweridOptions = res.data.list;
this.toweridOptions = [];
this.formInfo.towerId = ""; if (this.photoDialogTitle == "新增") {
} else { // this.formInfo.lineId = res.data.list[0].id;
this.toweridOptions = res.data.list; this.$set(this.formInfo, "towerId", res.data.list[0].id);
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;
}
} }
}) })
.catch((err) => {}); .catch((err) => {});
}, },
getTowerchange() {
if (this.photoDialogTitle == "修改") {
this.photoDialogtype = 1;
}
this.getTower();
},
// //
getChannel() { getChannel() {
getAllChannelListJoggle() getAllChannelListJoggle()

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

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

@ -49,7 +49,12 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="放大倍数" class="zoomBox"> <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-tag type="info">{{ channelForm.zoomVal }}</el-tag>
</el-form-item> </el-form-item>

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

Loading…
Cancel
Save