Merge branch 'fly' into xy-ly

hn2.0
fanluyan 2 years ago
commit a1154885c8

@ -194,21 +194,21 @@
>
<!-- <div
class="nosee"
:style="'backgroundImage:url(' + photoPic + '!1280x720)'"
:style="'backgroundImage:url(' + photoPic + '!1366x768)'"
></div>
<viewer :options="OptionssalseImg" class="bigimgView">
<img
@load="imgOnload"
ref="picJpg"
class="animImg"
:src="photoPic + '!1280x720'"
:src="photoPic + '!1366x768'"
/>
</viewer> -->
<img
ref="picJpg"
class="animImg"
@load="imgOnload"
:src="photoPic + '!1280x720'"
:src="photoPic + '!1366x768'"
/>
<canvas id="myCanvas" class="myCanvas" ref="myCanvas"></canvas>
</div>
@ -617,8 +617,8 @@ export default {
cursor: pointer;
.picboxI {
position: relative;
max-width: 1280px;
max-height: 720px;
max-width: 1366px;
max-height: 768px;
margin: auto;
animation-name: scaleDraw;
/*关键帧名称*/
@ -629,8 +629,8 @@ export default {
animation-duration: 0.65s;
img {
max-width: 1280px;
max-height: 720px;
max-width: 1366px;
max-height: 768px;
margin: auto;
}
.myCanvas {

@ -9,6 +9,7 @@
bigPicPath.indexOf('videos') == -1
"
:style="bigPicPath ? 'backgroundImage:url(' + bigPicPath + ')' : ''"
@click="handleBigPicbox(bigPicPath)"
>
<!-- @click="handleBigPicbox(bigPicPath)" -->
<div
@ -16,11 +17,11 @@
:style="'backgroundImage:url(' + bigPicPath + ')'"
></div>
<viewer :options="OptionssalseImg" class="bigimgView">
<img ref="picJpg" class="animImg" :src="bigPicPath + ''" />
<img ref="picJpg" class="animImg" :src="bigPicPath" />
</viewer>
<canvas id="myCanvas" class="myCanvas" ref="myCanvas"></canvas>
<!-- <img ref="picJpg" class="animImg" :src="bigPicPath + '!1280x720'" /> -->
<!-- <img ref="picJpg" class="animImg" :src="bigPicPath + '!1366x768'" /> -->
</div>
<div class="bigimg nopic" v-if="bigPicPath.indexOf('nopic') !== -1">
<img
@ -40,7 +41,7 @@
></video>
</div>
<!-- <div
<div
v-if="
showBigpic &&
bigPicPath.indexOf('nopic') == -1 &&
@ -51,9 +52,11 @@
>
<div class="picboxI">
<img class="maskPic" :src="bigPicPath" />
<i @click="closePic" class="el-icon-circle-close"></i>
</div>
</div> -->
<div class="viewClose">
<i @click="closePic" class="el-icon-close"></i>
</div>
</div>
<div class="arrow leftArrow" v-if="this.bigNum != 0" @click="leftClick">
<i class="el-icon-arrow-left"></i>
</div>
@ -218,7 +221,7 @@ export default {
},
mounted() {
console.log(this.terminalPhoto);
this.bigPicPath = this.terminalPhoto[0].path + "!1280x720";
this.bigPicPath = this.terminalPhoto[0].path + "!1366x768";
this.fiveList = this.terminalPhoto.slice(this.page - 1, this.pagesize);
this.total = this.terminalPhoto.length / this.pagesize;
console.log(this.fiveList);
@ -243,7 +246,7 @@ export default {
},
watch: {
terminalPhoto: function (newVal, oldVal) {
this.bigPicPath = this.terminalPhoto[0].path + "!1280x720";
this.bigPicPath = this.terminalPhoto[0].path + "!1366x768";
this.fiveList = this.terminalPhoto.slice(this.page - 1, this.pagesize);
this.total = this.terminalPhoto.length / this.pagesize;
},
@ -315,13 +318,13 @@ export default {
(this.page - 1) * this.pagesize,
this.page * this.pagesize
);
this.bigPicPath = this.fiveList[this.activeSmall].path + "!1280x720";
this.bigPicPath = this.fiveList[this.activeSmall].path + "!1366x768";
this.videopath = this.fiveList[this.activeSmall].thumb;
},
//
leftClick() {
this.bigNum--; //
this.bigPicPath = this.terminalPhoto[this.bigNum].path + "!1280x720";
this.bigPicPath = this.terminalPhoto[this.bigNum].path + "!1366x768";
this.activeSmall--;
console.log("activeSmall", this.activeSmall, "bigNum", this.bigNum);
console.log(this.page);
@ -347,7 +350,7 @@ export default {
//
rightClick() {
this.bigNum++; //
this.bigPicPath = this.terminalPhoto[this.bigNum].path + "!1280x720";
this.bigPicPath = this.terminalPhoto[this.bigNum].path + "!1366x768";
this.activeSmall++;
console.log("activeSmall", this.activeSmall, "bigNum", this.bigNum);
if (this.activeSmall > 4) {
@ -374,7 +377,7 @@ export default {
console.log(row);
console.log();
this.activeSmall = index;
this.bigPicPath = row.path + "!1280x720";
this.bigPicPath = row.path + "!1366x768";
getCoordinate({
channelId: row.channelId,
needPic: "1",
@ -455,7 +458,7 @@ export default {
box-sizing: border-box;
.showPic {
position: fixed;
background-color: rgba(0, 0, 0, 50%);
background-color: rgba(0, 0, 0, 0.5);
bottom: 0;
left: 0;
overflow: hidden;
@ -466,8 +469,8 @@ export default {
cursor: pointer;
.picboxI {
position: relative;
max-width: 1280px;
max-height: 720px;
max-width: 1366px;
max-height: 768px;
margin: auto;
animation-name: scaleDraw;
/*关键帧名称*/
@ -478,17 +481,29 @@ export default {
animation-duration: 0.65s;
img {
max-width: 1280px;
max-height: 720px;
max-width: 1366px;
max-height: 768px;
margin: auto;
}
.el-icon-circle-close {
}
.viewClose {
-webkit-app-region: no-drag;
background-color: rgba(0, 0, 0, 0.5);
border-radius: 50%;
cursor: pointer;
height: 80px;
overflow: hidden;
position: absolute;
right: -40px;
top: -40px;
transition: background-color 0.15s;
width: 80px;
.el-icon-close {
bottom: 16px;
left: 16px;
position: absolute;
right: -24px;
font-size: 48px;
color: #fff;
cursor: pointer;
top: -24px;
font-size: 18px;
}
}
}

@ -1,282 +0,0 @@
<template>
<div class="thumb-example">
<!-- swiper1 -->
<swiper
class="swiper gallery-top"
:options="swiperOptionTop"
ref="swiperTop"
>
<swiper-slide
class="slide-1"
v-for="(item, index) in terminalPhoto"
:key="item.id"
>
<viewer class="bigimg" v-if="item.path.indexOf('nopic') == -1">
<!-- <img :src="item.path + '!1280x720'" alt="" /> -->
<img v-if="index == 0" :src="item.path + '!1280x720'" />
<img
v-else
src="../../assets/img/loading.jpg"
:data-src="item.path + '!1280x720'"
class="swiper-lazy"
/>
</viewer>
<div class="bigimg" v-else>
<img :src="item.path" alt="" />
</div>
</swiper-slide>
<div
class="swiper-button-next swiper-button-white"
slot="button-next"
></div>
<div
class="swiper-button-prev swiper-button-white"
slot="button-prev"
></div>
</swiper>
<!-- swiper2 Thumbs -->
<swiper
class="swiper gallery-thumbs"
:options="swiperOptionThumbs"
ref="swiperThumbs"
>
<swiper-slide
class="slide"
v-for="(item, index) in terminalPhoto"
:key="item.id"
>
<div class="bigimg" v-if="item.path.indexOf('nopic') == -1">
<!-- <img :src="item.path + '!1280x720'" alt="" /> -->
<img v-if="index == 0" :src="item.path + '!260x160'" />
<img
v-else
src="../../assets/img/loading.jpg"
:data-src="item.path + '!260x160'"
class="swiper-lazy"
/>
</div>
<div class="bigimg" v-else>
<img :src="item.path" alt="" />
</div>
<!-- <img v-if="index == 0" :src="item.path + '!1280x720'" />
<img
src="item.path + '!260x160'"
alt=""
:data-src="item.path + '!260x160'"
class="swiper-lazy"
v-else-if="item.path.indexOf('nopic') == -1"
/>
<img :src="item.path" alt="" v-else /> -->
<p class="timeInfo" v-if="item.path.indexOf('nopic') == -1">
<el-tooltip
class="item"
effect="dark"
content="拍照时间"
placement="top-start"
>
<span>{{ $moment(item.photoTime).format("HH:mm:ss") }}</span>
</el-tooltip>
(
<el-tooltip
class="item"
effect="dark"
content="图片上传时间"
placement="top-start"
>
<span> {{ $moment(item.recvTime).format("HH:mm:ss") }}</span>
</el-tooltip>
)
<span>--通道{{ item.channelId }}</span>
</p>
</swiper-slide>
</swiper>
</div>
</template>
<script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.css";
export default {
components: {
Swiper,
SwiperSlide,
},
props: {
terminalPhoto: {
type: Array,
default: () => [],
},
},
data() {
return {
swiperOptionTop: {
spaceBetween: 10,
//loop: true,
freeMode: true,
// loopedSlides: 1,
lazy: {
loadPrevNext: true,
loadPrevNextAmount: 1,
loadOnTransitionStart: true,
},
// lazyLoading: true, //
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
observer: true, //swiperswiper
observeParents: true, //swiperswiper
onSlideChangeEnd: function (swiper) {
swiper.update();
},
virtual: {
slides: (function () {
var slides = [];
for (var i = 0; i < 100; i += 1) {
slides.push("Slide " + (i + 1));
}
return slides;
})(),
},
},
swiperOptionThumbs: {
spaceBetween: 10,
centeredSlides: true,
slidesPerView: "auto",
touchRatio: 0.2,
lazyLoading: true, //
slideToClickedSlide: true,
lazy: {
loadPrevNext: true,
loadPrevNextAmount: 5,
loadOnTransitionStart: true,
//loadOnTransitionStart: true,
},
observer: true, //swiperswiper
observeParents: true, //swiperswiper
onSlideChangeEnd: function (swiper) {
swiper.update();
},
//loop: true,
//loopedSlides: 4,
},
};
},
mounted() {
this.$nextTick(() => {
const swiperTop = this.$refs.swiperTop.$swiper;
const swiperThumbs = this.$refs.swiperThumbs.$swiper;
swiperTop.controller.control = swiperThumbs;
swiperThumbs.controller.control = swiperTop;
});
},
methods: {},
};
</script>
<style lang="less">
.thumb-example {
width: 100%;
display: flex;
flex-direction: column;
height: calc(100% - 26px);
box-sizing: border-box;
.gallery-top {
//background: #fcc;
width: 100%;
height: 80%;
overflow: hidden;
margin-bottom: 4px;
//border: 3px solid transparent;
.slide-1 {
width: 100%;
overflow: hidden;
.bigimg {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
img {
width: 100%;
height: 100%;
object-fit: fill;
}
}
.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
opacity: 0.35;
cursor: auto;
pointer-events: none;
display: none !important;
}
}
.gallery-thumbs {
width: 100%;
height: 18%;
.slide {
width: 20%;
border: 3px solid transparent;
overflow: hidden;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
.bigimg {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
img {
//width: 100%;
height: 100%;
object-fit: fill;
}
}
.timeInfo {
position: absolute;
bottom: 0px;
width: 100%;
background: #f0f0f0;
padding: 8px 0px;
font-size: 12px;
text-align: center;
color: #333;
}
}
.swiper-button-next.swiper-button-white,
.swiper-container-rtl .swiper-button-prev.swiper-button-white,
.swiper-button-prev.swiper-button-white,
.swiper-container-rtl .swiper-button-next.swiper-button-white {
width: 40px;
height: 40px;
border-radius: 30px;
position: absolute;
top: 50%;
transform: translateY(-50%);
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
color: #fff;
text-align: center;
line-height: 60px;
}
.swiper-button-next:after,
.swiper-container-rtl .swiper-button-prev:after,
.swiper-button-prev:after,
.swiper-container-rtl .swiper-button-next:after {
transform: scale(0.5);
}
}
// https://v1.github.surmon.me/vue-awesome-swiper/
</style>

@ -1,280 +0,0 @@
<template>
<div class="thumb-example">
<!-- swiper1 -->
<swiper
class="swiper gallery-top"
:options="swiperOptionTop"
ref="swiperTop"
>
<!-- -->
<!-- <viewer class="swiper-slide">
</viewer> -->
<!-- <viewer class="swiper-slide">
</viewer> -->
<div
class="swiper-button-next swiper-button-white"
slot="button-next"
></div>
<div
class="swiper-button-prev swiper-button-white"
slot="button-prev"
></div>
</swiper>
<!-- swiper2 Thumbs -->
<swiper
class="swiper gallery-thumbs"
:options="swiperOptionThumbs"
ref="swiperThumbs"
>
<swiper-slide
class="slide"
v-for="(item, index) in terminalPhoto"
:key="item.id"
>
<div class="bigimg" v-if="item.path.indexOf('nopic') == -1">
<!-- <img :src="item.path + '!1280x720'" alt="" /> -->
<img v-if="index == 0" :src="item.path + '!260x160'" />
<img
v-else
src="../../assets/img/loading.jpg"
:data-src="item.path + '!260x160'"
class="swiper-lazy"
/>
</div>
<div class="bigimg" v-else>
<img :src="item.path" alt="" />
</div>
<!-- <img v-if="index == 0" :src="item.path + '!1280x720'" />
<img
src="item.path + '!260x160'"
alt=""
:data-src="item.path + '!260x160'"
class="swiper-lazy"
v-else-if="item.path.indexOf('nopic') == -1"
/>
<img :src="item.path" alt="" v-else /> -->
<p class="timeInfo" v-if="item.path.indexOf('nopic') == -1">
<el-tooltip
class="item"
effect="dark"
content="拍照时间"
placement="top-start"
>
<span>{{ $moment(item.photoTime).format("HH:mm:ss") }}</span>
</el-tooltip>
(
<el-tooltip
class="item"
effect="dark"
content="图片上传时间"
placement="top-start"
>
<span> {{ $moment(item.recvTime).format("HH:mm:ss") }}</span>
</el-tooltip>
)
<span>--通道{{ item.channelId }}</span>
</p>
</swiper-slide>
</swiper>
</div>
</template>
<script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.css";
export default {
components: {
Swiper,
SwiperSlide,
},
props: {
terminalPhoto: {
type: Array,
default: () => [],
},
},
data() {
let a = "1111111111111";
return {
imgflag: false,
swiperOptionTop: {
lazy: {
loadPrevNext: true,
loadPrevNextAmount: 1,
loadOnTransitionStart: true,
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
virtual: {
slides: [],
renderSlide: function (slide, index) {
if (slide.path.indexOf("nopic") != -1) {
return `<div class="swiper-slide"><div class="bigimg"><img src="static/img/nopic.0e9cfc7c.jpg" alt="" /></div></div>`;
} else {
return (
`<view class="swiper-slide">` +
`<div class="bigimg" id="imgView" style="background:url(${
slide.path + "!80x720"
});background-size:100% 100%">` +
`<img id="imgid" src=" ${slide.path + "!1280x720"} " />
</view>`
);
}
},
},
},
swiperOptionThumbs: {
spaceBetween: 10,
centeredSlides: true,
slidesPerView: "auto",
slideToClickedSlide: true,
lazy: {
loadPrevNext: true,
loadPrevNextAmount: 5,
loadOnTransitionStart: true,
},
},
};
},
mounted() {
this.$nextTick(() => {
const swiperTop = this.$refs.swiperTop.$swiper;
const swiperThumbs = this.$refs.swiperThumbs.$swiper;
swiperTop.controller.control = swiperThumbs;
swiperThumbs.controller.control = swiperTop;
});
},
methods: {},
watch: {
terminalPhoto: function (newVal, oldVal) {
this.swiperOptionTop.virtual.slides = newVal;
},
},
created() {
console.log(this.swiperOptionTop.virtual.slides);
this.swiperOptionTop.virtual.slides = this.terminalPhoto;
},
};
</script>
<style lang="less">
.thumb-example {
width: 100%;
display: flex;
flex-direction: column;
height: calc(100% - 26px);
box-sizing: border-box;
.gallery-top {
//background: #fcc;
width: 100%;
height: 80%;
overflow: hidden;
margin-bottom: 4px;
//border: 3px solid transparent;
.swiper-slide {
width: 100%;
overflow: hidden;
.bigimg {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
img {
width: 100%;
height: 100%;
object-fit: fill;
}
}
.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
opacity: 0.35;
cursor: auto;
pointer-events: none;
display: none !important;
}
}
.gallery-thumbs {
width: 100%;
height: 18%;
.slide {
width: 20%;
border: 3px solid transparent;
overflow: hidden;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
.bigimg {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
img {
//width: 100%;
height: 100%;
object-fit: fill;
}
}
.timeInfo {
position: absolute;
bottom: 0px;
width: 100%;
background: #f0f0f0;
padding: 8px 0px;
font-size: 12px;
text-align: center;
color: #333;
}
}
.swiper-button-next.swiper-button-white,
.swiper-container-rtl .swiper-button-prev.swiper-button-white,
.swiper-button-prev.swiper-button-white,
.swiper-container-rtl .swiper-button-next.swiper-button-white {
width: 40px;
height: 40px;
border-radius: 30px;
position: absolute;
top: 50%;
transform: translateY(-50%);
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
color: #fff;
text-align: center;
line-height: 60px;
}
.swiper-button-next:after,
.swiper-container-rtl .swiper-button-prev:after,
.swiper-button-prev:after,
.swiper-container-rtl .swiper-button-next:after {
transform: scale(0.5);
}
.pismask {
width: 100%;
height: 100%;
position: fixed;
background: rgba(0, 0, 0, 0.5);
z-index: 99999;
top: 0px;
left: 0px;
}
}
// https://v1.github.surmon.me/vue-awesome-swiper/
</style>

@ -51,7 +51,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"></el-button>
<!-- <el-button type="primary" @click="onReset"></el-button> -->
<el-button type="primary" @click="onReset"></el-button>
</el-form-item>
</el-form>
</div>
@ -335,7 +335,7 @@
>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="380" v-else>
<el-table-column fixed="right" label="操作" width="180" v-else>
<template slot-scope="scope">
<el-button
@click.native.stop="handleRevisePhoto(scope.row)"
@ -348,7 +348,7 @@
>图片标记</el-button
>
<el-button
<!-- <el-button
type="text"
@click.native.stop="handleShowGPS(scope.row)"
>获取GPS位置</el-button
@ -370,7 +370,7 @@
<el-dropdown-item command="open">开启GPS</el-dropdown-item>
<el-dropdown-item command="close">关闭GPS</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown> -->
<el-button
type="text"
class="deleteText"
@ -523,9 +523,11 @@ export default {
},
//
onReset() {
this.formdata = {};
this.getSearchdy();
this.page = 1
this.pageSize = 20
this.page = 1;
this.pageSize = 20;
this.terminalList();
},
////
@ -573,103 +575,7 @@ export default {
this.$refs.addPhotoDialogref.getdataform(data);
console.log(data);
},
//
handleDeviceReset(data) {
this.$confirm("此操作将复位装置, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
resetTerminalApi({ cmId: data.cmdId })
.then((res) => {
if (res.code == 200) {
this.$message({
duration: 1500,
showClose: true,
message: "装置已复位",
type: "success",
});
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.msg,
type: "error",
});
}
})
.catch((err) => {});
})
.catch(() => {
// this.$message({
// duration: 1500,
// showClose: true,
// type: "info",
// message: "",
// });
});
},
//GPS
handleShowGPS(data) {
this.$refs.gpsdialog_ref.display();
this.$refs.gpsdialog_ref.getgpsData(data);
console.log(data);
},
//gps
changeGPS(val, row) {
console.log(val, row);
setTermGPSJoggle({ gpsstatus: val, cmdId: row.cmdId })
.then((res) => {
console.log(res);
if (val == 0) {
this.$message({
duration: 1500,
message: "关闭GPS",
type: "success",
showClose: true,
});
} else {
this.$message({
duration: 1500,
message: "成功开启GPS",
type: "success",
showClose: true,
});
}
})
.catch((err) => {
console.log(err); //
});
},
handleCommand(command, row) {
console.log(command, row);
switch (command) {
case "open": //
this.changeGPS(1, row);
break;
case "close": //
this.changeGPS(0, row);
break;
}
},
//
// gpsChange(val) {
// console.log(val);
// },
//
handleImageCapture(data) {
this.$refs.imageCaptureref.display();
this.$refs.imageCaptureref.getSingleAccess(data);
this.$refs.imageCaptureref.getRatio();
},
//
handleVideoCapture(data) {
this.$refs.videoCaptureref.display();
this.$refs.videoCaptureref.getSingleAccess(data);
this.$refs.videoCaptureref.getRatio();
},
//线
handlepicture(data) {
console.log(data);

@ -45,7 +45,7 @@
: ''
"
>
<img :src="item.path + '!1280x720'" />
<img :src="item.path + '!1366x768'" />
</viewer>
<div
class="bigpic"

@ -110,7 +110,7 @@
class="bigpic"
v-if="item.path.indexOf('videos') == -1"
>
<img :src="item.path + '!1280x720'" />
<img :src="item.path + '!1366x768'" />
<!-- <el-image :src="item.path" lazy></el-image> -->

Loading…
Cancel
Save