| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2022-11-18 10:02:31 |
| | | * @LastEditTime: 2022-11-24 14:29:33 |
| | | * @FilePath: \srs-police-affairs\src\views\video\list.vue |
| | | * @Description: 辖区管理 |
| | | * |
| | |
| | | <div class="container"> |
| | | <div v-show="boxShow" class="container-content"> |
| | | <div class="search-box"> |
| | | <input |
| | | v-model="searchValue" |
| | | @input="searchChange" |
| | | type="text" |
| | | placeholder="请输入搜索条件" |
| | | /> |
| | | <input v-model="searchValue" @input="searchChange" type="text" placeholder="请输入搜索条件" /> |
| | | <button @click="searchClick" class="el-icon-search"></button> |
| | | </div> |
| | | |
| | |
| | | <button @click="changeRange" class="btn">确定</button> |
| | | </div> |
| | | <div v-show="true" class="search-val-box"> |
| | | <div |
| | | @click="searchVlaClick(item)" |
| | | v-for="(item, index) in searchArray" |
| | | :key="index" |
| | | >{{ item.name }}</div> |
| | | <div @click="searchVlaClick(item)" v-for="(item, index) in searchArray" :key="index">{{ item.name }} |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="list-show"> |
| | | <div class="car-list"> |
| | | <div class="list-box"> |
| | | <el-table |
| | | :data="monitoringList.slice((currentPage - 1) * pagesize, currentPage * pagesize)" |
| | | <el-table :data="monitoringList.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' }" |
| | | @cell-click="rowClick" |
| | | > |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" @cell-click="rowClick"> |
| | | <el-table-column prop="name" label="设备名称" min-width="50%"></el-table-column> |
| | | <el-table-column prop="manufacture" label="设备类型" min-width="50%"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="pages"> |
| | | <el-pagination |
| | | background |
| | | layout="prev, pager, next" |
| | | :total="monitoringList.length" |
| | | :page-size="pagesize" |
| | | pager-count="3" |
| | | :current-page="currentPage" |
| | | @current-change="handleCurrentChange" |
| | | ></el-pagination> |
| | | <el-pagination background layout="prev, pager, next" :total="monitoringList.length" |
| | | :page-size="pagesize" pager-count="3" :current-page="currentPage" |
| | | @current-change="handleCurrentChange"></el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="dialogTitle" |
| | | :modal="true" |
| | | :visible.sync="dialogVisible" |
| | | :before-close="dialogBeforeClose" |
| | | :close-on-click-modal="true" |
| | | class="car-video-box" |
| | | > |
| | | <video |
| | | id="videoElement" |
| | | autoplay |
| | | controls |
| | | width="100%" |
| | | height="100%" |
| | | style="object-fit: fill" |
| | | ></video> |
| | | <el-dialog :title="dialogTitle" :modal="true" :visible.sync="dialogVisible" :before-close="dialogBeforeClose" |
| | | :close-on-click-modal="true" class="car-video-box"> |
| | | <video id="videoElement" autoplay controls width="100%" height="100%" style="object-fit: fill"></video> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :title="drawDialogTitle" |
| | | :modal="true" |
| | | :visible.sync="drawDialogVisible" |
| | | :before-close="drawDialogBeforeClose" |
| | | :close-on-click-modal="true" |
| | | class="video-draw-box" |
| | | > |
| | | <el-dialog :title="drawDialogTitle" :modal="true" :visible.sync="drawDialogVisible" |
| | | :before-close="drawDialogBeforeClose" :close-on-click-modal="true" class="video-draw-box"> |
| | | <input type="text" v-model="drawName" placeholder="请输入绘制线或面的名称" /> |
| | | <button @click="saveDrawInfo">保存</button> |
| | | </el-dialog> |
| | |
| | | inputpopup: false, |
| | | changeBtn: false, |
| | | drawName: '', |
| | | isDrawed: false, |
| | | drawInfo: [], |
| | | drawType: 1, |
| | | saveFlag: true |
| | | } |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | draw (type) { |
| | | this.saveFlag = true |
| | | if (type == 'polyline') { |
| | | this.inputpopup = true |
| | | this.drawType = 1 |
| | |
| | | graphicLayer.activate(type, (lastEventData) => { |
| | | console.log('数据更新') |
| | | this.drawInfo = lastEventData |
| | | this.isDrawed = true |
| | | this.getRegionList(type, JSON.stringify(lastEventData)) |
| | | }) |
| | | |
| | |
| | | this.inputpopup = false |
| | | this.monitoringList = this.monitoringSaveList |
| | | graphicLayer.clearLayer() |
| | | this.isDrawed = false |
| | | this.saveFlag = true |
| | | this.drawInfo = [] |
| | | }, |
| | | |
| | | // 修改范围 |
| | |
| | | }, |
| | | |
| | | saveDraw () { |
| | | this.drawDialogVisible = true |
| | | if (this.drawInfo.length > 0) { |
| | | if (this.saveFlag == false) { |
| | | this.$message({ |
| | | message: '当前绘制信息已保存', |
| | | type: 'warning' |
| | | }) |
| | | |
| | | return |
| | | } |
| | | this.drawDialogVisible = true |
| | | this.saveFlag = false |
| | | } else { |
| | | this.$message({ |
| | | message: '请先绘制线或者面', |
| | | type: 'warning' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | saveDrawInfo () { |
| | | if (this.drawName == '') { |
| | | alert('请输入名称') |
| | | this.$message({ |
| | | message: '请输入名称', |
| | | type: 'warning' |
| | | }) |
| | | } else { |
| | | if (this.isDrawed == false) { |
| | | alert('请先绘制线或者面') |
| | | } else { |
| | | let drawPositionStr = '' |
| | | if (this.drawType == 1) { |
| | | this.drawInfo.forEach(item => { |
| | | drawPositionStr += item[0] + ' ' + item[1] + ',' |
| | | }) |
| | | drawPositionStr = drawPositionStr.slice(0, drawPositionStr.length - 1) |
| | | } else { |
| | | this.drawInfo.forEach(item => { |
| | | drawPositionStr += item.lng + ' ' + item.lat + ',' |
| | | }) |
| | | drawPositionStr += this.drawInfo[0].lng + ' ' + this.drawInfo[0].lat |
| | | let drawPositionStr = '' |
| | | if (this.drawType == 1) { |
| | | this.drawInfo.forEach(item => { |
| | | drawPositionStr += item[0] + ' ' + item[1] + ',' |
| | | }) |
| | | |
| | | } |
| | | this.insertRegionSaveList(this.drawType, drawPositionStr, this.drawName) |
| | | this.drawDialogVisible = false |
| | | this.drawName = '' |
| | | alert('已保存') |
| | | drawPositionStr = drawPositionStr.slice(0, drawPositionStr.length - 1) |
| | | } else { |
| | | this.drawInfo.forEach(item => { |
| | | drawPositionStr += item.lng + ' ' + item.lat + ',' |
| | | }) |
| | | |
| | | drawPositionStr += this.drawInfo[0].lng + ' ' + this.drawInfo[0].lat |
| | | } |
| | | this.insertRegionSaveList(this.drawType, drawPositionStr, this.drawName) |
| | | this.drawDialogVisible = false |
| | | this.drawName = '' |
| | | } |
| | | }, |
| | | |
| | | insertRegionSaveList (type, positions, name) { |
| | | insertRegionSaveList(type, positions, name).then(res => { |
| | | console.log('已保存') |
| | | this.$message({ |
| | | message: '保存成功' |
| | | }) |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | border-radius: 10px; |
| | | overflow-y: auto; |
| | | |
| | | & > div { |
| | | &>div { |
| | | height: 100%; |
| | | padding: 0 10px; |
| | | line-height: 36px; |
| | |
| | | width: 180px; |
| | | height: 100px; |
| | | background-color: $bg-color; |
| | | |
| | | input { |
| | | outline: none; |
| | | border: 1px solid #005ca9; |
| | |
| | | color: #fff; |
| | | padding-left: 6px; |
| | | } |
| | | |
| | | .btn { |
| | | width: 60px; |
| | | height: 30px; |
| | |
| | | cursor: pointer; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .close { |
| | | position: absolute; |
| | | top: 0; |
| | |
| | | width: 20px; |
| | | height: 10px; |
| | | } |
| | | |
| | | .close::before { |
| | | content: '\e6db'; |
| | | font-family: element-icons; |
| | |
| | | .list-show { |
| | | flex: 1; |
| | | |
| | | & > div { |
| | | &>div { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |