112
13693261870
2024-04-22 7e275acee90c914685ca53f04ec6a4b74e46abbf
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
sgworld = window.external.createsgworld();
$(function () {
    $(".imgx").each(function () {
        $(this).attr("data-sel", "f");
        var d = $(this).attr("src");
        var reg = /img\/(.*).png/;
        var dd = reg.exec(d);
        $(this).attr("data-mr", d);
        $(this).attr("data-xz", "img/" + dd[1] + "xz.png");
    });
    $(".imgx").click(function () {
        if ($(this).attr("data-sel") == "f") {
            $(".imgx").each(function () {
                $(this).attr("src", $(this).attr("data-mr"))
                $(this).attr("data-sel", "f");
            });
            $(this).attr("data-sel", "t");
            var dd = $(this).attr("data-xz");
            $(this).attr("src", dd);
 
        } else {
            $(".imgx").each(function () {
                $(this).attr("src", $(this).attr("data-mr"))
                $(this).attr("data-sel", "f");
            });
        }
        var imgdata = $(this).attr("data-img");
        switch (imgdata) {
            case "dxpmfx":
                dxpmfx();
                break;
            case "qcdtlj":
                hz(1012, 26);
                break;
            case "sqdb":
                sqdb();
                break;
            case "qxmx":
                hz(2110, 0);
                break;
            case "jzwmx":
                hz(1012, 14);
                break;
            case "swjmfx":
                swjmfx();
                break;
            case "hzjx":
                hz(1012, 6);
                break;
            case "shiyufx":
                shiyufx();
                break;
            case "hzlzt":
                hz(1012, 23);
                break;
            case "mxwj":
                mxwj();
                break;
            case "hzqt":
                hz(1012, 21);
                break;
            case "tjfx":
                tjfx();
                break;
            case "tjxfx":
                tjxfx();
                break;
            case "tsfx":
                tsfx();
                break;
            case "yxtc":
                hz(1014, 2);
                break;
            case "tcsj":
                hz(1013, 0);
                break;
            case "tpbq":
                tpbq();
                break;
            case "cjwb":
                cjwb();
                break;
            case "projectTree":
                projectTree();
                break;
            case "dxxg":
                hz(1012, 15);
                break;
            case "hsymfx":
                hsymfx();
                break;
            case "hzyx":
                hz(1012, 9);
                break;
            case "hzyzt":
                hz(1012, 20);
                break;
            case "hzyzhuit":
                hz(1012, 22);
                break;
            // case "coorsys":
            //     coorsys();
            //     break;
            case "yxdbfx":
                yxdbfx();
                break;
        }
    });
    $(".imgx").hover(function () {
        var dd = $(this).attr("data-xz");
        $(this).attr("src", dd);
        $(this).focus();
    }, function () {
        if($(this).attr("data-sel") == "f"){
            var mr = $(this).attr("data-mr");
            $(this).attr("src", mr);
        }
    });
})
 
 
var url = window.location.href.substring(0, window.location.href.lastIndexOf('/') + 1);
 
//坐标系工具
var coorsystatus = true;
 
function coorsys() {
    if (coorsystatus) {
        window.external.createPmDialogDock('coorsystem', url + "tool/CoordSystem.html?lang=coorsystem", 300, 300, 200, 1500, -1, -1);
        coorsystatus = false;
    } else {
        window.external.closeDialog("coorsystem");
        coorsystatus = true;
    }
}
//绘制
function hz(command, param) {
    sgworld.Command.Execute(command, param);
}
 
//地形剖面分析
var dxpmfxstatus = true;
 
function dxpmfx() {
    if (dxpmfxstatus) {
        window.external.createPmDialogDock('tool', url + "tool/TerrainProfile.html?lang=terrainpro", 240, 160, 50, -1, -1, 10);
        tjxstatus = false;
        dxpmfxstatus = false;
    } else {
        window.external.closeDialog("tool");
        dxpmfxstatus = true;
    }
}
 
//双球对比
var dd = true, globe;
 
