hkClientIndex.htm 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <!DOCTYPE html>
  2. <html lang="zh-cn">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>慧牧科技</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. #include("template/huimv-hkclient-head.vm")
  8. <!-- 百度地图API -->
  9. <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=Gi6loTlqG5RF57Fvmx4YwYNv"></script>
  10. <link href="views/hkclient/css/home.css" rel="stylesheet">
  11. <script src="views/hkclient/js/home.js"></script>
  12. <style rel="stylesheet">
  13. /* Header example */
  14. .example {
  15. margin: 0 auto;
  16. height: 100%;
  17. }
  18. .example .frame {
  19. margin: 0 auto;
  20. width: 100%;
  21. height: 100%;
  22. overflow: hidden;
  23. text-shadow: none;
  24. }
  25. .cellName1 {
  26. height: 50px;
  27. line-height: 50px;
  28. width: 100%;
  29. font-size: x-large;
  30. font-weight: bold;
  31. }
  32. /* 改 */
  33. html, body {
  34. background: url('views/hkclient/img/bjt.jpg');
  35. background-repeat: no-repeat;
  36. background-size: 145%;
  37. }
  38. .flex-container section div.wrapper #chartA, .flex-container section div.wrapper #chartB, .flex-container section div.wrapper #chartC{
  39. padding: 10px;
  40. }
  41. .flex-container section.secA {
  42. background: url('views/hkclient/img/kuang.PNG') !important;
  43. }
  44. .flex-container section.secA,.flex-container section.secB,.flex-container section.secC {
  45. width: 37%;
  46. height: 32%;
  47. background: url('views/hkclient/img/mjbk.PNG');
  48. margin: 10px 0 0 10px;
  49. }
  50. @media screen and (max-width: 1000px) {
  51. .flex-container section.secA,.flex-container section.secB,.flex-container section.secC {
  52. width: 37%;
  53. height: 32%;
  54. background: url('views/hkclient/img/mjbk.PNG');
  55. margin: 7px 0 0 10px;
  56. }
  57. }
  58. .flex-container section.secD,.flex-container section.secE{
  59. width: 60%;
  60. }
  61. .flex-container section.secD #zddtBody,.mapGif {
  62. padding:36px 28px 28px 28px;
  63. background: url('views/hkclient/img/dtbk.PNG');
  64. height: 60% !important;
  65. }
  66. .flex-container section.secE {
  67. background: url('views/hkclient/img/mjbk.PNG');
  68. }
  69. .flex-container section.secA,.flex-container section.secB,.flex-container section.secC,.flex-container section.secD #zddtBody,.mapGif,
  70. .flex-container section.secE{
  71. background-size: 100% 100% !important;
  72. background-position: 0;
  73. background-repeat: no-repeat;
  74. background-color: transparent;
  75. position: relative;
  76. }
  77. .flex-container section.secA .tillt,.flex-container section.secB .tillt,.flex-container section.secC .tillt,.title{
  78. padding: 0 22px;
  79. }
  80. .title{
  81. font-size: 12px;
  82. margin: 11px 0;
  83. }
  84. .title li{
  85. color: #d9dadc;
  86. }
  87. .title li.active {
  88. text-shadow: 0 0 2px #00f;
  89. }
  90. #mapGif {
  91. width: 100% !important;
  92. height: 100% !important;
  93. margin: 0 !important;
  94. background-color:rgba(255, 255, 255, 0.3);
  95. }
  96. .tillt h5{
  97. font-size: 12px;
  98. }
  99. .flex-container section .tillt {
  100. text-shadow: 0 0 6px #fff;
  101. height: 25px;
  102. margin: 11px 0;
  103. padding: 0 12px;
  104. position: relative;
  105. display: flex;
  106. flex-direction: row;
  107. align-items: center;
  108. }
  109. .flex-container section .tillt h5 {position: absolute;width: 26%;height: 25px;line-height: 25px;padding: 0 11px;margin: 0;z-index: 9;top: 0;}
  110. .flex-container section div.wrapper {background-color: transparent;overflow: hidden;}
  111. .syMc{letter-spacing:12px;font-weight:normal;font-size: 30px;white-space: pre;display: inline-block;color: #1b57a7;background-image: -webkit-gradient(linear, 0 0, 0 bottom, from(rgba(26, 85, 161, 1)), to(rgba(146, 194, 255, 1)));-webkit-background-clip: text;-webkit-text-fill-color: transparent;-webkit-box-reflect: below 0 -webkit-linear-gradient(transparent,transparent 10%,rgba(255,255,255,.2));}
  112. .example .frame ul li:nth-child(odd),.example .frame ul li:nth-child(even){background-color: transparent;}
  113. .example .frame ul li{color: #a2a4ab;margin: 0 1px 0 6px;}
  114. #mcqk{background: url('views/hkclient/img/scqkbk.PNG');background-repeat: no-repeat;background-size: 100% 100%;background-color: transparent;background-position: 0;position: relative;overflow: hidden;height: 19%;margin-bottom: 1%;}
  115. #mcqk ul{display: flex;flex-direction: row;flex-wrap: wrap;justify-content: space-around;padding-top: 1%;}
  116. #mcqk ul li{width: 42%;margin: 1% 0;font-size: 12px;color: #d9dadc;display: flex;justify-content: space-between;}
  117. @font-face {font-family: myFirstFont;src: url('views/hkclient/font/font-family.ttf');}
  118. #mcqk ul li span {font-family:myFirstFont;font-weight: bold;letter-spacing: 9px;font-size: 16px;}
  119. #mcqk .tillt{padding: 0 22px;}
  120. .fk{position: absolute;top: 5px;right: 10px;display: flex;flex-direction: row;color: #8DC0FF;}
  121. .fk div{margin: 0 10px;}
  122. .fk div strong{font-size: 24px;margin: 0 10px;}
  123. @media screen and (max-width: 1000px) {
  124. .fk div strong{font-size: 15px;margin: 0 5px;}
  125. .fk {top: 10px;}
  126. }
  127. .table{margin-bottom:0;}
  128. td{border: none !important;font-size: 16px;}
  129. td:nth-of-type(1){padding-left: 30px !important;white-space: pre;}
  130. td:nth-of-type(2){padding-right: 20px !important;text-align: right;color: #f04f2f;}
  131. td:nth-of-type(3){padding-top: 14px !important;padding-right: 30px !important;}
  132. .mcdbt {
  133. position: absolute;
  134. top: 0;
  135. padding: 0 42px;
  136. }
  137. /*在进度条元素上调用动画*/
  138. #fill{
  139. height: 12px;
  140. animation: move 2s;
  141. background: -webkit-linear-gradient(left, #2b8cc4 40% , #3ebcd9 100%);
  142. }
  143. @keyframes move {
  144. 0%{
  145. width:0;
  146. }
  147. 100%{
  148. width:100%;
  149. }
  150. }
  151. /** 分辨率适应 **/
  152. @media screen and (max-width: 1000px) {
  153. .table>thead>tr>th, .table>thead>tr>td, .table>tbody>tr>th, .table>tbody>tr>td, .table>tfoot>tr>th, .table>tfoot>tr>td {
  154. padding: 4px;
  155. line-height: 1.42857;
  156. vertical-align: top;
  157. border-top: 1px solid #ddd;
  158. font-size:12px;
  159. }
  160. .flex-container section .tillt {
  161. margin: 5px 0px 5px -10px;
  162. }
  163. .syMc {
  164. letter-spacing: 7px;
  165. font-size:25px;
  166. }
  167. #mcqk ul li {
  168. margin: 0.6% 0;
  169. }
  170. #mcqk ul li span {
  171. margin: -3px 1px 0 0;
  172. letter-spacing: 4px;
  173. }
  174. .cellName1{
  175. height: 30px;
  176. line-height: 20px;
  177. width: 100%;
  178. font-size: larger;
  179. font-weight: bold;
  180. }
  181. .mcdbt {
  182. position: absolute;
  183. top: 0;
  184. padding: 0 27px;
  185. font-size: 0.83em;
  186. font-weight: bold;
  187. }
  188. .frame {
  189. font-size:12px;
  190. }
  191. }
  192. </style>
  193. <script type="text/javascript">
  194. var timer;
  195. $(function(){
  196. sly.activate(0);
  197. loadZddtMap();
  198. window.clearInterval(timer);
  199. timer = window.setInterval(function(){
  200. loadZsxx();
  201. }, 600000);
  202. });
  203. /**
  204. * 加载
  205. */
  206. function loadSj(lqid, zsid, qyid) {
  207. $("#hkzsid").val(zsid);
  208. var obj1 = $("#secA").find("li.active");
  209. var obj = $("#secB").find("li.active");
  210. hkclient.loadMobilePage("chartA", "getHkClient" + $(obj1).data("for") + "Main.htm?lqid=" + lqid);
  211. var qyidOld = $("#qyid").val();
  212. qyid = "14";
  213. if (qyidOld == "" || qyidOld != qyid) {
  214. $("#qyid").val(qyid);
  215. hkclient.loadMobilePage("chartB", "getHkClient" + $(obj).data("for") + "Main.htm?qyid=" + qyid);
  216. }
  217. /* hkclient.loadMobilePage("chartB", "getHkClient" + $(obj).data("for") + "Main.htm?mcid=" + $("#mcid").val()); */
  218. hkclient.loadMobilePage("chartC", "getHkClientMtxhMain.htm?mcid=" + $("#mcid").val());
  219. }
  220. /**
  221. * 加载地图
  222. */
  223. function loadZddtMap() {
  224. hkclient.loadMobilePage("zddtBody", "loadHkdtMap.htm?mcid=" + $("#mcid").val());
  225. }
  226. /**
  227. * 刷新猪舍信息
  228. */
  229. function loadZsxx() {
  230. jQuery.getJSON("getHkClientZsxx.htm", {mcid : $("#mcid").val()}, function(data) {
  231. for (var o in data) {
  232. if (data[o].dqwd == "") {
  233. //$("#wd" + data[o].id).html("<font color='#FC5C5C'>最近无数据</font>");
  234. } else {
  235. $("#wd" + data[o].id).html(data[o].dqwd + " ℃");
  236. }
  237. if (data[o].dqdn == "") {
  238. //$("#dn" + data[o].id).html("<font color='#FC5C5C'>最近无数据</font>");
  239. } else {
  240. $("#dn" + data[o].id).html(data[o].dqdn + " ℃");
  241. }
  242. if (data[o].dqsd == "") {
  243. //$("#sd" + data[o].id).html("<font color='#FC5C5C'>最近无数据</font>");
  244. } else {
  245. $("#sd" + data[o].id).html(data[o].dqsd + " RH");
  246. }
  247. if (data[o].dqaq == "") {
  248. //$("#aq" + data[o].id).html("<font color='#FC5C5C'>最近无数据&nbsp;&nbsp;&nbsp;</font>");
  249. } else {
  250. $("#aq" + data[o].id).html(data[o].dqaq + " ppm");
  251. }
  252. }
  253. });
  254. }
  255. </script>
  256. </head>
  257. <body>
  258. <input type="hidden" id="mcid" value="$!daMcda.id">
  259. <input type="hidden" id="hkzsid" value="">
  260. <input type="hidden" id="qyid" value="">
  261. <section class="flex-container">
  262. <section class="secA" id="secA">
  263. <div class="wrapper flex-container">
  264. <ul class="title nav-pills clearfix">
  265. <li class="active" data-for="Snwd">温度曲线</li>
  266. <li data-for="Snsd">湿度曲线</li>
  267. <li data-for="Snaq">氨气曲线</li>
  268. </ul>
  269. <div id="chartA"></div>
  270. </div>
  271. </section>
  272. <!-- <section class="secB" id="secB">
  273. <div class="wrapper flex-container">
  274. <ul class="title nav-pills clearfix">
  275. <li class="active" data-for="Tzfb">门禁信息</li>
  276. <li data-for="Pjtz">平均体重</li>
  277. <li data-for="Rjzz">日均体重</li>
  278. <li data-for="Fwfb">访问分布</li>
  279. </ul>
  280. <div class="fk"><div>访客总数<strong id="fk1">66</strong></div><div>昨日新增访客<strong id="fk2">5</strong></div></div>
  281. <div id="chartB"></div>
  282. </div>
  283. </section> -->
  284. <section class="secB" id="secB">
  285. <div class="wrapper flex-container">
  286. <ul class="title nav-pills clearfix">
  287. <li class="active" data-for="Nhsj">能耗数据</li>
  288. <!-- <li data-for="Pjtz">平均体重</li>
  289. <li data-for="Rjzz">日均体重</li>
  290. <li data-for="Fwfb">访问分布</li> -->
  291. </ul>
  292. <!-- <div class="fk"><div>访客总数<strong id="fk1">66</strong></div><div>昨日新增访客<strong id="fk2">5</strong></div></div> -->
  293. <div id="chartB"></div>
  294. </div>
  295. </section>
  296. <section class="secC" id="secC">
  297. <div class="wrapper flex-container">
  298. <div class="tillt">
  299. <h5>环保数据</h5>
  300. </div>
  301. <div id="chartC"></div>
  302. </div>
  303. </section>
  304. <section class="secD" id="secD" style="height: 75%;">
  305. <div class="wrapper">
  306. <div id="headline" style="background-color:transparent;height: 18%;position: relative;display: flex;align-items: center;justify-content: space-around;"><span class="syMc"><!-- $!daMcda.mcmc养殖数据大平台 -->生猪福利养殖物联网在线监测与调控系统</span><div class="triggerMap" id="triggerMap" style="position: initial;white-space: pre;display: none;">切换地图</div></div>
  307. <div id="mcqk">
  308. <div class="tillt">
  309. <h5>牧场情况</h5>
  310. </div>
  311. <ul>
  312. <li>牧场猪舍数量 <span style="color: #ed4f30;">$!zssl</span></li>
  313. <li>牧场当前产仔数 <span style="color: #edb530;">$!dqczs</span></li>
  314. <li>牧场当前配种数 <span style="color: #0ad554;">$!dqpzs</span></li>
  315. <li>牧场当前生产业绩 <span style="color: #0ad554;">$!dqscyj</span></li>
  316. </ul>
  317. </div>
  318. <div id="zddtBody" class="zzz" style="display: none;"></div>
  319. <div class="mapGif" id="mapGifWrapper"><h5 style="position: absolute;top: 0;margin-top: 1.4%;">猪舍</h5><img id="mapGif" src="views/hkclient/common/map_gif/11.gif" alt="动态地图"></div>
  320. </div>
  321. </section>
  322. <section class="secE" style="height: 24%;">
  323. <h5 class="mcdbt">猪舍列表</h5>
  324. <div id="example" class="example">
  325. <div class="frame">
  326. <ul style="padding: 5px 0;">
  327. #foreach ($!obj in $zsdaList)
  328. <li class="">
  329. <input type="hidden" value="$!obj.dqlq"/>
  330. <input type="hidden" value="$!obj.id"/>
  331. <input type="hidden" value="$!obj.zsqy"/>
  332. <div class="cellName1" data-wl="$!obj.wl" data-zsmc="$!obj.zsmc"></div>
  333. <dl class="dl-horizontal">
  334. <dt class="col-xs-5">室温:</dt>
  335. <dd class="col-xs-7" id="wd$!obj.id">
  336. #if ("$!obj.dqwd" == "111")<font color="#FC5C5C">最近无数据</font>#else$!obj.dqwd ℃#end
  337. </dd>
  338. <dt class="col-xs-5">地暖:</dt>
  339. <dd class="col-xs-7" id="dn$!obj.id">
  340. #if ("$!obj.dqdn" == "111")<font color="#FC5C5C">0.0</font>#else$!obj.dqdn ℃#end
  341. </dd>
  342. <dt class="col-xs-5">湿度:</dt>
  343. <dd class="col-xs-7" id="sd$!obj.id">
  344. #if ("$!obj.dqsd" == "111")<font color="#FC5C5C">最近无数据</font>#else$!obj.dqsd RH#end
  345. </dd>
  346. <dt class="col-xs-5">氨气:</dt>
  347. <dd class="col-xs-7" id="aq$!obj.id">
  348. #if ("$!obj.dqaq" == "111")<font color="#FC5C5C">最近无数据</font>#else$!obj.dqaq ppm#end
  349. </dd>
  350. </dl>
  351. </li>
  352. #end
  353. </ul>
  354. </div>
  355. </div>
  356. </section>
  357. </section>
  358. </body>
  359. </html>