123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- <!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: 10px 0 10px 0;
- }
- .mui-col{
- padding-right: 4px;
- display: inline-block;
- padding: 2px 5px;
- }
- .item{
- margin: 5px 0;
- }
- .mui-row{
- padding: 4px 0;
- }
- .mui-col-xs-3{
- padding: 2px 2px;
- }
- .mui-col-xs-3 >input{
- height: 20px;
- margin-bottom: 0px;
- border: 1px solid #298890;
- background-color: rgba(255,255,255,0);
- }
- .mui-col-xs-2{
- text-align: right;
- }
- .mui-icon-undo{
- font-size: 40px;
- }
- </style>
- <style>
- .mui-btn-block{
- margin-bottom: 0;
- }
- .mui-content-padded{
- margin: 2px;
- }
- .mui-col{
- display: inline-block;
- padding: 2px;
- }
- /*滚动条样式*/
- ::-webkit-scrollbar {
- width: 0;
- background-color: #F5F5F5;
- }
- /*定义滚动条轨道 内阴影+圆角*/
- ::-webkit-scrollbar-track {
- background-color: #2e3342;
- }
- /*定义滑块 内阴影+圆角*/
- ::-webkit-scrollbar-thumb {
- background-color: #2e3342;
- }
- .mui-btn-royal{
- background-color: rgba(141, 157, 199, 0.5);
- border:1px solid rgba(141, 157, 199, 0.5)
- }
- .active {
- background-color: #d4d4d4;
- color:white;
- }
- .up{
- background: #0087c5 url(img/top.svg) no-repeat 50% 10%;
- }
- .down{
- background: #0087c5 url(img/bottom.svg) no-repeat 50% 10%;
- }
- .mui-plus .plus{
- display: inline;
- }
- .plus{
- display: none;
- }
- #topPopover {
- position: fixed;
- top: 16px;
- right: 6px;
- }
- #topPopover .mui-popover-arrow {
- left: auto;
- right: 6px;
- }
- p {
- text-indent: 22px;
- }
- span.mui-icon {
- font-size: 14px;
- color: #007aff;
- margin-left: -15px;
- padding-right: 10px;
- }
- .mui-popover {
- color:#fff;
- height: 260px;
- width: 130px;
- background-color: rgba(141, 157, 199, 0.9);
- }
- .mui-content {
- padding: 10px;
- }
- .mui-scroll-wrapper{
- background-color:transparent;
- }
- .mui-popover .mui-table-view{
- background-color: transparent;
- }
- .history tr{
- background-color: #ffffff;
- border-radius:5px 0 0 5px;
- }
- .history td:first-child{
- border-radius:5px 0 0 5px;
- }
- .history td:last-child{
- border-radius: 0 5px 5px 0;
- }
-
- .grid-task >div{
- display: grid;
- grid-template-columns: 60px 1fr 1fr 100px;
- grid-gap: 1px;
- }
- .grid-task >div>span{
- color: #fff;
- font-size: 15px;
- background-color: rgba(141, 157, 199, 0.5);
- padding:5px 5px 2px 10px;
- }
- .mui-bar{
- height:35px
- }
- .mui-bar-nav{
- top: 0;
- box-shadow: 0 1px 6px #2e3342;
- }
- .mui-title {
- line-height:35px
- }
- .mui-bar .mui-icon {
- padding-top:5px
- }
- .mui-bar-nav~.mui-content{
- padding-top: 30px;
- }
- .text-success{
- color:#27c24c
- }
- .mui-bar .mui-btn-link {
- line-height: 36px;
- }
- .mui-col-xs-3{
- width: 22%;
- }
- .mui-input-group{
- background-color: rgba(255, 255, 255, 0);
- color: #FFFFFF;
- }
- .mui-content{
- background-color: rgba(255, 255, 255, 0);
- }
- * { touch-action: none; }
- </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" style="height:auto;min-height: 525px;">
- <div class="mui-content-padded" style="margin: 5px;">
- <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-button-row">
- <button id="update" type="button" class="mui-btn mui-btn-success">应用更新</button>
- <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>
- <div id="stop" style="margin-top: 13px;height: 15px;background: url(img/bottom_bg.png) no-repeat -25px 0;"></div>
- </body>
- <script src="js/mui.js"></script>
- <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"));
- }
- })
- $("#default").click(function() {
- $("#ip").val("192.168.0.200");
- $("#agvid").val("1");
- $("#mapid").val("2020032608412704");
- })
- $("#cancel").click(function() {
- window.location.href = "index.html";
- })
- $("#confirm").click(function() {
- var ip = $("#ip").val();
- var agvid = $("#agvid").val();
- var mapid = $("#mapid").val();
- if (ip != "" && ip != null) {
- localStorage.setItem("ip", ip);
- }
- if (agvid != "" && agvid != null) {
- localStorage.setItem("agvid", agvid);
- }
- if (mapid != "" && mapid != null) {
- localStorage.setItem("mapid", mapid);
- }
- window.location.href = "index.html";
- })
- mui.init()
- $("#update").click(function() {
- dowload()
- })
- function dowload() {
- var options = {
- method: "GET"
- };
- dtask = plus.downloader.createDownload(
- "http://192.168.1.230:3000/wcs/agv-summoner/raw/master/releases/agv-summoner.apk", options);
- dtask.addEventListener("statechanged", function(task, status) {
- switch (task.state) {
- case 1: // 开始
- mui.toast("开始下载...")
- break;
- case 2: // 已连接到服务器
- mui.toast("连接到服务器...")
- break;
- case 3: // 已接收到数据
- //alert(task.downloadedSize) // 已下载文件大小
- //alert(task.totalSize) // 文件大小
- break;
- case 4: // 下载完成
- mui.toast("下载完成!")
- //console.log(task.totalSize)
- plus.io.resolveLocalFileSystemURL(task.filename, function(entry) {
- if (entry.isFile) {
- plus.runtime.install(entry.toLocalURL(), {}, function() {
- alert("安装成功")
- entry.remove();//删除文件
- }, function() {
- alert("安装失败")
- });
- } else {
- // 不存在
- alert("文件不存在")
- }
- //alert(entry.toLocalURL()+"") // 显示下载的文件存储绝对地址
- //console.log(entry.toLocalURL()) //绝对地址
- }, function(e) {});
- //alert(task.filename) // 显示下载好的文件名称
- //console.log("task.filename", task.filename)
- break;
- }
- });
- dtask.start();
- }
- </script>
- </html>
|