| | |
| | | </div> |
| | | |
| | | |
| | | <div class="body" v-show="historytype == 0" ref="tableBox" @click="handleSelectClick($event)"> |
| | | <div class="body" v-if="historytype == 0" ref="tableBox" @click="handleSelectClick($event)"> |
| | | <ul class="title-header"> |
| | | <li> |
| | | <span class="num">序号</span> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="current-table-body" ref="ElTableBox" v-show="historytype == 1"> |
| | | <el-table :data="policeSituationHistoryArr" style="width: 100%" :height="currentTableHeight" |
| | | <div class="current-table-body" ref="ElTableBox" v-if="historytype == 1"> |
| | | <el-table :data="policeSituationHistoryArr" :key="currentPage" style="width: 100%" |
| | | :height="currentTableHeight" |
| | | :header-cell-style="{ 'text-align': 'center', 'background-color': 'rgba(9, 40, 199, 0.5)', 'borderColor': '#324e75' }" |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" @cell-click="rowClick"> |
| | | <el-table-column prop="index" label="序号" min-width="6%"></el-table-column> |
| | |
| | | <el-table-column prop="MEMO" label="备注" min-width="12%"></el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages" ref="ElPagination"> |
| | | <div class="pages" ref="ElPagination" v-show="policeSituationHistoryArr.length > 0"> |
| | | <el-pagination background layout="prev, pager, next" :page-size="pagesize" :page-count="pagesCount" |
| | | :current-page="currentPage" @current-change="handleCurrentChange"></el-pagination> |
| | | </div> |
| | |
| | | // 获取table高度 |
| | | setTableHeight () { |
| | | this.$nextTick(() => { |
| | | if (this.$refs.ElTableBox && this.$refs.ElPagination) { |
| | | this.currentTableHeight = this.$refs.ElTableBox.offsetHeight - this.$refs.ElPagination.offsetHeight |
| | | if (this.$refs.ElPagination) { |
| | | if (this.$refs.ElTableBox) { |
| | | this.currentTableHeight = this.$refs.ElTableBox.offsetHeight - this.$refs.ElPagination.offsetHeight |
| | | } |
| | | } else { |
| | | if (this.$refs.ElTableBox) { |
| | | this.currentTableHeight = this.$refs.ElTableBox.offsetHeight |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | // 获取实时接警记录 |
| | | getAnswerPolices () { |
| | | getAnswerPolices().then(res => { |
| | | this.policeSituationRealtimeArr = [] |
| | | |
| | | if (res.data.result.length > 0) { |
| | | this.policeSituationRealtimeArr = res.data.result.map((item, index) => { |
| | | return { ...item, index: index + 1, lng: item.ZDDWXZB, lat: item.ZDDWYZB } |
| | |
| | | // 获取历史接警记录 |
| | | getAlarmList (params) { |
| | | getAlarmList({ ...params, count: this.pagesize }).then(res => { |
| | | this.policeSituationHistoryArr = [] |
| | | |
| | | if (this.res.data.data.records > 0) { |
| | | this.policeSituationHistoryArr = res.data.data.records.map((item, index) => { |
| | | return { ...item, index: index + 1, lng: item.ZDDWXZB, lat: item.ZDDWYZB } |