管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-01-06 124102d5db2a2ace2f2d8484ceda658829657552
JiangSu/index.html
@@ -69,6 +69,35 @@
      return JSON.stringify(model);
    }
    function InsertImg() {
      var data = getImg();
      ajax("Img/Insert", "POST", data, null, null, function (rs) {
        console.log(rs);
        alert(rs);
      });
    }
    function UpdateImgById() {
      var data = getImg();
      ajax("Img/UpdateById", "POST", data, null, null, function (rs) {
        console.log(rs);
        alert(rs);
      });
    }
    function getImg() {
      var model = {
        id: $("#iid").val(),
        name: $("#iname").val(),
        path: $("#ipath").val(),
        json: $("#ijson").val()
      };
      return JSON.stringify(model);
    }
    function ajax(url, type, data, dataType, contentType, fn) {
      $.ajax({
        url: url,
@@ -111,6 +140,18 @@
    json: <textarea id="gjson" style="width: 1024px;height: 70px;">{ "type": "Feature", "properties": { "ID": "12", "NAME": "Area8", "REMARK": "" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 120.24179180542139, 32.005615085853492, 13.770 ], [ 120.24175240823769, 32.005610442630996, 13.770 ], [ 120.24173428512847, 32.005722106674966, 13.770 ], [ 120.24177368235908, 32.005726749902777, 13.770 ], [ 120.24179180542139, 32.005615085853492, 13.770 ] ] ] } }</textarea> <br />
    <input type="button" value="InsertGrid" onclick="InsertGrid();" />
    <input type="button" value="UpdateGridById" onclick="UpdateGridById();" /><br /> <br />
    图片:<a href="http://localhost/JiangSu/Img/SelectByPage?pageSize=10&pageIndex=1&name=">SelectByPage?pageSize=10&pageIndex=1&name=</a> <span style="width: 50px;">&nbsp;</span>
    <a href="http://localhost/JiangSu/Img/SelectById?id=1">SelectById?id=1</a> <span style="width: 50px;">&nbsp;</span>
    <a href="http://localhost/JiangSu/Img/DeleteByIds?ids=3&ids=0">DeleteByIds?ids=3&ids=0</a> <br />
    &nbsp;&nbsp; id: <input id="iid" value="1" /> <br />
    name: <input id="iname" value="1.jpg"/> <br />
    path: <input id="ipath" value="Images\1.jpg"/> <br />
    json: <input id="ijson" value="{}"/> <br />
    <input type="button" value="InsertImg" onclick="InsertImg();" />
    <input type="button" value="UpdateImgById" onclick="UpdateImgById();" /><br /> <br />
  </form>
</body>
</html>