12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title></title>
- <link rel="stylesheet" type="text/css" href="css/main.css">
- <link rel="stylesheet" type="text/css" href="css/jquery-ui.css">
- </head>
- <body onclick="$('#imp_item,#date_select,#day_select').hide();$('#search_result').html('').hide();$('#search input').val('')">
- <div id="loading_a1"></div>
- <div id="loading">正在加载模型中...</div>
- <div for="FAC" id="top" class="top topfac">
- <div title="返回主视图"
- style="cursor: pointer;position: absolute;right: 10px;top: 25px;height: 38px;width: 38px;text-align: center;"
- onclick="backMasterView()"><img src="image/view.png"></div>
- </div>
- <div for="IN03" id="top" class="top top03 hideDiv">
- <div title="返回主视图"
- style="cursor: pointer;position: absolute;right: 10px;top: 25px;height: 38px;width: 38px;text-align: center;"
- onclick="backMasterView()"><img src="image/view.png"></div>
- </div>
- <div for="IN02" id="top" class="top top02 hideDiv">
- <div id="maogao_btn" title=""
- style="cursor: pointer;position: absolute;right: 176px;top: 25px;height: 38px;width: 38px;"><IMG
- src="image/menu1.png"></div>
- <div id="autoplayer_btn" title="切换自动漫游"
- style="cursor: pointer;position: absolute;right: 120px;top: 25px;height: 38px;width: 38px;"><IMG
- src="image/auto3d_stop.png"></div>
- <div id="imp_btn" title="导出数据"
- style="cursor: pointer;position: absolute;right: 65px;top: 25px;height: 38px;width: 38px;"><IMG
- src="image/imp_icon.png"></div>
- <div title="返回主视图"
- style="cursor: pointer;position: absolute;right: 10px;top: 25px;height: 38px;width: 38px;text-align: center;"
- onclick="backMasterView()"><img src="image/view.png"></div>
- </div>
- <div for="IN02" id="imp_item">
- <div itemcode="1"><span>生产数据</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="2"><span>停机原因</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="4"><span>断纱分析</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="3"><span>并发叫料分析</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="5"><span>并发下卷分析</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="6"><span>告警分析</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="7"><span>平方米克重</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="8"><span>送经量</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="9"><span>纱线规格</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="10"><span>生产绩效日报</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="11"><span>生产绩效月报</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="12"><span>车间能耗日报</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <div itemcode="13"><span>车间能耗月报</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
- <!-- <div itemcode="1"><span>最近7天</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>-->
- <!-- <div itemcode="2"><span>自定义日期</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>-->
- </div>
- <div for="IN02" id="date_select">
- <div class="triangle"></div>
- <div style="margin-top: 5px;">
- <label for="datepicker1">开始:</label>
- <input type="text" id="datepicker1" readonly="readonly" style="pointer-events: none;">
- </div>
- <div style="margin-top: 5px;" class="hourPointSelect">
- <select id="hourP1" style="margin-left: 45px;width: 173px;border-radius: 4px;height: 24px;"></select>
- </div>
- <div style="margin-top: 5px;">
- <label for="datepicker2">结束:</label>
- <input type="text" id="datepicker2" readonly="readonly" style="pointer-events: none;">
- </div>
- <div style="margin-top: 5px;" class="hourPointSelect">
- <select id="hourP2" style="margin-left: 45px;width: 173px;border-radius: 4px;height: 24px;"></select>
- </div>
- <div style="margin-top: 5px;" class="hourAreaSelect">
- <label>时间:</label>
- <select id="hour1" style="margin-left: 5px;width: 63px;"></select>
- <label>到</label>
- <select id="hour2" style="width: 63px;"></select>
- </div>
- <div style="margin-top: 5px; display: none;">
- <span>设备:</span><input id="imp_devcode" type="text" placeholder="设备编号" maxlength="4"
- style="width: 140px;margin-left: 8px;font-size: 12px;">
- </div>
- <div class="dateSelected_ok">
- <button type=button>确定</button>
- </div>
- </div>
- <div for="IN02" id="day_select">
- <div class="triangle"></div>
- <div style="margin-top: 5px;">
- <label for="datepicker1">产能预期天数:</label>
- <input type="text" id="prev_day" style="width: 50%;" imeMode="disabled" value="7" maxlength="2" placeholder="请输入小于61的正整数">
- </div>
- <div class="daySelected_ok">
- <button type=button>确定</button>
- </div>
- </div>
- <div for="IN02" id="search" class="hideDiv"><input type="text" placeholder="请输入设备编号" maxlength="4"><img
- style="position: absolute;top: 20%;right: 5px;" src="image/search_icon.png" class="search_btn"></div>
- <div id="search_result"></div>
- <!-- 添加呈现的video标签或img标签,并设置必要的css来控制其大小 -->
- <video id="EngineContent" autoplay muted style="width: 1920px;height:1080px;">浏览器不支持</video>
- <!-- <img id="EngineContent"></img> -->
- <div for="IN02" id="dev_state" class="hideDiv" show="设备状态">
- <div class="title"></div>
- <div class="content">
- <div style="float: left;width: 100%;margin-top: 10px;">
- <div title="设备总数"
- style="float: left;width: 45%;margin-left: 4%;background: linear-gradient( 89deg, rgba(33,62,117,0.8) 0%, rgba(33,62,117,0) 100%);">
- <img src="image/total_icon.png" style="float: left;width: 58px;">
- <span style="float: left;font-weight: 500;font-size: 15px;color: #9ED1FF;line-height: 22px;text-align: left;width: 60%;margin-left: 5%;">设备总数</span>
- <span id="dev_state_total"
- style="float: left;font-family: Bebas Neue, Bebas Neue;font-weight: 400;font-size: 30px;line-height: 30px;text-align: left;font-style: normal;text-transform: none;margin-left: 5%;color: #FFFFFF;">130</span>
- <span style="float: left;font-size: 22px;color: #49A8FF;">(台)</span>
- </div>
- <div title="运行数量"
- style="float: left;width: 45%;margin-left: 4%;background: linear-gradient( 89deg, rgba(33,62,117,0.8) 0%, rgba(33,62,117,0) 100%);cursor: pointer;"
- onclick="window.open(SERVER_URL + '/export/stop')">
- <img src="image/total_icon.png" style="float: left;width: 58px;">
- <span style="float: left;font-weight: 500;font-size: 15px;color: #9ED1FF;line-height: 22px;text-align: left;width: 60%;margin-left: 5%;">运行数量</span>
- <span id="dev_state_runtotal"
- style="float: left;font-family: Bebas Neue, Bebas Neue;font-weight: 400;font-size: 30px;line-height: 30px;text-align: left;font-style: normal;text-transform: none;margin-left: 5%;color: #FFFFFF;">45</span>
- <span style="float: left;font-size: 22px;color: #49A8FF;">(台)</span>
- </div>
- </div>
- <div class="stat" style="float: left;width: 100%;margin-top: 10px;">
- <div title="落米停机数" style="float: left;width: 33%;color: #FFB342;">
- <img src="image/t1.png" style="float: left;width: 40px;">
- <span class="number" attr="stop6"
- style="float: left;font-family: Bebas Neue, Bebas Neue;font-weight: 400;font-size: 20px;line-height: 30px;text-align: left;font-style: normal;text-transform: none;margin-left: 1%;">-</span>
- <span style="float: left;font-size: 15px;margin-top: 6px;">(台)</span>
- <span style="float: left;font-weight: 500;font-size: 14px;color: #FFFFFF;line-height: 22px;text-align: left;width: 65%;margin-left: 1%;">落米停机数</span>
- </div>
- <div title="断纱停机数" style="float: left;width: 33%;color: #FFB342;">
- <img src="image/t1.png" style="float: left;width: 40px;">
- <span class="number" attr="stop2"
- style="float: left;font-family: Bebas Neue, Bebas Neue;font-weight: 400;font-size: 20px;line-height: 30px;text-align: left;font-style: normal;text-transform: none;margin-left: 1%;color: #FFB342;">-</span>
- <span style="float: left;font-size: 15px;margin-top: 6px;">(台)</span>
- <span style="float: left;font-weight: 500;font-size: 14px;color: #FFFFFF;line-height: 22px;text-align: left;width: 65%;margin-left: 1%;">断纱停机数</span>
- </div>
- <div title="停经片停机数" style="float: left;width: 33%;color: #FFB342;">
- <img src="image/t1.png" style="float: left;width: 40px;">
- <span class="number" attr="stop1"
- style="float: left;font-family: Bebas Neue, Bebas Neue;font-weight: 400;font-size: 20px;line-height: 30px;text-align: left;font-style: normal;text-transform: none;margin-left: 1%;color: #FFB342;">-</span>
- <span style="float: left;font-size: 15px;margin-top: 6px;">(台)</span>
- <span style="float: left;font-weight: 500;font-size: 14px;color: #FFFFFF;line-height: 22px;text-align: left;width: 65%;margin-left: 1%;">停经片停机数</span>
- </div>
- <div title="叫料数" style="float: left;width: 33%;margin-top: 7px;color: #FFB342;">
- <img src="image/t1.png" style="float: left;width: 40px;">
- <span class="number" attr="stop8"
- style="float: left;font-family: Bebas Neue, Bebas Neue;font-weight: 700;font-size: 22px;line-height: 30px;text-align: left;font-style: normal;text-transform: none;margin-left: 1%;color: red;">-</span>
- <span style="float: left;font-size: 15px;margin-top: 6px;">(台)</span>
- <span style="float: left;font-weight: 500;font-size: 14px;color: #FFFFFF;line-height: 22px;text-align: left;width: 65%;margin-left: 1%;">叫料数</span>
- </div>
- <div title="其他停机数" style="float: left;width: 33%;margin-top: 7px;color: #FFB342;">
- <img src="image/t1.png" style="float: left;width: 40px;">
- <span class="number" attr="alarm"
- style="float: left;font-family: Bebas Neue, Bebas Neue;font-weight: 700;font-size: 22px;line-height: 30px;text-align: left;font-style: normal;text-transform: none;margin-left: 1%;color: red;">-</span>
- <span style="float: left;font-size: 15px;margin-top: 6px;">(台)</span>
- <span style="float: left;font-weight: 500;font-size: 14px;color: #FFFFFF;line-height: 22px;text-align: left;width: 65%;margin-left: 1%;">其他停机数</span>
- </div>
- <div title="盘头小于200圈" style="float: left;width: 33%;margin-top: 7px;color: #FFB342;">
- <img src="image/t1.png" style="float: left;width: 40px;">
- <span class="number" attr="stopPan"
- style="float: left;font-family: Bebas Neue, Bebas Neue;font-weight: 700;font-size: 22px;line-height: 30px;text-align: left;font-style: normal;text-transform: none;margin-left: 1%;color: red;">-</span>
- <span style="float: left;font-size: 15px;margin-top: 6px;">(台)</span>
- <span style="float: left;font-weight: 500;font-size: 12px;color: #FFFFFF;line-height: 22px;text-align: left;width: 65%;margin-left: 1%;">盘头小于200圈</span>
- </div>
- <div title="开机率" style="float: left;width: 33%;margin-top: 7px;color: #FFB342;">
- <img src="image/t1.png" style="float: left;width: 40px;">
- <span class="runningRatio" style="float: left;font-family: Bebas Neue, Bebas Neue;font-weight: 700;font-size: 22px;line-height: 30px;text-align: left;font-style: normal;text-transform: none;margin-left: 1%;color: red;">-</span>
- <span style="float: left;font-size: 15px;margin-top: 6px;">(%)</span>
- <span style="float: left;font-weight: 500;font-size: 12px;color: #FFFFFF;line-height: 22px;text-align: left;width: 65%;margin-left: 1%;">开机率</span>
- </div>
- </div>
- </div>
- </div>
- <div for="IN02" id="dev_alarm" class="hideDiv" show="当前告警" style="color: #ffffff;font-size: 14px;">
- <div class="title">当前无告警</div>
- <div class="content">
- <table style="width: 100%;font-weight: bold;" cellspacing=0>
- <thead>
- <tr>
- <td style="width: 30%">设备编号</td>
- <td style="width: 70%">告警类型</td>
- </tr>
- </thead>
- </table>
- <div style="height: 128px;width: 100%;overflow: hidden;">
- <table id="dev_alarm_list" style="width: 100%;background: rgba(25,57,103,0.3);" cellspacing=0>
- <tbody>
- <tr>
- <td style="width: 30%;color:red">-</td>
- <td style="width: 70%">-</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div style="margin-top: 15px;">
- <div style="text-align: center;"><img src="image/alarm_txt.png"></div>
- <div class="echarts_alarm" id="echarts_alarm" style="height: 122px;width: 100%;">
- </div>
- </div>
- </div>
- </div>
- <div for="IN02" id="dev_stop" class="hideDiv" show="停机原因" style="color: #ffffff;font-size: 14px;">
- <div class="title">当前无机器停机</div>
- <div class="content">
- <div style="margin-top: 15px;">
- <div class="echarts_stop" id="echarts_stop" style="height: 190px;width: 100%;">
- </div>
- </div>
- </div>
- </div>
- <div for="IN02" id="dev_xiaolv" class="hideDiv" show="生产效率" style="color: #ffffff;font-size: 14px;">
- <div class="title"></div>
- <div class="content">
- <div style="">
- <div style="text-align: center;font-size: 16px;margin:16px 0;">今日产量</div>
- <div style="text-align: center;">
- <span style="width: 160px;text-align: center;display: inline-block;height: 32px;line-height: 32px;margin: 0 12px;padding: 5px;"><span
- id="totay1" style="font-size: 30px">-</span><span
- style="color: #9ED1FF;font-size: 16px">(米)</span></span>
- <span style="width: 128px;text-align: center;display: inline-block;height: 32px;line-height: 32px;margin: 0 12px;padding: 5px;"><span
- id="totay2" style="font-size: 30px">-</span><span
- style="color: #9ED1FF;font-size: 16px">(吨)</span></span>
- </div>
- </div>
- <div style="max-height: 96px;width: 100%;overflow: hidden;margin-top: 25px;">
- <table style="width: 100%;" cellspacing=0>
- <thead>
- <tr>
- <td style="width: 10%">班组</td>
- <td style="width: 25%">生产时间(H)</td>
- <td style="width: 25%">已织造数(米)</td>
- <td style="width: 20%">总重量(T)</td>
- <td style="width: 20%">稼动率(%)</td>
- </tr>
- </thead>
- <tbody>
- <tr id="scxl_a">
- <td style="width: 10%;color: #9ED1FF">A组</td>
- <td style="width: 25%;font-size: 18px;font-weight: bold;">12</td>
- <td style="width: 25%;font-size: 18px;font-weight: bold;">12000</td>
- <td style="width: 20%;font-size: 18px;font-weight: bold;">5.4</td>
- <td style="width: 20%;font-size: 18px;font-weight: bold;">100</td>
- </tr>
- <tr id="scxl_b">
- <td style="width: 10%;color: #9ED1FF">B组</td>
- <td style="width: 25%;font-size: 18px;font-weight: bold;">6</td>
- <td style="width: 25%;font-size: 18px;font-weight: bold;">2000</td>
- <td style="width: 20%;font-size: 18px;font-weight: bold;">1.2</td>
- <td style="width: 20%;font-size: 18px;font-weight: bold;">43</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div for="IN02" id="dev_jiadonglv" class="hideDiv" show="稼动率周曲线" style="color: #ffffff;font-size: 14px;">
- <div class="title"></div>
- <div class="content">
- <div style="margin-top: 15px;">
- <div class="echarts_jiadonglv" id="echarts_jiadonglv" style="height: 142px;width: 100%;">
- </div>
- </div>
- </div>
- </div>
- <div for="IN02" id="dev_sc_qushi" class="hideDiv" show="生产趋势" style="color: #ffffff;font-size: 14px;">
- <div class="title"></div>
- <div class="content">
- <div style="margin-top: 15px;">
- <div class="echarts_sc_qushi" id="echarts_sc_qushi" style="height: 142px;width: 100%;">
- </div>
- </div>
- </div>
- </div>
- <div for="IN02" id="dev_used_qushi" class="hideDiv" show="能耗趋势" style="color: #ffffff;font-size: 14px;">
- <div class="title"></div>
- <div class="content">
- <div style="margin-top: 15px;">
- <div class="echarts_used_qushi" id="echarts_used_qushi" style="height: 142px;width: 100%;">
- </div>
- </div>
- </div>
- </div>
- <div id="nodevice" class="showinfo">
- <div class="title">
- <img src="image/title_icon.png" style="margin: 7px;float: left;">
- <span class="text">基本信息</span>
- <img src="image/Close.png" style="margin: 7px;float: right;cursor: pointer;" onclick="HideInfo()">
- </div>
- <div class="content" style="text-align: center;margin-top: 150px;font-size: 24px;color: orange;"></div>
- </div>
- <div id="showinfo" class="showinfo">
- <div class="title">
- <img src="image/title_icon.png" style="margin: 7px;float: left;">
- <span class="text">基本信息</span>
- <img src="image/Close.png" style="margin: 7px;float: right;cursor: pointer;" onclick="HideInfo()">
- </div>
- <div class="content">
- <div>
- <table style="width: 100%;text-align: center;" cellspacing="0" cellpadding="0">
- <tbody>
- <tr>
- <td colspan="10" style="font-size: 20px;font-weight: bold;color: #7d7d7d;padding: 5px 0;">剩余时间
- </td>
- </tr>
- <tr>
- <td>GB1(分)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB2(分)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB3(分)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB4(分)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB5(分)</td>
- </tr>
- <tr style="color: #FFFFFF;font-size: 20px;">
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div>
- <table style="width: 100%;text-align: center;" cellspacing="0" cellpadding="0">
- <tbody>
- <tr>
- <td colspan="10" style="font-size: 20px;font-weight: bold;color: #7d7d7d;padding: 5px 0;">
- 盘头剩余周长
- </td>
- </tr>
- <tr>
- <td>GB1(mm)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB2(mm)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB3(mm)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB4(mm)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB5(mm)</td>
- </tr>
- <tr style="color: #FFFFFF;font-size: 20px;">
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div>
- <table style="width: 100%;text-align: center;" cellspacing="0" cellpadding="0">
- <tbody>
- <tr>
- <td colspan="10" style="font-size: 20px;font-weight: bold;color: #7d7d7d;padding: 5px 0;">
- 盘头剩余圈数
- </td>
- </tr>
- <tr>
- <td>GB1(圈)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB2(圈)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB3(圈)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB4(圈)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB5(圈)</td>
- </tr>
- <tr style="color: #FFFFFF;font-size: 20px;">
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div>
- <table style="width: 100%;text-align: center;" cellspacing="0" cellpadding="0">
- <tbody>
- <tr>
- <td colspan="10" style="font-size: 20px;font-weight: bold;color: #7d7d7d;padding: 5px 0;">
- 盘头剩余比例
- </td>
- </tr>
- <tr>
- <td>GB1(%)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB2(%)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB3(%)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB4(%)</td>
- <td rowspan="2" class="td_splitLine"></td>
- <td>GB5(%)</td>
- </tr>
- <tr style="color: #FFFFFF;font-size: 20px;">
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div id="newwin" class="newwin">
- <div class="title"><img src="image/title_icon.png" style="margin: 7px;float: left;"><span class="text"></span><span
- class="text">#经编机-详细数据</span><img src="image/Close.png"
- style="margin: 7px;float: right;cursor: pointer;"
- onclick="CloseWin()"></div>
- <div class="content">
- <div style="text-align: center;"><span class="btn btn_active" style="margin-left: -220px;">告警</span><span
- class="btn">产能</span><span class="btn">产线及设备</span><span class="btn">配方</span><span
- class="btn">设备履历</span></div>
- <div class="dataContent">
- <div style="padding: 15px;display: none;width: 100%">
- <div class="no_alarm">当前无告警</div>
- <div class="has_alarm"></div>
- <div class="dev_alarm_echarts"></div>
- </div>
- <div style="padding: 15px;width: 100%">
- <div style="float: left;width: 25%;margin-right: 2%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="background-color: #415683;height: 40px;">
- <td colspan="4">班组生产状态</td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="4"></td>
- </tr>
- <tr>
- <td rowspan="2" width="20%">当前产量</td>
- <td rowspan="2" style="color: #817e7e">|</td>
- <td width="20%">A组</td>
- <td style="text-align: right;padding-right: 10px;" width="50%" class="value"
- attr="Capacity_data_39" unit="米">-
- </td>
- </tr>
- <tr>
- <td>B组</td>
- <td style="text-align: right;padding-right: 10px;" width="50%" class="value"
- attr="Capacity_data_44" unit="米">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="4"></td>
- </tr>
- <tr>
- <td rowspan="2" width="20%">开机时间</td>
- <td rowspan="2" style="color: #817e7e">|</td>
- <td width="20%">A组</td>
- <td style="text-align: right;padding-right: 10px;" width="50%" class="value"
- attr="Capacity_data_37" unit="H">-
- </td>
- </tr>
- <tr>
- <td>B组</td>
- <td style="text-align: right;padding-right: 10px;" width="50%" class="value"
- attr="Capacity_data_42" unit="H">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="4"></td>
- </tr>
- <tr>
- <td rowspan="2" width="20%">停机时间</td>
- <td rowspan="2" style="color: #817e7e">|</td>
- <td width="20%">A组</td>
- <td style="text-align: right; padding-right: 10px;" width="50%" class="value"
- attr="Capacity_data_38" unit="H">-
- </td>
- </tr>
- <tr>
- <td>B组</td>
- <td style="text-align: right;padding-right: 10px;" width="50%" class="value"
- attr="Capacity_data_43" unit="H">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="4"></td>
- </tr>
- <tr>
- <td rowspan="2" width="20%">停机率</td>
- <td rowspan="2" style="color: #817e7e">|</td>
- <td width="20%">A组</td>
- <td style="text-align: right; padding-right: 10px;" width="50%" class="value"
- attr="Capacity_data_40" unit="%">-
- </td>
- </tr>
- <tr>
- <td>B组</td>
- <td style="text-align: right;padding-right: 10px;" width="50%" class="value"
- attr="Capacity_data_45" unit="%">-
- </td>
- </tr>
- </table>
- </div>
- <div style="float: left;width: 25%;margin-right: 2%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="background-color: #415683;height: 40px;">
- <td colspan="3">当前设备生产状态</td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 100px">
- <td>主轴运行转速</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="60%" class="value"
- attr="Capacity_data_1" unit="转/分钟">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 100px">
- <td>已织造米数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="60%" class="value"
- attr="Capacity_data_2" unit="米">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 100px">
- <td>剩余落布时间</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="60%" class="value"
- attr="Capacity_data_3" unit="H">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 100px">
- <td>设定落布米数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="60%" class="value"
- attr="Capacity_data_4" unit="米">-
- </td>
- </tr>
- </table>
- </div>
- <div style="float: left;width: 44%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="background-color: #415683;height: 40px;">
- <td colspan="6">供电</td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="6"></td>
- </tr>
- <tr style="height: 80px">
- <td width="20%">AB相电压监控</td>
- <td style="color: #817e7e">|</td>
- <td width="20%" class="value" attr="Capacity_data_24" unit="U">-</td>
- <td width="20%">C相电流监控</td>
- <td style="color: #817e7e">|</td>
- <td width="20%" style="text-align: right;padding-right: 10px;" class="value"
- attr="Capacity_data_29" unit="V">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="6"></td>
- </tr>
- <tr style="height: 80px">
- <td width="20%">BC相电压监控</td>
- <td style="color: #817e7e">|</td>
- <td width="20%" class="value" attr="Capacity_data_25" unit="U">-</td>
- <td width="20%">A相功率监控</td>
- <td style="color: #817e7e">|</td>
- <td width="20%" style="text-align: right;padding-right: 10px;" class="value"
- attr="Capacity_data_30" unit="W">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="6"></td>
- </tr>
- <tr style="height: 80px">
- <td width="20%">AC相电压监控</td>
- <td style="color: #817e7e">|</td>
- <td width="20%" class="value" attr="Capacity_data_26" unit="U">-</td>
- <td width="20%">B相功率监控</td>
- <td style="color: #817e7e">|</td>
- <td width="20%" style="text-align: right;padding-right: 10px;" class="value"
- attr="Capacity_data_31" unit="W">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="6"></td>
- </tr>
- <tr style="height: 80px">
- <td width="20%">A相电流监控</td>
- <td style="color: #817e7e">|</td>
- <td width="20%" class="value" attr="Capacity_data_27" unit="V">-</td>
- <td width="20%">C相功率监控</td>
- <td style="color: #817e7e">|</td>
- <td width="20%" style="text-align: right;padding-right: 10px;" class="value"
- attr="Capacity_data_32" unit="W">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="6"></td>
- </tr>
- <tr style="height: 80px">
- <td width="20%">B相电流监控</td>
- <td style="color: #817e7e">|</td>
- <td width="20%" class="value" attr="Capacity_data_28" unit="V">-</td>
- <td width="20%">总功率监控</td>
- <td style="color: #817e7e">|</td>
- <td width="20%" style="text-align: right;padding-right: 10px;" class="value"
- attr="Capacity_data_33" unit="W">-
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div style="padding: 15px;display: none;width: 100%">
- <div style="float: left;width: 23%;margin-right: 2%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="height: 60px">
- <td>断纱检测开关</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="Capacity_data_46" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>断纱检测延时</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="Capacity_data_47" unit="s">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>牵拉罗拉辊周长</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_15" unit="mm">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>卷曲罗拉辊周长</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_16" unit="mm">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>主电机额定转速</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_38" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>主电机额定频率</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_39" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>电机传动比</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_40" unit="">-
- </td>
- </tr>
- </table>
- </div>
- <div style="float: left;width: 23%;margin-right: 2%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="height: 60px">
- <td>GB1减速机减速比</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_17" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB2减速机减速比</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_18" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB3减速机减速比</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_19" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB4减速机减速比</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_20" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB5减速机减速比</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_21" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>牵拉减速机减速比</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_22" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>卷曲减速机减速比</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_23" unit="">-
- </td>
- </tr>
- </table>
- </div>
- <div style="float: left;width: 23%;margin-right: 2%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="height: 60px">
- <td>GB1被动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_24" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB2被动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_25" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB3被动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_26" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB4被动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_27" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB5被动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_28" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>牵拉被动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_29" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>卷曲被动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_30" unit="">-
- </td>
- </tr>
- </table>
- </div>
- <div style="float: left;width: 23%;margin-right: 2%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="height: 60px">
- <td>GB1主动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_31" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB2主动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_32" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB3主动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_33" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB4主动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_34" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>GB5主动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_35" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>牵拉主动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_36" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 60px">
- <td>卷曲主动齿轮数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_37" unit="">-
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div style="padding: 15px;display: none;width: 100%">
- <div style="float: left;width: 23%;margin-right: 2%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="height: 48px">
- <td>配方号</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="40%" class="value"
- attr="Capacity_data_46" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>机台号</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="40%" class="value"
- attr="Capacity_data_47" unit="">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>米克重</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="40%" class="value"
- attr="System_data_15" unit="g/米">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>L1、L5纱线规格D</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="40%" class="value"
- attr="System_data_16" unit="D">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>L2、L4纱线规格D</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="40%" class="value"
- attr="System_data_38" unit="D">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>L3纱线规格D</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="40%" class="value"
- attr="System_data_39" unit="D">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>L1、L5纱线规格F</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="40%" class="value"
- attr="System_data_40" unit="F">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>L2、L4纱线规格F</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="40%" class="value"
- attr="System_data_40" unit="F">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>L3纱线规格F</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="40%" class="value"
- attr="System_data_40" unit="F">-
- </td>
- </tr>
- </table>
- </div>
- <div style="float: left;width: 23%;margin-right: 2%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="height: 48px">
- <td>L1、L5盘头根数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_17" unit="根">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>L2、L4盘头根数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_18" unit="根">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>L3盘头根数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_19" unit="根">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>卷曲幅宽</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_20" unit="m">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>下布长度</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_21" unit="m">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>毛高</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_22" unit="m">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>成片长</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_23" unit="m">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>成品宽</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_23" unit="m">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>成品重</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_23" unit="kg">-
- </td>
- </tr>
- </table>
- </div>
- <div style="float: left;width: 23%;margin-right: 2%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="height: 48px">
- <td>GB1送经量</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_24" unit="mm/腊克">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB2送经量</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_25" unit="mm/腊克">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB3送经量</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_26" unit="mm/腊克">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB4送经量</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_27" unit="mm/腊克">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB5送经量</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_28" unit="mm/腊克">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>奉拉密度</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_29" unit="r/cm">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>卷曲张力系数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_30" unit="%">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB1盘头最大圈数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_30" unit="r">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB2盘头最大圈数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_30" unit="r">-
- </td>
- </tr>
- </table>
- </div>
- <div style="float: left;width: 23%;margin-right: 2%;">
- <table cellspacing="0" cellpadding="0">
- <tr style="height: 48px">
- <td>GB3盘头最大圈数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_31" unit="r">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB4盘头最大圈数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_32" unit="r">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB5盘头最大圈数</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_33" unit="r">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB1盘头最大外周长</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_34" unit="mm">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB2盘头最大外周长</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_35" unit="mm">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB3盘头最大外周长</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_36" unit="mm">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB4盘头最大外周长</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_37" unit="mm">-
- </td>
- </tr>
- <tr style="height: 1px;background-color: #5F6E8D;">
- <td colspan="3"></td>
- </tr>
- <tr style="height: 48px">
- <td>GB5盘头最大外周长</td>
- <td style="color: #817e7e">|</td>
- <td style="text-align: right;padding-right: 10px;" width="45%" class="value"
- attr="System_data_37" unit="mm">-
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div style="padding: 15px;display: none;width: 100%">
- <img src="image/dev_log.png" style="width: 1300px;height: 459px;display: none;">
- </div>
- </div>
- </div>
- </div>
- <!--毛高占比窗口-->
- <div id="maogaoWin" class="showinfo">
- <div class="title">
- <img src="image/title_icon.png" style="margin: 7px;float: left;">
- <span class="text">生产工艺总览</span>
- <img src="image/Close.png" style="margin: 7px;float: right;cursor: pointer;" onclick="$('#maogaoWin').hide()">
- </div>
- <div class="content">
- <div style="height: 50px;width: 100%;">
- <table style="width: 100%;text-align: center;" cellspacing="0" cellpadding="0">
- <thead>
- <tr style="height: 50px;">
- <td width="33%">毛高</td>
- <td width="1px" style="color: #817e7e">|</td>
- <td width="33%">设备数量</td>
- <td width="1px" style="color: #817e7e">|</td>
- <td width="33%">占比</td>
- </tr>
- </thead>
- </table>
- </div>
- <div style="height: 340px;overflow: auto;width: 100%;">
- <table style="width: 100%;text-align: center;" cellspacing="0" cellpadding="0">
- <tbody>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <!--毛高占比详情窗口-->
- <div id="maogaoDetailWin" class="newwin">
- <div class="title">
- <img src="image/title_icon.png" style="margin: 7px;float: left;">
- <span class="text">生产工艺详情</span>
- <img src="image/Close.png" style="margin: 7px;float: right;cursor: pointer;"
- onclick="$('#maogaoDetailWin').hide()">
- </div>
- <div class="content">
- <div style="position: relative;height: 50px">
- <div id="imp_btn_maogaodetail" title="导出数据"
- style="cursor: pointer;position: absolute;right: 5px;top: 5px;height: 38px;width: 38px;"><IMG
- src="image/imp_icon.png"></div>
- </div>
- <div style="height: 64px;">
- <table style="width: 100%;text-align: center;" cellspacing="0" cellpadding="0">
- <thead>
- <tr style="height: 32px;">
- <td rowspan="2" width="60" style="border-right: 1px solid #76549b !important;">设备名称</td>
- <td rowspan="2" width="60" style="border-right: 1px solid #76549b !important;">机台号</td>
- <td rowspan="2" width="60" style="border-right: 1px solid #76549b !important;">毛高</td>
- <td rowspan="2" width="60" style="border-right: 1px solid #76549b !important;">配方号</td>
- <td rowspan="2" width="60" style="border-right: 1px solid #76549b !important;">米克重</td>
- <td colspan="5" width="300"
- style="border-right: 1px solid #76549b !important;border-bottom: 1px solid #76549b !important;">
- 送经量
- </td>
- <td colspan="3" width="180" style="border-bottom: 1px solid #76549b !important;">线纱规格D</td>
- </tr>
- <tr style="height: 32px;">
- <td width="60" style="border-right: 1px solid #76549b !important;">GB1</td>
- <td width="60" style="border-right: 1px solid #76549b !important;">GB2</td>
- <td width="60" style="border-right: 1px solid #76549b !important;">GB3</td>
- <td width="60" style="border-right: 1px solid #76549b !important;">GB4</td>
- <td width="60" style="border-right: 1px solid #76549b !important;">GB5</td>
- <td width="60" style="border-right: 1px solid #76549b !important;">L1、L5</td>
- <td width="60" style="border-right: 1px solid #76549b !important;">L2、L4</td>
- <td width="60">L3</td>
- </tr>
- </thead>
- </table>
- </div>
- <div style="height: 420px;overflow: auto;">
- <table style="width: 100%;text-align: center;" cellspacing="0" cellpadding="0">
- <tbody>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </body>
- <script type="text/html" id="maogodetail_tpl">
- {{each data}}
- <tr>
- <td width="60">{{$value.device}}</td>
- <td width="60">{{$value.formula_data_2}}</td>
- <td width="60">{{$value.formula_data_15}}</td>
- <td width="60">{{$value.formula_data_1}}</td>
- <td width="60">{{$value.formula_data_3}}</td>
- <td width="60">{{$value.formula_data_19}}</td>
- <td width="60">{{$value.formula_data_20}}</td>
- <td width="60">{{$value.formula_data_21}}</td>
- <td width="60">{{$value.formula_data_22}}</td>
- <td width="60">{{$value.formula_data_23}}</td>
- <td width="60">{{$value.formula_data_4}}</td>
- <td width="60">{{$value.formula_data_5}}</td>
- <td width="60">{{$value.formula_data_6}}</td>
- </tr>
- {{/each}}
- </script>
- </html>
- <!-- 引入qwebchannel.js、Player.js、PlayerUtils.js -->
- <script type="text/javascript" src="jquery-3.4.1.js"></script>
- <script type="text/javascript" src="jquery-ui.min.js"></script>
- <script type="text/javascript" src="echarts.min.js"></script>
- <script src="qwebchannel.js"></script>
- <script src="global.js"></script>
- <script src="Player.js"></script>
- <script src="PlayerUtils.js"></script>
- <script src="lottie.min.js"></script>
- <script src="Loading.json.js"></script>
- <script src="animation.js"></script>
- <script type="text/javascript" src="template.js"></script>
- <!--本地模拟测试数据,正式部署时需删除该2个js
- <script src="test-data.js"></script>
- <script src="device-data.js"></script>
- -->
- <script>
- lottie.loadAnimation({
- // 选取一个容器,用于渲染动画
- container: $("#loading_a1")[0],
- // 定义JSON文件路径
- animationData: lottiedata,
- // 是否循环播放
- loop: true,
- // 渲染的格式svg/canvas/html,svg性能更优,兼容性更好
- renderer: "svg",
- });
- var currentTargetType="FAC";//当前视图对象类型。FAC:厂房 IN02:2号楼内部 IN03:3号楼内部
- //切换点列表
- var inPoints={
- "IN02":{"Text001_002":1,"x1":-28.07801,"y1":37.95126,"x2":-23.32394,"y2":31.16921},
- "IN03":{"Text001_006":1,"x1":46.86921,"y1":24.87041,"x2":51.91054,"y2":17.87417},
- "IN04":{"Text001_004":1,"x1":-38.46275,"y1":35.65208,"x2":-44.94122,"y2":28.22142},
- "IN05":{"Text001_005":1,"x1":102.43050,"y1":38.96248,"x2":108.99212,"y2":30.86295}
- }
- var sam0023;
- var modelsMap = {}
- var modelsAlarmColorMap = {};
- var MODEL_LOADED = 0; //模型是否加载完成
- var ALARM_DEVS = []; //未提醒的告警设备,将在模型加载完成时提醒
- var OFFLINE_DEVS = {}; //未接入设备列表
- var LoadServerDataTimer = null;
- var zoomCount=0;//放大、缩小次数。为正表示放大次数,为负表示缩小次数
- var DataFill = {
- devStopAutoLoadTimter: null,//停机原因自动切计时器
- devAlarmAutoLoadTimter: null,//告警自动切计时器
- AlarmData: null,
- Pan: null,//盘头数据
- PanAlarm: {},//盘头告警记录
- AlarmType: {
- "1": "GB1伺服通讯故障",
- "2": "GB2伺服通讯故障",
- "3": "GB3伺服通讯故障",
- "4": "GB4伺服通讯故障",
- "5": "GB5伺服通讯故障",
- "6": "牵引伺服通讯故障",
- "7": "卷曲伺服通讯故障",
- "8": "断纱故障",
- "9": "电源故障",
- "10": "联动未完全啮合",
- "11": "米长到达",
- "12": "GB1剩余圈数报警",
- "13": "GB2剩余圈数报警",
- "14": "GB3剩余圈数报警",
- "15": "GB4剩余圈数报警",
- "16": "GB5剩余圈数报警",
- "17": "主轴变频掉线",
- "18": "主轴变频故障",
- "19": "GB1伺服故障",
- "20": "GB2伺服故障",
- "21": "GB3伺服故障",
- "22": "GB4伺服故障",
- "23": "GB5伺服故障",
- "24": "牵引伺服故障",
- "25": "卷曲伺服故障",
- "26": "拍照自停",
- "27": "CCD位置报警信息显示",
- "1000": "", //盘头比例低于20%
- "1001": "", //盘头比例低于50%
- "10001": "停经片停机",
- "10002": "CCD断纱停机",
- "10006": "落布米数到达停机",
- "10008": "叫料停机"
- },
- //告警指示灯颜色
- AlarmColorTypeCode: {
- "1": "FF0000", //红色
- "2": "FF0000",
- "3": "FF0000",
- "4": "FF0000",
- "5": "FF0000",
- "6": "FF0000",
- "7": "FF0000",
- "8": "FF0000",
- "9": "FF0000",
- "10": "FFFF00", //黄色
- "11": "FFFF00", //黄色
- "12": "FFFF00", //黄色
- "13": "FFFF00", //黄色
- "14": "FFFF00", //黄色
- "15": "FFFF00", //黄色
- "16": "FFFF00", //黄色
- "17": "FF0000", //红色
- "18": "FF0000", //红色
- "19": "FF0000", //红色
- "20": "FF0000", //红色
- "21": "FF0000", //红色
- "22": "FF0000", //红色
- "23": "FF0000", //红色
- "24": "FF0000", //红色
- "25": "FF0000",
- "26": "FFFF00",
- "27": "FFFF00",
- "1000": "", //盘头比例低于20%
- "1001": "", //盘头比例低于50%
- "10001": "FFFF00", //黄色
- "10002": "FFFF00", //黄色
- "10006": "FFFF00", //黄色
- "10008": "FFFF00" //黄色
- },
- //停机原因类型
- StopType: {
- "stop1": "停经片停机",
- "stop2": "CCD停机",
- "stop3": "人工停机",
- "stop4": "断电停机",
- "stop5": "设备故障停机",
- "stop6": "落布米数达到停机",
- "stop7": "盘头剩余圈数达到停机",
- },
- LastAlarmDevs: {},
- //告警设备列表数据
- AlarmTable: function (data) {
- this.AlarmData = data;
- var t = $("#dev_alarm_list>tbody").html("")
- if (data == null || data.length == 0) {
- $("#dev_alarm .content").hide();
- $("#dev_alarm .title").html("当前无告警");
- for (var devcode in modelsMap) {
- this.LastAlarmDevs[devcode] = null;
- if (this.PanAlarm[devcode] == null) {
- //还原设备状态
- ChangeModelColor(devcode);
- ChangeModelAlarmState2(devCode); //"00ff00" 绿色
- }
- }
- return
- }
- var alarmDev = {};
- for (var i = 0; i < this.AlarmData.length; i++) {
- alarmDev[this.AlarmData[i].code] = this.AlarmData[i].type;
- }
- $("#dev_alarm .title").html("");
- $("#dev_alarm .content").show();
- var tpl = '<tr style="font-weight:bold" devno="{1}"><td style="width: 30%;">{1}#</td><td style="width: 70%;color:{COLOR}">{2}</td></tr>';
- var lst = [];
- for (var devcode in alarmDev) {
- var alarmInfo = alarmDev[devcode];
- var color = "rgb(206,161,94)" //默认告警文本颜色
- var typeName = this.AlarmType[alarmInfo];
- if (typeName.indexOf("故障") > -1 || typeName.indexOf("掉线") > -1) color = "rgb(195,70,76)" //红色提醒
- lst.push(tpl.replace(/\{1\}/gi, devcode.replace(/C_/g, "")).replace(/\{2\}/g, typeName).replace('{COLOR}', color))
- }
- t.html(lst.join(''));
- var noAlarmDevs = [];
- if (MODEL_LOADED == 1) {
- for (var devcode in modelsMap) {
- if (OFFLINE_DEVS[devcode] == 1) continue;
- var alarmInfo = alarmDev[devcode];
- //上一次没有告警,本次有告警,需要设置成告警状态
- if (alarmInfo != null) {
- if (this.LastAlarmDevs[devcode] == null) {
- var typeName = this.AlarmType[alarmInfo];
- if (MODEL_LOADED == 1) {
- //机器告警提示
- //ChangeModelColor(devcode, DEV_ALAR_COLOR, typeName)
- ChangeModelAlarmState2(devcode, DataFill.AlarmColorTypeCode[alarmInfo]);
- } else {
- //记录下来,等待模型加载完成时处理
- //ALARM_DEVS.push(devcode + ">"+DEV_ALAR_COLOR+">" + typeName)
- ALARM_DEVS.push(devcode + ">" + DataFill.AlarmColorTypeCode[alarmInfo] + ">" + typeName)
- }
- }
- this.LastAlarmDevs[devcode] = 1;
- } else {
- //上一次有告警,并且没有盘头告警时,本次未告警,需要恢复成未告警状态
- if (this.LastAlarmDevs[devcode] == 1 && this.PanAlarm[devcode] == null) {
- noAlarmDevs.push(devcode);
- }
- this.LastAlarmDevs[devcode] = null;
- }
- }
- }
- t.find("tr").off().on('click', function () {
- //点击告警行
- var devno = $.trim($(this).attr('devno'))
- if (devno == '') return;
- ShowInfo("C_" + devno)
- });
- var tb = $("#dev_alarm_list");
- if (tb.height() > tb.parent().height()) {
- if (this.devAlarmAutoLoadTimter != null) {
- clearInterval(this.devAlarmAutoLoadTimter);
- }
- tb.css({"top": "0px", "position": "relative"});
- this.devAlarmAutoLoadTimter = window.setInterval(function () {
- var tb = $("#dev_alarm_list");
- var tbtop = tb.css("top").replace("px", "") * 1;
- if (Math.abs(tbtop) >= (tb.height() - 32)) {
- tb.css("top", "0px");
- } else {
- tb.css("top", (tbtop - 32) + "px");
- }
- }, 3000);
- } else {
- clearInterval(this.devAlarmAutoLoadTimter)
- tb.css("top", "0px");
- }
- if (noAlarmDevs.length > 0) {
- for (var i = 0; i < noAlarmDevs.length; i++) {
- //还原设备的无告警状态
- ChangeModelColor(noAlarmDevs[i])
- ChangeModelAlarmState2(noAlarmDevs[i]) //00ff00
- }
- }
- },
- //告警趋势数据填充
- AlarmLine: function (data) {
- //只获取数据中的alarm数据
- var t = $("#echarts_alarm");
- var alarmWeek = [];
- var times = [];
- var v_series = [];
- for (var i = 0; i < data.length; i++) {
- var v = data[i]['alarm'];
- var tv = data[i]['time'].split("-")
- times.push(tv[1] + "-" + tv[2])
- if (v != null) alarmWeek.push(v)
- }
- if (alarmWeek.length == 0) {
- t.parent().hide();
- } else {
- v_series.push({
- name: "",
- type: 'line',
- smooth: true,
- //symbol: 'none',
- data: alarmWeek,
- itemStyle: {
- normal: {
- color: '#F0F275', // 这里设置折线的颜色
- lineStyle: {
- color: '#F0F27560' // 这里同时设置线头的颜色
- }
- }
- },
- });
- var opt = {
- title: {
- show: false, //不显示标题
- text: '',
- textStyle: {
- color: "rgb(89, 151, 229)",
- fontWeight: "bold"
- },
- top: "0px",
- left: "30px"
- },
- tooltip: {
- trigger: 'axis',
- formatter: function (params) {
- let xv='';
- let result = '';
- params.forEach(function (item) {
- xv=`${item.name}<br/>`;
- result += ` ${item.marker} ${item.value}(次)<br/>`;
- });
- return xv+result;
- }
- },
- legend: {
- show: false, //不显示图例
- inactiveColor: "#04417A",
- data: "",
- textStyle: {color: "#fff"},
- top: "0px"
- },
- grid: {
- left: '1%',
- right: '1%',
- bottom: '2%',
- top: '5%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- axisLabel: {
- rotate: 45,
- color: "#fff"
- },
- data: times
- },
- yAxis: {
- type: 'value',
- nameTextStyle: {
- color: "#fff"
- },
- axisLabel: {
- color: "rgb(203,215,235)"
- },
- splitLine: {
- lineStyle: {
- color: "#7DA7CD",
- type: "dashed",
- width: 1
- }
- }
- },
- series: v_series
- };
- var echartsEle = echarts.init(t[0]);
- echartsEle.setOption(opt);
- }
- //动态设置停机原因的top
- $("#dev_stop").css("top", ($("#dev_alarm").offset().top * 1 + $("#dev_alarm").height() + 15) + "px");
- },
- DevInfo: function (data) {
- $("#dev_state_total").html(data.total);
- $("#dev_state_runtotal").html(data.online);
- $("#dev_state .content .stat .number").each(function () {
- var attr = $(this).attr("attr");
- $(this).html(data[attr])
- })
- },
- StopLine: function (data, typecode) {
- var t = $("#dev_stop");
- var week = {"stop1A": [], "stop2A": [], "stop3A": [], "stop1B": [], "stop2B": [], "stop3B": []};
- var times = [];
- var v_series = [];
- for (var i = 0; i < data.length; i++) {
- var tv = data[i]['time'].split("-")
- times.push(tv[1] + "-" + tv[2])
- for (var k1 in week) {
- week[k1].push(data[i][k1])
- }
- }
- if ((week.stop1A.length + week.stop2A.length + week.stop3A.length + week.stop1B.length + week.stop2B.length + week.stop3B.length) == 0) {
- t.find(".content").hide();
- t.find(".title").html("无机器停机");
- $("#echarts_stop").html("");
- return;
- }
- t.find(".content").show();
- t.find(".title").html("");
- var option = {
- title: {
- show: false,
- text: '',
- left: 'center',
- top: '1%',
- bottom: '0'
- },
- color: ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8",],
- tooltip: {
- trigger: 'axis',
- formatter: function (params) {
- let xv='';
- let result = '';
- params.forEach(function (item) {
- xv=`${item.name}<br/>`;
- result += ` ${item.marker} ${item.seriesName}: ${item.value}(次)<br/>`;
- });
- return xv+result;
- }
- },
- legend: {
- data: ['停经片A班', 'CCD断纱A班', '人工停机A班', '停经片B班', 'CCD断纱B班', '人工停机B班',],
- button: '5%',
- textStyle: {color: "#fff"},
- top: "0",
- },
- grid: {
- containLabel: true,
- top: '25%',
- bottom: '0',
- right: '1%',
- left: '1%'
- },
- xAxis: [{
- type: 'category',
- boundaryGap: true,
- data: times,
- axisLabel: {
- rotate: 45,
- color: "#fff"
- },
- axisPointer: {snap: false}
- }],
- yAxis: [{
- type: 'value',
- axisPointer: {snap: false},
- axisLabel: {
- color: "rgb(203,215,235)"
- },
- splitLine: {
- lineStyle: {
- color: "#7DA7CD",
- type: "dashed",
- width: 1
- }
- }
- }],
- series: [{
- name: '停经片A班',
- type: 'bar',
- barWidth: 5,
- stack: 'jp',
- data: week.stop1A
- }, {
- name: '停经片B班',
- type: 'bar',
- stack: 'jp',
- data: week.stop2A
- }, {
- name: 'CCD断纱A班',
- type: 'bar',
- barWidth: 5,
- stack: 'ccd',
- data: week.stop3A
- }, {
- name: 'CCD断纱B班',
- type: 'bar',
- stack: 'ccd',
- data: week.stop1B
- }, {
- name: '人工停机A班',
- type: 'bar',
- barWidth: 5,
- stack: 'r',
- data: week.stop2B
- }, {
- name: '人工停机B班',
- type: 'bar',
- stack: 'r',
- data: week.stop3B
- }]
- };
- var echartsEle = echarts.init($("#echarts_stop")[0]);
- echartsEle.setOption(option);
- },
- LoadSCXL: function (data) {
- //生产效率
- $("#totay1").html(data.totalLength.toFixed(2))
- $("#totay2").html(data.totalWeight.toFixed(2))
- $("#scxl_a>td:eq(1)").html(data.atime.toFixed(2))
- $("#scxl_a>td:eq(2)").html(data.alength.toFixed(2))
- $("#scxl_a>td:eq(3)").html(data.aweight.toFixed(2))
- $("#scxl_a>td:eq(4)").html(data.aefficiency.toFixed(2))
- $("#scxl_b>td:eq(1)").html(data.btime.toFixed(2))
- $("#scxl_b>td:eq(2)").html(data.blength.toFixed(2))
- $("#scxl_b>td:eq(3)").html(data.bweight.toFixed(2))
- $("#scxl_b>td:eq(4)").html(data.befficiency.toFixed(2))
- },
- LoadJDL: function (data) {
- //稼动率
- //获取数据中efficiency、aefficiency、befficiency
- var t = $("#echarts_jiadonglv")
- var week_efficiency = [];
- var week_aefficiency = [];
- var week_befficiency = [];
- var times = [];
- var v_series = [];
- for (var i = 0; i < data.length; i++) {
- var v = data[i]['efficiency'];
- var tv = data[i]['time'].split("-")
- times.push(tv[1] + "-" + tv[2])
- if (v != null) week_efficiency.push(v);
- week_aefficiency.push(data[i]['aefficiency'])
- week_befficiency.push(data[i]['befficiency'])
- }
- if (week_efficiency.length == 0) {
- return
- }
- v_series.push({
- name: "总稼动率", type: 'line', smooth: true, //symbol: 'none',
- data: week_efficiency, itemStyle: {
- normal: {
- color: '#F0F275', // 这里设置折线的颜色
- lineStyle: {
- color: '#F0F275' // 这里同时设置线头的颜色
- }
- }
- },
- });
- v_series.push({
- name: "A组稼动率", type: 'line', smooth: true, //symbol: 'none',
- data: week_aefficiency, itemStyle: {
- normal: {
- color: '#1EFFFF', // 这里设置折线的颜色
- lineStyle: {
- color: '#1EFFFF' // 这里同时设置线头的颜色
- }
- }
- },
- });
- v_series.push({
- name: "B组稼动率", type: 'line', smooth: true, //symbol: 'none',
- data: week_befficiency, itemStyle: {
- normal: {
- color: '#295589', // 这里设置折线的颜色
- lineStyle: {
- color: '#295589' // 这里同时设置线头的颜色
- }
- }
- },
- });
- var opt = {
- title: {
- show: false, //不显示标题
- text: '',
- textStyle: {
- color: "rgb(89, 151, 229)",
- fontWeight: "bold"
- },
- top: "0px",
- left: "30px"
- },
- tooltip: {
- trigger: 'axis',
- formatter: function (params) {
- let xv='';
- let result = '';
- params.forEach(function (item) {
- xv=`${item.name}<br/>`;
- result += ` ${item.marker} ${item.seriesName}: ${item.value} %<br/>`;
- });
- return xv+result;
- }
- },
- legend: {
- show: true, //不显示图例
- inactiveColor: "#04417A",
- data: "",
- textStyle: {color: "#fff"},
- top: "5",
- },
- grid: {
- left: '3%',
- right: '1%',
- bottom: '0',
- top: '25%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- axisLabel: {
- rotate: 45,
- color: "#fff"
- },
- data: times
- },
- yAxis: {
- type: 'value',
- nameTextStyle: {
- color: "#fff"
- },
- axisLabel: {
- color: "rgb(203,215,235)"
- },
- splitLine: {
- lineStyle: {
- color: "#7DA7CD",
- type: "dashed",
- width: 1
- }
- }
- },
- series: v_series
- };
- var echartsEle = echarts.init(t[0]);
- echartsEle.setOption(opt);
- },
- LoadSCLine: function (data) {
- //生产趋势
- //获取数据中weight、aweight、bweight
- var t = $("#echarts_sc_qushi")
- var week_efficiency = [];
- var week_aefficiency = [];
- var week_befficiency = [];
- var times = [];
- var v_series = [];
- for (var i = 0; i < data.length; i++) {
- var v = data[i]['weight'];
- var tv = data[i]['time'].split("-")
- times.push(tv[1] + "-" + tv[2])
- if (v != null) week_efficiency.push(v);
- week_aefficiency.push(data[i]['aweight'])
- week_befficiency.push(data[i]['bweight'])
- }
- if (week_efficiency.length == 0) {
- return
- }
- v_series.push({
- name: "白坯布总产量", type: 'line', smooth: false, //symbol: 'none',
- data: week_efficiency, itemStyle: {
- normal: {
- color: '#F0F275', // 这里设置折线的颜色
- lineStyle: {
- color: '#F0F275' // 这里同时设置线头的颜色
- }
- }
- },
- });
- v_series.push({
- name: "A组产量", type: 'bar', stack: '1', smooth: true, //symbol: 'none',
- data: week_aefficiency, itemStyle: {
- normal: {
- color: '#1EFFFF', // 这里设置折线的颜色
- lineStyle: {
- color: '#1EFFFF' // 这里同时设置线头的颜色
- }
- }
- },
- barWidth: "15",
- itemStyle: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1, // 这四个参数分别表示渐变的起点 (x1, y1) 与终点 (x2, y2)
- [
- {offset: 0, color: '#1EFFFF'}, // 0% 处的颜色
- {offset: 1, color: '#1D7777'} // 100% 处的颜色
- ]
- )
- }
- });
- v_series.push({
- name: "B组产量", type: 'bar', stack: '1', smooth: true, //symbol: 'none',
- data: week_befficiency, itemStyle: {
- normal: {
- color: '#295589', // 这里设置折线的颜色
- lineStyle: {
- color: '#295589' // 这里同时设置线头的颜色
- }
- }
- },
- barWidth: "15",
- itemStyle: {
- barBorderRadius: [3, 3, 0, 0,],
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1, // 这四个参数分别表示渐变的起点 (x1, y1) 与终点 (x2, y2)
- [
- {offset: 0, color: '#32A9FF'}, // 0% 处的颜色
- {offset: 1, color: '#2B5A7C'} // 100% 处的颜色
- ]
- )
- }
- });
- var opt = {
- title: {
- show: false, //不显示标题
- text: '',
- textStyle: {
- color: "rgb(89, 151, 229)",
- fontWeight: "bold"
- },
- top: "0px",
- left: "30px"
- },
- legend: {
- show: true, //不显示图例
- inactiveColor: "#04417A",
- data: "",
- textStyle: {color: "#fff"},
- top: "5",
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- label: {
- show: true,
- backgroundColor: '#fff',
- color: '#556677',
- borderColor: 'rgba(0,0,0,0)',
- shadowColor: 'rgba(0,0,0,0)',
- shadowOffsetY: 0
- },
- lineStyle: {
- width: 0
- }
- },
- backgroundColor: '#fff',
- textStyle: {
- color: '#5c6c7c'
- },
- padding: [10, 10],
- extraCssText: 'box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)',
- formatter: function (params) {
- let xv='';
- let result = '';
- params.forEach(function (item) {
- xv=`${item.name}<br/>`;
- result += ` ${item.marker} ${item.seriesName}: ${item.value}(米/日)<br/>`;
- });
- return xv+result;
- }
- },
- grid: {
- left: '3%',
- right: '1%',
- bottom: '0',
- top: '25%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- axisLabel: {
- rotate: 45,
- color: "#fff"
- },
- data: times
- },
- yAxis: {
- type: 'value',
- nameTextStyle: {
- color: "#fff"
- },
- axisLabel: {
- color: "rgb(203,215,235)"
- },
- splitLine: {
- lineStyle: {
- color: "#7DA7CD",
- type: "dashed",
- width: 1
- }
- }
- },
- series: v_series
- };
- var echartsEle = echarts.init(t[0]);
- echartsEle.setOption(opt);
- },
- LoadUsedLine: function (data) {
- //能耗趋势
- //获取数据中kwh、akwh、bkwh
- var t = $("#echarts_used_qushi")
- var week_efficiency = [];
- var week_aefficiency = [];
- var week_befficiency = [];
- var times = [];
- var v_series = [];
- for (var i = 0; i < data.length; i++) {
- var v = data[i]['kwh'];
- var tv = data[i]['time'].split("-")
- times.push(tv[1] + "-" + tv[2])
- if (v != null) week_efficiency.push(v);
- week_aefficiency.push(data[i]['akwh'])
- week_befficiency.push(data[i]['bkwh'])
- }
- if (week_efficiency.length == 0) {
- return
- }
- v_series.push({
- name: "总电量", type: 'line', smooth: true, //symbol: 'none',
- data: week_efficiency, itemStyle: {
- normal: {
- color: '#F0F275', // 这里设置折线的颜色
- lineStyle: {
- color: '#F0F275' // 这里同时设置线头的颜色
- }
- }
- },
- });
- v_series.push({
- name: "A组电量", type: 'line', smooth: true, //symbol: 'none',
- data: week_aefficiency, itemStyle: {
- normal: {
- color: '#1EFFFF', // 这里设置折线的颜色
- lineStyle: {
- color: '#1EFFFF' // 这里同时设置线头的颜色
- }
- }
- },
- });
- v_series.push({
- name: "B组电量", type: 'line', smooth: true, //symbol: 'none',
- data: week_befficiency, itemStyle: {
- normal: {
- color: '#295589', // 这里设置折线的颜色
- lineStyle: {
- color: '#295589' // 这里同时设置线头的颜色
- }
- }
- },
- });
- var opt = {
- title: {
- show: false, //不显示标题
- text: '',
- textStyle: {
- color: "rgb(89, 151, 229)",
- fontWeight: "bold"
- },
- top: "0px",
- left: "30px"
- },
- tooltip: {
- trigger: 'axis',
- formatter: function (params) {
- let xv='';
- let result = '';
- params.forEach(function (item) {
- xv=`${item.name}<br/>`;
- result += ` ${item.marker} ${item.seriesName}: ${item.value}(kWh)<br/>`;
- });
- return xv+result;
- }
- },
- legend: {
- show: true, //不显示图例
- inactiveColor: "#04417A",
- data: "",
- textStyle: {color: "#fff"},
- top: "5",
- },
- grid: {
- left: '3%',
- right: '1%',
- bottom: '0',
- top: '25%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- axisLabel: {
- rotate: 45,
- color: "#fff"
- },
- data: times
- },
- yAxis: {
- type: 'value',
- nameTextStyle: {
- color: "#fff"
- },
- axisLabel: {
- color: "rgb(203,215,235)"
- },
- splitLine: {
- lineStyle: {
- color: "#7DA7CD",
- type: "dashed",
- width: 1
- }
- }
- },
- series: v_series
- };
- var echartsEle = echarts.init(t[0]);
- echartsEle.setOption(opt);
- },
- LoadPan(data) {
- //盘头数据处理
- this.Pan = {};//先存储,设备详情时需要使用到
- if (data == null || data.length == 0) return;
- /*
- var alarmDev = {};
- for (var i = 0; i < this.AlarmData.length; i++) {
- alarmDev[this.AlarmData[i].code] = 1;
- }
- */
- for (var i = 0; i < data.length; i++) {
- var devCode = data[i].code;
- this.Pan[devCode] = data[i].panPercent
- /*
- if (alarmDev[devCode] == 1) {
- continue; //该设备有告警,不处理盘头
- }
- //判断盘头中是否有低于20的
- var panTmp = data[i].panPercent;
- var is20 = false;//是否是小于20%的
- for (var p = 0; p < panTmp.length; p++) {
- if (panTmp[p] < 20) {
- if (this.PanAlarm[devCode] != 20) {
- //该设备进行告警
- if (MODEL_LOADED == 1) {
- //机器告警提示
- console.log('设备', devCode, '盘头小于20%')
- //ChangeModelColor(devCode, DEV_ALAR_COLOR, this.AlarmType["1000"])
- } else {
- //记录下来,等待模型加载完成时处理
- //ALARM_DEVS.push(devCode + ">"+DEV_ALAR_COLOR+">"+this.AlarmType["1000"])
- }
- }
- is20 = true
- //this.PanAlarm[devCode] = 20
- break
- }
- }
- if (is20) {
- //当前盘头有小于20%的,则不再做其他判断了
- continue
- }
- //判断盘头中是否有低于50的,但大于20%的
- var is50 = false;
- for (var p = 0; p < panTmp.length; p++) {
- if (panTmp[p] < 50 && panTmp[p] >= 20) {
- if (this.PanAlarm[devCode] != 50) {
- //该设备进行提醒
- if (MODEL_LOADED == 1) {
- //机器提醒提示
- console.log('设备', devCode, '盘头小于50%大于20%')
- //ChangeModelColor(devCode, DEV_HINT_COLOR, this.AlarmType["1001"])
- } else {
- //记录下来,等待模型加载完成时处理
- //ALARM_DEVS.push(devCode + ">"+DEV_HINT_COLOR+">"+this.AlarmType["1001"])
- }
- }
- is50 = true
- //this.PanAlarm[devCode] = 50
- break
- }
- }
- if (is50) {
- continue
- }
- this.PanAlarm[devCode] = null;
- if (MODEL_LOADED == 1) {
- //盘头剩余比例正常,隐藏提示标签
- ChangeModelColor(devCode)
- }
- */
- }
- }
- }
- //汉化日期控件
- $.datepicker.regional['zh-CN'] = {
- clearText: '清除',
- clearStatus: '清除已选日期',
- closeText: '关闭',
- closeStatus: '不改变当前选择',
- prevText: '<上月',
- prevStatus: '显示上月',
- prevBigText: '<<',
- prevBigStatus: '显示上一年',
- nextText: '下月>',
- nextStatus: '显示下月',
- nextBigText: '>>',
- nextBigStatus: '显示下一年',
- currentText: '今天',
- currentStatus: '显示本月',
- monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
- monthNamesShort: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'],
- monthStatus: '选择月份',
- yearStatus: '选择年份',
- weekHeader: '周',
- weekStatus: '年内周次',
- dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
- dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
- dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
- dayStatus: '设置 DD 为一周起始',
- dateStatus: '选择 m月 d日, DD',
- dateFormat: 'yy-mm-dd',
- firstDay: 1,
- initStatus: '请选择日期',
- isRTL: false
- };
- $(document).ready(function () {
- $(window).on('wheel', function(event) {
- // 检查 event.originalEvent.deltaY 来判断滚动方向
- if (event.originalEvent.deltaY > 0) {
- console.log('向下滚动:缩小'+zoomCount);
- zoomCount = zoomCount-1
- if(zoomCount<=-3 && currentTargetType!="FAC"){
- zoomCount=0;
- //切换在全厂视图
- loadFacModel(playerNative);
- backMasterViewByFac();
- }
- } else {
- console.log('向上滚动:放大');
- zoomCount = zoomCount+1
- }
- });
- $.datepicker.setDefaults($.datepicker.regional['zh-CN']); //设置日期控制语言
- $("#datepicker1").datepicker({
- dateFormat: "yy-mm-dd",
- showOn: "button",
- buttonText: "选择日期",
- changeMonth: true,
- changeYear: true,
- numberOfMonths: 1,
- rangeSelect: true,
- onClose: function (selectedDate) {
- $("#datepicker2").datepicker("option", "minDate", selectedDate);
- $("#datepicker2").val('');
- var isNowDay = selectedDate==new Date().Format("yyyy-MM-dd");
- var hour1Opts = [];
- var nowHour = new Date().Format("h");
- for (var i = 0; i < 24; i++) {
- if( !isNowDay || (isNowDay && i<=nowHour)) hour1Opts.push('<option value="' + i + '">' + i + ' 时</option>');
- }
- $("#hour1,#hourP1").html(hour1Opts.join(''))
- }
- });
- $("#datepicker2").datepicker({
- dateFormat: "yy-mm-dd",
- showOn: "button",
- buttonText: "选择日期",
- changeMonth: true,
- changeYear: true,
- numberOfMonths: 1,
- rangeSelect: true,
- defaultDate: new Date().Format("yyyy-MM-dd"),
- onClose:function(selectedDate){
- var isNowDay = selectedDate==new Date().Format("yyyy-MM-dd");
- var hour2Opts = [];
- var nowHour = new Date().Format("h");
- for (var i = 0; i < 24; i++) {
- if( !isNowDay || (isNowDay && i<=nowHour)) hour2Opts.push('<option value="' + i + '">' + i + ' 时</option>');
- }
- $("#hour2,#hourP2").html(hour2Opts.join(''))
- }
- });
- //日期不能超过当前日期
- $("#datepicker1,#datepicker2").datepicker("option", "maxDate", new Date().Format("yyyy-MM-dd"));
- $("#date_select,#ui-datepicker-div,#day_select").on("click", function (e) {
- e.stopPropagation();
- });
- var ua = navigator.userAgent;
- var isIE=false;
- if (ua.indexOf('MSIE') != -1 || ua.indexOf('Trident') != -1) {
- isIE=true;
- }
- //纱线规格导出生产预期天数输入控制处理
- $('#prev_day').on('dblclick',function(event) {
- event.preventDefault();
- event.stopPropagation();
- return false;
- });
- $("#prev_day").on("keydown",function(event){
- var v = $(this).val();
- if (isIE) {
- if ( ((event.keyCode > 47) && (event.keyCode < 58)) || (event.keyCode == 8) ) { // 判断键值
- if(event.keyCode != 8 && (v+String.fromCharCode(event.keyCode))*1>60){
- return false;
- }
- return true;
- } else {
- return false;
- }
- } else {
- if ( ((event.which > 47) && (event.which < 58)) || (event.which == 8) || (event.keyCode == 17) ) {
- if(event.keyCode != 17 && event.which != 8 && (v+String.fromCharCode(event.which))*1>60){
- return false;
- }
- return true;
- } else {
- return false;
- }
- }
- }).focus(function() {
- this.style.imeMode='disabled'; // 禁用输入法,禁止输入中文字符
- });
- //纱线规格导出确定按钮事件处理
- $("#day_select .daySelected_ok>button").on('click',function(){
- var v=$("#prev_day").val();
- if(isNaN(v)){
- $("#prev_day").val('');
- return;
- }
- window.open(SERVER_URL + "/export/yarn-specifications?day="+(v*1));
- })
- $("#dev_stop").css("top", ($("#dev_alarm").offset().top * 1 + $("#dev_alarm").height() + 15) + "px");
- $("#search input:eq(0)").off().on('keypress', function (e) {
- if (e.keyCode == 13) {
- search()
- }
- });
- $("#imp_btn").on('click', function (e) {
- e.stopPropagation();
- $('#imp_item').show();
- $('#search_result').hide()
- })
- $("#search .search_btn").on('click', function (e) {
- e.stopPropagation();
- search();
- })
- //导出数据项选择
- $("#imp_item>div").on('click', function (e) {
- $(this).parent().find(".active").removeClass("active");
- //导出数据
- var code = $(this).addClass("active").attr("itemcode");
- var $date_select = $("#date_select").attr("itemcode",code);
- var $day_select=$("#day_select").hide();
- var day = new Date();
- if(day.getHours()<7){
- day=day.setDate(day.getDate()-2);
- }else{
- day=day.setDate(day.getDate()-1);
- }
- var day1 = new Date().setDate(new Date(day).getDate() - 7);
- $("#datepicker1").val(new Date(day1).Format("yyyy-MM-dd"))
- $("#datepicker2").datepicker("option", "minDate", new Date(day1).Format("yyyy-MM-dd"));
- $("#datepicker2").val(new Date(day).Format("yyyy-MM-dd"))
- $("#hour1,#hourP1").val("7")
- $("#hour2,#hourP2").val("19");
- $("#datepicker2").parent().show();//显示结束日期选择
- switch (parseInt(code)) {
- case 1:
- //alert("生产");
- e.stopPropagation();
- $("#date_select .hourAreaSelect").hide();
- $("#date_select .hourPointSelect").hide();
- $date_select.show().css({
- "top": $(this).offset().top-10 + "px",
- "left": $("#imp_item").offset().left- $("#date_select").width()-20 + "px"
- })
- //window.open(SERVER_URL + "/export/production");
- break;
- case 2:
- // alert("停机原因");
- e.stopPropagation();
- $("#date_select .hourAreaSelect").hide();
- $("#date_select .hourPointSelect").show();
- $date_select.show().css({
- "top": $(this).offset().top-10 + "px",
- "left": $("#imp_item").offset().left- $("#date_select").width()-20 + "px"
- })
- break;
- case 3:
- // alert("并发叫料分析");
- e.stopPropagation();
- $("#date_select .hourAreaSelect").show();
- $("#date_select .hourPointSelect").hide();
- $date_select.show().css({
- "top": $(this).offset().top-10 + "px",
- "left": $(this).offset().left - $("#date_select").width()-20 + "px"
- })
- break;
- case 4:
- // alert("断纱分析");
- e.stopPropagation();
- $("#date_select .hourAreaSelect").hide();
- $("#date_select .hourPointSelect").hide();
- $date_select.show().css({
- "top": $(this).offset().top-10 + "px",
- "left": $(this).offset().left - $("#date_select").width()-20 + "px"
- })
- $("#datepicker2").parent().hide();//隐藏结束日期选择
- var preday=new Date();
- preday = preday.setDate(new Date().getDate()-1);
- $("#datepicker1,#datepicker2").val(new Date(preday).Format("yyyy-MM-dd"));//默认为前一天
- break;
- case 5:
- // alert("并发下卷分析");
- e.stopPropagation();
- $("#date_select .hourAreaSelect").show();
- $("#date_select .hourPointSelect").hide();
- $date_select.show().css({
- "top": $(this).offset().top-10 + "px",
- "left": $(this).offset().left - $("#date_select").width()-20 + "px"
- })
- break;
- case 6:
- // alert("告警");
- e.stopPropagation();
- $("#date_select .hourAreaSelect").hide();
- $("#date_select .hourPointSelect").show();
- $date_select.show().css({
- "top": $(this).offset().top-10 + "px",
- "left": $(this).offset().left - $("#date_select").width()-20 + "px"
- })
- break;
- case 7:
- // alert("平方米克重")
- window.open(SERVER_URL + "/export/gram-mass");
- break;
- case 8:
- // alert("送经量");
- window.open(SERVER_URL + "/export/warp-run-in");
- break;
- case 9:
- e.stopPropagation();
- $("#prev_day").val('7');
- // alert("纱线规格");
- $date_select.hide();
- //打开预期天数窗口
- $day_select.show().css({
- "top": $(this).offset().top-10 + "px",
- "left": $("#imp_item").offset().left- $("#day_select").width()-20 + "px"
- });
- //window.open(SERVER_URL + "/export/yarn-specifications");
- break;
- case 10:
- case 11:
- case 12:
- case 13:
- e.stopPropagation();
- $("#date_select .hourAreaSelect").hide();
- $("#date_select .hourPointSelect").hide();
- $date_select.show().css({
- "top": $(this).offset().top-10 + "px",
- "left": $(this).offset().left - $("#date_select").width()-20 + "px"
- })
- $("#datepicker2").parent().hide();//隐藏结束日期选择
- var preday=new Date();
- preday = preday.setDate(new Date().getDate()-1);
- $("#datepicker1,#datepicker2").val(new Date(preday).Format("yyyy-MM-dd"));//默认为前一天
- break;
- }
- })
- //自定义导出日期确定
- $("#date_select .dateSelected_ok").on('click', function () {
- var s1 = $("#datepicker1").val()
- var s2 = $("#datepicker2").val()
- //var devcode = $.trim($("#imp_devcode").val())
- var itemcode = $("#date_select").attr("itemcode");
- if (s1 == "" || (s2 == ""&&itemcode!=4&&itemcode!=10&&itemcode!=11)) return;
- switch (parseInt(itemcode)) {
- case 1:
- window.open(SERVER_URL + "/export/production?start="+s1+"&end="+s2);
- break;
- case 2:
- var h1 = $("#hourP1").val();
- var h2 = $("#hourP2").val();
- s1 = s1 +" "+h1+":00:00"
- s2 = s2 +" "+h2+":00:00"
- window.open(SERVER_URL + "/export/stops?start="+s1+"&end="+s2);
- break;
- case 3:
- var h1 = $("#hour1").val();
- var h2 = $("#hour2").val();
- window.open(SERVER_URL + "/export/stops/type/7?start="+s1+"&end="+s2+"&st="+h1+"&et="+h2);
- break;
- case 4:
- window.open(SERVER_URL + "/export/broken-yarn?date="+s1);
- break;
- case 5:
- var h1 = $("#hour1").val();
- var h2 = $("#hour2").val();
- window.open(SERVER_URL + "/export/stops/type/6?start="+s1+"&end="+s2+"&st="+h1+"&et="+h2);
- break;
- case 6:
- var h1 = $("#hourP1").val();
- var h2 = $("#hourP2").val();
- s1 = s1 +" "+h1+":00:00"
- s2 = s2 +" "+h2+":00:00"
- window.open(SERVER_URL + "/export/alarms?start="+s1+"&end="+s2);
- break;
- case 10:
- window.open(SERVER_URL + "/export/productivity-day?date="+s1);
- break;
- case 11:
- window.open(SERVER_URL + "/export/productivity-month?date="+s1);
- break;
- case 12:
- window.open(SERVER_URL + "/export/energy-day?date="+s1);
- break;
- case 13:
- window.open(SERVER_URL + "/export/energy-month?date="+s1);
- break;
- }
- $("body").trigger('click')
- });
- $("#autoplayer_btn").off().on('click', function () {
- var img = $(this).find("img");
- AutoPlayer = !AutoPlayer
- if (AutoPlayer) {
- img.attr("src", "image/auto3d_start.png");
- try {
- //循环播放
- player.Native.CameraAnimation.setLoop(true);
- // 播放动画
- player.Native.CameraAnimation.start();
- } catch (e) {
- }
- } else {
- img.attr("src", "image/auto3d_stop.png");
- try {
- player.Native.CameraAnimation.stop();
- } catch (e) {
- }
- }
- })
- $("#imp_btn_maogaodetail").off().on('click', function () {
- var v = $("#maogaoDetailWin").attr("maogao")
- window.open(SERVER_URL + "/formula/export/" + v)
- })
- //毛高比重
- $("#maogao_btn").on('click', function () {
- $.getJSON(SERVER_URL + "/formula/total", {}, function (data) {
- if (data.code != 0) {
- alert(data.msg)
- return;
- }
- var data = data.data;
- var tbody = $("#maogaoWin table:last>tbody");
- tbody.html('');
- tbody.find("tr:gt(0)").remove();
- var ls = [];
- var tpl = '<tr maogao="{height}" style="color: #FFFFFF;font-size: 20px;cursor: pointer;" title="点击可查看详情"><td width="33%">{height}</td><td width="1px" style="color: transparent">|</td><td width="33%">{num}</td><td width="1px" style="color: transparent">|</td><td width="33%">{percent}</td></tr>';
- for (var i = 0; i < data.length; i++) {
- var item = data[i];
- ls.push(tpl.replace(/(\{height\})/gi, item.height).replace(/(\{num\})/gi, item.num).replace(/(\{percent\})/gi, item.percent))
- }
- tbody.append(ls.join(''));
- $("#maogaoWin").show();
- $("#maogaoWin table:last>tbody>tr").off().on('click', function () {
- var v = $(this).attr('maogao')
- //毛高详情
- $.getJSON(SERVER_URL + "/formula/detail/" + v, {}, function (r) {
- if (r.code == 0) {
- var tplHtml = template("maogodetail_tpl", r)
- $("#maogaoDetailWin table:last>tbody").html(tplHtml);
- $("#maogaoDetailWin").attr("maogao", v).show();
- }
- })
- })
- })
- })
- //初始化小时选择项
- var hour1Opts = [];
- var hour2Opts = [];
- var nowHour = new Date().Format("h");
- for (var i = 0; i < 24; i++) {
- hour1Opts.push('<option value="' + i + '">' + i + ' 时</option>');
- if(i<=nowHour) hour2Opts.push('<option value="' + i + '">' + i + ' 时</option>');
- }
- $("#hour1,#hourP1").html(hour1Opts.join(''))
- $("#hour2,#hourP2").html(hour2Opts.join(''))
- });
- function GetData() {
- $.getJSON(SERVER_URL + "/index", {}, function (res) {
- setTimeout(function () {
- //每60秒主动查询一次数据
- GetData()
- }, INDEX_TIMEOUT);
- if (res == null || res.code != 0) {
- return
- }
- var jsondata = res.data;
- $("#dev_state .content .stat .runningRatio").html(jsondata.device.runningRatio);
- DataFill.AlarmLine(jsondata.weekData)
- DataFill.StopLine(jsondata.weekData)
- DataFill.LoadSCXL(jsondata.efficiency)
- DataFill.LoadJDL(jsondata.weekData)
- DataFill.LoadSCLine(jsondata.weekData)
- DataFill.LoadUsedLine(jsondata.weekData)
- })
- }
- function GetAlarmData() {
- $.getJSON(SERVER_URL + "/alarm", {}, function (res) {
- setTimeout(function () {
- //每10秒主动查询一次数据
- GetAlarmData()
- }, ALARM_TIMEOUT);
- if (res == null || res.code != 0) {
- return
- }
- var jsondata = res.data;
- DataFill.DevInfo(jsondata.device)
- DataFill.AlarmTable(jsondata.alarm);
- DataFill.LoadPan(jsondata.pan);
- })
- }
- //获取已接入平台设备列表.将在设备模型加载完成后进行初始调用
- function GetOnlineDev() {
- $.getJSON(SERVER_URL + "/device/online", {}, function (res) {
- setTimeout(function () {
- //每5分钟主动查询一次数据
- GetOnlineDev()
- }, ONLIME_TIMEOUT);
- if (res == null || res.code != 0) {
- return
- }
- var jsondata = "," + res.data.join(",") + ",";
- for (var devcode in modelsMap) {
- //判断当前设备是否在在线设备列表中
- //设备原来未接入,现在接入了才恢复正常颜色
- if (jsondata.indexOf("," + devcode + ",") > -1) {
- //设备已接入
- if (OFFLINE_DEVS[devcode] != null) {
- ChangeModelColor(devcode); //恢复原颜色
- ChangeModelAlarmState2(devcode);//"00ff00"
- OFFLINE_DEVS[devcode] = null;
- console.log('设备上线:', devcode)
- }
- } else {
- if (OFFLINE_DEVS[devcode] == null) {
- //设备未接入
- ChangeModelColor(devcode, DEV_OFFLINE_COLOR);
- ChangeModelAlarmState2(devcode);
- OFFLINE_DEVS[devcode] = 1
- //console.log('离线设备:',devcode)
- }
- }
- }
- })
- }
- function backMasterView() {
- zoomCount=0;
- switch(currentTargetType){
- case "FAC":
- backMasterViewByFac();
- break;
- case "IN02":
- backMasterViewBy02();
- break;
- case "IN03":
- backMasterViewBy03();
- break;
- }
- }
- //全局厂房最佳视图
- function backMasterViewByFac(){
- if (AutoPlayer) {
- const img = $("#autoplayer_btn").find("img");
- img.attr("src", "image/auto3d_stop.png");
- try {
- player.Native.CameraAnimation.stop();
- } catch (e) {
- }
- }
- player.Native.Camera.moveTo([235.678127000173, 13.38107286701451, 74.13573809425804], [-1248.3191825020908, -262.59031050373517, -409.93944372657353], [-0.30023176822741604, -0.055832565112502126, 0.9522308596238611], 1);
- }
- //2号楼内部最佳视图
- function backMasterViewBy02() {
- if (AutoPlayer) {
- const img = $("#autoplayer_btn").find("img");
- img.attr("src", "image/auto3d_stop.png");
- try {
- player.Native.CameraAnimation.stop();
- } catch (e) {
- }
- }
- player.Native.Camera.moveTo([-60.91624261330108, -39.68511717426356, 85.99570940739352], [-61.26059834308166, -0.225858934410347, -0.5930273740619612], [-0.007940809332449061, 0.9099266223396253, 0.41469324265623975], 1);
- }
- //2号楼内部最佳视图
- function backMasterViewBy03() {
- if (AutoPlayer) {
- const img = $("#autoplayer_btn").find("img");
- img.attr("src", "image/auto3d_stop.png");
- try {
- player.Native.CameraAnimation.stop();
- } catch (e) {
- }
- }
- player.Native.Camera.moveTo([59.56050392473782, -16.715593393512307, 33.88405960390085], [-225.90035917394823, 266.6367338252189, -87.93132661854877], [-0.2057201109308161, 0.20420057431057317, 0.9570691518431909], 1);
- }
- function backMasterView180() {
- if (AutoPlayer) {
- const img = $("#autoplayer_btn").find("img");
- img.attr("src", "image/auto3d_stop.png");
- try {
- player.Native.CameraAnimation.stop();
- } catch (e) {
- }
- }
- player.Native.Camera.moveTo([-61.71380071610987, 51.07810751258113, 79.71750535252107], [-61.26763429787266, -0.047500086249613105, -0.5366793501724771], [0.00735988539091022, -0.8433593320509241, 0.5372996083468254], 1);
- }
- //1.创建RemotePlayer对象
- var player = new RemotePlayer({
- video: document.getElementById("EngineContent"), //绑定视频标签或图片标签
- signalServer: PLAYER3D_URL, //云渲染服务器,发布时需要改为实际地址
- engineId: "" + Date.now(), // 引擎会话id,如果已存在则连接,没有则创建,会话在断开连接后超时自动关闭
- rtcIni: 'rtc.ini', // 可指定webrtc配置文件,默认为rtc.ini,相对目录为集群节点的enginePath目录
- autoResize: true, // 引擎是否跟跟随标签尺寸
- limtMoveCPS: 10, // 限制每秒鼠标移动的消息个数
- userTimeout: 1000 * 60 * 60 * 5, // 用户操作超时设置,毫秒
- exitTimeout: 1000 * 60 * 60 * 999999, // 用户超时后多久断开会话
- maxTimeout: 1000, // 会话超时时间,允许掉线后引擎保存多久,在该时间内可重新连接到会话,否则会创建新的会话
- debug: false // 是否启用调试,开启后调用Native接口时会使用console.log进行记录
- });
- var modelLoadState={};//模型加载状态
- var playerNative = null;
- var playerConnState = false;
- var reconntimer = null;
- //2.[可选]监听连接成功消息
- player.on("Connected", () => {
- console.log("Has connected to engine")
- playerConnState = true
- if (reconntimer != null) clearTimeout(reconntimer);
- });
- //3.[可选]监听连接失败消息
- player.on("Disconnected", (e) => {
- console.log("Disconnected from engine", e);
- playerConnState = false
- //4.[推荐]尝试重新连接
- reconntimer = setTimeout(function () {
- console.log('尝试自动重连:', playerConnState)
- if (playerConnState) return
- player.reconnect();
- }, 10000)
- });
- //5. [推荐] 响应UserTimeOut消息,引擎接收用户鼠标触屏事件超时发出通知
- player.on("UserTimeOut", () => {
- console.info(`用户长时间没有操作三维视图,会话即将退出,可调用player.resetTimer()取消退出`);
- if (!AutoPlayer) $("#autoplayer_btn").trigger('click') //开启自动漫游
- });
- async function loadFacModel(Native){
- $("body>div.hideDiv[for='FAC']").show();
- $("body>div.hideDiv[for!='FAC']").hide();
- await player.Native.Model.setModelVisible("IN02",false);
- await player.Native.Model.setModelVisible("IN03",false);
- await player.Native.Model.setModelVisible("IN04",false);
- await player.Native.Model.setModelVisible("IN05",false);
- currentTargetType="FAC";
- if(modelLoadState[currentTargetType]==null){
- var cf = "data://models/T_ALL.pr";
- var errStr = await PlayerUtils.call(Native.Model.loadModel, currentTargetType, cf);
- modelLoadState[currentTargetType] = true;
- }
- await player.Native.Model.setModelVisible(currentTargetType,true);
- player.Native.CameraAnimation.clearKeyFrame();
- }
- async function loadIn05Model(Native){
- currentTargetType="IN05";
- currentTargetType="FAC";//还未实现,默认停在工厂视图
- }
- async function loadIn04Model(Native){
- currentTargetType="IN04";
- currentTargetType="FAC"; //还未实现,默认停在工厂视图
- }
- async function loadIn03Model(Native){
- currentTargetType="IN03";
- await player.Native.Model.setModelVisible("FAC",false);
- $("body>div.hideDiv[for='FAC']").hide();
- $("body>div.hideDiv[for='"+currentTargetType+"']").show();
- if(modelLoadState[currentTargetType]==null){
- var cf = "data://models/T_03.pr";
- var errStr = await PlayerUtils.call(Native.Model.loadModel, currentTargetType, cf);
- modelLoadState[currentTargetType] = true;
- }
- await player.Native.Model.setModelVisible(currentTargetType,true);
- player.Native.CameraAnimation.clearKeyFrame();
- }
- async function loadIn02Model(Native){
- currentTargetType="IN02";
- await player.Native.Model.setModelVisible("FAC",false);
- $("body>div.hideDiv[for='FAC']").hide();
- $("body>div.hideDiv[for='"+currentTargetType+"']").show();
- if(modelLoadState[currentTargetType]==null){
- var cf = "data://models/T_02.pr";
- var errStr = await PlayerUtils.call(Native.Model.loadModel, currentTargetType, cf);
- modelLoadState[currentTargetType]=true;
- //let cfInfo=await player.Native.Model.getInfo("all");
- //player.Native.NodeProxy.setNodeRotation(cfInfo.nodePtr, [0,0,90]);
- var rootItem = await player.Native.ModelTree.getRootItems();
- var rootObj=null;
- for (var i = 0; i < rootItem.length; i++) {
- if(rootItem[i].name=="T_02"){
- rootObj = rootItem[i]
- break;
- }
- }
- if(rootObj==null){
- console.log('未找到该模型的根节点')
- return;
- }
- var rowItems = await player.Native.ModelTree.getSubItems(rootObj.item)
- for (var row = 0; row < rowItems.length; row++) {
- if (rowItems[row].name.length < 2 || rowItems[row].name.substr(0, 1) != "R") continue;
- var devItems = await player.Native.ModelTree.getSubItems(rowItems[row].item)
- for (var i = 0; i < devItems.length; i++) {
- if (devItems[i].name.length < 2 || devItems[i].name.substr(0, 2) != 'C_') continue
- var tmp = devItems[i];// await player.Native.ModelTree.findItemByName(name,0,true,3);
- //计算当前设备在世界坐标
- var xyz = await player.Native.ModelTree.calcItemAabb(tmp.item)
- var xyz2 = [(xyz.aabb.max[0] + xyz.aabb.min[0]) * 0.5, (xyz.aabb.max[1] + xyz.aabb.min[1]) * 0.5, (xyz.aabb.max[2] + xyz.aabb.min[2]) * 0.5];
- // 创建设备编号标记
- /*
- var options = {
- "text": devItems[i].name.replace("C_", "") + "#",
- "visible": true,
- "maxLod": 110,
- "minLod": 0.1,
- "textColor": parseInt("0xffffffff")
- };
- options.pos = [xyz2[0] - 1.5, xyz2[1] - 3, 0]
- var markPtr = await player.Native.GisMarker.create(options);
- player.Native.GisMarker.update(markPtr, options);
- */
- modelsMap[tmp.name] = {item: tmp.item, xyz: xyz2, rowno: rowItems[row].name.substr(1)}
- //初始化设备状态颜色
- ChangeModelAlarmState2(tmp.name);
- //创建指示灯标记
- /*
- var alarmColorMarker = {
- "text": "●",
- "visible": true,
- "maxLod": 110,
- "minLod": 0.1,
- "textFontSize": 14,
- "textColor": parseInt("0xffffff00") //透明色
- }
- alarmColorMarker.pos = [xyz2[0] + 0.7, xyz2[1] - 3, 0]
- var colormarkPtr = await player.Native.GisMarker.create(alarmColorMarker);
- player.Native.GisMarker.update(colormarkPtr, alarmColorMarker);
- modelsAlarmColorMap[tmp.name] = {itemPtr: colormarkPtr, options: alarmColorMarker}
- */
- }
- }
- //loadedcnt.innerText=totalcnt.innerText;
- MODEL_LOADED = 1;
- }
- for (var i in ANIMATION_DATA) {
- // 添加关键帧
- player.Native.CameraAnimation.addKeyFrames([ANIMATION_DATA[i]]);
- }
- await player.Native.Model.setModelVisible(currentTargetType,true);
- if (ALARM_DEVS.length > 0) {
- for (var i = 0; i < ALARM_DEVS.length; i++) {
- var s = ALARM_DEVS[i].split(">")
- //ChangeModelColor(s[0],s[1] , s[2]);
- ChangeModelAlarmState2(s[0], s[1]);
- }
- ALARM_DEVS = [];//清除
- }
- //获取数据
- GetData();
- //获取数据
- GetAlarmData();
- //获取在线设备列表
- GetOnlineDev();
- }
- //6.监听远程过程调用加载完成消息
- player.on("NativeLoad", async (Native) => {
- playerNative =Native;
- var devAllCount = 6 * 12 * 2 - 4 //设备总数
- //var loadedcnt = document.getElementById("loadedcnt")
- //var totalcnt = document.getElementById("totalcnt")
- //totalcnt.innerText = devAllCount;
- //loadedcnt.innerText="0";
- loadFacModel(Native);
- setTimeout(function(){
- if (document.getElementById("loading") != null) document.getElementById("loading").remove(true) //加载完成,移除Loading
- if (document.getElementById("loading_a1") != null) document.getElementById("loading_a1").remove(true)
- },4000);
- //调整视角,使其达到最佳初始效果
- backMasterView();
- //player.Native.Camera.moveToItem(lastPtr,1);
- // // 选择Pickup工具
- player.Native.Tools.setCurrentTool("system.Pickup");
- //不显示提示框
- player.Native.Settings.set("tips.enabled", "bool", false);
- // //点选高亮显示
- player.Native.Settings.set("pickUp.highlight", "bool", false);
- //点选包围盒
- player.Native.Settings.set("show.select.box", "bool", false);
- player.Native.Settings.set("skybox.select", "string", "blue");
- //点选背景虚化
- player.Native.Settings.set("color.pickup.bkAlpha", "float", 0.8);
- // 选中展示节点
- // sam0023 = await player.Native.ModelTree.findItemByName("CYLINDER 3 of EQUIPMENT /C1101", 0, true, 3);
- player.Native.Settings.set('ambientIndenty', 'float', 0.39);//初始化环境光补偿
- player.Native.Settings.set('diffuseIntensity', 'float', 0.8);//初始化光线强度
- player.Native.Settings.set('specularIntensity', 'float', 0.64);//初始化高光强度
- player.Native.Settings.set('searchLightIntensity', 'float', 0.5);//初始化探照灯强度
- // 点击事件一般仅用于浏览工具,在点选工具下无效
- Native.Tools.setCurrentTool("system.Browse");
- Native.ModelTree.EventBrowseLClick.connect((event) => {
- if(currentTargetType=="FAC"){
- var inTxt = "";
- if(inPoints[event.object.name]!=null){
- //进入楼层内部
- inTxt = txt;
- }else {
- for (var txt in inPoints) {
- var item = inPoints[txt];
- if(event.pos[1]>= item["x1"] && event.pos[2]<= item["y1"] &&event.pos[1]<= item["x2"] && event.pos[2]>= item["y2"]){
- inTxt = txt;
- break;
- }
- }
- }
- if(inTxt!=""){
- currentTargetType=inTxt;
- switch(inTxt){
- case "IN02":
- loadIn02Model(Native);
- break;
- case "IN03":
- loadIn03Model(Native);
- break;
- case "IN04":
- loadIn04Model(Native);
- break;
- case "IN05":
- loadIn05Model(Native);
- break;
- default:
- break;
- }
- backMasterView();
- }
- return;
- }
- updateInfo("LClick", event)
- });
- Native.ModelTree.EventBrowseRClick.connect((event) => {
- updateInfo("RClick", event)
- });
- })
- async function updateSettings(object, type) {
- console.log(object)
- if (object.id) {
- if (type == "bool") {
- player.Native.Settings.set(object.id, type, object.checked);
- } else if (type == "red") {
- //参数前3个为RGB值,最后一个为透明度?,有点问题,好像不是正常的RGB?
- const xx = document.getElementById("color.value");
- player.Native.Settings.set(object.id, "string", xx.value);
- } else {
- player.Native.Settings.set(object.id, type, object.value);
- }
- // 更新span值
- if (type == "float") {
- var showValueStr = object.id + "Value";
- if (document.getElementById(showValueStr))
- document.getElementById(showValueStr).innerText = object.value;
- }
- }
- }
- //修改模型
- async function updateModel(object) {
- // sam0023 = await player.Native.ModelTree.getSelectedItem();
- sam0023 = await player.Native.ModelTree.getItemBySelfId(2433);
- console.log("0023", sam0023);
- if (object.id === "selectItem") {
- // if (object.checked) {
- player.Native.ModelTree.setSelectItem(sam0023.item);
- // } else {
- // player.Native.ModelTree.setSelectItem(0);
- // }
- } else if (object.id == "itemColor") {
- console.log("瓦特?", JSON.stringify(sam0023))
- // if (object.checked) {
- const xx = document.getElementById("color.value");
- player.Native.ModelTree.setItemColor(sam0023.item, parseInt(xx.value));
- // } else {
- // player.Native.ModelTree.restoreItemColor(sam0023.item);
- // }
- } else if (object.id == "itemColorClean") {
- player.Native.ModelTree.restoreItemColor(sam0023.item);
- } else if (object.id == "itemVisible") {
- player.Native.ModelTree.setItemVisible(sam0023.item, object.checked);
- }
- }
- var MarkerMap = {};//标记记录
- var MarkerOptMap = {};
- //设置设置名称或者模型id的颜色
- async function ChangeModelColor(name, color, hinttxt) {
- var iteminfo = modelsMap[name]
- if (iteminfo == null) return
- //var tmp = await player.Native.ModelTree.findItemByName(name,0,true,3);
- if (color == null || color == "") {
- if (OFFLINE_DEVS[name] == 1) return; //离线设备无需处理
- //还原
- await player.Native.ModelTree.restoreItemColor(iteminfo.item)
- //隐藏已有标签
- await player.Native.GisMarker.update(MarkerMap[name], {"visible": false});
- MarkerMap[name] = null;
- } else {
- await player.Native.ModelTree.setItemColor(iteminfo.item, parseInt("0x" + color + "ff"), true)
- if (hinttxt != null && hinttxt != "") {
- var srcPosition = iteminfo.xyz // await player.Native.NodeProxy.getNodePosition(temp.item);
- //console.log("posio",srcPosition)
- // 创建标记
- var options = {};
- if (MarkerOptMap[name] == null) {
- var imgid = await player.Native.GisMarker.loadImage("rgba:255,0,0,255");
- options = {
- "text": hinttxt,
- "visible": true,
- "maxLod": 130,
- "minLod": 0.1,
- "textColor": parseInt("0xffffffff")
- };
- options.pos = [srcPosition[0] - 1, srcPosition[1] - 2, srcPosition[2]];
- //options.parentNode=tmp.item;
- options.imgId = imgid
- options.imgSize = [-1, -1];
- MarkerOptMap[name] = options;
- } else {
- options = MarkerOptMap[name]
- options.text = hinttxt;
- }
- if (MarkerMap[name] != null) {
- await player.Native.GisMarker.update(MarkerMap[name], options);
- } else {
- var markPtr = await player.Native.GisMarker.create(options);
- await player.Native.GisMarker.update(markPtr, options);
- MarkerMap[name] = markPtr;
- }
- } else {
- await player.Native.GisMarker.update(MarkerMap[name], {"visible": false});
- }
- }
- }
- //更改指示灯状态。需求变更,已废弃
- async function ChangeModelAlarmState(name, color) {
- var iteminfo = modelsAlarmColorMap[name]
- if (iteminfo == null) return
- var colormarkPtr = iteminfo.itemPtr;
- var alarmColorMarker = iteminfo.options;
- if (color == null || color == "") {
- if (OFFLINE_DEVS[name] == 1) return; //离线设备无需处理
- //还原为透明
- alarmColorMarker["textColor"] = parseInt("0xffffff00");
- player.Native.GisMarker.update(colormarkPtr, alarmColorMarker);
- return;
- }
- alarmColorMarker["textColor"] = parseInt("0x" + color + "ff");
- player.Native.GisMarker.update(colormarkPtr, alarmColorMarker);
- }
- //更改指示灯状态.版本2:更改设备标号牌旁边的指示灯模型
- //绿灯为G 红灯为R 黄灯为Y
- //如果没有告警和停机,显示绿灯另外2个隐藏
- //CCD 叫料 停经片停机显示黄灯另外2个隐藏
- //有故障和掉线二字的显示红灯,其他都显示黄灯
- async function ChangeModelAlarmState2(name, color) {
- color = color==null ? "" : color.toUpperCase();
- var iteminfo = modelsMap[name]
- if (iteminfo == null) return
- var t = (!color ||color=="00FF00"||color=="FFFFFF")?"g":(color=="FF0000"?"r":"y");
- var y_itemid = await player.Native.ModelTree.findItemByName(name+"Y",iteminfo.item,true,1)
- var g_itemid = await player.Native.ModelTree.findItemByName(name+"G",iteminfo.item,true,1)
- var r_itemid = await player.Native.ModelTree.findItemByName(name+"R",iteminfo.item,true,1)
- player.Native.ModelTree.setItemVisible([y_itemid.item,g_itemid.item,r_itemid.item],false)
- if(t=='g'){
- player.Native.ModelTree.setItemVisible([g_itemid.item],true);
- return;
- }
- if(t=='r'){
- player.Native.ModelTree.setItemVisible([r_itemid.item],true);
- return;
- }
- if(t=='y'){
- player.Native.ModelTree.setItemVisible([y_itemid.item],true);
- return;
- }
- }
- var LastClickObj = null;
- var openState = false;
- var dbClickTimer = null;
- async function updateInfo(name, event) {
- if (AutoPlayer) $("#autoplayer_btn").trigger('click') //停止 自动漫游
- if (name != "LClick") {
- CloseWin()
- HideInfo();
- return
- }
- //console.log(event)
- var ty = event.object.nodePtr != null ? 'NODE' : 'ITEM';
- var modelsId = ty == 'NODE' ? event.object.nodePtr : event.object.item;
- if (modelsId == null || modelsId == "") {
- CloseWin()
- HideInfo();
- return
- }
- var devName = null;
- var cnt = 0;
- var p = null;
- while (devName == null) {
- if (cnt > 5) break //最多查找5层
- if (ty == 'NODE') p = await player.Native.NodeProxy.getNodeParent(modelsId) //节点类型的node
- else p = await player.Native.ModelTree.getItemInfo(modelsId)
- if (p.name != null && p.name.substr(0, 2) == "C_") {
- devName = p.name
- break
- }
- modelsId = ty == 'NODE' ? p.nodePtr : p.parentItem;
- cnt++
- }
- if (devName == null) {
- CloseWin()
- HideInfo();
- return
- }
- console.log(name, devName)
- if (devName == LastClickObj) {
- if (dbClickTimer != null) clearTimeout(dbClickTimer)
- HideInfo();
- //双击
- if (openState) return //窗口已经打开
- OpenWin(devName)
- return
- }
- CloseWin();
- HideInfo();
- LastClickObj = devName
- dbClickTimer = setTimeout(function (n) {
- ShowInfo(n)
- LastClickObj = null
- }, 200, devName)
- }
- function search() {
- var v = $.trim($("#search input:eq(0)").val());
- var s2 = $("#search_result")
- if (v == "") {
- s2.html("").hide();
- return
- }
- var lst = [];
- for (var k in modelsMap) {
- if (k.indexOf(v) > -1) {
- lst.push('<div class="item" devno="' + k + '">' + k.replace("C_", "") + '</div>')
- }
- }
- s2.html(lst.join("")).show();
- if (lst.length == 0) {
- s2.html('未搜索到任何设备')
- return
- }
- s2.find(".item").off().on('click', function () {
- ShowInfo($(this).attr('devno'))
- })
- }
- //打开单设备窗口
- function OpenWin(name) {
- if (LastClickObj != null && name != LastClickObj) return;
- openState = true
- name = name.replace("C_", "")
- $("#newwin .content .btn").removeClass("btn_active");
- $("#newwin .content .btn:eq(0)").addClass("btn_active");
- $("#newwin .content .btn").off().on("click", function () {
- if ($(this).hasClass("btn_active")) return
- $("#newwin .content .btn").removeClass("btn_active");
- $(this).addClass("btn_active");
- LoadDevDetail(name, window.Device_Data, $(this).index())
- })
- $.getJSON(SERVER_URL + "/query/C_" + name + "?week=1", {}, function (res) {
- if (res.code == 500) {
- NoneDevice(name)
- return
- }
- $("#newwin .title .text:eq(0)").html(name)
- $("#newwin").show();
- window.Device_Data = res.data
- LoadDevDetail(name, window.Device_Data, "0")
- })
- }
- //设备还未接入
- function NoneDevice(name) {
- $("#nodevice .title .text").html(name + "#经编机-基本信息")
- $("#nodevice").show().find(".content").html('该设备还未接入数据平台');
- }
- //关闭窗口
- function CloseWin() {
- LastClickObj = null
- openState = false
- window.Device_Data = null;
- $("#newwin,#nodevice").hide();
- }
- //显示设备基本信息
- async function ShowInfo(name) {
- var se = modelsMap[name];// await player.Native.ModelTree.findItemByName(name,0,true,3);
- //选中
- player.Native.ModelTree.setSelectItem(se.item);
- var calcInfo = await PlayerUtils.call(player.Native.ModelTree.calcItemAabb, se.item);
- //调整目标对象的视角和角度
- if(se.rowno%2==0){
- // 面索引,0表示不定位视角,可设置一个面,也可设置两个或三个面进行组合
- // Top = 1
- // Bottom = 2
- // Front = 4
- // Back = 8
- // Left = 16
- // Right = 32,
- //移动到目标并放大
- player.Native.Camera.moveToAabbWithDistance([calcInfo.localAabb.min, [calcInfo.localAabb.max[0],calcInfo.localAabb.max[1],calcInfo.localAabb.max[2]-1]], 0.2, 9, 0.5);
- }else{
- //backMasterView();
- player.Native.Camera.moveToAabbWithDistance([calcInfo.localAabb.min, [calcInfo.localAabb.max[0],calcInfo.localAabb.max[1],calcInfo.localAabb.max[2]-1]], 0.2, 5, 0.5);
- }
- //player.Native.Camera.moveToAabbWithDistance([calcInfo.localAabb.min, calcInfo.localAabb.max], 0.2, 21, 4);
- name = name.replace("C_", "")
- $.getJSON(SERVER_URL + "/query/C_" + name, {}, function (res) {
- if (res.code == 500) {
- NoneDevice(name)
- return
- }
- $("#showinfo .title .text").html(name + "#经编机-基本信息")
- $("#showinfo").show();
- LoadDevBaseData(res.data.data, "C_" + name)
- })
- }
- //隐藏设备基本信息
- function HideInfo() {
- $("#showinfo,#nodevice").hide();
- }
- function LoadDevBaseData(data, devno) {
- var t = $("#showinfo .content");
- //盘头剩余时间
- var tb = t.find("table:eq(0)>tbody>tr:eq(2)");
- tb.find("td:eq(0)").html(data.Capacity_data_5);
- tb.find("td:eq(1)").html(data.Capacity_data_6);
- tb.find("td:eq(2)").html(data.Capacity_data_7);
- tb.find("td:eq(3)").html(data.Capacity_data_8);
- tb.find("td:eq(4)").html(data.Capacity_data_9);
- //盘头剩余周长
- tb = t.find("table:eq(1)>tbody>tr:eq(2)");
- tb.find("td:eq(0)").html(data.Capacity_data_10);
- tb.find("td:eq(1)").html(data.Capacity_data_11);
- tb.find("td:eq(2)").html(data.Capacity_data_12);
- tb.find("td:eq(3)").html(data.Capacity_data_13);
- tb.find("td:eq(4)").html(data.Capacity_data_14);
- //盘头剩余圈数
- tb = t.find("table:eq(2)>tbody>tr:eq(2)");
- tb.find("td:eq(0)").html(data.Capacity_data_15);
- tb.find("td:eq(1)").html(data.Capacity_data_16);
- tb.find("td:eq(2)").html(data.Capacity_data_17);
- tb.find("td:eq(3)").html(data.Capacity_data_18);
- tb.find("td:eq(4)").html(data.Capacity_data_19);
- //盘头剩余比例
- tb = t.find("table:eq(3)>tbody>tr:eq(2)");
- var paninfo = DataFill.Pan[devno]
- for (var i = 0; i < 5; i++) {
- var v = paninfo != null ? paninfo[i] : "-";
- tb.find("td:eq(" + i + ")").html(v).css("color", getPantaoColor(v));
- }
- }
- function getPantaoColor(v) {
- if (v == null || v == "-") return "";
- v = v * 1;
- if (v < 20) return "#" + DEV_ALAR_COLOR;
- else if (v < 50) return "#" + DEV_HINT_COLOR;
- return "";
- }
- function LoadDevDetail(name, data, typecode) {
- if (typecode == null) typecode = "0";
- $("#newwin .dataContent>div").hide()
- var t = $("#newwin .dataContent>div:eq(" + typecode + ")").show();
- if (typecode == "0") {
- //告警周趋势
- t = t.find(".dev_alarm_echarts");
- var alarmWeek = [];
- var times = [];
- var v_series = [];
- for (var i = 0; i < data.alarms.length; i++) {
- var v = data.alarms[i]['value'];
- var tv = data.alarms[i]['time'].split("-")
- times.push(tv[1] + "-" + tv[2])
- if (v != null) alarmWeek.push(v)
- }
- if (alarmWeek.length == 0) {
- t.html('未获取到告警趋势数据')
- } else {
- v_series.push({
- name: "",
- type: 'line',
- smooth: true,
- //symbol: 'none',
- data: alarmWeek,
- itemStyle: {
- normal: {
- color: '#F0F275', // 这里设置折线的颜色
- lineStyle: {
- color: '#F0F27560' // 这里同时设置线头的颜色
- }
- }
- },
- });
- var opt = {
- title: {
- show: false, //不显示标题
- text: '',
- textStyle: {
- color: "rgb(89, 151, 229)",
- fontWeight: "bold"
- },
- top: "0px",
- left: "30px"
- },
- tooltip: {
- trigger: 'axis',
- formatter: function (params) {
- let xv='';
- let result = '';
- params.forEach(function (item) {
- xv=`${item.name}<br/>`;
- result += ` ${item.marker} ${item.value}(次)<br/>`;
- });
- return xv+result;
- }
- },
- legend: {
- show: false, //不显示图例
- inactiveColor: "#04417A",
- data: "",
- textStyle: {color: "#fff"},
- top: "0px"
- },
- grid: {
- left: '1%',
- right: '1%',
- bottom: '2%',
- top: '5%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- axisLabel: {
- rotate: 45,
- color: "#fff"
- },
- data: times
- },
- yAxis: {
- type: 'value',
- nameTextStyle: {
- color: "#fff"
- },
- axisLabel: {
- color: "rgb(203,215,235)"
- },
- splitLine: {
- lineStyle: {
- color: "#7DA7CD",
- type: "dashed",
- width: 1
- }
- }
- },
- series: v_series
- };
- var echartsEle = echarts.init(t[0]);
- echartsEle.setOption(opt);
- }
- //当前告警数据加载
- if (DataFill.AlarmData == null || DataFill.AlarmData.length == 0) {
- $(".newwin .dataContent .no_alarm").show();
- $(".newwin .dataContent .has_alarm").hide();
- return
- }
- var t1 = [];
- for (var i = 0; i < DataFill.AlarmData.length; i++) {
- if (DataFill.AlarmData[i].code == 'C_' + name) {
- t1.push(DataFill.AlarmType[DataFill.AlarmData[i].type])
- }
- }
- if (t1.length == 0) {
- $(".newwin .dataContent .no_alarm").show();
- $(".newwin .dataContent .has_alarm").hide();
- return
- }
- $(".newwin .dataContent .no_alarm").hide();
- var a1 = $(".newwin .dataContent .has_alarm").show().html("");
- for (var i = 0; i < t1.length; i++) {
- a1.append('<span class="alarm_span"><img src="image/alarm_icon.png" style="vertical-align: middle;"><b>' + t1[i] + '</b></span>')
- }
- } else {
- t.find(".value").each(function () {
- var th = $(this), attrname = th.attr("attr"), unit = th.attr("unit"), v = data.data[attrname];
- if (v == "true") v = "开";
- if (v == "false") v = "关";
- if (unit != "") th.html(v + "(" + th.attr("unit") + ")")
- else th.html(v)
- })
- }
- }
- </script>
|