guanqb
2023-02-08 a658da448d34ad1b8c72dce1d47d9046aa34ef4b
项目整体调整
9 files modified
279 ■■■■■ changed files
src/api/home/index.js 6 ●●●● patch | view | raw | blame | history
src/api/police/index.js 4 ●●●● patch | view | raw | blame | history
src/api/video/index.js 9 ●●●●● patch | view | raw | blame | history
src/components/map/index.vue 64 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue 13 ●●●●● patch | view | raw | blame | history
src/views/house/index.vue 8 ●●●● patch | view | raw | blame | history
src/views/police/index.vue 15 ●●●● patch | view | raw | blame | history
src/views/video/list.vue 154 ●●●● patch | view | raw | blame | history
src/views/video/region.vue 6 ●●●● patch | view | raw | blame | history
src/api/home/index.js
@@ -120,7 +120,10 @@
// 获取设备分页数据 
export const getEquipmentPaging = (params) => {
    return request({
        // 内网
        url: `/device/query/devices/36110000002009999000/channelsCar`,
        // 外网
        // url: `/device/query/devices/34020000002000000003/channelsCar`,
        method: 'get',
        requestBaseUrl: 'outside',
        params: {
@@ -136,7 +139,8 @@
        method: 'get',
        params: {
            ...params,
            deviceId: '36110000002009999000'
            // deviceId: '36110000002009999000'
            deviceId: '34020000002000000003'
        }
    })
}
src/api/police/index.js
@@ -18,9 +18,9 @@
export const getHistoricalTrack = (params, requestBaseUrl = 'outside') => {
    return request({
        // 平台ID在这里更换,不要传了内网使用
        url: `/position/history/36110000002009999000`,
        // url: `/position/history/36110000002009999000`,
        // 开发使用
        // url: `/position/history/34020000001320000001`,
        url: `/position/history/34020000002000000003`,
        method: 'get',
        requestBaseUrl,
        params: params
src/api/video/index.js
@@ -21,7 +21,9 @@
export const getVideoList = (page, count, query, params = {}) => {
    return request({
        // 内网使用地址,外网把36110000002009999000更换掉
        url: '/device/query/devices/36110000002009999000/channels',
        // url: '/device/query/devices/36110000002009999000/channels',
        // 外网使用地址
        url: '/device/query/devices/34020000002000000003/channels',
        method: 'get',
        requestBaseUrl: 'outside',
        params: {
@@ -93,7 +95,7 @@
 * @param {*} positions 坐标
 * @param {*} name 名称
 */
export const insertRegionSaveList = (type, positions, name, patrol) => {
export const insertRegionSaveList = (type, positions, name, patrol, extent) => {
    return request({
        url: '/api/range/range/insertes',
        method: 'post',
@@ -101,7 +103,8 @@
            type,
            positions,
            name,
            patrol
            patrol,
            extent
        }
    })
}
src/components/map/index.vue
@@ -15,21 +15,38 @@
        <!-- 全屏控制按钮 -->
        <div class="screen-full-btn">
            <el-tooltip v-if="isFullscreen" content="缩放" placement="bottom" effect="dark">
                <i class="fa fa-compress" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                <i
                    class="fa fa-compress"
                    style="vertical-align: middle; cursor: pointer"
                    @click="fullscreenchange"
                ></i>
            </el-tooltip>
            <el-tooltip v-if="!isFullscreen" content="全屏" placement="bottom" effect="dark">
                <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                <i
                    class="fa fa-expand"
                    style="vertical-align: middle; cursor: pointer"
                    @click="fullscreenchange"
                ></i>
            </el-tooltip>
        </div>
        <!-- 切换矢量图按钮 -->
        <div style="display: none !important;" class="image-switch-icon-btn" title="切换影像" @mouseover="showImgBtn = true"
            @mouseleave="showImgBtn = false">
        <div
            style="display: none !important;"
            class="image-switch-icon-btn"
            title="切换影像"
            @mouseover="showImgBtn = true"
            @mouseleave="showImgBtn = false"
        >
            <div class="icon-box">
                <img src="/img/base_map.png" alt />
            </div>
            <div class="image-switch-img-btn" v-show="showImgBtn" @mouseover="showImgBtn = true"
                @mouseleave="showImgBtn = false">
            <div
                class="image-switch-img-btn"
                v-show="showImgBtn"
                @mouseover="showImgBtn = true"
                @mouseleave="showImgBtn = false"
            >
                <div class="img" @click="switchImg">
                    <span :class="{ on: imgtype == 0 }">影像</span>
                </div>
@@ -186,23 +203,23 @@
            // 上饶部署,内网使用的
            global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
                    url: "http://10.141.11.11:8090/MapTileService/wmts?STORETYPE=merged-dat&PROJECTION=4326",
                    layer: "wmts_4326_361100",
                    style: "default",
                    format: "image/png",
                    tileMatrixSetID: "c",
                    tileMatrixLabels: new Array(18).fill(0).map((v, i) => i + 1),
                    tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(),
                })
            )
            // global.viewer.imageryLayers.addImageryProvider(
            //     new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
            //         url: "http://10.141.11.11:8090/MapTileService/wmts?STORETYPE=merged-dat&PROJECTION=4326",
            //         layer: "wmts_4326_361100",
            //         style: "default",
            //         format: "image/png",
            //         tileMatrixSetID: "c",
            //         tileMatrixLabels: new Array(18).fill(0).map((v, i) => i + 1),
            //         tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(),
            //     })
            // )
            global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
                    url: 'http://10.141.11.11:80/ysapi/geoserver/gwc/service/wmts/{z}/{y}/{x}.png',
                })
            )
            // global.viewer.imageryLayers.addImageryProvider(
            //     new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
            //         url: 'http://10.141.11.11:80/ysapi/geoserver/gwc/service/wmts/{z}/{y}/{x}.png',
            //     })
            // )
            // 影像图层
            // const ysWmts = global.viewer.imageryLayers.addImageryProvider(
@@ -252,9 +269,6 @@
                that.$EventBus.$emit('stdgetAoiByPt', { lng: e.wgs84Position.lng, lat: e.wgs84Position.lat, height: e.wgs84Position.alt })
            })
            // let positions = [[117.9514788, 28.4478968, 0], [117.9514698, 28.4478947, 0], [117.9513974, 28.4476981, 0], [117.9515047, 28.4476748, 0], [117.9515289, 28.4476939, 0], [117.9515508, 28.447755, 0], [117.9516278, 28.4477353, 0], [117.9516623, 28.4478497, 0], [117.9514788, 28.4478968, 0]]
            // let positions = [[117.951478782, 28.447896798, 0], [117.951469798, 28.447894686, 0], [117.951397357, 28.447698099, 0], [117.951505114, 28.447674695, 0], [117.951485465, 28.447619271, 0], [117.951706955, 28.447558541, 0], [117.951722755, 28.447611995, 0], [117.951834021, 28.447588427, 0], [117.951896863, 28.447789523, 0], [117.951478782, 28.447896798, 0]]
            let positions = [[117.951478782, 28.447896798, 0], [117.951469798, 28.447894686, 0], [117.951397357, 28.447698099, 0], [117.951505114, 28.447674695, 0], [117.951485465, 28.447619271, 0], [117.951706955, 28.447558541, 0], [117.951722755, 28.447611995, 0], [117.951834021, 28.447588427, 0], [117.951896863, 28.447789523, 0], [117.951478782, 28.447896798, 0]]
            let MIN_F_H = positions.map(item => {
                item[2] = 70
src/views/activity/index.vue
@@ -543,14 +543,7 @@
                    }]
                }, {
                    id: 3,
                    label: '视频监控',
                    children: [{
                        id: 10,
                        label: '监控1',
                        lng: 116.032703,
                        lat: 28.677435,
                        alt: 100,
                    }]
                    label: '视频监控'
                }, {
                    id: 4,
                    label: '治安重点场所',
@@ -645,10 +638,6 @@
                        lat: 28.684435,
                        alt: 100,
                    }]
                },
                {
                    id: 777,
                    label: '热力图'
                }]
            }],
            defaultProps: {
src/views/house/index.vue
@@ -248,7 +248,7 @@
                        </div>-->
                        <div class="house-element-info" v-if="isShowHouseBox">
                            <!-- 选择单元 -->
                            <div class="condo">
                            <div class="condo" v-show="isShowUnitChoose">
                                <div class="type">选择单元</div>
                                <div class="type-select">
                                    <el-select
@@ -611,7 +611,7 @@
            <div class="header">
                <div>
                    姓名:
                    <input type="text" v-model="peopleName" placeholder="请输入负责人名称" />
                    <input type="text" v-model="peopleName" placeholder="请输入人员姓名" />
                </div>
                <div>
                    联系电话:
@@ -767,6 +767,7 @@
            pictLoading: false,
            isShowHouseBox: true,
            floorChoosed: {},
            isShowUnitChoose: false,
        }
    },
