shuishen
2023-04-09 85fb13abbeadc1765d2c0056ba99c6c19aa35dfd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-25 14:31:44
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-25 17:32:34
 * @FilePath: \srs-police-affairs\src\views\activity\components\layersShowControl.vue
 * @Description: 
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
-->
<template>
    <div>
        <div class="plan-control" v-show="dialogVisible && (isHavePolice || isHaveArrow || isHaveLine)">
            <div class="row-box" v-show="isHavePolice">
                <div class="category">要素资源:</div>
                <div class="category-value">
                    <el-switch v-model="policeSwitch" @change="switchChange" active-color="#13ce66"
                        inactive-color="#ccc"></el-switch>
                </div>
            </div>
 
            <div class="row-box" v-show="isHaveArrow">
                <div class="category">作战标绘:</div>
                <div class="category-value">
                    <el-switch v-model="arrowBtnSwitch" @change="switchArrowBtnChange" active-color="#13ce66"
                        inactive-color="#ccc"></el-switch>
                </div>
            </div>
 
            <div class="row-box" v-show="isHaveLine">
                <div class="category">巡逻路线:</div>
                <div class="category-value">
                    <el-switch v-model="polylineBtnSwitch" @change="switchBtnChange" active-color="#13ce66"
                        inactive-color="#ccc"></el-switch>
                </div>
            </div>
        </div>
    </div>
</template>
 
<script>
export default {
    props: [
        'dialogVisible',
        'isHavePolice',
        'isHaveArrow',
        'isHaveLine',
        'policeSwitch',
        'arrowBtnSwitch',
        'polylineBtnSwitch',
    ],
 
    data () {
        return {
        }
    },
 
    methods: {
        // 切换轨警力资源显示
        switchChange (e) {
            this.$parent.switchChange(e)
        },
 
        // 切换作战标绘
        switchArrowBtnChange (e) {
            this.$parent.switchArrowBtnChange(e)
        },
 
        // 切换轨迹播放控件
        switchBtnChange (e) {
            this.$parent.switchBtnChange(e)
        },
 
    },
}
</script>
 
<style lang="scss" scoped>
.plan-control {
    position: fixed;
    top: 150px;
    right: 450px;
    width: 180px;
    padding: 10px;
    color: #fff;
    background-color: $bg-color;
    border-radius: 8px;
    z-index: 98;
 
    .row-box {
        width: 100%;
        line-height: 28px;
        display: flex;
 
        &>div {
            text-align: left;
        }
 
        .category {
            width: 96px;
        }
 
        .category-value {
            flex: 1;
        }
    }
}
</style>