ソースを参照

feat:修改识别记录界面

(cherry picked from commit ebd0bdd8ad2b738b2c0694d58c1c53d93cd5866c)
xiayu3 4 年 前
コミット
774138e475

+ 0 - 161
security-protection-platform/src/modules/videoSurveillance/defineRecord/index.vue

@ -1,161 +0,0 @@
1
<template>
2
  <div class="page-main">
3
    <div class="page-top row-12">
4
      <div class="col-4">开始时间:<t-date-picker v-model="startDate" style="width:200px" placeholder="请选择开始时间"></t-date-picker>
5
      </div>
6
      <div class="col-4">结束时间:<t-date-picker v-model="endDate" style="width:200px" placeholder="请选择结束时间"></t-date-picker>
7
      </div>
8
      <div class="col-4 button-box" align="end">
9
        <t-button color="primary" @click="getData">查询</t-button>
10
        <t-button>重置</t-button>
11
      </div>
12
    </div>
13
    <div class="page-content">
14
      <div class="distinguish">
15
        识别图片<img class="distinguish-img" src="/static/images/demo.png">
16
      </div>
17
      <div class="distinguish">
18
        识别视频<img class="distinguish-img" src="/static/images/demo.png">
19
      </div>
20
    </div>
21
    <div class="page-bottom">
22
      <div>
23
        识别结果
24
        <div class="bottom-result">
25
          <div class="page-top row-12">
26
            <div class="result-txt col-6">设备位置:{{ devicePosition }}</div>
27
            <div class="result-txt col-6">抓拍时间:{{ captureTIme }}</div>
28
          </div>
29
          <div class="result-txt" style="margin-top:24px">识别结果:{{ defineResult }}</div>
30
        </div>
31
      </div>
32
      <div class="img-viewer">
33
        <div v-for="(item,index) in dataImg" :key="index" :src="item.url" class="image-carousel">
34
          <img :src="item.url" class="img-viewer-size">
35
          <span>{{ item.date }}</span>
36
        </div>
37
      </div>
38
    </div>
39
  </div>
40
</template>
41
<script>
42
import sysapi from '@/api/videoSurveillance'
43
export default {
44
  data() {
45
    return {
46
      startDate: '',
47
      endDate: '',
48
      videoId: '', // 视频ID
49
      captureTIme: '',
50
      defineResult: '',
51
      devicePosition: '',
52
      dataImg: [
53
        {
54
          url: '/static/images/demo.png'
55
        },
56
        {
57
          url: '/static/images/demo.png'
58
        },
59
        {
60
          url: '/static/images/demo.png'
61
        },
62
        {
63
          url: '/static/images/demo.png'
64
        },
65
        {
66
          url: '/static/images/demo.png'
67
        },
68
        {
69
          url: '/static/images/demo.png'
70
        },
71
        {
72
          url: '/static/images/demo.png'
73
        },
74
        {
75
          url: '/static/images/demo.png'
76
        }
77
      ]
78
    }
79
  },
80
  mounted() {
81
    this.videoId = this.$route.query.videoId
82
    this.getData()
83
  },
84
  methods: {
85
    // 获取识别记录查询数据
86
    getData() {
87
      let obj = {
88
        startDate: this.startDate,
89
        endDate: this.endDate,
90
        videoId: this.videoId
91
      }
92
      sysapi.getDistinguishData({params: obj}).then(res => {
93
        console.log(res.data)
94
        this.devicePosition = res.data.devicePosition
95
        this.defineResult = res.data.defineResult
96
        this.captureTIme = res.data.captureTIme
97
      })
98
    }
99
  }
100
}
101
</script>
102
<style lang="scss" scoped>
103
.page-main{
104
    padding: 24px;
105
    .page-top{
106
        display: flex;
107
        .col-4{
108
            padding: 0;
109
        }
110
        .col-6{
111
            padding: 0;
112
        }
113
        .button-box{
114
        display: flex;
115
        justify-content: flex-end;
116
        & button{
117
            margin-left: 8px;
118
        }
119
    }
120
    }
121
    .page-content{
122
        margin-left: -24px;
123
        padding: 24px 0;
124
        display: flex;
125
        .distinguish{
126
            margin-left: 24px;
127
            display: flex;
128
            flex-direction: column;
129
            .distinguish-img{
130
                border-radius: 4px;
131
                margin-top: 10px;
132
                height: 380px;
133
                width: 100%;;
134
            }
135
        }
136
    }
137
    .page-bottom{
138
        .bottom-result{
139
            margin-top: 12px;
140
            padding: 24px;
141
            border: 1px solid rgba(233, 233, 233, 1);
142
            .result-txt{
143
                color: rgba(0, 0, 0, 0.45)
144
            }
145
        }
146
        .img-viewer{
147
            margin-top: 24px;
148
            display: flex;
149
            .image-carousel{
150
                display: flex;
151
                flex-direction: column;
152
                .img-viewer-size{
153
                width: 132px;
154
                height: 88px;
155
                margin-right: 14px;
156
            }
157
            }
158
        }
159
    }
160
}
161
</style>

+ 6 - 4
security-protection-platform/src/modules/videoSurveillance/index.vue

@ -82,6 +82,8 @@ export default {
82 82
  methods: {
83 83
    tabClick(name) {
84 84
      this.gateFieldData = ''
85
      this.gateCurrent = 1
86
      this.roomCurrent = 1
85 87
      if (name === 'gate') {
86 88
        this.tabType = 'gate'
87 89
      } else {
@ -108,8 +110,8 @@ export default {
108 110
    // 获得集控室数据
109 111
    getCenterRoomData() {
110 112
      let obj = {
111
        page: this.gateCurrent,
112
        limit: this.gatePageSize
113
        page: this.roomCurrent,
114
        limit: this.roomPageSize
113 115
      }
114 116
      sysapi.getCenterRoomData({params: obj}).then(res => {
115 117
        this.roomList = res.data.data
@ -124,7 +126,7 @@ export default {
124 126
    },
125 127
    // 集控室分页
126 128
    onChangeRoom (val) {
127
      this.gateCurrent = val
129
      this.roomCurrent = val
128 130
      this.getCenterRoomData()
129 131
    },
130 132
    // 进入识别记录界面
@ -133,7 +135,7 @@ export default {
133 135
    },
134 136
    // 风场大门分页
135 137
    onChangeGate(val) {
136
      this.roomCurrent = val
138
      this.gateCurrent = val
137 139
      this.getWindFieldData()
138 140
    }
139 141
  }