严智鑫
2024-05-13 cedce4883f0d204f5bf7bf87c0bf4858dabb0c23
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="${ctx}/static/styles/default.css" type="text/css" rel="stylesheet" />
<script src="${ctx}/static/holder.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="${ctx}/static/util.js"></script>  
<script type="text/javascript" src="${ctx}/static/jquery/jquery-3.1.0.min.js"></script>
<title>上片位</title>
<script type="text/javascript">
    var interval = setInterval('refreshStatus()', 20000);
 
    // 设备页面自动刷新
    function refreshStatus() {
        window.location.reload();
 
    }
 
    // 停止页面自动刷新
    function disableAutoRefresh() {
        clearInterval(interval);
    }
 
    function setRange() {
        disableAutoRefresh();
        $('#modifyRangeModal').modal('toggle');
    }
 
    function setdata() {
        disableAutoRefresh();
        $('#modifyRangeModal1').modal('toggle');
    }
 
     /**
      * 添加固定料架信息
      */
      function modifyraw(){
              disableAutoRefresh()
             $("#add-fix-info").modal('show');
     }
     
     
      function oncheck(){
            var password1=document.getElementsByName('password1')[0].value;
            var password2=document.getElementsByName('password2')[0].value;
            $.ajax({
                  cache:false,
                    type:"POST",
                    dataType : "json", 
                     url:"${ctx}/identifymachine/modifypassword",
                     data:{
                         "password1":password1,
                         "password2":password2,
                     },success:function(data){ 
                         if(data.result==1){
                             window.location.href="${ctx}/identifymachine/password";
                             alert("修改成功");
                         }else{
                             window.location.href="${ctx}/identifymachine/password";
                             alert("原密码错误");
                         }
                         
                         
                      }
                     
            });
        }
     
    /* var text = document.getElementById("floorInput");
    text.onkeyup = function(){
    this.value=this.value.replace(/\D/g,'');
        if(text.value>2){
          text.value = 2;
        }
    } */
</script>
</head>
<body>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                修改密码
                <!-- <small>测量</small> -->
            </h1>
        </section>
 
        <!-- Main content -->
        <section class="content container-fluid">
 
            <!--------------------------
        | Your Page Content Here |
        -------------------------->
            <fieldset>
                <br>
                <!-- class="modal hide fade" -->
                <div id="modifyRangeModal" tabindex="-1" role="dialog"
                    aria-labelledby="myModalLabel" aria-hidden="true">
                    <form method="post" class="form-horizontal"
                        action="${ctx}/identifymachine/modifypassword">
                        <!-- <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">×</button>
                            <h3 id="myModalLabel">修改误差范围</h3>
                        </div> -->
                        <div class="modal-body">
                            <!-- <div class="control-group">
                                <label class="control-label" for="floorInput">误差范围</label> -->
                            <div class="controls">
                                原密码&nbsp;<input type="password" id="password1" name="password1"
                                    class="input-mini required" value="">
                                <!-- <script type="text/javascript">
                                            var text = document.getElementById("floorInput");
                                            text.onkeyup = function(){
                                            this.value=this.value.replace(/\D/g,'');
                                                if(text.value>2.0){
                                                  text.value = 2.0;
                                                }
                                            }
                                        </script> -->
                                &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<br><br>
                                新密码&nbsp;<input type="password" id="password2" name="password2"
                                    class="input-mini required" value=""> <span></span>
                            </div>
                            <br>
                            <button type="button" onclick="oncheck()" class="btn btn-primary">提交</button>
                            <!-- </div> -->
                        </div>
                        <div class="modal-footer"></div>
                    </form>
                </div>
 
                
            
            
        </section>
        <!-- /.content -->
    </div>
</body>
</html>