| | |
| | | var path = "20230228"; |
| | | var url = "http://127.0.0.1:12316/server/"; |
| | | //var token = "c36e4f94-dfde-401e-9967-2c4a449f1300"; |
| | | var token = "2067aef4-d82f-48f8-af93-494075984aeb"; |
| | | var token = "4506afb2-07c2-41c5-9055-6b4d397af1f9"; |
| | | |
| | | $(function () { |
| | | $("#pathSpan").html(path); |
| | |
| | | }); |
| | | } |
| | | |
| | | // 下载文件 |
| | | function selectDownloadFile() { |
| | | var guid = "55269c88c147fb894c27e3de7076877d"; // "5ce046cc05b186332775c03ac6792caf"; |
| | | var guid = $.trim($("#fileId").val()); // var guid = "55269c88c147fb894c27e3de7076877d"; |
| | | if (!guid) return; |
| | | var pwd = encodeURIComponent(encrypt.encrypt("Test!321&456")); // Admin@123 |
| | | |
| | | ajax(getUrl("meta/selectDownloadFile") + "&guid=" + guid + "&pwd=" + pwd, "GET", null, null, null, function (rs) { |
| | |
| | | } |
| | | </script> |
| | | <script> |
| | | function downloadDbReq() { |
| | | // 请求下载 |
| | | function downloadReq() { |
| | | var obj = { |
| | | pwd: encrypt.encrypt("Test!321&456"), |
| | | entities: ["dlgagnp", "dlg25wboul", "dlg25wresa"], |
| | | // entities: ["dlgagnp"], |
| | | wkt: aesEncrypt("POLYGON ((115.94927385452 32.3754479115071 0,121.989371092554 32.2766788010181 0,121.850621222894 29.6874200067864 0,115.9727267226 29.7835368627922 0,115.94927385452 32.3754479115071 0))") |
| | | wkt: aesEncrypt("POLYGON ((115.949 32.375 0,121.989 32.276 0,121.850 29.687 0,115.972 29.783 0,115.949 32.375 0))") |
| | | }; |
| | | |
| | | ajax(getUrl("dataLib/downloadDbReq"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | |
| | | }); |
| | | } |
| | | |
| | | // 请求DB数据下载 |
| | | function downloadDbReq() { |
| | | // 下载DB数据 |
| | | function downloadDbData() { |
| | | var obj = { |
| | | pwd: encrypt.encrypt("Test!321&456"), |
| | | entities: ["dlgagnp", "dlg25wboul", "dlg25wresa"], |
| | | filter: "gid > 1", |
| | | ids: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], |
| | | //ids: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], |
| | | dirs: "01,02,03,04,06,07", |
| | | depcode: "01", |
| | | wkt: aesEncrypt("POLYGON ((115.94927385452 32.3754479115071 0,121.989371092554 32.2766788010181 0,121.850621222894 29.6874200067864 0,115.9727267226 29.7835368627922 0,115.94927385452 32.3754479115071 0))") |
| | | depcode: "00", |
| | | wkt: aesEncrypt("POLYGON ((115.949 32.375 0,121.989 32.276 0,121.850 29.687 0,115.972 29.783 0,115.949 32.375 0))") |
| | | }; |
| | | |
| | | ajax(getUrl("dataLib/downloadDbReq"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | | ajax(getUrl("dataLib/downloadDbData"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | | console.log(rs); |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | |
| | | <br /> |
| | | |
| | | 空间数据: |
| | | <input value="请求下载" type="button" onclick="downloadDbReq();" /> |
| | | <!--<input value="请求下载" type="button" onclick="downloadReq();" />--> |
| | | <input id="fileId" value="" type="text" /> |
| | | <input value="下载文件" type="button" onclick="selectDownloadFile();" /> |
| | | <input value="请求实体下载" type="button" onclick="downloadEntityReq();" /> |
| | | <input value="请求DB数据下载" type="button" onclick="downloadDbReq();" /> |
| | | <input value="下载DB数据" type="button" onclick="downloadDbData();" /> |
| | | <hr /> |
| | | <br /> |
| | | |