Browse Source

feat:修改视频监控数据接口

(cherry picked from commit f59f077db635d5529143b2030954f7e23c2084de)
xiayu3 4 years ago
parent
commit
b4fce4e26f

+ 0 - 2
security-protection-platform/src/modules/attendance/report/index.vue

@ -193,7 +193,6 @@ export default {
193 193
    getDailyTable() {
194 194
      this.loadDailyTable = true
195 195
      atdapi.getDayAttendance({params: this.dailyForm}).then(res => {
196
        console.log(res.data)
197 196
        let tableData = res.data.data
198 197
        this.dailyTableData = []
199 198
        tableData.forEach(element => {
@ -218,7 +217,6 @@ export default {
218 217
      atdapi.getAttendanceDetail({
219 218
        params: { userid, beginDay, endDay }
220 219
      }).then(res => {
221
        console.log(res)
222 220
        const { detail } = res.data
223 221
        this.modalData.detail = detail
224 222
      }).finally(() => {

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

@ -7,7 +7,7 @@
7 7
    <div class="page-top">
8 8
      <span>风场:</span>
9 9
      <t-select v-model="gateFieldData" @change="getWindFieldData">
10
        <t-option v-for="(item,index) in organizationData" :key="index" :value="item.id">{{ item.org }}</t-option>
10
        <t-option v-for="(item,index) in organizationList" :key="index" :value="item.id">{{ item.org }}</t-option>
11 11
      </t-select>
12 12
    </div>
13 13
    <div v-if="tabType==='gate'" >
@ -46,6 +46,7 @@
46 46
</template>
47 47
<script>
48 48
import sysapi from '@/api/videoSurveillance'
49
import commonapi from '@/api/common'
49 50
export default {
50 51
  filters: {
51 52
    handleText(value) {
@ -65,17 +66,14 @@ export default {
65 66
      roomPageSize: 10, // 集控室分页数据
66 67
      roomTotal: 100, // 集控室分页总数
67 68
      tabType: 'gate',
68
      organizationData: [], // 风场数据
69
      organizationList: [], // 风场数据
69 70
      gateFieldData: 101101,
70 71
      gateList: [],
71 72
      roomList: []
72 73
    }
73 74
  },
74 75
  mounted() {
75
    // 获取风场列表
76
    sysapi.getOrganizationData().then(res => {
77
      this.organizationData = res.data.organizations
78
    })
76
    this.getWindFiledList() // 获取风场列表
79 77
    this.getWindFieldData()
80 78
    this.getCenterRoomData()
81 79
  },
@ -90,6 +88,21 @@ export default {
90 88
        this.tabType = 'room'
91 89
      }
92 90
    },
91
    getWindFiledList() {
92
      commonapi.getDepartments().then(resp => {
93
        this.organizationList = []
94
        console.log(resp)
95
        this.organizationList = resp.data.map(item => {
96
          return {
97
            org: item.name,
98
            id: item.id
99
          }
100
        })
101
      }, err => {
102
        this.$Message.danger('获取风场列表失败!')
103
        console.log(err)
104
      })
105
    },
93 106
    // 获得风场大门数据
94 107
    getWindFieldData() {
95 108
      let obj = {