bak.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>华力机电SIMANC</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <!--标准mui.css-->
  10. <link rel="stylesheet" type="text/css" href="css/mui.min.css">
  11. <!--App自定义的css-->
  12. <link rel="stylesheet" type="text/css" href="css/app.css" />
  13. <link rel="stylesheet" type="text/css" href="css/iconfont.css" />
  14. <style>
  15. .mui-btn-block{
  16. margin-bottom: 0;}
  17. .mui-content-padded{
  18. margin: 2px;
  19. }
  20. .mui-col{
  21. display: inline-block;
  22. padding: 2px;
  23. }
  24. /*滚动条样式*/
  25. ::-webkit-scrollbar {
  26. width: 0;
  27. background-color: #F5F5F5;
  28. }
  29. /*定义滚动条轨道 内阴影+圆角*/
  30. ::-webkit-scrollbar-track {
  31. background-color: #2e3342;
  32. }
  33. /*定义滑块 内阴影+圆角*/
  34. ::-webkit-scrollbar-thumb {
  35. background-color: #2e3342;
  36. }
  37. .mui-btn-royal{
  38. background-color: rgba(141, 157, 199, 0.5);
  39. border:1px solid rgba(141, 157, 199, 0.5)
  40. }
  41. .active {
  42. background-color: #d4d4d4;
  43. color:white;
  44. }
  45. .up{
  46. background: #0087c5 url(img/top.svg) no-repeat 50% 10%;
  47. }
  48. .down{
  49. background: #0087c5 url(img/bottom.svg) no-repeat 50% 10%;
  50. }
  51. .mui-plus .plus{
  52. display: inline;
  53. }
  54. .plus{
  55. display: none;
  56. }
  57. #topPopover {
  58. position: fixed;
  59. top: 16px;
  60. right: 6px;
  61. }
  62. #topPopover .mui-popover-arrow {
  63. left: auto;
  64. right: 6px;
  65. }
  66. p {
  67. text-indent: 22px;
  68. }
  69. span.mui-icon {
  70. font-size: 14px;
  71. color: #007aff;
  72. margin-left: -15px;
  73. padding-right: 10px;
  74. }
  75. .mui-popover {
  76. color:#fff;
  77. height: 260px;
  78. width: 130px;
  79. background-color: rgba(141, 157, 199, 0.9);
  80. }
  81. .mui-content {
  82. padding: 10px;
  83. }
  84. .mui-scroll-wrapper{
  85. background-color:transparent;
  86. }
  87. .mui-popover .mui-table-view{
  88. background-color: transparent;
  89. }
  90. .history tr{
  91. background-color: #ffffff;
  92. border-radius:5px 0 0 5px;
  93. }
  94. .history td:first-child{
  95. border-radius:5px 0 0 5px;
  96. }
  97. .history td:last-child{
  98. border-radius: 0 5px 5px 0;
  99. }
  100. .grid-task >div{
  101. display: grid;
  102. grid-template-columns: 60px 1fr 1fr 100px;
  103. grid-gap: 1px;
  104. }
  105. .grid-task >div>span{
  106. color: #fff;
  107. font-size: 15px;
  108. background-color: rgba(141, 157, 199, 0.5);
  109. padding:5px 5px 2px 10px;
  110. }
  111. .mui-bar{
  112. height:35px
  113. }
  114. .mui-bar-nav{
  115. top: 0;
  116. box-shadow: 0 1px 6px #2e3342;
  117. }
  118. .mui-title {
  119. line-height:35px
  120. }
  121. .mui-bar .mui-icon {
  122. padding-top:5px
  123. }
  124. .mui-bar-nav~.mui-content{
  125. padding-top: 30px;
  126. }
  127. .text-success{
  128. color:#27c24c
  129. }
  130. .mui-bar .mui-btn-link {
  131. line-height: 36px;
  132. }
  133. .mui-col-xs-3{
  134. width: 22%;
  135. }
  136. </style>
  137. </head>
  138. <body style="background: url(img/bg.png) no-repeat 0px -0px;width:99%;">
  139. <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%;">
  140. <a style="color: #FFFFFF;font-size: 20px;">华力西曼克</a>
  141. </div>
  142. <div id="top" style="height: 30%;text-align: center;padding-top: 1px;background: url(img/top_bg.png) no-repeat 0 0px;background-size:100%;">
  143. <div class="mui-row">
  144. <div class="mui-col mui-col-xs-12">
  145. <div id="speed" style="height: 10%;width: 50%;padding-top: 10px;float: left;">
  146. <img src="img/sd.png" style="margin-left: -80px;width: 13%;">
  147. </div>
  148. <div id="battery" style="height: 10%;width: 50%;padding-top: 10px;float: left;">
  149. <img src="img/battery.png" style="margin-right: -80px;width: 23%;">
  150. </div>
  151. </div>
  152. <div class="mui-col mui-col-xs-12">
  153. <div id="jacking" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: left;margin-left: 23px;">
  154. <div style="margin-left: -60px;margin-top: 15px;">
  155. <a style="color: #FFFFFF;font-size: 18px;">目标</a><br>
  156. </div>
  157. <div style="margin-left: -60px;margin-top: 10px;">
  158. <a style="color: #FFFFFF;font-size: 18px;">站点</a><br>
  159. </div>
  160. <div style="margin-left: 40px;margin-top: -40px;">
  161. <a style="color: #FFFFFF;font-size: 50px;">7</a><br>
  162. </div>
  163. </div>
  164. <div id="jacking" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: right;margin-right: 20px;">
  165. <div style="margin-left: -60px;margin-top: 15px;">
  166. <a style="color: #FFFFFF;font-size: 18px;">顶升</a><br>
  167. </div>
  168. <div style="margin-left: -60px;margin-top: 10px;">
  169. <a style="color: #FFFFFF;font-size: 18px;">状态</a><br>
  170. </div>
  171. <div style="margin-left: 60px;margin-top: -55px;">
  172. <img src="img/ds.png" width="60%">
  173. </div>
  174. </div>
  175. </div>
  176. <br>
  177. <br>
  178. <div style="width: 94%;height: 50px;margin-top: 100px;margin-left: 20px;">
  179. <div style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn3_bg.png);color: #FFFFFF;text-align: center;">停止</div>
  180. <div style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn2_bg.png);color: #FFFFFF;text-align: center;">运行</div>
  181. <div style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn1_bg.png);color: #FFFFFF;text-align: center;">注意</div>
  182. <div style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">详情</div>
  183. </div>
  184. <div style="width: 87%;height: 30px;margin-left: 25px;background-color: #0b6d78;border-radius: 3px;"></div>
  185. <div class="mui-content-padded" style="background: url(img/btlist5_bg.png) no-repeat 10px 0;margin-top: 25px;width: 100%;height: auto;">
  186. <div class="mui-row">
  187. <div class="mui-col mui-col-xs-12" id="BtnList" style="padding-top:10px;overflow-y:auto;">
  188. <div class="mui-col mui-col-xs-3">
  189. <button type="button" value="1" id="1" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">1</button>
  190. </div>
  191. <div class="mui-col mui-col-xs-3">
  192. <button type="button" value="2" id="2" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">2</button>
  193. </div>
  194. <div class="mui-col mui-col-xs-3">
  195. <button type="button" value="3" id="3" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">3</button>
  196. </div>
  197. <div class="mui-col mui-col-xs-3">
  198. <button type="button" value="4" id="4" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">4</button>
  199. </div>
  200. <div class="mui-col mui-col-xs-3">
  201. <button type="button" value="5" id="5" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">5</button>
  202. </div>
  203. <div class="mui-col mui-col-xs-3">
  204. <button type="button" value="6" id="6" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">6</button>
  205. </div>
  206. <div class="mui-col mui-col-xs-3">
  207. <button type="button" value="7" id="7" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">7</button>
  208. </div>
  209. <div class="mui-col mui-col-xs-3">
  210. <button type="button" value="8" id="8" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">8</button>
  211. </div>
  212. </div>
  213. <div class="mui-col mui-col-xs-12" style="padding-top:10px;overflow-y:auto;">
  214. <div class="mui-col mui-col-xs-3">
  215. <button type="button" id="11814" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">11814</button>
  216. </div>
  217. <div class="mui-col mui-col-xs-3">
  218. <button type="button" id="11841" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">11841</button>
  219. </div>
  220. <div class="mui-col mui-col-xs-3">
  221. <button type="button" id="200" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">200</button>
  222. </div>
  223. <div class="mui-col mui-col-xs-3">
  224. <button type="button" id="151" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">151</button>
  225. </div>
  226. </div>
  227. <div class="mui-col mui-col-xs-12" style="text-align: center;padding-bottom: 13px;">
  228. <div class="mui-col mui-col-xs-3" id="gomoving">
  229. <button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="moving" style="border:1px solid #4a5a6a;">移动</button>
  230. </div>
  231. <div class="mui-col mui-col-xs-3" id="gostart">
  232. <button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="start" style="border:1px solid #4a5a6a;">搬运</button>
  233. </div>
  234. <div class="mui-col mui-col-xs-3">
  235. <button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="cancel" style="border:1px solid #4a5a6a;">取消</button>
  236. </div>
  237. <!-- <div class="mui-col mui-col-xs-3">
  238. <button type="button" class="mui-btn mui-btn-royal mui-btn-block operation"
  239. id="remote" style="border:1px solid #4a5a6a;">遥控</button>
  240. </div>
  241. <div class="mui-col mui-col-xs-3">
  242. <button type="button" class="mui-btn mui-btn-royal mui-btn-block operation"
  243. id="details" style="border:1px solid #4a5a6a;">详情</button>
  244. </div> -->
  245. </div>
  246. </div>
  247. </div>
  248. <div style="height: 15px;width: 101%;background: url(img/bottom_bg.png) no-repeat -25px 0;"></div>
  249. </div>
  250. </div>
  251. </body>
  252. <script src="js/jquery.min.js"></script>
  253. <script src="js/mui.min.js"></script>
  254. <script type="text/javascript">
  255. var windowHeight = $(window).height()
  256. $(function() {
  257. $("#gostart").addClass("mui-hidden");
  258. $("#moving").attr("disabled", true);
  259. $("#start").attr("disabled", true);
  260. $("button[name]").on("touchstart", onSelectStation);
  261. });
  262. $("#11814").click(function() {
  263. var id = 1
  264. var s = 1
  265. var d = 4
  266. var strone = {
  267. "t": "AddTsk",
  268. "id": id,
  269. "s": s,
  270. "d": d
  271. }
  272. var ss = JSON.stringify(strone)
  273. $.post("http://192.168.0.118:8899", ss);
  274. })
  275. $("#11841").click(function() {
  276. var id = 1
  277. var s = 4
  278. var d = 1
  279. var strone = {
  280. "t": "AddTsk",
  281. "id": id,
  282. "s": s,
  283. "d": d
  284. }
  285. var ss = JSON.stringify(strone)
  286. $.post("http://192.168.0.118:8899", ss);
  287. })
  288. $("#200").click(function() {
  289. var id = 1
  290. var s = 4
  291. var d = 1
  292. var strone = {
  293. "t": "AddTsk",
  294. "id": id,
  295. "s": s,
  296. "d": d
  297. }
  298. var ss = JSON.stringify(strone)
  299. $.post("http://192.168.3.200:8899", ss);
  300. })
  301. $("#151").click(function() {
  302. var id = 1
  303. var s = 1
  304. var d = 4
  305. var strone = {
  306. "t": "AddTsk",
  307. "id": id,
  308. "s": s,
  309. "d": d
  310. }
  311. var ss = JSON.stringify(strone)
  312. $.post("http://192.168.0.151:8899", ss);
  313. })
  314. $("#AAA").on("click", function() {
  315. var id = 1
  316. var s = 1
  317. var d = 4
  318. var strone = {
  319. "t": "AddTsk",
  320. "id": id,
  321. "s": s,
  322. "d": d
  323. }
  324. var ss = JSON.stringify(strone)
  325. $.ajax({
  326. type: 'post',
  327. url: 'http://192.168.0.151:8899',
  328. data: ss,
  329. success: function(res) {
  330. console.log(res);
  331. },
  332. error: function(res) {
  333. console.log(res);
  334. }
  335. });
  336. });
  337. function onSelectStation(evt) {
  338. var $this = $(this);
  339. if ($("div[id='BtnList']").is(':active')) {
  340. $this.removeClass('active');
  341. } else {
  342. $this.addClass('active');
  343. }
  344. if ($("div[id='BtnList']").find(".active").length == 1) {
  345. $("#moving").attr("disabled", false);
  346. $this.addClass('up');
  347. $("#start").removeAttr("disabled");
  348. $("#cancel").removeAttr("disabled");
  349. } else if ($("div[id='BtnList']").find(".active").length == 2) {
  350. $("#gomoving").addClass("mui-hidden");
  351. $("#gostart").removeClass("mui-hidden");
  352. $this.addClass('down');
  353. $('#start').attr("disabled", false);
  354. $("#handling").removeAttr("disabled");
  355. }
  356. if ($("div[id='BtnList']").find(".active").length >= 2) {
  357. $("button[name='Site']").css("pointer-events", "none")
  358. } else {
  359. $("button[name='Site']").css("pointer-events", "auto")
  360. }
  361. };
  362. function Reset(evt) {
  363. if ($("div[id='BtnList']").find(".active")) {
  364. $("#gostart").addClass("mui-hidden");
  365. $("#gomoving").removeClass("mui-hidden");
  366. $("button[name='Site']").removeClass('up');
  367. $("button[name='Site']").removeClass('down');
  368. $("button[name='Site']").removeClass('active');
  369. $("button[name='Site']").css("pointer-events", "auto");
  370. $('#start').attr("disabled", true);
  371. $('#cancel').attr("disabled", true);
  372. $('#moving').attr("disabled", true);
  373. }
  374. }
  375. //移动
  376. $("#moving").click(function() {
  377. var bt_value = [];
  378. $("div[id='BtnList']").find(".up").each(function(evt) {
  379. bt_value.push($(this).val());
  380. })
  381. console.log("AAA", bt_value[0]);
  382. });
  383. //搬运
  384. $("#start").click(function() {
  385. var id = 1;
  386. var bt_value = [];
  387. $("div[id='BtnList']").find(".up").each(function(evt) {
  388. bt_value.push($(this).val());
  389. });
  390. $("div[id='BtnList']").find(".down").each(function(evt) {
  391. bt_value.push($(this).val());
  392. });
  393. var strone = {
  394. "t": "AddTsk",
  395. "id": id,
  396. "s": bt_value[0],
  397. "d": bt_value[1]
  398. }
  399. var ss = JSON.stringify(strone)
  400. $.post("http://192.168.0.118:8899", ss);
  401. });
  402. //取消
  403. $("#cancel").on("click", Reset);
  404. </script>
  405. </html>