HtmlCommonL.html 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>通用工具</title>
  6. <link rel="stylesheet" type="text/css" href="http://139.196.105.31/arcgis_js_api/4.14/esri/css/main.css" />
  7. <script src="assets/js/jquery-3.1.0.js"></script>
  8. <script src="CommonJS/Config_JS/DynamicLoadJS.js"></script>
  9. <script src="http://139.196.105.31/arcgis_js_api/4.14/init.js"></script>
  10. <script src="CommonJS/Map_CommonJS/MapClass4.js"></script>
  11. <script src="CommonJS/DBUtil_JS/WsCommonClassAsmx.js"></script>
  12. <script type="text/javascript" src="http://www.jsons.cn/Down/jquery.xml2json.js"></script>
  13. <!--{"type":"js","name":"arcgisjs","url":"http://139.196.105.31/arcgis_js_api/4.14/init.js"},-->
  14. <!--{"type":"css","name":"arcgiscss","url":"http://139.196.105.31/arcgis_js_api/4.14/esri/css/main.css"},-->
  15. <!--{"type":"js","name":"mapcommonjs","url":"CommonJS/Map_CommonJS/Map_Common4.0.js"}-->
  16. <!--<script src="assets/js/jquery.base64.js"></script>-->
  17. <!--通用数据调用接口-->
  18. <!--<script src="CommonJS/DBUtil_JS/WsCommonClassJava.js"></script>-->
  19. <!-- <script src="CommonJS/HTML_ElementCommonJS/Select_Common.js"></script> -->
  20. <style>
  21. html,
  22. body,
  23. #mapDiv {
  24. padding: 0;
  25. margin: 0;
  26. height: 100%;
  27. width: 100%;
  28. }
  29. </style>
  30. <script>
  31. require(["dojo/domReady!"
  32. ], function () {
  33. currentMapMode = "3D";
  34. // init3DScene();
  35. // currentMapMode = "2D";
  36. // initMap();
  37. });
  38. function dorequest(){
  39. var sqlStr = "select grade,count(1) num,type_status from (select decode(grade,'','4A',grade)grade,case when instr(type,'闭园')>0 then '未开放' else '开放' end type_status from view_kl_state t where grade !='0' or grade is null) group by grade,type_status";;
  40. WsCommonClassGet("Select",["sql"],[sqlStr],queryDataSucess,"QueryDataResult",true);
  41. }
  42. function loadSelect(){
  43. var sqlStr = "select * from 编码表街道乡镇";
  44. WsCommonClass("QueryDataBaseJson",["sql"],[sqlStr],queryDataSucess,"LoadSelectDataResult",true);
  45. }
  46. function showCamera() {
  47. // alert("heading:"+m_view.camera.heading+",tilt:"+m_view.camera.tilt+",position:["+m_view.camera.position.x+","+m_view.camera.position.y+","+m_view.camera.position.z+"]");
  48. // alert(m_view.extent.xmin+","+m_view.extent.ymin+","+m_view.extent.xmax+","+m_view.extent.ymax);
  49. setExtent(-3743.8400425316395,-361.94228182226686,-3492.088497361882,-233.8836923717546);
  50. }
  51. //数据库查询成功返回监听
  52. function queryDataSucess(json,keyValue) {
  53. var allCount ;
  54. var pageIndex;
  55. var jsonArray;
  56. var jsons = $.xml2json(json);
  57. if (json != null) {
  58. allCount = json.AllCount;
  59. pageIndex = json.pageIndex;
  60. jsonArray = json.data;
  61. }
  62. switch (keyValue) {
  63. case "QueryDataResult":{
  64. alert(JSON.stringify(json));
  65. break;
  66. }
  67. case "LoadSelectDataResult":{
  68. Select_DyCreate("selectTest",jsonArray,"编码","名称",true);
  69. break;
  70. }
  71. }
  72. }
  73. </script>
  74. </head>
  75. <body>
  76. <div id="mapDiv">
  77. <div id="viewTest">
  78. </div>
  79. </div>
  80. <button onclick="dorequest()">JAVA接口调用测试</button>
  81. <br><br>
  82. <button onclick="loadSelect()">下拉框信息加载</button>
  83. <select id="selectTest"></select>
  84. <button onclick="Select_GetSelectText('selectTest')">下拉框选中text</button>
  85. <button onclick="Select_GetSelectValue('selectTest')" >下拉框选中value</button>
  86. <button onclick="Select_SetSelectedByText('selectTest','华阳街道')" >根据text设置下拉框选中</button>
  87. <br><br>
  88. <button onclick="LoadConfigAPP()">加载配置文件</button>
  89. <button onclick="showCamera()">显示坐标</button>
  90. </body>
  91. </html>