13693261870
2024-04-02 2a1b873b4b78b508d5d53c57992e734c56619df8
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title></title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="css/zaihai.css" />
    <style>
        .title {
            height: 18%;
        }
 
        .tcenter {
            height: 80%;
        }
 
        .content > .tcenter > tr > td {
            padding: 0px;
        }
        .tcenter table tr {
            height: 30px;
        }
        .tcenter table tr td {
                width: 50px;
                border-right: solid 1px #ffffff;
                border-top: solid 1px #ffffff;
                font-size:15px;
            }
    </style>
 
</head>
<body>
    <div class="border">
        <div class="FourBorder">
            <div class="topleft"></div>
            <div class="topright"></div>
            <div class="bottomleft"></div>
            <div class="bottomright"></div>
        </div>
        <div class="content">
            <div class="title" style="height:40px;">
                <table >
                    <tr>
                        <td>
                            <span class="zhname">属性信息</span>
                            <img class="imgx" src="img/关闭.png" />
                        </td>
                    </tr>
                </table>
            </div>
            <div class="tcenter">
                <table id="attrs">
                   
                </table>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="../Commonjs/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../Commonjs/GetParm.js"></script>
    <script type="text/javascript">
        sgworld = window.external.createSgworld();
        $(function () {
            var id = getUrlParam("id");
            var obj = sgworld.ProjectTree.GetObject(id);
            var attrs = obj.FeatureAttributes;
            var type = getUrlParam("type");
            var str = "<tr>"
            if (type == "huangshui") {
                for (var i = 0; i < attrs.Count; i++) {
                    if (i == 0) {
                        str += "<td>" + attrs.Item(i).Name + "</td><td>" + attrs.Item(i).Value + "</td>";
                    } else {
                        if (i % 6 == 0) {
                            str += "</tr><tr><td>" + attrs.Item(i).Name + "</td><td>" + attrs.Item(i).Value + "</td>";
                        } else {
                            str += "<td>" + attrs.Item(i).Name + "</td><td>" + attrs.Item(i).Value + "</td>";
                        }
                        if (i == attrs.Count - 1) {
                            str += "</tr>";
                        }
                    }
                }
                
            } else if (type == "datong") {
                var arr=[];
                for (var i = 0; i < attrs.Count; i++) {
                    if (attrs.Item(i).Name == "X" || attrs.Item(i).Name == "Y" || attrs.Item(i).Name == "QT" || attrs.Item(i).Name == "ZHFX") {
                        
                    }else{
                        var obj ={
                            "Name":attrs.Item(i).Name,
                            "Value":attrs.Item(i).Value
                        }
                        arr.push(obj);
                    }
                }
                for (var i = 0; i < arr.length; i++) {
                    if (i == 0) {
                        str += "<td>" + setName(arr[i].Name) + "</td><td>" + arr[i].Value + "</td>";
                    } else {
                        if (i % 3 == 0) {
                            str += "</tr><tr><td>" + setName(arr[i].Name) + "</td><td>" + arr[i].Value + "</td>";
                        } else {
                            str += "<td>" + setName(arr[i].Name) + "</td><td>" + arr[i].Value + "</td>";
                        }
                        if (i == attrs.Count - 1) {
                            str += "</tr>";
                        }
                    }
                }
            }
            str += "</tr>";
            $("#attrs").html(str);
            $(".imgx").click(function () {
                window.external.closeDialog("中间");
            })
        });
        function setName(name) {
            switch (name) {
                case "TXWZ":
                    name = "塌陷位置";
                    break;
                case "TXKMJ":
                    name = "塌陷面积";
                    break;
                case "TXX":
                    name = "经度";
                    break;
                case "TXY":
                    name = "纬度";
                    break;
                case "HPWZ":
                    name = "滑坡位置";
                    break;
                case "XPLX":
                    name = "斜坡类型";
                    break;
                case "HPCD":
                    name = "滑坡长度";
                    break;
                case "HPKD":
                    name = "滑坡宽度";
                    break;
                case "HPMJ":
                    name = "滑坡面积";
                    break;
                case "HPX":
                    name = "经度";
                    break;
                case "HPY":
                    name = "纬度";
                    break;
                case "HPND":
                    name = "滑坡年代";
                    break;
                case "NSLWZ":
                    name = "泥石流位置";
                    break;
                case "NSLLX":
                    name = "泥石流类型";
                    break;
                case "LYMJ":
                    name = "流域面积";
                    break;
                case "NSLX":
                    name = "经度";
                    break;
                case "NSLY":
                    name = "纬度";
                    break;
                case "WXDX":
                    name = "威胁对象";
                    break;
            }
            return name;
        }
    </script>
</body>
</html>