1
shuishen
2023-03-03 d9c8244be0a7749472cee3052822034735dae248
1
1 files modified
93 ■■■■■ changed files
src/views/activity/index.vue 93 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-02 10:06:06
 * @LastEditTime: 2023-03-03 15:48:24
 * @FilePath: \srs-police-affairs\src\views\activity\index.vue
 * @Description: 安保活动
 *
@@ -11,39 +11,12 @@
<template>
    <div class="activity-page container">
    <div v-show="boxShow" class="container-content">
        <div class="title">安保活动</div>
        <div class="search-box">
            <!-- <div>
                    <div class="category">活动类型:</div>
                    <div class="category-value">
                        <el-select
                            size="small"
                            v-model="activityType"
                            placeholder="请选择"
                            @change="activityTypeChange"
                                                                                                                                                                                                                                                                                                                                                                                                >
                                                                                                                                                                                                                                                                                                                                                                                                    <el-option
                                                                                                                                                                                                                                                                                                                                                                                                        v-for="item in activityOptions"
                                                                                                                                                                                                                                                                                                                                                                                                        :key="item.dictKey"
                                                                                                                                                                                                                                                                                                                                                                                                        :label="item.dictValue"
                                :value="item.dictKey"
                                class="activity-option"
                            ></el-option>
                        </el-select>
                    </div>
                </div>-->
        <div v-show="boxShow" class="container-content">
            <div class="title">安保活动</div>
            <div class="search-box">
                <div>
                    <div class="category">选择时间:</div>
                    <div class="category-value">
                        <!-- <el-date-picker
                                                                                                                                                                                                                                                                                                                                                                                                    size="small"
                                                                                                                                                                                                                                                                                                                                                                                                    v-model="selectTime"
                                                                                                                                                                                                                                                                                                                                                                                                    type="date"
                                                                                                                                                                                                                                                                                                                                                                                                    placeholder="选择日期"
                                                                                                                                                                                                                                                                                                                                                                                                    style="width:268px"
                                                                                                                                                                                                                                                                                                                                                                                                ></el-date-picker>-->
                        <el-date-picker v-model="selectTime" type="daterange" align="right" unlink-panels
                            format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至"
                            start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
@@ -141,10 +114,10 @@
                    <ul>
                        <li>
                            <!-- <el-button
                                                                                                                                                                                                                                                                                                                                                                                                    title="路线绘制"
                                                                                                                                                                                                                                                                                                                                                                                                    @click="draw('billboard', 'policeman')"
                                                                                                                                                                                                                                                                                                                                                                                                    icon="el-icon-my-route"
                                                                                                                                                                                                                                                                                                                                                                                                    ></el-button>-->
                                                                                                                                                                                                                                                                                                                                                                                                                    title="路线绘制"
                                                                                                                                                                                                                                                                                                                                                                                                                    @click="draw('billboard', 'policeman')"
                                                                                                                                                                                                                                                                                                                                                                                                                    icon="el-icon-my-route"
                                                                                                                                                                                                                                                                                                                                                                                                                    ></el-button>-->
                            <button @click="draw('polyline', 'policecar')" title="巡逻路线">
                                <img src="../../../public/img/icon/route1.png" style="height:100%" />
                            </button>
@@ -464,7 +437,7 @@
            <div>
                <div class="value-name-box">选择标绘颜色:</div>
                <div class="pick-color-box">
                    <el-color-picker v-model="choosePlotColor" :predefine="predefineColors" size="small"  show-alpha>
                    <el-color-picker v-model="choosePlotColor" :predefine="predefineColors" size="small" show-alpha>
                    </el-color-picker>
                </div>
            </div>
@@ -1189,7 +1162,7 @@
        getCarList () {
            getCarList().then(res => {
                res.data.data.forEach(item => {
                    this.policecarOption.push({ value: `${item.id}`, label: `${item.serialNumber}` , carType: `${item.carType}` })
                    this.policecarOption.push({ value: `${item.id}`, label: `${item.serialNumber}`, carType: `${item.carType}` })
                })
            })
        },
