index.vue 122 KB

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