1
shuishen
2022-11-18 3e8cca7cc78a6c21dbb65db5c5c5d9586b90b657
1
3 files modified
2516 ■■■■■ changed files
package-lock.json 2413 ●●●●● patch | view | raw | blame | history
src/utils/EntityDraw.js 36 ●●●●● patch | view | raw | blame | history
src/views/video/index.vue 67 ●●●●● patch | view | raw | blame | history
package-lock.json
Diff too large
src/utils/EntityDraw.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-10-18 17:17:50
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-11-17 16:29:06
 * @LastEditTime: 2022-11-18 09:22:49
 * @FilePath: \srs-police-affairs\src\utils\EntityDraw.js
 * @Description: 
 * 
@@ -61,6 +61,8 @@
        this.getMoveEvent = this.getMoveEvent.bind(this)
        this.getRightEvent = this.getRightEvent.bind(this)
        this.resizePolyLineGon = this.resizePolyLineGon.bind(this)
        this.Cesium = global.DC.Namespace.Cesium
        this.eventHandler = new global.DC.Namespace.Cesium.ScreenSpaceEventHandler(global.viewer.scene.canvas)
@@ -102,10 +104,9 @@
        this.registerEvents()
        this.initLeftDownEventHandler()
        this.initLeftUpEventHandler()
        this.initMouseMoveEventHandler()
        // this.initLeftDownEventHandler()
        // this.initLeftUpEventHandler()
        // this.initMouseMoveEventHandler()
    }
    deactivate () {
@@ -236,8 +237,7 @@
                return
            }
        }
        this.lastEventData = event.windowPosition
        this.cb(this.lastEventData)
        this.terminateShape()
    }
@@ -268,13 +268,13 @@
            this.drawPolylineLayer.addOverlay(polyline)
            this.addPolyLineGon(100)
            this.addPolyLineGon(100, this.cb)
            this.EditMoveCenterPositoin = this.Cesium.Cartesian3.fromDegrees(this.drawCompletePosition[this.drawCompletePosition.length - 1].lng + 200 * lngOneM, this.drawCompletePosition[this.drawCompletePosition.length - 1].lat + 200 * latOneM, 0)
            // this.EditMoveCenterPositoin = this.Cesium.Cartesian3.fromDegrees(this.drawCompletePosition[this.drawCompletePosition.length - 1].lng + 200 * lngOneM, this.drawCompletePosition[this.drawCompletePosition.length - 1].lat + 200 * latOneM, 0)
            global.viewer.scene.globe.depthTestAgainstTerrain = true
            // global.viewer.scene.globe.depthTestAgainstTerrain = true
            this.createEditMoveCenterEntity()
            // this.createEditMoveCenterEntity()
        } else {
            let polygon = new global.DC.Polygon(this.drawCompletePosition)
@@ -285,6 +285,10 @@
            })
            this.drawPolygonLayer.addOverlay(polygon)
            this.lastEventData = this.drawCompletePosition
            this.cb(this.lastEventData)
        }
        this.clickInTheProcess()
@@ -339,7 +343,11 @@
        this.drawCompletePosition = []
    }
    addPolyLineGon (num) {
    resizePolyLineGon (num) {
        this.addPolyLineGon(num)
    }
    addPolyLineGon (num, cb) {
        this.drawPolyLineGonLayer.clear()
        let coords = global.DC.GeoTools.polylineBuffer(this.drawCompletePosition, num)
@@ -351,6 +359,10 @@
        })
        this.drawPolyLineGonLayer.addOverlay(polygon)
        this.lastEventData = coords
        cb(this.lastEventData)
    }
    //场景鼠标左键按下事件
src/views/video/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-11-17 16:22:12
 * @LastEditTime: 2022-11-18 09:26:32
 * @FilePath: \srs-police-affairs\src\views\video\index.vue
 * @Description: 辖区管理
 * 
@@ -13,12 +13,7 @@
    <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>
@@ -29,58 +24,33 @@
            </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="manufacturer" 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>
    </div>
</template>
@@ -230,7 +200,7 @@
        },
        draw (type) {
            const that = this
            graphicLayer.activate(type, (lastEventData) => {
                console.log('数据更新', JSON.stringify(lastEventData))
            })
@@ -239,6 +209,13 @@
        removeDrawLayer () {
            graphicLayer.clearLayer()
        },
        // 修改范围
        setRegion () {
            graphicLayer.addPolyLineGon(5000, (lastEventData) => {
                console.log('数据更新', JSON.stringify(lastEventData))
            })
        },
        // 大小重置
@@ -339,7 +316,7 @@
            border-radius: 10px;
            overflow-y: auto;
            & > div {
            &>div {
                height: 100%;
                padding: 0 10px;
                line-height: 36px;
@@ -363,7 +340,7 @@
        .list-show {
            flex: 1;
            & > div {
            &>div {
                height: 100%;
                display: flex;
                flex-direction: column;