图片轮巡添加历史图片

hn2.0
fanluyan 2 years ago
parent e737c6fa7e
commit f52d25b45f

@ -53,11 +53,11 @@ export default {
return { return {
activeIndex: "/realTimeMonitor", activeIndex: "/realTimeMonitor",
items: [ items: [
// { {
// icon: "el-icon-s-home", icon: "el-icon-s-home",
// index: "/videoHistory", index: "/videoHistory",
// title: "", title: "首页",
// }, },
{ {
icon: "el-icon-camera", icon: "el-icon-camera",
index: "/realTimeMonitor", index: "/realTimeMonitor",

@ -398,7 +398,7 @@ export default {
selectRow: {}, selectRow: {},
alarmLoading: false, alarmLoading: false,
canvasloading: false, canvasloading: false,
tableShow: true, // tableShow: false, //
zoomD: 1, zoomD: 1,
canvansdata: "", canvansdata: "",
current: 0, current: 0,

@ -34,8 +34,8 @@
v-if="index < colNum * i && index >= colNum * (i - 1)" v-if="index < colNum * i && index >= colNum * (i - 1)"
:key="'col-' + index" :key="'col-' + index"
> >
<div class="imgList"> <div class="imgList" @click="handleShowHistory(item)">
<viewer <!-- <viewer
:options="OptionssalseImg" :options="OptionssalseImg"
v-if="item.path !== null && item.path.indexOf('videos') == -1" v-if="item.path !== null && item.path.indexOf('videos') == -1"
class="bigpic" class="bigpic"
@ -46,7 +46,18 @@
" "
> >
<img :src="item.path + '!1366x768'" /> <img :src="item.path + '!1366x768'" />
</viewer> </viewer> -->
<div
v-if="item.path !== null && item.path.indexOf('videos') == -1"
class="bigpic"
:style="
item.path
? 'backgroundImage:url(' + item.path + '!128x72)'
: ''
"
>
<img :src="item.path + '!1366x768'" />
</div>
<div <div
class="bigpic" class="bigpic"
v-else-if=" v-else-if="
@ -63,21 +74,19 @@
<div class="bigpic" v-else> <div class="bigpic" v-else>
<img src="../../assets/img/nopic.jpg" /> <img src="../../assets/img/nopic.jpg" />
</div> </div>
<p class="infoTop"> <div class="picInfo">
{{ item.linename }}-{{ item.towername }}-{{ <p>
{{ item.linename }}-{{ item.towername }}-{{
item.alias !== null && item.alias !== "" item.alias !== null && item.alias !== ""
? item.alias ? item.alias
: item.channnelname : item.channnelname
}} }}
<!-- {{
item.displayname !== null && item.displayname !== ""
? item.displayname
: item.cmdid
}}- -->
</p> </p>
<p class="infoBottom" v-if="item.photoTime !== null"> <p class="timeinfo" v-if="item.photoTime !== null">
{{ $moment(item.photoTime).format("yy-MM-DD HH:mm:ss") }}  {{ $moment(item.photoTime).format("YYYY-MM-DD HH:mm:ss") }}
</p> </p>
<p class="timeinfo" v-else></p>
</div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -141,12 +150,37 @@
<el-button type="primary" @click="submitForm()"> </el-button> <el-button type="primary" @click="submitForm()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
title="历史图片"
:visible.sync="historyPicdialog"
width="1366px"
:close-on-click-modal="false"
class="showDialogHistoryPic"
>
<div class="title">
{{ picInfoData.linename }}-{{ picInfoData.towername }}-{{
picInfoData.alias !== null && picInfoData.alias !== ""
? picInfoData.alias
: picInfoData.channnelname
}} {{ $moment(picInfoData.photoTime).format("YYYY-MM-DD ") }}
</div>
<carouselChart
ref="carouselpic"
:terminalPhoto="terminalPhoto"
v-if="terminalPhoto.length > 0"
v-loading="historyPicLoading"
></carouselChart>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getPictureList } from "@/utils/api/index"; import { getPictureList, getTerminalPhotoListJoggle } from "@/utils/api/index";
import qs from "qs"; import carouselChart from "../components/carouselChart.vue";
export default { export default {
components: {
carouselChart,
},
data() { data() {
return { return {
OptionssalseImg: { OptionssalseImg: {
@ -200,8 +234,8 @@ export default {
// //
rowNum: "", rowNum: "",
colNum: "", colNum: "",
rowradio: "2", rowradio: "4",
colradio: "2", colradio: "4",
selLayout: 1, selLayout: 1,
options: [ options: [
{ {
@ -213,9 +247,55 @@ export default {
label: "倒序", label: "倒序",
}, },
], ],
//
picInfoData: {}, //
historyPicdialog: false,
historyPicLoading: false,
terminalPhoto: [], //
nopicPath: require("@/assets/img/nopic.jpg"),
}; };
}, },
methods: { methods: {
//
handleShowHistory(item) {
console.log(item);
this.picInfoData = item;
console.log(this.picInfoData);
this.historyPicdialog = true;
//this.getTerminalPhotoList(item.cmdid);
this.getTerminalPhotoList(item.channelid, item.photoTime, item.termid);
},
//
getTerminalPhotoList(channelid, date, termId) {
this.terminalPhoto = [];
this.historyPicLoading = true;
getTerminalPhotoListJoggle({
channelid: channelid,
time: date,
terminalid: termId,
})
.then((res) => {
console.log(res);
this.historyPicLoading = false;
if (res.data.list.length == 0) {
this.terminalPhoto = [
{
path: this.nopicPath,
termId: termId,
mediatype: 0,
},
];
} else {
this.terminalPhoto = res.data.list;
}
})
.catch((err) => {
console.log(err); //
});
},
setbtn() { setbtn() {
this.isRuning = false; this.isRuning = false;
this.pauseCountdown(); this.pauseCountdown();
@ -409,29 +489,20 @@ export default {
height: 100%; height: 100%;
cursor: pointer; cursor: pointer;
} }
.infoTop { .picInfo {
position: absolute; position: absolute;
bottom: 28px; background: #169e8ca1;
left: 0px; color: #fff;
height: auto;
font-size: 14px; font-size: 14px;
background: linear-gradient(180deg, #00eaff 10%, @color-primary 100%); left: 0;
color: @color-white; bottom: 0;
font-weight: normal; width: 100%;
margin-top: 2px; text-align: center;
padding-left: 5px; .timeinfo {
padding-right: 5px; margin-top: 4px;
margin-bottom: 4px;
} }
.infoBottom {
position: absolute;
bottom: 4px;
color: @color-white;
left: 0px;
font-size: 14px;
background: linear-gradient(180deg, #00eaff 10%, @color-primary 100%);
font-weight: normal;
margin-top: 2px;
padding-left: 5px;
padding-right: 5px;
} }
} }
} }
@ -462,6 +533,23 @@ export default {
} }
} }
} }
.showDialogHistoryPic {
.el-dialog__body {
height: 768px;
.title {
height: 32px;
padding-left: 12px;
line-height: 32px;
color: #fff;
font-size: 14px;
background: linear-gradient(180deg, #4cdbc8 10%, #128071 100%);
text-align: center;
}
.thumb-example {
//height: 100%;
}
}
}
} }
[v-cloak] { [v-cloak] {
display: none; display: none;

Loading…
Cancel
Save