优化查看历史图片

menu1.0
fanluyan 9 months ago
parent 61fef9b3ab
commit 37cf2800ad

@ -99,7 +99,7 @@
" "
> >
<!-- <el-image v-lazy="item.path + '!260x160'"></el-image> --> <!-- <el-image v-lazy="item.path + '!260x160'"></el-image> -->
<img v-lazy="item.path + '!260x160'" /> <img v-lazy="item.path + '!160x101'" />
<!-- <img :src="item.path + '!260x160'" />--> <!-- <img :src="item.path + '!260x160'" />-->
<!-- :class="{ alarmSpan: item.isAlarm === 1 }" --> <!-- :class="{ alarmSpan: item.isAlarm === 1 }" -->
<p class="timeInfo"> <p class="timeInfo">
@ -134,7 +134,7 @@
</div> </div>
<div class="picBox" v-else-if="item.mediaType == 1"> <div class="picBox" v-else-if="item.mediaType == 1">
<!-- <el-image :src="item.thumb + '!260x160'"></el-image> --> <!-- <el-image :src="item.thumb + '!260x160'"></el-image> -->
<img v-lazy="item.thumb + '!260x160'" /> <img v-lazy="item.thumb + '!260x161'" />
<p class="timeInfo"> <p class="timeInfo">
<i class="el-icon-video-camera"></i> <i class="el-icon-video-camera"></i>
<el-tooltip <el-tooltip
@ -218,6 +218,9 @@ export default {
protocolInfo: { protocolInfo: {
type: Number, type: Number,
}, },
fistPath: {
type: String,
},
}, },
data() { data() {
return { return {
@ -233,7 +236,7 @@ export default {
"Item 9", "Item 9",
"Item 10", "Item 10",
], ],
picLoading: true, picLoading: false,
currentPicPath: "", // currentPicPath: "", //
mediaType: "", // mediaType: "", //
activeSmall: 0, //, activeSmall: 0, //,
@ -260,6 +263,7 @@ export default {
}, },
mounted() { mounted() {
////console.log(this.terminalPhoto); ////console.log(this.terminalPhoto);
this.changeBigPic(this.terminalPhoto[0], 0); this.changeBigPic(this.terminalPhoto[0], 0);
}, },
watch: { watch: {
@ -457,6 +461,9 @@ export default {
loadImage() { loadImage() {
console.log("loading"); console.log("loading");
this.picLoading = false; this.picLoading = false;
this.currentPicPath = this.fistPath;
this.drawlineBig(this.picDataAlarm); this.drawlineBig(this.picDataAlarm);
}, },
setDefaultImage(e) { setDefaultImage(e) {

@ -19,10 +19,22 @@
</div> </div>
</div> </div>
<div class="picmain" v-loading="picLoading"> <div class="picmain" v-loading="picLoading">
<el-skeleton v-if="fistflag" style="width: 100%; height: 100%" animated>
<template slot="template">
<el-skeleton-item variant="image" />
<div class="littleBox">
<el-skeleton-item variant="image" />
<el-skeleton-item variant="image" />
<el-skeleton-item variant="image" />
<el-skeleton-item variant="image" />
</div>
</template>
</el-skeleton>
<carouselChart <carouselChart
ref="carouselpic" ref="carouselpic"
:terminalPhoto="terminalPhoto" :terminalPhoto="terminalPhoto"
:photoNum="photoNum" :photoNum="photoNum"
:fistPath="fistPath"
v-if="terminalPhoto.length > 0" v-if="terminalPhoto.length > 0"
></carouselChart> ></carouselChart>
</div> </div>
@ -47,6 +59,8 @@ export default {
nopicPath: require("@/assets/img/nopic.jpg"), nopicPath: require("@/assets/img/nopic.jpg"),
picLoading: false, picLoading: false,
photoNum: 10, photoNum: 10,
fistPath: "",
fistflag: true,
}; };
}, },
mounted() {}, mounted() {},
@ -55,6 +69,7 @@ export default {
this.isShow = true; this.isShow = true;
console.log(data); console.log(data);
this.deviceData = data; this.deviceData = data;
this.fistPath = data.path;
if (data.photoTime == null) { if (data.photoTime == null) {
data.photoTime = new Date().getTime(); data.photoTime = new Date().getTime();
} }
@ -63,7 +78,7 @@ export default {
// //
getTerminalPhotoList(channelid, date, termId) { getTerminalPhotoList(channelid, date, termId) {
this.terminalPhoto = []; this.terminalPhoto = [];
this.picLoading = true; //this.picLoading = true;
getTerminalPhotoListJoggle({ getTerminalPhotoListJoggle({
channelid: channelid, channelid: channelid,
time: date, time: date,
@ -72,6 +87,7 @@ export default {
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.picLoading = false; this.picLoading = false;
this.fistflag = false;
if (res.data.list.length == 0) { if (res.data.list.length == 0) {
this.terminalPhoto = [ this.terminalPhoto = [
{ {
@ -107,6 +123,7 @@ export default {
}, },
handleclose() { handleclose() {
this.isShow = false; this.isShow = false;
this.fistflag = true;
}, },
}, },
}; };
@ -151,6 +168,33 @@ export default {
.picmain { .picmain {
width: 100%; width: 100%;
height: calc(100% - 10px); height: calc(100% - 10px);
.el-skeleton {
width: 100%;
height: 100%;
.el-skeleton__image {
width: 100%;
height: 80%;
svg {
width: 60%;
height: 60%;
}
}
.littleBox {
display: flex;
height: 18%;
margin-top: 2%;
align-items: center;
justify-content: space-around;
.el-skeleton__image {
width: 23%;
height: 100%;
}
svg {
width: 30%;
height: 30%;
}
}
}
} }
} }
</style> </style>

Loading…
Cancel
Save