guanqb
2023-03-21 7530654246516f9e4918816d58f86a528726b94e
大搜问题解决
7 files modified
1 files renamed
390 ■■■■■ changed files
src/components/map/index.vue 26 ●●●●● patch | view | raw | blame | history
src/components/mapSearchBox/index.vue 46 ●●●●● patch | view | raw | blame | history
src/styles/media/index.scss 51 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue 3 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 201 ●●●●● patch | view | raw | blame | history
src/views/police/index.vue 9 ●●●● patch | view | raw | blame | history
src/views/video/list.vue 30 ●●●● patch | view | raw | blame | history
src/views/video/region.vue 24 ●●●● patch | view | raw | blame | history
src/components/map/index.vue
@@ -313,15 +313,15 @@
            that.switchImg()
            // 外网
            // global.viewer.imageryLayers.addImageryProvider(
            //     new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
            //         url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c',
            //         subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
            //         format: 'image/jpeg',
            //         show: true,
            //         maximumLevel: 18
            //     })
            // )
            global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
                    url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c',
                    subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
                    format: 'image/jpeg',
                    show: true,
                    maximumLevel: 18
                })
            )
            // 设置地图初始位置,角度等
            global.viewer.camera.setView({
@@ -1065,7 +1065,13 @@
        // 清除建筑3D
        clearHouse3D () {
            flootEntitysEntites.removeAll()
            if (flootEntitysEntites == null) {
                floorEntitysLayers = new global.DC.Namespace.Cesium.CustomDataSource("floorEntitysLayers")
                global.viewer.dataSources.add(floorEntitysLayers)
                flootEntitysEntites = floorEntitysLayers.entities
            } else {
                flootEntitysEntites.removeAll()
            }
        },
    },
src/components/mapSearchBox/index.vue
File was renamed from src/views/activity/components/mapSearchBox.vue
@@ -1,8 +1,7 @@
<template>
    <div>
        <div class="search-content">
            <input v-model="searchExtensivelyValue" @input="searchExtensivelyChange" @focus="searchExtensivelyFocus"
                type="text" placeholder="请输入搜索条件" />
            <input v-model="searchExtensivelyValue" type="text" placeholder="请输入搜索条件" />
            <div class="clear" v-show="isShowClearBtn" @click="clearSearchValue" title="清空">
                <img src="/img/icon/clear.png" alt />
            </div>
@@ -21,12 +20,36 @@
import { getSearchExtensively } from '@/api/dept/index.js'
export default {
    name: 'mapSearchBox',
    data () {
        return {
            searchExtensivelyValue: '',
            isShowClearBtn: false,
            searchExtensivelyValBoxShow: false,
            searchExtensivelyArray: [],
        }
    },
    watch: {
        searchExtensivelyValue: {
            handler (newText, oldText) {
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'searchLayer',
                    type: 'VectorLayer'
                })
                if (newText == '') {
                    this.searchExtensivelyValBoxShow = false
                    this.isShowClearBtn = false
                    this.searchExtensivelyArray = []
                } else {
                    this.searchExtensivelyValBoxShow = true
                    this.isShowClearBtn = true
                    this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue)
                }
            }
        }
    },
