| | |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>上传接口测试</title> |
| | | <meta http-equiv="Expires" content="0" /> |
| | | <meta http-equiv="Cache" content="no-cache" /> |
| | | <meta http-equiv="Pragma" content="no-cache" /> |
| | | <meta http-equiv="Cache-control" content="no-cache" /> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <script src="js/jquery.1.12.4.js"></script> |
| | | <script src="js/rsa.min.js"></script> |
| | |
| | | <script src="js/insertFiles.js"></script> |
| | | <script> |
| | | var app = {}; |
| | | var path = "20230425"; |
| | | var path = "20230627"; |
| | | var url = "http://127.0.0.1:12316/server/"; |
| | | //var token = "c36e4f94-dfde-401e-9967-2c4a449f1300"; |
| | | var token = "dce05aee-5b55-4835-bb45-e128d9c1f145"; |
| | | var token = "8a17604e-3865-43c8-a14f-d4b17ed33656"; |
| | | |
| | | $(function () { |
| | | $("#pathSpan").html(path); |
| | |
| | | |
| | | // 插入元数据申请 |
| | | function insertMetaApply() { |
| | | var obj = { |
| | | /*var obj = { |
| | | ids: [1393, 1392, 1383, 1382], |
| | | pwd: aesEncrypt("Test!321&456"), |
| | | tabs: ["元数据表"], |
| | | entities: ["sysmeta"], |
| | | descr: "测试元数据申请~", |
| | | depcodes: ["00"] |
| | | };*/ |
| | | var obj = { |
| | | ids: [7095, 7079], |
| | | pwd: aesEncrypt("Test!321&456"), |
| | | tabs: ["元数据表"], |
| | | entities: ["sysmeta"], |
| | | descr: "测试元数据申请~", |
| | | depcodes: ["00"], |
| | | descr: "请审核~" |
| | | }; |
| | | |
| | | ajax(getUrl("apply/insertApply"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | |
| | | |
| | | // 综合数据入库 |
| | | function insertAllFiles() { |
| | | var metaFiles = [{ |
| | | "createTime": null, |
| | | "createUser": 1, |
| | | "depcode": "000305", |
| | | "dircode": "01", |
| | | "entity": "mpipeline", |
| | | "epsgCode": "EPSG:4490", |
| | | "eventid": "24c073cc-e77b-4a7d-9a35-14319c231c81", |
| | | "extName": ".shp", |
| | | "guid": "85ec314d7c8aad8f7d6e89ea97c8c139", |
| | | "isMeta": false, |
| | | "msg": null, |
| | | "name": "m_pipeline.shp", |
| | | "path": "20230228_zip\\model_data\\m_pipeline.shp", |
| | | "rows": 0, |
| | | "sizes": 0.025, |
| | | "tab": "m_pipeline", |
| | | "type": "shp", |
| | | "verid": 0, |
| | | "tabDesc": "管线", |
| | | "tabs": "m_pipeline", |
| | | "ns": "bs" |
| | | }, { |
| | | "createTime": null, |
| | | "createUser": 1, |
| | | "depcode": "000305", |
| | | "dircode": "01", |
| | | "entity": "msitepoint", |
| | | "epsgCode": "EPSG:4490", |
| | | "eventid": "792c2d99-decd-4748-bd4b-33a4bebe7f5b", |
| | | "extName": ".shp", |
| | | "guid": "66031af8de9ab24feec3b1f06f738d0e", |
| | | "isMeta": false, |
| | | "msg": null, |
| | | "name": "m_sitepoint.shp", |
| | | "path": "20230228_zip\\model_data\\m_sitepoint.shp", |
| | | "rows": 0, |
| | | "sizes": 0.003, |
| | | "tab": "m_sitepoint", |
| | | "type": "shp", |
| | | "verid": 0, |
| | | "tabDesc": "站场点", |
| | | "tabs": "m_sitepoint", |
| | | "ns": "bs" |
| | | }]; |
| | | |
| | | //JSON.stringify(metaFiles) |
| | | //app.mappers = metaFiles; |
| | | ajax(getUrl("dataUpload/insertFiles"), "POST", JSON.stringify(app.mappers), null, null, function (rs) { |
| | | console.log(rs); |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | |
| | | </script> |
| | | </head> |
| | | <body> |
| | | <form id="upForm" name="upForm" method="post" enctype="multipart/form-data" action="http://127.0.0.1:12316/file/upload"> |
| | | <!--<form id="upForm" name="upForm" method="post" enctype="multipart/form-data" action="http://127.0.0.1:12316/file/upload">--> |
| | | <form id="upForm" name="upForm" method="post" enctype="multipart/form-data" action="Upload/Post?path=20230728"> |
| | | 上传路径:<span id="pathSpan"></span>,当前令牌:<span id="tokenSpan"></span> |
| | | <hr /> |
| | | <br /> |
| | |
| | | <input value="下载瓦片" type="button" onclick="downloadTiles();" /> |
| | | <hr /> |
| | | <br /> |
| | | |
| | | 上传测试: |
| | | <div> |
| | | <label for="apifiles">请选择文件:</label> |
| | | <input name="apifiles" type="file" multiple="multiple" /> |
| | | <input type="submit" value="Upload" /> |
| | | </div> |
| | | </form> |
| | | <br /> |
| | | <br /> |