Pārlūkot izejas kodu

[FE]:修改视频监控接口数据

xiayu3 4 gadi atpakaļ
vecāks
revīzija
a7c5a45ca3

+ 6 - 6
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
  // 获取识别记录数据
15
  getDistinguishData (params) {
16
    return $http.get('/videoSurveillance/getDistinguishData', params)
17
  },
18
  // 获取监控场景列表
14
  // 获取监控场景列表
19
  getMonitorScene () {
20
    return $default.get('/sp/monitorSceneManagement/queryPageMonitorScene', 0)
15
  getDepartments() {
16
    return $default.get('/sp/workEmployee/queryAllOrganize')
17
  },
18
  // 获取s部门对应场景列表
19
  getMonitorScene(orgId) {
20
    return $default.get(`/sp/monitorSceneManagement/queryPageMonitorScene?orgId=${orgId}`)
21
  },
21
  },
22
  // 视频回放
22
  // 视频回放
23
  queryMonitorVideoLog (data) {
23
  queryMonitorVideoLog (data) {

+ 22 - 20
security-protection-platform/src/modules/videoSurveillance/index.vue

1
<template>
1
<template>
2
  <div class="page-main">
2
  <div class="page-main">
3
    <t-button-group class="top-btn">
3
    <t-button-group class="top-btn">
4
      <t-button v-for="(item,index) in sceneList" :key="index" :value="item.monitorSceneId" :color="item.monitorSceneId === selectedMonitorScene ? 'primary' : 'secondary'" @click="tabClick(item.monitorSceneId)">{{ item.monitorSceneName }}</t-button>
4
      <t-button v-for="(item,index) in sceneList" :key="index"
5
                :value="item.monitorSceneId"
6
                :color="item.monitorSceneId === selectedMonitorScene ? 'primary' : 'secondary'"
7
                @click="tabClick(item.monitorSceneId)">
8
        {{ item.monitorSceneName }}
9
      </t-button>
5
    </t-button-group>
10
    </t-button-group>
6
    <div class="page-top">
11
    <div class="page-top">
7
      <span>风场:</span>
12
      <span>风场:</span>
8
      <t-select v-model="gateFieldData" clearable @change="getSceneList()">
13
      <t-select v-model="gateFieldData" clearable @change="getSceneList()">
9
        <t-option v-for="(item,index) in organizationList" :key="index" :value="item.organizationId">{{ item.monitorSceneTypeName }}</t-option>
14
        <t-option v-for="(item,index) in organizationList" :key="index" :value="item.id">{{ item.name }}</t-option>
10
      </t-select>
15
      </t-select>
11
    </div>
16
    </div>
12
    <div class="page-bottom">
17
    <div class="page-bottom">
54
        limit: 10
59
        limit: 10
55
      },
60
      },
56
      organizationList: [], // 风场数据
61
      organizationList: [], // 风场数据
57
      gateFieldData: 101101,
62
      gateFieldData: '',
58
      videoList: [], // 场景数据列表
63
      videoList: [], // 场景数据列表
59
      sceneList: [], // 场景列表
64
      sceneList: [], // 场景列表
60
      totalList: [], // 所有风场数据列表
61
      selectedMonitorScene: '', // 当前选择场景
65
      selectedMonitorScene: '', // 当前选择场景
62
      videoPlayList: [],
66
      videoPlayList: [],
63
      showReplayDialog: false,
67
      showReplayDialog: false,
82
    // 获取场景列表
86
    // 获取场景列表
83
    getSceneList () {
87
    getSceneList () {
84
      this.sceneList = []
88
      this.sceneList = []
85
      for (let i = 0; i < this.totalList.length; i++) {
86
        if (this.totalList[i].organizationId === this.gateFieldData) {
87
          this.sceneList.push(this.totalList[i])
89
      this.videoList = []
90
      console.log(this.organizationList)
91
      this.organizationList.forEach((element, index) => {
92
        if (element.id === this.gateFieldData) {
93
          sysapi.getMonitorScene(this.organizationList[index].id).then((resp) => {
94
            this.sceneList = resp.data.data || []
95
            this.tabClick(this.sceneList[0].monitorSceneId)
96
          })
88
        }
97
        }
89
      }
98
      })
90
    },
99
    },
91
    // 向服务器发送请求获取视频回放数据
100
    // 向服务器发送请求获取视频回放数据
92
    async queryMonitorVideoLog (data) {
101
    async queryMonitorVideoLog (data) {
119
      this.getVideoSurveillanceData(id)
128
      this.getVideoSurveillanceData(id)
120
    },
129
    },
121
    // 获取风场下拉框列表
130
    // 获取风场下拉框列表
122
    getWindFiledList () {
123
      sysapi.getMonitorScene().then(resp => {
124
        let arr = resp.data.data
125
        this.totalList = arr
126
        for (let i = 0; i < arr.length; i++) {
127
          for (let j = i + 1; j < arr.length; j++) {
128
            if (arr[i].monitorSceneTypeName === arr[j].monitorSceneTypeName) {
129
              ++i
130
            }
131
          }
132
          this.organizationList.push(arr[i])
133
        }
131
    async getWindFiledList () {
132
      sysapi.getDepartments().then(resp => {
133
        this.organizationList = resp.data.data
134
        this.gateFieldData = this.organizationList[0].id
135
        this.getSceneList()
134
      }, err => {
136
      }, err => {
135
        this.$Message.danger('获取风场列表失败!')
137
        this.$Message.danger('获取风场列表失败!')
136
        console.log(err)
138
        console.log(err)