| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-01-11 15:31:39 |
| | | * @LastEditTime: 2023-01-12 17:14:12 |
| | | * @FilePath: \srs-police-affairs\src\views\police\index.vue |
| | | * @Description: 辖区管理 |
| | | * |
| | |
| | | <div class="search-box" ref="tableSearchBox"> |
| | | 资源名称: |
| | | <input v-model="searchValue" @input="searchChange" type="text" placeholder="请输入搜索条件" /> |
| | | <button @click="searchClick" class="el-icon-search"></button> |
| | | </div> |
| | | |
| | | <div v-show="searchValBoxShow" class="search-val-box"> |
| | | <div @click="searchVlaClick(item)" v-for="(item, index) in searchArray" :key="index">{{ item.name }} |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="list" v-show="navType == 1"> |
| | | <el-table :data="carList" |
| | | <div class="list"> |
| | | <el-table :data="equimentTableData" |
| | | :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }" |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }" |
| | | :height="currentTableHeight"> |
| | | <el-table-column prop="serialNumber" label="编号" min-width="25%"></el-table-column> |
| | | <el-table-column prop="carType" label="类型" min-width="25%"></el-table-column> |
| | | <el-table-column prop="status" label="状态" min-width="25%"> |
| | | <el-table-column prop="name" :show-overflow-tooltip="true" label="名称" |
| | | min-width="30%"></el-table-column> |
| | | <el-table-column prop="channelId" :show-overflow-tooltip="true" label="通道编号" |
| | | min-width="24%"></el-table-column> |
| | | <el-table-column prop="status" label="状态" min-width="18%"> |
| | | <template slot-scope="scope"> |
| | | <div class="state-box" :class="{ online: scope.row.status == '1' }"></div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="操作" align="center" min-width="25%"> |
| | | <el-table-column label="操作" align="center" min-width="28%"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="rowClick(scope.row)" type="text" size="small" title="定位"> |
| | | <i class="el-icon-location"></i> |
| | | </el-button> |
| | | <el-button @click="carDetail(scope.row)" type="text" size="small" title="轨迹"> |
| | | <el-button v-show="navType == 0" @click="carDetail(scope.row)" type="text" size="small" |
| | | title="轨迹"> |
| | | <i class="el-icon-position"></i> |
| | | </el-button> |
| | | <el-button @click="play(scope.row)" type="text" size="small" title="播放视频"> |
| | |
| | | </el-table> |
| | | |
| | | <div class="pages"> |
| | | <el-pagination background layout="prev, pager, next" :page-size="pagesize" |
| | | :page-count="carPagesCount" :current-page="currentPage" |
| | | @current-change="handleCurrentChange"></el-pagination> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="list" v-show="navType == 2"> |
| | | <el-table :data="phoneList.slice((currentPage - 1) * pagesize, currentPage * pagesize)" |
| | | style="width: 100%" |
| | | :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }" |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }" |
| | | :height="currentTableHeight"> |
| | | <el-table-column prop="name" label="名称" min-width="25%" |
| | | :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column prop="phoneType" label="类型" min-width="25%"></el-table-column> |
| | | <el-table-column prop="state" label="状态" min-width="25%"> |
| | | <template slot-scope="scope"> |
| | | <div class="state-box" :class="{ online: scope.row.state == '在线' }"></div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="操作" align="center" min-width="25%"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="rowClick(scope.row)" type="text" size="small" title="定位"> |
| | | <i class="el-icon-location"></i> |
| | | </el-button> |
| | | <el-button @click="carDetail(scope.row)" type="text" size="small" title="轨迹"> |
| | | <i class="el-icon-position"></i> |
| | | </el-button> |
| | | <el-button @click="play(scope.row)" type="text" size="small" title="播放视频"> |
| | | <i class="el-icon-video-play"></i> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages"> |
| | | <el-pagination background layout="prev, pager, next" :total="phoneList.length" |
| | | :page-size="pagesize" pager-count="3" :current-page="currentPage" |
| | | @current-change="handleCurrentChange"></el-pagination> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="list" v-show="navType == 3"> |
| | | <el-table :data="dtList.slice((currentPage - 1) * pagesize, currentPage * pagesize)" |
| | | style="width: 100%" |
| | | :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }" |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }" |
| | | :height="currentTableHeight"> |
| | | <el-table-column prop="name" label="名称" min-width="40%" |
| | | :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column prop="dtType" label="类型" min-width="20%"></el-table-column> |
| | | <el-table-column prop="state" label="状态" min-width="15%"> |
| | | <template slot-scope="scope"> |
| | | <div class="state-box" :class="{ online: scope.row.state == '在线' }"></div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="操作" align="center" min-width="25%"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="rowClick(scope.row)" type="text" size="small" title="定位"> |
| | | <i class="el-icon-location"></i> |
| | | </el-button> |
| | | <el-button @click="carDetail(scope.row)" type="text" size="small" title="轨迹"> |
| | | <i class="el-icon-position"></i> |
| | | </el-button> |
| | | <el-button @click="play(scope.row)" type="text" size="small" title="播放视频"> |
| | | <i class="el-icon-video-play"></i> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages"> |
| | | <el-pagination background layout="prev, pager, next" :total="dtList.length" |
| | | :page-size="pagesize" pager-count="3" :current-page="currentPage" |
| | | @current-change="handleCurrentChange"></el-pagination> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="list" v-show="navType == 4"> |
| | | <el-table :data="zfList.slice((currentPage - 1) * pagesize, currentPage * pagesize)" |
| | | style="width: 100%" |
| | | :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }" |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }" |
| | | :height="currentTableHeight"> |
| | | <el-table-column prop="name" label="名称" min-width="25%" |
| | | :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column prop="phoneType" label="类型" min-width="25%"></el-table-column> |
| | | <el-table-column label="状态" min-width="25%"> |
| | | <template slot-scope="scope"> |
| | | <div class="state-box" :class="{ online: scope.row.state == '在线' }"></div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="操作" align="center" min-width="25%"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="rowClick(scope.row)" type="text" size="small" title="定位"> |
| | | <i class="el-icon-location"></i> |
| | | </el-button> |
| | | <el-button @click="carDetail(scope.row)" type="text" size="small" title="轨迹"> |
| | | <i class="el-icon-position"></i> |
| | | </el-button> |
| | | <el-button @click="play(scope.row)" type="text" size="small" title="播放视频"> |
| | | <i class="el-icon-video-play"></i> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages"> |
| | | <el-pagination background layout="prev, pager, next" :total="zfList.length" |
| | | :page-size="pagesize" pager-count="3" :current-page="currentPage" |
| | | <el-pagination background layout="prev, pager, next" :page-size="equimentPage.pageSize" |
| | | :page-count="equimentPage.count" :current-page="equimentPage.currentPage" |
| | | @current-change="handleCurrentChange"></el-pagination> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="track-box" v-show="detailFlag"> |
| | | <div class="track-box-info"> |
| | | <div class="back-btn" @click="goBack" title="轨迹">详细资料及轨迹查询</div> |
| | | <ul v-show="navType == 1"> |
| | | <ul v-show="navType == 0"> |
| | | <li> |
| | | <div>车辆型号:</div> |
| | | <div>SC7103</div> |
| | |
| | | </li> |
| | | </ul> |
| | | |
| | | <ul v-show="navType == 2"> |
| | | <ul v-show="navType == 1"> |
| | | <li> |
| | | <div>型号:</div> |
| | | <div>350m</div> |
| | |
| | | </div> |
| | | <button @click="searchExtensivelyClick" class="el-icon-search"></button> |
| | | </div> |
| | | |
| | | <div v-show="searchExtensivelyValBoxShow" class="searchExtensively-val-box"> |
| | | <div> |
| | | <div @click="searchExtensivelyVlaClick(item)" v-for="(item, index) in searchExtensivelyArray" |
| | |
| | | |
| | | <el-dialog :title="dialogTitle" :modal="false" :visible.sync="dialogVisible" :before-close="dialogBeforeClose" |
| | | :close-on-click-modal="true" class="car-video-box"> |
| | | <video src="/video/sp.mp4" autoplay controls width="100%" height="100%" ref="videoElement" |
| | | <video autoplay controls width="100%" height="100%" ref="videoElement" id="videoElement" |
| | | style="object-fit: fill"></video> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :title="phoneTitle" :modal="false" :visible.sync="phoneVisible" :before-close="phoneBeforeClose" |
| | | :close-on-click-modal="true" class="phone-details-box"> |
| | | <div class="item"> |
| | | <div>责任人:</div> |
| | | <div>{{ phoneDetails.person }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>联系方式:</div> |
| | | <div>{{ phoneDetails.phoneID }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>类型:</div> |
| | | <div>{{ phoneDetails.phoneType }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>所在地址:</div> |
| | | <div>{{ phoneDetails.location }}</div> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listQuery, accurateSearch } from "@/utils/search.js" |
| | | import phoneList from '@/assets/data/phone.js' |
| | | import zfList from '@/assets/data/zf.js' |
| | | import dtList from '@/assets/data/dt.js' |
| | | import { getHistoricalTrack } from '@/api/police/index.js' |
| | | import { getCarList } from '@/api/police/index.js' |
| | | import { getSearchExtensively } from '@/api/dept/index.js' |
| | | import { getDevices } from '@/api/video/index.js' |
| | | import flvjs from 'flv.js' |
| | | import { getEquipmentPaging } from "@/api/home/index.js" |
| | | |
| | | |
| | | let tc = null |
| | |
| | | export default { |
| | | data () { |
| | | return { |
| | | navType: 1, |
| | | currentPage: 1, |
| | | pagesize: 13, |
| | | carCurrentPage: 1, |
| | | carPagesize: 13, |
| | | carPagesCount: 1, |
| | | carList: [], |
| | | dtList: [], |
| | | phoneList: [], |
| | | zfList: [], |
| | | navType: 0, |
| | | dialogTitle: '', |
| | | dialogVisible: false, |
| | | phoneDetails: {}, |
| | | phoneTitle: '', |
| | | phoneVisible: false, |
| | | searchValue: '', |
| | | searchArray: [], |
| | | searchValBoxShow: false, |
| | | currentTableHeight: 0, |
| | | detailFlag: false, |
| | | trackTime: [], |
| | | options: [{ |
| | | value: '1', |
| | | value: '0', |
| | | label: '警车' |
| | | }, { |
| | | value: '2', |
| | | label: '手持记录仪' |
| | | }, { |
| | | value: '3', |
| | | label: '电台' |
| | | }, { |
| | | value: '4', |
| | | label: '执法记录仪' |
| | | }], |
| | | typeValue: '1', |
| | | value: '1', |
| | | label: '摄像头' |
| | | } |
| | | // , { |
| | | // value: '3', |
| | | // label: '电台' |
| | | // }, { |
| | | // value: '4', |
| | | // label: '执法记录仪' |
| | | // } |
| | | ], |
| | | typeValue: '0', |
| | | boxShow: true, |
| | | carListSaveDate: [], |
| | | searchExtensivelyValue: '', |
| | | searchExtensivelyValBoxShow: false, |
| | | searchExtensivelyArray: [], |
| | | flvPlayer: null, |
| | | |
| | | equimentTableData: [], |
| | | equimentPage: { |
| | | total: 0, |
| | | pageSize: 15, |
| | | count: 0, |
| | | currentPage: 1 |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.getCarList(this.carCurrentPage, this.carPagesize) |
| | | |
| | | this.dtList = dtList |
| | | this.phoneList = phoneList |
| | | this.zfList = zfList |
| | | const that = this |
| | | |
| | | this.$nextTick(() => { |
| | |
| | | mounted () { |
| | | this.$parent.$parent.resize('400px', true) |
| | | |
| | | this.navClick(1) |
| | | this.navClick() |
| | | |
| | | tc = new global.DC.TrackController(global.viewer) |
| | | }, |
| | | methods: { |
| | | handleCurrentChange: function (currentPage) { |
| | | this.currentPage = currentPage |
| | | this.carCurrentPage = currentPage |
| | | this.getCarList(this.carCurrentPage, this.carPagesize) |
| | | }, |
| | | // 搜索框改变事件 |
| | | searchChange () { |
| | | this.detailFlag = false |
| | | |
| | | getCarList (current, size, serialNumber) { |
| | | getCarList(current, size, serialNumber).then(res => { |
| | | console.log(res.data.data, 6666) |
| | | this.carPagesCount = res.data.data.pages |
| | | this.carListSaveDate = res.data.data.records |
| | | this.carList = res.data.data.records |
| | | }) |
| | | }, |
| | | |
| | | navClick (type) { |
| | | if (!type) { type = 1 } |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polylineLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.detailFlag = false |
| | | this.navType = type |
| | | |
| | | this.searchValue = '' |
| | | this.searchValBoxShow = false |
| | | this.searchArray = [] |
| | | this.carList = this.carListSaveDate |
| | | this.dtList = dtList |
| | | this.phoneList = phoneList |
| | | this.zfList = zfList |
| | | this.equimentPage.currentPage = 1 |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'carLayers', |
| | |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'zfLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | this.getEquipmentPaging({ type: this.navType }) |
| | | }, |
| | | // 设备分页处理 |
| | | handleCurrentChange (currentPage) { |
| | | this.equimentPage.currentPage = currentPage |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'dtLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | if (type == 1) { |
| | | this.carList.forEach(item => { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'carLayers', |
| | | type: "billboard", |
| | | params: { |
| | | name: item.name, |
| | | lng: item.lng, |
| | | lat: item.lat, |
| | | alt: item.alt, |
| | | url: item.url |
| | | }, |
| | | incident: this.siteClick |
| | | }) |
| | | }) |
| | | } else if (type == 2) { |
| | | this.phoneList.forEach(item => { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'phoneLayers', |
| | | type: "billboard", |
| | | params: item, |
| | | incident: this.phoneSiteClick |
| | | }) |
| | | }) |
| | | } else if (type == 3) { |
| | | this.dtList.forEach(item => { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'dtLayers', |
| | | type: "billboard", |
| | | params: item, |
| | | incident: this.phoneSiteClick |
| | | }) |
| | | }) |
| | | } else if (type == 4) { |
| | | this.zfList.forEach(item => { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'zfLayers', |
| | | type: "billboard", |
| | | params: item, |
| | | incident: this.phoneSiteClick |
| | | }) |
| | | }) |
| | | } |
| | | this.getEquipmentPaging({ type: this.navType }) |
| | | }, |
| | | |
| | | // 获取设备分页数据 |
| | | getEquipmentPaging (params) { |
| | | getEquipmentPaging({ page: this.equimentPage.currentPage, count: this.equimentPage.pageSize, ...params, query: this.searchValue }).then(res => { |
| | | this.equimentTableData = [] |
| | | this.equimentPage.count = 0 |
| | | |
| | | if (res.data.data.list.length > 0) { |
| | | this.equimentTableData = res.data.data.list.map(item => { |
| | | return { ...item, lng: item.longitude, lat: item.latitude, alt: 100 } |
| | | }) |
| | | |
| | | this.equimentTableData.forEach(item => { |
| | | if (this.navType == 0) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'carLayers', |
| | | type: "billboard", |
| | | params: { |
| | | ...item, |
| | | url: '/img/icon/car.png' |
| | | }, |
| | | incident: this.siteClick |
| | | }) |
| | | } else if (this.navType == 1) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'phoneLayers', |
| | | type: "billboard", |
| | | params: { |
| | | ...item, |
| | | url: '/img/icon/camera.png' |
| | | }, |
| | | incident: this.siteClick |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | this.equimentPage.count = res.data.data.pages |
| | | } else { |
| | | this.equimentTableData = [] |
| | | |
| | | this.equimentPage.total = 0 |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | // 类别切换 |
| | | navClick (type) { |
| | | if (type && type == this.navType) return |
| | | this.detailFlag = false |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polylineLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | if (type) { |
| | | this.navType = type |
| | | } |
| | | |
| | | this.searchValue = '' |
| | | |
| | | this.equimentPage.currentPage = 1 |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'carLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'phoneLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.getEquipmentPaging({ type: this.navType }) |
| | | }, |
| | | |
| | | // 表格行点击查看定位 |
| | | rowClick (row) { |
| | | if (row.lng == 0 || row.lat == 0) { |
| | | this.$message.error('暂无位置信息!') |
| | | |
| | | return |
| | | } |
| | | this.$EventBus.$emit('toPosition', { |
| | | layerName: 'carLayers', |
| | | siteJd: row.lng, |
| | | siteWd: row.lat |
| | | }) |
| | | }, |
| | | |
| | | // 表格行点击查看轨迹 |
| | | carDetail (row) { |
| | | this.detailFlag = true |
| | | }, |
| | | |
| | | async play (row) { |
| | |
| | | } |
| | | |
| | | this.dialogTitle = row.name |
| | | this.dialogVisible = true |
| | | let flvUrl = '' |
| | | |
| | | await this.getDevices(row.channelId).then(res => { |
| | | flvUrl = res |
| | | }) |
| | |
| | | return |
| | | } |
| | | |
| | | if (flvjs.isSupported()) { |
| | | var videoElement = document.getElementById('videoElement') |
| | | this.flvPlayer = flvjs.createPlayer({ |
| | | type: 'flv', |
| | | isLive: true, |
| | | hasAudio: false, |
| | | url: flvUrl |
| | | }) |
| | | this.flvPlayer.attachMediaElement(videoElement) |
| | | this.flvPlayer.load() |
| | | this.flvPlayer.play() |
| | | } |
| | | |
| | | this.dialogVisible = true |
| | | |
| | | if (flvjs.isSupported()) { |
| | | this.$nextTick(() => { |
| | | var videoElement = document.getElementById('videoElement') |
| | | this.flvPlayer = flvjs.createPlayer({ |
| | | type: 'flv', |
| | | isLive: true, |
| | | hasAudio: false, |
| | | url: flvUrl |
| | | }) |
| | | this.flvPlayer.attachMediaElement(videoElement) |
| | | this.flvPlayer.load() |
| | | this.flvPlayer.play() |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | async getDevices (channelId) { |
| | |
| | | return flvAddress |
| | | }, |
| | | |
| | | // siteClick (e) { |
| | | // this.dialogTitle = e.overlay.attrParams.name |
| | | // this.dialogVisible = true |
| | | siteClick (e) { |
| | | this.dialogTitle = e.overlay.attrParams.name |
| | | this.dialogVisible = true |
| | | |
| | | // if (this.$refs.videoElement && this.$refs.videoElement != null) { |
| | | // this.$refs.videoElement.currentTime = 0 |
| | | // this.$refs.videoElement.play() |
| | | // } |
| | | // }, |
| | | |
| | | phoneSiteClick (e) { |
| | | this.phoneTitle = e.overlay.attrParams.name |
| | | this.phoneDetails = e.overlay.attrParams |
| | | this.phoneVisible = true |
| | | if (this.$refs.videoElement && this.$refs.videoElement != null) { |
| | | this.$refs.videoElement.currentTime = 0 |
| | | this.$refs.videoElement.play() |
| | | } |
| | | }, |
| | | |
| | | dialogBeforeClose () { |
| | |
| | | this.dialogVisible = false |
| | | }, |
| | | |
| | | phoneBeforeClose () { |
| | | this.phoneVisible = false |
| | | }, |
| | | |
| | | searchChange () { |
| | | if (this.searchValue == '') { |
| | | this.searchValBoxShow = false |
| | | this.searchArray = [] |
| | | this.carList = this.carListSaveDate |
| | | this.dtList = dtList |
| | | this.phoneList = phoneList |
| | | this.zfList = zfList |
| | | } else { |
| | | if (this.navType == 1) { |
| | | this.searchArray = listQuery(this.carListSaveDate, this.searchValue, 'name') |
| | | } else if (this.navType == 2) { |
| | | this.searchArray = listQuery(phoneList, this.searchValue, 'name') |
| | | } else if (this.navType == 3) { |
| | | this.searchArray = listQuery(dtList, this.searchValue, 'name') |
| | | } else if (this.navType == 4) { |
| | | this.searchArray = listQuery(zfList, this.searchValue, 'name') |
| | | } |
| | | this.searchValBoxShow = true |
| | | } |
| | | }, |
| | | |
| | | searchClick () { |
| | | this.searchValBoxShow = false |
| | | if (this.navType == 1) { |
| | | this.getCarList(this.carCurrentPage, this.carPagesize, this.searchValue) |
| | | } else if (this.navType == 2) { |
| | | this.phoneList = accurateSearch(phoneList, this.searchValue, 'name') |
| | | } else if (this.navType == 3) { |
| | | this.dtList = accurateSearch(phoneList, this.searchValue, 'name') |
| | | } else if (this.navType == 4) { |
| | | this.zfList = accurateSearch(zfList, this.searchValue, 'name') |
| | | } |
| | | }, |
| | | |
| | | searchVlaClick (item) { |
| | | this.searchValBoxShow = false |
| | | this.searchArray = [] |
| | | if (this.navType == 1) { |
| | | this.carList = [item] |
| | | } else if (this.navType == 2) { |
| | | this.phoneList = [item] |
| | | } else if (this.navType == 3) { |
| | | this.dtList = [item] |
| | | } else if (this.navType == 4) { |
| | | this.zfList = [item] |
| | | } |
| | | }, |
| | | |
| | | carDetail (row) { |
| | | this.detailFlag = true |
| | | }, |
| | | |
| | | // 轨迹返回 |
| | | goBack () { |
| | | this.detailFlag = !this.detailFlag |
| | | this.trackTime = [] |
| | |
| | | tc.removeTrack(track) |
| | | }, |
| | | |
| | | // 查看轨迹 |
| | | async lookTrack () { |
| | | if (this.trackTime.length == 0) { |
| | | this.$message({ message: "请选择开始时间", duration: 2000 }) |
| | |
| | | this.searchExtensivelyChange() |
| | | }, |
| | | |
| | | |
| | | }, |
| | | |
| | | destroyed () { |
| | |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'phoneLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'zfLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'dtLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | |
| | | background-color: rgba(24, 79, 202, 0.6); |
| | | // border: 1px solid rgb(0, 92, 169); |
| | | border: 1px solid rgb(24, 79, 202); |
| | | border-radius: 20px 0 0 20px; |
| | | border-radius: 20px; |
| | | } |
| | | |
| | | input:focus { |
| | |
| | | |
| | | input::-webkit-input-placeholder { |
| | | color: rgba(238, 238, 238, 0.7); |
| | | } |
| | | |
| | | button { |
| | | font-size: 24px; |
| | | font-weight: 700; |
| | | width: 80px; |
| | | height: 100%; |
| | | background-color: $table-body-tr-n-color; |
| | | color: #fff; |
| | | border: 1px solid rgb(0, 92, 169); |
| | | cursor: pointer; |
| | | border-radius: 0 20px 20px 0; |
| | | } |
| | | |
| | | button:active { |
| | | background-color: $table-body-tr-2n-color; |
| | | border: 1px solid rgb(0, 92, 169); |
| | | } |
| | | } |
| | | |
| | | .search-val-box { |
| | | display: flex; |
| | | flex-direction: column; |
| | | position: absolute; |
| | | top: 48px; |
| | | left: 6px; |
| | | width: calc(100% - 12px); |
| | | max-height: 160px; |
| | | text-align: left; |
| | | color: #fff; |
| | | background: $el-dialog-bg-color; |
| | | z-index: 1111; |
| | | border-radius: 10px; |
| | | overflow-y: auto; |
| | | |
| | | &>div { |
| | | height: 100%; |
| | | padding: 0 10px; |
| | | line-height: 36px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |