| | |
| | | <div class="police-page container"> |
| | | <div v-show="boxShow" class="container-content"> |
| | | <el-main v-loading="equimentLoading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" |
| | | element-loading-background="rgba(0, 0, 0, 0.2)"> |
| | | <div class="switch-box" v-show="!detailFlag && !equimentLoading"> |
| | | element-loading-background="rgba(0, 0, 0, 0.2)" style="overflow: hidden;padding: 0px;"> |
| | | <div class="switch-box" v-show="!detailFlag"> |
| | | 资源类别: |
| | | <el-select v-model="typeValue" @change="navClick" placeholder="请选择" class="type-select-css"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" |
| | |
| | | </el-select> |
| | | </div> |
| | | |
| | | <div class="list-show" v-if="!detailFlag && !equimentLoading"> |
| | | <div class="list-show" v-if="!detailFlag"> |
| | | <div class="search-box"> |
| | | 资源名称: |
| | | <input v-model="searchValue" @input="searchChange" type="text" placeholder="请输入…" /> |
| | |
| | | <div class="state-box" :class="{ online: scope.row.status == '1' }"></div> |
| | | </template> |
| | | </el-table-column> |
| | | <div slot="empty" style="text-align: left;">{{ emptyText }}</div> |
| | | <el-table-column label="操作" align="center" |
| | | :min-width="typeValue == 0 || typeValue == 2 ? '30%' : '18%'"> |
| | | <template slot-scope="scope"> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages all-pagination-sty" ref="tablePagination"> |
| | | <div class="pages all-pagination-sty" ref="tablePagination" style="padding-top:-15px"> |
| | | <el-pagination background layout="prev, pager, next" :page-size="equimentPage.pageSize" |
| | | :page-count="equimentPage.count" :pager-count="4" :current-page="equimentPage.currentPage" |
| | | @current-change="handleCurrentChange"></el-pagination> |
| | |
| | | |
| | | data () { |
| | | return { |
| | | emptyText: '', |
| | | navType: 0, |
| | | equimentLoading: false, |
| | | dialogTitle: '', |
| | |
| | | equimentTableData: [], |
| | | equimentPage: { |
| | | total: 0, |
| | | pageSize: 25, |
| | | pageSize: 22, |
| | | count: 0, |
| | | currentPage: 1 |
| | | }, |
| | |
| | | }) |
| | | |
| | | this.equimentPage.currentPage = 1 |
| | | this.equimentPage.count = 0 |
| | | // this.equimentTableData = [] |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'carLayers', |
| | |
| | | layerName: 'policeMonitoringLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | this.equimentLoading = true |
| | | |
| | | // 查询分页数据 |
| | | this.getEquipmentPaging({ type: this.navType }) |
| | | }, |
| | | |
| | | // 设备分页处理 |
| | | handleCurrentChange (currentPage) { |
| | | this.equimentPage.currentPage = currentPage |
| | | |
| | | this.getEquipmentPaging({ type: this.navType }) |
| | | }, |
| | | |
| | | // 获取设备分页数据 |
| | | getEquipmentPaging (params) { |
| | | setTimeout(() => { |
| | | this.equimentLoading = false |
| | | }, 1000) |
| | | getEquipmentPaging({ page: this.equimentPage.currentPage, count: this.equimentPage.pageSize, ...params, query: this.searchValue, dwbh: this.userInfo.dept_id }).then(res => { |
| | | this.equimentTableData = [] |
| | | this.equimentPage.count = 0 |
| | | |
| | | this.equimentLoading = true |
| | | this.emptyText = "" |
| | | getEquipmentPaging({ page: this.equimentPage.currentPage, count: this.equimentPage.pageSize, ...params, query: this.searchValue, dwbh: this.userInfo.dept_id }).then(res => { |
| | | var total = res.data.data.total |
| | | console.log(total, 6666) |
| | | if (total == 0) { |
| | | if (this.navType == 0) { |
| | | this.emptyText = "暂无警车数据" |
| | | } |
| | | if (this.navType == 1) { |
| | | this.emptyText = "暂无摄像头数据" |
| | | } |
| | | if (this.navType == 2) { |
| | | this.emptyText = "暂无手台数据" |
| | | } |
| | | if (this.navType == 3) { |
| | | this.emptyText = "暂无执法记录仪数据" |
| | | } |
| | | } |
| | | if (res.data.data.list.length > 0) { |
| | | this.equimentTableData = res.data.data.list.map(item => { |
| | | let newName = '' |
| | |
| | | incident: this.siteClick |
| | | }) |
| | | } else if (this.navType == 2) { |
| | | |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'policeMonitoringLayers', |
| | | type: 'billboard', |
| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | this.equimentPage.count = res.data.data.pages |
| | | this.equimentLoading = false |
| | | } else { |
| | | this.equimentTableData = [] |
| | | |
| | | this.equimentPage.total = 0 |
| | | this.equimentLoading = false |
| | | } |
| | | |
| | | }) |
| | |
| | | :deep(.el-main) { |
| | | padding: 0; |
| | | width: 100%; |
| | | overflow: hidden !important; |
| | | ; |
| | | } |
| | | } |
| | | |