Merge branch 'fly' into xy-ly

master
fanluyan 2 years ago
commit 93c5f052c3

@ -35,18 +35,36 @@
<div class="imageCenter" v-loading="loading"> <div class="imageCenter" v-loading="loading">
<div class="imgList" v-for="(item, index) in picList" :key="index"> <div class="imgList" v-for="(item, index) in picList" :key="index">
<viewer <viewer
v-if="item.path !== null && item.path.indexOf('videos') == -1"
class="bigpic" class="bigpic"
v-if="!item.path.includes('mp4')"
:style=" :style="
item.path ? 'backgroundImage:url(' + item.path + '!128x72)' : '' item.path ? 'backgroundImage:url(' + item.path + '!128x72)' : ''
" "
> >
<img :src="item.path + '!1280x720'" /> <img :src="item.path + '!1280x720'" />
<!-- <el-image :src="item.path + '!1280x720'" lazy></el-image> -->
</viewer> </viewer>
<video width="100%" height="90%" controls autoplay v-else> <div
<source :src="item.path" type="video/mp4" /> class="bigpic"
</video> v-else-if="item.path !== null && item.path.indexOf('videos') !== -1"
>
<video
width="100%"
height="100%"
:src="item.path"
controls="controls"
></video>
</div>
<div class="bigpic" v-else>
<img src="../../assets/img/nopic.jpg" />
</div>
<!-- <div class="bigimg" v-else-if="item.path.indexOf('videos') !== -1">
<video
width="100%"
height="100%"
:src="item.path"
controls="controls"
></video>
</div> -->
<p class="infoTop"> <p class="infoTop">
{{ item.linename }}-{{ item.displayname }}-{{ item.channnelname }} {{ item.linename }}-{{ item.displayname }}-{{ item.channnelname }}

@ -4,6 +4,7 @@
title="时间表设置" title="时间表设置"
:visible.sync="isShow" :visible.sync="isShow"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="handleclose"
width="60%" width="60%"
> >
<el-tabs v-model="activeName" @tab-click="handleClick" v-loading="loading"> <el-tabs v-model="activeName" @tab-click="handleClick" v-loading="loading">
@ -25,7 +26,11 @@
</div> </div>
<div class="flexno bt30"> <div class="flexno bt30">
<div class="w8">时间表:</div> <div class="w8">时间表:</div>
<div class="w80 flexonly" v-if="this.shedulenr.length !== 0"> <div
class="w80 flexonly"
v-loading="timeloading"
v-if="this.shedulenr.length !== 0"
>
<el-tag <el-tag
class="mr10 mt10" class="mr10 mt10"
size="mini" size="mini"
@ -218,6 +223,9 @@ export default {
checkList: "", // checkList: "", //
newcmdzzid: "", newcmdzzid: "",
newrequestId: "", newrequestId: "",
timer: null, //
timernum: 0,
timeloading: false,
}; };
}, },
mounted() {}, mounted() {},
@ -240,6 +248,7 @@ export default {
}, },
// //
inquirebtn() { inquirebtn() {
this.loading = true;
getSchedulenr({ getSchedulenr({
channelid: this.selaccess, channelid: this.selaccess,
terminalid: this.selfacilityId, terminalid: this.selfacilityId,
@ -254,9 +263,10 @@ export default {
this.$message.error("查询失败"); this.$message.error("查询失败");
}); });
}, },
// //
inquireRealbtn() { inquireRealbtn() {
console.log(this.selaccess, this.selfacilityId, this.newcmdzzid); console.log(this.selaccess, this.selfacilityId, this.newcmdzzid);
this.timeloading = true;
selectPhotoTimeGetJoggle({ selectPhotoTimeGetJoggle({
channel: this.selaccess, channel: this.selaccess,
termId: this.selfacilityId, termId: this.selfacilityId,
@ -266,10 +276,11 @@ export default {
this.$message.success("查询成功"); this.$message.success("查询成功");
console.log(this.shedulenr); console.log(this.shedulenr);
this.newrequestId = res.data.requestId; this.newrequestId = res.data.requestId;
// this.searchRealtime();
this.searchRealtime(); this.searchRealtime();
// this.shedulenr = res.data.list.join("; ") this.timer = window.setInterval(() => {
// this.shedulenr = res.data.list; this.searchRealtime();
// this.loading = false; }, 10000);
}) })
.catch((err) => { .catch((err) => {
this.$message.error("查询失败"); this.$message.error("查询失败");
@ -283,11 +294,13 @@ export default {
requestId: this.newrequestId, requestId: this.newrequestId,
}).then((res) => { }).then((res) => {
console.log(res); console.log(res);
if (res.data.isNew) { if (res.data.isNew == true) {
console.log(res.data.list); this.shedulenr = res.data.list;
} else { this.$message({
//timer = setInterval(this.searchRealtime, 3000); message: "装置信息已更新",
// this.searchRealtime(); type: "success",
});
clearInterval(this.timer);
} }
}); });
}, },
@ -422,6 +435,7 @@ export default {
}, },
closebtn() { closebtn() {
this.isShowset = false; this.isShowset = false;
clearInterval(this.timer);
this.deviceList(); this.deviceList();
}, },
display() { display() {
@ -430,6 +444,10 @@ export default {
hide() { hide() {
this.isShow = false; this.isShow = false;
}, },
handleclose() {
clearInterval(this.timer);
console.log("关闭轮询");
},
}, },
}; };
</script> </script>

@ -319,6 +319,7 @@ export default {
this.channelOption = []; this.channelOption = [];
this.channelListOption = []; this.channelListOption = [];
this.getChannelList(this.channelId); //id this.getChannelList(this.channelId); //id
this.stop();
}, },
// //
getChannelList(id) { getChannelList(id) {

Loading…
Cancel
Save