12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>通用工具</title>
- <link rel="stylesheet" type="text/css" href="http://139.196.105.31/arcgis_js_api/4.14/esri/css/main.css" />
- <script src="assets/js/jquery-3.1.0.js"></script>
- <script src="CommonJS/Config_JS/DynamicLoadJS.js"></script>
- <script src="http://139.196.105.31/arcgis_js_api/4.14/init.js"></script>
- <script src="CommonJS/Map_CommonJS/MapClass4.js"></script>
- <script src="CommonJS/DBUtil_JS/WsCommonClassAsmx.js"></script>
- <script type="text/javascript" src="http://www.jsons.cn/Down/jquery.xml2json.js"></script>
- <!--{"type":"js","name":"arcgisjs","url":"http://139.196.105.31/arcgis_js_api/4.14/init.js"},-->
- <!--{"type":"css","name":"arcgiscss","url":"http://139.196.105.31/arcgis_js_api/4.14/esri/css/main.css"},-->
- <!--{"type":"js","name":"mapcommonjs","url":"CommonJS/Map_CommonJS/Map_Common4.0.js"}-->
- <!--<script src="assets/js/jquery.base64.js"></script>-->
- <!--通用数据调用接口-->
- <!--<script src="CommonJS/DBUtil_JS/WsCommonClassJava.js"></script>-->
- <!-- <script src="CommonJS/HTML_ElementCommonJS/Select_Common.js"></script> -->
- <style>
- html,
- body,
- #mapDiv {
- padding: 0;
- margin: 0;
- height: 100%;
- width: 100%;
- }
- </style>
- <script>
- require(["dojo/domReady!"
- ], function () {
- currentMapMode = "3D";
- // init3DScene();
- // currentMapMode = "2D";
- // initMap();
- });
- function dorequest(){
- 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";;
- WsCommonClassGet("Select",["sql"],[sqlStr],queryDataSucess,"QueryDataResult",true);
- }
- function loadSelect(){
- var sqlStr = "select * from 编码表街道乡镇";
- WsCommonClass("QueryDataBaseJson",["sql"],[sqlStr],queryDataSucess,"LoadSelectDataResult",true);
- }
-
- function showCamera() {
- // 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+"]");
- // alert(m_view.extent.xmin+","+m_view.extent.ymin+","+m_view.extent.xmax+","+m_view.extent.ymax);
- setExtent(-3743.8400425316395,-361.94228182226686,-3492.088497361882,-233.8836923717546);
- }
- //数据库查询成功返回监听
- function queryDataSucess(json,keyValue) {
- var allCount ;
- var pageIndex;
- var jsonArray;
- var jsons = $.xml2json(json);
- if (json != null) {
- allCount = json.AllCount;
- pageIndex = json.pageIndex;
- jsonArray = json.data;
- }
- switch (keyValue) {
- case "QueryDataResult":{
- alert(JSON.stringify(json));
- break;
- }
- case "LoadSelectDataResult":{
- Select_DyCreate("selectTest",jsonArray,"编码","名称",true);
- break;
- }
- }
- }
- </script>
- </head>
- <body>
- <div id="mapDiv">
- <div id="viewTest">
- </div>
- </div>
- <button onclick="dorequest()">JAVA接口调用测试</button>
- <br><br>
- <button onclick="loadSelect()">下拉框信息加载</button>
- <select id="selectTest"></select>
- <button onclick="Select_GetSelectText('selectTest')">下拉框选中text</button>
- <button onclick="Select_GetSelectValue('selectTest')" >下拉框选中value</button>
- <button onclick="Select_SetSelectedByText('selectTest','华阳街道')" >根据text设置下拉框选中</button>
- <br><br>
- <button onclick="LoadConfigAPP()">加载配置文件</button>
- <button onclick="showCamera()">显示坐标</button>
- </body>
- </html>
|