瀏覽代碼

[FE]视频监控分页

chenxr3 4 年之前
父節點
當前提交
362dd05c40

+ 3 - 0
security-protection-platform/src/api/videoSurveillance/index.js

@ -11,6 +11,9 @@ const api = {
11 11
  getVideoSurveillanceData (params) {
12 12
    return $default.get('/sp/monitorSceneTerminal/queryMonitorSceneTerminalRel', params)
13 13
  },
14
  getVideoSurveillanceDataForPage (params) {
15
    return $default.get('/sp/monitorSceneTerminal/queryMonitorSceneTerminalRelForPage', params)
16
  },
14 17
  // 获取监控场景列表
15 18
  getDepartments () {
16 19
    return $default.get('/sp/workEmployee/queryAllOrganize')

+ 10 - 7
security-protection-platform/src/modules/videoSurveillance/index.vue

@ -54,7 +54,6 @@ export default {
54 54
  data () {
55 55
    return {
56 56
      videoOptions: {
57
        playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度
58 57
        autoplay: true, // 如果true,浏览器准备好时开始回放。
59 58
        muted: true, // 默认情况下将会消除任何音频。
60 59
        loop: false, // 导致视频一结束就重新开始。
@ -86,7 +85,7 @@ export default {
86 85
      },
87 86
      videoCurrent: 1, // 大门分页数据
88 87
      videoPageSize: 10, // 大门分页数据
89
      videoTotal: 100, // 大门分页总数
88
      videoTotal: 0, // 大门分页总数
90 89
      tabId: 1,
91 90
      paramsObj: { // 接口请求数据
92 91
        page: 0,
@ -158,7 +157,7 @@ export default {
158 157
      this.videoList = []
159 158
      this.tabId = id
160 159
      this.videoCurrent = 1
161
      this.getVideoSurveillanceData(id)
160
      this.getVideoSurveillanceData()
162 161
    },
163 162
    // 获取风场下拉框列表
164 163
    async getWindFiledList () {
@ -172,10 +171,14 @@ export default {
172 171
      })
173 172
    },
174 173
    // 获得风场大门数据
175
    getVideoSurveillanceData (id) {
174
    getVideoSurveillanceData () {
175
      var id = this.tabId
176 176
      this.paramsObj.page = this.videoCurrent
177
      sysapi.getVideoSurveillanceData({ params: { monitorSceneId: id } }).then(res => {
178
        this.videoList = res.data.data
177
      sysapi.getVideoSurveillanceDataForPage({ params: { monitorSceneId: id, pageNumber: this.videoCurrent, pageSize: this.videoPageSize} })
178
      .then(res => {
179
        debugger
180
        this.videoList = res.data.data.data
181
        this.videoTotal = res.data.data.total
179 182
      })
180 183
    },
181 184
    // 进入识别记录界面
@ -184,8 +187,8 @@ export default {
184 187
    },
185 188
    // 风场大门分页
186 189
    onChangeGate (val) {
187
      this.videoList = []
188 190
      this.videoCurrent = val
191
      this.getVideoSurveillanceData()
189 192
    }
190 193
  }
191 194
}