|
76 | 76 | <div class="panel01" id="create&delete" |
77 | 77 | style="display: flex;flex-direction: column;padding: 10px;padding-bottom: 0px;"> |
78 | 78 | <select id="specialEffectTypeMenu" style="width:100px;height:30px; margin-left:10px; margin-right:10px"> |
79 | | - <option id="10001" value="0">雷达特效</option> |
80 | | - <option id="10002" value="1">扫描特效</option> |
81 | | - <option id="10003" value="2">爆炸特效</option> |
82 | | - <option id="10003" value="3">摧毁特效</option> |
83 | | - <option id="10003" value="4">瞄准特效</option> |
84 | | - <option id="10003" value="5">通讯链路</option> |
| 79 | + <option id="10001" data-i18n="resources.option_scanRadar" value="0"></option> |
| 80 | + <option id="10002" data-i18n="resources.option_sectorDetectionRange" value="1"></option> |
| 81 | + <option id="10003" data-i18n="resources.option_boom" value="2"></option> |
| 82 | + <option id="10003" data-i18n="resources.option_destroy" value="3"></option> |
| 83 | + <option id="10003" data-i18n="resources.option_aim" value="4"></option> |
| 84 | + <option id="10003" data-i18n="resources.option_communication" value="5"></option> |
85 | 85 |
|
86 | 86 | </select> |
87 | 87 | <input type="button" id="playorpauseAllSpecialEffect" class="btn btn-default" style="width:100px;height:30px;padding: 0px;margin-top: 17px; |
88 | | - margin-left: 10px;" value="暂停所有特效" onclick="playorpauseAllSpecialEffect()" /> |
| 88 | + margin-left: 10px;" data-i18n="[value]resources.text_pauseAllSpecialEffect" onclick="playorpauseAllSpecialEffect()" /> |
89 | 89 | </div> |
90 | 90 | <div class="panel02" id="create&delete" |
91 | 91 | style="display:flex; flex-direction: column;padding: 10px;padding-bottom: 0px;"> |
92 | | - <input type="button" class="btn btn-default" style="width:100px;height:30px;padding: 0px;" value="创建特效" |
| 92 | + <input type="button" class="btn btn-default" style="width:100px;height:30px;padding: 0px;" data-i18n="[value]resources.text_createSpecialEffect" |
93 | 93 | onclick="create()" /> |
94 | 94 | <input type="button" class="btn btn-default" style="width:100px;height:30px;padding: 0px;" |
95 | | - value="移除所有特效" onclick="remove()" /> |
| 95 | + data-i18n="[value]resources.text_removeAllSpecialEffect" onclick="remove()" /> |
96 | 96 | </div> |
97 | 97 | </div> |
98 | 98 | </div> |
|
117 | 117 | <div class="panel01" id="selectPointType" style="display: contents;flex-direction: column;padding: 10px;"> |
118 | 118 | <select id="pointType" style="width:100px;height:30px; margin-left:40px; margin-right:12px" |
119 | 119 | disabled="true" onchange="changeConnectType(event)"> |
120 | | - <option style="display: block;" id="unselect" value="-1">请选择</option> |
121 | | - <option style="display: none;" id="viewPoint" value="0">观察点</option> |
122 | | - <option style="display: none;" id="aimPoint" value="1">瞄准点</option> |
123 | | - <option style="display: none;" id="senderPoint" value="2">发送信号点</option> |
124 | | - <option style="display: none;" id="receiverPoint" value="3">接收信号点</option> |
| 120 | + <option style="display: block;" id="unselect" data-i18n="resources.option_pleaseCheck" value="-1"></option> |
| 121 | + <option style="display: none;" id="viewPoint" data-i18n="resources.option_viewPoint" value="0"></option> |
| 122 | + <option style="display: none;" id="aimPoint" data-i18n="resources.option_aimPoint" value="1"></option> |
| 123 | + <option style="display: none;" id="senderPoint" data-i18n="resources.option_senderPoint" value="2"></option> |
| 124 | + <option style="display: none;" id="receiverPoint" data-i18n="resources.option_receiverPoint" value="3"></option> |
125 | 125 | </select> |
126 | 126 | <input disabled="true" type="button" id="connectordisconnect" class="btn btn-default" |
127 | | - style="width:100px;height:30px;padding: 0px;" value="绑定标号" onclick="connectordisconnect()" /> |
| 127 | + style="width:100px;height:30px;padding: 0px;" data-i18n="[value]resources.text_bindSymbol" onclick="connectordisconnect()" /> |
128 | 128 | |
129 | 129 | </div> |
130 | 130 | <div class="panel1" id="play&remove" style="display:flex; padding: 10px;justify-content: center"> |
131 | 131 | <input disabled="true" type="button" id="playorpause" class="btn btn-default" |
132 | | - style="width:100px;height:30px;padding: 0px;margin-left: 11px;" value="播放选中特效" onclick="playOrPauseSelectFeature()" /> |
| 132 | + style="width:100px;height:30px;padding: 0px;margin-left: 11px;" data-i18n="[value]resources.text_playSelectedEffect" onclick="playOrPauseSelectFeature()" /> |
133 | 133 | |
134 | 134 | <input disabled="true" id="removeSelectSpecialEffect" type="button" class="btn btn-default" |
135 | | - style="width:100px;height:30px;padding: 0px;" value="移除选中特效" onclick="removeSelectFeature()" /> |
| 135 | + style="width:100px;height:30px;padding: 0px;" data-i18n="[value]resources.text_removeSelectedEffect" onclick="removeSelectFeature()" /> |
136 | 136 | |
137 | 137 | </div> |
138 | 138 | </div> |
139 | 139 | </div> |
140 | 140 | <div id="plottingMenu" class="plotting-menu"> |
141 | 141 | <li> |
142 | | - <span class="icon iconfont icon-quanxuan" title="框选" onclick="multiSelectModel()"></span> |
| 142 | + <span class="icon iconfont icon-quanxuan" data-i18n="[title]resources.title_rectselect" onclick="multiSelectModel()"></span> |
143 | 143 | </li> |
144 | 144 | </div> |
145 | 145 | <div id="map" style="margin:0 auto;width: 100%;height: 100%"></div> |
|
162 | 162 | }); |
163 | 163 | var baseLayer = L.supermap.tiledMapLayer(url).addTo(map); |
164 | 164 | L.control.scale().addTo(map); |
165 | | - var plottingLayer = L.supermap.plotting.plottingLayer("标绘图层", serverUrl).addTo(map); |
| 165 | + var plottingLayer = L.supermap.plotting.plottingLayer("plottingLayer", serverUrl).addTo(map); |
166 | 166 | var drawControl = L.supermap.plotting.drawControl(plottingLayer).addTo(map); |
167 | 167 | var editControl = L.supermap.plotting.editControl().addTo(map); |
168 | 168 | L.supermap.plotting.initPlotPanel("plotPanel", serverUrl, drawControl); |
|
183 | 183 | document.getElementById("removeSelectSpecialEffect").disabled = false; |
184 | 184 |
|
185 | 185 | if (event.specialEffect.isPlay) { |
186 | | - document.getElementById("playorpause").value = "暂停选中特效"; |
| 186 | + document.getElementById("playorpause").value = resources.text_pauseSelectedEffect; |
187 | 187 | } else { |
188 | | - document.getElementById("playorpause").value = "播放选中特效"; |
| 188 | + document.getElementById("playorpause").value = resources.text_playSelectedEffect; |
189 | 189 | } |
190 | 190 | selectedSpecialEffectUuid = event.specialEffect.uuid; |
191 | 191 | var type = event.specialEffect.getType(); |
|
201 | 201 | document.getElementById("receiverPoint").style.display = "none"; |
202 | 202 |
|
203 | 203 | if ((selectPointType.value == "0" || selectPointType.value == "-1") && event.specialEffect.viewUuid) { |
204 | | - document.getElementById("connectordisconnect").value = "解绑标号"; |
| 204 | + document.getElementById("connectordisconnect").value = resources.text_unbindSymbol; |
205 | 205 | } else if (selectPointType.value == "0" && !event.specialEffect.viewUuid) { |
206 | | - document.getElementById("connectordisconnect").value = "绑定标号"; |
| 206 | + document.getElementById("connectordisconnect").value = resources.text_bindSymbol; |
207 | 207 | } |
208 | 208 |
|
209 | 209 | if (selectPointType.value == "1" && event.specialEffect.aimUuid) { |
210 | | - document.getElementById("connectordisconnect").value = "解绑标号"; |
| 210 | + document.getElementById("connectordisconnect").value = resources.text_unbindSymbol; |
211 | 211 | } else if (selectPointType.value == "1" && !event.specialEffect.aimUuid) { |
212 | | - document.getElementById("connectordisconnect").value = "绑定标号"; |
| 212 | + document.getElementById("connectordisconnect").value = resources.text_bindSymbol; |
213 | 213 | } |
214 | 214 | } else if (type == SuperMap.Plot.SpecialEffectType.COMMUNICATIONLINK) { |
215 | 215 | selectPointType.disabled = false; |
|
222 | 222 | selectPointType.value = "2"; |
223 | 223 |
|
224 | 224 | if (selectPointType.value == "2" && event.specialEffect.senderUuid) { |
225 | | - document.getElementById("connectordisconnect").value = "解绑标号"; |
| 225 | + document.getElementById("connectordisconnect").value = resources.text_unbindSymbol; |
226 | 226 | } else if (selectPointType.value == "2" && !event.specialEffect.senderUuid) { |
227 | | - document.getElementById("connectordisconnect").value = "绑定标号"; |
| 227 | + document.getElementById("connectordisconnect").value = resources.text_bindSymbol; |
228 | 228 | } |
229 | 229 |
|
230 | 230 | if (selectPointType.value == "3" && event.specialEffect.receiverUuid) { |
231 | | - document.getElementById("connectordisconnect").value = "解绑标号"; |
| 231 | + document.getElementById("connectordisconnect").value = resources.text_unbindSymbol; |
232 | 232 | } else if (selectPointType.value == "3" && !event.specialEffect.receiverUuid) { |
233 | | - document.getElementById("connectordisconnect").value = "绑定标号"; |
| 233 | + document.getElementById("connectordisconnect").value = resources.text_bindSymbol; |
234 | 234 | } |
235 | 235 | } else { |
236 | 236 | selectPointType.value = "-1"; |
|
243 | 243 | document.getElementById("receiverPoint").style.display = "none" |
244 | 244 |
|
245 | 245 | if (event.specialEffect.associatedUuid) { |
246 | | - document.getElementById("connectordisconnect").value = "解绑标号"; |
| 246 | + document.getElementById("connectordisconnect").value = resources.text_unbindSymbol; |
247 | 247 | } else if (!event.specialEffect.associatedUuid) { |
248 | | - document.getElementById("connectordisconnect").value = "绑定标号"; |
| 248 | + document.getElementById("connectordisconnect").value = resources.text_bindSymbol; |
249 | 249 | } |
250 | 250 | } |
251 | 251 |
|
|
267 | 267 |
|
268 | 268 | }); |
269 | 269 | specialEffectManager.on(SuperMap.Plot.Event.specialeffectunselected, function (event) { |
270 | | - document.getElementById("playorpause").value = "播放选中特效"; |
271 | | - document.getElementById("connectordisconnect").value = "绑定标号"; |
| 270 | + document.getElementById("playorpause").value = resources.text_playSelectedEffect; |
| 271 | + document.getElementById("connectordisconnect").value = resources.text_bindSymbol; |
272 | 272 |
|
273 | 273 | document.getElementById("pointType").value = "-1"; |
274 | 274 | document.getElementById("pointType").disabled = true; |
|
425 | 425 | } |
426 | 426 | function checkIsConnectedToFeature(uuid) { |
427 | 427 | if (uuid) { |
428 | | - document.getElementById("connectordisconnect").value = "解绑标号"; |
| 428 | + document.getElementById("connectordisconnect").value = resources.text_unbindSymbol; |
429 | 429 | } else { |
430 | | - document.getElementById("connectordisconnect").value = "绑定标号"; |
| 430 | + document.getElementById("connectordisconnect").value = resources.text_bindSymbol; |
431 | 431 | } |
432 | 432 | } |
433 | 433 | function removeSelectFeature() { |
|
461 | 461 | } |
462 | 462 | function playorpauseAllSpecialEffect() { |
463 | 463 | if (allIsPlay == true) { |
464 | | - document.getElementById("playorpauseAllSpecialEffect").value = "暂停所有特效"; |
| 464 | + document.getElementById("playorpauseAllSpecialEffect").value = resources.text_pauseAllSpecialEffect; |
465 | 465 | this.palyAllSpecialEffect(); |
466 | 466 | allIsPlay = false; |
467 | 467 | } else { |
468 | | - document.getElementById("playorpauseAllSpecialEffect").value = "播放所有特效"; |
| 468 | + document.getElementById("playorpauseAllSpecialEffect").value = resources.text_playAllSpecialEffect; |
469 | 469 | this.pauseAllSpecialEffect(); |
470 | 470 | allIsPlay = true; |
471 | 471 | } |
|
484 | 484 | } |
485 | 485 |
|
486 | 486 | function connectordisconnect() { |
487 | | - if (document.getElementById("connectordisconnect").value == "绑定标号") { |
| 487 | + if (document.getElementById("connectordisconnect").value == resources.text_bindSymbol) { |
488 | 488 | this.bind(); |
489 | | - document.getElementById("connectordisconnect").value = "解绑标号"; |
| 489 | + document.getElementById("connectordisconnect").value = resources.text_unbindSymbol; |
490 | 490 | } else { |
491 | 491 | this.disconnectionToFeature(); |
492 | | - document.getElementById("connectordisconnect").value = "绑定标号"; |
| 492 | + document.getElementById("connectordisconnect").value = resources.text_bindSymbol; |
493 | 493 | } |
494 | 494 | } |
495 | 495 | function bind() { |
|
591 | 591 | } |
592 | 592 | } |
593 | 593 | function playOrPauseSelectFeature() { |
594 | | - if (document.getElementById("playorpause").value == "播放选中特效") { |
| 594 | + if (document.getElementById("playorpause").value == resources.text_playSelectedEffect) { |
595 | 595 | this.playSelectFeature(); |
596 | | - document.getElementById("playorpause").value = "暂停选中特效"; |
| 596 | + document.getElementById("playorpause").value = resources.text_pauseSelectedEffect; |
597 | 597 | } else { |
598 | 598 | this.pauseSelectFeature(); |
599 | | - document.getElementById("playorpause").value = "播放选中特效" |
| 599 | + document.getElementById("playorpause").value = resources.text_playSelectedEffect |
600 | 600 | } |
601 | 601 | } |
602 | 602 | function playSelectFeature() { |
|
624 | 624 | const objectURL = URL.createObjectURL(blob); |
625 | 625 | const domElement = document.createElement("a"); |
626 | 626 | domElement.href = objectURL; |
627 | | - domElement.download = "标绘图" + getFileTime(); |
| 627 | + domElement.download = resources.title_plotMap + getFileTime(); |
628 | 628 | domElement.click(); |
629 | 629 | URL.revokeObjectURL(objectURL); |
630 | 630 | } |
|
0 commit comments