wangjuncheng
2025-05-08 db07d86f01f19683d7adb263139159ffe1e0c9bf
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<template>
    <div class="detail">
        <div class="detail-top">统计分析结果</div>
        <!-- <div class="detail-btn" @click="showMsg">查看详情</div> -->
        <div class="detail-close" @click="closeMsg"></div>
        <div class="detail-context">
            <div v-for="(item, key) in detailList" :key="key" class="detail-item">
                <div class="detail-name">{{ item.name }}</div>
                <div class="detail-value">{{ item.value }}</div>
            </div>
        </div>
    </div>
</template>
 
<script>
    export default {
        name: "detail",
        components: {},
        props: {
            areaName: {
                type: String,
                default: "尹家西沟",
            },
        },
        data() {
            return {
                show: false,
                detailList: [
                    {
                        name: "最大雨强:",
                        value: Number(Math.random() * 100).toFixed(2) + " mm/h",
                    },
                    {
                        name: "平均雨强:",
                        value: Number(Math.random() * 10).toFixed(2) + " mm/h",
                    },
                    {
                        name: "最大水深:",
                        value: "1.86 m",
                    },
                    {
                        name: "平均水深:",
                        value: "0.29 m",
                    },
                    {
                        name: "最大流速:",
                        value: "7 m/s",
                    },
                    {
                        name: "威胁房屋:",
                        value: "406 间",
                    },
                    {
                        name: "威胁人口:",
                        value: "145 户",
                    },
                    {
                        name: "威胁财产:",
                        value: "4872 万元",
                    },
                ],
            }
        },
        methods: {
            closeMsg() {
                this.$emit("close")
            },
            showMsg() {
                this.$emit("open")
            },
        },
    }
</script>
<style lang="less" scoped>
    .detail {
        background: url("@/assets/img/tools/messagebg.png");
        background-size: 100% 100%;
        width: 391px;
        height: 420px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 99;
    }
 
    .detail-top {
        position: absolute;
        top: 5px;
        left: 20px;
        font-weight: 700;
        font-size: 18px;
        font-weight: 700;
        color: #fff;
        line-height: 40px;
        width: 270px;
        cursor: pointer;
    }
 
    .detail-close {
        position: absolute;
        right: 3px;
        top: 10px;
        width: 20px;
        height: 20px;
        text-align: center;
        line-height: 20px;
        text-align: center;
 
        font-weight: 700;
        font-size: 18px;
        font-weight: 700;
        color: #fff;
        cursor: pointer;
    }
 
    .detail-context {
        position: absolute;
        top: 40px;
        left: 20px;
        width: 350px;
    }
 
    .detail-item {
        height: 23px;
        margin-top: 15px;
        margin-left: 10px;
    }
    .detail-name {
        float: left;
        font-weight: 700;
        color: #94e0c4;
    }
 
    .detail-value {
        float: left;
        color: #e1eee9;
    }
 
    .detail-btn {
        background: url("@/assets/img/tools/messagebtn.png") no-repeat;
        position: absolute;
        bottom: 60px;
        right: 60px;
        width: 105px;
        height: 26px;
        text-align: center;
        color: #fff;
        cursor: pointer;
    }
</style>