|
|
@ -55,9 +55,11 @@
|
|
|
|
:class="data.onlinestatus == 0 ? 'disconnect' : ''"
|
|
|
|
:class="data.onlinestatus == 0 ? 'disconnect' : ''"
|
|
|
|
style="margin-right: 6px"
|
|
|
|
style="margin-right: 6px"
|
|
|
|
></span>
|
|
|
|
></span>
|
|
|
|
<span :class="data.onlinestatus == 0 ? 'disconnect' : ''">{{
|
|
|
|
<span
|
|
|
|
node.label
|
|
|
|
:id="data.id"
|
|
|
|
}}</span>
|
|
|
|
:class="data.onlinestatus == 0 ? 'disconnect' : ''"
|
|
|
|
|
|
|
|
>{{ node.label }}</span
|
|
|
|
|
|
|
|
>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<!-- <span :class="data.onlinestatus == 0 ? 'disconnect' : ''"
|
|
|
|
<!-- <span :class="data.onlinestatus == 0 ? 'disconnect' : ''"
|
|
|
|
>{{ node.level }}---{{ node.label }}</span
|
|
|
|
>{{ node.level }}---{{ node.label }}</span
|
|
|
@ -253,6 +255,7 @@ import carouselChart from "../components/carouselChart.vue";
|
|
|
|
import setschedule from "./components/setschedule.vue";
|
|
|
|
import setschedule from "./components/setschedule.vue";
|
|
|
|
import infoDialog from "./components/infoDialog.vue";
|
|
|
|
import infoDialog from "./components/infoDialog.vue";
|
|
|
|
import gpsPosition from "./components/gpsPosition.vue";
|
|
|
|
import gpsPosition from "./components/gpsPosition.vue";
|
|
|
|
|
|
|
|
import { number } from "echarts";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
previewContain,
|
|
|
|
previewContain,
|
|
|
@ -311,6 +314,7 @@ export default {
|
|
|
|
selectDyId: "", //获取当前选中的电压线路等信息
|
|
|
|
selectDyId: "", //获取当前选中的电压线路等信息
|
|
|
|
selectLineId: "",
|
|
|
|
selectLineId: "",
|
|
|
|
selectTowerId: "",
|
|
|
|
selectTowerId: "",
|
|
|
|
|
|
|
|
currentId: "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
@ -323,11 +327,10 @@ export default {
|
|
|
|
computed: {},
|
|
|
|
computed: {},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
this.dragControllerDiv();
|
|
|
|
this.dragControllerDiv();
|
|
|
|
|
|
|
|
this.getDateTime();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
//获取日期
|
|
|
|
//获取日期
|
|
|
|
this.getDateTime();
|
|
|
|
|
|
|
|
console.log(this.dateValue);
|
|
|
|
|
|
|
|
this.getLineTreeList();
|
|
|
|
this.getLineTreeList();
|
|
|
|
this.treetimer = window.setInterval(() => {
|
|
|
|
this.treetimer = window.setInterval(() => {
|
|
|
|
setTimeout(this.getLineTreeStatus(), 0);
|
|
|
|
setTimeout(this.getLineTreeStatus(), 0);
|
|
|
@ -338,11 +341,12 @@ export default {
|
|
|
|
getDateTime() {
|
|
|
|
getDateTime() {
|
|
|
|
console.log(new Date());
|
|
|
|
console.log(new Date());
|
|
|
|
this.dateValue = new Date().getTime();
|
|
|
|
this.dateValue = new Date().getTime();
|
|
|
|
},
|
|
|
|
|
|
|
|
//选择时间
|
|
|
|
|
|
|
|
changedate() {
|
|
|
|
|
|
|
|
console.log(this.dateValue);
|
|
|
|
console.log(this.dateValue);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// //选择时间
|
|
|
|
|
|
|
|
// changedate() {
|
|
|
|
|
|
|
|
// console.log(this.dateValue);
|
|
|
|
|
|
|
|
// },
|
|
|
|
//点击当前选中的treenode
|
|
|
|
//点击当前选中的treenode
|
|
|
|
handleNodeClick(data) {
|
|
|
|
handleNodeClick(data) {
|
|
|
|
console.log(data);
|
|
|
|
console.log(data);
|
|
|
@ -373,6 +377,7 @@ export default {
|
|
|
|
this.getChannelList(data.id);
|
|
|
|
this.getChannelList(data.id);
|
|
|
|
// this.getTerminalPhotoList(id, date, data.id);
|
|
|
|
// this.getTerminalPhotoList(id, date, data.id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
localStorage.setItem("currentId", data.id);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//轮询获取装置状态
|
|
|
|
//轮询获取装置状态
|
|
|
|
getLineTreeStatus() {
|
|
|
|
getLineTreeStatus() {
|
|
|
@ -405,13 +410,13 @@ export default {
|
|
|
|
this.onlineNum = res.data.onlineNum;
|
|
|
|
this.onlineNum = res.data.onlineNum;
|
|
|
|
this.totalNum = res.data.totalNum;
|
|
|
|
this.totalNum = res.data.totalNum;
|
|
|
|
if (this.lineTreeData[0].list[0].list.length > 0) {
|
|
|
|
if (this.lineTreeData[0].list[0].list.length > 0) {
|
|
|
|
this.emptyText = "暂无数据";
|
|
|
|
|
|
|
|
this.selectData = this.lineTreeData[0]; //第一个选中的数据
|
|
|
|
this.selectData = this.lineTreeData[0]; //第一个选中的数据
|
|
|
|
|
|
|
|
this.emptyText = "暂无数据";
|
|
|
|
this.currentNodekey = this.lineTreeData[0].id; //第一个数据
|
|
|
|
this.currentNodekey = this.lineTreeData[0].id; //第一个数据
|
|
|
|
console.log(this.currentNodekey);
|
|
|
|
|
|
|
|
this.type = 1;
|
|
|
|
this.type = 1;
|
|
|
|
this.newCurrentId = this.lineTreeData[0].id;
|
|
|
|
this.newCurrentId = this.lineTreeData[0].id;
|
|
|
|
this.previewData = this.lineTreeData[0]; //预览图数据
|
|
|
|
this.previewData = this.lineTreeData[0]; //预览图数据
|
|
|
|
|
|
|
|
//localStorage.setItem("currentId", this.currentNodekey);
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$refs.tree.setCurrentKey(this.currentNodekey); //一定要加这个选中了否则样式没有出来
|
|
|
|
this.$refs.tree.setCurrentKey(this.currentNodekey); //一定要加这个选中了否则样式没有出来
|
|
|
|
this.channelId = this.currentNodekey;
|
|
|
|
this.channelId = this.currentNodekey;
|
|
|
@ -481,7 +486,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//选择时间
|
|
|
|
//选择时间
|
|
|
|
changedate() {
|
|
|
|
changedate() {
|
|
|
|
console.log(this.dateValue);
|
|
|
|
console.log(this.dateValue.getTime());
|
|
|
|
console.log(this.zztermId);
|
|
|
|
console.log(this.zztermId);
|
|
|
|
this.getTerminalPhotoList(
|
|
|
|
this.getTerminalPhotoList(
|
|
|
|
this.selectChannelValue,
|
|
|
|
this.selectChannelValue,
|
|
|
@ -529,6 +534,7 @@ export default {
|
|
|
|
this.zztermId = data.termid;
|
|
|
|
this.zztermId = data.termid;
|
|
|
|
this.selectChannelValue = data.channnelname;
|
|
|
|
this.selectChannelValue = data.channnelname;
|
|
|
|
this.$refs.tree.setCurrentKey(this.zztermId); //一定要加这个选中了否则样式没有出来
|
|
|
|
this.$refs.tree.setCurrentKey(this.zztermId); //一定要加这个选中了否则样式没有出来
|
|
|
|
|
|
|
|
this.selectedRegion(this.zztermId);
|
|
|
|
if (data.photoTime == "" || data.photoTime == null) {
|
|
|
|
if (data.photoTime == "" || data.photoTime == null) {
|
|
|
|
this.getDateTime();
|
|
|
|
this.getDateTime();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -578,6 +584,19 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
//this.getTerminalPhotoList(data.channelid, this.dateValue, this.zztermId);
|
|
|
|
//this.getTerminalPhotoList(data.channelid, this.dateValue, this.zztermId);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
selectedRegion(id) {
|
|
|
|
|
|
|
|
console.log("滚动到选中定位的位置");
|
|
|
|
|
|
|
|
// 通过Id获取到对应的dom元素
|
|
|
|
|
|
|
|
const node = document.getElementById(id);
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
if (node) {
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
|
|
// 通过scrollIntoView方法将对应的dom元素定位到可见区域 【block: 'center'】这个属性是在垂直方向居中显示
|
|
|
|
|
|
|
|
node.scrollIntoView({ block: "center" });
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 100);
|
|
|
|
|
|
|
|
},
|
|
|
|
//主动拍照
|
|
|
|
//主动拍照
|
|
|
|
handleCommandpic(command) {
|
|
|
|
handleCommandpic(command) {
|
|
|
|
console.log(command);
|
|
|
|
console.log(command);
|
|
|
@ -879,6 +898,18 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
console.log(this.selectDyId, this.selectLineId, this.selectTowerId);
|
|
|
|
console.log(this.selectDyId, this.selectLineId, this.selectTowerId);
|
|
|
|
console.log(this.zzCmdid, this.selectChannelValue);
|
|
|
|
console.log(this.zzCmdid, this.selectChannelValue);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof this.dateValue == "number") {
|
|
|
|
|
|
|
|
console.log(this.dateValue);
|
|
|
|
|
|
|
|
console.log(new Date(new Date().toLocaleDateString()).getTime());
|
|
|
|
|
|
|
|
// var newDateValue = this.dateValue.toString();
|
|
|
|
|
|
|
|
// this.dateValue = newDateValue.slice(0, -3) + "000";
|
|
|
|
|
|
|
|
this.dateValue = new Date(new Date().toLocaleDateString()).getTime();
|
|
|
|
|
|
|
|
console.log(1689782400000);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.dateValue = this.dateValue.getTime();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.$router.push({
|
|
|
|
this.$router.push({
|
|
|
|
path: "/realTimeSearch",
|
|
|
|
path: "/realTimeSearch",
|
|
|
|
query: {
|
|
|
|
query: {
|
|
|
@ -888,6 +919,7 @@ export default {
|
|
|
|
termId: this.zztermId,
|
|
|
|
termId: this.zztermId,
|
|
|
|
cmdId: this.zzCmdid,
|
|
|
|
cmdId: this.zzCmdid,
|
|
|
|
channelId: this.selectChannelValue,
|
|
|
|
channelId: this.selectChannelValue,
|
|
|
|
|
|
|
|
date: this.dateValue,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
// sessionStorage.setItem("keyPath", " realTimeSearch");
|
|
|
|
// sessionStorage.setItem("keyPath", " realTimeSearch");
|
|
|
|