123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <template>
- <div class="module-main">
- <div class="module-box">
- <div class="main-top-box">
- <div class="module-public module-bottom-box">
- <div class="header">巡更现场照片</div>
- <div class="bottom-content-box">
- <div v-for="(item,index) in imgs.slice(0, Math.ceil(imgs.length / 2))" :key="index" class="imgbox">
- <img :src="item.images" alt="" @click="img(item.images)">
- <div class="name">{{item.addr}}</div>
- </div>
- </div>
- <div class="bottom-content-box">
- <div v-for="(item2,index2) in imgs.slice(Math.ceil(imgs.length / 2))" :key="index2" class="imgbox">
- <img :src="item2.images" alt="" @click="img(item2.images)">
- <div class="name">{{item2.addr}}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div></template>
- <script>
- import Vue from 'vue';
- import Component from 'vue-class-component';
- import api from '../../api';
- @Component({
- props: {
- data: {
- type: Object,
- default: null,
- },
- },
- })
- export default class Echarts extends Vue {
- imgs = []
- created() {
- this.getPatrolImg3();
- setInterval(() => {
- this.getPatrolImg3();
- }, 15000);
- }
- getPatrolImg3() {
- api.getPatrolImg3().then((res) => {
- this.imgs = res.data;
- }).catch(() => {}).finally(() => {
- });
- }
- img(val) {
- this.$alert(`<div style="width:100%;height:80%"><img src="${val}" style="width:100%;height:80%"></div>`, '图片详情', {
- dangerouslyUseHTMLString: true,
- closeOnClickModal: true,
- showConfirmButton: false,
- });
- }
- }
- </script>
- <style scoped lang="scss">
- .module-box{
- width: 100%;
- height: 100%;
- background-image: url(../../images/screen-tem13/bg4.png);
- background-repeat: no-repeat;
- background-size: 100% 100%;
- }
- .main-top-box{
- width: 100%;
- height: 50%;
- }
- .module-box .header{
- width: 97%;
- height: 35px;
- line-height: 35px;
- font-weight: bold;
- font-size: 15px;
- color: #0BE2DF;
- padding-left: 10px;
- .pull-right{
- float: right;
- font-size: 12px;
- color: #fff;
- font-weight: 400;
- .font-color{
- color: #0BE2DF;
- }
- .font-color1{
- color: #FF0000;
- }
- }
- }
- .module-bottom-box{
- width: 100%;
- height: 100%;
- // margin-top: 2.38%;
- position: relative;
- }
- .module-bottom-box .bottom-content-box{
- width: 100%;
- height: calc(100% - 35px);
- overflow: hidden;
- margin-top: 15px;
- }
- .main-top-box .bottom-content-box .imgbox{
- width: 16%;
- height: 100%;
- margin-left: 0.6%;
- display: inline-block;
- float: left;
- img{
- width: 100%;
- height: calc(100% - 30px);
- border-radius: 10px;
- }
- .name{
- width: 100%;
- height: 30px;
- line-height: 30px;
- text-align: center;
- font-size: 13px;
- }
- }
- </style>
|