| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>SIMC 终端控制系统</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <!--标准mui.css-->
- <link rel="stylesheet" href="css/mui.min.css">
- <!--App自定义的css-->
- <link rel="stylesheet" type="text/css" href="css/app.css" />
- <style>
- .mui-content-padded {
- padding: 2px 0;
- }
- .mui-row {
- font-size: 20px;
- }
- .mui-col-xs-3 {
- padding: 2px 2px;
- }
- .mui-content {
- padding: 10px 10px 0 10px;
- background-color: rgba(255, 255, 255, 0);
- }
- .mui-input-group {
- background-color: rgba(255, 255, 255, 0);
- color: #FFFFFF;
- }
- .mui-content-padded a {
- width: 50px;
- height: 50px;
- display: inline-block;
- text-align: center;
- background-color: #103543;
- border: 1px solid #FFF;
- border-radius: 25px;
- background-clip: padding-box;
- }
- .mui-content-padded a .mui-icon {
- margin-top: 12px;
- }
- </style>
- </head>
- <body style="background-image: url(img/bg.png);">
- <div id="title"
- style="height: 4%;text-align: center;padding-top: 10px;padding-bottom: 5px;background: url(img/title_bg.png) no-repeat 0 17px;background-size:100%;">
- <a style="color: #FFFFFF;font-size: 20px;">森之洋</a>
- </div>
- <div class="mui-content">
- <div class="mui-content-padded" style="height:auto;min-height: 459px;">
- <form class="mui-input-group">
- <div class="mui-input-row">
- <label>IP地址</label>
- <input type="text" id="ip" placeholder="请填写IP地址" value="">
- </div>
- <div class="mui-input-row">
- <label>agvID</label>
- <input type="text" id="agvid" placeholder="请填写agvID" value="">
- </div>
- <div class="mui-input-row">
- <label>mapID</label>
- <input type="text" id="mapid" placeholder="请填写mapID" value="">
- </div>
- <div class="mui-input-row">
- <label onclick="tips()">工位</label>
- <input type="text" id="site" placeholder="请填写工位" value="">
- </div>
- <div class="mui-button-row">
- <button id="default" type="button" class="mui-btn mui-btn-default">默认值</button>
- <button id="confirm" type="button" class="mui-btn mui-btn-primary">确认</button>
- <button id="cancel" type="button" class="mui-btn mui-btn-danger">取消</button>
- </div>
- </form>
- </div>
- <div class="mui-content-padded">
- <div class="mui-row">
- <div class="mui-col mui-col-xs-12" style="text-align:center;">
- <a href="index.html">
- <span class="mui-icon mui-icon-arrowright" style="color: #fff;"></span>
- </a>
- </div>
- </div>
- </div>
- </div>
- </body>
- <script src="js/jquery.min.js"></script>
- <script src="js/mui.min.js"></script>
- <script>
- $(function() {
- if (localStorage.getItem("ip") != "" || localStorage.getItem("ip") != null) {
- $("#ip").val(localStorage.getItem("ip"))
- }
- if (localStorage.getItem("agvid") != "" || localStorage.getItem("agvid") != null) {
- $("#agvid").val(localStorage.getItem("agvid"));
- }
- if (localStorage.getItem("mapid") != "" || localStorage.getItem("mapid") != null) {
- $("#mapid").val(localStorage.getItem("mapid"));
- }
- if (localStorage.getItem("site") != "" || localStorage.getItem("site") != null) {
- $("#site").val(localStorage.getItem("site"));
- }
- })
- function tips() {
- mui.toast("工位只能填写上下箱工位、清扫工位、下料工位、缓存工位")
- }
- document.getElementById('site').onchange = function() {
- var site = $("#site").val();
- if (site !== "上下箱工位" && site !== "清扫工位" && site !== "下料工位" && site !== "缓存工位") {
- mui.toast("工位只能填写上下箱工位、清扫工位、下料工位、缓存工位");
- $("#site").val("");
- }
- };
- $("#default").click(function() {
- if (localStorage.getItem("defaultip") == "" || localStorage.getItem("defaultip") == null) {
- defaultip = "192.168.111.240";
- } else {
- defaultip = localStorage.getItem("defaultip");
- }
- $("#ip").val(defaultip);
- $("#agvid").val("1");
- $("#mapid").val("2020032608412704");
- $("#site").val("上下箱工位");
- })
- $("#cancel").click(function() {
- window.location.href = "index.html";
- })
- $("#confirm").click(function() {
- var ip = $("#ip").val();
- var agvid = $("#agvid").val();
- var mapid = $("#mapid").val();
- var site = $("#site").val();
- if (site !== "上下箱工位" && site !== "清扫工位" && site !== "下料工位" && site !== "缓存工位") {
- mui.toast("工位只能填写上下箱工位、清扫工位、下料工位、缓存工位");
- $("#site").val("");
- return
- }
- if (ip != "" && ip != null) {
- localStorage.setItem("ip", ip);
- localStorage.setItem("defaultip", ip);
- }
- if (agvid != "" && agvid != null) {
- localStorage.setItem("agvid", agvid);
- }
- if (mapid != "" && mapid != null) {
- localStorage.setItem("mapid", mapid);
- }
- if (site != "" && site != null) {
- localStorage.setItem("site", site);
- }
- if (site === "上下箱工位") {
- AcceptId = 1;
- }
- if (site === "清扫工位") {
- AcceptId = 2;
- }
- if (site === "下料工位") {
- AcceptId = 3;
- }
- if (site === "缓存工位") {
- AcceptId = 4;
- }
- localStorage.setItem("AcceptId", AcceptId);
- window.location.href = "index.html";
- })
- mui.init()
- </script>
- </html>
|