| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <template>
- <div class="module-main">
- <div class="module-box">
- <div class="main-box">
- <div class="module-title">
- 可视化轨迹展示
- </div>
- <div class="patrol">
- <div class="patrol-box">
- <div v-for="(item,index) in imgs" :key="index" class="list">
- <div class="top-img">
- <img :src="item.img" alt="">
- </div>
- <div class="patrol-title line1">
- {{item.title}}
- </div>
- </div>
- </div>
- <div class="echarts">
- <dv-scroll-board v-if="flag" :config="config" style="width:100%;height:100%" />
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import Vue from 'vue';
- import Component from 'vue-class-component';
- import echarts from '@/common/components/echarts.vue';
- import api from '../../api';
- @Component({
- props: {
- data: {
- type: Object,
- default: null,
- },
- },
- components: {
- echarts,
- },
- })
- export default class smodule8 extends Vue {
- imgs = [];
- flag = false;
- config = {
- header: ['地点', '时间', '人员', '内容'],
- data: [],
- rowNum: 4,
- // index: true,
- // columnWidth: [80],
- align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'],
- headerBGC: 'rgba(17, 43, 117, 0.5)',
- oddRowBGC: 'rgba(17, 43, 117, 0.5)',
- evenRowBGC: 'rgba(9, 32, 99, 0.5)',
- }
- created() {
- this.getPatrolRecord();
- setInterval(() => {
- this.getPatrolRecord();
- }, 1000 * 60);
- }
- getPatrolRecord() {
- api.getPatrolRecord().then((res) => {
- this.imgs = res.data.imgs;
- this.flag = false;
- this.$nextTick(() => {
- this.flag = true;
- this.config.data = res.data.lists;
- });
- }).catch(() => {}).finally(() => {
- this.flag = true;
- });
- }
- }
- </script>
- <style lang="css">
- .line1 {
- overflow: hidden;
- text-overflow: ellipsis;
- display: box;
- display: -webkit-box;
- line-clamp: 1;
- box-orient: vertical;
- -webkit-line-clamp: 1;
- -webkit-box-orient: vertical;
- word-break: break-all;
- }
- </style>
- <style scoped lang="scss">
- *{
- box-sizing:border-box;
- color: #fff;
- }
- .text-right{
- text-align: right;
- }
- .pull-right{
- float: right !important;
- }
- .module-title{
- position: relative;
- height: 40px;
- line-height: 40px;
- font-size: 16px;
- }
- .module-title::before{
- content: '';
- position: absolute;
- z-index: 1;
- height: 8px;
- width: 72px;
- top: 32px;
- left: 0;
- background-image: url(../../images/smodule/org-title.png);
- background-size: 100% 100%;
- }
- .main-box{
- width: 100%;
- height: 100%;
- padding: 10px;
- position: relative;
- padding-top: 0;
- }
- .module-select{
- width: 80px;
- height: 20px;
- color: #A6D6FF;
- background-color: #061A3B;
- outline: none;
- border: 1px solid #A6D6FF;
- float: right;
- vertical-align: middle;
- margin-top: 15px;
- margin-right: 5px;
- }
- .echarts{
- width: auto;
- height: calc(100% - 90px);
- margin-top: 10px;
- }
- .patrol{
- padding: 10px;
- width: auto;
- height: calc(100% - 40px);
- .patrol-box{
- height: 90px;
- overflow: hidden;
- .list{
- height: 90px;
- width: 30%;
- margin-left: 3%;
- overflow: hidden;
- text-align: center;
- float: left;
- .top-img{
- width: 100%;
- height: 70px;
- overflow: hidden;
- img{
- width: 100%;
- height: 100%;
- }
- }
- .patrol-title{
- height: 20px;
- line-height: 20px;
- font-size: 12px;
- background-color: rgba(69, 117, 230, 0.2);
- }
- }
- }
- .patrol-box:first-child{
- margin-left: 0;
- }
- }
- </style>
|