index.vue 141 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895
  1. <template>
  2. <div>
  3. <div class="main-title">矿井井下人员定位系统</div>
  4. <Tabs :tabs="tabs" :tabs_settings="tabs_settings" :tabIndex="tabIndex" class="main-tab"
  5. @tabIndexChanged="tabIndexUpdate"/>
  6. <!-- <SearchBarMain /> -->
  7. <SearchBar
  8. class="search-container"
  9. v-model="inputValue"
  10. @focus="onFocus"
  11. @input="onInput"
  12. @blur="onBlur"
  13. ref="searchbar"
  14. />
  15. <div class="ordinary-map-ex">
  16. <div class="square-count">
  17. <status-bar
  18. :ready="readyCount"
  19. :occupied="occupiedCount"
  20. :offline="offlineCount"
  21. ></status-bar>
  22. </div>
  23. </div>
  24. <div class="container" v-show="isOpen3d" key="container">
  25. <div class="vr-bg" id="vr-bg-container"></div>
  26. <div id="player" style="width: 100%; height: 100%"></div>
  27. <div style="position: relative;">
  28. <div class="main-tab" style="width: 100%; margin-left: 2vw;">
  29. <TabList
  30. :tabs="tabs"
  31. :tabs_settings="tabs_settings"
  32. :divWidth=30></TabList>
  33. </div>
  34. <div class="vr-bg" id="vr-bg-container"></div>
  35. <div id="playersmall">
  36. <div
  37. v-for="(item, key) in benchList"
  38. :key="key"
  39. class="bmMapItem el-icon-location"
  40. :style="{
  41. left: item.left + 'px',
  42. top: item.top + 'px',
  43. }"
  44. :class="item.status"
  45. @mouseover="bmMapItemSelect(key)"
  46. >
  47. <Transition v-if="item.selected">
  48. <template>
  49. <div
  50. class="bmMapItemInfo"
  51. :class="{
  52. bmMapItemInfoSelected: item.selected,
  53. }"
  54. >
  55. <span>
  56. {{ item.name }}
  57. </span>
  58. <span style="display: flex; align-items: center">
  59. {{ item.Project }}
  60. </span>
  61. <div style="width: 100%">
  62. <span
  63. class="bmInfoMsSlideNameStatus"
  64. :class="{
  65. ['bmInfoMsSlideNameStatus ' + item.status]: true,
  66. }"
  67. ></span>
  68. </div>
  69. </div>
  70. </template>
  71. </Transition>
  72. </div>
  73. </div>
  74. </div>
  75. <div>
  76. <div>
  77. <div class="ordinary-map-hidden" v-show="false">
  78. <div class="ordinary-map-blocker" id="ordinary-map-blocker">
  79. </div>
  80. </div>
  81. </div>
  82. <div v-show="isConnected && !isOpenSquare && !isOpen" class="origin-map">
  83. <Transition name="slide">
  84. <div class="bmMap" v-if="false">
  85. <dropdown :is-open="isOpen" ref="dropdown">
  86. <template v-slot:table>
  87. <table-component
  88. :data="benchList"
  89. :filters="filters"
  90. :row-class-name="rowClassName"
  91. ></table-component>
  92. </template>
  93. </dropdown>
  94. <div class="bmMapImage">
  95. <div
  96. v-for="(item, key) in benchList"
  97. :key="key"
  98. class="bmMapItem el-icon-location"
  99. :style="{
  100. left: item.left + '%',
  101. top: item.top + '%',
  102. }"
  103. :class="item.status"
  104. @click="bmMapItemSelect(key)"
  105. >
  106. <Transition v-if="item.selected">
  107. <template>
  108. <div
  109. class="bmMapItemInfo"
  110. :class="{
  111. bmMapItemInfoSelected: item.selected,
  112. }"
  113. >
  114. <span>
  115. {{ item.name }}
  116. </span>
  117. <span style="display: flex; align-items: center">
  118. {{ item.Project }}
  119. </span>
  120. <div style="width: 100%">
  121. <span
  122. class="bmInfoMsSlideNameStatus"
  123. :class="{
  124. ['bmInfoMsSlideNameStatus ' + item.status]: true,
  125. }"
  126. ></span>
  127. </div>
  128. <!-- <div class="bmMapItemInfoAfter"></div> -->
  129. </div>
  130. </template>
  131. </Transition>
  132. </div>
  133. </div>
  134. </div>
  135. </Transition>
  136. <Transition name="slide">
  137. <div class="bmBench" v-if="benchDisplayVisible">
  138. <div class="bmBenchBox">
  139. <img
  140. class="bmBenchImg bmBenchImgUpper"
  141. ref="bmBenchRef"
  142. :src="
  143. currentScreen == 'upper' ? benchImgUpper : benchImgLower
  144. "
  145. alt=""
  146. />
  147. <div
  148. @mousedown="controlCursorMouseDown"
  149. @mousemove="controlCursorMouseMove"
  150. @mouseleave="controlCursorMouseOut"
  151. @mouseup="controlCursorMouseUp"
  152. class="bmBenchTrailUpper"
  153. >
  154. <Transition>
  155. <div
  156. v-if="ifBmBenchTrailUpperCursorTap"
  157. class="bmBenchTrailUpperCursorTap"
  158. :style="{
  159. left: trailCursorPosition.left,
  160. top: trailCursorPosition.top,
  161. }"
  162. ></div>
  163. </Transition>
  164. <Transition>
  165. <div
  166. v-if="ifBmBenchTrailUpperCursorSwipe"
  167. class="bmBenchTrailUpperCursorSwipe"
  168. :style="{
  169. left: 'calc(' + trailCursorPosition.left + '% - 1vh)',
  170. top: 'calc(' + trailCursorPosition.top + '% - 1vh)',
  171. }"
  172. ></div>
  173. </Transition>
  174. <Transition>
  175. <div
  176. v-if="ifBmBenchTrailUpperCursorSwipe"
  177. class="bmBenchTrailUpperCursorSwipe bmBenchTrailUpperCursorSwipe2"
  178. :style="{
  179. left:
  180. 'calc(' + trailCursorPosition.left + '% - 0.75vh)',
  181. top: 'calc(' + trailCursorPosition.top + '% - 0.75vh)',
  182. }"
  183. ></div>
  184. </Transition>
  185. <Transition>
  186. <div
  187. v-if="ifBmBenchTrailUpperCursorSwipe"
  188. class="bmBenchTrailUpperCursorSwipe bmBenchTrailUpperCursorSwipe3"
  189. :style="{
  190. left: 'calc(' + trailCursorPosition.left + '% - 0.5vh)',
  191. top: 'calc(' + trailCursorPosition.top + '% - 0.5vh)',
  192. }"
  193. ></div>
  194. </Transition>
  195. <Transition>
  196. <div
  197. v-if="ifBmBenchTrailUpperCursorPress"
  198. class="bmBenchTrailUpperCursorPress"
  199. :style="{
  200. left: 'calc(' + trailCursorPosition.left + '% - 1vh)',
  201. top: 'calc(' + trailCursorPosition.top + '% - 1vh)',
  202. }"
  203. ></div>
  204. </Transition>
  205. <Transition>
  206. <div
  207. v-if="ifBmBenchTrailUpperCursor"
  208. class="bmBenchTrailUpperCursor"
  209. :style="{
  210. left:
  211. 'calc(' + controlCursorPosition.left + 'px - 1vh)',
  212. top: 'calc(' + controlCursorPosition.top + 'px - 1vh)',
  213. }"
  214. ></div>
  215. </Transition>
  216. </div>
  217. </div>
  218. </div>
  219. </Transition>
  220. <img :src="mainSnapshot" />
  221. </div>
  222. <image-list
  223. v-show="isConnected && !isOpenSquare && !isOpen"
  224. :images="images"
  225. :page-size="pageSize"
  226. :current-page="currentPage"
  227. :current-bench="connetedBenchId"
  228. @handleImageClick="handleImageClick"
  229. @prev-page="prevPage"
  230. @next-page="nextPage"
  231. class="image-container"
  232. />
  233. <el-row v-show="isConnected && !isOpenSquare && !isOpen" class="bench-button">
  234. <el-col :span="5" class="btn-item" style="text-align: center">{{
  235. currentBench && currentBench.name
  236. }}</el-col>
  237. <el-col
  238. :span="3"
  239. class="btn-item"
  240. :class="{ benchBtnActive: isPlaying }"
  241. >
  242. <img
  243. @click="connectAudioDevice('collectAudio')"
  244. src="../../images/sound.png"
  245. />
  246. </el-col>
  247. <el-col
  248. :span="3"
  249. class="btn-item"
  250. :class="{ benchBtnActive: isRecording }"
  251. >
  252. <img
  253. @click="connectAudioDevice('playAudio')"
  254. src="../../images/mic.png"
  255. />
  256. </el-col>
  257. <el-col
  258. :span="3"
  259. class="btn-item"
  260. :class="{ benchBtnActive: displayTapMode }"
  261. >
  262. <img @click="tapModeControl" src="../../images/pointer.png" />
  263. </el-col>
  264. <el-col :span="3" class="btn-item" v-show="false">
  265. <img @click="showLogBox" src="../../images/book.png" />
  266. </el-col>
  267. <el-col :span="3" class="btn-item">
  268. <img @click="pressPtt" src="../../images/robot.png" />
  269. </el-col>
  270. <!-- <el-col :span="3" class="btn-item" @click="clickBenchList">
  271. <img @click="gotoGrid" src="../../images/grid.png" />
  272. </el-col> -->
  273. <el-col :span="3" class="btn-item">
  274. <img @click="disconnectBench" src="../../images/disconnect.png" />
  275. </el-col>
  276. </el-row>
  277. </div>
  278. <div class="origin-right">
  279. <div class="ordinary-list">
  280. <TabList
  281. :tabs="tabs"
  282. :itemRender="itemRender"
  283. :planRender="planRender"
  284. :taskRender="taskRender"
  285. :issueRender="issueRender"
  286. :planList="planList"
  287. :caseList="caseList"
  288. :autoCaseList="autoCaseList"
  289. :is-show-auto-case-list="isShowAutoCaseList"
  290. :planName="planName"
  291. :taskName="taskName"
  292. :caseName="caseName"
  293. :is-show-plan-list="isShowPlanList"
  294. :is-show-task-list="isShowTaskList"
  295. :is-show-case-commit="isShowCaseCommit"
  296. :is-show-case-list="isShowCaseList"
  297. :is-show-case-detail="isShowCaseDetail"
  298. :clickBackToTaskList="clickBackToTaskList"
  299. :clickBackToPlanList="clickBackToPlanList"
  300. :selectRowPlan="selectRowPlan"
  301. :caseProject="caseProject"
  302. :currentCase="currentCase"
  303. :caseActive="caseActive"
  304. :caseFunction="caseFunction"
  305. caseContent="caseContent"
  306. :isShowAutoCaseCommit="isShowAutoCaseCommit"
  307. @turnNextCase="turnNextCase"
  308. :caseSubFunction="caseSubFunction"
  309. :caseMarket="caseMarket"
  310. :caseLanguage="caseLanguage"
  311. :selectRowCase="selectRowCase"
  312. :clickBackToAutoPlanList="clickBackToAutoPlanList"
  313. :tabClass="tabClass"
  314. :planBack="planBack"
  315. :clickBackToPlan="clickBackToPlan"
  316. :submitManualCase="submitManualCase"
  317. :clickBackToCaseList="clickBackToCaseList"
  318. :isShowIssueList="isShowIssueList"
  319. :isShowIssueDetail="isShowIssueDetail"
  320. :currentIssue="currentIssue"
  321. :currentPlanId="currentPlanId"
  322. :currentPlanName="currentPlanName"
  323. :submitAutoCase="submitAutoCase"
  324. :clickBackToAutoCaseList="clickBackToAutoCaseList"
  325. :clickBackToIssueList="clickBackToIssueList"
  326. :benchDisplayLowerVisible="benchDisplayLowerVisible"
  327. :currentScreen="currentScreen"
  328. :benchImgLower="benchImgLower"
  329. :benchImgUpper="benchImgUpper"
  330. :readyCount="readyCount"
  331. :occupiedCount="occupiedCount"
  332. :offlineCount="offlineCount"
  333. ></TabList>
  334. </div>
  335. </div>
  336. </div>
  337. <div
  338. class="ordinary-container"
  339. key="ordinary-container"
  340. v-show="tabIndex == 0"
  341. @click="onBlur"
  342. >
  343. <div class="ordinary-left">
  344. <SearchBar
  345. class="search-container"
  346. v-model="inputValue"
  347. @focus="onFocus"
  348. @input="onInput"
  349. @blur="onBlur"
  350. ref="searchbar"
  351. />
  352. <div class="square-map" v-show="isOpenSquare && !isOpen">
  353. <el-row>
  354. <el-col v-for="(item, index) in images" :key="item" :span="8">
  355. <div
  356. class="grid-item-background"
  357. :style="{
  358. backgroundColor: item.alt == selectedBenchId ? '#fff': '#000'
  359. }
  360. "
  361. >
  362. <div class="grid-item">
  363. <img
  364. :src="item.url"
  365. @dblclick="handleDblClickImg(item.alt)"
  366. @click="handleClickImg(item.alt, index)"
  367. />
  368. </div>
  369. <div class="grid-item-close">
  370. <img
  371. width="30px"
  372. src="../../images/closeremotebench.png"
  373. @click="handleCloseImg(item.alt)"
  374. />
  375. </div>
  376. </div>
  377. </el-col>
  378. </el-row>
  379. </div>
  380. <div class="filter-bench-list" v-show="isOpen" z-index="9999">
  381. <dropdown :is-open="isOpen" ref="dropdown">
  382. <template v-slot:table>
  383. <table-component
  384. :data="filterBenchList"
  385. :filters="filters"
  386. :row-class-name="rowClassName"
  387. ></table-component>
  388. </template>
  389. </dropdown>
  390. </div>
  391. <div
  392. v-show="!isConnected && !isOpenSquare && !isOpen"
  393. class="ordinary-map-container"
  394. z-index="9998"
  395. >
  396. <div class="ordinary-map" id="ordinary-map">
  397. <!-- <img src="../../images/map.png" /> -->
  398. <div class="vr-bg" id="vr-bg-container"></div>
  399. <div id="playersmall">
  400. <div
  401. v-for="(item, key) in benchList"
  402. :key="key"
  403. class="bmMapItem el-icon-location"
  404. :style="{
  405. left: item.left + 'px',
  406. top: item.top + 'px',
  407. }"
  408. :class="item.status"
  409. @mouseover="bmMapItemSelect(key)"
  410. >
  411. <Transition v-if="item.selected">
  412. <template>
  413. <div
  414. class="bmMapItemInfo"
  415. :class="{
  416. bmMapItemInfoSelected: item.selected,
  417. }"
  418. >
  419. <span>
  420. {{ item.name }}
  421. </span>
  422. <span style="display: flex; align-items: center">
  423. {{ item.Project }}
  424. </span>
  425. <div style="width: 100%">
  426. <span
  427. class="bmInfoMsSlideNameStatus"
  428. :class="{
  429. ['bmInfoMsSlideNameStatus ' + item.status]: true,
  430. }"
  431. ></span>
  432. </div>
  433. <!-- <div class="bmMapItemInfoAfter"></div> -->
  434. </div>
  435. </template>
  436. </Transition>
  437. </div>
  438. </div>
  439. </div>
  440. <div class="ordinary-map-hidden" v-show="false">
  441. <div class="ordinary-map-blocker" id="ordinary-map-blocker">
  442. </div>
  443. </div>
  444. </div>
  445. <div v-show="isConnected && !isOpenSquare && !isOpen" class="origin-map">
  446. <Transition name="slide">
  447. <div class="bmMap" v-if="false">
  448. <dropdown :is-open="isOpen" ref="dropdown">
  449. <template v-slot:table>
  450. <table-component
  451. :data="benchList"
  452. :filters="filters"
  453. :row-class-name="rowClassName"
  454. ></table-component>
  455. </template>
  456. </dropdown>
  457. <div class="bmMapImage">
  458. <div
  459. v-for="(item, key) in benchList"
  460. :key="key"
  461. class="bmMapItem el-icon-location"
  462. :style="{
  463. left: item.left + '%',
  464. top: item.top + '%',
  465. }"
  466. :class="item.status"
  467. @click="bmMapItemSelect(key)"
  468. >
  469. <Transition v-if="item.selected">
  470. <template>
  471. <div
  472. class="bmMapItemInfo"
  473. :class="{
  474. bmMapItemInfoSelected: item.selected,
  475. }"
  476. >
  477. <span>
  478. {{ item.name }}
  479. </span>
  480. <span style="display: flex; align-items: center">
  481. {{ item.Project }}
  482. </span>
  483. <div style="width: 100%">
  484. <span
  485. class="bmInfoMsSlideNameStatus"
  486. :class="{
  487. ['bmInfoMsSlideNameStatus ' + item.status]: true,
  488. }"
  489. ></span>
  490. </div>
  491. <!-- <div class="bmMapItemInfoAfter"></div> -->
  492. </div>
  493. </template>
  494. </Transition>
  495. </div>
  496. </div>
  497. </div>
  498. </Transition>
  499. <Transition name="slide">
  500. <div class="bmBench" v-if="benchDisplayVisible">
  501. <div class="bmBenchBox">
  502. <img
  503. class="bmBenchImg bmBenchImgUpper"
  504. ref="bmBenchRef"
  505. :src="
  506. currentScreen == 'upper' ? benchImgUpper : benchImgLower
  507. "
  508. alt=""
  509. />
  510. <div
  511. @mousedown="controlCursorMouseDown"
  512. @mousemove="controlCursorMouseMove"
  513. @mouseleave="controlCursorMouseOut"
  514. @mouseup="controlCursorMouseUp"
  515. class="bmBenchTrailUpper"
  516. >
  517. <Transition>
  518. <div
  519. v-if="ifBmBenchTrailUpperCursorTap"
  520. class="bmBenchTrailUpperCursorTap"
  521. :style="{
  522. left: trailCursorPosition.left,
  523. top: trailCursorPosition.top,
  524. }"
  525. ></div>
  526. </Transition>
  527. <Transition>
  528. <div
  529. v-if="ifBmBenchTrailUpperCursorSwipe"
  530. class="bmBenchTrailUpperCursorSwipe"
  531. :style="{
  532. left: 'calc(' + trailCursorPosition.left + '% - 1vh)',
  533. top: 'calc(' + trailCursorPosition.top + '% - 1vh)',
  534. }"
  535. ></div>
  536. </Transition>
  537. <Transition>
  538. <div
  539. v-if="ifBmBenchTrailUpperCursorSwipe"
  540. class="bmBenchTrailUpperCursorSwipe bmBenchTrailUpperCursorSwipe2"
  541. :style="{
  542. left:
  543. 'calc(' + trailCursorPosition.left + '% - 0.75vh)',
  544. top: 'calc(' + trailCursorPosition.top + '% - 0.75vh)',
  545. }"
  546. ></div>
  547. </Transition>
  548. <Transition>
  549. <div
  550. v-if="ifBmBenchTrailUpperCursorSwipe"
  551. class="bmBenchTrailUpperCursorSwipe bmBenchTrailUpperCursorSwipe3"
  552. :style="{
  553. left: 'calc(' + trailCursorPosition.left + '% - 0.5vh)',
  554. top: 'calc(' + trailCursorPosition.top + '% - 0.5vh)',
  555. }"
  556. ></div>
  557. </Transition>
  558. <Transition>
  559. <div
  560. v-if="ifBmBenchTrailUpperCursorPress"
  561. class="bmBenchTrailUpperCursorPress"
  562. :style="{
  563. left: 'calc(' + trailCursorPosition.left + '% - 1vh)',
  564. top: 'calc(' + trailCursorPosition.top + '% - 1vh)',
  565. }"
  566. ></div>
  567. </Transition>
  568. <Transition>
  569. <div
  570. v-if="ifBmBenchTrailUpperCursor"
  571. class="bmBenchTrailUpperCursor"
  572. :style="{
  573. left:
  574. 'calc(' + controlCursorPosition.left + 'px - 1vh)',
  575. top: 'calc(' + controlCursorPosition.top + 'px - 1vh)',
  576. }"
  577. ></div>
  578. </Transition>
  579. </div>
  580. </div>
  581. </div>
  582. </Transition>
  583. <img :src="mainSnapshot" />
  584. </div>
  585. <image-list
  586. v-show="isConnected && !isOpenSquare && !isOpen"
  587. :images="images"
  588. :page-size="pageSize"
  589. :current-page="currentPage"
  590. :current-bench="connetedBenchId"
  591. @handleImageClick="handleImageClick"
  592. @prev-page="prevPage"
  593. @next-page="nextPage"
  594. class="image-container"
  595. />
  596. <el-row v-show="isConnected && !isOpenSquare && !isOpen" class="bench-button">
  597. <el-col :span="5" class="btn-item" style="text-align: center">{{
  598. currentBench && currentBench.name
  599. }}</el-col>
  600. <el-col
  601. :span="3"
  602. class="btn-item"
  603. :class="{ benchBtnActive: isPlaying }"
  604. >
  605. <img
  606. @click="connectAudioDevice('collectAudio')"
  607. src="../../images/sound.png"
  608. />
  609. </el-col>
  610. <el-col
  611. :span="3"
  612. class="btn-item"
  613. :class="{ benchBtnActive: isRecording }"
  614. >
  615. <img
  616. @click="connectAudioDevice('playAudio')"
  617. src="../../images/mic.png"
  618. />
  619. </el-col>
  620. <el-col
  621. :span="3"
  622. class="btn-item"
  623. :class="{ benchBtnActive: displayTapMode }"
  624. >
  625. <img @click="tapModeControl" src="../../images/pointer.png" />
  626. </el-col>
  627. <el-col :span="3" class="btn-item" v-show="false">
  628. <img @click="showLogBox" src="../../images/book.png" />
  629. </el-col>
  630. <el-col :span="3" class="btn-item">
  631. <img @click="pressPtt" src="../../images/robot.png" />
  632. </el-col>
  633. <!-- <el-col :span="3" class="btn-item" @click="clickBenchList">
  634. <img @click="gotoGrid" src="../../images/grid.png" />
  635. </el-col> -->
  636. <el-col :span="3" class="btn-item">
  637. <img @click="disconnectBench" src="../../images/disconnect.png" />
  638. </el-col>
  639. </el-row>
  640. </div>
  641. <div class="origin-right">
  642. <!-- <div class="square-count" v-show="!currentBench.selected && isOpenSquare">
  643. <status-bar
  644. :ready="readyCount"
  645. :occupied="occupiedCount"
  646. :offline="offlineCount"
  647. ></status-bar>
  648. </div> -->
  649. <!-- <div
  650. class="origin-basic"
  651. v-show="currentBench.type == 2 && !isOpenSquare"
  652. @dblclick="handleInfoDblClick(currentBench.benchId)"
  653. >
  654. <h2 @click="bmMapItemActivate">{{ currentBench.name }} 🔗</h2>
  655. <div class="originBasicRow">
  656. <div>
  657. <span>Location:</span>
  658. <span>Automation Lab-7E</span>
  659. </div>
  660. <div>
  661. <span>MU_SW</span>
  662. <span>{{ currentBench.MU_SW }}</span>
  663. </div>
  664. </div>
  665. <div class="originBasicRow">
  666. <div>
  667. <span>Cluster</span>
  668. <span>{{ currentBench.Cluster }}</span>
  669. </div>
  670. <div>
  671. <span>Market</span>
  672. <span>{{ currentBench.Market }}</span>
  673. </div>
  674. </div>
  675. <div class="originBasicRow">
  676. <div>
  677. <span>Box IP</span>
  678. <span>{{ currentBench.ip }}</span>
  679. </div>
  680. <div>
  681. <span>Box Version</span>
  682. <span>{{ currentBench.equipment?.version }}</span>
  683. </div>
  684. </div>
  685. </div> -->
  686. <!-- <div
  687. class="secondScreen"
  688. v-if="benchDisplayLowerVisible && !isOpenSquare"
  689. @click="switchScreen"
  690. >
  691. <img
  692. class="bmBenchImg bmBenchImgLower"
  693. :src="currentScreen == 'upper' ? benchImgLower : benchImgUpper"
  694. alt=""
  695. />
  696. </div> -->
  697. <!--<div
  698. class="origin-basic backgroundBox"
  699. v-show="currentBench.type == 2"
  700. @dblclick="handleInfoDblClick(currentBench.benchId)"
  701. >
  702. <h2 @click="bmMapItemActivate">{{ currentBench.name }} 🔗</h2>
  703. <div class="originBasicRow">
  704. <div>
  705. <span>Location:</span>
  706. <span>Automation Lab-7E</span>
  707. </div>
  708. <div>
  709. <span>MU_SW</span>
  710. <span>{{ currentBench.MU_SW }}</span>
  711. </div>
  712. </div>
  713. <div class="originBasicRow">
  714. <div>
  715. <span>Cluster</span>
  716. <span>{{ currentBench.Cluster }}</span>
  717. </div>
  718. <div>
  719. <span>Market</span>
  720. <span>{{ currentBench.Market }}</span>
  721. </div>
  722. </div>
  723. <div class="originBasicRow">
  724. <div>
  725. <span>Box IP</span>
  726. <span>{{ currentBench.ip }}</span>
  727. </div>
  728. <div>
  729. <span>Box Version</span>
  730. <span>{{ currentBench.equipment?.version }}</span>
  731. </div>
  732. </div>
  733. </div>
  734. <div
  735. class="secondScreen"
  736. v-if="benchDisplayLowerVisible"
  737. @click="switchScreen"
  738. >
  739. <img
  740. class="bmBenchImg bmBenchImgLower"
  741. :src="currentScreen == 'upper' ? benchImgLower : benchImgUpper"
  742. alt=""
  743. />
  744. </div>-->
  745. <div class="ordinary-list">
  746. <TabList
  747. :tabs="tabs"
  748. :itemRender="itemRender"
  749. :planRender="planRender"
  750. :taskRender="taskRender"
  751. :issueRender="issueRender"
  752. :planList="planList"
  753. :caseList="caseList"
  754. :autoCaseList="autoCaseList"
  755. :is-show-auto-case-list="isShowAutoCaseList"
  756. :planName="planName"
  757. :taskName="taskName"
  758. :caseName="caseName"
  759. :is-show-plan-list="isShowPlanList"
  760. :is-show-task-list="isShowTaskList"
  761. :is-show-case-commit="isShowCaseCommit"
  762. :is-show-case-list="isShowCaseList"
  763. :is-show-case-detail="isShowCaseDetail"
  764. :clickBackToTaskList="clickBackToTaskList"
  765. :clickBackToPlanList="clickBackToPlanList"
  766. :selectRowPlan="selectRowPlan"
  767. :caseProject="caseProject"
  768. :currentCase="currentCase"
  769. :caseActive="caseActive"
  770. :caseFunction="caseFunction"
  771. caseContent="caseContent"
  772. :isShowAutoCaseCommit="isShowAutoCaseCommit"
  773. @turnNextCase="turnNextCase"
  774. :caseSubFunction="caseSubFunction"
  775. :caseMarket="caseMarket"
  776. :caseLanguage="caseLanguage"
  777. :selectRowCase="selectRowCase"
  778. :clickBackToAutoPlanList="clickBackToAutoPlanList"
  779. :tabClass="tabClass"
  780. :planBack="planBack"
  781. :clickBackToPlan="clickBackToPlan"
  782. :submitManualCase="submitManualCase"
  783. :clickBackToCaseList="clickBackToCaseList"
  784. :isShowIssueList="isShowIssueList"
  785. :isShowIssueDetail="isShowIssueDetail"
  786. :currentIssue="currentIssue"
  787. :currentPlanId="currentPlanId"
  788. :currentPlanName="currentPlanName"
  789. :submitAutoCase="submitAutoCase"
  790. :clickBackToAutoCaseList="clickBackToAutoCaseList"
  791. :clickBackToIssueList="clickBackToIssueList"
  792. :benchDisplayLowerVisible="benchDisplayLowerVisible"
  793. :currentScreen="currentScreen"
  794. :benchImgLower="benchImgLower"
  795. :benchImgUpper="benchImgUpper"
  796. :readyCount="readyCount"
  797. :occupiedCount="occupiedCount"
  798. :offlineCount="offlineCount"
  799. ></TabList>
  800. </div>
  801. </div>
  802. </div>
  803. <bench-detail
  804. :is-detail-visible="isDetailVisible"
  805. :is-remote-btn-visible="isRemoteBtnVisible"
  806. :closeDetail="closeDetail"
  807. ref="benchdetail"
  808. :bench="benchDetail"
  809. @changeCurrentBench="changeCurrentBench"
  810. />
  811. <div
  812. class="bmMapItemInfoWater"
  813. v-show="mouseStatus"
  814. :class="{
  815. bmMapItemInfoSelected: mouseStatus,
  816. }"
  817. :style="{ left: mouseX+'px', top: mouseY+'px' }"
  818. >
  819. <span>
  820. {{ mouseBenchDetail.name }}
  821. </span>
  822. <span style="display: flex; align-items: center">
  823. {{ mouseBenchDetail.Project }}
  824. </span>
  825. <div style="width: 100%">
  826. <span
  827. class="bmInfoMsSlideNameStatus"
  828. :class="{
  829. ['bmInfoMsSlideNameStatus ' + mouseBenchDetail.status]: true,
  830. }"
  831. ></span>
  832. </div>
  833. <!-- <div class="bmMapItemInfoAfter"></div> -->
  834. </div>
  835. </div>
  836. </template>
  837. <script>
  838. import "./index.less";
  839. import "./origin.less";
  840. import "./square.less";
  841. import TabList from "../../components/TabList";
  842. import Tabs from "../../components/Tabs"
  843. import SearchBar from "../../components/SearchBar";
  844. import Dropdown from "./components/DropDown";
  845. import TableComponent from "./components/TableComponent";
  846. import BenchDetail from "../../components/BenchDetail";
  847. import StatusBar from "../../components/StatusBar";
  848. //import { benchList } from './api'
  849. import THREE from "three";
  850. import { uwbMain } from "../../uwb-sample";
  851. import { mapState } from "vuex";
  852. import ImageList from "./components/ImageList";
  853. import webSocket from "../../service/ws";
  854. import bus from "../../service/bus";
  855. import { FBXLoader } from "../../FBXLoader.js";
  856. import SearchBarMain from "../../components/SearchBarMain";
  857. const ws = new webSocket();
  858. let that = null;
  859. let wsArray = [];
  860. let wsArrayLength = 0;
  861. for (var iR = 0; iR < 50; iR++) {
  862. const wsRemote = new webSocket();
  863. wsRemote.open().then((res) => {
  864. // console.log("res", res);
  865. });
  866. wsArray.push(wsRemote);
  867. }
  868. export default {
  869. components: {
  870. StatusBar,
  871. TabList,
  872. SearchBar,
  873. Dropdown,
  874. TableComponent,
  875. BenchDetail,
  876. ImageList,
  877. SearchBarMain,
  878. Tabs
  879. },
  880. data() {
  881. return {
  882. inputValue: "",
  883. isDetailVisible: false,
  884. isRemoteBtnVisible: false,
  885. isShowPlanList: false,
  886. isShowCaseList: false,
  887. isShowAutoCaseList: false,
  888. isShowCaseDetail: false,
  889. isShowCaseCommit: false,
  890. isShowIssueList: true,
  891. isShowIssueDetail: false,
  892. isShowAutoCaseCommit: false,
  893. taskName: "",
  894. planName: "",
  895. caseName: "",
  896. caseProject: "",
  897. caseActive: "",
  898. caseFunction: "",
  899. caseSubFunction: "",
  900. caseMarket: "",
  901. caseLanguage: "",
  902. caseContent: "",
  903. isShowTaskList: true,
  904. benchDisplayVisible: false,
  905. mainSnapshot: "",
  906. currentBench: {},
  907. readyCount: 10,
  908. occupiedCount: 5,
  909. offlineCount: 3,
  910. previousSelectedBenchList: [],
  911. selectedBenchList: [],
  912. renderBenchList: true,
  913. filters: [],
  914. currentCase: null,
  915. currentIssue: null,
  916. currentPlanId: null,
  917. currentPlanName: null,
  918. currentCaseIndex: 0,
  919. username: '',
  920. password: '',
  921. tabs: [
  922. {
  923. title: "实时",
  924. list: [
  925. // {
  926. // title: 'Item 1',
  927. // description: '1111111',
  928. // image: 'item1.jpg',
  929. // tag: 'Tag 1'
  930. // },
  931. // {
  932. // title: 'Item 2',
  933. // description: '32222',
  934. // image: 'item2.jpg',
  935. // tag: 'Tag 2'
  936. // },
  937. // {
  938. // title: 'Item 3',
  939. // description: '1111111',
  940. // image: 'item3.jpg',
  941. // tag: 'Tag 3'
  942. // }
  943. ],
  944. },
  945. {
  946. title: "历史",
  947. list: [
  948. {
  949. itemtype: 2,
  950. title: "Item 4",
  951. description: "1111111",
  952. image: "item4.jpg",
  953. tag: "Tag 4",
  954. },
  955. {
  956. itemtype: 2,
  957. title: "Item 5",
  958. description: "1111111",
  959. image: "item5.jpg",
  960. tag: "Tag 5",
  961. },
  962. {
  963. itemtype: 2,
  964. title: "Item 6",
  965. description: "1111111",
  966. image: "item6.jpg",
  967. tag: "Tag 6",
  968. },
  969. ],
  970. },
  971. {
  972. title: "告警",
  973. list: [
  974. {
  975. title: "Item 7",
  976. image: "item7.jpg",
  977. tag: "Tag 7",
  978. },
  979. {
  980. title: "Item 8",
  981. image: "item8.jpg",
  982. tag: "Tag 8",
  983. },
  984. {
  985. title: "Item 9",
  986. image: "item9.jpg",
  987. tag: "Tag 9",
  988. },
  989. ],
  990. },
  991. {
  992. title: "报表",
  993. list: [
  994. {
  995. title: "Item 7",
  996. image: "item7.jpg",
  997. tag: "Tag 7",
  998. },
  999. {
  1000. title: "Item 8",
  1001. image: "item8.jpg",
  1002. tag: "Tag 8",
  1003. },
  1004. {
  1005. title: "Item 9",
  1006. image: "item9.jpg",
  1007. tag: "Tag 9",
  1008. },
  1009. ],
  1010. },
  1011. {
  1012. title: "管理",
  1013. list: [
  1014. ],
  1015. },
  1016. ],
  1017. tableData: [
  1018. {
  1019. benchname: "Bench 1",
  1020. project: "Project A",
  1021. carline: "Carline A",
  1022. market: "Market A",
  1023. sw: "SW 1",
  1024. status: "Status A",
  1025. },
  1026. {
  1027. benchname: "Bench 2",
  1028. project: "Project B",
  1029. carline: "Carline B",
  1030. market: "Market B",
  1031. sw: "SW 2",
  1032. status: "Status B",
  1033. },
  1034. // ...
  1035. ],
  1036. currentPage: 1,
  1037. pageSize: 5,
  1038. benchId: "219",
  1039. mainSnapshot: "",
  1040. timer: 0,
  1041. platform: null,
  1042. connetedBenchId: "",
  1043. displayTapMode: false,
  1044. controlCursorPosition: {},
  1045. ifBmBenchTrailUpperCursorTap: false,
  1046. benchLog: [],
  1047. trailCursorPosition: {},
  1048. audioName: "",
  1049. ifBmBenchTrailUpperCursorSwipe: false,
  1050. ifBmBenchTrailUpperCursorPress: false,
  1051. ifBmBenchTrailUpperCursor: false,
  1052. controlStartPoint: {},
  1053. ifShowLogBox: false,
  1054. filterData: {
  1055. keyword: "",
  1056. currentPage: 1,
  1057. pageSize: 10,
  1058. status: [4, 3, 5, 0, 2, 6],
  1059. types: [],
  1060. "basic attributes": [],
  1061. ips: [],
  1062. orderBy: "desc",
  1063. orderkey: "id",
  1064. },
  1065. benchImgUpper: "",
  1066. benchImgUpperMap: {},
  1067. currentScreen: "upper",
  1068. benchDisplayLowerVisible: false,
  1069. benchImgLower: "",
  1070. benchImgLowerMap: {},
  1071. isPlaying: false,
  1072. isRecording: false,
  1073. loopSendAudioTime: null,
  1074. sendAudioString: "",
  1075. vadThreshold: 0,
  1076. recStream: null,
  1077. paAc: null,
  1078. paSource: null,
  1079. paScriptNode: null,
  1080. sempleRateMultiple: null,
  1081. recordSuperposeArr: [],
  1082. sempleRateHandlingThreshold: null,
  1083. playAudioBenchList: [],
  1084. isConnected: false,
  1085. currentBenchId: 0,
  1086. gridItems: [1, 2, 3, 4, 5, 6, 7, 8, 9],
  1087. timerIdMap: { num: 0 },
  1088. timerId: 0,
  1089. autoPlanResultInterval: 0,
  1090. remoteBenchList: [],
  1091. waterdotrefresh: false,
  1092. selectedBenchId: 0,
  1093. benchDetail: {},
  1094. mouseBenchDetail: [
  1095. {
  1096. title: "Item 7",
  1097. image: "item7.jpg",
  1098. tag: "Tag 7",
  1099. },
  1100. {
  1101. title: "Item 8",
  1102. image: "item8.jpg",
  1103. tag: "Tag 8",
  1104. },
  1105. {
  1106. title: "Item 9",
  1107. image: "item9.jpg",
  1108. tag: "Tag 9",
  1109. },
  1110. ],
  1111. tabIndex:0,
  1112. tabs_settings: [
  1113. {
  1114. title: "卡号管理",
  1115. list: [
  1116. ],
  1117. },
  1118. {
  1119. title: "人员管理",
  1120. list: [
  1121. {
  1122. itemtype: 2,
  1123. title: "Item 4",
  1124. description: "1111111",
  1125. image: "item4.jpg",
  1126. tag: "Tag 4",
  1127. },
  1128. {
  1129. itemtype: 2,
  1130. title: "Item 5",
  1131. description: "1111111",
  1132. image: "item5.jpg",
  1133. tag: "Tag 5",
  1134. },
  1135. {
  1136. itemtype: 2,
  1137. title: "Item 6",
  1138. description: "1111111",
  1139. image: "item6.jpg",
  1140. tag: "Tag 6",
  1141. },
  1142. ],
  1143. },
  1144. {
  1145. title: "部门管理",
  1146. list: [
  1147. {
  1148. title: "Item 7",
  1149. image: "item7.jpg",
  1150. tag: "Tag 7",
  1151. },
  1152. {
  1153. title: "Item 8",
  1154. image: "item8.jpg",
  1155. tag: "Tag 8",
  1156. },
  1157. {
  1158. title: "Item 9",
  1159. image: "item9.jpg",
  1160. tag: "Tag 9",
  1161. },
  1162. ],
  1163. },
  1164. {
  1165. title: "设备管理",
  1166. list: [
  1167. {
  1168. title: "Item 7",
  1169. image: "item7.jpg",
  1170. tag: "Tag 7",
  1171. },
  1172. {
  1173. title: "Item 8",
  1174. image: "item8.jpg",
  1175. tag: "Tag 8",
  1176. },
  1177. {
  1178. title: "Item 9",
  1179. image: "item9.jpg",
  1180. tag: "Tag 9",
  1181. },
  1182. ],
  1183. },
  1184. {
  1185. title: "拓扑关系管理",
  1186. list: [
  1187. {
  1188. title: "Item 7",
  1189. image: "item7.jpg",
  1190. tag: "Tag 7",
  1191. },
  1192. {
  1193. title: "Item 8",
  1194. image: "item8.jpg",
  1195. tag: "Tag 8",
  1196. },
  1197. {
  1198. title: "Item 9",
  1199. image: "item9.jpg",
  1200. tag: "Tag 9",
  1201. },
  1202. ],
  1203. },
  1204. {
  1205. title: "用户管理",
  1206. list: [
  1207. {
  1208. title: "Item 7",
  1209. image: "item7.jpg",
  1210. tag: "Tag 7",
  1211. },
  1212. {
  1213. title: "Item 8",
  1214. image: "item8.jpg",
  1215. tag: "Tag 8",
  1216. },
  1217. {
  1218. title: "Item 9",
  1219. image: "item9.jpg",
  1220. tag: "Tag 9",
  1221. },
  1222. ],
  1223. },
  1224. {
  1225. title: "角色管理",
  1226. list: [
  1227. {
  1228. title: "Item 7",
  1229. image: "item7.jpg",
  1230. tag: "Tag 7",
  1231. },
  1232. {
  1233. title: "Item 8",
  1234. image: "item8.jpg",
  1235. tag: "Tag 8",
  1236. },
  1237. {
  1238. title: "Item 9",
  1239. image: "item9.jpg",
  1240. tag: "Tag 9",
  1241. },
  1242. ],
  1243. },
  1244. ],
  1245. };
  1246. },
  1247. computed: {
  1248. // tabClass(){
  1249. // return 'ordinary';
  1250. // },
  1251. tabClass() {
  1252. return this.currentBench.type == 2 ? "short" : "long";
  1253. },
  1254. ...mapState({
  1255. isOpen: (state) => {
  1256. return state.common.isOpen
  1257. },
  1258. mouseX: (state) => {
  1259. return state.benchList.mouseoverx
  1260. },
  1261. mouseY: (state) => {
  1262. return state.benchList.mouseovery
  1263. },
  1264. mouseStatus: (state) => {
  1265. return state.benchList.mouseoverstatus
  1266. },
  1267. mouseBenchId: (state) => {
  1268. return state.benchList.mouseoverbenchid
  1269. },
  1270. images: (state) => {
  1271. console.log(state.benchList.benchImgList, "imageList");
  1272. return state.benchList.benchImgList;
  1273. },
  1274. isOpenSquare: (state) => {
  1275. return state.common.isOpenSquare;
  1276. },
  1277. isOpen3d: (state) => {
  1278. return state.common.isOpen3d;
  1279. },
  1280. benchList: (state) => {
  1281. return state.benchList.benchList;
  1282. },
  1283. taskList: (state) => {
  1284. return state.taskList.taskList;
  1285. },
  1286. planList: (state) => {
  1287. console.log(state.planList.planList, "planList==============");
  1288. let planList = state.planList.planList.concat(
  1289. state.planList.autoPlanList
  1290. );
  1291. planList = planList.sort((p1, p2) => p1.id - p2.id);
  1292. return planList;
  1293. },
  1294. autoPlanList: (state) => {
  1295. return state.planList.autoPlanList;
  1296. },
  1297. caseList: (state) => {
  1298. return state.caseList.caseList;
  1299. },
  1300. autoCaseList: (state) => {
  1301. return state.caseList.autoCaseList;
  1302. },
  1303. issueList: (state) => {
  1304. return state.issueList.issueList;
  1305. },
  1306. autoTaskStatus: (state) => {
  1307. return state.caseList.autoTaskStatusMap[state.caseList.currentTaskIndex];
  1308. },
  1309. filterBenchList: (state) => {
  1310. return state.benchList.filterBenchList.sort((a, b) => {
  1311. let i = 0;
  1312. let j = 0;
  1313. for (let m = 0; m < a.MU_SW.length; m++) {
  1314. i += a.MU_SW.charCodeAt(m);
  1315. }
  1316. for (let n = 0; n < b.MU_SW.length; n++) {
  1317. j += b.MU_SW.charCodeAt(n);
  1318. }
  1319. return i - j;
  1320. });
  1321. },
  1322. autoTaskStatusMap: (state) => {
  1323. return state.caseList.autoTaskStatusMap
  1324. },
  1325. autoTaskPercentMap: (state) => {
  1326. return state.caseList.autoTaskPercentMap
  1327. }
  1328. }),
  1329. },
  1330. created() {
  1331. return;
  1332. // uwbMain("player", window.innerWidth, window.innerHeight, "panorama");
  1333. ws.open().then((res) => {
  1334. // console.log("res", res);
  1335. });
  1336. window.handleListClick = this.handleListClick;
  1337. window.handleBenchClick = this.handleBenchClick;
  1338. window.handleClickTask = this.handleClickTask.bind(this);
  1339. window.selectRowPlan = this.selectRowPlan.bind(this);
  1340. window.selectRowCase = this.selectRowCase.bind(this);
  1341. window.selectRowIssue = this.selectRowIssue.bind(this);
  1342. window.handleListDbClick = this.handleListDbClick;
  1343. window.showBenchPos = this.showBenchPos;
  1344. window.handleClickImg = this.handleClickImg;
  1345. let that = this;
  1346. window.bmMapItemSelect = this.bmMapItemSelect.bind(this);
  1347. window.bmMapItemUnSelect = this.bmMapItemUnSelect.bind(this);
  1348. window.handleClickIssue = this.handleClickIssue.bind(this);
  1349. window.selectBench = this.selectBench.bind(this);
  1350. that.$store.dispatch("taskList/clearTaskList");
  1351. that.$store.dispatch("taskList/fetchTaskList", {
  1352. page_num: 1,
  1353. page_size: 1000,
  1354. });
  1355. window.bmMapItemActivate = this.bmMapItemActivate;
  1356. // 调用定时器方法,返回定时器id,用于按条件清空
  1357. that.timerId = that.myInterval((count) => {
  1358. // console.log(count)
  1359. this.$store.dispatch("benchList/fetchBenchList");
  1360. if (!this.waterdotrefresh) {
  1361. this.waterdotrefresh = true;
  1362. window.getsqlData(window.sdkInstance, window.uwbInstance,true)
  1363. }
  1364. this.refreshBenchStatus()
  1365. if (count > 30000) {
  1366. console.log("end");
  1367. that.clearMyInterval(that.timerId);
  1368. }
  1369. }, 10000);
  1370. setTimeout(() => {
  1371. this.$store.dispatch("benchList/fetchBenchList");
  1372. if (!this.waterdotrefresh) {
  1373. window.getsqlData(window.sdkInstance, window.uwbInstance,false)
  1374. }
  1375. this.refreshBenchStatus()
  1376. },2000)
  1377. this.$store.dispatch("issueList/fetchIssueList", {
  1378. bench_id: null,
  1379. page_num: 1,
  1380. page_size: 10,
  1381. processor: 0,
  1382. ticket_status: 0,
  1383. ticket_type: 0,
  1384. });
  1385. },
  1386. async mounted() {
  1387. return;
  1388. that = this;
  1389. //this.getBenchList();
  1390. console.log(this.benchList, "benchList");
  1391. this.tabs[0].list = this.benchList;
  1392. this.tabs[1].list = this.taskList;
  1393. this.tabs[2].list = this.issueList;
  1394. let mapDom = document.getElementsByClassName("ordinary-map")[0];
  1395. let style = getComputedStyle(mapDom);
  1396. let width = parseFloat(style.width);
  1397. let height = parseFloat(style.height);
  1398. let ratio = 1.8;
  1399. window.renderWidth = width * ratio;
  1400. window.renderHeight = height * ratio;
  1401. sessionStorage.setItem('3dMode', 0)
  1402. debugger
  1403. uwbMain('player', width * ratio, height * ratio, "floorplan");
  1404. // window.sdkInstance.sceneRenderer.updateScreenSize(width * ratio, height * ratio);
  1405. setTimeout(() => {
  1406. var element = document.getElementById('house-player');
  1407. element.style.marginLeft = ((width - (width * ratio)) / 2) + 'px';
  1408. element.style.marginTop = ((height - (height * ratio)) / 2) + 'px';
  1409. }, 3500)
  1410. setTimeout(() => {
  1411. let self = this;
  1412. var objRBL = this.remoteBenchList;
  1413. if (objRBL) {
  1414. console.log("objRBL", objRBL);
  1415. wsArrayLength = objRBL.length;
  1416. for (var iW = 0; iW < objRBL.length; iW++) {
  1417. var i = JSON.parse(JSON.stringify(iW));
  1418. let benchId = JSON.parse(JSON.stringify(objRBL[i]));
  1419. setTimeout(() => {
  1420. console.log("connect bench", benchId);
  1421. wsArray[i]
  1422. ?.connectBench({ bench_id: String(benchId) })
  1423. .then((res) => {
  1424. console.log("connect bench success", benchId);
  1425. self.getBenchImage(benchId, 1, wsArray[i], () => {});
  1426. })
  1427. .catch((err) => {
  1428. console.log("connect bench failed", benchId);
  1429. this.$message({
  1430. message: "This bench is offline",
  1431. // message: "",
  1432. type: "warning",
  1433. });
  1434. });
  1435. }, iW * 2000);
  1436. }
  1437. }
  1438. }, 3000);
  1439. bus.on("newLog", (param) => {
  1440. if (param.action) {
  1441. this.benchLog.unshift(param);
  1442. // document.getElementsByClassName("bmLogBottom")[0].scrollIntoView();
  1443. if (Object.keys(param.action).length != 0) {
  1444. // console.log("actionType", param.action.actionType);
  1445. let position = param.action.pos;
  1446. // console.log("position", position);
  1447. if (param.action.actionType == "swipe on") {
  1448. this.ifBmBenchTrailUpperCursorSwipe = true;
  1449. this.trailCursorPosition.left = (position[0] / 1540) * 100;
  1450. this.trailCursorPosition.top = (position[1] / 720) * 100;
  1451. setTimeout(() => {
  1452. this.trailCursorPosition.left =
  1453. ((position[0] + position[2]) / 1540) * 100;
  1454. this.trailCursorPosition.top =
  1455. ((position[1] + position[3]) / 720) * 100;
  1456. }, 800);
  1457. setTimeout(() => {
  1458. this.ifBmBenchTrailUpperCursorSwipe = false;
  1459. }, 2000);
  1460. } else if (param.action.actionType == "tap on") {
  1461. this.ifBmBenchTrailUpperCursorTap = true;
  1462. setTimeout(() => {
  1463. this.ifBmBenchTrailUpperCursorTap = false;
  1464. }, 1500);
  1465. this.trailCursorPosition.left =
  1466. "calc(" + ((position[0] * 2) / 1540) * 100 + "% - 1vh)";
  1467. this.trailCursorPosition.top =
  1468. "calc(" + ((position[1] * 2) / 720) * 100 + "% - 1vh)";
  1469. } else if (param.action.actionType == "longPress on") {
  1470. this.ifBmBenchTrailUpperCursorPress = true;
  1471. setTimeout(() => {
  1472. this.ifBmBenchTrailUpperCursorPress = false;
  1473. }, 1500);
  1474. this.trailCursorPosition.left = ((position[0] * 2) / 1540) * 100;
  1475. this.trailCursorPosition.top = ((position[1] * 2) / 720) * 100;
  1476. } else if (param.action.actionType == "audio") {
  1477. // console.log("newLog", param);
  1478. let fileName = param.action.file_name;
  1479. console.log("audiofileName", fileName);
  1480. this.audioName = fileName;
  1481. bus.emit("planAudioEmit");
  1482. }
  1483. }
  1484. }
  1485. if (this.benchLog.length > 100) {
  1486. this.benchLog.pop();
  1487. }
  1488. });
  1489. bus.on("switchScreen", (param) => {
  1490. this.currentScreen = param.currentScreen;
  1491. });
  1492. bus.on("goHome", () => {
  1493. this.isConnected = false;
  1494. this.$store.dispatch("common/setSquareStatus", false);
  1495. this.$store.dispatch("common/setConnectedStatus", false);
  1496. });
  1497. {
  1498. this.autoPlanResultInterval = setInterval(() => {
  1499. let autoCurrentTaskData = window.localStorage.getItem("autoCurrentTaskData");
  1500. let autoCurrentTaskName = window.localStorage.getItem("autoCurrentTaskName");
  1501. autoCurrentTaskData = JSON.parse(autoCurrentTaskData);
  1502. autoCurrentTaskName = JSON.parse(autoCurrentTaskName);
  1503. if (autoCurrentTaskData) {
  1504. for (let planId in autoCurrentTaskData) {
  1505. let planExecId = autoCurrentTaskData[planId];
  1506. if (autoCurrentTaskName) {
  1507. let planName = autoCurrentTaskName[planId];
  1508. if (planName) {
  1509. this.$store.dispatch("caseList/fetchAutoCaseList", {
  1510. planId: planId,
  1511. planName: planName
  1512. });
  1513. }
  1514. }
  1515. this.$store.dispatch("caseList/setPlanExecId", planExecId);
  1516. this.$store.dispatch('caseList/getAutoPlanResult',{planId, planExecId});
  1517. }
  1518. }
  1519. }, 5000);
  1520. }
  1521. },
  1522. methods: {
  1523. changeCurrentBench(benchId) {
  1524. this.isDetailVisible = false;
  1525. if (this.isOpen3d) {
  1526. this.$store.dispatch("common/toggle3dStatus");
  1527. }
  1528. this.selectBench(benchId);
  1529. },
  1530. myInterval(callback, interval) {
  1531. // 每设置一次定时器,num++ 代表系统中有num个自定义的定时器
  1532. this.timerIdMap.num++;
  1533. // 第 num 个定时器的id
  1534. let intervalId = "id" + this.timerIdMap.num;
  1535. this.timerIdMap[intervalId] = true;
  1536. // 循环次数
  1537. let count = 0;
  1538. let startTime = Date.now();
  1539. let loop = () => {
  1540. // 系统map中不存在这个id,就停止循环
  1541. if (!this.timerIdMap[intervalId]) {
  1542. return;
  1543. }
  1544. if (Date.now() > startTime + interval * (count + 1)) {
  1545. count++;
  1546. callback(count);
  1547. }
  1548. window.requestAnimationFrame(loop);
  1549. };
  1550. loop();
  1551. return intervalId;
  1552. },
  1553. // 清空定时器,删除全局的定时器id map
  1554. clearMyInterval(intervalId) {
  1555. delete this.timerIdMap[intervalId];
  1556. },
  1557. turnToNextManualCase() {},
  1558. clickBackToTaskList() {
  1559. this.isShowPlanList = false;
  1560. this.isShowTaskList = true;
  1561. // this.planList = [];
  1562. },
  1563. clickBackToCaseList() {
  1564. this.isShowCaseCommit = false;
  1565. this.isShowCaseList = true;
  1566. },
  1567. submitManualCase(item) {
  1568. console.log(this.currentCase, "manualcasedetail============");
  1569. this.isShowCaseCommit = true;
  1570. this.isShowCaseDetail = false;
  1571. },
  1572. clickBackToIssueList() {
  1573. this.isShowIssueList = true;
  1574. this.isShowIssueDetail = false;
  1575. },
  1576. clickBackToPlan() {
  1577. this.isShowCaseDetail = false;
  1578. if (sessionStorage.getItem("autoCase") == 0) {
  1579. this.isShowCaseList = true;
  1580. } else {
  1581. this.isShowAutoCaseList = true;
  1582. }
  1583. },
  1584. submitAutoCase() {
  1585. if (this.autoTaskStatus == 'waiting' || this.autoTaskStatus == 'running') {
  1586. this.$store.dispatch('caseList/cancelPlan');
  1587. this.clickBackToTaskList()
  1588. this.isShowAutoCaseList = false;
  1589. return
  1590. }
  1591. this.isShowAutoCaseList = false;
  1592. this.isShowAutoCaseCommit = true;
  1593. },
  1594. clickBackToAutoCaseList() {
  1595. this.isShowAutoCaseList = true;
  1596. this.isShowAutoCaseCommit = false;
  1597. },
  1598. tabIndexUpdate(newValue) {
  1599. this.tabIndex = newValue;
  1600. },
  1601. selectRowPlan(id, auto, name) {
  1602. console.log(id, "selectrowdata");
  1603. debugger
  1604. if (!auto || auto == "undefined" || auto == "false") {
  1605. this.currentPlanId = id;
  1606. this.currentPlanName = name;
  1607. this.$store.dispatch("caseList/fetchCaseList", {
  1608. uuid: id,
  1609. page_num: 1,
  1610. page_size: 100,
  1611. });
  1612. this.isShowCaseList = true;
  1613. sessionStorage.setItem("autoCase", 0);
  1614. this.$store.dispatch("caseList/setCurrentTask", id);
  1615. } else {
  1616. if (id == 109) id = 222;
  1617. this.currentPlanId = id;
  1618. this.currentPlanName = name;
  1619. this.$store.dispatch("caseList/setCurrentPlanId", id);
  1620. this.$store.dispatch("caseList/fetchAutoCaseList", {
  1621. planId: id,
  1622. planName: name
  1623. });
  1624. this.isShowAutoCaseList = true;
  1625. this.$store.dispatch("caseList/setCurrentTask", id);
  1626. sessionStorage.setItem("autoCase", 1);
  1627. }
  1628. this.$store.dispatch("common/fetchOptionList");
  1629. this.isShowPlanList = false;
  1630. this.planName = name;
  1631. },
  1632. selectRowCase(row) {
  1633. this.isShowCaseList = false;
  1634. this.isShowCaseDetail = true;
  1635. this.caseName = row.m_id;
  1636. this.caseProject = row.precondition;
  1637. //this.caseActive =,
  1638. this.caseFunction = row.action;
  1639. this.caseSubFunction = row.expectation;
  1640. this.caseMarket = row.market;
  1641. this.caseLanguage = row.language;
  1642. this.currentCase = row;
  1643. for (let i = 0; i < this.caseList.length; i++) {
  1644. if (this.caseList[i].case_no == row.case_no) {
  1645. this.currentCaseIndex = i;
  1646. break;
  1647. }
  1648. }
  1649. //this.caseContent =,
  1650. },
  1651. turnNextCase() {
  1652. this.currentCaseIndex++;
  1653. if (this.currentCaseIndex == this.caseList.length) {
  1654. this.isShowCaseList = true;
  1655. this.isShowCaseCommit = false;
  1656. } else {
  1657. this.currentCase = this.caseList[this.currentCaseIndex];
  1658. this.caseName = this.currentCase.m_id;
  1659. this.caseProject = this.currentCase.precondition;
  1660. //this.caseActive =,
  1661. this.caseFunction = this.currentCase.action;
  1662. this.caseSubFunction = this.currentCase.expectation;
  1663. this.caseMarket = this.currentCase.market;
  1664. this.caseLanguage = this.currentCase.language;
  1665. this.isShowCaseCommit = false;
  1666. this.isShowCaseDetail = true;
  1667. }
  1668. },
  1669. selectRowIssue(id) {
  1670. let row = this.issueList.find((i) => i.id == id);
  1671. this.isShowIssueList = false;
  1672. this.isShowIssueDetail = true;
  1673. this.currentIssue = row;
  1674. console.log(row, "==============issue============");
  1675. },
  1676. clickBackToPlanList() {
  1677. this.isShowPlanList = true;
  1678. this.isShowCaseList = false;
  1679. this.caseList = [];
  1680. },
  1681. clickBackToAutoPlanList() {
  1682. this.isShowPlanList = true;
  1683. this.isShowAutoCaseList = false;
  1684. this.$store.dispatch('caseList/clearAutoCaseList');
  1685. },
  1686. bmMapItemUnSelect() {
  1687. let items = document.getElementsByClassName("item-box");
  1688. for (var index = 0; index < items.length; index++) {
  1689. items[index].style.background = "#00000032";
  1690. let title = items[index].getElementsByClassName("item-title");
  1691. console.log("textContent", title[0].textContent);
  1692. let itemOther = this.benchList.find(
  1693. (b) => parseInt(b.id) == parseInt(title[0].textContent)
  1694. );
  1695. itemOther.selected = false;
  1696. itemOther.scale = 1;
  1697. }
  1698. },
  1699. onFocus() {
  1700. this.$store.dispatch("common/setIsOpen", true);
  1701. this.$store.dispatch('benchList/filterBenchList', {type: 'status', value: 'Status'});
  1702. this.$store.dispatch('benchList/filterBenchList', {type: 'project', value: 'Project'});
  1703. this.$store.dispatch('benchList/filterBenchList', {type: 'carline', value: 'Carline'});
  1704. this.$store.dispatch('benchList/filterBenchList', {type: 'variant', value: 'Variant'});
  1705. this.$store.dispatch('benchList/filterBenchList', {type: 'cluster', value: 'Cluster'});
  1706. this.$store.dispatch('benchList/filterBenchList', {type: 'market', value: 'Market'});
  1707. this.$store.dispatch('benchList/setFilterBenchFlag', true);
  1708. },
  1709. onBlur(e) {
  1710. console.log("=====----====", e.target.classList);
  1711. if (
  1712. Array.prototype.indexOf.call(e.target.classList, "ordinary-left") > -1
  1713. ) {
  1714. this.$store.dispatch("common/setIsOpen", false);
  1715. }
  1716. },
  1717. onInput(value) {
  1718. this.inputValue = value;
  1719. this.$store.dispatch('benchList/filterBenchList', {type: 'name', value: value});
  1720. this.$store.dispatch('benchList/setFilterBenchFlag', true);
  1721. },
  1722. onClickOutside() {
  1723. if (
  1724. this.$refs.searchbar.$el.contains(event.target) ||
  1725. this.$refs.dropdown.$el.contains(event.target)
  1726. ) {
  1727. return;
  1728. }
  1729. this.$store.dispatch("common/setIsOpen", false);
  1730. },
  1731. handleClickTask(taskId, auto) {
  1732. let task = that.taskList.find((t) => t.id == taskId);
  1733. // 获取手动测试plan列表
  1734. let manualList = task.plan_list[1];
  1735. // 获取自动测试plan列表
  1736. let autoList = task.plan_list[2];
  1737. autoList.forEach((at) => {
  1738. that.$store.dispatch("planList/fetchPlanDetail", {
  1739. planId: at < 100 ? at + 101 : at,
  1740. });
  1741. });
  1742. that.isShowPlanList = true;
  1743. that.isShowTaskList = false;
  1744. this.$store.commit("planList/setAutoPlanList", autoList);
  1745. this.$store.commit("planList/setPlanList", manualList);
  1746. that.taskName = task.name;
  1747. this.$nextTick(() => {
  1748. that.$store.dispatch("planList/clearPlanList");
  1749. that.$store.dispatch("planList/fetchPlanList", {
  1750. page_num: 1,
  1751. page_size: 10000,
  1752. });
  1753. });
  1754. console.log(task, "任务详情");
  1755. },
  1756. handleClickIssue(issueId) {
  1757. console.log(issueId, "issueid");
  1758. },
  1759. showBenchPos(benchList) {
  1760. console.log("benchList", benchList);
  1761. for (var item of benchList) {
  1762. var currentBench = this.benchList.find((b) => b.id == item.benchId);
  1763. if (currentBench) {
  1764. //console.log('currentBench',currentBench);
  1765. currentBench.left = item.x - 548 + 48;
  1766. currentBench.top = item.y - 137 - 150 + 11;
  1767. currentBench.benchId = item.benchId;
  1768. currentBench.benchType = item.benchType;
  1769. console.log('item.benchImg',item.benchImg);
  1770. currentBench.image = require("../../assets/bench_img/"+item.benchImg);
  1771. if (currentBench.benchType == 2) {
  1772. //currentBench.image = require("../../assets/mechine2.png");
  1773. } else {
  1774. //currentBench.image = require("../../assets/mechine.png");
  1775. }
  1776. }
  1777. }
  1778. this.renderBenchList = false;
  1779. setTimeout(() => {
  1780. this.renderBenchList = true;
  1781. }, 10);
  1782. },
  1783. planBack() {
  1784. that.isShowPlanList = false;
  1785. that.isShowTaskList = true;
  1786. },
  1787. taskRender(item) {
  1788. return `<div class="item-box" onClick="handleClickTask('${
  1789. item.uuid || item.id
  1790. }', '${item.auto}')">
  1791. <div class="left">
  1792. <div style="">
  1793. <div class="item-title">${item.name}</div>
  1794. <div class="item-description">${item.description}</div>
  1795. </div>
  1796. <div class="item-time">
  1797. <div class="time">${item.start_time}</div>
  1798. to
  1799. <div class="time"> ${item.end_time}</div>
  1800. </div>
  1801. <div class="item-tag">
  1802. <div class="tag">${item.processor_name}</div>
  1803. <div class="tag">${item.sw}</div>
  1804. </div>
  1805. </div>
  1806. <div class="taskBtn" onClick="handleClickTask('${
  1807. item.uuid || item.id
  1808. }', '${item.auto}')">To Do</div>
  1809. </div>`;
  1810. },
  1811. planRender(item) {
  1812. console.log(item, "plan", this.autoTaskStatusMap[item.id]);
  1813. return `<div onClick="selectRowPlan('${item.uuid || item.id}', '${
  1814. item.auto
  1815. }', '${item.name}')" class="item-box" style="display:${
  1816. !item.auto && !item.uuid ? "none" : "flex"
  1817. };align-items: top; justify-content: space-between;color: #fff;">
  1818. <div class="left">
  1819. <div style="display:flex;align-items: center;">
  1820. <div class="item-title">${item.name}</div>
  1821. <div class="process-percent" style="margin-left: 10px; width: 80px">
  1822. <div style="width: ${this.autoTaskPercentMap[item.id] || 0}%; height: 10px; border-radius: 10px;background-image: linear-gradient(-90deg,transparent 0px,#95d475 50px,#95d475)" }"></div>
  1823. </div>
  1824. <div style="width:40px;color:#fff;font-size: 12px;padding-left: 3px">${Number(this.autoTaskPercentMap[item.id] || 0).toFixed(1) || 0}%</div>
  1825. <div class="task-auto" style="display:${
  1826. item.auto ? "block" : "none"
  1827. }">Auto</div>
  1828. </div>
  1829. </div>
  1830. <div style="width: unset; padding: 0 10px;" class="taskBtn ${this.autoTaskStatusMap[item.id] || 'ready'}">${this.autoTaskStatusMap[item.id] || 'ready'}</div>
  1831. </div>`;
  1832. },
  1833. issueRender(item) {
  1834. return `<div class="item-box" style="display:flex; align-items: center;justify-content: space-between;" onClick="selectRowIssue('${
  1835. item.uuid || item.id
  1836. }')">
  1837. <div class="left">
  1838. <div style="display:flex;align-items: center;">
  1839. <div class="item-title" style="width: 20vw; white-space: nowrap; overflow:hidden; text-overflow: ellipsis;">${item.ticket_title}</div>
  1840. <div class="${"status" + item.ticket_status}"></div>
  1841. </div>
  1842. <div class="item-tag">
  1843. <div class="tag">${item.creator}</div>
  1844. <div class="tag">${item.create_time}</div>
  1845. </div>
  1846. </div>
  1847. <div class="${
  1848. item.checked ? "el-icon-circle-check" : "uncheck"
  1849. }"></div>
  1850. </div>`;
  1851. },
  1852. closeDetail() {
  1853. this.isDetailVisible = false;
  1854. },
  1855. rowClassName() {
  1856. return "row-class";
  1857. },
  1858. getImgList(objRBL) {
  1859. console.log("zmg3", objRBL);
  1860. let benchId = objRBL.pop();
  1861. if (benchId == null) {
  1862. console.log("zmg2");
  1863. setTimeout(() => {
  1864. let href = window.location.href;
  1865. if (href.indexOf("benchid=") != -1) {
  1866. let benchid = href.substring(href.indexOf("benchid=") + 8);
  1867. let remoteBenchList = this.remoteBenchList;
  1868. console.log("benchid", benchid);
  1869. console.log(
  1870. "item == benchId",
  1871. remoteBenchList.find((item) => item == benchid)
  1872. );
  1873. if (remoteBenchList.find((item) => item == benchid)) {
  1874. this.selectBench(parseInt(benchid));
  1875. }
  1876. }
  1877. }, 200);
  1878. return;
  1879. }
  1880. let self = this;
  1881. console.log("benchId", benchId);
  1882. ws.connectBench({ bench_id: String(benchId) })
  1883. .then((res) => {
  1884. ws.getImage(String(benchId), 1).then((res) => {
  1885. self.$store.dispatch("benchList/setBenchImgList", {
  1886. benchId,
  1887. img: res.data.data,
  1888. });
  1889. self.getImgList(objRBL);
  1890. });
  1891. })
  1892. .catch((err) => {
  1893. console.log("connect bench failed", benchId);
  1894. self.$message({
  1895. message: "This bench is offline",
  1896. // message: "",
  1897. type: "warning",
  1898. });
  1899. });
  1900. },
  1901. gotoGrid() {
  1902. this.$router.push({
  1903. path: "/squarePage",
  1904. });
  1905. },
  1906. itemRender(item) {
  1907. // console.log(item, 'bench---item')
  1908. //item.image = require("../../assets/mechine.png");
  1909. //item.image = require("../../assets/bench_img/"+item.benchImg);
  1910. /*return `
  1911. <div class="item-box">
  1912. <div class="item-image"><img src="${item.image}" alt="${item.title}"></div>
  1913. <div class="item-right">
  1914. <div class="item-title">
  1915. <span onClick="handleListClick(${item.id})">${item.id}</span>
  1916. <span onClick="selectBench(${item.id})" class="el-icon-s-platform ${item.status}"></span>
  1917. </div>
  1918. <div class="item-text">
  1919. <div class="item-description">Automation Lab-7E</div>
  1920. <div class="item-description">${item.name}</div>
  1921. <div class="item-tag">
  1922. <div class="tag">${item.Market}</div>
  1923. <div class="tag">${item.Platform}</div>
  1924. <div class="tag">${item.Project}</div>
  1925. <div class="tag">${item.Carline}</div>
  1926. <div class="tag">${item.Cluster}</div>
  1927. </div>
  1928. <div class="item-tag">
  1929. <div class="tag">${item.MU_SW}</div>
  1930. <div class="tag">${item.Variant}</div>
  1931. <div class="tag">${item.ip}</div>
  1932. </div>
  1933. </div>
  1934. </div>
  1935. </div>`;*/
  1936. return `
  1937. <div onDblClick="handleListDbClick(${item.id})" data-index="${item.id}" onClick="handleListClick(${item.id})" class="item-box">
  1938. <div class="item-image"><img src="${item.image}" alt="${item.title}"></div>
  1939. <div class="item-right">
  1940. <div class="item-text">
  1941. <div class="item-title">${item.name}
  1942. <span onClick="selectBench(${item.id})" class="el-icon-monitor ${item.status}"></span>
  1943. </div>
  1944. <div class="item-description">Automation Lab-7E</div>
  1945. <div class="item-tag">
  1946. <div class="tag" title="Market">${item.Market}</div>
  1947. <div class="tag" title="Platform">${item.Platform}</div>
  1948. <div class="tag" title="Project">${item.Project}</div>
  1949. <div class="tag" title="Carline">${item.Carline}</div>
  1950. <div class="tag" title="Cluster">${item.Cluster}</div>
  1951. <div class="tag" title="MU_SW">${item.MU_SW}</div>
  1952. <div class="tag" title="Variant">${item.Variant}</div>
  1953. </div>
  1954. </div>
  1955. </div>
  1956. </div>`;
  1957. },
  1958. handleImageClick(index) {
  1959. this.selectBench(
  1960. parseInt(this.images[index + 5 * (this.currentPage - 1)].alt)
  1961. );
  1962. this.handleListClick(parseInt(this.images[index + 5 * (this.currentPage - 1)].alt))
  1963. },
  1964. prevPage() {
  1965. if (this.currentPage > 1) {
  1966. this.currentPage--;
  1967. }
  1968. },
  1969. nextPage() {
  1970. if (this.currentPage < Math.ceil(this.images.length / this.pageSize)) {
  1971. this.currentPage++;
  1972. }
  1973. },
  1974. handleInfoDblClick(benchId) {
  1975. console.log("handleInfoDblClick", benchId);
  1976. this.currentBench = this.benchList.find((b) => b.id == benchId);
  1977. this.isDetailVisible = true;
  1978. },
  1979. getImage() {},
  1980. dataCallBack(data) {
  1981. switch (data.method) {
  1982. case "get_image":
  1983. this.handleGetImageData(data.data.data);
  1984. break;
  1985. }
  1986. console.log(data);
  1987. },
  1988. handleGetImageData(data) {
  1989. this.mainSnapshot = "data:image/jpeg;base64," + data;
  1990. },
  1991. selectBench(benchId) {
  1992. // 全屏选择bench
  1993. this.saveSelectedBenchToLs(benchId);
  1994. var i = JSON.parse(JSON.stringify(wsArrayLength));
  1995. let self = this;
  1996. wsArrayLength++;
  1997. setTimeout(() => {
  1998. console.log("connect bench", benchId);
  1999. wsArray[i]
  2000. ?.connectBench({ bench_id: String(benchId) })
  2001. .then((res) => {
  2002. console.log("connect bench success", benchId);
  2003. self.getBenchImage(benchId, 1, wsArray[i], () => {});
  2004. this.currentBench = this.benchList.find((b) => b.id == benchId) || {};
  2005. this.remoteBenchList.push(benchId)
  2006. this.$store.dispatch("common/setGoHome", false);
  2007. let nList = Array.from(new Set(this.remoteBenchList));
  2008. let len = nList.length;
  2009. if (len > 9) {
  2010. setTimeout(() => {
  2011. let square = document.querySelector('.square-map');
  2012. if (square) {
  2013. square.scrollTo(0, 10000)
  2014. }
  2015. }, 1000)
  2016. }
  2017. })
  2018. .catch((err) => {
  2019. console.log("connect bench failed", benchId);
  2020. this.$message({
  2021. message: "This bench is offline",
  2022. // message: "",
  2023. type: "warning",
  2024. });
  2025. });
  2026. }, 200);
  2027. // 非全屏选择bench
  2028. var objRBL = this.remoteBenchList;
  2029. if (objRBL && objRBL.length > 0) {
  2030. var bExist = false;
  2031. for (var i = 0; i < objRBL.length; i++) {
  2032. if (objRBL[i] == benchId) {
  2033. bExist = true;
  2034. } else {
  2035. }
  2036. }
  2037. if (bExist == false) {
  2038. objRBL.push(benchId);
  2039. this.remoteBenchList.push(benchId)
  2040. this.$store.dispatch('benchList/addRemoteBenchList', benchId);
  2041. }
  2042. } else {
  2043. var rml = [];
  2044. rml.push(benchId);
  2045. this.remoteBenchList.push(benchId)
  2046. this.$store.dispatch('benchList/addRemoteBenchList', benchId);
  2047. }
  2048. console.log("benchList", this.benchList);
  2049. let bench = this.benchList.find((b) => b.id == benchId);
  2050. console.log("selectedBench", bench);
  2051. if (this.previousSelectedBenchList.length) {
  2052. this.selectedBenchList = JSON.parse(
  2053. JSON.stringify(this.previousSelectedBenchList)
  2054. );
  2055. }
  2056. this.previousSelectedBenchList = [];
  2057. this.platform = null;
  2058. this.benchList.forEach((b) => (b.selected = false));
  2059. bench.selected = !bench.selected;
  2060. if (bench.selected) {
  2061. this.currentBench = bench;
  2062. bench.benchId = "'" + bench.benchId + "'";
  2063. this.selectedBenchList.push(bench);
  2064. console.log("selected", this.selectedBenchList);
  2065. // this.images = this.selectedBenchList.map((s) => {
  2066. // return {
  2067. // url: "",
  2068. // alt: s.name,
  2069. // };
  2070. // });
  2071. } else {
  2072. for (let i in this.selectedBenchList) {
  2073. if (this.selectedBenchList[i].id == bench.id) {
  2074. this.selectedBenchList.splice(i, 1);
  2075. // this.images = this.selectedBenchList.map((s) => {
  2076. // return {
  2077. // url: "",
  2078. // alt: s.name,
  2079. // };
  2080. // });
  2081. break;
  2082. }
  2083. }
  2084. }
  2085. if (this.selectedBenchList.length == 0) {
  2086. nextTick(() => {
  2087. self.initBmInfoNsChart();
  2088. });
  2089. } else {
  2090. self.bmMapItemActivate(bench.id, wsArray[i]);
  2091. }
  2092. },
  2093. bmMapItemActivate(benchId, ws) {
  2094. let self = this;
  2095. if (this.selectedBenchList.length == 0) {
  2096. this.$message({
  2097. message: "Please select a bench to activate.",
  2098. // message: "",
  2099. type: "warning",
  2100. });
  2101. return;
  2102. }
  2103. this.selectedBenchList = [this.selectedBenchList[0]];
  2104. console.log("selectedBenchList[0]", this.selectedBenchList);
  2105. let key = 0;
  2106. for (let i in this.benchList) {
  2107. this.benchList[i].selected = false;
  2108. }
  2109. for (let i in this.benchList) {
  2110. if (this.benchList[i].id == benchId) {
  2111. this.benchList[i].selected = true;
  2112. key = i;
  2113. break;
  2114. }
  2115. }
  2116. this.benchList[key].acitveAnimation = true;
  2117. //let benchId = this.benchList[key].benchId;
  2118. this.benchList[key].benchId = benchId;
  2119. let screenType = this.benchList[key].Display;
  2120. this.connetedBenchId = String(benchId);
  2121. // this.connectedBenchData = this.benchList[key];
  2122. setTimeout(() => {
  2123. console.log("connect bench", benchId);
  2124. ws.connectBench({ bench_id: String(benchId) })
  2125. .then((res) => {
  2126. self.isConnected = true;
  2127. this.$store.dispatch("common/setConnectedStatus", true);
  2128. console.log("connect bench success");
  2129. this.currentScreen = "upper";
  2130. self.setSendAudioBus(benchId);
  2131. self.getBenchImage(benchId, 1, ws, () => {
  2132. if (this.benchList[key].acitveAnimation) {
  2133. this.benchList[key].acitveAnimation = false;
  2134. this.benchDisplayVisible = true;
  2135. }
  2136. });
  2137. if (screenType == "DUO") {
  2138. self.getBenchImage(String(benchId), 2, ws, () => {
  2139. if (this.connetedBenchId) {
  2140. this.benchDisplayLowerVisible = true;
  2141. }
  2142. });
  2143. } else {
  2144. this.benchDisplayLowerVisible = false;
  2145. }
  2146. })
  2147. .catch((err) => {
  2148. console.log("connect bench failed");
  2149. this.benchList[key].acitveAnimation = false;
  2150. this.$message({
  2151. message: "This bench is offline",
  2152. // message: "",
  2153. type: "warning",
  2154. });
  2155. });
  2156. }, 300);
  2157. },
  2158. switchScreen() {
  2159. if (this.currentScreen == "upper") {
  2160. this.currentScreen = "lower";
  2161. } else {
  2162. this.currentScreen = "upper";
  2163. }
  2164. console.log("this.currentScreen", this.currentScreen);
  2165. },
  2166. singleFingerTouch(id, x, y, screenType) {
  2167. let self = this;
  2168. ws.singleFingerTouch(id, x, y, screenType).then((res) => {});
  2169. },
  2170. singleFingerDrag(id, x1, y1, x2, y2, screenType) {
  2171. let self = this;
  2172. ws.singleFingerDrag(id, x1, y1, x2, y2, screenType).then((res) => {});
  2173. },
  2174. singleFingerLongTouch(id, x, y, duration, screenType) {
  2175. let self = this;
  2176. ws.singleFingerLongTouch(id, x, y, duration, screenType).then(
  2177. (res) => {}
  2178. );
  2179. },
  2180. controlCursorMouseDown(e) {
  2181. let self = this;
  2182. if (this.displayTapMode) {
  2183. // console.log("e", e);
  2184. this.controlCursorPosition.left = e.offsetX;
  2185. this.controlCursorPosition.top = e.offsetY;
  2186. this.controlStartPoint.x = e.offsetX;
  2187. this.controlStartPoint.y = e.offsetY;
  2188. this.controlStartPoint.time = Date.now();
  2189. this.ifBmBenchTrailUpperCursor = true;
  2190. }
  2191. },
  2192. controlCursorMouseMove(e) {
  2193. let self = this;
  2194. if (this.displayTapMode && this.ifBmBenchTrailUpperCursor) {
  2195. this.controlCursorPosition.left = e.offsetX;
  2196. this.controlCursorPosition.top = e.offsetY;
  2197. }
  2198. },
  2199. controlCursorMouseOut(e) {
  2200. this.ifBmBenchTrailUpperCursor = false;
  2201. },
  2202. controlCursorMouseUp(e, screenType = 1) {
  2203. let self = this;
  2204. if (this.currentScreen == "upper") {
  2205. screenType = 1;
  2206. } else if (this.currentScreen == "lower") {
  2207. screenType = 2;
  2208. }
  2209. if (this.displayTapMode) {
  2210. this.ifBmBenchTrailUpperCursor = false;
  2211. if (
  2212. Math.abs(this.controlStartPoint.x - e.offsetX) < 30 &&
  2213. Math.abs(this.controlStartPoint.y - e.offsetY) < 30 &&
  2214. Date.now() - this.controlStartPoint.time < 500
  2215. ) {
  2216. self.singleFingerOperation(e, "tap", screenType);
  2217. } else if (
  2218. Math.abs(this.controlStartPoint.x - e.offsetX) > 30 ||
  2219. Math.abs(this.controlStartPoint.y - e.offsetY) > 30
  2220. ) {
  2221. // console.log("controlStartPoint", controlStartPoint);
  2222. self.singleFingerOperation(
  2223. e,
  2224. "swipe",
  2225. screenType,
  2226. this.controlStartPoint
  2227. );
  2228. } else if (Date.now() - this.controlStartPoint.time > 500) {
  2229. self.singleFingerOperation(
  2230. e,
  2231. "longPress",
  2232. screenType,
  2233. this.controlStartPoint
  2234. );
  2235. }
  2236. }
  2237. },
  2238. singleFingerOperation(e, operation, screenType, startPoint = {}) {
  2239. let self = this;
  2240. console.log("singleFingerOperation", e, operation, screenType);
  2241. if (this.displayTapMode) {
  2242. let width = this.$refs.bmBenchRef.width;
  2243. let height = this.$refs.bmBenchRef.height;
  2244. let offsetX = e.offsetX;
  2245. let offsetY = e.offsetY;
  2246. let screenWidth = this.currentScreen == "upper" ? 1540 : 1280;
  2247. let screenHeight = this.currentScreen == "upper" ? 720 : 720;
  2248. let x = Math.round(screenWidth * (offsetX / width));
  2249. let y = Math.round(screenHeight * (offsetY / height));
  2250. let x1 = 0;
  2251. let y1 = 0;
  2252. if (startPoint != {}) {
  2253. x1 = Math.round(screenWidth * (startPoint.x / width));
  2254. y1 = Math.round(screenHeight * (startPoint.y / height));
  2255. }
  2256. // console.log("x", x);
  2257. // console.log("y", y);
  2258. // console.log("x1", x1);
  2259. // console.log("y1", y1);
  2260. let operationDesc = "";
  2261. if (operation == "tap") {
  2262. console.log("selected", this.connetedBenchId, x, y);
  2263. self.singleFingerTouch(this.connetedBenchId, x, y, screenType);
  2264. // tap on lower x: 48 y: 292
  2265. operationDesc =
  2266. "tap on " +
  2267. (screenType == 1 ? "upper " : "lower ") +
  2268. ("x: " + x + " y: " + y);
  2269. } else if (operation == "swipe") {
  2270. self.singleFingerDrag(this.connetedBenchId, x1, y1, x, y, screenType);
  2271. operationDesc =
  2272. "swipe on " +
  2273. (screenType == 1 ? "upper " : "lower ") +
  2274. ("x1: " + x1 + " y1: " + y1 + " x: " + x + " y: " + y);
  2275. } else if (operation == "longPress") {
  2276. self.singleFingerLongTouch(
  2277. this.connetedBenchId,
  2278. x,
  2279. y,
  2280. Date.now() - startPoint.time,
  2281. screenType
  2282. );
  2283. operationDesc =
  2284. "longPress on " +
  2285. (screenType == 1 ? "upper " : "lower ") +
  2286. ("x: " + x + " y: " + y);
  2287. }
  2288. this.benchLog.push({
  2289. bench_id: this.connetedBenchId,
  2290. data: operationDesc,
  2291. levelStr: "DEBUG",
  2292. startTime: self.getNowDate(),
  2293. });
  2294. }
  2295. },
  2296. getNowDate() {
  2297. var myDate = new Date();
  2298. var year = myDate.getFullYear(); //获取当前年
  2299. var mon = myDate.getMonth() + 1; //获取当前月
  2300. var date = myDate.getDate(); //获取当前日
  2301. var hours = myDate.getHours(); //获取当前小时
  2302. var minutes = myDate.getMinutes(); //获取当前分钟
  2303. var seconds = myDate.getSeconds(); //获取当前秒
  2304. var now =
  2305. year +
  2306. "-" +
  2307. mon +
  2308. "-" +
  2309. date +
  2310. "T" +
  2311. hours +
  2312. ":" +
  2313. minutes +
  2314. ":" +
  2315. seconds;
  2316. return now;
  2317. },
  2318. initBmInfoNsChart() {
  2319. let self = this;
  2320. let seriesData = [0, 0, 0];
  2321. for (let i in this.benchList) {
  2322. if (this.benchList[i].status == 5 || this.benchList[i].status == 6) {
  2323. seriesData[1]++;
  2324. } else if (
  2325. this.benchList[i].status == 2 ||
  2326. this.benchList[i].status == 3
  2327. ) {
  2328. seriesData[2]++;
  2329. } else {
  2330. seriesData[0]++;
  2331. }
  2332. }
  2333. console.log("seriesData", seriesData);
  2334. var option = {
  2335. tooltip: {
  2336. trigger: "axis",
  2337. axisPointer: {
  2338. type: "shadow",
  2339. },
  2340. },
  2341. grid: {
  2342. left: 0,
  2343. right: "20",
  2344. bottom: 0,
  2345. top: 0,
  2346. containLabel: true,
  2347. },
  2348. xAxis: {
  2349. type: "value",
  2350. axisLabel: {
  2351. show: false,
  2352. },
  2353. splitLine: {
  2354. show: false,
  2355. },
  2356. // axisLine: {
  2357. // show: false,
  2358. // },
  2359. // axisTick: {
  2360. // show: false, //刻度线
  2361. // },
  2362. },
  2363. yAxis: {
  2364. type: "category",
  2365. data: ["Offline", "Occupied", "Ready"],
  2366. axisLine: {
  2367. show: false,
  2368. lineStyle: {
  2369. color: "#7F7F7F",
  2370. },
  2371. },
  2372. axisTick: {
  2373. show: false, //刻度线
  2374. },
  2375. // axisLine: {
  2376. // },
  2377. },
  2378. series: [
  2379. {
  2380. type: "bar",
  2381. barWidth: "50%",
  2382. data: seriesData,
  2383. itemStyle: {
  2384. color: function (params) {
  2385. // 给出颜色组
  2386. var colorList = ["#b1b3b8", "#79bbff", "#95d475"];
  2387. return colorList[params.dataIndex];
  2388. },
  2389. },
  2390. showBackground: false,
  2391. backgroundStyle: {
  2392. color: "rgba(180, 180, 180, 0.2)",
  2393. },
  2394. label: {
  2395. show: true,
  2396. position: "right",
  2397. color: "#7F7F7F",
  2398. },
  2399. },
  2400. ],
  2401. };
  2402. bmInfoNsChartStorage = echarts.init(
  2403. document.getElementsByClassName("bmInfoNsChart")[0]
  2404. );
  2405. bmInfoNsChartStorage.setOption(option);
  2406. },
  2407. backToMap() {
  2408. let self = this;
  2409. ws.unsubscribeBenchStatus({ bench_id: this.connetedBenchId }).then(
  2410. (res) => {
  2411. console.log("unsubscribeBenchStatus", res);
  2412. }
  2413. );
  2414. this.connetedBenchId = "";
  2415. setTimeout(() => {
  2416. this.benchDisplayVisible = false;
  2417. this.ifShowLogBox = false;
  2418. }, 600);
  2419. },
  2420. tagSearch(field, value) {
  2421. let self = this;
  2422. this.selectedBenchList = [];
  2423. for (let i in this.benchList) {
  2424. this.benchList[i].selected = false;
  2425. if (this.benchList[i][field] == value) {
  2426. this.benchList[i].selected = true;
  2427. this.benchList[i].benchId = "'" + this.benchList[i].benchId + "'";
  2428. this.selectedBenchList.push(this.benchList[i]);
  2429. // this.images = this.selectedBenchList.map((s) => {
  2430. // return {
  2431. // url: "",
  2432. // alt: s.name,
  2433. // };
  2434. // });
  2435. }
  2436. }
  2437. },
  2438. selectAllBench() {
  2439. let self = this;
  2440. console.log('this.benchList===', this.benchList.length)
  2441. if (this.selectedBenchList.length == this.benchList.length) {
  2442. this.selectedBenchList = [];
  2443. this.previousSelectedBenchList = [];
  2444. for (let i in this.benchList) {
  2445. this.benchList[i].selected = false;
  2446. }
  2447. self.nextTick(() => {
  2448. self.initBmInfoNsChart();
  2449. });
  2450. } else {
  2451. this.selectedBenchList = [];
  2452. for (let i in this.benchList) {
  2453. this.benchList[i].selected = true;
  2454. this.selectedBenchList.push(this.benchList[i]);
  2455. // this.images = this.selectedBenchList.map((s) => {
  2456. // return {
  2457. // url: "",
  2458. // alt: s.name,
  2459. // };
  2460. // });
  2461. }
  2462. }
  2463. },
  2464. tapModeControl() {
  2465. this.displayTapMode = !this.displayTapMode;
  2466. },
  2467. getBenchDetail(id, index) {
  2468. let self = this;
  2469. let getBenchParam = { id };
  2470. srv
  2471. .getBenchDetail(getBenchParam)
  2472. .then((res) => {
  2473. // console.log("res", res);
  2474. this.benchList[index].status = res.data.data.status;
  2475. })
  2476. .catch((err) => {
  2477. console.error(err);
  2478. });
  2479. },
  2480. showLogBox() {
  2481. let self = this;
  2482. if (this.ifShowLogBox) {
  2483. ws.unsubscribeBenchStatus({ bench_id: this.connetedBenchId }).then(
  2484. (res) => {
  2485. console.log("unsubscribeBenchStatus", res);
  2486. }
  2487. );
  2488. } else {
  2489. ws.subscribeBenchStatus({ bench_id: this.connetedBenchId }).then(
  2490. (res) => {
  2491. console.log("subscribeBenchStatus", res);
  2492. }
  2493. );
  2494. }
  2495. this.benchLog = [];
  2496. this.ifShowLogBox = !this.ifShowLogBox;
  2497. },
  2498. connectAudioDevice(type) {
  2499. let self = this;
  2500. ws.connect_audio_device({
  2501. benchId: String(this.connetedBenchId),
  2502. }).then(
  2503. (res) => {
  2504. console.log("connect_audio_device_res", res);
  2505. if (type == "playAudio") {
  2506. this.isRecording = !this.isRecording;
  2507. self.recordAudio();
  2508. } else if (type == "collectAudio") {
  2509. self.collectAudio();
  2510. }
  2511. },
  2512. (rej) => {}
  2513. );
  2514. },
  2515. recordAudio(data) {
  2516. let self = this;
  2517. // console.log("selectedBenchList.value[0]", this.selectedBenchList[0]);
  2518. let channel = 1;
  2519. this.vadThreshold = 0;
  2520. if (this.isRecording) {
  2521. this.playAudioBenchList.push(this.connetedBenchId);
  2522. // this.changePlayAudioBenchList(params);
  2523. navigator.getUserMedia =
  2524. navigator.getUserMedia ||
  2525. navigator.webkitGetUserMedia ||
  2526. navigator.mozGetUserMedia ||
  2527. navigator.msGetUserMedia;
  2528. if (navigator.mediaDevices.getUserMedia) {
  2529. // 支持getUserMedia
  2530. navigator.mediaDevices
  2531. .getUserMedia({
  2532. video: false,
  2533. audio: true,
  2534. })
  2535. .then((stream) => {
  2536. this.recStream = stream;
  2537. this.paAc = new AudioContext({
  2538. sampleRate: 8000,
  2539. });
  2540. this.paSource = this.paAc.createMediaStreamSource(stream);
  2541. //构造参数依次为缓冲区大小,输入通道数,输出通道数
  2542. this.paScriptNode = this.paAc.createScriptProcessor(
  2543. 1024,
  2544. channel,
  2545. 2
  2546. );
  2547. this.sempleRateMultiple = this.paAc.sampleRate / 8000;
  2548. this.paScriptNode.onaudioprocess = function (e) {
  2549. for (let i = 0; i < channel; i++) {
  2550. let data = e.inputBuffer.getChannelData(i);
  2551. self.recordSuperposeArr.push.apply(
  2552. self.recordSuperposeArr,
  2553. data
  2554. );
  2555. if (
  2556. self.sempleRateHandlingThreshold <
  2557. self.sempleRateMultiple - 1
  2558. ) {
  2559. self.sempleRateHandlingThreshold++;
  2560. } else {
  2561. let arr = [];
  2562. for (
  2563. let a = 0;
  2564. a < self.recordSuperposeArr.length;
  2565. a = a + self.sempleRateMultiple
  2566. ) {
  2567. arr.push(self.recordSuperposeArr[a]);
  2568. }
  2569. self.recordSuperposeArr = arr.splice(0, 1024);
  2570. self.recordSuperposeArr = new Float32Array(
  2571. self.recordSuperposeArr
  2572. );
  2573. if (Math.abs(self.recordSuperposeArr[0]) < 0.003) {
  2574. self.vadThreshold++;
  2575. } else {
  2576. self.vadThreshold = 0;
  2577. }
  2578. if (self.vadThreshold <= 20) {
  2579. let dataU8 = new Uint8Array(
  2580. self.recordSuperposeArr.buffer
  2581. );
  2582. let string = "";
  2583. for (let i = 0; i < dataU8.length; i++) {
  2584. string = string + String.fromCharCode(dataU8[i]);
  2585. }
  2586. ws.play_audio({
  2587. data: string,
  2588. benchIds: self.playAudioBenchList,
  2589. }).then(
  2590. (res) => {},
  2591. (rej) => {}
  2592. );
  2593. }
  2594. self.sempleRateHandlingThreshold = 0;
  2595. self.recordSuperposeArr = [];
  2596. }
  2597. }
  2598. };
  2599. this.paScriptNode.connect(this.paAc.destination);
  2600. this.paSource.connect(this.paScriptNode);
  2601. })
  2602. .catch((err) => {
  2603. console.log("err: " + err);
  2604. });
  2605. } else {
  2606. // 不支持getUserMedia
  2607. console.log("Environment not supported");
  2608. }
  2609. } else {
  2610. // this.changePlayAudioBenchList(params);
  2611. this.playAudioBenchList = [];
  2612. self.stopRecord();
  2613. this.ifConnectedAudioDevice = false;
  2614. ws.stop_play_audio({
  2615. benchId: this.connetedBenchId,
  2616. }).then(
  2617. (res) => {
  2618. // console.log("res", res);
  2619. },
  2620. (rej) => {
  2621. // console.log("rej", rej);
  2622. }
  2623. );
  2624. // $bus.$emit("stopPlayAudio", {
  2625. // benchId: params.benchId,
  2626. // });
  2627. // }
  2628. }
  2629. },
  2630. stopRecord() {
  2631. let self = this;
  2632. if (!this.isRecording) {
  2633. this.recStream.getTracks().forEach(function (track) {
  2634. track.stop();
  2635. });
  2636. this.paScriptNode.disconnect(this.paAc.destination);
  2637. this.paSource.disconnect(this.paScriptNode);
  2638. this.paAc.close();
  2639. }
  2640. },
  2641. collectAudio() {
  2642. let self = this;
  2643. this.isPlaying = !this.isPlaying;
  2644. if (this.isPlaying) {
  2645. ws.collect_audio({
  2646. benchId: String(this.connetedBenchId),
  2647. }).then(
  2648. (res) => {},
  2649. (rej) => {}
  2650. );
  2651. } else {
  2652. ws.stop_collect_audio({
  2653. benchId: String(this.connetedBenchId),
  2654. }).then(
  2655. (res) => {},
  2656. (rej) => {}
  2657. );
  2658. this.loopSendAudioTime = 0;
  2659. this.sendAudioString = "";
  2660. }
  2661. },
  2662. setSendAudioBus(benchId) {
  2663. let self = this;
  2664. bus.on("sendAudio" + benchId, (data) => {
  2665. self.sendAudioTransformCode(data.data, true);
  2666. this.loopSendAudioTime++;
  2667. this.sendAudioTimer = setTimeout(() => {
  2668. this.loopSendAudioTime = 5;
  2669. self.sendAudioTransformCode("", false);
  2670. }, 500);
  2671. });
  2672. },
  2673. sendAudioTransformCode(data, fill) {
  2674. let dataU8 = [];
  2675. let dataF32 = [];
  2676. let arr = [];
  2677. let self = this;
  2678. this.sendAudioString += data;
  2679. if (this.loopSendAudioTime > 4) {
  2680. arr = this.sendAudioString.split("");
  2681. for (let i = 0; i < arr.length; i++) {
  2682. dataU8[i] = arr[i].charCodeAt();
  2683. }
  2684. dataU8 = new Uint8Array(dataU8);
  2685. dataF32 = new Float32Array(dataU8.buffer);
  2686. if (!fill) {
  2687. // console.log("dataF32-", dataF32);
  2688. let newDataF32 = new Float32Array(5120);
  2689. for (let i = 0; i < 5120; i++) {
  2690. if (i < dataF32.length) {
  2691. newDataF32[i] = dataF32[i];
  2692. } else {
  2693. newDataF32[i] = 0;
  2694. }
  2695. }
  2696. dataF32 = newDataF32;
  2697. // console.log("dataF32+", dataF32);
  2698. }
  2699. self.pcPlayAudio(dataF32, 1, 8000);
  2700. this.sendAudioString = "";
  2701. this.loopSendAudioTime = 0;
  2702. }
  2703. if (fill) {
  2704. clearTimeout(this.sendAudioTimer);
  2705. }
  2706. },
  2707. pcPlayAudio(data, channels, sampleRate) {
  2708. let self = this;
  2709. var audioCtx = new (window.AudioContext || window.webkitAudioContext)({
  2710. sampleRate: sampleRate,
  2711. });
  2712. var myArrayBuffer = audioCtx.createBuffer(
  2713. channels,
  2714. data.length,
  2715. sampleRate
  2716. );
  2717. for (let channel = 0; channel < channels; channel++) {
  2718. var nowBuffering = myArrayBuffer.getChannelData(channel);
  2719. for (let i = 0; i < data.length; i++) {
  2720. if (i < data.length) {
  2721. nowBuffering[i] = data[i];
  2722. } else {
  2723. nowBuffering[i] = 0;
  2724. }
  2725. }
  2726. }
  2727. // console.log("audioCtx", audioCtx);
  2728. // console.log("nowBuffering", nowBuffering);
  2729. var source = audioCtx.createBufferSource();
  2730. source.buffer = myArrayBuffer;
  2731. source.connect(audioCtx.destination);
  2732. source.start();
  2733. },
  2734. pressPtt() {
  2735. let self = this;
  2736. ws.press_ptt({
  2737. benchId: String(this.connetedBenchId),
  2738. }).then(
  2739. (res) => {},
  2740. (rej) => {}
  2741. );
  2742. },
  2743. bmMapItemSelect(key) {
  2744. let self = this;
  2745. if (this.previousSelectedBenchList.length) {
  2746. this.selectedBenchList = JSON.parse(
  2747. JSON.stringify(this.previousSelectedBenchList)
  2748. );
  2749. }
  2750. this.previousSelectedBenchList = [];
  2751. this.platform = null;
  2752. this.benchList.forEach((b) => (b.selected = false));
  2753. this.benchList[key].selected = !this.benchList[key].selected;
  2754. if (this.benchList[key].selected) {
  2755. this.currentBench = this.benchList[key];
  2756. this.selectedBenchList.push(this.benchList[key]);
  2757. // this.images = this.selectedBenchList.map((s) => {
  2758. // return {
  2759. // url: "",
  2760. // alt: s.name,
  2761. // };
  2762. // });
  2763. } else {
  2764. for (let i in this.selectedBenchList) {
  2765. if (this.selectedBenchList[i].id == this.benchList[key].id) {
  2766. this.selectedBenchList.splice(i, 1);
  2767. // this.images = this.selectedBenchList.map((s) => {
  2768. // return {
  2769. // url: "",
  2770. // alt: s.name,
  2771. // };
  2772. // });
  2773. break;
  2774. }
  2775. }
  2776. }
  2777. if (this.selectedBenchList.length == 0) {
  2778. nextTick(() => {
  2779. self.initBmInfoNsChart();
  2780. });
  2781. }
  2782. },
  2783. clickBenchList() {
  2784. // window.location.href = "/squarePage?m=8b934420_ZJUb_b6f9";
  2785. this.$store.dispatch("common/setSquareStatus", true);
  2786. },
  2787. disconnectBench() {
  2788. ws.disconnectBench({ bench_id: String(this.connetedBenchId) }).then(
  2789. (res) => {
  2790. var remoteBenchList = this.remoteBenchList;
  2791. let newRemoteBenchList = remoteBenchList.filter((item) => {
  2792. return item != this.connetedBenchId;
  2793. });
  2794. while(this.remoteBenchList.length) {
  2795. this.remoteBenchList.pop();
  2796. this.$store.dispatch('benchList/popRemoteBenchList')
  2797. this.$store.dispatch("common/setSquareStatus", true);
  2798. }
  2799. newRemoteBenchList.forEach(e => {
  2800. this.remoteBenchList.push(e);
  2801. this.$store.dispatch('benchList/addRemoteBenchList', e)
  2802. })
  2803. this.$store.dispatch("benchList/removeBenchImgList", {
  2804. benchId: this.connetedBenchId,
  2805. });
  2806. this.getImgList(newRemoteBenchList);
  2807. this.connetedBenchId = "";
  2808. this.currentBench = {};
  2809. this.benchDisplayVisible = false;
  2810. this.benchDisplayLowerVisible = false;
  2811. this.isConnected = false;
  2812. this.$store.dispatch("common/setConnectedStatus", false);
  2813. }
  2814. );
  2815. },
  2816. sleep(delay) {
  2817. var start = new Date().getTime();
  2818. while (new Date().getTime() - start < delay) {
  2819. continue;
  2820. }
  2821. },
  2822. saveSelectedBenchToLs(benchId) {
  2823. var objRBL = this.remoteBenchList;
  2824. if (objRBL && objRBL.length > 0) {
  2825. var bExist = false;
  2826. for (var i = 0; i < objRBL.length; i++) {
  2827. if (objRBL[i] == benchId) {
  2828. bExist = true;
  2829. } else {
  2830. }
  2831. }
  2832. if (bExist == false) {
  2833. objRBL.push(benchId);
  2834. this.remoteBenchList.push(benchId)
  2835. this.$store.dispatch('benchList/addRemoteBenchList', benchId)
  2836. }
  2837. } else {
  2838. var rml = [];
  2839. rml.push(benchId);
  2840. this.remoteBenchList.push(benchId);
  2841. this.$store.dispatch('benchList/addRemoteBenchList', benchId)
  2842. }
  2843. },
  2844. handleListClick(benchId, itemtype) {
  2845. this.$store.dispatch("common/setGoHome", false);
  2846. if (itemtype == 2) {
  2847. return;
  2848. }
  2849. try{
  2850. for(let key in window.waterMap) {
  2851. if (key == benchId) {
  2852. window.waterMap[key].scale.set(1.3, 1.3, 1.3);
  2853. } else {
  2854. window.waterMap[key].scale.set(1, 1, 1);
  2855. }
  2856. }
  2857. } catch (e) {
  2858. }
  2859. console.log("benchId", benchId);
  2860. let selectedBench = this.benchList.find((i) => i.benchId == benchId);
  2861. bus.emit("benchInfoVisible", selectedBench);
  2862. this.$nextTick(() => {
  2863. if (benchId == this.currentBench.benchId) {
  2864. let items = document.getElementsByClassName("grid-item-background");
  2865. for (var index = 0; index < items.length; index++) {
  2866. items[index].style.background = "#000000";
  2867. }
  2868. return;
  2869. }
  2870. let items = document.getElementsByClassName("grid-item-background");
  2871. for (var index = 0; index < items.length; index++) {
  2872. items[index].style.background = "#000000";
  2873. if (this.images[index].alt == benchId) {
  2874. console.log("equal");
  2875. items[index].style.background = "#ffffff";
  2876. }
  2877. }
  2878. });
  2879. //this.currentBench = this.benchList.find(b => b.id == benchId);
  2880. //this.isDetailVisible = true;
  2881. this.$nextTick(() => {
  2882. //this.$refs.benchdetail.init(benchId);
  2883. //this.benchList.forEach(element =>
  2884. //{
  2885. // element.style = "{background: rgba(0, 0, 0, 1)}"
  2886. //});
  2887. // if (benchId == this.currentBench.id &&this.currentBench.selected) {
  2888. // this.currentBench.selected = false;
  2889. // this.currentBench.scale = 1;
  2890. // this.currentBench = {};
  2891. // let items = document.getElementsByClassName("item-box");
  2892. // for (var index = 0; index < items.length; index++) {
  2893. // items[index].style.background = "#00000032";
  2894. // }
  2895. // return;
  2896. // }
  2897. let items = document.getElementsByClassName("item-box");
  2898. for (var index = 0; index < items.length; index++) {
  2899. items[index].style.background = "#00000032";
  2900. // console.log("textContent", title[0].textContent);
  2901. let itemOther = this.benchList.find(
  2902. (b) => b.id == items[index].dataset.index
  2903. );
  2904. if (itemOther) {
  2905. itemOther.selected = false;
  2906. }
  2907. if (benchId == items[index].dataset.index) {
  2908. items[index].style.background = "#000000C0";
  2909. this.selectedBenchId = benchId
  2910. }
  2911. }
  2912. // console.log('this.currentBench', this.currentBench);
  2913. // bus.emit("benchInfoVisible", this.currentBench);
  2914. });
  2915. },
  2916. handleBenchClick(benchId, showRemoteButton) {
  2917. this.currentBench = this.benchList.find((b) => b.id == benchId);
  2918. this.benchDetail = this.benchList.find((b) => b.id == benchId);
  2919. this.isRemoteBtnVisible = showRemoteButton;
  2920. this.isDetailVisible = true;
  2921. },
  2922. handleListDbClick(benchId, itemtype) {
  2923. //this.currentBench = this.benchList.find(b => b.id == benchId);
  2924. //this.isDetailVisible = true;
  2925. this.$nextTick(() => {
  2926. //this.$refs.benchdetail.init(benchId);
  2927. //this.benchList.forEach(element =>
  2928. //{
  2929. // element.style = "{background: rgba(0, 0, 0, 1)}"
  2930. //});
  2931. this.benchDetail = this.benchList.find((b) => b.id == benchId);
  2932. //this.currentBench.style = "{background: rgba(0, 0, 0, 1)}"
  2933. console.log("current bench", this.benchDetail);
  2934. this.isRemoteBtnVisible = true;
  2935. this.isDetailVisible = true;
  2936. });
  2937. },
  2938. getBenchImage(benchId, screenType, wsRemote, func) {
  2939. let self = this;
  2940. setTimeout(() => {
  2941. wsRemote.getImage(String(benchId), screenType).then((res) => {
  2942. console.log("getImageRes", res);
  2943. // let screen = screenType == 1 ? "upper" : "lower";
  2944. func();
  2945. if (screenType == 1) {
  2946. self.benchImgUpper = "data:image/png;base64," + res.data.data;
  2947. self.benchImgUpperMap[benchId] =
  2948. "data:image/png;base64," + res.data.data;
  2949. bus.emit("benchImgChange", { benchImgUpper: self.benchImgUpper });
  2950. } else {
  2951. self.benchImgLower = "data:image/png;base64," + res.data.data;
  2952. self.benchImgLowerMap[benchId] =
  2953. "data:image/png;base64," + res.data.data;
  2954. bus.emit("benchImgChange", { benchImgLower: self.benchImgLower });
  2955. }
  2956. // let screen = res.data.screen_type;
  2957. //self.getBenchImage(benchId, screenType, wsRemote, func);
  2958. if (benchId == this.connetedBenchId) {
  2959. //self.getBenchImage(benchId, screenType, wsRemote, func);
  2960. this.$store.dispatch("benchList/setBenchImgList", {
  2961. benchId,
  2962. img: res.data.data,
  2963. });
  2964. }
  2965. setTimeout(()=>{
  2966. self.getBenchImageSub(benchId, screenType, wsRemote, func);
  2967. },500)
  2968. });
  2969. }, 500);
  2970. },
  2971. getBenchImageSub(benchId, screenType, wsRemote, func) {
  2972. let self = this;
  2973. if (benchId == this.connetedBenchId) {
  2974. wsRemote.getImage(String(benchId), screenType).then((res) => {
  2975. console.log("getImageRes", res);
  2976. // let screen = screenType == 1 ? "upper" : "lower";
  2977. //func();
  2978. {
  2979. if (screenType == 1) {
  2980. self.benchImgUpper = "data:image/png;base64," + res.data.data;
  2981. self.benchImgUpperMap[benchId] =
  2982. "data:image/png;base64," + res.data.data;
  2983. bus.emit("benchImgChange", { benchImgUpper: self.benchImgUpper });
  2984. } else {
  2985. self.benchImgLower = "data:image/png;base64," + res.data.data;
  2986. self.benchImgLowerMap[benchId] =
  2987. "data:image/png;base64," + res.data.data;
  2988. bus.emit("benchImgChange", { benchImgLower: self.benchImgLower });
  2989. }
  2990. }
  2991. setTimeout(() => {
  2992. self.getBenchImageSub(benchId, screenType, wsRemote, func);
  2993. }, 100)
  2994. });
  2995. }
  2996. else {
  2997. setTimeout(() => {
  2998. self.getBenchImageSub(benchId, screenType, wsRemote, func);
  2999. }, 500)
  3000. }
  3001. },
  3002. handleDblClickImg(benchId) {
  3003. this.benchImgUpper = this.benchImgUpperMap[benchId];
  3004. this.benchImgLower = this.benchImgLowerMap[benchId];
  3005. this.$store.dispatch("common/setSquareStatus", false);
  3006. this.selectBench(benchId);
  3007. },
  3008. handleClickImg(benchId, indexParam) {
  3009. this.selectedBenchId = benchId;
  3010. this.$nextTick(() => {
  3011. if (benchId == this.currentBenchId) {
  3012. benchId = 0;
  3013. let items = document.getElementsByClassName("grid-item-background");
  3014. for (var index = 0; index < items.length; index++) {
  3015. items[index].style.background = "#000000";
  3016. }
  3017. return;
  3018. }
  3019. this.currentBenchId = benchId;
  3020. let items = document.getElementsByClassName("grid-item-background");
  3021. for (var index = 0; index < items.length; index++) {
  3022. items[index].style.background = "#000000";
  3023. if (index == indexParam) {
  3024. console.log("equal");
  3025. items[index].style.background = "#ffffff";
  3026. }
  3027. }
  3028. });
  3029. this.$nextTick(() => {
  3030. if (
  3031. benchId == this.currentBench.id &&
  3032. this.currentBench.selected == true
  3033. ) {
  3034. this.currentBench.selected = false;
  3035. this.currentBench.scale = 1;
  3036. this.currentBench = {};
  3037. let items = document.getElementsByClassName("item-box");
  3038. for (var index = 0; index < items.length; index++) {
  3039. items[index].style.background = "#00000032";
  3040. }
  3041. return;
  3042. }
  3043. let items = document.getElementsByClassName("item-box");
  3044. for (var index = 0; index < items.length; index++) {
  3045. items[index].style.background = "#00000032";
  3046. let title = items[index].getElementsByClassName("item-title");
  3047. console.log("textContent", title[0].textContent);
  3048. let itemOther = this.benchList.find(
  3049. (b) => parseInt(b.id) == parseInt(title[0].textContent) || b.id == benchId
  3050. );
  3051. itemOther.selected = false;
  3052. if(items[index].dataset.index == benchId){
  3053. items[index].style.background = "#000000C0";
  3054. this.currentBench = this.benchList.find((b) => b.id == benchId);
  3055. this.currentBench.selected = true;
  3056. }
  3057. }
  3058. this.$store.dispatch('benchList/setCurrentBench', this.currentBench);
  3059. });
  3060. },
  3061. handleCloseImg(benchId) {
  3062. this.connetedBenchId = benchId;
  3063. this.disconnectBench()
  3064. console.log("benchId", benchId, this.connetedBenchId);
  3065. var objRBL = this.remoteBenchList;
  3066. if (objRBL) {
  3067. for (var i = 0; i < objRBL.length; i++) {
  3068. if (parseInt(objRBL[i]) == parseInt(benchId)) {
  3069. console.log("images", this.images);
  3070. for (var ii = 0; ii < this.images.length; ii++) {
  3071. if (parseInt(this.images[ii].alt) == parseInt(benchId)) {
  3072. this.images.splice(ii, 1);
  3073. console.log("images", this.images);
  3074. break;
  3075. }
  3076. }
  3077. //delete objRBL[i];
  3078. objRBL.splice(i, 1);
  3079. console.log("objRBL", objRBL);
  3080. while(this.remoteBenchList.length) {
  3081. this.remoteBenchList.pop();
  3082. this.$store.dispatch('benchList/popRemoteBenchList')
  3083. this.$store.dispatch("common/setSquareStatus", true);
  3084. }
  3085. objRBL.forEach(e => {
  3086. this.remoteBenchList.push(e)
  3087. this.$store.dispatch('benchList/addRemoteBenchList', e)
  3088. })
  3089. return;
  3090. }
  3091. }
  3092. }
  3093. },
  3094. getAutoPlanResult(key) {},
  3095. refreshBenchStatus() {
  3096. var readyCount = 0;
  3097. var occupiedCount = 0;
  3098. var offlineCount = 0;
  3099. console.log("this.benchList", this.benchList.length);
  3100. this.benchList.forEach((element) => {
  3101. //console.log('element',element);
  3102. if (element.status == "ready") {
  3103. readyCount++;
  3104. } else if (element.status == "error") {
  3105. offlineCount++;
  3106. } else if (element.status == "offline") {
  3107. offlineCount++;
  3108. } else {
  3109. occupiedCount++;
  3110. }
  3111. });
  3112. this.readyCount = readyCount;
  3113. this.offlineCount = offlineCount;
  3114. this.occupiedCount = occupiedCount;
  3115. }
  3116. },
  3117. watch: {
  3118. benchDisplayVisible(newValue, oldValue) {
  3119. bus.emit("benchDisplayVisible", {
  3120. benchDisplayVisible: newValue,
  3121. benchInfo: this.selectedBenchList[0],
  3122. });
  3123. },
  3124. benchDisplayLowerVisible(newValue, oldValue) {
  3125. bus.emit("benchDisplayLowerVisibleChange", {
  3126. benchDisplayLowerVisible: newValue,
  3127. });
  3128. },
  3129. benchList(newValue, oldValue) {
  3130. console.log("newValue", newValue);
  3131. var objRBL = this.remoteBenchList;
  3132. console.log("zmg1", objRBL);
  3133. var objRBLReverse = [];
  3134. if(objRBL)
  3135. {
  3136. for (; objRBL.length > 0; ) {
  3137. objRBLReverse.push(objRBL.pop());
  3138. }
  3139. }
  3140. if (objRBLReverse.length > 0) {
  3141. setTimeout(() => {
  3142. this.getImgList(objRBLReverse);
  3143. }, 300);
  3144. }
  3145. },
  3146. isOpen3d(newValue, oldValue) {
  3147. if (!newValue) {
  3148. this.$nextTick(() => {
  3149. let mapDom = document.getElementsByClassName("ordinary-map")[0];
  3150. let style = getComputedStyle(mapDom);
  3151. let width = parseFloat(style.width);
  3152. let height = parseFloat(style.height);
  3153. uwbMain('playersmall', width, height, "floorplan");
  3154. })
  3155. } else {
  3156. uwbMain('player', window.innerWidth, window.innerHeight, "panorama");
  3157. }
  3158. },
  3159. autoPlanList() {
  3160. this.autoPlanList.forEach(m => {
  3161. this.$store.dispatch('caseList/getAllAutoPlanStatus', {
  3162. planId: m.id,
  3163. planName: m.name
  3164. })
  3165. })
  3166. },
  3167. mouseBenchId(newValue, oldValue) {
  3168. let bench = this.benchList.find(b => b.benchId == newValue);
  3169. if (bench) {
  3170. this.mouseBenchDetail = bench;
  3171. } else {
  3172. this.mouseBenchDetail = {};
  3173. }
  3174. }
  3175. },
  3176. };
  3177. </script>
  3178. <style scoped>
  3179. /* .benchMapBox {
  3180. margin-top: 30px;
  3181. } */
  3182. .ordinary-map-ex {
  3183. position: absolute;
  3184. top: 43px;
  3185. right: 207px;
  3186. z-index: 0;
  3187. }
  3188. .main-title {
  3189. margin-left: 30px;
  3190. margin-top: 30px;
  3191. color: #fff;
  3192. font-weight: bold;
  3193. display: flex;
  3194. justify-content: left;
  3195. }
  3196. .main-tab {
  3197. margin-top: 15px;
  3198. margin-left: 30px;
  3199. width: 400px;
  3200. background: linear-gradient(
  3201. 135deg,
  3202. rgb(255 255 255 / 20%) 100%
  3203. rgb(255 255 255 / 20%) 100%
  3204. );
  3205. }
  3206. .search-container{
  3207. margin-top: 15px;
  3208. margin-left: -20vw;
  3209. width: 35.4vw;
  3210. }
  3211. .benchMapBox :deep() .el-scrollbar__bar {
  3212. display: none;
  3213. }
  3214. .bmContent {
  3215. background-image: linear-gradient(60deg, #16182a 30%, #2d3049);
  3216. border-radius: 10px;
  3217. /* height: 1800px; */
  3218. margin-top: 30px;
  3219. margin-bottom: 30px;
  3220. min-height: 426px;
  3221. }
  3222. .bmMap {
  3223. /* height: 500px; */
  3224. position: absolute;
  3225. height: 10%;
  3226. width: 100%;
  3227. /* padding: 5px 10px; */
  3228. box-sizing: border-box;
  3229. }
  3230. .bmMap
  3231. :deep()
  3232. .el-radio-button__original-radio:checked
  3233. + .el-radio-button__inner {
  3234. background-color: #474c79;
  3235. }
  3236. .bmMap
  3237. :deep()
  3238. .el-radio-button__original-radio:checked
  3239. + .el-radio-button__inner
  3240. span {
  3241. color: #fff;
  3242. }
  3243. .bmMap :deep() .el-radio-button__inner {
  3244. background-color: #383c6b;
  3245. border: none;
  3246. box-shadow: none;
  3247. }
  3248. .bmMap :deep() .el-radio-button__inner span {
  3249. color: #ccc;
  3250. }
  3251. .bmMap :deep() .el-radio-button__inner span:hover {
  3252. color: #eee;
  3253. }
  3254. .bmMapImage {
  3255. position: relative;
  3256. height: 100%;
  3257. width: 100%;
  3258. /* border: 1px solid #fff; */
  3259. background-color: rgba(255, 255, 255, 0.04);
  3260. border-radius: 6px;
  3261. }
  3262. .bmMapItem {
  3263. position: absolute;
  3264. height: 70px;
  3265. width: 70px;
  3266. cursor: pointer;
  3267. }
  3268. .bmMapItemNormal {
  3269. position: absolute;
  3270. height: 100%;
  3271. width: 100%;
  3272. background-color: #16182a;
  3273. /* box-shadow: 0 0 0 3px #393e6d inset; */
  3274. box-sizing: border-box;
  3275. z-index: 2;
  3276. }
  3277. .bmMapItemInfo {
  3278. position: absolute;
  3279. height: 100%;
  3280. width: 120px;
  3281. box-sizing: border-box;
  3282. padding: 3px;
  3283. display: flex;
  3284. justify-content: center;
  3285. align-items: flex-start;
  3286. flex-direction: column;
  3287. font-size: 12px;
  3288. z-index: 6;
  3289. user-select: none;
  3290. /* background: #183153; */
  3291. overflow: hidden;
  3292. border: none;
  3293. color: #ccc;
  3294. border-radius: 10px;
  3295. left: 30px;
  3296. padding-left: 10px;
  3297. background: rgba(117, 117, 117, 0.8);
  3298. }
  3299. .bmMapItemInfoWater {
  3300. position: absolute;
  3301. width: 120px;
  3302. box-sizing: border-box;
  3303. padding: 3px;
  3304. display: flex;
  3305. justify-content: center;
  3306. align-items: flex-start;
  3307. flex-direction: column;
  3308. font-size: 12px;
  3309. z-index: 6;
  3310. user-select: none;
  3311. /* background: #183153; */
  3312. overflow: hidden;
  3313. border: none;
  3314. color: #ccc;
  3315. border-radius: 10px;
  3316. left: 30px;
  3317. padding-left: 10px;
  3318. background: rgba(117, 117, 117, 0.8);
  3319. }
  3320. .bmMapItemInfoAfter {
  3321. width: 0%;
  3322. height: 100%;
  3323. background: rgba(117, 117, 117, 0.8);
  3324. position: absolute;
  3325. transition: all 0.2s ease-in-out;
  3326. right: 0;
  3327. }
  3328. .bmMapItemInfoSelected > .bmMapItemInfoAfter {
  3329. right: auto;
  3330. left: 0;
  3331. width: 100%;
  3332. }
  3333. .bmMapItemInfo span {
  3334. z-index: 20;
  3335. transition: all 0.2s ease-in-out;
  3336. }
  3337. .bmMapItemInfo span + span {
  3338. margin-top: 5px;
  3339. }
  3340. .bmMapItemInfoSelected > span {
  3341. color: #ccc;
  3342. animation: scaleUp 0.2s ease-in-out;
  3343. }
  3344. @keyframes scaleUp {
  3345. 0% {
  3346. transform: scale(1);
  3347. }
  3348. 50% {
  3349. transform: scale(0.95);
  3350. }
  3351. 100% {
  3352. transform: scale(1);
  3353. }
  3354. }
  3355. .bmMapItemInfo span:nth-child(1) {
  3356. font-weight: bold;
  3357. }
  3358. .bmMapItemInfo span:nth-child(2) {
  3359. opacity: 0.8;
  3360. }
  3361. .bmMapItemSelected {
  3362. position: absolute;
  3363. height: 100%;
  3364. width: 100%;
  3365. overflow: hidden;
  3366. z-index: 4;
  3367. }
  3368. .bmMapItemSelected::before {
  3369. content: " ";
  3370. position: absolute;
  3371. height: 100%;
  3372. width: 100%;
  3373. background: linear-gradient(
  3374. 90deg,
  3375. transparent,
  3376. #ff3f99,
  3377. #3e88ff,
  3378. transparent
  3379. );
  3380. /* transform: scale(5); */
  3381. animation: rotation_9018 3000ms infinite linear;
  3382. filter: blur(9px);
  3383. }
  3384. @keyframes rotation_9018 {
  3385. 0% {
  3386. transform: rotate(0deg);
  3387. }
  3388. 100% {
  3389. transform: rotate(360deg);
  3390. }
  3391. }
  3392. .bmMapItemSelectedContent {
  3393. position: absolute;
  3394. height: calc(100% - 6px);
  3395. width: calc(100% - 6px);
  3396. top: 3px;
  3397. left: 3px;
  3398. background-color: #16182a;
  3399. }
  3400. .bmMapItemSelectedContent::before {
  3401. content: " ";
  3402. height: 28px;
  3403. width: 8px;
  3404. position: absolute;
  3405. background: white;
  3406. left: 50%;
  3407. top: 50%;
  3408. transform: translateX(-50%) translateY(-50%);
  3409. filter: blur(12px);
  3410. }
  3411. .bmBench {
  3412. width: 100%;
  3413. /* height: 300px; */
  3414. padding: 25px 0;
  3415. box-sizing: border-box;
  3416. }
  3417. .bmBenchBox {
  3418. font-size: 0;
  3419. /* margin-top: 5px; */
  3420. position: relative;
  3421. display: flex;
  3422. justify-content: center;
  3423. }
  3424. .bmBenchImg {
  3425. /* width: 100%;
  3426. height: 285px; */
  3427. /* width: 100%; */
  3428. height: 100%;
  3429. border-radius: 6px;
  3430. }
  3431. .bmBenchTrailUpper {
  3432. position: absolute;
  3433. /* height: 285px; */
  3434. height: 100%;
  3435. width: 100%;
  3436. z-index: 20;
  3437. left: 0;
  3438. top: 0;
  3439. }
  3440. .bmBenchTrailUpperCursorTap {
  3441. position: absolute;
  3442. height: 2vh;
  3443. width: 2vh;
  3444. background-color: rgba(255, 255, 255, 0.8);
  3445. border-radius: 50%;
  3446. left: 30%;
  3447. top: 0;
  3448. animation: bmBenchTrailUpperCursorTapAnimation 0.75s linear 0s 1;
  3449. }
  3450. @keyframes bmBenchTrailUpperCursorTapAnimation {
  3451. 0% {
  3452. transform: scale(1);
  3453. }
  3454. 25% {
  3455. transform: scale(1);
  3456. opacity: 1;
  3457. }
  3458. 40% {
  3459. transform: scale(0.6);
  3460. opacity: 0.6;
  3461. }
  3462. 50% {
  3463. transform: scale(0.6);
  3464. opacity: 0.6;
  3465. }
  3466. 55% {
  3467. transform: scale(1);
  3468. opacity: 1;
  3469. }
  3470. 100% {
  3471. transform: scale(1);
  3472. }
  3473. }
  3474. .bmBenchTrailUpperCursorSwipe {
  3475. position: absolute;
  3476. height: 2vh;
  3477. width: 2vh;
  3478. background-color: rgba(255, 255, 255, 0.8);
  3479. border-radius: 50%;
  3480. transition: all 1s;
  3481. }
  3482. .bmBenchTrailUpperCursorSwipe2 {
  3483. height: 1.5vh;
  3484. width: 1.5vh;
  3485. transition: all 1s 0.05s;
  3486. }
  3487. .bmBenchTrailUpperCursorSwipe3 {
  3488. height: 1vh;
  3489. width: 1vh;
  3490. transition: all 1s 0.1s;
  3491. }
  3492. .bmBenchTrailUpperCursorPress {
  3493. position: absolute;
  3494. height: 2vh;
  3495. width: 2vh;
  3496. background-color: rgba(255, 255, 255, 0.8);
  3497. border-radius: 50%;
  3498. left: 30%;
  3499. top: 0;
  3500. animation: bmBenchTrailUpperCursorPressAnimation 2s linear 0s 1;
  3501. }
  3502. @keyframes bmBenchTrailUpperCursorPressAnimation {
  3503. 0% {
  3504. transform: scale(1);
  3505. }
  3506. 12% {
  3507. transform: scale(1);
  3508. opacity: 1;
  3509. }
  3510. 21% {
  3511. transform: scale(0.6);
  3512. opacity: 0.6;
  3513. }
  3514. 70% {
  3515. transform: scale(0.6);
  3516. opacity: 0.6;
  3517. }
  3518. 73% {
  3519. transform: scale(1);
  3520. opacity: 1;
  3521. }
  3522. 100% {
  3523. transform: scale(1);
  3524. }
  3525. }
  3526. .bmBenchTrailUpperCursor {
  3527. position: absolute;
  3528. height: 2vh;
  3529. width: 2vh;
  3530. background-color: rgba(255, 255, 255, 0.6);
  3531. /* border: 1vh solid rgba(255, 255, 255, 0.6); */
  3532. border-radius: 50%;
  3533. left: 30%;
  3534. top: 0;
  3535. pointer-events: none;
  3536. animation: bmBenchTrailUpperCursorAnimation 1s linear 0s 1;
  3537. box-sizing: border-box;
  3538. }
  3539. @keyframes bmBenchTrailUpperCursorAnimation {
  3540. 0% {
  3541. border: 1vh solid rgba(255, 255, 255, 0.4);
  3542. }
  3543. 40% {
  3544. border: 0vh solid rgba(255, 255, 255, 0.4);
  3545. }
  3546. 100% {
  3547. border: 0vh solid rgba(255, 255, 255, 0.4);
  3548. }
  3549. }
  3550. .bmInfo {
  3551. min-height: 126px;
  3552. border-bottom: 1px solid #444358;
  3553. padding-bottom: 15px;
  3554. }
  3555. .bmInfoNotSelected,
  3556. .bmInfoOneSelected {
  3557. padding: 0 15px 0 25px;
  3558. }
  3559. .bmInfoNsTitle,
  3560. .bmInfoOsTitle {
  3561. display: flex;
  3562. justify-content: space-between;
  3563. align-items: center;
  3564. height: 80px;
  3565. }
  3566. .bmInfoNsInfo,
  3567. .bmInfoOsInfo {
  3568. display: flex;
  3569. flex-direction: column;
  3570. }
  3571. .bmInfoNsInfo > span:nth-child(1),
  3572. .bmInfoOsInfo > span:nth-child(1) {
  3573. /* font-weight: bold; */
  3574. font-size: 18px;
  3575. display: flex;
  3576. align-items: center;
  3577. /* justify-content: center; */
  3578. }
  3579. .bmInfoNsInfo > span:nth-child(2),
  3580. .bmInfoOsInfo > span:nth-child(2) {
  3581. font-size: 12px;
  3582. opacity: 0.4;
  3583. margin-top: 10px;
  3584. /* padding-bottom: 15px; */
  3585. letter-spacing: 1px;
  3586. font-weight: lighter;
  3587. }
  3588. .bmInfoNsChart {
  3589. height: 50px;
  3590. width: 200px;
  3591. }
  3592. .bmInfoOsImg {
  3593. background-image: url(../../assets/benchImage.png);
  3594. background-position: center;
  3595. background-repeat: no-repeat;
  3596. background-size: cover;
  3597. height: 100%;
  3598. width: 120px;
  3599. }
  3600. .bmInfoOsImgA3NF-01 {
  3601. background-image: url(../../assets/bench_img/a3nf_01.jpg) !important;
  3602. }
  3603. .bmInfoOsImgA3NF-02 {
  3604. background-image: url(../../assets/bench_img/a3nf_02.jpg) !important;
  3605. }
  3606. .bmInfoOsImgB9PA-01 {
  3607. background-image: url(../../assets/bench_img/B9PA_01.jpg) !important;
  3608. }
  3609. .bmInfoOsImgB9PA-02 {
  3610. background-image: url(../../assets/bench_img/B9PA_01.jpg) !important;
  3611. }
  3612. .bmInfoOsImgB9PA-04 {
  3613. background-image: url(../../assets/bench_img/B9PA_04.jpg) !important;
  3614. }
  3615. .bmInfoOsImgCBEV-01 {
  3616. background-image: url(../../assets/bench_img/CBEV_01.jpg) !important;
  3617. }
  3618. .bmInfoOsImgQ3NF-01 {
  3619. background-image: url(../../assets/bench_img/Q3nf_01.jpg) !important;
  3620. }
  3621. .bmInfoOsImgH-JP-02 {
  3622. background-image: url(../../assets/bench_img/meb-jp2.jpg) !important;
  3623. }
  3624. .bmInfoOsImgP-CN-01 {
  3625. background-image: url(../../assets/bench_img/MEB-P-CN_01.jpg) !important;
  3626. }
  3627. .bmInfoOsImgH-CN-01 {
  3628. background-image: url(../../assets/bench_img/meb-H_CN_01.jpg) !important;
  3629. }
  3630. .bmInfoOsImgP-TW-01 {
  3631. background-image: url(../../assets/bench_img/meb-h-CN_02.jpg) !important;
  3632. }
  3633. .bmInfoOsImgH-JP-01 {
  3634. background-image: url(../../assets/bench_img/meb-jp1.jpg) !important;
  3635. }
  3636. .bmInfoOsImgD5 {
  3637. background-image: url(../../assets/bench_img/Q7PA_01.jpg) !important;
  3638. }
  3639. .bmInfoOsImgQ6-01 {
  3640. background-image: url(../../assets/bench_img/Q6-01.jpg) !important;
  3641. }
  3642. .bmInfoOsImgQ6-02 {
  3643. background-image: url(../../assets/bench_img/Q6-02.jpg) !important;
  3644. }
  3645. .bmInfoNsTag,
  3646. .bmInfoOsTag {
  3647. display: flex;
  3648. padding: 10px 0;
  3649. }
  3650. .bmInfoTagItem {
  3651. height: 26px;
  3652. padding: 4px 14px;
  3653. background-color: #25293c;
  3654. font-size: 12px;
  3655. display: flex;
  3656. align-items: center;
  3657. justify-content: center;
  3658. border-radius: 13px;
  3659. box-sizing: border-box;
  3660. color: #d0cece;
  3661. margin-right: 10px;
  3662. cursor: pointer;
  3663. user-select: none;
  3664. }
  3665. .bmInfoTagItem:hover {
  3666. background-color: #2d3249;
  3667. }
  3668. .bmInfoTagItem:active {
  3669. background-color: #333a53;
  3670. }
  3671. .bmInfoMsSlide {
  3672. height: 120px;
  3673. width: 200px;
  3674. /* background-color: #3e88ff; */
  3675. background-image: url(../../assets/benchImage.png);
  3676. background-position: center;
  3677. background-repeat: no-repeat;
  3678. background-size: cover;
  3679. cursor: pointer;
  3680. position: relative;
  3681. }
  3682. .bmInfoMsSlideName {
  3683. position: absolute;
  3684. background-color: rgba(23, 25, 43, 0.5);
  3685. font-size: 12px;
  3686. padding: 1px 8px;
  3687. border-radius: 9px;
  3688. left: 3px;
  3689. top: 3px;
  3690. box-sizing: border-box;
  3691. /* text-align: center; */
  3692. backdrop-filter: blur(1px);
  3693. text-shadow: 0 0 10px #000;
  3694. display: flex;
  3695. justify-content: center;
  3696. align-items: center;
  3697. user-select: none;
  3698. }
  3699. .bmInfoMsSlideNameStatus {
  3700. float: right;
  3701. }
  3702. .bmInfoMsSlideNameStatus,
  3703. .bmInfoMsSlideNameStatus4 {
  3704. height: 12px;
  3705. width: 12px;
  3706. border: 3px solid #b1b3b8;
  3707. border-radius: 50%;
  3708. box-sizing: border-box;
  3709. margin-right: 6px;
  3710. }
  3711. .bmInfoMsSlideNameStatus2,
  3712. .bmInfoMsSlideNameStatus3 {
  3713. border: 3px solid #95d475;
  3714. }
  3715. /* .bmInfoMsSlideNameStatus4 {
  3716. border: 3px solid #f89898;
  3717. } */
  3718. .bmInfoMsSlideNameStatus5,
  3719. .bmInfoMsSlideNameStatus6 {
  3720. border: 3px solid #79bbff;
  3721. }
  3722. .bmInfoMultipleSelected {
  3723. position: relative;
  3724. padding: 4px 14px;
  3725. }
  3726. .bmInfoMsPagination {
  3727. position: absolute;
  3728. z-index: 10;
  3729. left: 50%;
  3730. /* top: 60px; */
  3731. height: 16px;
  3732. width: auto;
  3733. /* padding: 0 10px; */
  3734. border-radius: 10px;
  3735. transform: translateX(-50%);
  3736. background-color: rgba(255, 255, 255, 0.3);
  3737. display: flex;
  3738. justify-content: center;
  3739. align-items: center;
  3740. }
  3741. .bmInfoMsPagination :deep() span:nth-child(1) {
  3742. margin-left: 10px;
  3743. }
  3744. .bmInfoMsPagination :deep() span:last-child {
  3745. margin-right: 10px;
  3746. }
  3747. .bmBtn {
  3748. padding: 15px 15px 15px 25px;
  3749. display: flex;
  3750. align-items: center;
  3751. }
  3752. .bmBtnItem {
  3753. cursor: pointer;
  3754. height: 24px;
  3755. width: 24px;
  3756. border-radius: 3px;
  3757. margin-right: 20px;
  3758. transition: all 0.2s;
  3759. color: #aaa;
  3760. }
  3761. /* .bmBtnItem :deep() path {
  3762. color: #aaa;
  3763. } */
  3764. .bmBtnItem:hover {
  3765. background-color: rgba(255, 255, 255, 0.2);
  3766. filter: brightness(1.5);
  3767. }
  3768. .bmBtnItem:active {
  3769. background-color: rgba(255, 255, 255, 0.3);
  3770. }
  3771. .bmBtnItemMonitor,
  3772. .bmBtnMapLocation {
  3773. background-image: linear-gradient(
  3774. 60deg,
  3775. rgb(253 46 91 / 70%) 40%,
  3776. rgb(254 129 130 / 70%)
  3777. );
  3778. color: #ccc;
  3779. }
  3780. .bmBtnItemSelectAll {
  3781. /* position: relative; */
  3782. margin-right: 20px;
  3783. display: flex;
  3784. align-items: center;
  3785. }
  3786. .bmBtnItemSelectAll > .bmBtnItem {
  3787. margin-right: 5px;
  3788. }
  3789. .bmBtnItemSelectAllNum {
  3790. /* position: absolute; */
  3791. /* right: 20px; */
  3792. font-size: 12px;
  3793. color: rgba(226, 228, 243, 0.6);
  3794. }
  3795. .bmBtnItemActive {
  3796. filter: drop-shadow(0 0 2px rgb(255, 255, 255)) brightness(1.5);
  3797. font-size: 20px;
  3798. }
  3799. .bmLog {
  3800. padding: 5px 25px 20px 25px;
  3801. }
  3802. .bmLogBox {
  3803. padding: 15px;
  3804. border: 2px solid #31344a;
  3805. border-radius: 17px;
  3806. box-sizing: border-box;
  3807. background-color: #31344a80;
  3808. /* max-height: 200px; */
  3809. height: 200px;
  3810. overflow-y: scroll;
  3811. /* max-height: 200px; */
  3812. }
  3813. .bmLogItem {
  3814. line-height: 22px;
  3815. margin: 6px 0px;
  3816. padding: 0 6px;
  3817. width: 100%;
  3818. box-sizing: border-box;
  3819. font-size: 14px;
  3820. word-wrap: break-word;
  3821. }
  3822. .bmLogItemDebug {
  3823. color: rgb(115, 201, 255);
  3824. }
  3825. .bmLogItemInfo {
  3826. color: rgb(81, 230, 93);
  3827. }
  3828. .bmLogItemWarning {
  3829. color: rgb(228, 230, 81);
  3830. }
  3831. .bmLogItemError {
  3832. color: rgb(255, 113, 113);
  3833. }
  3834. /* .origin-basic {
  3835. padding: 15px 20px;
  3836. color: #fff;
  3837. font-size: 12px;
  3838. } */
  3839. .origin-basic div {
  3840. margin-bottom: 5px;
  3841. }
  3842. .origin-basic div span {
  3843. margin-right: 12px;
  3844. }
  3845. .origin-basic h2 {
  3846. cursor: pointer;
  3847. font-size: 14px;
  3848. margin-bottom: 10px;
  3849. }
  3850. .origin-map {
  3851. background-color: rgba(117, 117, 117, 0.8);
  3852. }
  3853. .ready {
  3854. color: #65c94c00 !important;
  3855. font-size: 30px;
  3856. }
  3857. .running {
  3858. color: #478bc300 !important;
  3859. font-size: 30px;
  3860. }
  3861. .occupied {
  3862. color: #478bc300 !important;
  3863. font-size: 30px;
  3864. }
  3865. .offline {
  3866. color: #cdd0cf00 !important;
  3867. font-size: 30px;
  3868. }
  3869. /*.offline {
  3870. color: red !important;
  3871. font-size: 30px;
  3872. }*/
  3873. .bmInfoMsSlideNameStatus.ready {
  3874. color: #65c94c !important;
  3875. border: 3px solid #65c94c;
  3876. font-size: 30px;
  3877. }
  3878. .bmInfoMsSlideNameStatus.occupied {
  3879. color: #478bc3 !important;
  3880. border: 3px solid #478bc3;
  3881. font-size: 30px;
  3882. }
  3883. .bmInfoMsSlideNameStatus.offline {
  3884. color: #cdd0cf !important;
  3885. border: 3px solid #cdd0cf;
  3886. font-size: 30px;
  3887. }
  3888. .bmInfoMsSlideNameStatus.offline {
  3889. color: red !important;
  3890. border: 3px solid red;
  3891. font-size: 30px;
  3892. }
  3893. </style>
  3894. <style scoped>
  3895. /* .benchMapBox {
  3896. margin-top: 30px;
  3897. } */
  3898. .benchMapBox :deep() .el-scrollbar__bar {
  3899. display: none;
  3900. }
  3901. .bmContent {
  3902. background-image: linear-gradient(60deg, #16182a 30%, #2d3049);
  3903. border-radius: 10px;
  3904. /* height: 1800px; */
  3905. margin-top: 30px;
  3906. margin-bottom: 30px;
  3907. min-height: 426px;
  3908. }
  3909. .bmMap {
  3910. /* height: 500px; */
  3911. width: 100%;
  3912. /* padding: 5px 10px; */
  3913. box-sizing: border-box;
  3914. }
  3915. .bmMap
  3916. :deep()
  3917. .el-radio-button__original-radio:checked
  3918. + .el-radio-button__inner {
  3919. background-color: #474c79;
  3920. }
  3921. .bmMap
  3922. :deep()
  3923. .el-radio-button__original-radio:checked
  3924. + .el-radio-button__inner
  3925. span {
  3926. color: #fff;
  3927. }
  3928. .bmMap :deep() .el-radio-button__inner {
  3929. background-color: #383c6b;
  3930. border: none;
  3931. box-shadow: none;
  3932. }
  3933. .bmMap :deep() .el-radio-button__inner span {
  3934. color: #ccc;
  3935. }
  3936. .bmMap :deep() .el-radio-button__inner span:hover {
  3937. color: #eee;
  3938. }
  3939. .bmMapImage {
  3940. position: relative;
  3941. width: 100%;
  3942. /* border: 1px solid #fff; */
  3943. background-color: rgba(255, 255, 255, 0.04);
  3944. border-radius: 6px;
  3945. }
  3946. .bmMapItem {
  3947. position: absolute;
  3948. height: 30px;
  3949. width: 30px;
  3950. cursor: pointer;
  3951. }
  3952. .bmMapItemNormal {
  3953. position: absolute;
  3954. height: 100%;
  3955. width: 100%;
  3956. background-color: #16182a;
  3957. /* box-shadow: 0 0 0 3px #393e6d inset; */
  3958. box-sizing: border-box;
  3959. z-index: 2;
  3960. }
  3961. .bmMapItemInfo {
  3962. position: absolute;
  3963. height: 233%;
  3964. width: 120px;
  3965. box-sizing: border-box;
  3966. padding: 3px;
  3967. display: flex;
  3968. justify-content: center;
  3969. align-items: flex-start;
  3970. flex-direction: column;
  3971. font-size: 12px;
  3972. z-index: 6;
  3973. user-select: none;
  3974. /* background: #183153; */
  3975. overflow: hidden;
  3976. border: none;
  3977. color: #ccc;
  3978. border-radius: 10px;
  3979. left: 30px;
  3980. padding-left: 10px;
  3981. background: rgba(117, 117, 117, 0.8);
  3982. }
  3983. .bmMapItemInfoWater {
  3984. position: absolute;
  3985. width: 120px;
  3986. box-sizing: border-box;
  3987. padding: 3px;
  3988. display: flex;
  3989. justify-content: center;
  3990. align-items: flex-start;
  3991. flex-direction: column;
  3992. font-size: 12px;
  3993. z-index: 6;
  3994. user-select: none;
  3995. /* background: #183153; */
  3996. overflow: hidden;
  3997. border: none;
  3998. color: #ccc;
  3999. border-radius: 10px;
  4000. left: 30px;
  4001. padding-left: 10px;
  4002. background: rgba(117, 117, 117, 0.8);
  4003. }
  4004. .bmMapItemInfoAfter {
  4005. width: 0%;
  4006. height: 100%;
  4007. background: rgba(117, 117, 117, 0.8);
  4008. position: absolute;
  4009. transition: all 0.2s ease-in-out;
  4010. right: 0;
  4011. }
  4012. .bmMapItemInfoSelected > .bmMapItemInfoAfter {
  4013. right: auto;
  4014. left: 0;
  4015. width: 100%;
  4016. }
  4017. .bmMapItemInfo span {
  4018. z-index: 20;
  4019. transition: all 0.2s ease-in-out;
  4020. }
  4021. .bmMapItemInfo span + span {
  4022. margin-top: 5px;
  4023. }
  4024. .bmMapItemInfoSelected > span {
  4025. color: #ccc;
  4026. animation: scaleUp 0.2s ease-in-out;
  4027. }
  4028. @keyframes scaleUp {
  4029. 0% {
  4030. transform: scale(1);
  4031. }
  4032. 50% {
  4033. transform: scale(0.95);
  4034. }
  4035. 100% {
  4036. transform: scale(1);
  4037. }
  4038. }
  4039. .bmMapItemInfo span:nth-child(1) {
  4040. font-weight: bold;
  4041. }
  4042. .bmMapItemInfo span:nth-child(2) {
  4043. opacity: 0.8;
  4044. }
  4045. .bmMapItemSelected {
  4046. position: absolute;
  4047. height: 100%;
  4048. width: 100%;
  4049. overflow: hidden;
  4050. z-index: 4;
  4051. }
  4052. .bmMapItemSelected::before {
  4053. content: " ";
  4054. position: absolute;
  4055. height: 100%;
  4056. width: 100%;
  4057. background: linear-gradient(
  4058. 90deg,
  4059. transparent,
  4060. #ff3f99,
  4061. #3e88ff,
  4062. transparent
  4063. );
  4064. /* transform: scale(5); */
  4065. animation: rotation_9018 3000ms infinite linear;
  4066. filter: blur(9px);
  4067. }
  4068. @keyframes rotation_9018 {
  4069. 0% {
  4070. transform: rotate(0deg);
  4071. }
  4072. 100% {
  4073. transform: rotate(360deg);
  4074. }
  4075. }
  4076. .bmMapItemSelectedContent {
  4077. position: absolute;
  4078. height: calc(100% - 6px);
  4079. width: calc(100% - 6px);
  4080. top: 3px;
  4081. left: 3px;
  4082. background-color: #16182a;
  4083. }
  4084. .bmMapItemSelectedContent::before {
  4085. content: " ";
  4086. height: 28px;
  4087. width: 8px;
  4088. position: absolute;
  4089. background: white;
  4090. left: 50%;
  4091. top: 50%;
  4092. transform: translateX(-50%) translateY(-50%);
  4093. filter: blur(12px);
  4094. }
  4095. .bmBench {
  4096. width: 100%;
  4097. height: 100%;
  4098. box-sizing: border-box;
  4099. }
  4100. .bmBenchBox {
  4101. font-size: 0;
  4102. /* margin-top: 5px; */
  4103. position: relative;
  4104. display: flex;
  4105. justify-content: center;
  4106. background-color: #000;
  4107. height: 100%;
  4108. }
  4109. .bmBenchImg {
  4110. /* width: 100%;
  4111. height: 285px; */
  4112. width: 100%;
  4113. background-color: #000;
  4114. /* padding: 80px; */
  4115. height: 100%;
  4116. border-radius: 6px;
  4117. height: 100%;
  4118. }
  4119. .bmBenchTrailUpper {
  4120. position: absolute;
  4121. /* height: 285px; */
  4122. height: 100%;
  4123. width: 100%;
  4124. z-index: 20;
  4125. left: 0;
  4126. top: 0;
  4127. }
  4128. .bmBenchTrailUpperCursorTap {
  4129. position: absolute;
  4130. height: 2vh;
  4131. width: 2vh;
  4132. background-color: rgba(255, 255, 255, 0.8);
  4133. border-radius: 50%;
  4134. left: 30%;
  4135. top: 0;
  4136. animation: bmBenchTrailUpperCursorTapAnimation 0.75s linear 0s 1;
  4137. }
  4138. @keyframes bmBenchTrailUpperCursorTapAnimation {
  4139. 0% {
  4140. transform: scale(1);
  4141. }
  4142. 25% {
  4143. transform: scale(1);
  4144. opacity: 1;
  4145. }
  4146. 40% {
  4147. transform: scale(0.6);
  4148. opacity: 0.6;
  4149. }
  4150. 50% {
  4151. transform: scale(0.6);
  4152. opacity: 0.6;
  4153. }
  4154. 55% {
  4155. transform: scale(1);
  4156. opacity: 1;
  4157. }
  4158. 100% {
  4159. transform: scale(1);
  4160. }
  4161. }
  4162. .bmBenchTrailUpperCursorSwipe {
  4163. position: absolute;
  4164. height: 2vh;
  4165. width: 2vh;
  4166. background-color: rgba(255, 255, 255, 0.8);
  4167. border-radius: 50%;
  4168. transition: all 1s;
  4169. }
  4170. .bmBenchTrailUpperCursorSwipe2 {
  4171. height: 1.5vh;
  4172. width: 1.5vh;
  4173. transition: all 1s 0.05s;
  4174. }
  4175. .bmBenchTrailUpperCursorSwipe3 {
  4176. height: 1vh;
  4177. width: 1vh;
  4178. transition: all 1s 0.1s;
  4179. }
  4180. .bmBenchTrailUpperCursorPress {
  4181. position: absolute;
  4182. height: 2vh;
  4183. width: 2vh;
  4184. background-color: rgba(255, 255, 255, 0.8);
  4185. border-radius: 50%;
  4186. left: 30%;
  4187. top: 0;
  4188. animation: bmBenchTrailUpperCursorPressAnimation 2s linear 0s 1;
  4189. }
  4190. @keyframes bmBenchTrailUpperCursorPressAnimation {
  4191. 0% {
  4192. transform: scale(1);
  4193. }
  4194. 12% {
  4195. transform: scale(1);
  4196. opacity: 1;
  4197. }
  4198. 21% {
  4199. transform: scale(0.6);
  4200. opacity: 0.6;
  4201. }
  4202. 70% {
  4203. transform: scale(0.6);
  4204. opacity: 0.6;
  4205. }
  4206. 73% {
  4207. transform: scale(1);
  4208. opacity: 1;
  4209. }
  4210. 100% {
  4211. transform: scale(1);
  4212. }
  4213. }
  4214. .bmBenchTrailUpperCursor {
  4215. position: absolute;
  4216. height: 2vh;
  4217. width: 2vh;
  4218. background-color: rgba(255, 255, 255, 0.6);
  4219. /* border: 1vh solid rgba(255, 255, 255, 0.6); */
  4220. border-radius: 50%;
  4221. left: 30%;
  4222. top: 0;
  4223. pointer-events: none;
  4224. animation: bmBenchTrailUpperCursorAnimation 1s linear 0s 1;
  4225. box-sizing: border-box;
  4226. }
  4227. @keyframes bmBenchTrailUpperCursorAnimation {
  4228. 0% {
  4229. border: 1vh solid rgba(255, 255, 255, 0.4);
  4230. }
  4231. 40% {
  4232. border: 0vh solid rgba(255, 255, 255, 0.4);
  4233. }
  4234. 100% {
  4235. border: 0vh solid rgba(255, 255, 255, 0.4);
  4236. }
  4237. }
  4238. .bmInfo {
  4239. min-height: 126px;
  4240. border-bottom: 1px solid #444358;
  4241. padding-bottom: 15px;
  4242. }
  4243. .bmInfoNotSelected,
  4244. .bmInfoOneSelected {
  4245. padding: 0 15px 0 25px;
  4246. }
  4247. .bmInfoNsTitle,
  4248. .bmInfoOsTitle {
  4249. display: flex;
  4250. justify-content: space-between;
  4251. align-items: center;
  4252. height: 80px;
  4253. }
  4254. .bmInfoNsInfo,
  4255. .bmInfoOsInfo {
  4256. display: flex;
  4257. flex-direction: column;
  4258. }
  4259. .bmInfoNsInfo > span:nth-child(1),
  4260. .bmInfoOsInfo > span:nth-child(1) {
  4261. /* font-weight: bold; */
  4262. font-size: 18px;
  4263. display: flex;
  4264. align-items: center;
  4265. /* justify-content: center; */
  4266. }
  4267. .bmInfoNsInfo > span:nth-child(2),
  4268. .bmInfoOsInfo > span:nth-child(2) {
  4269. font-size: 12px;
  4270. opacity: 0.4;
  4271. margin-top: 10px;
  4272. /* padding-bottom: 15px; */
  4273. letter-spacing: 1px;
  4274. font-weight: lighter;
  4275. }
  4276. .bmInfoNsChart {
  4277. height: 50px;
  4278. width: 200px;
  4279. }
  4280. .bmInfoOsImg {
  4281. background-image: url(../../assets/benchImage.png);
  4282. background-position: center;
  4283. background-repeat: no-repeat;
  4284. background-size: cover;
  4285. height: 100%;
  4286. width: 120px;
  4287. }
  4288. .bmInfoOsImgA3NF-01 {
  4289. background-image: url(../../assets/bench_img/a3nf_01.jpg) !important;
  4290. }
  4291. .bmInfoOsImgA3NF-02 {
  4292. background-image: url(../../assets/bench_img/a3nf_02.jpg) !important;
  4293. }
  4294. .bmInfoOsImgB9PA-01 {
  4295. background-image: url(../../assets/bench_img/B9PA_01.jpg) !important;
  4296. }
  4297. .bmInfoOsImgB9PA-02 {
  4298. background-image: url(../../assets/bench_img/B9PA_01.jpg) !important;
  4299. }
  4300. .bmInfoOsImgB9PA-04 {
  4301. background-image: url(../../assets/bench_img/B9PA_04.jpg) !important;
  4302. }
  4303. .bmInfoOsImgCBEV-01 {
  4304. background-image: url(../../assets/bench_img/CBEV_01.jpg) !important;
  4305. }
  4306. .bmInfoOsImgQ3NF-01 {
  4307. background-image: url(../../assets/bench_img/Q3nf_01.jpg) !important;
  4308. }
  4309. .bmInfoOsImgH-JP-02 {
  4310. background-image: url(../../assets/bench_img/meb-jp2.jpg) !important;
  4311. }
  4312. .bmInfoOsImgP-CN-01 {
  4313. background-image: url(../../assets/bench_img/MEB-P-CN_01.jpg) !important;
  4314. }
  4315. .bmInfoOsImgH-CN-01 {
  4316. background-image: url(../../assets/bench_img/meb-H_CN_01.jpg) !important;
  4317. }
  4318. .bmInfoOsImgP-TW-01 {
  4319. background-image: url(../../assets/bench_img/meb-h-CN_02.jpg) !important;
  4320. }
  4321. .bmInfoOsImgH-JP-01 {
  4322. background-image: url(../../assets/bench_img/meb-jp1.jpg) !important;
  4323. }
  4324. .bmInfoOsImgD5 {
  4325. background-image: url(../../assets/bench_img/Q7PA_01.jpg) !important;
  4326. }
  4327. .bmInfoOsImgQ6-01 {
  4328. background-image: url(../../assets/bench_img/Q6-01.jpg) !important;
  4329. }
  4330. .bmInfoOsImgQ6-02 {
  4331. background-image: url(../../assets/bench_img/Q6-02.jpg) !important;
  4332. }
  4333. .bmInfoNsTag,
  4334. .bmInfoOsTag {
  4335. display: flex;
  4336. padding: 10px 0;
  4337. }
  4338. .bmInfoTagItem {
  4339. height: 26px;
  4340. padding: 4px 14px;
  4341. background-color: #25293c;
  4342. font-size: 12px;
  4343. display: flex;
  4344. align-items: center;
  4345. justify-content: center;
  4346. border-radius: 13px;
  4347. box-sizing: border-box;
  4348. color: #d0cece;
  4349. margin-right: 10px;
  4350. cursor: pointer;
  4351. user-select: none;
  4352. }
  4353. .bmInfoTagItem:hover {
  4354. background-color: #2d3249;
  4355. }
  4356. .bmInfoTagItem:active {
  4357. background-color: #333a53;
  4358. }
  4359. .bmInfoMsSlide {
  4360. height: 120px;
  4361. width: 200px;
  4362. /* background-color: #3e88ff; */
  4363. background-image: url(../../assets/benchImage.png);
  4364. background-position: center;
  4365. background-repeat: no-repeat;
  4366. background-size: cover;
  4367. cursor: pointer;
  4368. position: relative;
  4369. }
  4370. .bmInfoMsSlideName {
  4371. position: absolute;
  4372. background-color: rgba(23, 25, 43, 0.5);
  4373. font-size: 12px;
  4374. padding: 1px 8px;
  4375. border-radius: 9px;
  4376. left: 3px;
  4377. top: 3px;
  4378. box-sizing: border-box;
  4379. /* text-align: center; */
  4380. backdrop-filter: blur(1px);
  4381. text-shadow: 0 0 10px #000;
  4382. display: flex;
  4383. justify-content: center;
  4384. align-items: center;
  4385. user-select: none;
  4386. }
  4387. .bmInfoMsSlideNameStatus {
  4388. float: right;
  4389. }
  4390. .bmInfoMsSlideNameStatus,
  4391. .bmInfoMsSlideNameStatus4 {
  4392. height: 12px;
  4393. width: 12px;
  4394. border: 3px solid #b1b3b8;
  4395. border-radius: 50%;
  4396. box-sizing: border-box;
  4397. margin-right: 6px;
  4398. }
  4399. .bmInfoMsSlideNameStatus2,
  4400. .bmInfoMsSlideNameStatus3 {
  4401. border: 3px solid #95d475;
  4402. }
  4403. /* .bmInfoMsSlideNameStatus4 {
  4404. border: 3px solid #f89898;
  4405. } */
  4406. .bmInfoMsSlideNameStatus5,
  4407. .bmInfoMsSlideNameStatus6 {
  4408. border: 3px solid #79bbff;
  4409. }
  4410. .bmInfoMultipleSelected {
  4411. position: relative;
  4412. padding: 4px 14px;
  4413. }
  4414. .bmInfoMsPagination {
  4415. position: absolute;
  4416. z-index: 10;
  4417. left: 50%;
  4418. /* top: 60px; */
  4419. height: 16px;
  4420. width: auto;
  4421. /* padding: 0 10px; */
  4422. border-radius: 10px;
  4423. transform: translateX(-50%);
  4424. background-color: rgba(255, 255, 255, 0.3);
  4425. display: flex;
  4426. justify-content: center;
  4427. align-items: center;
  4428. }
  4429. .bmInfoMsPagination :deep() span:nth-child(1) {
  4430. margin-left: 10px;
  4431. }
  4432. .bmInfoMsPagination :deep() span:last-child {
  4433. margin-right: 10px;
  4434. }
  4435. .bmBtn {
  4436. padding: 15px 15px 15px 25px;
  4437. display: flex;
  4438. align-items: center;
  4439. }
  4440. .bmBtnItem {
  4441. cursor: pointer;
  4442. height: 24px;
  4443. width: 24px;
  4444. border-radius: 3px;
  4445. margin-right: 20px;
  4446. transition: all 0.2s;
  4447. color: #aaa;
  4448. }
  4449. /* .bmBtnItem :deep() path {
  4450. color: #aaa;
  4451. } */
  4452. .bmBtnItem:hover {
  4453. background-color: rgba(255, 255, 255, 0.2);
  4454. filter: brightness(1.5);
  4455. }
  4456. .bmBtnItem:active {
  4457. background-color: rgba(255, 255, 255, 0.3);
  4458. }
  4459. .bmBtnItemMonitor,
  4460. .bmBtnMapLocation {
  4461. background-image: linear-gradient(
  4462. 60deg,
  4463. rgb(253 46 91 / 70%) 40%,
  4464. rgb(254 129 130 / 70%)
  4465. );
  4466. color: #ccc;
  4467. }
  4468. .bmBtnItemSelectAll {
  4469. /* position: relative; */
  4470. margin-right: 20px;
  4471. display: flex;
  4472. align-items: center;
  4473. }
  4474. .bmBtnItemSelectAll > .bmBtnItem {
  4475. margin-right: 5px;
  4476. }
  4477. .bmBtnItemSelectAllNum {
  4478. /* position: absolute; */
  4479. /* right: 20px; */
  4480. font-size: 12px;
  4481. color: rgba(226, 228, 243, 0.6);
  4482. }
  4483. .bmBtnItemActive {
  4484. filter: drop-shadow(0 0 2px rgb(255, 255, 255)) brightness(1.5);
  4485. font-size: 20px;
  4486. }
  4487. .bmLog {
  4488. padding: 5px 25px 20px 25px;
  4489. }
  4490. .bmLogBox {
  4491. padding: 15px;
  4492. border: 2px solid #31344a;
  4493. border-radius: 17px;
  4494. box-sizing: border-box;
  4495. background-color: #31344a80;
  4496. /* max-height: 200px; */
  4497. height: 200px;
  4498. overflow-y: scroll;
  4499. /* max-height: 200px; */
  4500. }
  4501. .bmLogItem {
  4502. line-height: 22px;
  4503. margin: 6px 0px;
  4504. padding: 0 6px;
  4505. width: 100%;
  4506. box-sizing: border-box;
  4507. font-size: 14px;
  4508. word-wrap: break-word;
  4509. }
  4510. .bmLogItemDebug {
  4511. color: rgb(115, 201, 255);
  4512. }
  4513. .bmLogItemInfo {
  4514. color: rgb(81, 230, 93);
  4515. }
  4516. .bmLogItemWarning {
  4517. color: rgb(228, 230, 81);
  4518. }
  4519. .bmLogItemError {
  4520. color: rgb(255, 113, 113);
  4521. }
  4522. .origin-basic {
  4523. padding: 15px 20px;
  4524. color: #fff;
  4525. font-size: 12px;
  4526. }
  4527. .origin-basic div {
  4528. margin-bottom: 10px;
  4529. }
  4530. .origin-basic div span {
  4531. margin-right: 12px;
  4532. }
  4533. .origin-basic h2 {
  4534. cursor: pointer;
  4535. font-size: 14px;
  4536. margin-bottom: 10px;
  4537. }
  4538. .originBasicRow {
  4539. display: flex;
  4540. margin-bottom: 0 !important;
  4541. }
  4542. .originBasicRow > div {
  4543. width: 100%;
  4544. }
  4545. .ready {
  4546. color: #65c94c00 !important;
  4547. font-size: 30px;
  4548. }
  4549. .occupied {
  4550. color: #478bc300 !important;
  4551. font-size: 30px;
  4552. }
  4553. .offline {
  4554. color: #cdd0cf00 !important;
  4555. font-size: 30px;
  4556. }
  4557. .offline {
  4558. color: #ff000000 !important;
  4559. font-size: 30px;
  4560. }
  4561. .bmInfoMsSlideNameStatus.ready {
  4562. color: #65c94c !important;
  4563. border: 3px solid #65c94c;
  4564. font-size: 30px;
  4565. }
  4566. .bmInfoMsSlideNameStatus.occupied {
  4567. color: #478bc3 !important;
  4568. border: 3px solid #478bc3;
  4569. font-size: 30px;
  4570. }
  4571. .bmInfoMsSlideNameStatus.offline {
  4572. color: #cdd0cf !important;
  4573. border: 3px solid #cdd0cf;
  4574. font-size: 30px;
  4575. }
  4576. .bmInfoMsSlideNameStatus.offline {
  4577. color: red !important;
  4578. border: 3px solid red;
  4579. font-size: 30px;
  4580. }
  4581. .secondScreen {
  4582. width: 26.36vw;
  4583. height: 26.38vh;
  4584. margin-left: 1.56vw;
  4585. margin-bottom: 2.13vh;
  4586. border-radius: 2.08vw;
  4587. overflow: hidden;
  4588. }
  4589. .benchBtnActive {
  4590. filter: brightness(5) drop-shadow(0 2px 3px rgb(255, 255, 255));
  4591. }
  4592. .grid-item-background {
  4593. height: 20vh;
  4594. width: calc(100% - 10px);
  4595. border-radius: 10px;
  4596. margin: 0 auto 10px;
  4597. display: flex;
  4598. align-items: center;
  4599. justify-content: center;
  4600. position: relative;
  4601. }
  4602. .mouse-flow {
  4603. position: absolute;
  4604. z-index: 99999;
  4605. display: flex;
  4606. flex-direction: column;
  4607. width: 100px;
  4608. color: #fff;
  4609. border-radius: 10px;
  4610. background-color: rgba(0, 0, 0, 0.8);
  4611. }
  4612. .mouse-flow-title {
  4613. font-size: 14px;
  4614. }
  4615. .mouse-flow-dep {
  4616. font-size: 12px;
  4617. }
  4618. .mouse-flow-status {
  4619. width: 10px;
  4620. height: 10px;
  4621. float: right;
  4622. border-radius: 100%;
  4623. }
  4624. .ready {
  4625. background-color: #65c94c00 !important;
  4626. }
  4627. .occupied {
  4628. background-color: #478bc300 !important;
  4629. }
  4630. .offline {
  4631. background-color: #cdd0cf00 !important;
  4632. }
  4633. .error {
  4634. background-color: #ff000000 !important;
  4635. }
  4636. </style>