@@ -1281,9 +1254,9 @@
            if (iconName == 'activity') {
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0, url: '/img/icon/activity.png' }
            } else if (iconName == 'policeman') {
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0.05, url: '/img/icon/man3.png', data:data}
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0.05, url: '/img/icon/man3.png', data: data }
            } else if (iconName == 'policecar') {
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0.05, url: '/img/icon/car3.png', data:data}
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0.05, url: '/img/icon/car3.png', data: data }
            }
            return positionObj
        },
@@ -2124,7 +2097,7 @@
                        flvAddress = 'nodata'
                    }
                    this.playVideoList(`flvPlayer${args}`, `${flvAddress}`, `videoElement${args}`,`${args}`)
                    this.playVideoList(`flvPlayer${args}`, `${flvAddress}`, `videoElement${args}`, `${args}`)
                })
            } else {
@@ -2190,7 +2163,7 @@
            }
        },
        playVideoList (flvItemPlayer, flvUrl, videoEleName,index) {
        playVideoList (flvItemPlayer, flvUrl, videoEleName, index) {
            console.log('flvUrl', flvUrl)
            if (this.flvListPlayer[flvItemPlayer] != null) {
                this.flvListPlayer[flvItemPlayer].pause()
@@ -2302,7 +2275,7 @@
                                        flvAddress = 'nodata'
                                    }
                                    this.playVideoList(`flvPlayer${ind}`, `${flvAddress}`, `videoElement${ind}`,`${ind}`)
                                    this.playVideoList(`flvPlayer${ind}`, `${flvAddress}`, `videoElement${ind}`, `${ind}`)
                                })
                            } else {
                                this.isHaveMonitor[`video${ind}`] = false
@@ -2510,14 +2483,14 @@
        pointMouseOver (e) {
            this.$store.commit('SET_ACTIVITYPOLICEPOPUP', true)
            let hoverData = {}
            if('carId' in e.overlay.attrParams.data){
                hoverData = this.policecarOption.filter(item=>item.value == e.overlay.attrParams.data.carId)[0]
                hoverData.policeData={'name': 'none'}
            if ('carId' in e.overlay.attrParams.data) {
                hoverData = this.policecarOption.filter(item => item.value == e.overlay.attrParams.data.carId)[0]
                hoverData.policeData = { 'name': 'none' }
                hoverData.policeStationName = 'none'
            }else{
                let policeArr = this.filterTree (this.policeTreeData)
                hoverData.policeData = policeArr.filter(item=>item.id == e.overlay.attrParams.data.policemanId)[0]
                hoverData.policeStationName = policeArr.filter(item=>item.id == policeArr.filter(item=>item.id == e.overlay.attrParams.data.policemanId)[0].parentId)[0].name
            } else {
                let policeArr = this.filterTree(this.policeTreeData)
                hoverData.policeData = policeArr.filter(item => item.id == e.overlay.attrParams.data.policemanId)[0]
                hoverData.policeStationName = policeArr.filter(item => item.id == policeArr.filter(item => item.id == e.overlay.attrParams.data.policemanId)[0].parentId)[0].name
                hoverData.carType = 'none'
                hoverData.label = 'none'
            }
@@ -2548,14 +2521,14 @@
        // 树形数据传数组
        filterTree (tree, arr = []) {
          if (!tree.length) return []
          arr.push(...tree)
          for(let item of tree){
            if(item.children && item.children.length){
               this.filterTree(item.children,arr)
            if (!tree.length) return []
            arr.push(...tree)
            for (let item of tree) {
                if (item.children && item.children.length) {
                    this.filterTree(item.children, arr)
                }
            }
          }
          return arr
            return arr
        }
    },
@@ -2572,14 +2545,14 @@
            this.$refs.policeTree.filter(val)
        },
        policeChooseVisible(val) {
            if(val){
        policeChooseVisible (val) {
            if (val) {
                this.$store.commit('SET_ACTIVITYPOLICEPOPUP', false)
            }
        },
        policeChooseCarVisible(val){
            if(val){
        policeChooseCarVisible (val) {
            if (val) {
                this.$store.commit('SET_ACTIVITYPOLICEPOPUP', false)
            }
        }