@@ -1007,6 +1008,9 @@
                    // let unitData = res.data.data.unit[this.unitValue - 1].house
                    let unitData = houseData.nwwqd.features
                    this.floorInfo.house_num = unitData.length
                    if (houseData.hwtxa.features.length > 1) {
                        this.isShowUnitChoose = true
                    }
                    let houseFloorList = []
                    unitData.forEach(item => {
                        if (houseFloorList.indexOf(Number(item.properties.cftlg)) === -1) {
src/views/police/index.vue
@@ -49,7 +49,7 @@
                        :height="currentTableHeight"
                    >
                        <el-table-column
                            prop="name"
                            prop="newName"
                            :show-overflow-tooltip="true"
                            label="名称"
                            min-width="56%"
@@ -313,7 +313,18 @@
                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 }
                        let newName = ''
                        if (params.type == 0) {
                            newName = item.name.replace('上饶-', '')
                        } else {
                            if (item.name.charAt(7) == '-') {
                                newName = item.name.slice(8)
                            } else {
                                newName = item.name.slice(7)
                            }
                        }
                        return { ...item, newName: newName, lng: item.longitude, lat: item.latitude, alt: 100 }
                    })
                    this.equimentTableData.forEach(item => {
src/views/video/list.vue
@@ -14,13 +14,18 @@
        <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="请输入搜索条件"
                />
            </div>
            <div class="draw-btn">
                搜索范围:
                <el-button type="primary" size="mini" @click="draw('polygon')">绘制面</el-button>
                <el-button type="primary" size="mini" @click="draw('polyline')">绘制线</el-button>
                <!-- <el-button type="primary" size="mini" @click="draw('polygon')">绘制面</el-button> -->
                <el-button type="primary" size="mini" @click="draw('polyline')">巡查路线</el-button>
                <el-button type="primary" size="mini" @click="removeDrawLayer">清除</el-button>
                <el-button type="primary" size="mini" @click="saveDraw">保存</el-button>
            </div>
@@ -31,49 +36,93 @@
                <button @click="changeRange" class="btn">确定</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
                    @click="searchVlaClick(item)"
                    v-for="(item, index) in searchArray"
                    :key="index"
                >{{ item.name }}</div>
            </div>
            <div class="down-tree">
                <el-scrollbar>
                    <el-tree v-show="searchLazyFlag" :props="props" :load="loadNode" lazy
                        @node-click="treeClick"></el-tree>
                    <el-tree
                        v-show="searchLazyFlag"
                        :props="props"
                        :load="loadNode"
                        lazy
                        @node-click="treeClick"
                    ></el-tree>
                    <el-tree v-show="searchLazyFlag == false" :data="searchTreeData" :props="defaultProps"
                        :default-expand-all="true" @node-click="treeClick"></el-tree>
                    <el-tree
                        v-show="searchLazyFlag == false"
                        :data="searchTreeData"
                        :props="defaultProps"
                        :default-expand-all="true"
                        @node-click="treeClick"
                    ></el-tree>
                </el-scrollbar>
            </div>
            <div class="list-show" v-if="false">
                <div class="car-list">
                    <div class="list-box">
                        <el-table :data="monitoringList" style="width: 100%"
                        <el-table
                            :data="monitoringList"
                            style="width: 100%"
                            :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 :show-overflow-tooltip="true" prop="name" label="点位名称"
                                min-width="35%"></el-table-column>
                            <el-table-column :show-overflow-tooltip="true" prop="pTZTypeText" label="点位类型"
                                min-width="35%"></el-table-column>
                            <el-table-column :show-overflow-tooltip="true" prop="status" label="状态" min-width="30%">
                            :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                            @cell-click="rowClick"
                        >
                            <el-table-column
                                :show-overflow-tooltip="true"
                                prop="name"
                                label="点位名称"
                                min-width="35%"
                            ></el-table-column>
                            <el-table-column
                                :show-overflow-tooltip="true"
                                prop="pTZTypeText"
                                label="点位类型"
                                min-width="35%"
                            ></el-table-column>
                            <el-table-column
                                :show-overflow-tooltip="true"
                                prop="status"
                                label="状态"
                                min-width="30%"
                            >
                                <template slot-scope="scope">
                                    <div class="state-box" :class="{ online: scope.row.status == '1' }"></div>
                                    <div
                                        class="state-box"
                                        :class="{ online: scope.row.status == '1' }"
                                    ></div>
                                </template>
                            </el-table-column>
                        </el-table>
                    </div>
                    <div class="pages">
                        <el-pagination background layout="prev, pager, next" :page-size="pagesize"
                            :page-count="pagesCount" :current-page="currentPage" pager-count="5"
                            @current-change="handleCurrentChange"></el-pagination>
                        <el-pagination
                            background
                            layout="prev, pager, next"
                            :page-size="pagesize"
                            :page-count="pagesCount"
                            :current-page="currentPage"
                            pager-count="5"
                            @current-change="handleCurrentChange"
                        ></el-pagination>
                    </div>
                </div>
            </div>
        </div>
        <div class="search-content">
            <input v-model="searchExtensivelyValue" @input="searchExtensivelyChange" @focus="searchExtensivelyFocus"
                type="text" placeholder="请输入搜索条件" />
            <input
                v-model="searchExtensivelyValue"
                @input="searchExtensivelyChange"
                @focus="searchExtensivelyFocus"
                type="text"
                placeholder="请输入搜索条件"
            />
            <div class="clear" v-show="isShowClearBtn" @click="clearSearchValue" title="清空">
                <img src="../../../public/img/icon/clear.png" alt />
            </div>
@@ -81,17 +130,39 @@
        </div>
        <div v-show="searchExtensivelyValBoxShow" class="searchExtensively-val-box">
            <div>
                <div @click="searchExtensivelyVlaClick(item)" v-for="(item, index) in searchExtensivelyArray"
                    :key="index">{{ item.name }}</div>
                <div
                    @click="searchExtensivelyVlaClick(item)"
                    v-for="(item, index) in searchExtensivelyArray"
                    :key="index"
                >{{ item.name }}</div>
            </div>
        </div>
        <el-dialog :title="dialogTitle" :modal="false" :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="false"
            :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="false" :visible.sync="drawDialogVisible"
            :before-close="drawDialogBeforeClose" :close-on-click-modal="true" class="video-draw-box">
        <el-dialog
            :title="drawDialogTitle"
            :modal="false"
            :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>
@@ -393,8 +464,16 @@
            } else {
                let drawPositionStr = ''
                let drawPositionLineStr = ''
                let extent = 0
                if (this.drawType == 1) {
                    let linePosition = []
                    this.drawInfo.lineData.forEach(item => {
                        linePosition.push([item.lng, item.lat])
                    })
                    let line = this.$turf.lineString(linePosition)
                    let length = this.$turf.length(line, { units: 'kilometers' })
                    extent = length.toFixed(3)
                    this.drawInfo.data.forEach(item => {
                        drawPositionStr += item[0] + ' ' + item[1] + ','
                    })
@@ -403,7 +482,6 @@
                    })
                    drawPositionStr = drawPositionStr.slice(0, drawPositionStr.length - 1)
                    drawPositionLineStr = drawPositionLineStr.slice(0, drawPositionLineStr.length - 1)
                } else {
                    this.drawInfo.data.forEach(item => {
                        drawPositionStr += item.lng + ' ' + item.lat + ','
@@ -411,15 +489,16 @@
                    drawPositionStr += this.drawInfo.data[0].lng + ' ' + this.drawInfo.data[0].lat
                }
                this.insertRegionSaveList(this.drawType, drawPositionStr, this.drawName, drawPositionLineStr)
                console.log(extent, 111)
                this.insertRegionSaveList(this.drawType, drawPositionStr, this.drawName, drawPositionLineStr, extent)
                this.drawDialogVisible = false
                this.drawName = ''
                this.removeDrawLayer()
            }
        },
        insertRegionSaveList (type, positions, name, patrol) {
            insertRegionSaveList(type, positions, name, patrol).then(res => {
        insertRegionSaveList (type, positions, name, patrol, extent) {
            insertRegionSaveList(type, positions, name, patrol, extent).then(res => {
                if (res.data.success) {
                    this.$message({
                        message: '保存成功',
@@ -542,7 +621,8 @@
            }
            await getTreeDevices({
                deviceId: '36110000002009999000',
                // deviceId: '36110000002009999000',
                deviceId: '34020000002000000003',
                parentId,
                deptId: this.userInfo.dept_id,
                type,
@@ -694,7 +774,7 @@
            border-radius: 10px;
            overflow-y: auto;
            &>div {
            & > div {
                height: 100%;
                padding: 0 10px;
                line-height: 36px;
@@ -768,7 +848,7 @@
        .list-show {
            flex: 1;
            &>div {
            & > div {
                height: 100%;
                display: flex;
                flex-direction: column;
@@ -891,7 +971,7 @@
        border-radius: 10px;
        overflow: hidden;
        &>div {
        & > div {
            height: 100%;
            overflow-y: auto;
src/views/video/region.vue
@@ -43,11 +43,11 @@
                                @cell-click="rowClick"
                            >
                                <el-table-column prop="name" label="范围名称" min-width="50%"></el-table-column>
                                <el-table-column prop="type" label="范围类型" min-width="50%">
                                    <template slot-scope="scope">
                                <el-table-column prop="extent" label="长度" min-width="50%">
                                    <!-- <template slot-scope="scope">
                                        <span v-if="scope.row.type == 1">线</span>
                                        <span v-else>面</span>
                                    </template>
                                    </template>-->
                                </el-table-column>
                                <el-table-column prop="id" label="操作" min-width="50%">
                                    <template slot-scope="scope">