function sqdb() {
    var title = "多期数据";
    if (!globe) {
        globe = window.external.createMultScreen();
        //globe.Open("http://118.213.95.34/SG/projects/init.434250");
        globe.open(sqFly);
    }
    var mode = window.external.setShowMode(7);
    if (mode) {
        sgworld.Application.Multiple3DWindows.SetAsLeader();
        sgworld.Application.Multiple3DWindows.LinkPosition(globe);
 
        var width = 175, height = 25;
        var left = 1920 / 2 - 20 - width - 20;
 
        showHtmlBySG(sgworld, title, location.origin + "/checkbox.html", left, 200, width, height, false);
        showHtmlBySG(globe, title, location.origin + "/checkbox.html", 20, 200, width, height, false);
    } else {
        if (sgworld.Window.GetPopupByCaption(title) != null) {
            sgworld.Window.RemovePopupByCaption(title);
        }
        if (globe.Window.GetPopupByCaption(title) != null) {
            globe.Window.RemovePopupByCaption(title);
        }
        sgworld.Application.Multiple3DWindows.UnlinkPosition();
    }
}
 
function showHtmlBySG(sg, title, url, left, top, width, height, showCaption) {
    if (sg.Window.GetPopupByCaption(title) != null) {
        sg.Window.RemovePopupByCaption(title);
    }
 
    var popup = sg.Creator.CreatePopupMessage(title, url, left, top, width, height);
    popup.AllowResize = true;
    popup.ShowCaption = true;
    popup.AllowDrag = true;
    popup.Width = width;
    popup.Height = height;
    popup.ShowCaption = showCaption;
 
    sg.Window.ShowPopup(popup);
}
 
//影像对比分析
var dbfxstatus = true;
 
function yxdbfx() {
    if (dbfxstatus) {
        //var dd= sgworld.Creator.CreatePopupMessage("tool", url + "tool/ImageComparisonPopup.html?lang=imagecom", 500, 150, 400, 140);
        //sgworld.Window.ShowPopup(dd);
        window.external.createPmDialogDock('tool', url + "tool/ImageComparisonPopup.html?lang=imagecom", 380, 100, 50, -1, -1, 10);
        tjxstatus = false;
        dbfxstatus = false
    } else {
        window.external.closeDialog("tool");
        dbfxstatus = true;
    }
}
 
//三维截面分析
var swjmfxStatus = true;
 
function swjmfx() {
    if (swjmfxStatus) {
        window.external.createPmDialogDock('tool', url + "tool/CrossSection.html?lang=cross", 240, 180, 50, -1, -1, 10);
        tjxstatus = false;
        swjmfxStatus = false;
    } else {
        window.external.closeDialog('tool');
        swjmfxStatus = true;
    }
}
 
//视域分析
function shiyufx() {
    sgworld.Command.Execute(2117, 0);
}
 
//模型文件
function mxwj() {
    sgworld.Command.Execute(1012, 13);
}
 
//体积分析
function tjfx() {
    sgworld.Command.Execute(1045, 0);
}
 
//天际线分析
var tjxstatus = true;
 
function tjxfx() {
    if (tjxstatus) {
        window.external.createPmDialogDock('tool', url + "tool/ThreatDome.html?lang=threatdom", 260, 180, 50, -1, -1, 10);
        tjxstatus = false;
    } else {
        window.external.closeDialog("tool");
        tjxstatus = true;
    }
}
 
//通视分析
function tsfx() {
    sgworld.Command.Execute(1046, 0);
}
 
//图片标签
function tpbq() {
    sgworld.Command.Execute(1012, 1);
}
 
//文本标签
function cjwb() {
    sgworld.Command.Execute(1012, 0);
}
 
//工程树
var projectTreeStatus = true;
 
//createBorderDialog
function projectTree() {
    if (projectTreeStatus) {
        //sgworld.ProjectTree.ShowSearchTool = false;
        //window.external.createPmDialogDock('projectTree', url + "tool/ProjectTree.html", 420, 500, 200, 500, -1, -1);
        window.external.createPmDialogDock('projectTree', url + "tool/ProjectTree.html", 280, 600, 200, 20, -1, -1); //rb.width, rb.height, rb.top, rb.left, rb.bottom, rb.right
        projectTreeStatus = false;
    } else {
        window.external.closeDialog("projectTree");
        projectTreeStatus = true;
    }
}
 
//洪水淹没分析
function hsymfx() {
    sgworld.Command.Execute(1044, 0);
}