| | |
| | | var app = {}; |
| | | var path = "20230127"; |
| | | var url = "http://127.0.0.1:12316/server/"; |
| | | var token = "87ce1d1e-3d83-4ffc-bf0d-312ecd823346"; |
| | | var token = "b2d58c3c-9d98-4e7f-a9c5-7682cc83bc38"; |
| | | |
| | | $(function () { |
| | | $("#pathSpan").html(path); |
| | |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | | } |
| | | |
| | | // Shp入库 |
| | | function insertShps() { |
| | | if (app.data == null) return; |
| | | |
| | | var obj = { |
| | | metaEntity: { |
| | | depid: 1, |
| | | dirid: 10, |
| | | verid: 0, |
| | | //type: "file", |
| | | //cs: "CGCS 2000", |
| | | //scale: "1:1000", |
| | | //resolution: "0.5m", |
| | | gather: "2022-10-05 15:00:00", |
| | | descr: "测试Xls", |
| | | }, |
| | | fileEntities: app.data, |
| | | tabEntities: [ |
| | | { |
| | | "entity": "dlg25wboul", |
| | | "fileName": "test.shp.zip", |
| | | "subPath": "20221128010101_zip\\test.shp\\pgShp\\dlg_25w_boul.shp", |
| | | "tab": "dlg_25w_boul.shp", |
| | | "type": "shp" |
| | | }, |
| | | { |
| | | "entity": "dlg25wresa", |
| | | "fileName": "test.shp.zip", |
| | | "subPath": "20221128010101_zip\\test.shp\\pgShp\\dlg_25w_resa.shp", |
| | | "tab": "dlg_25w_resa.shp", |
| | | "type": "shp" |
| | | }, |
| | | { |
| | | "entity": "dlgagnp", |
| | | "fileName": "test.shp.zip", |
| | | "subPath": "20221128010101_zip\\test.shp\\pgShp\\dlg_agnp.shp", |
| | | "tab": "dlg_agnp.shp", |
| | | "type": "shp" |
| | | }] |
| | | }; |
| | | |
| | | ajax(getUrl("dataLoader/insertFiles"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | | console.log(rs); |
| | | app.data = null; |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | | } |
| | | |
| | | // GDB入库 |
| | | function insertGdb() { |
| | | if (app.data == null) return; |
| | | |
| | | var obj = { |
| | | metaEntity: { |
| | | depid: 1, |
| | | dirid: 10, |
| | | verid: 0, |
| | | //type: "file", |
| | | //cs: "CGCS 2000", |
| | | //scale: "1:1000", |
| | | //resolution: "0.5m", |
| | | gather: "2022-10-05 15:00:00", |
| | | descr: "测试Xls", |
| | | }, |
| | | fileEntities: app.data, |
| | | tabEntities: [ |
| | | { |
| | | "entity": "dlg25wboul", |
| | | "fileName": "test.gdb.zip", |
| | | "subPath": "20221128010101_zip\\test.gdb\\pg.gdb", |
| | | "tab": "dlg_25w_boul", |
| | | "type": "gdb" |
| | | }, |
| | | { |
| | | "entity": "dlg25wresa", |
| | | "fileName": "test.gdb.zip", |
| | | "subPath": "20221128010101_zip\\test.gdb\\pg.gdb", |
| | | "tab": "dlg_25w_resa", |
| | | "type": "gdb" |
| | | }, |
| | | { |
| | | "entity": "dlgagnp", |
| | | "fileName": "test.gdb.zip", |
| | | "subPath": "20221128010101_zip\\test.gdb\\pg.gdb", |
| | | "tab": "dlg_agnp", |
| | | "type": "gdb" |
| | | }] |
| | | }; |
| | | |
| | | ajax(getUrl("dataLoader/insertFiles"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | | console.log(rs); |
| | | app.data = null; |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | | } |
| | | |
| | | // MDB |
| | | function insertMdb() { |
| | | if (app.data == null) return; |
| | | |
| | | var obj = { |
| | | metaEntity: { |
| | | depid: 1, |
| | | dirid: 10, |
| | | verid: 0, |
| | | //type: "file", |
| | | //cs: "CGCS 2000", |
| | | //scale: "1:1000", |
| | | //resolution: "0.5m", |
| | | gather: "2022-10-05 15:00:00", |
| | | descr: "测试Xls", |
| | | }, |
| | | fileEntities: app.data, |
| | | tabEntities: [ |
| | | { |
| | | "entity": "dlg25wboul", |
| | | "fileName": "test.mdb", |
| | | "subPath": "20221128010101\\test.mdb", |
| | | "tab": "dlg_25w_boul", |
| | | "type": "mdb" |
| | | }, |
| | | { |
| | | "entity": "dlg25wresa", |
| | | "fileName": "test.mdb", |
| | | "subPath": "20221128010101\\test.mdb", |
| | | "tab": "dlg_25w_resa", |
| | | "type": "mdb" |
| | | }/*, |
| | | { |
| | | "entity": "dlgagnp", |
| | | "fileName": "test.mdb", |
| | | "subPath": "20221128010101\\test.mdb", |
| | | "tab": "dlg_agnp", |
| | | "type": "mdb" |
| | | }*/] |
| | | }; |
| | | |
| | | ajax(getUrl("dataLoader/insertFiles"), "POST", JSON.stringify(obj), null, null, function (rs) { |
| | | console.log(rs); |
| | | app.data = null; |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | | } |
| | | </script> |
| | | <script> |
| | | // 上传附件 |
| | | function uploadAttach() { |
| | | var formData = new FormData(); |
| | | var fs = document.getElementById("file3"); |
| | |
| | | }); |
| | | } |
| | | |
| | | // 多文件入库 |
| | | function insertMultiFiles() { |
| | | if (!app.mappers) return; |
| | | ajax(getUrl("dataUpload/insertFiles"), "POST", JSON.stringify(app.mappers), null, null, function (rs) { |
| | | console.log(rs); |
| | | app.mappers = null; |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | | } |
| | | |
| | | // 空间数据入库 |
| | | function insertDbFiles() { |
| | | ajax(getUrl("dataUpload/insertFiles"), "POST", JSON.stringify(dbFiles), null, null, function (rs) { |
| | | console.log(rs); |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | }); |
| | | } |
| | | |
| | | // 请求管线分析 |
| | | function selectPipeAnalysis() { |
| | | var data = { |
| | |
| | | <input value="上传文件" type="button" onclick="uploadFiles2();" /> |
| | | <input value="查询文件 *" type="button" onclick="selectFiles2();" /> |
| | | <input value="删除文件" type="button" onclick="deleteFiles2();" /> |
| | | <input value="读取映射 *" type="button" onclick="readMappers();" /> |
| | | <input value="Xls入库" type="button" onclick="insertXls();" /> |
| | | <input value="Shp入库" type="button" onclick="insertShps();" /> |
| | | <input value="Gdb入库" type="button" onclick="insertGdb();" /> |
| | | <input value="Mdb入库" type="button" onclick="insertMdb();" /> |
| | | <input value="读取映射 *" type="button" onclick="readMappers();" /> |
| | | <input value="综合数据入库 *" type="button" onclick="insertAllFiles();" /> |
| | | <input value="空间数据入库 *" type="button" onclick="insertDbFiles();" /> |
| | | <input value="多文件入库 *" type="button" onclick="insertMultiFiles();" /> |
| | | <hr /> |
| | | <br /> |
| | | |