@@ -67,22 +90,9 @@
            this.searchExtensivelyChange()
        },
        searchExtensivelyChange () {
            if (this.searchExtensivelyValue == '') {
                this.searchExtensivelyValBoxShow = false
                this.isShowClearBtn = false
                this.searchExtensivelyArray = []
            } else {
                this.searchExtensivelyValBoxShow = true
                this.isShowClearBtn = true
                this.$nextTick(()=>{
                    this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue)
                })
            }
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'searchLayer',
                type: 'VectorLayer'
            })
        searchExtensivelyChange (e) {
            // console.log(e)
        },
        searchExtensivelyFocus () {
src/styles/media/index.scss
@@ -1394,6 +1394,57 @@
                                    }
                                }
                            }
                            .search-content {
                                left: countSizeVw(760, 1920);
                                top: countSizeVh(100);
                                width: countSizeVw(460, 1920);
                                height: countSizeVh(36);
                                input {
                                    width: countSizeVw(400, 1920);
                                    font-size: countSizeVh(18);
                                    border: countSizeVh(1) solid rgb(0, 92, 169);
                                    border-radius: countSizeVh(20) 0 0 countSizeVh(20);
                                    // vertical-align: top;
                                }
                                .clear {
                                    right: countSizeVw(70, 1920);
                                    img {
                                        width: countSizeVh(16);
                                        height: countSizeVh(16);
                                        margin-top: countSizeVh(10);
                                    }
                                }
                                button {
                                    font-size: countSizeVh(24);
                                    width: countSizeVw(60, 1920);
                                    border: countSizeVh(1) solid rgb(0, 92, 169);
                                    border-radius: 0 countSizeVh(20) countSizeVh(20) 0;
                                }
                                button:active {
                                    border: countSizeVh(1) solid rgb(0, 92, 169);
                                }
                            }
                            .searchExtensively-val-box {
                                top: countSizeVh(80);
                                left: countSizeVw(760, 1920);
                                width: countSizeVw(380, 1920);
                                max-height: countSizeVh(400);
                                border-radius: countSizeVh(10);
                                &>div {
                                    div {
                                        padding: 0 countSizeVw(10, 1920);
                                        line-height: countSizeVh(36);
                                    }
                                }
                            }
                        }
                    }
