管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2023-12-22 200ce83f5c9410ac6926584632ed117a2b7cd2de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<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="Scripts/jquery-1.7.1.min.js"></script>
  <script>
    $(function () {
      //
    });
 
    function Insert() {
      var data = getModel();
 
      ajax("Op/Insert", "POST", data, null, null, function (rs) {
        console.log(rs);
        alert(rs);
      });
    }
 
    function UpdateById() {
      var data = getModel();
 
      ajax("Op/UpdateById", "POST", data, null, null, function (rs) {
        console.log(rs);
        alert(rs);
      });
    }
 
    function getModel() {
      var model = {
        id: $("#id").val(),
        name: $("#name").val(),
        json: $("#json").val()
      };
 
      return JSON.stringify(model);
    }
 
    function ajax(url, type, data, dataType, contentType, fn) {
      $.ajax({
        url: url,
        type: type,
        data: data,
        dataType: dataType || "json", // html、json、jsonp、script、text
        contentType: contentType || "application/json", // "application/x-www-form-urlencoded"
        success: function (data) {
          fn(data);
        },
        error: function (e) {
          console.error(e);
        }
      });
    }
  </script>
</head>
<body>
  <a href="http://localhost/JiangSu/Values/Get">GetValues</a> <br />
 
  <a href="http://localhost/JiangSu/Op/SelectByPage?pageSize=10&pageIndex=1&name=">SelectByPage?pageSize=10&pageIndex=1&name=</a> <br />
 
  <a href="http://localhost/JiangSu/Op/SelectById?id=1">SelectById?id=1</a> <br />
 
  <a href="http://localhost/JiangSu/Op/DeleteByIds?ids=2,3">DeleteByIds?ids=2,3</a> <br />
 
  <form>
    <input id="id" name="id" value="3" /> <br />
    <input id="name" name="name" value="A" /> <br />
    <input id="json" name="json" value="{}" /> <br />
 
    <input type="button" value="Insert" onclick="Insert();" />
    <input type="button" value="UpdateById" onclick="UpdateById();" /><br />
  </form>
</body>
</html>