Selaa lähdekoodia

[FE]视频监控分页

chenxr3 4 vuotta sitten
vanhempi
commit
362dd05c40

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

11
  getVideoSurveillanceData (params) {
11
  getVideoSurveillanceData (params) {
12
    return $default.get('/sp/monitorSceneTerminal/queryMonitorSceneTerminalRel', params)
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
  getDepartments () {
18
  getDepartments () {
16
    return $default.get('/sp/workEmployee/queryAllOrganize')
19
    return $default.get('/sp/workEmployee/queryAllOrganize')

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

54
  data () {
54
  data () {
55
    return {
55
    return {
56
      videoOptions: {
56
      videoOptions: {
57
        playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度
58
        autoplay: true, // 如果true,浏览器准备好时开始回放。
57
        autoplay: true, // 如果true,浏览器准备好时开始回放。
59
        muted: true, // 默认情况下将会消除任何音频。
58
        muted: true, // 默认情况下将会消除任何音频。
60
        loop: false, // 导致视频一结束就重新开始。
59
        loop: false, // 导致视频一结束就重新开始。
86
      },
85
      },
87
      videoCurrent: 1, // 大门分页数据
86
      videoCurrent: 1, // 大门分页数据
88
      videoPageSize: 10, // 大门分页数据
87
      videoPageSize: 10, // 大门分页数据
89
      videoTotal: 100, // 大门分页总数
88
      videoTotal: 0, // 大门分页总数
90
      tabId: 1,
89
      tabId: 1,
91
      paramsObj: { // 接口请求数据
90
      paramsObj: { // 接口请求数据
92
        page: 0,
91
        page: 0,
158
      this.videoList = []
157
      this.videoList = []
159
      this.tabId = id
158
      this.tabId = id
160
      this.videoCurrent = 1
159
      this.videoCurrent = 1
161
      this.getVideoSurveillanceData(id)
160
      this.getVideoSurveillanceData()
162
    },
161
    },
163
    // 获取风场下拉框列表
162
    // 获取风场下拉框列表
164
    async getWindFiledList () {
163
    async getWindFiledList () {
172
      })
171
      })
173
    },
172
    },
174
    // 获得风场大门数据
173
    // 获得风场大门数据
175
    getVideoSurveillanceData (id) {
174
    getVideoSurveillanceData () {
175
      var id = this.tabId
176
      this.paramsObj.page = this.videoCurrent
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
    },
187
    },
185
    // 风场大门分页
188
    // 风场大门分页
186
    onChangeGate (val) {
189
    onChangeGate (val) {
187
      this.videoList = []
188
      this.videoCurrent = val
190
      this.videoCurrent = val
191
      this.getVideoSurveillanceData()
189
    }
192
    }
190
  }
193
  }
191
}
194
}