123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152 |
- <!DOCTYPE html>
- <html lang="zh">
- <head>
- <meta charset="utf-8">
- <title>首页</title>
- <link href="css/common.css" rel="stylesheet">
- <link href="css/index.css" rel="stylesheet">
- <link href="css/scrollBar.css" rel="stylesheet">
- <script type="text/javascript" src="js/echarts.min.js"></script>
- <script type="text/javascript" src="js/jquery-2.2.4.min.js"></script>
- <script type="text/javascript" src="js/common.js"></script>
- <script type="text/javascript" src="js/scroll.js"></script>
- <script type="text/javascript" src="js/api.js"></script>
- <script type="text/javascript" src="js/jsmpeg.min.js"></script>
-
- </head>
- <body>
- <div class="header-wrapper">
- <div class="title">
- 智能化综合管理平台
- <svg version="1.1" width="900" height='100'>
- <polygon points="" style="fill:transparent;stroke:#69F8FE;stroke-width:2"/>
- </svg>
- </div>
- <div class="nav-bar">
- <a class="item active" >首页</a>
- <a class="item" href="fzfx.html">生产管理</a>
- <a class="item" href="swfk.html">生物防控</a>
- <a class="item" href="spjk.html">视频监控</a>
- <a class="item" href="hbjc.html">环保监测</a>
- </div>
- </div>
- <div class="grid-wrapper">
- <div class="left1">
-
- <div class="wrapper wrapper1">
- <div class="tab"><div class="tab-title">人员出入</div></div>
- <div class="wrapper-content">
- <div class="wide-border">
-
- </div>
- <svg version="1.1" width="37" height="25" class="wide-border-line1">
- <g transform="translate(0.5 0.5)">
- <polyline points="0,24.5 0,0 37,23.5 " style="fill:#0E1E51;stroke:#53BAFD;stroke-width:1"/>
-
- </g>
-
- </svg>
- <svg version="1.1" width="90" height="25" class="wide-border-line2">
- <g transform="translate(0.5 0.5)">
- <polyline points="90,25 65,0 25,0 -1,23.5" style="fill:#0E1E51;stroke:#53BAFD;stroke-width:1"/>
- </g>
- </svg>
- <svg version="1.1" width="25" height="26" class="wide-border-line3">
-
- <line x1="0" y1="0" x2="26" y2="24.5"style="stroke:#53BAFD;stroke-width:1"/>
-
- </svg>
- <svg version="1.1" width="25" height="26" class="wide-border-line4">
-
- <line x1="0" y1="24" x2="25" y2="0"style="stroke:#53BAFD;stroke-width:1"/>
-
- </svg>
- <div id="device-status">
- <div id="chart-snhjsj"></div>
- <!--<div class="device-status-box">
- <div class="chart-tab-t"><div class="chart-tab-title">人员出入统计</div></div>
- <div id="chart-rycrtj"></div>
- </div>-->
- </div>
- </div>
- </div>
- <div class="wrapper wrapper1">
- <div class="tab"><div class="tab-title">行业新闻</div></div>
- <div class="wrapper-content">
- <div class="wide-border">
-
- </div>
- <svg version="1.1" width="37" height="25" class="wide-border-line1">
- <g transform="translate(0.5 0.5)">
- <polyline points="0,24.5 0,0 37,23.5 " style="fill:#0E1E51;stroke:#53BAFD;stroke-width:1"/>
-
- </g>
-
- </svg>
- <svg version="1.1" width="90" height="25" class="wide-border-line2">
- <g transform="translate(0.5 0.5)">
- <polyline points="90,25 65,0 25,0 -1,23.5" style="fill:#0E1E51;stroke:#53BAFD;stroke-width:1"/>
- </g>
- </svg>
- <svg version="1.1" width="25" height="26" class="wide-border-line3">
-
- <line x1="0" y1="0" x2="26" y2="24.5"style="stroke:#53BAFD;stroke-width:1"/>
-
- </svg>
- <svg version="1.1" width="25" height="26" class="wide-border-line4">
-
- <line x1="0" y1="24" x2="25" y2="0"style="stroke:#53BAFD;stroke-width:1"/>
-
- </svg>
- <div class="news-box">
- <div id="news-list">
-
- </div>
-
- </div>
- </div>
- </div>
- </div>
- <div class="brief">
- <div class="line1">
- <div class="cont datenow">2019-05-21</div>
- <div class="division"></div>
- <div class="cont">首页</div>
- <div class="division"></div>
- <div class="cont" id='dataSet'><img src="images/set.png" /></div>
- </div>
- <div class="line2">
- <div class="item">
- <div class="bor wrapper">
- <div class="border-zhe">
- <div class="zhe-block zhe-block-rotate1"></div>
- <div class="zhe-block zhe-block-rotate2"></div>
- <div class="zhe-block zhe-block-rotate3"></div>
- <div class="zhe-block zhe-block-rotate4"></div>
- <div class="item-info-title">
- <span class="title">总存栏:</span>
- <span class="number">0</span>
- </div>
- </div>
- </div>
- </div>
- <div class="item">
- <div class="bor wrapper">
- <div class="border-zhe">
- <div class="zhe-block zhe-block-rotate1"></div>
- <div class="zhe-block zhe-block-rotate2"></div>
- <div class="zhe-block zhe-block-rotate3"></div>
- <div class="zhe-block zhe-block-rotate4"></div>
- <div class="item-info-title">
- <span class="title">母猪存栏:</span>
- <span class="number">0</span>
- </div>
- </div>
- </div>
- </div>
- <div class="item">
- <div class="bor wrapper">
- <div class="border-zhe">
- <div class="zhe-block zhe-block-rotate1"></div>
- <div class="zhe-block zhe-block-rotate2"></div>
- <div class="zhe-block zhe-block-rotate3"></div>
- <div class="zhe-block zhe-block-rotate4"></div>
- <div class="item-info-title">
- <span class="title">均产仔数:</span>
- <span class="number">0</span>
- </div>
- </div>
- </div>
- </div>
- <div class="item">
- <div class="bor wrapper">
- <div class="border-zhe">
- <div class="zhe-block zhe-block-rotate1"></div>
- <div class="zhe-block zhe-block-rotate2"></div>
- <div class="zhe-block zhe-block-rotate3"></div>
- <div class="zhe-block zhe-block-rotate4"></div>
- <div class="item-info-title">
- <span class="title">PSY:</span>
- <span class="number">0</span>
- </div>
- </div>
- </div>
- </div>
- <div class="item">
- <div class="bor wrapper">
- <div class="border-zhe">
- <div class="zhe-block zhe-block-rotate1"></div>
- <div class="zhe-block zhe-block-rotate2"></div>
- <div class="zhe-block zhe-block-rotate3"></div>
- <div class="zhe-block zhe-block-rotate4"></div>
- <div class="item-info-title">
- <span class="title">MSY:</span>
- <span class="number">0</span>
- </div>
- </div>
- </div>
- </div>
- <div class="item">
- <div class="bor wrapper">
- <div class="border-zhe">
- <div class="zhe-block zhe-block-rotate1"></div>
- <div class="zhe-block zhe-block-rotate2"></div>
- <div class="zhe-block zhe-block-rotate3"></div>
- <div class="zhe-block zhe-block-rotate4"></div>
- <div class="item-info-title">
- <span class="title">料肉比:</span>
- <span class="number">0</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="img" id='img_map' style='position:relative;'>
-
- <div class='img_window' id="box" style="position:absolute;transform:scale(1)">
-
- <canvas id="diagonal" width="" height=""></canvas>
- <img alt="" src="images/newmap.jpg" id="pic" usemap="#buildmap" style="">
-
- <map name="buildmap" id="buildmap"><!-- 三个鼠标点击的区域 -->
- <!--老牧1区开始-->
- <area shape="poly" coords="614,220,620,216,681,259,676,263" href="#" alt="" />
- <area shape="poly" coords="602,227,608,223,669,266,663,270" href="#" alt="" />
- <area shape="poly" coords="590,233,597,230,657,272,650,276" href="#" alt="" />
- <area shape="poly" coords="578,240,586,236,646,280,640,285" href="#" alt="" />
- <area shape="poly" coords="566,246,574,243,635,289,629,292" href="#" alt="" />
- <area shape="poly" coords="555,253,562,249,622,295,617,300" href="#" alt="" />
- <area shape="poly" coords="542,260,549,257,610,304,604,308" href="#" alt="" />
- <area shape="poly" coords="530,267,537,264,597,311,591,316" href="#" alt="" />
- <area shape="poly" coords="517,275,524,271,585,319,578,323" href="#" alt="" />
- <area shape="poly" coords="504,282,511,278,570,327,564,332" href="#" alt="" />
- <!--老牧1区结束-->
- <!--老牧2区开始-->
- <area shape="poly" coords="540,162,547,160,585,203,578,207" href="#" alt="" />
- <area shape="poly" coords="526,167,533,164,571,208,563,211" href="#" alt="" />
- <area shape="poly" coords="513,171,521,169,557,213,550,216" href="#" alt="" />
- <area shape="poly" coords="499,176,506,174,543,218,535,221" href="#" alt="" />
- <area shape="poly" coords="485,179,492,178,528,223,521,226" href="#" alt="" />
- <area shape="poly" coords="471,184,478,183,514,228,507,231" href="#" alt="" />
- <area shape="poly" coords="457,189,463,187,498,233,491,236" href="#" alt="" />
- <area shape="poly" coords="442,193,450,190,483,239,476,241" href="#" alt="" />
- <area shape="poly" coords="427,198,435,196,467,243,460,245" href="#" alt="" />
- <area shape="poly" coords="412,202,420,200,452,249,445,251" href="#" alt="" />
- <!--老牧2区结束-->
- <!--老牧3区开始-->
- <area shape="poly" coords="397,207,405,205,436,253,429,256" href="#" alt="" />
- <area shape="poly" coords="382,212,389,210,421,259,414,262" href="#" alt="" />
- <area shape="poly" coords="367,217,375,215,404,264,397,267" href="#" alt="" />
- <area shape="poly" coords="348,223,356,221,385,270,377,274" href="#" alt="" />
- <area shape="poly" coords="333,228,341,226,369,276,361,279" href="#" alt="" />
- <area shape="poly" coords="317,232,325,232,353,282,344,284" href="#" alt="" />
- <area shape="poly" coords="301,238,309,235,336,287,327,290" href="#" alt="" />
- <area shape="poly" coords="285,244,292,242,318,293,309,296" href="#" alt="" />
- <area shape="poly" coords="271,247,278,244,304,298,295,301" href="#" alt="" />
- <area shape="poly" coords="257,252,265,249,289,303,281,306" href="#" alt="" />
- <area shape="poly" coords="246,255,253,253,278,307,270,309" href="#" alt="" />
- <area shape="poly" coords="231,260,241,258,264,311,255,314" href="#" alt="" />
- <area shape="poly" coords="232,288,240,285,251,308,242,311" href="#" alt="" />
-
- <!--老牧3区结束-->
- <!--老牧4区开始-->
- <area shape="poly" coords="898,192,912,167,919,170,906,194" href="#" alt="" />
- <area shape="poly" coords="879,224,893,199,901,202,888,226" href="#" alt="" />
- <area shape="poly" coords="882,186,895,164,903,167,890,189" href="#" alt="" />
- <area shape="poly" coords="863,220,877,194,885,197,872,222" href="#" alt="" />
- <area shape="poly" coords="865,182,879,159,886,162,873,184" href="#" alt="" />
- <area shape="poly" coords="845,213,860,189,867,192,853,217" href="#" alt="" />
- <area shape="poly" coords="848,177,862,154,870,157,856,179" href="#" alt="" />
- <area shape="poly" coords="829,208,844,184,851,187,837,211" href="#" alt="" />
- <!--老牧4区结束-->
- <!--老牧5区开始-->
- <area shape="poly" coords="891,294,906,256,919,260,905,297" href="#" alt="" />
- <area shape="poly" coords="865,286,882,243,906,250,886,294" href="#" alt="" />
- <area shape="poly" coords="842,283,852,262,868,267,859,289" href="#" alt="" />
- <area shape="poly" coords="821,277,833,255,848,261,837,282" href="#" alt="" />
- <area shape="poly" coords="852,259,862,238,879,243,869,262" href="#" alt="" />
- <area shape="poly" coords="834,253,843,232,860,238,850,258" href="#" alt="" />
-
- <!--老牧5区结束-->
- <!--新区保育开始-->
- <area shape="poly" coords="897,136,916,130,934,146,919,152" href="#" />
- <area shape="poly" coords="918,129,935,124,955,141,939,146" href="#" alt="" />
- <!--新区保育结束-->
- <!--天地猪舍开始-->
- <area shape="poly" coords="298,309,380,282,385,290,301,318" href="#" alt="" />
- <!--天地猪舍结束-->
- </map>
-
- </div>
- </div>
-
- <div id="right2" class="right2">
- <div class="wrapper wrapper1">
- <div class="tab"><div class="tab-title">工作看板</div></div>
- <div class="wrapper-content">
- <div class="wide-border">
-
- </div>
- <svg version="1.1" width="37" height="25" class="wide-border-line1">
- <g transform="translate(0.5 0.5)">
- <polyline points="0,24.5 0,0 37,23.5 " style="fill:#0E1E51;stroke:#53BAFD;stroke-width:1"/>
-
- </g>
-
- </svg>
- <svg version="1.1" width="90" height="25" class="wide-border-line2">
- <g transform="translate(0.5 0.5)">
- <polyline points="90,25 65,0 25,0 -1,23.5" style="fill:#0E1E51;stroke:#53BAFD;stroke-width:1"/>
- </g>
- </svg>
- <svg version="1.1" width="25" height="26" class="wide-border-line3">
-
- <line x1="0" y1="0" x2="26" y2="24.5"style="stroke:#53BAFD;stroke-width:1"/>
-
- </svg>
- <svg version="1.1" width="25" height="26" class="wide-border-line4">
-
- <line x1="0" y1="24" x2="25" y2="0"style="stroke:#53BAFD;stroke-width:1"/>
-
- </svg>
- <div class="cont">
- <div class="item">
- <div class="title">待转保育</div>
- <div class="num">0</div>
- </div>
- <div class="item">
- <div class="title">待转育肥</div>
- <div class="num">0</div>
- </div>
- <div class="item">
- <div class="title">待配</div>
- <div class="num">0</div>
- </div>
- <div class="item">
- <div class="title">待妊娠</div>
- <div class="num">0</div>
- </div>
- <div class="item">
- <div class="title">待产</div>
- <div class="num">0</div>
- </div>
- <div class="item">
- <div class="title">待断奶</div>
- <div class="num">0</div>
- </div>
- <div class="item">
- <div class="title">免疫记录</div>
- <div class="num">0</div>
- </div>
- <div class="item">
- <div class="title">销售记录</div>
- <div class="num">0</div>
- </div>
-
- </div>
- </div>
-
- </div>
- <div class="wrapper wrapper2">
- <div class="tab"><div class="tab-title">报警信息</div></div>
-
- <div class="wrapper-content">
- <div class="wide-border">
-
- </div>
- <svg version="1.1" width="37" height="25" class="wide-border-line1">
- <g transform="translate(0.5 0.5)">
- <polyline points="0,24.5 0,0 37,23.5 " style="fill:#0E1E51;stroke:#53BAFD;stroke-width:1"/>
-
- </g>
-
- </svg>
- <svg version="1.1" width="90" height="25" class="wide-border-line2">
- <g transform="translate(0.5 0.5)">
- <polyline points="90,25 65,0 25,0 -1,23.5" style="fill:#0E1E51;stroke:#53BAFD;stroke-width:1"/>
- </g>
- </svg>
- <svg version="1.1" width="25" height="26" class="wide-border-line3">
-
- <line x1="0" y1="0" x2="26" y2="24.5"style="stroke:#53BAFD;stroke-width:1"/>
-
- </svg>
- <svg version="1.1" width="25" height="26" class="wide-border-line4">
-
- <line x1="0" y1="24" x2="25" y2="0"style="stroke:#53BAFD;stroke-width:1"/>
-
- </svg>
- <div class='warning-msg' id="alarmList">
- <div class="msg"><img src="images/warning.png" />配怀舍一栋停电报警!</div>
- <div class="msg"><img src="images/warning.png" />保育舍二栋超高温报警!</div>
- <div class="msg"><img src="images/warning.png" />育肥舍一栋料线报警!</div>
- <div class="msg"><img src="images/warning.png" />分娩舍四栋湿度异常报警!</div>
- <div class="msg"><img src="images/warning.png" />育肥舍一栋料线报警!</div>
-
- </div>
- </div>
- </div>
- </div>
- <div class="bottom1" id="bottom1" >
- <div class='single' style='width: 100%;height: 100%;position: relative;'>
- <div class="pre"></div>
- <div class="next"></div>
- <ul class="list">
-
- </ul>
- </div>
- </div>
- </div>
- <div class='open-box-container windows-dataset'>
- <div class='open-lauer-box'>
- <div class="open-box-head"><span class="window-title"></span>参数配置</div>
- <div class="open-box-body">
- <table cellpadding="0" cellspacing="0" class="wsclset-dataTable">
- <tbody>
- <tr>
- <td class="table-real-head">显示</td>
- <td class="table-real-head">参数</td>
- <td class="table-real-head">值</td>
- <td class="table-real-head">显示</td>
- <td class="table-real-head">参数</td>
- <td class="table-real-head">值</td>
- </tr>
- <tr>
- <td><input type="checkbox" checked/></td>
- <td>总存栏</td>
- <td><input type="text" class="param-dataset"></td>
- <td><input type="checkbox" checked/></td>
- <td>母猪存栏</td>
- <td><input type="text" class="param-dataset"></td>
- </tr>
- <tr>
- <td><input type="checkbox" checked/></td>
- <td>均产仔数</td>
- <td><input type="text" class="param-dataset"></td>
- <td><input type="checkbox" checked/></td>
- <td>PSY</td>
- <td><input type="text" class="param-dataset"></td>
- </tr>
- <tr>
- <td><input type="checkbox" checked/></td>
- <td>MSY</td>
- <td><input type="text" class="param-dataset"></td>
- <td><input type="checkbox" checked/></td>
- <td>料肉比</td>
- <td><input type="text" class="param-dataset"></td>
- </tr>
- <tr>
- <td><input type="checkbox" /></td>
- <td>年产胎次</td>
- <td><input type="text" class="param-dataset"></td>
- <td><input type="checkbox" /></td>
- <td>返情率</td>
- <td><input type="text" class="param-dataset"></td>
- </tr>
- <tr>
- <td><input type="checkbox" /></td>
- <td>配种数</td>
- <td><input type="text" class="param-dataset"></td>
- <td><input type="checkbox" /></td>
- <td>受胎率</td>
- <td><input type="text" class="param-dataset"></td>
- </tr>
- <tr>
- <td><input type="checkbox" /></td>
- <td>配娩率</td>
- <td><input type="text" class="param-dataset"></td>
- <td><input type="checkbox" /></td>
- <td>达100Kg日龄</td>
- <td><input type="text" class="param-dataset"></td>
- </tr>
- </tbody></table>
- </div>
- </div>
- </div>
- <div class="open-box-container window-ssqx">
- <div class='open-lauer-box'>
- <div class="open-box-head"><span class="window-title"></span>环境监测温度/湿度日曲线</div>
- <div class="open-box-body">
- <div id="chart-ssqx"></div>
- </div>
- </div>
- </div>
- <div class='open-box-container windows-spjk'>
- <div class='open-lauer-box'>
- <div class="open-box-head"><span class="window-title"></span>视频监控</div>
- <div class="open-box-body">
- <div id="play-box-0"></div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- var dom_snhjsj = document.getElementById("chart-snhjsj");
- var dom_ssqx = document.getElementById("chart-ssqx");
- var myChart_snhjsj = echarts.init(dom_snhjsj);
- var myChart_ssqx = echarts.init(dom_ssqx);
- var app = {};
- option_snhjsj=null,option_ssqx=null;
- //人员出入详情
- var moment = new Date();
- var nowHour = moment.getHours();
- var nowDate = getDate();
- var rycrUrl = "/analyse/uface/passCount";
- var data_rycr_in=[];
- var data_rycr_out=[];
- var data_rycr_legend = [];
- var times = 0;
- for(var i=0;i<=nowHour;++i){
-
- (function (i) {
- var j = i+1;
- var rycrParam = {
- beginTime:nowDate+" "+(i<10?"0"+i:i)+":00:00",
- endTime:nowDate+" "+(j<10?"0"+j:j)+":00:00",
- };
- data_rycr_legend[i] = (i<10?"0"+i:i)+":00"+"-"+(j<10?"0"+j:j)+":00";
- getData(rycrUrl,rycrParam).then(res => {
- data_rycr_in[i] = res.inCount;
- data_rycr_out[i] = res.outCount;
- //console.log(times,nowHour)
- if(times==nowHour){
- option_snhjsj.series[0].data = data_rycr_out;
- option_snhjsj.series[1].data = data_rycr_in;
- option_snhjsj.xAxis.data = data_rycr_legend;
- myChart_snhjsj.setOption(option_snhjsj, true);
- }
- ++times;
- })
- }(i))
- }
- //获取人员进出详情
- option_snhjsj = {
- color:['#207bc4','#b93b6a'],
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- },
-
-
- },
- grid: {
- x: '3%',
- y: '13%',
- x2: '5%',
- y2: '5%',
- containLabel: true
-
- },
- legend: {
- data: ['外出人数', '进入人数'],
- icon:'circle',
- itemGap: 5,
- itemWidth:10,
- top: '2%',
- x:'center',
- textStyle:{
-
- color:'#ccf5f9',
- },
- },
- xAxis :{
- type : 'category',
- data : data_rycr_legend,
- axisTick: {
- alignWithLabel: true
- },
- axisLine: {
- show: true,
- lineStyle: {
- type: 'solid',
- color: '#4865e3',//左边线的颜色
- width:'1'//坐标线的宽度
- }
- },
- axisLabel: {
- textStyle: {
- color: '#ccf5f9',
-
- },
-
- }
-
- },
- yAxis :{
- type : 'value',
- scale: true,
- axisLine: {
- show: true,
- lineStyle: {
- type: 'solid',
- color: '#4865e3',//左边线的颜色
- width:'1'//坐标线的宽度
- }
- },
- splitLine:{
- lineStyle: {
- type: 'solid',
- color: 'rgba(72,101,227,0.7)',
- width:'1'
- }
- },
- axisLabel: {
- textStyle: {
- color: '#ccf5f9',
-
- },
-
- }
- },
- dataZoom: [{
- type: 'inside',
- start: 80,
- end: 100
- }],
- series : [
- {
- name:"外出人数",
- type:'bar',
- barWidth: '30%',
- data:data_rycr_out,
- itemStyle: {
- normal: {
-
- label: {
- show: true, //开启显示
- position: 'top', //在上方显示
- textStyle: { //数值样式
- color: '#ccf5f9',
- fontSize: 12
- },
- formatter: '{c}'
- },
-
- }
- },
- },
- {
- name:"进入人数",
- type:'bar',
- barWidth: '30%',
- data:data_rycr_in,
- itemStyle: {
- normal: {
- label: {
- show: true, //开启显示
- position: 'top', //在上方显示
- textStyle: { //数值样式
- color: '#ccf5f9',
- fontSize: 12
- },
- formatter: '{c}'
- }
- }
- },
- }
- ]
- };
- //人员出入统计
- option_rycrtj = {
- color:['#207bc4','#b93b6a'],
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- },
-
-
- },
- grid: {
- x: '3%',
- y: '13%',
- x2: '5%',
- y2: '5%',
- containLabel: true
-
- },
- legend: {
- data: ['外出人数', '进入人数'],
- icon:'circle',
- itemGap: 5,
- itemWidth:10,
- top: '2%',
- x:'center',
- textStyle:{
-
- color:'#ccf5f9',
- },
- },
- xAxis :{
- type : 'category',
- data : ['08:00-09:00', '09:00-10:00', '10:00-11:00', '11:00-12:00', '12:00-13:00', '13:00-14:00', '14:00-15:00', '15:00-16:00', '16:00-17:00', '17:00-18:00', '18:00-19:00', '19:00-20:00', '20:00-21:00'],
- axisTick: {
- alignWithLabel: true
- },
- axisLine: {
- show: true,
- lineStyle: {
- type: 'solid',
- color: '#4865e3',//左边线的颜色
- width:'1'//坐标线的宽度
- }
- },
- axisLabel: {
- textStyle: {
- color: '#ccf5f9',
-
- },
-
- }
-
- },
- yAxis :{
- type : 'value',
- scale: true,
- axisLine: {
- show: true,
- lineStyle: {
- type: 'solid',
- color: '#4865e3',//左边线的颜色
- width:'1'//坐标线的宽度
- }
- },
- splitLine:{
- lineStyle: {
- type: 'solid',
- color: 'rgba(72,101,227,0.7)',
- width:'1'
- }
- },
- axisLabel: {
- textStyle: {
- color: '#ccf5f9',
-
- },
-
- }
- },
- dataZoom: [{
- type: 'inside',
- start: 0,
- end: 20
- }],
- series : [
- {
- name:"外出人数",
- type:'bar',
- barWidth: '30%',
- data:[45,56, 66,58,32,15,45,65,31,25,45,36,25],
- itemStyle: {
- normal: {
-
- label: {
- show: true, //开启显示
- position: 'top', //在上方显示
- textStyle: { //数值样式
- color: '#ccf5f9',
- fontSize: 12
- },
- formatter: '{c}'
- },
-
- }
- },
- },
- {
- name:"进入人数",
- type:'bar',
- barWidth: '30%',
- data:[56, 64,48,56,48,74,55,69,65,32,46,64,45],
- itemStyle: {
- normal: {
- label: {
- show: true, //开启显示
- position: 'top', //在上方显示
- textStyle: { //数值样式
- color: '#ccf5f9',
- fontSize: 12
- },
- formatter: '{c}'
- }
- }
- },
- }
- ]
- };
- //实时曲线
- var x_data = [['00:00','01:00','02:00','03:00','04:00','05:00'],['06:00','07:00','08:00','09:00','10:00','11:00'],['12:00','13:00','14:00','15:00','16:00','17:00'],['18:00','19:00','20:00','21:00','22:00','23:00']];
- option_ssqx = {
-
- tooltip: {
- trigger: 'axis',
- formatter: "{a} <br/>{c} {b}"
-
- },
- color:['#ef1a0f','#0fc6ef'],
- legend: {
- data:['温度','湿度'],
- selectedMode: 'single',
- textStyle:{
- color:"#fff",
- fontSize:14
- },
- top:10,
- selected:{
- '温度':true,
- '湿度':false
- }
- },
- grid:{
- x:"10%",
- y:"10%",
- x2:"10%",
- y2:"10%",
-
- },
- xAxis: {
- type: 'category',
- data: x_data[0],
- axisLine: {
- show: true,
- lineStyle: {
- type: 'solid',
- color: '#69F8FE',//左边线的颜色
- width:'1'//坐标线的宽度
- }
- },
- axisTick:{
- alignWithLabel:true
- }
- },
- yAxis: {
- type: 'value',
- boundaryGap: ['20%', '20%'],
- max: function(value) {
- return value.max + 20;
- },
- axisLine: {
- show: true,
- lineStyle: {
- type: 'solid',
- color: '#69F8FE',//左边线的颜色
- width:'1'//坐标线的宽度
- }
- },
- splitLine:{
- lineStyle: {
- type: 'solid',
- color: '#69F8FE',//左边线的颜色
- width:'1'//坐标线的宽度
- }
- }
- },
- series: [
- {
- name:'温度',
- type:'line',
-
- smooth: true,
- data:[],
-
- lineStyle:{
- normal:{
- color:'#ef1a0f'
- }
- }
-
- },
- {
- name:'湿度',
- type:'line',
-
- smooth: true,
- data:[ ],
- lineStyle:{
- normal:{
- color:'#0fc6ef'
- }
- }
-
- }
- ]
- };
- if (option_snhjsj && typeof option_snhjsj === "object") {
-
- myChart_snhjsj.setOption(option_snhjsj, true);
- }
- if (option_ssqx && typeof option_ssqx === "object") {
- myChart_ssqx.setOption(option_ssqx, true);
- }
- //s实时曲线自动切换
- var j = 0;//当前显示曲线
-
- function changeSsqx(){
- var selectLine = {};
- var ssqx_option = option_ssqx;
- var nums = ssqx_option.legend.data.length;
- ++j;
- if(j == nums){
- j = 0;
- };
- for(var i=0;i<nums;i++){ //legend中data的值,上面是写死的值,做自动切换时不要写死
- if(j==i){
- selectLine[ssqx_option.legend.data[i]] = true;
- }else{
- selectLine[ssqx_option.legend.data[i]] = false;
- }
- }
-
- myChart_ssqx.clear();
- ssqx_option.legend.selected = selectLine;
-
- //ssqx_option.xAxis.data = x_data[j];
- myChart_ssqx.setOption(ssqx_option, true);
-
- }
- myChart_ssqx.on("legendselectchanged", obj => {
-
- var nums = option_ssqx.legend.data.length;
- for(var i=0;i<nums;i++){ // this.legendData是legend中data的值,上面是写死的值,做自动切换时不要写死
- if(obj.name==option_ssqx.legend.data[i]){
- j=i;
- }
- }
-
- });
- var t1 = window.setInterval("changeSsqx()",4000);
- $('#chart-ssqx').mouseover(function(){
- window.clearInterval(t1);//去掉定时器
- })
- $('#chart-ssqx').mouseout(function(){
- t1 = window.setInterval("changeSsqx()",4000);
- })
-
- //首页数据配置
- var indexDataSetParam = {
- id:3
- };
- var indexDataSetUrl = "/publics/sysconf/get";
- getData(indexDataSetUrl,indexDataSetParam).then(res => {
- var data = JSON.parse(res.conf.data);
- var len = data.length;
- for(var i=0;i<len;++i){
- $('.brief>.line2 .item').eq(i).find(".title").text(data[i].key+":");
- $('.brief>.line2 .item').eq(i).find(".number").text(data[i].val);
- }
- })
-
- //工作看板
- var warkDataSetParam = {
- id:30002
- };
- getData(indexDataSetUrl,warkDataSetParam).then(res => {
- var data = JSON.parse(res.conf.data);
- var len = data.length;
- for(var i=0;i<len;++i){
- $('.right2 .item').eq(i).find(".title").text(data[i].key);
- $('.right2 .item').eq(i).find(".num").text(data[i].val);
- }
- })
-
-
- //行业新闻
- var newsDataSetParam = {
- id:30003
- };
- getData(indexDataSetUrl,newsDataSetParam).then(res => {
- var data = JSON.parse(res.conf.data);
- var len = data.length;
- var html = "";
- for(var i=0;i<len;++i){
- html+='<div class="news-item"><div class="news-title">'+data[i].key+'</div><div class="news-content">'+data[i].val+'</div></div>'
-
- }
- $("#news-list").html(html);
- })
-
- //报警信息
- var alarmParam = {
- limit:20
- };
-
- var alarmUrl = "/analyse/hm/device/warning-list";
- getData(alarmUrl,alarmParam,"GET").then(res => {
- //console.log(res)
- var data =res;
- var len = data.length;
- var html = "";
- for(var i=0;i<len;++i){
- html+='<div class="msg"><img src="images/warning.png" />'+data[i].message+'</div>'
-
- }
- $("#alarmList").html(html);
- })
-
- //区域信息
- var areaParam = {
- code:"area-info",
- hasSub:true
- };
-
- var areaUrl = "/publics/treenode/getTreeByCode";
-
- var getTempUrl = "/device/device-mount-point/get-by-areaId";
- var hasTempArr = [2,5,6,8,13,21,24,26,33,39,42,59,60,63,64];
- var hasVideoArr = [1,2,4,5,10,11,13,14,21,24,26,33,34,42,45,46,47,48];
- //获取某个区域当前温湿度
- //areaId
- //n:地图上的索引
- //t:下方滚动的位置索引
- function getDevice(areaId,n,i=0){
- var getdeviceParam = {
- areaId:areaId,
-
- };
-
- var getdeviceUrl = "/device/device-mount-point/get-by-areaId";
- getData(getdeviceUrl,getdeviceParam,"GET").then(res => {
- //console.log(i,res)
- console.log(n,res)
- var r = res.length;
- //if(hasTempArr.indexOf(n)>=0){
- for(var j = 0;j<r;++j){
-
- if((res[j].categoryId=="738712669431533568" || res[j].categoryId=="738712714163785728" )&& res[j].data!=undefined){
- //监测设备
-
- $(".single .list li.buildEnv-"+i+" .temp").text(res[j].data.temperature)
- $(".single .list li.buildEnv-"+i+" .humi").text(res[j].data.humidity)
- $(".single .list li.buildEnv-"+i).attr("device-id",res[j].deviceId);
- return;
- }
- }
- //}
- })
- }
- function getVideoDevice(areaId,n){
- var getdeviceParam = {
- areaId:areaId,
-
- };
-
- var getdeviceUrl = "/device/device/listByAreaId";
- getData(getdeviceUrl,getdeviceParam,"GET").then(res => {
- //console.log(i,res)
- console.log(n,res)
- var r = res.length;
- //if(hasTempArr.indexOf(n)>=0){
- for(var j = 0;j<r;++j){
- if(res[j].categoryId=="738713612176855040"){
- //监控设备
- $("#buildmap area").eq(n).attr("channel-data",res[j].meta.channel);
- return;
-
- }
-
- }
- //}
- })
- }
-
- getData(areaUrl,areaParam).then(res => {
- //console.log(res)
- var buildinfo = res.childs;
- var areaLen = buildinfo.length;
- var h = "";
- var t = 0;
- for(var i=0;i<areaLen;++i){
- var k=0;//k表示area标签的索引
- if(buildinfo[i].nodeName=="1牧区"){
- k=0;
- }else if(buildinfo[i].nodeName=="2牧区"){
- k=10;
- }else if(buildinfo[i].nodeName=="3牧区"){
- k=20;
- }else if(buildinfo[i].nodeName=="4牧区"){
- k=33;
- }else if(buildinfo[i].nodeName=="5牧区"){
- k=41;
- }else if(buildinfo[i].nodeName=="新区保育"){
- k=47;
- }else if(buildinfo[i].nodeName=="天地猪舍"){
- /*$("#buildmap area").eq(49).attr("title",buildinfo[i].nodeName)
- $("#buildmap area").eq(49).attr("data-nodeId",buildinfo[i].id)
- h+='<li class="buildEnv-'+t+'" build-index="'+t+'">'
- h+='<div class="leftbar"><div class="room_num">'+buildinfo[i].nodeName+'</div></div>'
- h+='<div class="cont"><div class="line"><img src="images/temp-1.png" alt="">温度:<span class="temp">0</span>℃</div>'
- h+='<div class="line"><img src="images/humidity.png" alt="">湿度:<span class="humi">0</span>RH</div></div></li>'
- //获取当前温湿度
- //
- getDevice(buildinfo[i].id,49,t)
- ++t;*/
- continue;
- }else{
- continue;
- }
- var l = buildinfo[i].childs.length;
-
- for(var j=0;j<l;++j){
- var n = k+j;
- if(k==0 && n>=10) break;//特殊处理
- if(k==10 && n>=20) break;//特殊处理
- if(k==20 && n>=33) break;//特殊处理
- if(k==33 && n>=41) break;//特殊处理
- $("#buildmap area").eq(n).attr("title",buildinfo[i].childs[j].nodeName)
- $("#buildmap area").eq(n).attr("data-nodeId",buildinfo[i].childs[j].id)
- if(hasTempArr.indexOf(n)>=0){
- console.log(n)
- h+='<li class="buildEnv-'+t+'" build-index="'+t+'">'
- h+='<div class="leftbar"><div class="room_num">'+buildinfo[i].childs[j].nodeName+'</div></div>'
- h+='<div class="cont"><div class="line"><img src="images/temp-1.png" alt="">温度:<span class="temp">0</span>℃</div>'
- h+='<div class="line"><img src="images/humidity.png" alt="">湿度:<span class="humi">0</span>RH</div></div></li>';
- console.log('我的',buildinfo[i].childs[j])
- getDevice(buildinfo[i].childs[j].id,n,t)
- //下方的轮播自增
- ++t;
- //console.log(buildinfo[i].childs[j].nodeName)
- }
- if(hasVideoArr.indexOf(n)>=0){
- getVideoDevice(buildinfo[i].childs[j].id,n)
- //下方的轮播自增
-
- }
- }
- }
- $(".single .list").html(h);
- var single = $('.single').mySingleScroll({
- speed: 2000
- });
- })
- </script>
- <script src="js/scrollBar.js" type="text/javascript"></script>
- <script>
- $('.warning-msg').scrollBar({
- barWidth: 5, //滚动条的宽度(这里根据需要写数值即可,不设置是10,即默认10px)
- position: "y", //写“x”代表只出水平滚动条,写“y”表示只出垂直滚动条,写“x,y”则出水平和垂直滚动条(只有在内容超出容器时才出现滚动条)
- wheelDis: 24 //滚轮滚动一次向下或向上滚动的距离,默认是15,可根据需要修改数值
- })
- $('#news-list').scrollBar({
- barWidth: 5, //滚动条的宽度(这里根据需要写数值即可,不设置是10,即默认10px)
- position: "y", //写“x”代表只出水平滚动条,写“y”表示只出垂直滚动条,写“x,y”则出水平和垂直滚动条(只有在内容超出容器时才出现滚动条)
- wheelDis: 24 //滚轮滚动一次向下或向上滚动的距离,默认是15,可根据需要修改数值
- })
-
-
- </script>
- <script type="text/javascript" src="js/index.js"></script>
- <body>
- </html>
|