src/views/activity/index.vue
@@ -264,7 +264,6 @@
import { getEquipmentAll } from '@/api/home/index.js'
import activityDetail from './components/activityDetail.vue'
import drawBtnBox from './components/drawBtnBox.vue'
import mapSearchBox from './components/mapSearchBox.vue'
import videoControlBox from './components/videoControlBox.vue'
let polylineAreaLayer = null
@@ -496,7 +495,7 @@
        }
    },
    components: { activityDetail, drawBtnBox, mapSearchBox, videoControlBox },
    components: { activityDetail, drawBtnBox, videoControlBox },
    created () {
        let userInfo = sessionStorage.getItem("userInfo")
src/views/house/index.vue
@@ -340,21 +340,8 @@
                </div>
            </div>
        </div>
        <!-- <transition name="special-animal"></transition>-->
        <div class="search-content">
            <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>
            <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" :key="index">
                    {{ item.name }}</div>
            </div>
        </div>
        <map-search-box></map-search-box>
        <el-dialog title="报警信息" :modal="true" :visible.sync="policeSituationVisible" :append-to-body="true"
            :before-close="policeSituationBeforeClose" :close-on-click-modal="true" class="policeSituation-details-box">
@@ -531,10 +518,6 @@
            buildingList: [],
            buildingChoosed: {},
            unitHouseChoosed: [],
            searchExtensivelyValBoxShow: false,
            searchExtensivelyArray: [],
            searchExtensivelyValue: '',
            isShowClearBtn: false,
            parkingLotData: [],
            comeOutData: [
                { name: 123, date: 555 },
@@ -768,12 +751,6 @@
            }
        },
        // 大搜
        getSearchExtensively (ak, region, query) {
            getSearchExtensively(ak, region, query).then(res => {
                this.searchExtensivelyArray = res.data.result
            })
        },
        // 大搜之搜索面详细数据(停车场出入口商场、 小区名称类型地址、楼栋数据)
        getSearchExtensivelyBgAoiDeepdata (ak, region, ids, infos) {
@@ -1019,93 +996,6 @@
        // 大小重置
        boxResize (val) {
            this.boxShow = val
        },
        searchExtensivelyClick () {
            this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue)
            this.searchExtensivelyValBoxShow = false
            if (this.searchExtensivelyArray.length > 0) {
                this.$EventBus.$emit('toPosition', {
                    siteJd: `${this.searchExtensivelyArray[0].location.lng}`,
                    siteWd: `${this.searchExtensivelyArray[0].location.lat}`,
                    siteGd: 200,
                })
                this.searchExtensivelyValue = this.searchExtensivelyArray[0].name
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'searchLayer',
                    type: 'VectorLayer'
                })
                this.$EventBus.$emit('layerPointAdd', {
                    layerName: 'searchLayer',
                    type: 'label',
                    params: {
                        lng: `${this.searchExtensivelyArray[0].location.lng}`,
                        lat: `${this.searchExtensivelyArray[0].location.lat}`,
                        alt: 1,
                        text: this.searchExtensivelyArray[0].name
                    },
                })
            }
        },
        searchExtensivelyChange () {
            if (this.searchExtensivelyValue == '') {
                this.searchExtensivelyValBoxShow = false
                this.isShowClearBtn = false
                this.searchExtensivelyArray = []
            } else {
                this.searchExtensivelyValBoxShow = true
                this.isShowClearBtn = true
                this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue)
            }
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'searchLayer',
                type: 'VectorLayer'
            })
        },
        searchExtensivelyVlaClick (item) {
            this.searchExtensivelyValBoxShow = false
            this.searchExtensivelyValue = item.name
            this.$EventBus.$emit('toPosition', {
                siteJd: `${item.location.lng}`,
                siteWd: `${item.location.lat}`,
                siteGd: 200,
            })
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'searchLayer',
                type: 'VectorLayer'
            })
            this.$EventBus.$emit('layerPointAdd', {
                layerName: 'searchLayer',
                type: 'label',
                params: {
                    lng: `${item.location.lng}`,
                    lat: `${item.location.lat}`,
                    alt: 1,
                    text: item.name
                }
            })
            this.$EventBus.$emit('layerPointAdd', {
                layerName: 'searchLayer',
                type: "billboard",
                params: {
                    lng: `${item.location.lng}`,
                    lat: `${item.location.lat}`,
                    alt: 1,
                    url: '/img/icon/location.png'
                },
            })
        },
        searchExtensivelyFocus () {
            this.searchExtensivelyValBoxShow = true
            this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue)
        },
        clearSearchValue () {
            this.searchExtensivelyValue = ''
            this.searchExtensivelyChange()
        },
        deepDataRowClick (row, params) {
@@ -2106,93 +1996,6 @@
        }
    }
    .search-content {
        position: absolute;
        position: fixed;
        z-index: 99;
        left: 760px;
        top: 40px;
        width: 460px;
        height: 36px;
        input {
            flex: 1;
            width: 400px;
            height: 100%;
            font-size: 18px;
            text-indent: 1em;
            color: #ffffff;
            background-color: rgba(24, 79, 202, 0.75);
            border: 1px solid rgb(0, 92, 169);
            border-radius: 20px 0 0 20px;
            vertical-align: top;
        }
        input:focus {
            outline: none;
        }
        input::-webkit-input-placeholder {
            color: rgba(238, 238, 238, 0.7);
        }
        .clear {
            position: absolute;
            top: 0;
            right: 70px;
            cursor: pointer;
            img {
                width: 16px;
                height: 16px;
                margin-top: 10px;
            }
        }
        button {
            font-size: 24px;
            font-weight: 700;
            width: 60px;
            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);
        }
    }
    .searchExtensively-val-box {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 760px;
        width: 380px;
        max-height: 160px;
        text-align: left;
        color: #fff;
        background: $el-dialog-bg-color;
        z-index: 1111;
        border-radius: 10px;
        overflow: hidden;
        &>div {
            height: 100%;
            overflow-y: auto;
            div {
                padding: 0 10px;
                line-height: 36px;
                cursor: pointer;
            }
        }
    }
}
.progress {
src/views/police/index.vue
@@ -110,14 +110,7 @@
            </div>
        </div>
        <div class="search-content">
            <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>
            <button @click="searchExtensivelyClick" class="el-icon-search"></button>
        </div>
        <map-search-box></map-search-box>
        <div v-show="searchExtensivelyValBoxShow" class="searchExtensively-val-box">
            <div>
src/views/video/list.vue
@@ -61,24 +61,25 @@
                            &nbsp;
                            <span v-show="node.data.number && node.data.number != -1">
                                ({{
                                    node.data.number
                                }}个)
                            </span>
                            ({{
                                node.data.number
                            }}个)
                        </span>
                    </el-tree>
                </el-scrollbar>
                    </span>
                </el-tree>
            </el-scrollbar>
            </div>
        </div>
        <div class="search-content">
            <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>
            <button @click="searchExtensivelyClick" class="el-icon-search"></button>
        </div>
        <!-- <div class="search-content">
                <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>
                <button @click="searchExtensivelyClick" class="el-icon-search"></button>
            </div> -->
        <map-search-box></map-search-box>
        <div v-show="searchExtensivelyValBoxShow" class="searchExtensively-val-box">
            <div>
@@ -518,6 +519,7 @@
        getSearchExtensively (ak, region, query) {
            getSearchExtensively(ak, region, query).then(res => {
                this.searchExtensivelyArray = res.data.result
                console.log('res.data.result', res.data.result[0].name)
            })
        },
src/views/video/region.vue
@@ -22,7 +22,9 @@
                <div v-show="true" class="search-val-box">
                    <div @click="searchVlaClick(item)" v-for="(item, index) in searchArray" :key="index">{{ item.name }}
                    </div>
            </div>
                </div>
            <map-search-box></map-search-box>
            <div class="list-show">
                    <div class="car-list">
@@ -33,9 +35,9 @@
                                <el-table-column prop="name" label="范围名称" min-width="50%"></el-table-column>
                                <el-table-column prop="extent" label="长度km/面积㎡" min-width="50%">
                                    <!-- <template slot-scope="scope">
                                                                    <span>{{ scope.row.extent }}</span>
                                                                    <span>千米</span>
                                                                </template>-->
                                                                        <span>{{ scope.row.extent }}</span>
                                                                        <span>千米</span>
                                                                    </template>-->
                                </el-table-column>
                                <el-table-column prop="id" label="操作" min-width="50%">
                                    <template slot-scope="scope">
@@ -234,7 +236,7 @@
            <video id="videoElement" autoplay controls width="100%" height="100%" style="object-fit: fill"></video>
        </el-dialog>
        <el-dialog title="修改范围" :modal="false" :visible.sync="editRangeVisible" :close-on-click-modal="true"
        <el-dialog title="范围设置" :modal="false" :visible.sync="editRangeVisible" :close-on-click-modal="true"
            class="edit-range-box">
            <div class="line">
                <div class="value-name-box">选择范围颜色:</div>
@@ -450,7 +452,7 @@
        //     })
        // },
        playVideoList (flvItemPlayer, flvUrl, videoEleName,index) {
        playVideoList (flvItemPlayer, flvUrl, videoEleName, index) {
            if (this.flvListPlayer[flvItemPlayer] != null) {
                this.flvListPlayer[flvItemPlayer].pause()
                this.flvListPlayer[flvItemPlayer].unload()
@@ -482,13 +484,13 @@
            this.monitor[`type${args}`] = this.monitorOption[val].item.name
            if (this.monitorOption[val].item.status == 0) {
                this.isShowOutline[`video${args}`] = true
            }else{
            } else {
                this.isShowOutline[`video${args}`] = false
                this.isShowVideoLoading[`video${args}`] = true
            }
            this.getDevices(this.monitorOption[val].item.channelId).then(res => {
                this.playVideoList(`flvPlayer${args}`, `${res}`, `videoElement${args}`,`${args}`)
                this.playVideoList(`flvPlayer${args}`, `${res}`, `videoElement${args}`, `${args}`)
            })
        },
@@ -792,12 +794,12 @@
                                this.monitor[`type${ind}`] = item.name
                                if (item.status == 0) {
                                    this.isShowOutline[`video${ind}`] = true
                                }else{
                                } else {
                                    this.isShowVideoLoading[`video${ind}`] = true
                                }
                                this.getDevices(item.channelId).then(res => {
                                    this.playVideoList(`flvPlayer${ind}`, `${res}`, `videoElement${ind}`,`${ind}`)
                                    this.playVideoList(`flvPlayer${ind}`, `${res}`, `videoElement${ind}`, `${ind}`)
                                })
                            }
                        })
@@ -841,7 +843,7 @@
                                }
                                this.getDevices(item.channelId).then(res => {
                                    this.playVideoList(`flvPlayer${ind}`, `${res}`, `videoElement${ind}`,`${ind}`)
                                    this.playVideoList(`flvPlayer${ind}`, `${res}`, `videoElement${ind}`, `${ind}`)
                                })
                            }
                        })