1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075 |
- <template>
- <div>
- <div class="container" v-show="isOpen3d" key="container">
- <SearchBarMain />
- <div class="vr-bg" id="vr-bg-container"></div>
- <div id="player" style="width: 100%; height: 100%"></div>
- </div>
- <div
- class="ordinary-container"
- key="ordinary-container"
- v-show="!isOpen3d"
- @click="onBlur"
- >
- <div class="ordinary-left">
- <SearchBar
- class="search-container"
- v-model="inputValue"
- @focus="onFocus"
- @input="onInput"
- @blur="onBlur"
- ref="searchbar"
- />
- <div class="square-map" v-show="isOpenSquare">
- <el-row>
- <el-col v-for="(item, index) in images" :key="item" :span="8">
- <div
- class="grid-item-background"
- style="
- background-color: black;
- padding-top: 35px;
- padding-bottom: 25px;
- padding-left: 9px;
- padding-right: 5px;
- margin: 10px;
- border-radius: 20px;
- "
- >
- <div class="grid-item">
- <img
- :src="item.url"
- @dblclick="handleDblClickImg(item.alt)"
- @click="handleClickImg(item.alt, index)"
- />
- </div>
- <div class="grid-item-close">
- <img
- width="30px"
- src="../../images/closeremotebench.png"
- @click="handleCloseImg(item.alt)"
- />
- </div>
- </div>
- </el-col>
- </el-row>
- </div>
- <div class="filter-bench-list" v-show="isOpen" z-index="9999">
- <dropdown :is-open="isOpen" ref="dropdown">
- <template v-slot:table>
- <table-component
- :data="filterBenchList"
- :filters="filters"
- :row-class-name="rowClassName"
- ></table-component>
- </template>
- </dropdown>
- </div>
- <div
- v-show="!isConnected && !isOpenSquare && !isOpen"
- class="ordinary-map-container"
- z-index="9998"
- >
- <div class="ordinary-map" id="ordinary-map">
- <!-- <img src="../../images/map.png" /> -->
- <div class="vr-bg" id="vr-bg-container"></div>
- <div id="playersmall"></div>
- <div class="ordinary-map-ex">
- <div class="square-count">
- <status-bar
- :ready="readyCount"
- :occupied="occupiedCount"
- :offline="offlineCount"
- ></status-bar>
- </div>
- <!-- <div class="bench-list">
- <div class="bench-list-buttons" @click="clickBenchList">
- My Bench List
- </div>
- </div> -->
- </div>
- </div>
- <div class="ordinary-map-hidden">
- <div class="ordinary-map-blocker" id="ordinary-map-blocker">
- </div>
- </div>
- </div>
- <div v-show="isConnected && !isOpenSquare && !isOpen" class="origin-map">
- <Transition name="slide">
- <div class="bmMap" v-if="false">
- <dropdown :is-open="isOpen" ref="dropdown">
- <template v-slot:table>
- <table-component
- :data="benchList"
- :filters="filters"
- :row-class-name="rowClassName"
- ></table-component>
- </template>
- </dropdown>
- <div class="bmMapImage">
- <div
- v-for="(item, key) in benchList"
- :key="key"
- class="bmMapItem el-icon-location"
- :style="{
- left: item.left + '%',
- top: item.top + '%',
- }"
- :class="item.status"
- @click="bmMapItemSelect(key)"
- >
- <Transition v-if="item.selected">
- <template>
- <div
- class="bmMapItemInfo"
- :class="{
- bmMapItemInfoSelected: item.selected,
- }"
- >
- <span>
- {{ item.name }}
- </span>
- <span style="display: flex; align-items: center">
- {{ item.Project }}
- </span>
- <div style="width: 100%">
- <span
- class="bmInfoMsSlideNameStatus"
- :class="{
- ['bmInfoMsSlideNameStatus ' + item.status]: true,
- }"
- ></span>
- </div>
- <!-- <div class="bmMapItemInfoAfter"></div> -->
- </div>
- </template>
- </Transition>
- </div>
- </div>
- </div>
- </Transition>
- <Transition name="slide">
- <div class="bmBench" v-if="benchDisplayVisible">
- <div class="bmBenchBox">
- <img
- class="bmBenchImg bmBenchImgUpper"
- ref="bmBenchRef"
- :src="
- currentScreen == 'upper' ? benchImgUpper : benchImgLower
- "
- alt=""
- />
- <div
- @mousedown="controlCursorMouseDown"
- @mousemove="controlCursorMouseMove"
- @mouseleave="controlCursorMouseOut"
- @mouseup="controlCursorMouseUp"
- class="bmBenchTrailUpper"
- >
- <Transition>
- <div
- v-if="ifBmBenchTrailUpperCursorTap"
- class="bmBenchTrailUpperCursorTap"
- :style="{
- left: trailCursorPosition.left,
- top: trailCursorPosition.top,
- }"
- ></div>
- </Transition>
- <Transition>
- <div
- v-if="ifBmBenchTrailUpperCursorSwipe"
- class="bmBenchTrailUpperCursorSwipe"
- :style="{
- left: 'calc(' + trailCursorPosition.left + '% - 1vh)',
- top: 'calc(' + trailCursorPosition.top + '% - 1vh)',
- }"
- ></div>
- </Transition>
- <Transition>
- <div
- v-if="ifBmBenchTrailUpperCursorSwipe"
- class="bmBenchTrailUpperCursorSwipe bmBenchTrailUpperCursorSwipe2"
- :style="{
- left:
- 'calc(' + trailCursorPosition.left + '% - 0.75vh)',
- top: 'calc(' + trailCursorPosition.top + '% - 0.75vh)',
- }"
- ></div>
- </Transition>
- <Transition>
- <div
- v-if="ifBmBenchTrailUpperCursorSwipe"
- class="bmBenchTrailUpperCursorSwipe bmBenchTrailUpperCursorSwipe3"
- :style="{
- left: 'calc(' + trailCursorPosition.left + '% - 0.5vh)',
- top: 'calc(' + trailCursorPosition.top + '% - 0.5vh)',
- }"
- ></div>
- </Transition>
- <Transition>
- <div
- v-if="ifBmBenchTrailUpperCursorPress"
- class="bmBenchTrailUpperCursorPress"
- :style="{
- left: 'calc(' + trailCursorPosition.left + '% - 1vh)',
- top: 'calc(' + trailCursorPosition.top + '% - 1vh)',
- }"
- ></div>
- </Transition>
- <Transition>
- <div
- v-if="ifBmBenchTrailUpperCursor"
- class="bmBenchTrailUpperCursor"
- :style="{
- left:
- 'calc(' + controlCursorPosition.left + 'px - 1vh)',
- top: 'calc(' + controlCursorPosition.top + 'px - 1vh)',
- }"
- ></div>
- </Transition>
- </div>
- </div>
- </div>
- </Transition>
- <img :src="mainSnapshot" />
- </div>
- <image-list
- v-show="isConnected && !isOpenSquare && !isOpen"
- :images="images"
- :page-size="pageSize"
- :current-page="currentPage"
- @handleImageClick="handleImageClick"
- @prev-page="prevPage"
- @next-page="nextPage"
- class="image-container"
- />
- <el-row v-show="isConnected && !isOpenSquare && !isOpen" class="bench-button">
- <el-col :span="5" class="btn-item" style="text-align: center">{{
- currentBench.name
- }}</el-col>
- <el-col
- :span="3"
- class="btn-item"
- :class="{ benchBtnActive: isPlaying }"
- >
- <img
- @click="connectAudioDevice('collectAudio')"
- src="../../images/sound.png"
- />
- </el-col>
- <el-col
- :span="3"
- class="btn-item"
- :class="{ benchBtnActive: isRecording }"
- >
- <img
- @click="connectAudioDevice('playAudio')"
- src="../../images/mic.png"
- />
- </el-col>
- <el-col
- :span="3"
- class="btn-item"
- :class="{ benchBtnActive: displayTapMode }"
- >
- <img @click="tapModeControl" src="../../images/pointer.png" />
- </el-col>
- <el-col :span="3" class="btn-item">
- <img @click="showLogBox" src="../../images/book.png" />
- </el-col>
- <el-col :span="3" class="btn-item">
- <img @click="pressPtt" src="../../images/robot.png" />
- </el-col>
- <!-- <el-col :span="3" class="btn-item" @click="clickBenchList">
- <img @click="gotoGrid" src="../../images/grid.png" />
- </el-col> -->
- <el-col :span="3" class="btn-item">
- <img @click="disconnectBench" src="../../images/disconnect.png" />
- </el-col>
- </el-row>
- </div>
- <div class="origin-right">
- <!-- <div class="square-count" v-show="!currentBench.selected && isOpenSquare">
- <status-bar
- :ready="readyCount"
- :occupied="occupiedCount"
- :offline="offlineCount"
- ></status-bar>
- </div> -->
- <!-- <div
- class="origin-basic"
- v-show="currentBench.type == 2 && !isOpenSquare"
- @dblclick="handleInfoDblClick(currentBench.benchId)"
- >
- <h2 @click="bmMapItemActivate">{{ currentBench.name }} 🔗</h2>
- <div class="originBasicRow">
- <div>
- <span>Location:</span>
- <span>Automation Lab-7E</span>
- </div>
- <div>
- <span>MU_SW</span>
- <span>{{ currentBench.MU_SW }}</span>
- </div>
- </div>
- <div class="originBasicRow">
- <div>
- <span>Cluster</span>
- <span>{{ currentBench.Cluster }}</span>
- </div>
- <div>
- <span>Market</span>
- <span>{{ currentBench.Market }}</span>
- </div>
- </div>
- <div class="originBasicRow">
- <div>
- <span>Box IP</span>
- <span>{{ currentBench.ip }}</span>
- </div>
- <div>
- <span>Box Version</span>
- <span>{{ currentBench.equipment?.version }}</span>
- </div>
- </div>
- </div> -->
- <!-- <div
- class="secondScreen"
- v-if="benchDisplayLowerVisible && !isOpenSquare"
- @click="switchScreen"
- >
- <img
- class="bmBenchImg bmBenchImgLower"
- :src="currentScreen == 'upper' ? benchImgLower : benchImgUpper"
- alt=""
- />
- </div> -->
- <!--<div
- class="origin-basic backgroundBox"
- v-show="currentBench.type == 2"
- @dblclick="handleInfoDblClick(currentBench.benchId)"
- >
- <h2 @click="bmMapItemActivate">{{ currentBench.name }} 🔗</h2>
- <div class="originBasicRow">
- <div>
- <span>Location:</span>
- <span>Automation Lab-7E</span>
- </div>
- <div>
- <span>MU_SW</span>
- <span>{{ currentBench.MU_SW }}</span>
- </div>
- </div>
- <div class="originBasicRow">
- <div>
- <span>Cluster</span>
- <span>{{ currentBench.Cluster }}</span>
- </div>
- <div>
- <span>Market</span>
- <span>{{ currentBench.Market }}</span>
- </div>
- </div>
- <div class="originBasicRow">
- <div>
- <span>Box IP</span>
- <span>{{ currentBench.ip }}</span>
- </div>
- <div>
- <span>Box Version</span>
- <span>{{ currentBench.equipment?.version }}</span>
- </div>
- </div>
- </div>
- <div
- class="secondScreen"
- v-if="benchDisplayLowerVisible"
- @click="switchScreen"
- >
- <img
- class="bmBenchImg bmBenchImgLower"
- :src="currentScreen == 'upper' ? benchImgLower : benchImgUpper"
- alt=""
- />
- </div>-->
- <div class="ordinary-list">
- <TabList
- :tabs="tabs"
- :itemRender="itemRender"
- :planRender="planRender"
- :taskRender="taskRender"
- :issueRender="issueRender"
- :planList="planList"
- :caseList="caseList"
- :autoCaseList="autoCaseList"
- :is-show-auto-case-list="isShowAutoCaseList"
- :planName="planName"
- :taskName="taskName"
- :caseName="caseName"
- :is-show-plan-list="isShowPlanList"
- :is-show-task-list="isShowTaskList"
- :is-show-case-commit="isShowCaseCommit"
- :is-show-case-list="isShowCaseList"
- :is-show-case-detail="isShowCaseDetail"
- :clickBackToTaskList="clickBackToTaskList"
- :clickBackToPlanList="clickBackToPlanList"
- :selectRowPlan="selectRowPlan"
- :caseProject="caseProject"
- :currentCase="currentCase"
- :caseActive="caseActive"
- :caseFunction="caseFunction"
- caseContent="caseContent"
- :isShowAutoCaseCommit="isShowAutoCaseCommit"
- @turnNextCase="turnNextCase"
- :caseSubFunction="caseSubFunction"
- :caseMarket="caseMarket"
- :caseLanguage="caseLanguage"
- v-if="renderBenchList"
- :selectRowCase="selectRowCase"
- :clickBackToAutoPlanList="clickBackToAutoPlanList"
- :tabClass="tabClass"
- :planBack="planBack"
- :clickBackToPlan="clickBackToPlan"
- :submitManualCase="submitManualCase"
- :clickBackToCaseList="clickBackToCaseList"
- :isShowIssueList="isShowIssueList"
- :isShowIssueDetail="isShowIssueDetail"
- :currentIssue="currentIssue"
- :currentPlanId="currentPlanId"
- :submitAutoCase="submitAutoCase"
- :clickBackToAutoCaseList="clickBackToAutoCaseList"
- :clickBackToIssueList="clickBackToIssueList"
- :benchDisplayLowerVisible="benchDisplayLowerVisible"
- :currentScreen="currentScreen"
- :benchImgLower="benchImgLower"
- :benchImgUpper="benchImgUpper"
- :readyCount="readyCount"
- :occupiedCount="occupiedCount"
- :offlineCount="offlineCount"
- ></TabList>
- </div>
- </div>
- </div>
- <bench-detail
- :is-detail-visible="isDetailVisible"
- :is-remote-btn-visible="isRemoteBtnVisible"
- :closeDetail="closeDetail"
- ref="benchdetail"
- :bench="currentBench"
- @changeCurrentBench="changeCurrentBench"
- />
- </div>
- </template>
- <script>
- import "./index.less";
- import "./origin.less";
- import "./square.less";
- import TabList from "../../components/TabList";
- import SearchBar from "../../components/SearchBar";
- import Dropdown from "./components/DropDown";
- import TableComponent from "./components/TableComponent";
- import BenchDetail from "../../components/BenchDetail";
- import StatusBar from "../../components/StatusBar";
- //import { benchList } from './api'
- import THREE from "three";
- import { uwbMain } from "../../uwb-sample";
- import { mapState } from "vuex";
- import ImageList from "./components/ImageList";
- import webSocket from "../../service/ws";
- import bus from "../../service/bus";
- import { FBXLoader } from "../../FBXLoader.js";
- import SearchBarMain from "../../components/SearchBarMain";
- const ws = new webSocket();
- let that = null;
- let wsArray = [];
- let wsArrayLength = 0;
- for (var iR = 0; iR < 20; iR++) {
- const wsRemote = new webSocket();
- wsRemote.open().then((res) => {
- // console.log("res", res);
- });
- wsArray.push(wsRemote);
- }
- export default {
- components: {
- StatusBar,
- TabList,
- SearchBar,
- Dropdown,
- TableComponent,
- BenchDetail,
- ImageList,
- SearchBarMain,
- },
- data() {
- return {
- inputValue: "",
- isOpen: false,
- isDetailVisible: false,
- isRemoteBtnVisible: false,
- isShowPlanList: false,
- isShowCaseList: false,
- isShowAutoCaseList: false,
- isShowCaseDetail: false,
- isShowCaseCommit: false,
- isShowIssueList: true,
- isShowIssueDetail: false,
- isShowAutoCaseCommit: false,
- taskName: "",
- planName: "",
- caseName: "",
- caseProject: "",
- caseActive: "",
- caseFunction: "",
- caseSubFunction: "",
- caseMarket: "",
- caseLanguage: "",
- caseContent: "",
- isShowTaskList: true,
- benchDisplayVisible: false,
- mainSnapshot: "",
- currentBench: {},
- readyCount: 10,
- occupiedCount: 5,
- offlineCount: 3,
- previousSelectedBenchList: [],
- selectedBenchList: [],
- renderBenchList: true,
- filters: [],
- currentCase: null,
- currentIssue: null,
- currentPlanId: null,
- currentCaseIndex: 0,
- tabs: [
- {
- title: "Bench",
- list: [
- // {
- // title: 'Item 1',
- // description: '1111111',
- // image: 'item1.jpg',
- // tag: 'Tag 1'
- // },
- // {
- // title: 'Item 2',
- // description: '32222',
- // image: 'item2.jpg',
- // tag: 'Tag 2'
- // },
- // {
- // title: 'Item 3',
- // description: '1111111',
- // image: 'item3.jpg',
- // tag: 'Tag 3'
- // }
- ],
- },
- {
- title: "Task",
- list: [
- {
- itemtype: 2,
- title: "Item 4",
- description: "1111111",
- image: "item4.jpg",
- tag: "Tag 4",
- },
- {
- itemtype: 2,
- title: "Item 5",
- description: "1111111",
- image: "item5.jpg",
- tag: "Tag 5",
- },
- {
- itemtype: 2,
- title: "Item 6",
- description: "1111111",
- image: "item6.jpg",
- tag: "Tag 6",
- },
- ],
- },
- {
- title: "Issue",
- list: [
- {
- title: "Item 7",
- image: "item7.jpg",
- tag: "Tag 7",
- },
- {
- title: "Item 8",
- image: "item8.jpg",
- tag: "Tag 8",
- },
- {
- title: "Item 9",
- image: "item9.jpg",
- tag: "Tag 9",
- },
- ],
- },
- ],
- tableData: [
- {
- benchname: "Bench 1",
- project: "Project A",
- carline: "Carline A",
- market: "Market A",
- sw: "SW 1",
- status: "Status A",
- },
- {
- benchname: "Bench 2",
- project: "Project B",
- carline: "Carline B",
- market: "Market B",
- sw: "SW 2",
- status: "Status B",
- },
- // ...
- ],
- currentPage: 1,
- pageSize: 5,
- benchId: "219",
- mainSnapshot: "",
- timer: 0,
- platform: null,
- connetedBenchId: "",
- displayTapMode: false,
- controlCursorPosition: {},
- ifBmBenchTrailUpperCursorTap: false,
- benchLog: [],
- trailCursorPosition: {},
- audioName: "",
- ifBmBenchTrailUpperCursorSwipe: false,
- ifBmBenchTrailUpperCursorPress: false,
- ifBmBenchTrailUpperCursor: false,
- controlStartPoint: {},
- ifShowLogBox: false,
- filterData: {
- keyword: "",
- currentPage: 1,
- pageSize: 10,
- status: [4, 3, 5, 0, 2, 6],
- types: [],
- "basic attributes": [],
- ips: [],
- orderBy: "desc",
- orderkey: "id",
- },
- benchImgUpper: "",
- benchImgUpperMap: {},
- currentScreen: "upper",
- benchDisplayLowerVisible: false,
- benchImgLower: "",
- benchImgLowerMap: {},
- isPlaying: false,
- isRecording: false,
- loopSendAudioTime: null,
- sendAudioString: "",
- vadThreshold: 0,
- recStream: null,
- paAc: null,
- paSource: null,
- paScriptNode: null,
- sempleRateMultiple: null,
- recordSuperposeArr: [],
- sempleRateHandlingThreshold: null,
- playAudioBenchList: [],
- isConnected: false,
- currentBenchId: 0,
- gridItems: [1, 2, 3, 4, 5, 6, 7, 8, 9],
- timerIdMap: { num: 0 },
- timerId: 0,
- autoPlanResultInterval: 0,
- remoteBenchList: []
- };
- },
- computed: {
- // tabClass(){
- // return 'ordinary';
- // },
- tabClass() {
- return this.currentBench.type == 2 ? "short" : "long";
- },
- ...mapState({
- images: (state) => {
- console.log(state.benchList.benchImgList, "imageList");
- return state.benchList.benchImgList;
- },
- isOpenSquare: (state) => {
- return state.common.isOpenSquare;
- },
- isOpen3d: (state) => {
- return state.common.isOpen3d;
- },
- benchList: (state) => {
- return state.benchList.benchList;
- },
- taskList: (state) => {
- return state.taskList.taskList;
- },
- planList: (state) => {
- console.log(state.planList.planList, "planList==============");
- let planList = state.planList.planList.concat(
- state.planList.autoPlanList
- );
- planList = planList.sort((p1, p2) => p1.id - p2.id);
- return planList;
- },
- autoPlanList: (state) => {
- return state.planList.autoPlanList;
- },
- caseList: (state) => {
- return state.caseList.caseList;
- },
- autoCaseList: (state) => {
- return state.caseList.autoCaseList;
- },
- issueList: (state) => {
- return state.issueList.issueList;
- },
- autoTaskStatus: (state) => {
- return state.caseList.autoTaskStatus
- },
- filterBenchList: (state) => {
- return state.benchList.filterBenchList.sort((a, b) => {
- let i = 0;
- let j = 0;
- for (let m = 0; m < a.MU_SW.length; m++) {
- i += a.MU_SW.charCodeAt(m);
- }
- for (let n = 0; n < b.MU_SW.length; n++) {
- j += b.MU_SW.charCodeAt(n);
- }
- return i - j;
- });
- },
- autoTaskStatusMap: (state) => {
- return state.caseList.autoTaskStatusMap
- }
- }),
- },
- created() {
- // uwbMain("player", window.innerWidth, window.innerHeight, "panorama");
- ws.open().then((res) => {
- // console.log("res", res);
- });
- window.handleListClick = this.handleListClick;
- window.handleBenchClick = this.handleBenchClick;
- window.handleClickTask = this.handleClickTask.bind(this);
- window.selectRowPlan = this.selectRowPlan.bind(this);
- window.selectRowCase = this.selectRowCase.bind(this);
- window.selectRowIssue = this.selectRowIssue.bind(this);
- window.handleListDbClick = this.handleListDbClick;
- window.showBenchPos = this.showBenchPos;
- window.handleClickImg = this.handleClickImg;
- let that = this;
- window.bmMapItemSelect = this.bmMapItemSelect.bind(this);
- window.bmMapItemUnSelect = this.bmMapItemUnSelect.bind(this);
- window.handleClickIssue = this.handleClickIssue.bind(this);
- window.selectBench = this.selectBench.bind(this);
- that.$store.dispatch("taskList/clearTaskList");
- that.$store.dispatch("taskList/fetchTaskList", {
- page_num: 1,
- page_size: 1000,
- });
- window.bmMapItemActivate = this.bmMapItemActivate;
- // 调用定时器方法,返回定时器id,用于按条件清空
- that.timerId = that.myInterval((count) => {
- // console.log(count)
- this.$store.dispatch("benchList/fetchBenchList");
- if (count > 30000) {
- console.log("end");
- that.clearMyInterval(that.timerId);
- }
- }, 3000);
- this.$store.dispatch("issueList/fetchIssueList", {
- bench_id: null,
- page_num: 1,
- page_size: 10,
- processor: 0,
- ticket_status: 0,
- ticket_type: 0,
- });
- },
- async mounted() {
- that = this;
- //this.getBenchList();
- console.log(this.benchList, "benchList");
- this.tabs[0].list = this.benchList;
- this.tabs[1].list = this.taskList;
- this.tabs[2].list = this.issueList;
- let mapDom = document.getElementsByClassName("ordinary-map")[0];
- let style = getComputedStyle(mapDom);
- let width = parseFloat(style.width);
- let height = parseFloat(style.height);
- let ratio = 1.8;
- window.renderWidth = width * ratio;
- window.renderHeight = height * ratio;
- sessionStorage.setItem('3dMode', 0)
- uwbMain('playersmall', width * ratio, height * ratio, "floorplan");
-
- // window.sdkInstance.sceneRenderer.updateScreenSize(width * ratio, height * ratio);
- setTimeout(() => {
- var element = document.getElementById('house-player');
- element.style.marginLeft = ((width - (width * ratio)) / 2) + 'px';
- element.style.marginTop = ((height - (height * ratio)) / 2) + 'px';
- }, 1000)
- setTimeout(() => {
- let self = this;
- var objRBL = this.remoteBenchList;
- if (objRBL) {
- console.log("objRBL", objRBL);
- wsArrayLength = objRBL.length;
- for (var iW = 0; iW < objRBL.length; iW++) {
- var i = JSON.parse(JSON.stringify(iW));
- let benchId = JSON.parse(JSON.stringify(objRBL[i]));
- setTimeout(() => {
- console.log("connect bench", benchId);
- wsArray[i]
- ?.connectBench({ bench_id: String(benchId) })
- .then((res) => {
- console.log("connect bench success", benchId);
- self.getBenchImage(benchId, 1, wsArray[i], () => {});
- })
- .catch((err) => {
- console.log("connect bench failed", benchId);
- this.$message({
- message: "This bench is offline",
- // message: "",
- type: "warning",
- });
- });
- }, iW * 2000);
- }
- }
- }, 3000);
- bus.on("newLog", (param) => {
- if (param.action) {
- this.benchLog.unshift(param);
- // document.getElementsByClassName("bmLogBottom")[0].scrollIntoView();
- if (Object.keys(param.action).length != 0) {
- // console.log("actionType", param.action.actionType);
- let position = param.action.pos;
- // console.log("position", position);
- if (param.action.actionType == "swipe on") {
- this.ifBmBenchTrailUpperCursorSwipe = true;
- this.trailCursorPosition.left = (position[0] / 1540) * 100;
- this.trailCursorPosition.top = (position[1] / 720) * 100;
- setTimeout(() => {
- this.trailCursorPosition.left =
- ((position[0] + position[2]) / 1540) * 100;
- this.trailCursorPosition.top =
- ((position[1] + position[3]) / 720) * 100;
- }, 800);
- setTimeout(() => {
- this.ifBmBenchTrailUpperCursorSwipe = false;
- }, 2000);
- } else if (param.action.actionType == "tap on") {
- this.ifBmBenchTrailUpperCursorTap = true;
- setTimeout(() => {
- this.ifBmBenchTrailUpperCursorTap = false;
- }, 1500);
- this.trailCursorPosition.left =
- "calc(" + ((position[0] * 2) / 1540) * 100 + "% - 1vh)";
- this.trailCursorPosition.top =
- "calc(" + ((position[1] * 2) / 720) * 100 + "% - 1vh)";
- } else if (param.action.actionType == "longPress on") {
- this.ifBmBenchTrailUpperCursorPress = true;
- setTimeout(() => {
- this.ifBmBenchTrailUpperCursorPress = false;
- }, 1500);
- this.trailCursorPosition.left = ((position[0] * 2) / 1540) * 100;
- this.trailCursorPosition.top = ((position[1] * 2) / 720) * 100;
- } else if (param.action.actionType == "audio") {
- // console.log("newLog", param);
- let fileName = param.action.file_name;
- console.log("audiofileName", fileName);
- this.audioName = fileName;
- bus.emit("planAudioEmit");
- }
- }
- }
- if (this.benchLog.length > 100) {
- this.benchLog.pop();
- }
- });
- bus.on("switchScreen", (param) => {
- this.currentScreen = param.currentScreen;
- });
- bus.on("goHome", () => {
- this.isConnected = false;
- this.$store.dispatch("common/setSquareStatus", false);
- });
- let autoCurrentTaskData = window.localStorage.getItem(
- "autoCurrentTaskData"
- );
- autoCurrentTaskData = JSON.parse(autoCurrentTaskData);
- if (autoCurrentTaskData) {
- this.$store.dispatch("caseList/setPlanExecId", autoCurrentTaskData.id);
- this.$store.dispatch('caseList/getAutoPlanResult',{planId: autoCurrentTaskData.id, key: autoCurrentTaskData.index});
- this.autoPlanResultInterval = setInterval(() => {
- this.$store.dispatch('caseList/getAutoPlanResult',{planId: autoCurrentTaskData.id, key: autoCurrentTaskData.index});
- }, 15000);
- }
- },
- methods: {
- changeCurrentBench(benchId) {
- this.isDetailVisible = false;
- if (this.isOpen3d) {
- this.$store.dispatch("common/toggle3dStatus");
- }
- this.selectBench(benchId);
- },
- myInterval(callback, interval) {
- // 每设置一次定时器,num++ 代表系统中有num个自定义的定时器
- this.timerIdMap.num++;
- // 第 num 个定时器的id
- let intervalId = "id" + this.timerIdMap.num;
- this.timerIdMap[intervalId] = true;
- // 循环次数
- let count = 0;
- let startTime = Date.now();
- let loop = () => {
- // 系统map中不存在这个id,就停止循环
- if (!this.timerIdMap[intervalId]) {
- return;
- }
- if (Date.now() > startTime + interval * (count + 1)) {
- count++;
- callback(count);
- }
- window.requestAnimationFrame(loop);
- };
- loop();
- return intervalId;
- },
- // 清空定时器,删除全局的定时器id map
- clearMyInterval(intervalId) {
- delete this.timerIdMap[intervalId];
- },
- turnToNextManualCase() {},
- clickBackToTaskList() {
- this.isShowPlanList = false;
- this.isShowTaskList = true;
- // this.planList = [];
- },
- clickBackToCaseList() {
- this.isShowCaseCommit = false;
- this.isShowCaseList = true;
- },
- submitManualCase(item) {
- console.log(this.currentCase, "manualcasedetail============");
- this.isShowCaseCommit = true;
- this.isShowCaseDetail = false;
- },
- clickBackToIssueList() {
- this.isShowIssueList = true;
- this.isShowIssueDetail = false;
- },
- clickBackToPlan() {
- this.isShowCaseDetail = false;
- if (sessionStorage.getItem("autoCase") == 0) {
- this.isShowCaseList = true;
- } else {
- this.isShowAutoCaseList = true;
- }
- },
- submitAutoCase() {
- if (this.autoTaskStatus == 'waiting' || this.autoTaskStatus == 'running') {
- let plan = JSON.stringify(localStorage.getItem('autoCurrentTaskData'))
- let planId = plan.id || 0;
- this.$store.dispatch('caseList/cancelPlan', planId);
- clearInterval(this.autoPlanResultInterval)
- this.clickBackToTaskList()
- return
- }
- this.isShowAutoCaseList = false;
- this.isShowAutoCaseCommit = true;
- },
- clickBackToAutoCaseList() {
- this.isShowAutoCaseList = true;
- this.isShowAutoCaseCommit = false;
- },
- selectRowPlan(id, auto, name) {
- console.log(id, "selectrowdata");
- if (!auto || auto == "undefined" || auto == "false") {
- this.currentPlanId = id;
- this.$store.dispatch("caseList/fetchCaseList", {
- uuid: id,
- page_num: 1,
- page_size: 100,
- });
- this.isShowCaseList = true;
- sessionStorage.setItem("autoCase", 0);
- this.$store.dispatch("caseList/setCurrentTask", id);
- } else {
- if (id == 109) id = 222;
- this.currentPlanId = id;
- this.$store.dispatch("caseList/fetchAutoCaseList", {
- planId: id,
- planName: name
- });
- this.isShowAutoCaseList = true;
- this.$store.dispatch("caseList/setCurrentTask", id);
- sessionStorage.setItem("autoCase", 1);
- }
- this.$store.dispatch("common/fetchOptionList");
- this.isShowPlanList = false;
- this.planName = name;
- },
- selectRowCase(row) {
- this.isShowCaseList = false;
- this.isShowCaseDetail = true;
- this.caseName = row.m_id;
- this.caseProject = row.precondition;
- //this.caseActive =,
- this.caseFunction = row.action;
- this.caseSubFunction = row.expectation;
- this.caseMarket = row.market;
- this.caseLanguage = row.language;
- this.currentCase = row;
- for (let i = 0; i < this.caseList.length; i++) {
- if (this.caseList[i].case_no == row.case_no) {
- this.currentCaseIndex = i;
- break;
- }
- }
- //this.caseContent =,
- },
- turnNextCase() {
- this.currentCaseIndex++;
- if (this.currentCaseIndex == this.caseList.length) {
- this.isShowCaseList = true;
- this.isShowCaseCommit = false;
- } else {
- this.currentCase = this.caseList[this.currentCaseIndex];
- this.caseName = this.currentCase.m_id;
- this.caseProject = this.currentCase.precondition;
- //this.caseActive =,
- this.caseFunction = this.currentCase.action;
- this.caseSubFunction = this.currentCase.expectation;
- this.caseMarket = this.currentCase.market;
- this.caseLanguage = this.currentCase.language;
- this.isShowCaseCommit = false;
- this.isShowCaseDetail = true;
- }
- },
- selectRowIssue(id) {
- let row = this.issueList.find((i) => i.id == id);
- this.isShowIssueList = false;
- this.isShowIssueDetail = true;
- this.currentIssue = row;
- console.log(row, "==============issue============");
- },
- clickBackToPlanList() {
- this.isShowPlanList = true;
- this.isShowCaseList = false;
- this.caseList = [];
- },
- clickBackToAutoPlanList() {
- this.isShowPlanList = true;
- this.isShowAutoCaseList = false;
- this.autoCaseList = [];
- },
- bmMapItemUnSelect() {
- let items = document.getElementsByClassName("item-box");
- for (var index = 0; index < items.length; index++) {
- items[index].style.background = "#00000032";
- let title = items[index].getElementsByClassName("item-title");
- console.log("textContent", title[0].textContent);
- let itemOther = this.benchList.find(
- (b) => parseInt(b.id) == parseInt(title[0].textContent)
- );
- itemOther.selected = false;
- itemOther.scale = 1;
- }
- },
- onFocus() {
- this.isOpen = true;
- },
- onBlur(e) {
- console.log("=====----====", e.target.classList);
- if (
- Array.prototype.indexOf.call(e.target.classList, "ordinary-left") > -1
- ) {
- this.isOpen = false;
- }
- },
- onInput(value) {
- this.inputValue = value;
- this.$store.dispatch('benchList/filterBenchList', {type: 'name', value: value});
- this.$store.dispatch('benchList/setFilterBenchFlag', true);
- },
- onClickOutside() {
- if (
- this.$refs.searchbar.$el.contains(event.target) ||
- this.$refs.dropdown.$el.contains(event.target)
- ) {
- return;
- }
- this.isOpen = false;
- },
- handleClickTask(taskId, auto) {
- let task = that.taskList.find((t) => t.id == taskId);
- // 获取手动测试plan列表
- let manualList = task.plan_list[1];
- // 获取自动测试plan列表
- let autoList = task.plan_list[2];
- autoList.forEach((at) => {
- that.$store.dispatch("planList/fetchPlanDetail", {
- planId: at < 100 ? at + 101 : at,
- });
- });
- that.isShowPlanList = true;
- that.isShowTaskList = false;
- this.$store.commit("planList/setAutoPlanList", autoList);
- this.$store.commit("planList/setPlanList", manualList);
- that.taskName = task.name;
- this.$nextTick(() => {
- that.$store.dispatch("planList/clearPlanList");
- that.$store.dispatch("planList/fetchPlanList", {
- page_num: 1,
- page_size: 10000,
- });
- });
- console.log(task, "任务详情");
- },
- handleClickIssue(issueId) {
- console.log(issueId, "issueid");
- },
- showBenchPos(benchList) {
- console.log("benchList", benchList);
- for (var item of benchList) {
- var currentBench = this.benchList.find((b) => b.id == item.benchId);
- if (currentBench) {
- //console.log('currentBench',currentBench);
- currentBench.left = item.x - 548;
- currentBench.top = item.y - 137 - 150;
- currentBench.benchId = item.benchId;
- currentBench.benchType = item.benchType;
- if (currentBench.benchType == 2) {
- currentBench.image = require("../../assets/mechine2.png");
- } else {
- currentBench.image = require("../../assets/mechine.png");
- }
- }
- }
- this.renderBenchList = false;
- setTimeout(() => {
- this.renderBenchList = true;
- }, 10);
- },
- planBack() {
- that.isShowPlanList = false;
- that.isShowTaskList = true;
- },
- taskRender(item) {
- return `<div class="item-box" onClick="handleClickTask('${
- item.uuid || item.id
- }', '${item.auto}')">
- <div class="left">
- <div style="">
- <div class="item-title">${item.name}</div>
- <div class="item-description">${item.description}</div>
- </div>
- <div class="item-time">
- <div class="time">${item.start_time}</div>
- to
- <div class="time"> ${item.end_time}</div>
- </div>
- <div class="item-tag">
- <div class="tag">${item.processor_name}</div>
- <div class="tag">${item.sw}</div>
- </div>
- </div>
- <div class="taskBtn" onClick="handleClickTask('${
- item.uuid || item.id
- }', '${item.auto}')">To Do</div>
- </div>`;
- },
- planRender(item) {
- console.log(item, "plan");
- return `<div onClick="selectRowPlan('${item.uuid || item.id}', '${
- item.auto
- }', '${item.name}')" class="item-box" style="display:${
- !item.auto && !item.uuid ? "none" : "flex"
- };align-items: top; justify-content: space-between;color: #fff;">
- <div class="left">
- <div style="display:flex;align-items: center;">
- <div class="item-title">${item.name}</div>
- <div class="task-auto" style="display:${
- item.auto ? "block" : "none"
- }">Auto</div>
- </div>
- </div>
- <div class="taskBtn ${this.autoTaskStatusMap[item.id] || 'ready'}">${this.autoTaskStatusMap[item.id] || 'ready'}</div>
- </div>`;
- },
- issueRender(item) {
- return `<div class="item-box" style="display:flex; align-items: center;justify-content: space-between;" onClick="selectRowIssue('${
- item.uuid || item.id
- }')">
- <div class="left">
- <div style="display:flex;align-items: center;">
- <div class="item-title" style="width: 20vw; white-space: nowrap; overflow:hidden; text-overflow: ellipsis;">${item.ticket_title}</div>
- <div class="${"status" + item.ticket_status}"></div>
- </div>
- <div class="item-tag">
- <div class="tag">${item.creator}</div>
- <div class="tag">${item.create_time}</div>
- </div>
- </div>
- <div class="${
- item.checked ? "el-icon-circle-check" : "uncheck"
- }"></div>
- </div>`;
- },
- closeDetail() {
- this.isDetailVisible = false;
- },
- rowClassName() {
- return "row-class";
- },
- getImgList(objRBL) {
- console.log("zmg3", objRBL);
- let benchId = objRBL.pop();
- if (benchId == null) {
- console.log("zmg2");
- setTimeout(() => {
- let href = window.location.href;
- if (href.indexOf("benchid=") != -1) {
- let benchid = href.substring(href.indexOf("benchid=") + 8);
- let remoteBenchList = this.remoteBenchList;
- console.log("benchid", benchid);
- console.log(
- "item == benchId",
- remoteBenchList.find((item) => item == benchid)
- );
- if (remoteBenchList.find((item) => item == benchid)) {
- this.selectBench(parseInt(benchid));
- }
- }
- }, 200);
- return;
- }
- let self = this;
- console.log("benchId", benchId);
- ws.connectBench({ bench_id: String(benchId) })
- .then((res) => {
- ws.getImage(String(benchId), 1).then((res) => {
- self.$store.dispatch("benchList/setBenchImgList", {
- benchId,
- img: res.data.data,
- });
- self.getImgList(objRBL);
- });
- })
- .catch((err) => {
- console.log("connect bench failed", benchId);
- self.$message({
- message: "This bench is offline",
- // message: "",
- type: "warning",
- });
- });
- },
- gotoGrid() {
- this.$router.push({
- path: "/squarePage",
- });
- },
- itemRender(item) {
- // console.log(item, 'bench---item')
- item.image = require("../../assets/mechine.png");
- /*return `
- <div class="item-box">
- <div class="item-image"><img src="${item.image}" alt="${item.title}"></div>
- <div class="item-right">
- <div class="item-title">
- <span onClick="handleListClick(${item.id})">${item.id}</span>
- <span onClick="selectBench(${item.id})" class="el-icon-s-platform ${item.status}"></span>
- </div>
- <div class="item-text">
- <div class="item-description">Automation Lab-7E</div>
- <div class="item-description">${item.name}</div>
- <div class="item-tag">
- <div class="tag">${item.Market}</div>
- <div class="tag">${item.Platform}</div>
- <div class="tag">${item.Project}</div>
- <div class="tag">${item.Carline}</div>
- <div class="tag">${item.Cluster}</div>
- </div>
- <div class="item-tag">
- <div class="tag">${item.MU_SW}</div>
- <div class="tag">${item.Variant}</div>
- <div class="tag">${item.ip}</div>
- </div>
- </div>
- </div>
- </div>`;*/
- return `
- <div onDblClick="handleListDbClick(${item.id})" onClick="handleListClick(${item.id})" class="item-box">
- <div class="item-image"><img src="${item.image}" alt="${item.title}"></div>
- <div class="item-right">
- <div class="item-text">
- <div class="item-title">${item.name}
- <span onClick="selectBench(${item.id})" class="el-icon-s-platform ${item.status}"></span>
- </div>
- <div class="item-description">Automation Lab-7E</div>
- <div class="item-tag">
- <div class="tag" title="Market">${item.Market}</div>
- <div class="tag" title="Platform">${item.Platform}</div>
- <div class="tag" title="Project">${item.Project}</div>
- <div class="tag" title="Carline">${item.Carline}</div>
- <div class="tag" title="Cluster">${item.Cluster}</div>
- <div class="tag" title="MU_SW">${item.MU_SW}</div>
- <div class="tag" title="Variant">${item.Variant}</div>
- </div>
- </div>
- </div>
- </div>`;
- },
- handleImageClick(index) {
- this.selectBench(
- parseInt(this.images[index + 5 * (this.currentPage - 1)].alt)
- );
- },
- prevPage() {
- if (this.currentPage > 1) {
- this.currentPage--;
- }
- },
- nextPage() {
- if (this.currentPage < Math.ceil(this.images.length / this.pageSize)) {
- this.currentPage++;
- }
- },
- handleInfoDblClick(benchId) {
- console.log("handleInfoDblClick", benchId);
- this.currentBench = this.benchList.find((b) => b.id == benchId);
- this.isDetailVisible = true;
- },
- getImage() {},
- dataCallBack(data) {
- switch (data.method) {
- case "get_image":
- this.handleGetImageData(data.data.data);
- break;
- }
- console.log(data);
- },
- handleGetImageData(data) {
- this.mainSnapshot = "data:image/jpeg;base64," + data;
- },
- selectBench(benchId) {
- // 全屏选择bench
- this.saveSelectedBenchToLs(benchId);
- var i = JSON.parse(JSON.stringify(wsArrayLength));
- let self = this;
- wsArrayLength++;
- setTimeout(() => {
- console.log("connect bench", benchId);
- wsArray[i]
- ?.connectBench({ bench_id: String(benchId) })
- .then((res) => {
- console.log("connect bench success", benchId);
- self.getBenchImage(benchId, 1, wsArray[i], () => {});
- })
- .catch((err) => {
- console.log("connect bench failed", benchId);
- this.$message({
- message: "This bench is offline",
- // message: "",
- type: "warning",
- });
- });
- }, 200);
- // 非全屏选择bench
- var objRBL = this.remoteBenchList;
- if (objRBL && objRBL.length > 0) {
- var bExist = false;
- for (var i = 0; i < objRBL.length; i++) {
- if (objRBL[i] == benchId) {
- bExist = true;
- } else {
- }
- }
- if (bExist == false) {
- objRBL.push(benchId);
- this.remoteBenchList.push(benchId)
- }
- } else {
- var rml = [];
- rml.push(benchId);
- this.remoteBenchList.push(benchId)
- }
- console.log("benchList", this.benchList);
- let bench = this.benchList.find((b) => b.id == benchId);
- console.log("selectedBench", bench);
- if (this.previousSelectedBenchList.length) {
- this.selectedBenchList = JSON.parse(
- JSON.stringify(this.previousSelectedBenchList)
- );
- }
- this.previousSelectedBenchList = [];
- this.platform = null;
- this.benchList.forEach((b) => (b.selected = false));
- bench.selected = !bench.selected;
- if (bench.selected) {
- this.currentBench = bench;
- bench.benchId = "'" + bench.benchId + "'";
- this.selectedBenchList.push(bench);
- console.log("selected", this.selectedBenchList);
- // this.images = this.selectedBenchList.map((s) => {
- // return {
- // url: "",
- // alt: s.name,
- // };
- // });
- } else {
- for (let i in this.selectedBenchList) {
- if (this.selectedBenchList[i].id == bench.id) {
- this.selectedBenchList.splice(i, 1);
- // this.images = this.selectedBenchList.map((s) => {
- // return {
- // url: "",
- // alt: s.name,
- // };
- // });
- break;
- }
- }
- }
- if (this.selectedBenchList.length == 0) {
- nextTick(() => {
- self.initBmInfoNsChart();
- });
- } else {
- self.bmMapItemActivate(bench.id, wsArray[i]);
- }
- },
- bmMapItemActivate(benchId, ws) {
- let self = this;
- if (this.selectedBenchList.length == 0) {
- this.$message({
- message: "Please select a bench to activate.",
- // message: "",
- type: "warning",
- });
- return;
- }
- this.selectedBenchList = [this.selectedBenchList[0]];
- console.log("selectedBenchList[0]", this.selectedBenchList);
- let key = 0;
- for (let i in this.benchList) {
- this.benchList[i].selected = false;
- }
- for (let i in this.benchList) {
- if (this.benchList[i].id == benchId) {
- this.benchList[i].selected = true;
- key = i;
- break;
- }
- }
- this.benchList[key].acitveAnimation = true;
- //let benchId = this.benchList[key].benchId;
- this.benchList[key].benchId = benchId;
- let screenType = this.benchList[key].Display;
- this.connetedBenchId = String(benchId);
- // this.connectedBenchData = this.benchList[key];
- setTimeout(() => {
- console.log("connect bench", benchId);
- ws.connectBench({ bench_id: String(benchId) })
- .then((res) => {
- self.isConnected = true;
- console.log("connect bench success");
- this.currentScreen = "upper";
- self.setSendAudioBus(benchId);
- self.getBenchImage(benchId, 1, ws, () => {
- if (this.benchList[key].acitveAnimation) {
- this.benchList[key].acitveAnimation = false;
- this.benchDisplayVisible = true;
- }
- });
- if (screenType == "DUO") {
- self.getBenchImage(String(benchId), 2, ws, () => {
- if (this.connetedBenchId) {
- this.benchDisplayLowerVisible = true;
- }
- });
- } else {
- this.benchDisplayLowerVisible = false;
- }
- })
- .catch((err) => {
- console.log("connect bench failed");
- this.benchList[key].acitveAnimation = false;
- this.$message({
- message: "This bench is offline",
- // message: "",
- type: "warning",
- });
- });
- }, 300);
- },
- switchScreen() {
- if (this.currentScreen == "upper") {
- this.currentScreen = "lower";
- } else {
- this.currentScreen = "upper";
- }
- console.log("this.currentScreen", this.currentScreen);
- },
- singleFingerTouch(id, x, y, screenType) {
- let self = this;
- ws.singleFingerTouch(id, x, y, screenType).then((res) => {});
- },
- singleFingerDrag(id, x1, y1, x2, y2, screenType) {
- let self = this;
- ws.singleFingerDrag(id, x1, y1, x2, y2, screenType).then((res) => {});
- },
- singleFingerLongTouch(id, x, y, duration, screenType) {
- let self = this;
- ws.singleFingerLongTouch(id, x, y, duration, screenType).then(
- (res) => {}
- );
- },
- controlCursorMouseDown(e) {
- let self = this;
- if (this.displayTapMode) {
- // console.log("e", e);
- this.controlCursorPosition.left = e.offsetX;
- this.controlCursorPosition.top = e.offsetY;
- this.controlStartPoint.x = e.offsetX;
- this.controlStartPoint.y = e.offsetY;
- this.controlStartPoint.time = Date.now();
- this.ifBmBenchTrailUpperCursor = true;
- }
- },
- controlCursorMouseMove(e) {
- let self = this;
- if (this.displayTapMode && this.ifBmBenchTrailUpperCursor) {
- this.controlCursorPosition.left = e.offsetX;
- this.controlCursorPosition.top = e.offsetY;
- }
- },
- controlCursorMouseOut(e) {
- this.ifBmBenchTrailUpperCursor = false;
- },
- controlCursorMouseUp(e, screenType = 1) {
- let self = this;
- if (this.currentScreen == "upper") {
- screenType = 1;
- } else if (this.currentScreen == "lower") {
- screenType = 2;
- }
- if (this.displayTapMode) {
- this.ifBmBenchTrailUpperCursor = false;
- if (
- Math.abs(this.controlStartPoint.x - e.offsetX) < 30 &&
- Math.abs(this.controlStartPoint.y - e.offsetY) < 30 &&
- Date.now() - this.controlStartPoint.time < 500
- ) {
- self.singleFingerOperation(e, "tap", screenType);
- } else if (
- Math.abs(this.controlStartPoint.x - e.offsetX) > 30 ||
- Math.abs(this.controlStartPoint.y - e.offsetY) > 30
- ) {
- // console.log("controlStartPoint", controlStartPoint);
- self.singleFingerOperation(
- e,
- "swipe",
- screenType,
- this.controlStartPoint
- );
- } else if (Date.now() - this.controlStartPoint.time > 500) {
- self.singleFingerOperation(
- e,
- "longPress",
- screenType,
- this.controlStartPoint
- );
- }
- }
- },
- singleFingerOperation(e, operation, screenType, startPoint = {}) {
- let self = this;
- console.log("singleFingerOperation", e, operation, screenType);
- if (this.displayTapMode) {
- let width = this.$refs.bmBenchRef.width;
- let height = this.$refs.bmBenchRef.height;
- let offsetX = e.offsetX;
- let offsetY = e.offsetY;
- let screenWidth = this.currentScreen == "upper" ? 1540 : 1280;
- let screenHeight = this.currentScreen == "upper" ? 720 : 720;
- let x = Math.round(screenWidth * (offsetX / width));
- let y = Math.round(screenHeight * (offsetY / height));
- let x1 = 0;
- let y1 = 0;
- if (startPoint != {}) {
- x1 = Math.round(screenWidth * (startPoint.x / width));
- y1 = Math.round(screenHeight * (startPoint.y / height));
- }
- // console.log("x", x);
- // console.log("y", y);
- // console.log("x1", x1);
- // console.log("y1", y1);
- let operationDesc = "";
- if (operation == "tap") {
- console.log("selected", this.connetedBenchId, x, y);
- self.singleFingerTouch(this.connetedBenchId, x, y, screenType);
- // tap on lower x: 48 y: 292
- operationDesc =
- "tap on " +
- (screenType == 1 ? "upper " : "lower ") +
- ("x: " + x + " y: " + y);
- } else if (operation == "swipe") {
- self.singleFingerDrag(this.connetedBenchId, x1, y1, x, y, screenType);
- operationDesc =
- "swipe on " +
- (screenType == 1 ? "upper " : "lower ") +
- ("x1: " + x1 + " y1: " + y1 + " x: " + x + " y: " + y);
- } else if (operation == "longPress") {
- self.singleFingerLongTouch(
- this.connetedBenchId,
- x,
- y,
- Date.now() - startPoint.time,
- screenType
- );
- operationDesc =
- "longPress on " +
- (screenType == 1 ? "upper " : "lower ") +
- ("x: " + x + " y: " + y);
- }
- this.benchLog.push({
- bench_id: this.connetedBenchId,
- data: operationDesc,
- levelStr: "DEBUG",
- startTime: self.getNowDate(),
- });
- }
- },
- getNowDate() {
- var myDate = new Date();
- var year = myDate.getFullYear(); //获取当前年
- var mon = myDate.getMonth() + 1; //获取当前月
- var date = myDate.getDate(); //获取当前日
- var hours = myDate.getHours(); //获取当前小时
- var minutes = myDate.getMinutes(); //获取当前分钟
- var seconds = myDate.getSeconds(); //获取当前秒
- var now =
- year +
- "-" +
- mon +
- "-" +
- date +
- "T" +
- hours +
- ":" +
- minutes +
- ":" +
- seconds;
- return now;
- },
- initBmInfoNsChart() {
- let self = this;
- let seriesData = [0, 0, 0];
- for (let i in this.benchList) {
- if (this.benchList[i].status == 5 || this.benchList[i].status == 6) {
- seriesData[1]++;
- } else if (
- this.benchList[i].status == 2 ||
- this.benchList[i].status == 3
- ) {
- seriesData[2]++;
- } else {
- seriesData[0]++;
- }
- }
- console.log("seriesData", seriesData);
- var option = {
- tooltip: {
- trigger: "axis",
- axisPointer: {
- type: "shadow",
- },
- },
- grid: {
- left: 0,
- right: "20",
- bottom: 0,
- top: 0,
- containLabel: true,
- },
- xAxis: {
- type: "value",
- axisLabel: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- // axisLine: {
- // show: false,
- // },
- // axisTick: {
- // show: false, //刻度线
- // },
- },
- yAxis: {
- type: "category",
- data: ["Offline", "Occupied", "Ready"],
- axisLine: {
- show: false,
- lineStyle: {
- color: "#7F7F7F",
- },
- },
- axisTick: {
- show: false, //刻度线
- },
- // axisLine: {
- // },
- },
- series: [
- {
- type: "bar",
- barWidth: "50%",
- data: seriesData,
- itemStyle: {
- color: function (params) {
- // 给出颜色组
- var colorList = ["#b1b3b8", "#79bbff", "#95d475"];
- return colorList[params.dataIndex];
- },
- },
- showBackground: false,
- backgroundStyle: {
- color: "rgba(180, 180, 180, 0.2)",
- },
- label: {
- show: true,
- position: "right",
- color: "#7F7F7F",
- },
- },
- ],
- };
- bmInfoNsChartStorage = echarts.init(
- document.getElementsByClassName("bmInfoNsChart")[0]
- );
- bmInfoNsChartStorage.setOption(option);
- },
- backToMap() {
- let self = this;
- ws.unsubscribeBenchStatus({ bench_id: this.connetedBenchId }).then(
- (res) => {
- console.log("unsubscribeBenchStatus", res);
- }
- );
- this.connetedBenchId = "";
- setTimeout(() => {
- this.benchDisplayVisible = false;
- this.ifShowLogBox = false;
- }, 600);
- },
- tagSearch(field, value) {
- let self = this;
- this.selectedBenchList = [];
- for (let i in this.benchList) {
- this.benchList[i].selected = false;
- if (this.benchList[i][field] == value) {
- this.benchList[i].selected = true;
- this.benchList[i].benchId = "'" + this.benchList[i].benchId + "'";
- this.selectedBenchList.push(this.benchList[i]);
- // this.images = this.selectedBenchList.map((s) => {
- // return {
- // url: "",
- // alt: s.name,
- // };
- // });
- }
- }
- },
- selectAllBench() {
- let self = this;
- console.log('this.benchList===', this.benchList.length)
- if (this.selectedBenchList.length == this.benchList.length) {
- this.selectedBenchList = [];
- this.previousSelectedBenchList = [];
- for (let i in this.benchList) {
- this.benchList[i].selected = false;
- }
- self.nextTick(() => {
- self.initBmInfoNsChart();
- });
- } else {
- this.selectedBenchList = [];
- for (let i in this.benchList) {
- this.benchList[i].selected = true;
- this.selectedBenchList.push(this.benchList[i]);
- // this.images = this.selectedBenchList.map((s) => {
- // return {
- // url: "",
- // alt: s.name,
- // };
- // });
- }
- }
- },
- tapModeControl() {
- this.displayTapMode = !this.displayTapMode;
- },
- getBenchDetail(id, index) {
- let self = this;
- let getBenchParam = { id };
- srv
- .getBenchDetail(getBenchParam)
- .then((res) => {
- // console.log("res", res);
- this.benchList[index].status = res.data.data.status;
- })
- .catch((err) => {
- console.error(err);
- });
- },
- showLogBox() {
- let self = this;
- if (this.ifShowLogBox) {
- ws.unsubscribeBenchStatus({ bench_id: this.connetedBenchId }).then(
- (res) => {
- console.log("unsubscribeBenchStatus", res);
- }
- );
- } else {
- ws.subscribeBenchStatus({ bench_id: this.connetedBenchId }).then(
- (res) => {
- console.log("subscribeBenchStatus", res);
- }
- );
- }
- this.benchLog = [];
- this.ifShowLogBox = !this.ifShowLogBox;
- },
- connectAudioDevice(type) {
- let self = this;
- ws.connect_audio_device({
- benchId: String(this.connetedBenchId),
- }).then(
- (res) => {
- console.log("connect_audio_device_res", res);
- if (type == "playAudio") {
- this.isRecording = !this.isRecording;
- self.recordAudio();
- } else if (type == "collectAudio") {
- self.collectAudio();
- }
- },
- (rej) => {}
- );
- },
- recordAudio(data) {
- let self = this;
- // console.log("selectedBenchList.value[0]", this.selectedBenchList[0]);
- let channel = 1;
- this.vadThreshold = 0;
- if (this.isRecording) {
- this.playAudioBenchList.push(this.connetedBenchId);
- // this.changePlayAudioBenchList(params);
- navigator.getUserMedia =
- navigator.getUserMedia ||
- navigator.webkitGetUserMedia ||
- navigator.mozGetUserMedia ||
- navigator.msGetUserMedia;
- if (navigator.mediaDevices.getUserMedia) {
- // 支持getUserMedia
- navigator.mediaDevices
- .getUserMedia({
- video: false,
- audio: true,
- })
- .then((stream) => {
- this.recStream = stream;
- this.paAc = new AudioContext({
- sampleRate: 8000,
- });
- this.paSource = this.paAc.createMediaStreamSource(stream);
- //构造参数依次为缓冲区大小,输入通道数,输出通道数
- this.paScriptNode = this.paAc.createScriptProcessor(
- 1024,
- channel,
- 2
- );
- this.sempleRateMultiple = this.paAc.sampleRate / 8000;
- this.paScriptNode.onaudioprocess = function (e) {
- for (let i = 0; i < channel; i++) {
- let data = e.inputBuffer.getChannelData(i);
- self.recordSuperposeArr.push.apply(
- self.recordSuperposeArr,
- data
- );
- if (
- self.sempleRateHandlingThreshold <
- self.sempleRateMultiple - 1
- ) {
- self.sempleRateHandlingThreshold++;
- } else {
- let arr = [];
- for (
- let a = 0;
- a < self.recordSuperposeArr.length;
- a = a + self.sempleRateMultiple
- ) {
- arr.push(self.recordSuperposeArr[a]);
- }
- self.recordSuperposeArr = arr.splice(0, 1024);
- self.recordSuperposeArr = new Float32Array(
- self.recordSuperposeArr
- );
- if (Math.abs(self.recordSuperposeArr[0]) < 0.003) {
- self.vadThreshold++;
- } else {
- self.vadThreshold = 0;
- }
- if (self.vadThreshold <= 20) {
- let dataU8 = new Uint8Array(
- self.recordSuperposeArr.buffer
- );
- let string = "";
- for (let i = 0; i < dataU8.length; i++) {
- string = string + String.fromCharCode(dataU8[i]);
- }
- ws.play_audio({
- data: string,
- benchIds: self.playAudioBenchList,
- }).then(
- (res) => {},
- (rej) => {}
- );
- }
- self.sempleRateHandlingThreshold = 0;
- self.recordSuperposeArr = [];
- }
- }
- };
- this.paScriptNode.connect(this.paAc.destination);
- this.paSource.connect(this.paScriptNode);
- })
- .catch((err) => {
- console.log("err: " + err);
- });
- } else {
- // 不支持getUserMedia
- console.log("Environment not supported");
- }
- } else {
- // this.changePlayAudioBenchList(params);
- this.playAudioBenchList = [];
- self.stopRecord();
- this.ifConnectedAudioDevice = false;
- ws.stop_play_audio({
- benchId: this.connetedBenchId,
- }).then(
- (res) => {
- // console.log("res", res);
- },
- (rej) => {
- // console.log("rej", rej);
- }
- );
- // $bus.$emit("stopPlayAudio", {
- // benchId: params.benchId,
- // });
- // }
- }
- },
- stopRecord() {
- let self = this;
- if (!this.isRecording) {
- this.recStream.getTracks().forEach(function (track) {
- track.stop();
- });
- this.paScriptNode.disconnect(this.paAc.destination);
- this.paSource.disconnect(this.paScriptNode);
- this.paAc.close();
- }
- },
- collectAudio() {
- let self = this;
- this.isPlaying = !this.isPlaying;
- if (this.isPlaying) {
- ws.collect_audio({
- benchId: String(this.connetedBenchId),
- }).then(
- (res) => {},
- (rej) => {}
- );
- } else {
- ws.stop_collect_audio({
- benchId: String(this.connetedBenchId),
- }).then(
- (res) => {},
- (rej) => {}
- );
- this.loopSendAudioTime = 0;
- this.sendAudioString = "";
- }
- },
- setSendAudioBus(benchId) {
- let self = this;
- bus.on("sendAudio" + benchId, (data) => {
- self.sendAudioTransformCode(data.data, true);
- this.loopSendAudioTime++;
- this.sendAudioTimer = setTimeout(() => {
- this.loopSendAudioTime = 5;
- self.sendAudioTransformCode("", false);
- }, 500);
- });
- },
- sendAudioTransformCode(data, fill) {
- let dataU8 = [];
- let dataF32 = [];
- let arr = [];
- let self = this;
- this.sendAudioString += data;
- if (this.loopSendAudioTime > 4) {
- arr = this.sendAudioString.split("");
- for (let i = 0; i < arr.length; i++) {
- dataU8[i] = arr[i].charCodeAt();
- }
- dataU8 = new Uint8Array(dataU8);
- dataF32 = new Float32Array(dataU8.buffer);
- if (!fill) {
- // console.log("dataF32-", dataF32);
- let newDataF32 = new Float32Array(5120);
- for (let i = 0; i < 5120; i++) {
- if (i < dataF32.length) {
- newDataF32[i] = dataF32[i];
- } else {
- newDataF32[i] = 0;
- }
- }
- dataF32 = newDataF32;
- // console.log("dataF32+", dataF32);
- }
- self.pcPlayAudio(dataF32, 1, 8000);
- this.sendAudioString = "";
- this.loopSendAudioTime = 0;
- }
- if (fill) {
- clearTimeout(this.sendAudioTimer);
- }
- },
- pcPlayAudio(data, channels, sampleRate) {
- let self = this;
- var audioCtx = new (window.AudioContext || window.webkitAudioContext)({
- sampleRate: sampleRate,
- });
- var myArrayBuffer = audioCtx.createBuffer(
- channels,
- data.length,
- sampleRate
- );
- for (let channel = 0; channel < channels; channel++) {
- var nowBuffering = myArrayBuffer.getChannelData(channel);
- for (let i = 0; i < data.length; i++) {
- if (i < data.length) {
- nowBuffering[i] = data[i];
- } else {
- nowBuffering[i] = 0;
- }
- }
- }
- // console.log("audioCtx", audioCtx);
- // console.log("nowBuffering", nowBuffering);
- var source = audioCtx.createBufferSource();
- source.buffer = myArrayBuffer;
- source.connect(audioCtx.destination);
- source.start();
- },
- pressPtt() {
- let self = this;
- ws.press_ptt({
- benchId: String(this.connetedBenchId),
- }).then(
- (res) => {},
- (rej) => {}
- );
- },
- bmMapItemSelect(key) {
- let self = this;
- if (this.previousSelectedBenchList.length) {
- this.selectedBenchList = JSON.parse(
- JSON.stringify(this.previousSelectedBenchList)
- );
- }
- this.previousSelectedBenchList = [];
- this.platform = null;
- this.benchList.forEach((b) => (b.selected = false));
- this.benchList[key].selected = !this.benchList[key].selected;
- if (this.benchList[key].selected) {
- this.currentBench = this.benchList[key];
- this.selectedBenchList.push(this.benchList[key]);
- // this.images = this.selectedBenchList.map((s) => {
- // return {
- // url: "",
- // alt: s.name,
- // };
- // });
- } else {
- for (let i in this.selectedBenchList) {
- if (this.selectedBenchList[i].id == this.benchList[key].id) {
- this.selectedBenchList.splice(i, 1);
- // this.images = this.selectedBenchList.map((s) => {
- // return {
- // url: "",
- // alt: s.name,
- // };
- // });
- break;
- }
- }
- }
- if (this.selectedBenchList.length == 0) {
- nextTick(() => {
- self.initBmInfoNsChart();
- });
- }
- },
- clickBenchList() {
- // window.location.href = "/squarePage?m=8b934420_ZJUb_b6f9";
- this.$store.dispatch("common/setSquareStatus", true);
- },
- disconnectBench() {
- ws.disconnectBench({ bench_id: String(this.connetedBenchId) }).then(
- (res) => {
- var remoteBenchList = this.remoteBenchList;
- let newRemoteBenchList = remoteBenchList.filter((item) => {
- return item != this.connetedBenchId;
- });
- while(this.remoteBenchList.length) {
- this.remoteBenchList.pop();
- }
- newRemoteBenchList.forEach(e => this.remoteBenchList.push(e))
- this.$store.dispatch("benchList/removeBenchImgList", {
- benchId: this.connetedBenchId,
- });
- this.getImgList(newRemoteBenchList);
- this.connetedBenchId = "";
- this.currentBench = {};
- this.benchDisplayVisible = false;
- this.benchDisplayLowerVisible = false;
- this.isConnected = false;
- }
- );
- },
- sleep(delay) {
- var start = new Date().getTime();
- while (new Date().getTime() - start < delay) {
- continue;
- }
- },
- saveSelectedBenchToLs(benchId) {
- var objRBL = this.remoteBenchList;
- if (objRBL && objRBL.length > 0) {
- var bExist = false;
- for (var i = 0; i < objRBL.length; i++) {
- if (objRBL[i] == benchId) {
- bExist = true;
- } else {
- }
- }
- if (bExist == false) {
- objRBL.push(benchId);
- this.remoteBenchList.push(benchId)
- }
- } else {
- var rml = [];
- rml.push(benchId);
- this.remoteBenchList.push(benchId);
- }
- },
- handleListClick(benchId, itemtype) {
- if (itemtype == 2) {
- return;
- }
- try{
- for(let key in window.waterMap) {
- if (key == benchId) {
- window.waterMap[key].scale.set(1.3, 1.3, 1.3);
- } else {
- window.waterMap[key].scale.set(1, 1, 1);
- }
- }
- } catch (e) {
- }
- console.log("benchId", benchId);
- let selectedBench = this.benchList.find((i) => i.benchId == benchId);
- console.log("selectedBench", selectedBench);
- bus.emit("benchInfoVisible", selectedBench);
- this.$nextTick(() => {
- if (benchId == this.currentBench.benchId) {
- benchId = 0;
- let items = document.getElementsByClassName("grid-item-background");
- for (var index = 0; index < items.length; index++) {
- items[index].style.background = "#000000";
- }
- this.currentBench = {};
- return;
- }
- let items = document.getElementsByClassName("grid-item-background");
- for (var index = 0; index < items.length; index++) {
- items[index].style.background = "#000000";
- if (this.images[index].alt == benchId) {
- console.log("equal");
- items[index].style.background = "#ffffff";
- }
- }
- });
- //this.currentBench = this.benchList.find(b => b.id == benchId);
- //this.isDetailVisible = true;
- this.$nextTick(() => {
- //this.$refs.benchdetail.init(benchId);
- //this.benchList.forEach(element =>
- //{
- // element.style = "{background: rgba(0, 0, 0, 1)}"
- //});
- if (benchId == this.currentBench.id &&this.currentBench.selected) {
- this.currentBench.selected = false;
- this.currentBench.scale = 1;
- this.currentBench = {};
- let items = document.getElementsByClassName("item-box");
- for (var index = 0; index < items.length; index++) {
- items[index].style.background = "#00000032";
- }
- return;
- }
- let items = document.getElementsByClassName("item-box");
- for (var index = 0; index < items.length; index++) {
- items[index].style.background = "#00000032";
- let title = items[index].getElementsByClassName("item-title");
- // console.log("textContent", title[0].textContent);
- let itemOther = this.benchList.find(
- (b) => parseInt(b.id) == parseInt(title[0].textContent)
- );
- if (itemOther) {
- itemOther.selected = false;
- }
- if (parseInt(benchId) == parseInt(title[0].textContent)) {
- items[index].style.background = "#000000C0";
- this.currentBench = this.benchList.find((b) => b.id == benchId);
- this.currentBench.selected = true;
- }
- }
- bus.emit("benchInfoVisible", this.currentBench);
- });
- },
- handleBenchClick(benchId, showRemoteButton) {
- this.currentBench = this.benchList.find((b) => b.id == benchId);
- this.isRemoteBtnVisible = showRemoteButton;
- this.isDetailVisible = true;
- },
- handleListDbClick(benchId, itemtype) {
- //this.currentBench = this.benchList.find(b => b.id == benchId);
- //this.isDetailVisible = true;
- this.$nextTick(() => {
- //this.$refs.benchdetail.init(benchId);
- //this.benchList.forEach(element =>
- //{
- // element.style = "{background: rgba(0, 0, 0, 1)}"
- //});
- this.currentBench = this.benchList.find((b) => b.id == benchId);
- //this.currentBench.style = "{background: rgba(0, 0, 0, 1)}"
- console.log("current bench", this.currentBench);
- this.isRemoteBtnVisible = true;
- this.isDetailVisible = true;
- });
- },
- getBenchImage(benchId, screenType, wsRemote, func) {
- let self = this;
- setTimeout(() => {
- wsRemote.getImage(String(benchId), screenType).then((res) => {
- console.log("getImageRes", res);
- // let screen = screenType == 1 ? "upper" : "lower";
- func();
- if (screenType == 1) {
- self.benchImgUpper = "data:image/png;base64," + res.data.data;
- self.benchImgUpperMap[benchId] =
- "data:image/png;base64," + res.data.data;
- bus.emit("benchImgChange", { benchImgUpper: self.benchImgUpper });
- } else {
- self.benchImgLower = "data:image/png;base64," + res.data.data;
- self.benchImgLowerMap[benchId] =
- "data:image/png;base64," + res.data.data;
- bus.emit("benchImgChange", { benchImgLower: self.benchImgLower });
- }
- // let screen = res.data.screen_type;
- //self.getBenchImage(benchId, screenType, wsRemote, func);
- if (benchId == this.connetedBenchId) {
- self.getBenchImage(benchId, screenType, wsRemote, func);
- this.$store.dispatch("benchList/setBenchImgList", {
- benchId,
- img: res.data.data,
- });
- }
- });
- }, 500);
- },
- handleDblClickImg(benchId) {
- this.benchImgUpper = this.benchImgUpperMap[benchId];
- this.benchImgLower = this.benchImgLowerMap[benchId];
- this.$store.dispatch("common/setSquareStatus", false);
- this.selectBench(benchId);
- },
- handleClickImg(benchId, indexParam) {
- this.$nextTick(() => {
- if (benchId == this.currentBenchId) {
- benchId = 0;
- let items = document.getElementsByClassName("grid-item-background");
- for (var index = 0; index < items.length; index++) {
- items[index].style.background = "#000000";
- }
- return;
- }
- this.currentBenchId = benchId;
- let items = document.getElementsByClassName("grid-item-background");
- for (var index = 0; index < items.length; index++) {
- items[index].style.background = "#000000";
- if (index == indexParam) {
- console.log("equal");
- items[index].style.background = "#ffffff";
- }
- }
- });
- this.$nextTick(() => {
- if (
- benchId == this.currentBench.id &&
- this.currentBench.selected == true
- ) {
- this.currentBench.selected = false;
- this.currentBench.scale = 1;
- this.currentBench = {};
- let items = document.getElementsByClassName("item-box");
- for (var index = 0; index < items.length; index++) {
- items[index].style.background = "#00000032";
- }
- return;
- }
- let items = document.getElementsByClassName("item-box");
- for (var index = 0; index < items.length; index++) {
- items[index].style.background = "#00000032";
- let title = items[index].getElementsByClassName("item-title");
- console.log("textContent", title[0].textContent);
- let itemOther = this.benchList.find(
- (b) => parseInt(b.id) == parseInt(title[0].textContent)
- );
- itemOther.selected = false;
- if (parseInt(benchId) == parseInt(title[0].textContent)) {
- items[index].style.background = "#000000C0";
- this.currentBench = this.benchList.find((b) => b.id == benchId);
- this.currentBench.selected = true;
- }
- }
- });
- },
- handleCloseImg(benchId) {
- if(parseInt(benchId) == parseInt(this.connetedBenchId))
- {
- this.disconnectBench()
- }
- console.log("benchId", benchId);
- var strRemoteBenchList = window.localStorage.getItem("remoteBenchList");
- var objRBL = JSON.parse(strRemoteBenchList);
- if (objRBL) {
- for (var i = 0; i < objRBL.length; i++) {
- if (parseInt(objRBL[i]) == parseInt(benchId)) {
- console.log("images", this.images);
- for (var ii = 0; ii < this.images.length; ii++) {
- if (parseInt(this.images[ii].alt) == parseInt(benchId)) {
- this.images.splice(ii, 1);
- console.log("images", this.images);
- break;
- }
- }
- //delete objRBL[i];
- objRBL.splice(i, 1);
- console.log("objRBL", objRBL);
- while(this.remoteBenchList.length) {
- this.remoteBenchList.pop()
- }
- objRBL.forEach(e => this.remoteBenchList.push(e))
- return;
- }
- }
- }
- },
- getAutoPlanResult(key) {},
- },
- watch: {
- benchDisplayVisible(newValue, oldValue) {
- bus.emit("benchDisplayVisible", {
- benchDisplayVisible: newValue,
- benchInfo: this.selectedBenchList[0],
- });
- },
- benchDisplayLowerVisible(newValue, oldValue) {
- bus.emit("benchDisplayLowerVisibleChange", {
- benchDisplayLowerVisible: newValue,
- });
- },
- benchList(newValue, oldValue) {
- console.log("newValue", newValue);
- var objRBL = this.remoteBenchList;
- console.log("zmg1", objRBL);
- var objRBLReverse = [];
- if(objRBL)
- {
- for (; objRBL.length > 0; ) {
- objRBLReverse.push(objRBL.pop());
- }
- }
- if (objRBLReverse.length > 0) {
- setTimeout(() => {
- this.getImgList(objRBLReverse);
- }, 300);
- }
- },
- isOpen3d(newValue, oldValue) {
- // if (!newValue) {
- // this.$nextTick(() => {
- // let mapDom = document.getElementsByClassName("ordinary-map")[0];
- // let style = getComputedStyle(mapDom);
- // let width = parseFloat(style.width);
- // let height = parseFloat(style.height);
- // uwbMain('playersmall', width, height, "floorplan");
- // })
- // } else {
- // uwbMain('player', window.innerWidth, window.innerHeight, "panorama");
- // }
- },
- benchList(newValue, oldValue) {
- var readyCount = 0;
- var occupiedCount = 0;
- var offlineCount = 0;
- console.log("this.benchList", this.benchList.length);
- this.benchList.forEach((element) => {
- //console.log('element',element);
- if (element.status == "ready") {
- readyCount++;
- } else if (element.status == "error") {
- offlineCount++;
- } else if (element.status == "offline") {
- offlineCount++;
- } else {
- occupiedCount++;
- }
- });
- this.readyCount = readyCount;
- this.offlineCount = offlineCount;
- this.occupiedCount = occupiedCount;
- },
- autoPlanList() {
- this.autoPlanList.forEach(m => {
- this.$store.dispatch('caseList/getAllAutoPlanStatus', {
- planId: m.id,
- planName: m.name
- })
- })
- }
- },
- };
- </script>
- <style scoped>
- /* .benchMapBox {
- margin-top: 30px;
- } */
- .benchMapBox :deep() .el-scrollbar__bar {
- display: none;
- }
- .bmContent {
- background-image: linear-gradient(60deg, #16182a 30%, #2d3049);
- border-radius: 10px;
- /* height: 1800px; */
- margin-top: 30px;
- margin-bottom: 30px;
- min-height: 426px;
- }
- .bmMap {
- /* height: 500px; */
- position: absolute;
- height: 10%;
- width: 100%;
- /* padding: 5px 10px; */
- box-sizing: border-box;
- }
- .bmMap
- :deep()
- .el-radio-button__original-radio:checked
- + .el-radio-button__inner {
- background-color: #474c79;
- }
- .bmMap
- :deep()
- .el-radio-button__original-radio:checked
- + .el-radio-button__inner
- span {
- color: #fff;
- }
- .bmMap :deep() .el-radio-button__inner {
- background-color: #383c6b;
- border: none;
- box-shadow: none;
- }
- .bmMap :deep() .el-radio-button__inner span {
- color: #ccc;
- }
- .bmMap :deep() .el-radio-button__inner span:hover {
- color: #eee;
- }
- .bmMapImage {
- position: relative;
- height: 100%;
- width: 100%;
- /* border: 1px solid #fff; */
- background-color: rgba(255, 255, 255, 0.04);
- border-radius: 6px;
- }
- .bmMapItem {
- position: absolute;
- height: 70px;
- width: 70px;
- cursor: pointer;
- }
- .bmMapItemNormal {
- position: absolute;
- height: 100%;
- width: 100%;
- background-color: #16182a;
- /* box-shadow: 0 0 0 3px #393e6d inset; */
- box-sizing: border-box;
- z-index: 2;
- }
- .bmMapItemInfo {
- position: absolute;
- height: 100%;
- width: 120px;
- box-sizing: border-box;
- padding: 3px;
- display: flex;
- justify-content: center;
- align-items: flex-start;
- flex-direction: column;
- font-size: 12px;
- z-index: 6;
- user-select: none;
- /* background: #183153; */
- overflow: hidden;
- border: none;
- color: #ccc;
- border-radius: 10px;
- left: 30px;
- padding-left: 10px;
- background: rgba(117, 117, 117, 0.8);
- }
- .bmMapItemInfoAfter {
- width: 0%;
- height: 100%;
- background: rgba(117, 117, 117, 0.8);
- position: absolute;
- transition: all 0.2s ease-in-out;
- right: 0;
- }
- .bmMapItemInfoSelected > .bmMapItemInfoAfter {
- right: auto;
- left: 0;
- width: 100%;
- }
- .bmMapItemInfo span {
- z-index: 20;
- transition: all 0.2s ease-in-out;
- }
- .bmMapItemInfo span + span {
- margin-top: 5px;
- }
- .bmMapItemInfoSelected > span {
- color: #ccc;
- animation: scaleUp 0.2s ease-in-out;
- }
- @keyframes scaleUp {
- 0% {
- transform: scale(1);
- }
- 50% {
- transform: scale(0.95);
- }
- 100% {
- transform: scale(1);
- }
- }
- .bmMapItemInfo span:nth-child(1) {
- font-weight: bold;
- }
- .bmMapItemInfo span:nth-child(2) {
- opacity: 0.8;
- }
- .bmMapItemSelected {
- position: absolute;
- height: 100%;
- width: 100%;
- overflow: hidden;
- z-index: 4;
- }
- .bmMapItemSelected::before {
- content: " ";
- position: absolute;
- height: 100%;
- width: 100%;
- background: linear-gradient(
- 90deg,
- transparent,
- #ff3f99,
- #3e88ff,
- transparent
- );
- /* transform: scale(5); */
- animation: rotation_9018 3000ms infinite linear;
- filter: blur(9px);
- }
- @keyframes rotation_9018 {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- .bmMapItemSelectedContent {
- position: absolute;
- height: calc(100% - 6px);
- width: calc(100% - 6px);
- top: 3px;
- left: 3px;
- background-color: #16182a;
- }
- .bmMapItemSelectedContent::before {
- content: " ";
- height: 28px;
- width: 8px;
- position: absolute;
- background: white;
- left: 50%;
- top: 50%;
- transform: translateX(-50%) translateY(-50%);
- filter: blur(12px);
- }
- .bmBench {
- width: 100%;
- /* height: 300px; */
- padding: 5px 10px;
- box-sizing: border-box;
- }
- .bmBenchBox {
- font-size: 0;
- margin-top: 5px;
- position: relative;
- display: flex;
- justify-content: center;
- }
- .bmBenchImg {
- /* width: 100%;
- height: 285px; */
- /* width: 100%; */
- height: 100%;
- border-radius: 6px;
- }
- .bmBenchTrailUpper {
- position: absolute;
- /* height: 285px; */
- height: 100%;
- width: 100%;
- z-index: 20;
- left: 0;
- top: 0;
- }
- .bmBenchTrailUpperCursorTap {
- position: absolute;
- height: 2vh;
- width: 2vh;
- background-color: rgba(255, 255, 255, 0.8);
- border-radius: 50%;
- left: 30%;
- top: 0;
- animation: bmBenchTrailUpperCursorTapAnimation 0.75s linear 0s 1;
- }
- @keyframes bmBenchTrailUpperCursorTapAnimation {
- 0% {
- transform: scale(1);
- }
- 25% {
- transform: scale(1);
- opacity: 1;
- }
- 40% {
- transform: scale(0.6);
- opacity: 0.6;
- }
- 50% {
- transform: scale(0.6);
- opacity: 0.6;
- }
- 55% {
- transform: scale(1);
- opacity: 1;
- }
- 100% {
- transform: scale(1);
- }
- }
- .bmBenchTrailUpperCursorSwipe {
- position: absolute;
- height: 2vh;
- width: 2vh;
- background-color: rgba(255, 255, 255, 0.8);
- border-radius: 50%;
- transition: all 1s;
- }
- .bmBenchTrailUpperCursorSwipe2 {
- height: 1.5vh;
- width: 1.5vh;
- transition: all 1s 0.05s;
- }
- .bmBenchTrailUpperCursorSwipe3 {
- height: 1vh;
- width: 1vh;
- transition: all 1s 0.1s;
- }
- .bmBenchTrailUpperCursorPress {
- position: absolute;
- height: 2vh;
- width: 2vh;
- background-color: rgba(255, 255, 255, 0.8);
- border-radius: 50%;
- left: 30%;
- top: 0;
- animation: bmBenchTrailUpperCursorPressAnimation 2s linear 0s 1;
- }
- @keyframes bmBenchTrailUpperCursorPressAnimation {
- 0% {
- transform: scale(1);
- }
- 12% {
- transform: scale(1);
- opacity: 1;
- }
- 21% {
- transform: scale(0.6);
- opacity: 0.6;
- }
- 70% {
- transform: scale(0.6);
- opacity: 0.6;
- }
- 73% {
- transform: scale(1);
- opacity: 1;
- }
- 100% {
- transform: scale(1);
- }
- }
- .bmBenchTrailUpperCursor {
- position: absolute;
- height: 2vh;
- width: 2vh;
- background-color: rgba(255, 255, 255, 0.6);
- /* border: 1vh solid rgba(255, 255, 255, 0.6); */
- border-radius: 50%;
- left: 30%;
- top: 0;
- pointer-events: none;
- animation: bmBenchTrailUpperCursorAnimation 1s linear 0s 1;
- box-sizing: border-box;
- }
- @keyframes bmBenchTrailUpperCursorAnimation {
- 0% {
- border: 1vh solid rgba(255, 255, 255, 0.4);
- }
- 40% {
- border: 0vh solid rgba(255, 255, 255, 0.4);
- }
- 100% {
- border: 0vh solid rgba(255, 255, 255, 0.4);
- }
- }
- .bmInfo {
- min-height: 126px;
- border-bottom: 1px solid #444358;
- padding-bottom: 15px;
- }
- .bmInfoNotSelected,
- .bmInfoOneSelected {
- padding: 0 15px 0 25px;
- }
- .bmInfoNsTitle,
- .bmInfoOsTitle {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 80px;
- }
- .bmInfoNsInfo,
- .bmInfoOsInfo {
- display: flex;
- flex-direction: column;
- }
- .bmInfoNsInfo > span:nth-child(1),
- .bmInfoOsInfo > span:nth-child(1) {
- /* font-weight: bold; */
- font-size: 18px;
- display: flex;
- align-items: center;
- /* justify-content: center; */
- }
- .bmInfoNsInfo > span:nth-child(2),
- .bmInfoOsInfo > span:nth-child(2) {
- font-size: 12px;
- opacity: 0.4;
- margin-top: 10px;
- /* padding-bottom: 15px; */
- letter-spacing: 1px;
- font-weight: lighter;
- }
- .bmInfoNsChart {
- height: 50px;
- width: 200px;
- }
- .bmInfoOsImg {
- background-image: url(../../assets/benchImage.png);
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- height: 100%;
- width: 120px;
- }
- .bmInfoOsImgA3NF-01 {
- background-image: url(../../assets/bench_img/a3nf_01.jpg) !important;
- }
- .bmInfoOsImgA3NF-02 {
- background-image: url(../../assets/bench_img/a3nf_02.jpg) !important;
- }
- .bmInfoOsImgB9PA-01 {
- background-image: url(../../assets/bench_img/B9PA_01.jpg) !important;
- }
- .bmInfoOsImgB9PA-02 {
- background-image: url(../../assets/bench_img/B9PA_01.jpg) !important;
- }
- .bmInfoOsImgB9PA-04 {
- background-image: url(../../assets/bench_img/B9PA_04.jpg) !important;
- }
- .bmInfoOsImgCBEV-01 {
- background-image: url(../../assets/bench_img/CBEV_01.jpg) !important;
- }
- .bmInfoOsImgQ3NF-01 {
- background-image: url(../../assets/bench_img/Q3nf_01.jpg) !important;
- }
- .bmInfoOsImgH-JP-02 {
- background-image: url(../../assets/bench_img/meb-jp2.jpg) !important;
- }
- .bmInfoOsImgP-CN-01 {
- background-image: url(../../assets/bench_img/MEB-P-CN_01.jpg) !important;
- }
- .bmInfoOsImgH-CN-01 {
- background-image: url(../../assets/bench_img/meb-H_CN_01.jpg) !important;
- }
- .bmInfoOsImgP-TW-01 {
- background-image: url(../../assets/bench_img/meb-h-CN_02.jpg) !important;
- }
- .bmInfoOsImgH-JP-01 {
- background-image: url(../../assets/bench_img/meb-jp1.jpg) !important;
- }
- .bmInfoOsImgD5 {
- background-image: url(../../assets/bench_img/Q7PA_01.jpg) !important;
- }
- .bmInfoOsImgQ6-01 {
- background-image: url(../../assets/bench_img/Q6-01.jpg) !important;
- }
- .bmInfoOsImgQ6-02 {
- background-image: url(../../assets/bench_img/Q6-02.jpg) !important;
- }
- .bmInfoNsTag,
- .bmInfoOsTag {
- display: flex;
- padding: 10px 0;
- }
- .bmInfoTagItem {
- height: 26px;
- padding: 4px 14px;
- background-color: #25293c;
- font-size: 12px;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 13px;
- box-sizing: border-box;
- color: #d0cece;
- margin-right: 10px;
- cursor: pointer;
- user-select: none;
- }
- .bmInfoTagItem:hover {
- background-color: #2d3249;
- }
- .bmInfoTagItem:active {
- background-color: #333a53;
- }
- .bmInfoMsSlide {
- height: 120px;
- width: 200px;
- /* background-color: #3e88ff; */
- background-image: url(../../assets/benchImage.png);
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- cursor: pointer;
- position: relative;
- }
- .bmInfoMsSlideName {
- position: absolute;
- background-color: rgba(23, 25, 43, 0.5);
- font-size: 12px;
- padding: 1px 8px;
- border-radius: 9px;
- left: 3px;
- top: 3px;
- box-sizing: border-box;
- /* text-align: center; */
- backdrop-filter: blur(1px);
- text-shadow: 0 0 10px #000;
- display: flex;
- justify-content: center;
- align-items: center;
- user-select: none;
- }
- .bmInfoMsSlideNameStatus {
- float: right;
- }
- .bmInfoMsSlideNameStatus,
- .bmInfoMsSlideNameStatus4 {
- height: 12px;
- width: 12px;
- border: 3px solid #b1b3b8;
- border-radius: 50%;
- box-sizing: border-box;
- margin-right: 6px;
- }
- .bmInfoMsSlideNameStatus2,
- .bmInfoMsSlideNameStatus3 {
- border: 3px solid #95d475;
- }
- /* .bmInfoMsSlideNameStatus4 {
- border: 3px solid #f89898;
- } */
- .bmInfoMsSlideNameStatus5,
- .bmInfoMsSlideNameStatus6 {
- border: 3px solid #79bbff;
- }
- .bmInfoMultipleSelected {
- position: relative;
- padding: 4px 14px;
- }
- .bmInfoMsPagination {
- position: absolute;
- z-index: 10;
- left: 50%;
- /* top: 60px; */
- height: 16px;
- width: auto;
- /* padding: 0 10px; */
- border-radius: 10px;
- transform: translateX(-50%);
- background-color: rgba(255, 255, 255, 0.3);
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .bmInfoMsPagination :deep() span:nth-child(1) {
- margin-left: 10px;
- }
- .bmInfoMsPagination :deep() span:last-child {
- margin-right: 10px;
- }
- .bmBtn {
- padding: 15px 15px 15px 25px;
- display: flex;
- align-items: center;
- }
- .bmBtnItem {
- cursor: pointer;
- height: 24px;
- width: 24px;
- border-radius: 3px;
- margin-right: 20px;
- transition: all 0.2s;
- color: #aaa;
- }
- /* .bmBtnItem :deep() path {
- color: #aaa;
- } */
- .bmBtnItem:hover {
- background-color: rgba(255, 255, 255, 0.2);
- filter: brightness(1.5);
- }
- .bmBtnItem:active {
- background-color: rgba(255, 255, 255, 0.3);
- }
- .bmBtnItemMonitor,
- .bmBtnMapLocation {
- background-image: linear-gradient(
- 60deg,
- rgb(253 46 91 / 70%) 40%,
- rgb(254 129 130 / 70%)
- );
- color: #ccc;
- }
- .bmBtnItemSelectAll {
- /* position: relative; */
- margin-right: 20px;
- display: flex;
- align-items: center;
- }
- .bmBtnItemSelectAll > .bmBtnItem {
- margin-right: 5px;
- }
- .bmBtnItemSelectAllNum {
- /* position: absolute; */
- /* right: 20px; */
- font-size: 12px;
- color: rgba(226, 228, 243, 0.6);
- }
- .bmBtnItemActive {
- filter: drop-shadow(0 0 2px rgb(255, 255, 255)) brightness(1.5);
- font-size: 20px;
- }
- .bmLog {
- padding: 5px 25px 20px 25px;
- }
- .bmLogBox {
- padding: 15px;
- border: 2px solid #31344a;
- border-radius: 17px;
- box-sizing: border-box;
- background-color: #31344a80;
- /* max-height: 200px; */
- height: 200px;
- overflow-y: scroll;
- /* max-height: 200px; */
- }
- .bmLogItem {
- line-height: 22px;
- margin: 6px 0px;
- padding: 0 6px;
- width: 100%;
- box-sizing: border-box;
- font-size: 14px;
- word-wrap: break-word;
- }
- .bmLogItemDebug {
- color: rgb(115, 201, 255);
- }
- .bmLogItemInfo {
- color: rgb(81, 230, 93);
- }
- .bmLogItemWarning {
- color: rgb(228, 230, 81);
- }
- .bmLogItemError {
- color: rgb(255, 113, 113);
- }
- /* .origin-basic {
- padding: 15px 20px;
- color: #fff;
- font-size: 12px;
- } */
- .origin-basic div {
- margin-bottom: 5px;
- }
- .origin-basic div span {
- margin-right: 12px;
- }
- .origin-basic h2 {
- cursor: pointer;
- font-size: 14px;
- margin-bottom: 10px;
- }
- .origin-map {
- background-color: rgba(117, 117, 117, 0.8);
- }
- .ready {
- color: #65c94c !important;
- font-size: 30px;
- }
- .running {
- color: #478bc3 !important;
- font-size: 30px;
- }
- .occupied {
- color: #478bc3 !important;
- font-size: 30px;
- }
- .offline {
- color: #cdd0cf !important;
- font-size: 30px;
- }
- /*.offline {
- color: red !important;
- font-size: 30px;
- }*/
- .bmInfoMsSlideNameStatus.ready {
- color: #65c94c !important;
- border: 3px solid #65c94c;
- font-size: 30px;
- }
- .bmInfoMsSlideNameStatus.occupied {
- color: #478bc3 !important;
- border: 3px solid #478bc3;
- font-size: 30px;
- }
- .bmInfoMsSlideNameStatus.offline {
- color: #cdd0cf !important;
- border: 3px solid #cdd0cf;
- font-size: 30px;
- }
- .bmInfoMsSlideNameStatus.offline {
- color: red !important;
- border: 3px solid red;
- font-size: 30px;
- }
- </style>
- <style scoped>
- /* .benchMapBox {
- margin-top: 30px;
- } */
- .benchMapBox :deep() .el-scrollbar__bar {
- display: none;
- }
- .bmContent {
- background-image: linear-gradient(60deg, #16182a 30%, #2d3049);
- border-radius: 10px;
- /* height: 1800px; */
- margin-top: 30px;
- margin-bottom: 30px;
- min-height: 426px;
- }
- .bmMap {
- /* height: 500px; */
- width: 100%;
- /* padding: 5px 10px; */
- box-sizing: border-box;
- }
- .bmMap
- :deep()
- .el-radio-button__original-radio:checked
- + .el-radio-button__inner {
- background-color: #474c79;
- }
- .bmMap
- :deep()
- .el-radio-button__original-radio:checked
- + .el-radio-button__inner
- span {
- color: #fff;
- }
- .bmMap :deep() .el-radio-button__inner {
- background-color: #383c6b;
- border: none;
- box-shadow: none;
- }
- .bmMap :deep() .el-radio-button__inner span {
- color: #ccc;
- }
- .bmMap :deep() .el-radio-button__inner span:hover {
- color: #eee;
- }
- .bmMapImage {
- position: relative;
- width: 100%;
- /* border: 1px solid #fff; */
- background-color: rgba(255, 255, 255, 0.04);
- border-radius: 6px;
- }
- .bmMapItem {
- position: absolute;
- height: 70px;
- width: 70px;
- cursor: pointer;
- }
- .bmMapItemNormal {
- position: absolute;
- height: 100%;
- width: 100%;
- background-color: #16182a;
- /* box-shadow: 0 0 0 3px #393e6d inset; */
- box-sizing: border-box;
- z-index: 2;
- }
- .bmMapItemInfo {
- position: absolute;
- height: 100%;
- width: 120px;
- box-sizing: border-box;
- padding: 3px;
- display: flex;
- justify-content: center;
- align-items: flex-start;
- flex-direction: column;
- font-size: 12px;
- z-index: 6;
- user-select: none;
- /* background: #183153; */
- overflow: hidden;
- border: none;
- color: #ccc;
- border-radius: 10px;
- left: 30px;
- padding-left: 10px;
- background: rgba(117, 117, 117, 0.8);
- }
- .bmMapItemInfoAfter {
- width: 0%;
- height: 100%;
- background: rgba(117, 117, 117, 0.8);
- position: absolute;
- transition: all 0.2s ease-in-out;
- right: 0;
- }
- .bmMapItemInfoSelected > .bmMapItemInfoAfter {
- right: auto;
- left: 0;
- width: 100%;
- }
- .bmMapItemInfo span {
- z-index: 20;
- transition: all 0.2s ease-in-out;
- }
- .bmMapItemInfo span + span {
- margin-top: 5px;
- }
- .bmMapItemInfoSelected > span {
- color: #ccc;
- animation: scaleUp 0.2s ease-in-out;
- }
- @keyframes scaleUp {
- 0% {
- transform: scale(1);
- }
- 50% {
- transform: scale(0.95);
- }
- 100% {
- transform: scale(1);
- }
- }
- .bmMapItemInfo span:nth-child(1) {
- font-weight: bold;
- }
- .bmMapItemInfo span:nth-child(2) {
- opacity: 0.8;
- }
- .bmMapItemSelected {
- position: absolute;
- height: 100%;
- width: 100%;
- overflow: hidden;
- z-index: 4;
- }
- .bmMapItemSelected::before {
- content: " ";
- position: absolute;
- height: 100%;
- width: 100%;
- background: linear-gradient(
- 90deg,
- transparent,
- #ff3f99,
- #3e88ff,
- transparent
- );
- /* transform: scale(5); */
- animation: rotation_9018 3000ms infinite linear;
- filter: blur(9px);
- }
- @keyframes rotation_9018 {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- .bmMapItemSelectedContent {
- position: absolute;
- height: calc(100% - 6px);
- width: calc(100% - 6px);
- top: 3px;
- left: 3px;
- background-color: #16182a;
- }
- .bmMapItemSelectedContent::before {
- content: " ";
- height: 28px;
- width: 8px;
- position: absolute;
- background: white;
- left: 50%;
- top: 50%;
- transform: translateX(-50%) translateY(-50%);
- filter: blur(12px);
- }
- .bmBench {
- width: 100%;
- height: 100%;
- box-sizing: border-box;
- }
- .bmBenchBox {
- font-size: 0;
- /* margin-top: 5px; */
- position: relative;
- display: flex;
- justify-content: center;
- background-color: #000;
- height: 100%;
- }
- .bmBenchImg {
- /* width: 100%;
- height: 285px; */
- width: 100%;
- background-color: #000;
- /* padding: 80px; */
- height: 100%;
- border-radius: 6px;
- height: 100%;
- }
- .bmBenchTrailUpper {
- position: absolute;
- /* height: 285px; */
- height: 100%;
- width: 100%;
- z-index: 20;
- left: 0;
- top: 0;
- }
- .bmBenchTrailUpperCursorTap {
- position: absolute;
- height: 2vh;
- width: 2vh;
- background-color: rgba(255, 255, 255, 0.8);
- border-radius: 50%;
- left: 30%;
- top: 0;
- animation: bmBenchTrailUpperCursorTapAnimation 0.75s linear 0s 1;
- }
- @keyframes bmBenchTrailUpperCursorTapAnimation {
- 0% {
- transform: scale(1);
- }
- 25% {
- transform: scale(1);
- opacity: 1;
- }
- 40% {
- transform: scale(0.6);
- opacity: 0.6;
- }
- 50% {
- transform: scale(0.6);
- opacity: 0.6;
- }
- 55% {
- transform: scale(1);
- opacity: 1;
- }
- 100% {
- transform: scale(1);
- }
- }
- .bmBenchTrailUpperCursorSwipe {
- position: absolute;
- height: 2vh;
- width: 2vh;
- background-color: rgba(255, 255, 255, 0.8);
- border-radius: 50%;
- transition: all 1s;
- }
- .bmBenchTrailUpperCursorSwipe2 {
- height: 1.5vh;
- width: 1.5vh;
- transition: all 1s 0.05s;
- }
- .bmBenchTrailUpperCursorSwipe3 {
- height: 1vh;
- width: 1vh;
- transition: all 1s 0.1s;
- }
- .bmBenchTrailUpperCursorPress {
- position: absolute;
- height: 2vh;
- width: 2vh;
- background-color: rgba(255, 255, 255, 0.8);
- border-radius: 50%;
- left: 30%;
- top: 0;
- animation: bmBenchTrailUpperCursorPressAnimation 2s linear 0s 1;
- }
- @keyframes bmBenchTrailUpperCursorPressAnimation {
- 0% {
- transform: scale(1);
- }
- 12% {
- transform: scale(1);
- opacity: 1;
- }
- 21% {
- transform: scale(0.6);
- opacity: 0.6;
- }
- 70% {
- transform: scale(0.6);
- opacity: 0.6;
- }
- 73% {
- transform: scale(1);
- opacity: 1;
- }
- 100% {
- transform: scale(1);
- }
- }
- .bmBenchTrailUpperCursor {
- position: absolute;
- height: 2vh;
- width: 2vh;
- background-color: rgba(255, 255, 255, 0.6);
- /* border: 1vh solid rgba(255, 255, 255, 0.6); */
- border-radius: 50%;
- left: 30%;
- top: 0;
- pointer-events: none;
- animation: bmBenchTrailUpperCursorAnimation 1s linear 0s 1;
- box-sizing: border-box;
- }
- @keyframes bmBenchTrailUpperCursorAnimation {
- 0% {
- border: 1vh solid rgba(255, 255, 255, 0.4);
- }
- 40% {
- border: 0vh solid rgba(255, 255, 255, 0.4);
- }
- 100% {
- border: 0vh solid rgba(255, 255, 255, 0.4);
- }
- }
- .bmInfo {
- min-height: 126px;
- border-bottom: 1px solid #444358;
- padding-bottom: 15px;
- }
- .bmInfoNotSelected,
- .bmInfoOneSelected {
- padding: 0 15px 0 25px;
- }
- .bmInfoNsTitle,
- .bmInfoOsTitle {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 80px;
- }
- .bmInfoNsInfo,
- .bmInfoOsInfo {
- display: flex;
- flex-direction: column;
- }
- .bmInfoNsInfo > span:nth-child(1),
- .bmInfoOsInfo > span:nth-child(1) {
- /* font-weight: bold; */
- font-size: 18px;
- display: flex;
- align-items: center;
- /* justify-content: center; */
- }
- .bmInfoNsInfo > span:nth-child(2),
- .bmInfoOsInfo > span:nth-child(2) {
- font-size: 12px;
- opacity: 0.4;
- margin-top: 10px;
- /* padding-bottom: 15px; */
- letter-spacing: 1px;
- font-weight: lighter;
- }
- .bmInfoNsChart {
- height: 50px;
- width: 200px;
- }
- .bmInfoOsImg {
- background-image: url(../../assets/benchImage.png);
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- height: 100%;
- width: 120px;
- }
- .bmInfoOsImgA3NF-01 {
- background-image: url(../../assets/bench_img/a3nf_01.jpg) !important;
- }
- .bmInfoOsImgA3NF-02 {
- background-image: url(../../assets/bench_img/a3nf_02.jpg) !important;
- }
- .bmInfoOsImgB9PA-01 {
- background-image: url(../../assets/bench_img/B9PA_01.jpg) !important;
- }
- .bmInfoOsImgB9PA-02 {
- background-image: url(../../assets/bench_img/B9PA_01.jpg) !important;
- }
- .bmInfoOsImgB9PA-04 {
- background-image: url(../../assets/bench_img/B9PA_04.jpg) !important;
- }
- .bmInfoOsImgCBEV-01 {
- background-image: url(../../assets/bench_img/CBEV_01.jpg) !important;
- }
- .bmInfoOsImgQ3NF-01 {
- background-image: url(../../assets/bench_img/Q3nf_01.jpg) !important;
- }
- .bmInfoOsImgH-JP-02 {
- background-image: url(../../assets/bench_img/meb-jp2.jpg) !important;
- }
- .bmInfoOsImgP-CN-01 {
- background-image: url(../../assets/bench_img/MEB-P-CN_01.jpg) !important;
- }
- .bmInfoOsImgH-CN-01 {
- background-image: url(../../assets/bench_img/meb-H_CN_01.jpg) !important;
- }
- .bmInfoOsImgP-TW-01 {
- background-image: url(../../assets/bench_img/meb-h-CN_02.jpg) !important;
- }
- .bmInfoOsImgH-JP-01 {
- background-image: url(../../assets/bench_img/meb-jp1.jpg) !important;
- }
- .bmInfoOsImgD5 {
- background-image: url(../../assets/bench_img/Q7PA_01.jpg) !important;
- }
- .bmInfoOsImgQ6-01 {
- background-image: url(../../assets/bench_img/Q6-01.jpg) !important;
- }
- .bmInfoOsImgQ6-02 {
- background-image: url(../../assets/bench_img/Q6-02.jpg) !important;
- }
- .bmInfoNsTag,
- .bmInfoOsTag {
- display: flex;
- padding: 10px 0;
- }
- .bmInfoTagItem {
- height: 26px;
- padding: 4px 14px;
- background-color: #25293c;
- font-size: 12px;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 13px;
- box-sizing: border-box;
- color: #d0cece;
- margin-right: 10px;
- cursor: pointer;
- user-select: none;
- }
- .bmInfoTagItem:hover {
- background-color: #2d3249;
- }
- .bmInfoTagItem:active {
- background-color: #333a53;
- }
- .bmInfoMsSlide {
- height: 120px;
- width: 200px;
- /* background-color: #3e88ff; */
- background-image: url(../../assets/benchImage.png);
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- cursor: pointer;
- position: relative;
- }
- .bmInfoMsSlideName {
- position: absolute;
- background-color: rgba(23, 25, 43, 0.5);
- font-size: 12px;
- padding: 1px 8px;
- border-radius: 9px;
- left: 3px;
- top: 3px;
- box-sizing: border-box;
- /* text-align: center; */
- backdrop-filter: blur(1px);
- text-shadow: 0 0 10px #000;
- display: flex;
- justify-content: center;
- align-items: center;
- user-select: none;
- }
- .bmInfoMsSlideNameStatus {
- float: right;
- }
- .bmInfoMsSlideNameStatus,
- .bmInfoMsSlideNameStatus4 {
- height: 12px;
- width: 12px;
- border: 3px solid #b1b3b8;
- border-radius: 50%;
- box-sizing: border-box;
- margin-right: 6px;
- }
- .bmInfoMsSlideNameStatus2,
- .bmInfoMsSlideNameStatus3 {
- border: 3px solid #95d475;
- }
- /* .bmInfoMsSlideNameStatus4 {
- border: 3px solid #f89898;
- } */
- .bmInfoMsSlideNameStatus5,
- .bmInfoMsSlideNameStatus6 {
- border: 3px solid #79bbff;
- }
- .bmInfoMultipleSelected {
- position: relative;
- padding: 4px 14px;
- }
- .bmInfoMsPagination {
- position: absolute;
- z-index: 10;
- left: 50%;
- /* top: 60px; */
- height: 16px;
- width: auto;
- /* padding: 0 10px; */
- border-radius: 10px;
- transform: translateX(-50%);
- background-color: rgba(255, 255, 255, 0.3);
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .bmInfoMsPagination :deep() span:nth-child(1) {
- margin-left: 10px;
- }
- .bmInfoMsPagination :deep() span:last-child {
- margin-right: 10px;
- }
- .bmBtn {
- padding: 15px 15px 15px 25px;
- display: flex;
- align-items: center;
- }
- .bmBtnItem {
- cursor: pointer;
- height: 24px;
- width: 24px;
- border-radius: 3px;
- margin-right: 20px;
- transition: all 0.2s;
- color: #aaa;
- }
- /* .bmBtnItem :deep() path {
- color: #aaa;
- } */
- .bmBtnItem:hover {
- background-color: rgba(255, 255, 255, 0.2);
- filter: brightness(1.5);
- }
- .bmBtnItem:active {
- background-color: rgba(255, 255, 255, 0.3);
- }
- .bmBtnItemMonitor,
- .bmBtnMapLocation {
- background-image: linear-gradient(
- 60deg,
- rgb(253 46 91 / 70%) 40%,
- rgb(254 129 130 / 70%)
- );
- color: #ccc;
- }
- .bmBtnItemSelectAll {
- /* position: relative; */
- margin-right: 20px;
- display: flex;
- align-items: center;
- }
- .bmBtnItemSelectAll > .bmBtnItem {
- margin-right: 5px;
- }
- .bmBtnItemSelectAllNum {
- /* position: absolute; */
- /* right: 20px; */
- font-size: 12px;
- color: rgba(226, 228, 243, 0.6);
- }
- .bmBtnItemActive {
- filter: drop-shadow(0 0 2px rgb(255, 255, 255)) brightness(1.5);
- font-size: 20px;
- }
- .bmLog {
- padding: 5px 25px 20px 25px;
- }
- .bmLogBox {
- padding: 15px;
- border: 2px solid #31344a;
- border-radius: 17px;
- box-sizing: border-box;
- background-color: #31344a80;
- /* max-height: 200px; */
- height: 200px;
- overflow-y: scroll;
- /* max-height: 200px; */
- }
- .bmLogItem {
- line-height: 22px;
- margin: 6px 0px;
- padding: 0 6px;
- width: 100%;
- box-sizing: border-box;
- font-size: 14px;
- word-wrap: break-word;
- }
- .bmLogItemDebug {
- color: rgb(115, 201, 255);
- }
- .bmLogItemInfo {
- color: rgb(81, 230, 93);
- }
- .bmLogItemWarning {
- color: rgb(228, 230, 81);
- }
- .bmLogItemError {
- color: rgb(255, 113, 113);
- }
- .origin-basic {
- padding: 15px 20px;
- color: #fff;
- font-size: 12px;
- }
- .origin-basic div {
- margin-bottom: 10px;
- }
- .origin-basic div span {
- margin-right: 12px;
- }
- .origin-basic h2 {
- cursor: pointer;
- font-size: 14px;
- margin-bottom: 10px;
- }
- .originBasicRow {
- display: flex;
- margin-bottom: 0 !important;
- }
- .originBasicRow > div {
- width: 100%;
- }
- .ready {
- color: #65c94c !important;
- font-size: 30px;
- }
- .occupied {
- color: #478bc3 !important;
- font-size: 30px;
- }
- .offline {
- color: #cdd0cf !important;
- font-size: 30px;
- }
- .offline {
- color: red !important;
- font-size: 30px;
- }
- .bmInfoMsSlideNameStatus.ready {
- color: #65c94c !important;
- border: 3px solid #65c94c;
- font-size: 30px;
- }
- .bmInfoMsSlideNameStatus.occupied {
- color: #478bc3 !important;
- border: 3px solid #478bc3;
- font-size: 30px;
- }
- .bmInfoMsSlideNameStatus.offline {
- color: #cdd0cf !important;
- border: 3px solid #cdd0cf;
- font-size: 30px;
- }
- .bmInfoMsSlideNameStatus.offline {
- color: red !important;
- border: 3px solid red;
- font-size: 30px;
- }
- .secondScreen {
- width: 26.36vw;
- height: 26.38vh;
- margin-left: 1.56vw;
- margin-bottom: 2.13vh;
- border-radius: 2.08vw;
- overflow: hidden;
- }
- .benchBtnActive {
- filter: brightness(5) drop-shadow(0 2px 3px rgb(255, 255, 255));
- }
- </style>
|