hn2.0
fanluyan 2 years ago
parent b22bd3dd13
commit cd0069339a

@ -19,8 +19,9 @@
<img
ref="picJpg"
class="animImg"
:src="bigPicPath.substring(0, bigPicPath.length - 9)"
:src="bigPicPath"
:data-source="bigPicPath"
@click="showbigpicPath(bigPicPath)"
/>
</div>
@ -265,6 +266,11 @@ export default {
},
created() {},
methods: {
showbigpicPath(data) {
console.log(data);
this.bigPicPath = data.substring(0, data.length - 9);
console.log(this.bigPicPath);
},
handleBigPicbox() {
this.showBigpic = true;
},

@ -55,9 +55,11 @@
:class="data.onlinestatus == 0 ? 'disconnect' : ''"
style="margin-right: 6px"
></span>
<span :class="data.onlinestatus == 0 ? 'disconnect' : ''">{{
node.label
}}</span>
<span
:id="data.id"
:class="data.onlinestatus == 0 ? 'disconnect' : ''"
>{{ node.label }}</span
>
</span>
<!-- <span :class="data.onlinestatus == 0 ? 'disconnect' : ''"
>{{ node.level }}---{{ node.label }}</span
@ -253,6 +255,7 @@ import carouselChart from "../components/carouselChart.vue";
import setschedule from "./components/setschedule.vue";
import infoDialog from "./components/infoDialog.vue";
import gpsPosition from "./components/gpsPosition.vue";
import { number } from "echarts";
export default {
components: {
previewContain,
@ -311,6 +314,7 @@ export default {
selectDyId: "", //线
selectLineId: "",
selectTowerId: "",
currentId: "",
};
},
watch: {
@ -323,11 +327,10 @@ export default {
computed: {},
mounted() {
this.dragControllerDiv();
this.getDateTime();
},
created() {
//
this.getDateTime();
console.log(this.dateValue);
this.getLineTreeList();
this.treetimer = window.setInterval(() => {
setTimeout(this.getLineTreeStatus(), 0);
@ -338,11 +341,12 @@ export default {
getDateTime() {
console.log(new Date());
this.dateValue = new Date().getTime();
},
//
changedate() {
console.log(this.dateValue);
},
// //
// changedate() {
// console.log(this.dateValue);
// },
//treenode
handleNodeClick(data) {
console.log(data);
@ -373,6 +377,7 @@ export default {
this.getChannelList(data.id);
// this.getTerminalPhotoList(id, date, data.id);
}
localStorage.setItem("currentId", data.id);
},
//
getLineTreeStatus() {
@ -405,13 +410,13 @@ export default {
this.onlineNum = res.data.onlineNum;
this.totalNum = res.data.totalNum;
if (this.lineTreeData[0].list[0].list.length > 0) {
this.emptyText = "暂无数据";
this.selectData = this.lineTreeData[0]; //
this.emptyText = "暂无数据";
this.currentNodekey = this.lineTreeData[0].id; //
console.log(this.currentNodekey);
this.type = 1;
this.newCurrentId = this.lineTreeData[0].id;
this.previewData = this.lineTreeData[0]; //
//localStorage.setItem("currentId", this.currentNodekey);
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey); //
this.channelId = this.currentNodekey;
@ -481,7 +486,7 @@ export default {
},
//
changedate() {
console.log(this.dateValue);
console.log(this.dateValue.getTime());
console.log(this.zztermId);
this.getTerminalPhotoList(
this.selectChannelValue,
@ -529,6 +534,7 @@ export default {
this.zztermId = data.termid;
this.selectChannelValue = data.channnelname;
this.$refs.tree.setCurrentKey(this.zztermId); //
this.selectedRegion(this.zztermId);
if (data.photoTime == "" || data.photoTime == null) {
this.getDateTime();
} else {
@ -578,6 +584,19 @@ export default {
});
//this.getTerminalPhotoList(data.channelid, this.dateValue, this.zztermId);
},
selectedRegion(id) {
console.log("滚动到选中定位的位置");
// Iddom
const node = document.getElementById(id);
setTimeout(() => {
if (node) {
this.$nextTick(() => {
// scrollIntoViewdom block: 'center'
node.scrollIntoView({ block: "center" });
});
}
}, 100);
},
//
handleCommandpic(command) {
console.log(command);
@ -879,6 +898,18 @@ export default {
console.log(this.selectDyId, this.selectLineId, this.selectTowerId);
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({
path: "/realTimeSearch",
query: {
@ -888,6 +919,7 @@ export default {
termId: this.zztermId,
cmdId: this.zzCmdid,
channelId: this.selectChannelValue,
date: this.dateValue,
},
});
// sessionStorage.setItem("keyPath", " realTimeSearch");

@ -85,6 +85,8 @@
type="datetime"
placeholder="开始日期"
value-format="timestamp"
:picker-options="pickerOptions"
default-time="00:00:00"
>
</el-date-picker>
</el-form-item>
@ -95,6 +97,7 @@
default-time="23:59:59"
placeholder="结束日期"
value-format="timestamp"
:picker-options="pickerOptions"
class="ml10"
>
</el-date-picker>
@ -116,7 +119,11 @@
class="bigpic"
v-if="item.path.indexOf('videos') == -1"
>
<img :src="item.path" :data-source="item.path + '!1366x768'" />
<img
:src="item.path + '!1366x768'"
:class="'bigpath' + index"
@click="showbigpicPath(item, index)"
/>
<!-- <el-image :src="item.path" lazy></el-image> -->
@ -202,6 +209,11 @@ import { getSearchInfo, getRealtimePhoto } from "@/utils/api/index";
export default {
data() {
return {
pickerOptions: {
disabledDate(date) {
return date.getTime() > Date.now(); //
},
},
OptionssalseImg: {
inline: false,
button: true,
@ -250,26 +262,37 @@ export default {
// new Date(new Date().toLocaleDateString()).getTime(),
// new Date().getTime(),
// ]);
this.$set(this.formdata, "endtime", new Date().getTime());
if (JSON.stringify(this.$route.query) === "{}") {
this.$set(
this.formdata,
"starttime",
new Date(new Date().toLocaleDateString()).getTime()
);
this.$set(this.formdata, "endtime", new Date().getTime());
if (JSON.stringify(this.$route.query) === "{}") {
this.getSearchdy();
} else {
console.log(this.$route.query);
this.getSearchdy();
console.log(this.$route.query.date);
this.formdata.dyid = this.$route.query.dyId;
this.formdata.lineid = this.$route.query.lineId;
this.formdata.towerid = this.$route.query.towerId;
this.formdata.channelid = this.$route.query.channelId;
this.formdata.termid = this.$route.query.termId;
this.$set(this.formdata, "starttime", this.$route.query.date);
}
},
methods: {
showbigpicPath(item, index) {
console.log(item, index);
var personBox = document.querySelector(".bigpath" + index);
console.log(personBox.src);
console.log(item.path);
personBox.src = item.path;
},
//
getSearchdy() {
getSearchInfo({ type: 1 })

@ -40,6 +40,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="changedate"
:picker-options="morepickerOptions"
>
</el-date-picker>
@ -101,6 +102,7 @@ export default {
mounted() {
this.getTermData();
this.init();
console.log(this.value1);
},
watch: {
"$store.state.collapse"(val) {
@ -115,6 +117,9 @@ export default {
},
},
methods: {
changedate() {
console.log(this.value1);
},
getTermData() {
getTermStatistics()
.then((res) => {

Loading…
Cancel
Save