index.vue 122 KB

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