hn2.0
fanluyan 2 years ago
parent b22bd3dd13
commit cd0069339a

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

@ -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("滚动到选中定位的位置");
// Iddom
const node = document.getElementById(id);
setTimeout(() => {
if (node) {
this.$nextTick(() => {
// scrollIntoViewdom 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");

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

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

Loading…
Cancel
Save