| | |
| | | var app = {}; |
| | | var path = "20230228"; |
| | | var url = "http://127.0.0.1:12316/server/"; |
| | | var token = "c36e4f94-dfde-401e-9967-2c4a449f1300"; |
| | | //var token = "c36e4f94-dfde-401e-9967-2c4a449f1300"; |
| | | var token = "2067aef4-d82f-48f8-af93-494075984aeb"; |
| | | |
| | | $(function () { |
| | | $("#pathSpan").html(path); |
| | |
| | | function downloadEntityReq() { |
| | | var obj = { |
| | | entities: ["sexplorationpoint"], // bpachydrogeology,bhydrogeologyattach |
| | | filter: "exppointid = '001'", |
| | | filter: "exppointid like 'EA12'", |
| | | pwd: encrypt.encrypt("Test!321&456") |
| | | }; |
| | | |
| | | ajax(getUrl("dataLib/downloadEntityReq"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | | console.log(rs); |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | | } |
| | | |
| | | // 请求DB数据下载 |
| | | function downloadDbReq() { |
| | | 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], |
| | | 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))") |
| | | }; |
| | | |
| | | ajax(getUrl("dataLib/downloadDbReq"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | | console.log(rs); |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | |
| | | function aesDecrypt(word) { |
| | | return CryptoJS.enc.Utf8.stringify(CryptoJS.AES.decrypt(word, CryptoJS.enc.Utf8.parse(base64Decode("QSNzX2xGX3NFcnZlX2sueQ==")), { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })).toString(); |
| | | } |
| | | </script> |
| | | </script> |
| | | <script> |
| | | function selectDbOverflowDep() { |
| | | //selectDbOverflowDep4Wkt(); |
| | | //selectDbOverflowDep4Prop1(); |
| | | selectDbOverflowDep4Prop2(); |
| | | } |
| | | |
| | | function selectDbOverflowDep4Wkt() { |
| | | var obj = { |
| | | // entities: ["dlgagnp"], |
| | | entities: ["dlgagnp", "dlg25wboul", "dlg25wresa"], |
| | | 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))") |
| | | }; |
| | | |
| | | ajax(getUrl("dataLib/selectDbOverflowDep"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | | console.log(rs); |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | | } |
| | | |
| | | function selectDbOverflowDep4Prop1() { |
| | | var obj = { |
| | | entities: ["dlgagnp"], |
| | | filter: "name like '县'" |
| | | }; |
| | | |
| | | ajax(getUrl("dataLib/selectDbOverflowDep"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | | console.log(rs); |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | | } |
| | | |
| | | function selectDbOverflowDep4Prop2() { |
| | | var obj = { |
| | | entities: ["dlgagnp"], |
| | | ids: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] |
| | | }; |
| | | |
| | | ajax(getUrl("dataLib/selectDbOverflowDep"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | |
| | | <input value="请求下载" type="button" onclick="downloadDbReq();" /> |
| | | <input value="下载文件" type="button" onclick="selectDownloadFile();" /> |
| | | <input value="请求实体下载" type="button" onclick="downloadEntityReq();" /> |
| | | <input value="请求DB数据下载" type="button" onclick="downloadDbReq();" /> |
| | | <hr /> |
| | | <br /> |
| | | |