doorLock.vue 172 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029
  1. <template>
  2. <div class="content-box">
  3. <div class="left">
  4. <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
  5. <span class="cameratxt">门锁管理</span>
  6. </div>
  7. <div class="middles">
  8. <div class="middle">
  9. <div class="filter">
  10. <div class="condition">
  11. <el-input
  12. :clearable="true"
  13. @clear="searchBtn"
  14. v-model.trim="searchInput.keyWord"
  15. class="w-50 m-2"
  16. placeholder="请输入关键字查询"
  17. style="width: 230px"
  18. />
  19. <el-button
  20. style="margin-left: 20px"
  21. color="rgba(41, 109, 227, 1)"
  22. type="primary"
  23. class="search"
  24. @click="searchBtn"
  25. ><el-icon>
  26. <Search />
  27. </el-icon>
  28. <span>查询</span></el-button
  29. >
  30. <el-button
  31. v-if="flagBtn.daoru == 1"
  32. style="margin-left: 20px"
  33. color="rgba(41, 109, 227, 1)"
  34. type="primary"
  35. class="search"
  36. @click="bulkImportClick"
  37. >批量导入</el-button
  38. >
  39. <el-button
  40. style="margin-left: 20px"
  41. color="rgba(41, 109, 227, 1)"
  42. type="primary"
  43. class="search"
  44. @click="identityCardClick('总卡', '总卡')"
  45. >制作总卡</el-button
  46. >
  47. <el-button
  48. style="margin-left: 20px"
  49. color="rgba(41, 109, 227, 1)"
  50. type="primary"
  51. class="search"
  52. @click="allPassClick"
  53. >制作总密码</el-button
  54. >
  55. <div class="condition" style="margin-left: 30px">
  56. <span>楼栋单元</span>
  57. <el-select
  58. v-model="searchInput.buildingId"
  59. placeholder="请选择楼栋单元"
  60. style="width: 200px; margin-left: 10px"
  61. @change="searchBtn"
  62. :clearable="true"
  63. >
  64. <el-option
  65. v-for="item in buildData"
  66. :key="item.id"
  67. :label="`${item.building}-${item.element}`"
  68. :value="item.id"
  69. />
  70. </el-select>
  71. </div>
  72. <div class="condition" style="margin-left: 30px">
  73. <span>房间类型</span>
  74. <el-select
  75. style="width: 180px; margin-left: 10px"
  76. v-model="searchInput.houseType"
  77. class="m-2"
  78. placeholder="请选择类型"
  79. :clearable="true"
  80. @change="searchBtn"
  81. >
  82. <el-option label="全日房" value="1" />
  83. <el-option label="钟点房" value="2" />
  84. </el-select>
  85. </div>
  86. <div class="condition" style="margin-left: 20px">
  87. <el-button
  88. color="rgba(41, 109, 227, 1)"
  89. type="primary"
  90. class="search"
  91. @click="detailChange"
  92. >总卡明细</el-button
  93. >
  94. </div>
  95. <div class="condition" style="margin-left: 20px">
  96. <el-button
  97. color="rgba(41, 109, 227, 1)"
  98. type="primary"
  99. class="search"
  100. @click="allPassDetailChange"
  101. >总密码明细</el-button
  102. >
  103. </div>
  104. </div>
  105. </div>
  106. <div class="changeItems">
  107. <div
  108. class="changeItem"
  109. :class="roomTypeIndex == '全部' ? 'changeItem_active' : ''"
  110. @click="changeTypes('全部')"
  111. >
  112. 全部
  113. </div>
  114. <div
  115. v-for="i in roomTypes"
  116. :key="i"
  117. class="changeItem"
  118. :class="roomTypeIndex == i ? 'changeItem_active' : ''"
  119. @click="changeTypes(i)"
  120. >
  121. {{ i }}
  122. </div>
  123. </div>
  124. <!-- <div class="changeItems">
  125. <el-button
  126. color="rgba(41, 109, 227, 1)"
  127. type="primary"
  128. class="search"
  129. @click="searchBtn"
  130. >
  131. 重置管理员密码</el-button
  132. >
  133. <el-button
  134. color="rgba(41, 109, 227, 1)"
  135. type="primary"
  136. class="search"
  137. @click="addTemporaryCard"
  138. >
  139. 添加总卡</el-button
  140. >
  141. <el-button
  142. color="rgba(41, 109, 227, 1)"
  143. type="primary"
  144. class="search"
  145. @click="searchBtn"
  146. >
  147. 批量下发开门密码</el-button
  148. >
  149. <el-button
  150. color="rgba(41, 109, 227, 1)"
  151. type="primary"
  152. class="search"
  153. @click="searchBtn"
  154. >
  155. 批量导入</el-button
  156. >
  157. </div> -->
  158. </div>
  159. <div class="footer" v-loading="loading">
  160. <div class="floor" v-for="item in roomList.list" :key="item">
  161. <div class="title">
  162. <span class="t1"
  163. >{{ item.name }}
  164. <span style="color: #1e7dfb"
  165. >( {{ item.roomType == 1 ? "全" : "钟" }} )</span
  166. ></span
  167. >
  168. <span class="t2"> / 共{{ item.total }}间</span>
  169. </div>
  170. <div class="roomList">
  171. <div class="room" v-for="i in item.vos" :key="i">
  172. <el-popover
  173. popper-class="roominfoPopper"
  174. placement="bottom-start"
  175. :width="460"
  176. trigger="click"
  177. effect="light"
  178. :visible="i.visible"
  179. >
  180. <template #reference>
  181. <div @click="itemClick(i)">
  182. <div class="roomNum">{{ i.roomNumber }}</div>
  183. <div class="rLock">房间锁</div>
  184. <div class="wifi">
  185. <img
  186. v-if="i.equipmentState == 1"
  187. src="@/assets/icons/wifiOpen.png"
  188. alt=""
  189. />
  190. <img v-else src="@/assets/icons/wifiClose.png" alt="" />
  191. {{ i.equipmentType }}
  192. </div>
  193. </div>
  194. </template>
  195. <div class="roomInfo">
  196. <div class="close" @click="closeRoom(i)">
  197. <img src="@/assets/icons/close.png" alt="" />
  198. </div>
  199. <div class="title">{{ i.roomNumber }} (房间锁)</div>
  200. <div class="content">
  201. <div class="lefts">
  202. <div>
  203. <span>设备型号</span>
  204. <span>{{ i.equipmentType }}</span>
  205. </div>
  206. <div>
  207. <span>网络类型</span>
  208. <span>{{ i.networkType }}</span>
  209. </div>
  210. <div>
  211. <span>WIFI MAC</span>
  212. <span>{{ i.wifiMac }}</span>
  213. </div>
  214. <div>
  215. <span>绑定时间</span>
  216. <span>{{ i.bindingTime }}</span>
  217. </div>
  218. <div>
  219. <span>电量</span>
  220. <span v-if="electricQuantity"
  221. >{{ electricQuantity }}%</span
  222. >
  223. </div>
  224. <div>
  225. <span>网络状态</span>
  226. <span v-if="i.networkState == 1">在线</span>
  227. <span v-if="i.networkState == 0">离线</span>
  228. <span v-if="i.networkState == null"></span>
  229. </div>
  230. <div>
  231. <span>设备状态</span>
  232. <span v-if="i.equipmentState == 1">在线</span>
  233. <span v-if="i.equipmentState == 0">离线</span>
  234. <span v-if="i.equipmentState == null"></span>
  235. </div>
  236. </div>
  237. <div class="rigths">
  238. <!-- <div @click="forbiddenClick">
  239. <img src="@/assets/icons/forbidden.png" alt="" />
  240. <span>禁用门锁</span>
  241. </div> -->
  242. <div @click="keyClick(i)" v-if="flagBtn.daoru == 1">
  243. <img src="@/assets/icons/key.png" alt="" />
  244. <span>钥匙管理</span>
  245. </div>
  246. <div @click="newsClick(i)" v-if="flagBtn.daoru == 1">
  247. <img src="@/assets/icons/news.png" alt="" />
  248. <span>消息列表</span>
  249. </div>
  250. <div @click="unlockingClick(i)" v-if="flagBtn.daoru == 1">
  251. <img src="@/assets/icons/unlocking.png" alt="" />
  252. <span>远程开锁</span>
  253. </div>
  254. <!-- <div @click="resetPassClick">
  255. <img src="@/assets/icons/resetPass.png" alt="" />
  256. <span>重置管理员密码</span>
  257. </div> -->
  258. <div
  259. @click="bindingClick(i)"
  260. v-if="i.equipmentState != 1 && flagBtn.daoru == 1"
  261. >
  262. <img
  263. class="deblocking"
  264. src="@/assets/icons/binding.png"
  265. alt=""
  266. />
  267. <span>绑定设备</span>
  268. </div>
  269. <div
  270. @click="deblockingClick(i)"
  271. v-if="i.equipmentState == 1 && flagBtn.daoru == 1"
  272. >
  273. <img
  274. class="deblocking"
  275. src="@/assets/icons/deblocking.png"
  276. alt=""
  277. />
  278. <span>解绑设备</span>
  279. </div>
  280. <div
  281. @click="nfcClick(i, 1)"
  282. v-if="nfcFunction == 0 && flagBtn.daoru == 1"
  283. >
  284. <img
  285. class=""
  286. src="@/assets/icons/nfc.png"
  287. alt=""
  288. />
  289. <span>NFC启用</span>
  290. </div>
  291. <div @click="nfcClick(i, 0)" v-if="nfcFunction == 1">
  292. <img
  293. class=""
  294. src="@/assets/icons/nfc.png"
  295. alt=""
  296. />
  297. <span>NFC禁用</span>
  298. </div>
  299. <div @click="sendAdminPass(i)" v-if="flagBtn.adminPass == 1">
  300. <img
  301. class=""
  302. src="@/assets/icons/sendAdminPass.png"
  303. alt=""
  304. />
  305. <span>下发管理员密码</span>
  306. </div>
  307. </div>
  308. </div>
  309. </div>
  310. </el-popover>
  311. </div>
  312. </div>
  313. </div>
  314. </div>
  315. <!-- 消息列表 -->
  316. <el-dialog
  317. class="newsDialog"
  318. v-model="newsVisible"
  319. :close-on-click-modal="false"
  320. :close-on-press-escape="false"
  321. title="消息列表"
  322. align-center
  323. width="1000"
  324. :before-close="cancelNews"
  325. >
  326. <div class="middle">
  327. <div class="changeItems">
  328. <div
  329. class="changeNews"
  330. :class="newsIndex == 1 ? 'changeNews_active' : ''"
  331. @click="changeNews(1)"
  332. >
  333. 开锁记录
  334. </div>
  335. <div
  336. class="changeNews"
  337. :class="newsIndex == 2 ? 'changeNews_active' : ''"
  338. @click="changeNews(2)"
  339. >
  340. 操作记录
  341. </div>
  342. </div>
  343. </div>
  344. <div v-if="newsIndex == 1">
  345. <div class="footers" v-loading="loading">
  346. <el-table
  347. :row-class-name="tableRowClassName"
  348. :data="newTableList"
  349. @selection-change="handleSelectionChange"
  350. style="width: 100%; height: 550px"
  351. :header-cell-style="{
  352. background: 'rgba(240, 243, 247, 1)',
  353. height: '50px',
  354. border: 0,
  355. }"
  356. >
  357. <el-table-column align="center" prop="roomNumber" label="房间号">
  358. </el-table-column>
  359. <el-table-column align="center" prop="type" label="类型" />
  360. <el-table-column align="center" prop="unlockType" label="操作" />
  361. <el-table-column
  362. align="center"
  363. prop="updateTime"
  364. label="消息时间"
  365. >
  366. </el-table-column>
  367. </el-table>
  368. </div>
  369. <div class="pageSize">
  370. <span></span>
  371. <el-pagination
  372. background
  373. :current-page="newsPage"
  374. :page-size="newsSize"
  375. layout="total, prev, pager, next, jumper, slot"
  376. :total="newsTotal"
  377. @update:current-page="newsHandleCurrentChange"
  378. />
  379. </div>
  380. </div>
  381. <div v-if="newsIndex == 2">
  382. <div class="footers" v-loading="loading">
  383. <el-table
  384. :row-class-name="tableRowClassName"
  385. :data="newTableList"
  386. @selection-change="handleSelectionChange"
  387. style="width: 100%; height: 550px"
  388. :header-cell-style="{
  389. background: 'rgba(240, 243, 247, 1)',
  390. height: '50px',
  391. border: 0,
  392. }"
  393. >
  394. <el-table-column align="center" prop="roomNumber" label="房间号">
  395. </el-table-column>
  396. <el-table-column align="center" prop="type" label="类型" />
  397. <el-table-column
  398. align="center"
  399. prop="operatorName"
  400. label="操作人"
  401. />
  402. <el-table-column
  403. align="center"
  404. prop="dataTime"
  405. label="操作时间"
  406. />
  407. <el-table-column align="center" prop="content" label="操作内容">
  408. </el-table-column>
  409. </el-table>
  410. </div>
  411. <div class="pageSize">
  412. <span></span>
  413. <el-pagination
  414. background
  415. :current-page="newsPage"
  416. :page-size="newsSize"
  417. layout="total, prev, pager, next, jumper, slot"
  418. :total="newsTotal"
  419. @update:current-page="newsHandleCurrentChange"
  420. />
  421. </div>
  422. </div>
  423. </el-dialog>
  424. <!-- 远程开锁 -->
  425. <el-dialog
  426. class="unlockingDialog"
  427. v-model="unlockingVisible"
  428. :close-on-click-modal="false"
  429. :close-on-press-escape="false"
  430. title="远程开锁"
  431. align-center
  432. width="400"
  433. :before-close="cancelUnlocking"
  434. >
  435. <div class="middle" v-loading="unlockingLoading" element-loading-text="远程开锁中...">
  436. <div class="content">
  437. 确定远程开锁吗?<br /><span class="marning"
  438. >注: 远程开锁前,门锁需要先按“4#”进入请求远程开锁模式</span
  439. >
  440. </div>
  441. <div class="options">
  442. <el-button
  443. color="rgba(41, 109, 227, 1)"
  444. class="queding"
  445. type="primary"
  446. @click="unlockingSubmit"
  447. >
  448. 确定
  449. </el-button>
  450. <el-button @click="cancelUnlocking">取消</el-button>
  451. </div>
  452. </div>
  453. </el-dialog>
  454. <!-- 制作总密码 -->
  455. <el-dialog
  456. class="passManagementDialog"
  457. v-model="allPassVisible"
  458. :close-on-click-modal="false"
  459. :close-on-press-escape="false"
  460. title="制作总密码"
  461. align-center
  462. width="650"
  463. :before-close="cancelAllPass"
  464. >
  465. <el-form
  466. ref="allPassRef"
  467. :model="allPassRuleForm"
  468. :rules="allPassRules"
  469. label-width="100px"
  470. class="demo-ruleForm"
  471. :size="formSize"
  472. label-position="left"
  473. status-icon
  474. >
  475. <el-form-item
  476. label="单元 :"
  477. prop="buildingId"
  478. >
  479. <el-select
  480. v-model="allPassRuleForm.buildingId"
  481. placeholder="请选择楼栋单元"
  482. style="width: 500px"
  483. :clearable="true"
  484. >
  485. <el-option
  486. v-for="item in buildData"
  487. :key="item.id"
  488. :label="`${item.building}-${item.element}`"
  489. :value="item.id"
  490. />
  491. </el-select>
  492. </el-form-item>
  493. <el-form-item label="用户 :" prop="name">
  494. <el-select
  495. v-model="allPassRuleForm.name"
  496. class="m-2"
  497. placeholder="请选择用户"
  498. style="width: 500px"
  499. >
  500. <el-option
  501. v-for="i in staffList"
  502. :key="i"
  503. :label="`${i.userName} ( ${i.department} )`"
  504. :value="i.id"
  505. />
  506. </el-select>
  507. </el-form-item>
  508. <el-form-item label="密码 :" prop="pass">
  509. <el-input
  510. v-model.trim="allPassRuleForm.pass"
  511. placeholder="请输入6或8位数密码或者点击随机生成"
  512. style="width: 500px"
  513. >
  514. <template #append>
  515. <div @click="randomCipherAllPass">随机生成</div>
  516. </template>
  517. </el-input>
  518. </el-form-item>
  519. <el-form-item label="生效时间 :" prop="effectiveTime">
  520. <div class="block">
  521. <el-date-picker
  522. v-model="allPassRuleForm.effectiveTime"
  523. type="datetime"
  524. placeholder="选择生效时间"
  525. style="width: 500px"
  526. format="YYYY-MM-DD HH:mm:ss"
  527. value-format="YYYY-MM-DD HH:mm:ss"
  528. />
  529. </div>
  530. </el-form-item>
  531. <el-form-item label="失效时间 :" prop="failureTime">
  532. <div class="block">
  533. <el-date-picker
  534. v-model="allPassRuleForm.failureTime"
  535. type="datetime"
  536. placeholder="选择失效时间"
  537. style="width: 500px"
  538. format="YYYY-MM-DD HH:mm:ss"
  539. value-format="YYYY-MM-DD HH:mm:ss"
  540. />
  541. </div>
  542. </el-form-item>
  543. <el-form-item class="options">
  544. <el-button
  545. color="rgba(41, 109, 227, 1)"
  546. class="queding"
  547. type="primary"
  548. @click="allPassConfig(allPassRef)"
  549. >
  550. 确定
  551. </el-button>
  552. <el-button @click="cancelAllPass(allPassRef)"
  553. >取消</el-button
  554. >
  555. </el-form-item>
  556. </el-form>
  557. </el-dialog>
  558. <!-- 绑定设备 -->
  559. <el-dialog
  560. class="BindingDialog"
  561. v-model="bindingVisible"
  562. :close-on-click-modal="false"
  563. :close-on-press-escape="false"
  564. title="绑定设备"
  565. align-center
  566. width="450"
  567. :before-close="cancelBinding"
  568. >
  569. <div class="middle">
  570. <el-form
  571. ref="bindingRef"
  572. :model="bindingList"
  573. :rules="bindingrules"
  574. label-width="100px"
  575. class="demo-ruleForm"
  576. :size="formSize"
  577. label-position="left"
  578. status-icon
  579. >
  580. <el-form-item label="绑定设备 :" prop="luid">
  581. <el-input
  582. style="width: 250px"
  583. v-model.trim="bindingList.luid"
  584. placeholder="请输入设备id"
  585. clearable
  586. />
  587. </el-form-item>
  588. <el-form-item class="options">
  589. <el-button
  590. color="rgba(0, 97, 255, 1)"
  591. class="queding"
  592. type="primary"
  593. @click="bindingSubmit(bindingRef)"
  594. >
  595. 确定
  596. </el-button>
  597. <el-button @click="cancelBinding">取消</el-button>
  598. </el-form-item>
  599. </el-form>
  600. </div>
  601. </el-dialog>
  602. <!-- 解绑设备 -->
  603. <el-dialog
  604. class="unlockingDialog"
  605. v-model="deblockingVisible"
  606. :close-on-click-modal="false"
  607. :close-on-press-escape="false"
  608. title="解绑设备"
  609. align-center
  610. width="400"
  611. :before-close="cancelDeblocking"
  612. >
  613. <div class="middle">
  614. <div class="content">确定解绑设备吗?</div>
  615. <div class="options">
  616. <el-button
  617. color="rgba(41, 109, 227, 1)"
  618. class="queding"
  619. type="primary"
  620. @click="deblockSubmit"
  621. >
  622. 确定
  623. </el-button>
  624. <el-button @click="cancelDeblocking">取消</el-button>
  625. </div>
  626. </div>
  627. </el-dialog>
  628. <!-- 批量导入 -->
  629. <el-dialog
  630. class="bulkImportDialog"
  631. v-model="bulkImportVisible"
  632. :close-on-click-modal="false"
  633. :close-on-press-escape="false"
  634. title="批量导入"
  635. align-center
  636. width="570"
  637. :before-close="cancelBulkImport"
  638. >
  639. <div class="middle">
  640. <el-upload
  641. style="width: 500px"
  642. class="upload-demo"
  643. ref="bulkImportref"
  644. drag
  645. action="#"
  646. :on-preview="handlePreview"
  647. :on-remove="handleRemove"
  648. :on-change="handleChange"
  649. :http-request="handleUpload"
  650. :before-upload="beforeAvatarUpload"
  651. :limit="1"
  652. :on-exceed="handleExceed"
  653. >
  654. <el-icon class="el-icon--upload"><upload-filled /></el-icon>
  655. <div class="el-upload__text">
  656. <span style="font-size: 20px">点击上传或拖拽文件</span><br />
  657. <em>请按照标准模板填写信息</em><br />
  658. <em>&nbsp;</em>
  659. </div>
  660. <!-- <template #tip>
  661. <div class="el-upload__tip">
  662. jpg/png files with a size less than 500kb
  663. </div>
  664. </template> -->
  665. </el-upload>
  666. <div class="startImport">
  667. <el-button
  668. v-if="bulkImportFile"
  669. type="primary"
  670. color="rgba(0, 97, 255, 1)"
  671. style="width: 200px"
  672. @click="bulkImportConfig"
  673. plain
  674. >开始导入</el-button
  675. >
  676. <span
  677. v-else
  678. type="primary"
  679. color="rgba(236, 245, 255, 1)"
  680. style="
  681. display: inline-block;
  682. width: 200px;
  683. height: 42px;
  684. text-align: center;
  685. line-height: 42px;
  686. color: rgb(160, 207, 255);
  687. border: 1px solid #dcdfe6;
  688. border-radius: 4px;
  689. "
  690. plain
  691. >开始导入</span
  692. >
  693. <span
  694. style="
  695. width: 120px;
  696. margin-left: 20px;
  697. cursor: pointer;
  698. color: rgba(0, 97, 255, 1);
  699. "
  700. @click="resetImport"
  701. >重置</span
  702. >
  703. <span class="downLoad" @click="downbulkImport">下载模板</span>
  704. </div>
  705. <!-- <div class="options">
  706. <el-button
  707. color="rgba(41, 109, 227, 1)"
  708. class="queding"
  709. type="primary"
  710. @click="bulkImportConfig"
  711. >
  712. 确定
  713. </el-button>
  714. <el-button @click="cancelBulkImport">取消</el-button>
  715. </div> -->
  716. </div>
  717. </el-dialog>
  718. <!-- 钥匙管理 -->
  719. <el-dialog
  720. class="keyDialog"
  721. v-model="keyVisible"
  722. :close-on-click-modal="false"
  723. :close-on-press-escape="false"
  724. :title="keyTitle"
  725. align-center
  726. width="1200"
  727. :before-close="cancelKey"
  728. >
  729. <div class="footers" v-loading="loading">
  730. <div class="title">
  731. <div class="keyTitle">
  732. <span class="txt">住客</span>
  733. </div>
  734. <el-collapse v-model="activeUser">
  735. <el-collapse-item name="1">
  736. <div class="table">
  737. <el-table
  738. :row-class-name="tableRowClassName"
  739. :data="userList"
  740. @selection-change="handleSelectionChange"
  741. style="width: 100%; height: 200px"
  742. :header-cell-style="{
  743. background: 'rgba(240, 243, 247, 1)',
  744. height: '50px',
  745. border: 0,
  746. }"
  747. >
  748. <el-table-column align="center" prop="name" label="姓名">
  749. </el-table-column>
  750. <el-table-column
  751. align="center"
  752. prop="phone"
  753. label="手机号"
  754. />
  755. <el-table-column
  756. align="center"
  757. prop="roomlength"
  758. label="类型"
  759. >
  760. <template #default="{ row }">
  761. <span v-if="row.lockStatus == 1">密码</span>
  762. <span v-if="row.lockStatus == 2">卡片</span>
  763. <span v-if="row.lockStatus == 3">指纹</span>
  764. <span v-if="row.lockStatus == 4">身份证</span>
  765. <span v-if="row.lockStatus == 5">钥匙</span>
  766. </template>
  767. </el-table-column>
  768. <el-table-column
  769. align="center"
  770. prop="roomlength"
  771. label="时效"
  772. >
  773. <template #default="{ row }">
  774. <span v-if="row.type == 1">管理员用户</span>
  775. <span v-if="row.type == 2">普通用户</span>
  776. <span v-if="row.type == 4">时效性用户</span>
  777. <span v-if="row.type == 5">一次性时效密码用户</span>
  778. <span v-if="row.type == 100">时效性无网络密码用户</span>
  779. </template>
  780. </el-table-column>
  781. <el-table-column
  782. align="center"
  783. prop="startTime"
  784. label="开始时间"
  785. width="120"
  786. >
  787. <template #default="{ row }">
  788. <span v-if="row.type == 4 || row.type == 100">{{
  789. row.startTime
  790. }}</span>
  791. </template>
  792. </el-table-column>
  793. <el-table-column
  794. align="center"
  795. prop="endTime"
  796. label="结束时间"
  797. width="120"
  798. >
  799. <template #default="{ row }">
  800. <span v-if="row.type == 4 || row.type == 100">{{
  801. row.endTime
  802. }}</span>
  803. </template>
  804. </el-table-column>
  805. <el-table-column
  806. align="center"
  807. prop="createTime"
  808. label="创建时间"
  809. width="120"
  810. >
  811. </el-table-column>
  812. <el-table-column align="center" label="操作" width="200">
  813. <template #default="scope">
  814. <div class="options">
  815. <div class="reset" @click="edit(scope.row)">修改</div>
  816. <el-popconfirm
  817. width="220"
  818. confirm-button-text="确认"
  819. cancel-button-text="取消"
  820. icon-color="#f89626"
  821. title="是否删除此账号?"
  822. @confirm="del(scope.row)"
  823. @cancel="cancelEvent"
  824. >
  825. <template #reference>
  826. <div class="reset">删除</div>
  827. </template>
  828. </el-popconfirm>
  829. </div>
  830. </template>
  831. </el-table-column>
  832. </el-table>
  833. </div>
  834. </el-collapse-item>
  835. </el-collapse>
  836. </div>
  837. <div class="title titles">
  838. <div class="keyTitle">
  839. <span class="txt">员工</span>
  840. <div class="dropdown">
  841. <el-dropdown trigger="click" :hide-on-click="false">
  842. <el-button type="primary"> 添加电子钥匙 </el-button>
  843. <template #dropdown>
  844. <el-dropdown-menu>
  845. <el-dropdown-item @click="passManagementClick('系统')"
  846. >密码</el-dropdown-item
  847. >
  848. <el-dropdown-item
  849. @click="identityCardClick('系统', '房卡')"
  850. >房卡</el-dropdown-item
  851. >
  852. <el-dropdown-item @click="fingerprintClick('系统')"
  853. >指纹</el-dropdown-item
  854. >
  855. <el-dropdown-item
  856. @click="identityCardClick('系统', '身份证')"
  857. >身份证</el-dropdown-item
  858. >
  859. </el-dropdown-menu>
  860. </template>
  861. </el-dropdown>
  862. </div>
  863. </div>
  864. <el-collapse v-model="activeSystem">
  865. <el-collapse-item name="2">
  866. <div class="table">
  867. <el-table
  868. :row-class-name="tableRowClassName"
  869. :data="systemUserList"
  870. @selection-change="handleSelectionChange"
  871. style="width: 100%; height: 200px"
  872. :header-cell-style="{
  873. background: 'rgba(240, 243, 247, 1)',
  874. height: '50px',
  875. border: 0,
  876. }"
  877. >
  878. <el-table-column align="center" prop="name" label="姓名">
  879. </el-table-column>
  880. <el-table-column
  881. align="center"
  882. prop="phone"
  883. label="手机号"
  884. width="130"
  885. />
  886. <el-table-column
  887. align="center"
  888. prop="roomlength"
  889. label="类型"
  890. >
  891. <template #default="{ row }">
  892. <span v-if="row.lockStatus == 1">密码</span>
  893. <span v-if="row.lockStatus == 2">房卡</span>
  894. <span v-if="row.lockStatus == 3">指纹</span>
  895. <span v-if="row.lockStatus == 4">身份证</span>
  896. </template>
  897. </el-table-column>
  898. <el-table-column
  899. align="center"
  900. prop="passWord"
  901. label="密码"
  902. width="110"
  903. >
  904. </el-table-column>
  905. <el-table-column
  906. align="center"
  907. prop="roomlength"
  908. label="时效"
  909. width="200"
  910. >
  911. <template #default="{ row }">
  912. <div>{{ row.startTime }}</div>
  913. <div>{{ row.endTime }}</div>
  914. </template>
  915. </el-table-column>
  916. <el-table-column
  917. align="center"
  918. prop="roomlength"
  919. label="状态"
  920. >
  921. <template #default="{ row }">
  922. <span v-if="row.type == 1">管理员用户</span>
  923. <span v-if="row.type == 2">普通用户(永久)</span>
  924. <span v-if="row.type == 4">时效性用户</span>
  925. <span v-if="row.type == 5">一次性时效密码用户</span>
  926. <span v-if="row.type == 100">时效性无网络密码用户</span>
  927. </template>
  928. </el-table-column>
  929. <el-table-column
  930. align="center"
  931. prop="createTime"
  932. label="创建时间"
  933. width="200"
  934. >
  935. </el-table-column>
  936. <el-table-column align="center" label="操作" width="200">
  937. <template #default="scope">
  938. <div class="options">
  939. <div
  940. class="reset"
  941. @click="fingerprintEdit(scope.row)"
  942. >
  943. 编辑
  944. </div>
  945. <el-popconfirm
  946. width="220"
  947. confirm-button-text="确认"
  948. cancel-button-text="取消"
  949. icon-color="#f89626"
  950. title="是否删除此用户?"
  951. @confirm="fingerprintDel(scope.row)"
  952. @cancel="cancelEvent"
  953. >
  954. <template #reference>
  955. <div class="reset">删除</div>
  956. </template>
  957. </el-popconfirm>
  958. </div>
  959. </template>
  960. </el-table-column>
  961. </el-table>
  962. </div>
  963. </el-collapse-item>
  964. </el-collapse>
  965. </div>
  966. <div class="title titles">
  967. <div class="keyTitle">
  968. <span class="txt">自定义用户</span>
  969. <div class="dropdown">
  970. <el-dropdown trigger="click" :hide-on-click="false">
  971. <el-button type="primary">
  972. 添加电子钥匙
  973. <!-- <el-icon class="el-icon--right"><arrow-down /></el-icon> -->
  974. </el-button>
  975. <template #dropdown>
  976. <el-dropdown-menu>
  977. <el-dropdown-item @click="passManagementClick('自定义')"
  978. >密码</el-dropdown-item
  979. >
  980. <el-dropdown-item
  981. @click="identityCardClick('自定义', '房卡')"
  982. >房卡</el-dropdown-item
  983. >
  984. <el-dropdown-item @click="fingerprintClick('自定义')"
  985. >指纹</el-dropdown-item
  986. >
  987. <el-dropdown-item
  988. @click="identityCardClick('自定义', '身份证')"
  989. >身份证</el-dropdown-item
  990. >
  991. </el-dropdown-menu>
  992. </template>
  993. </el-dropdown>
  994. </div>
  995. </div>
  996. <el-collapse v-model="activeCustom">
  997. <el-collapse-item name="3">
  998. <div class="table">
  999. <el-table
  1000. :row-class-name="tableRowClassName"
  1001. :data="customList"
  1002. @selection-change="handleSelectionChange"
  1003. style="width: 100%; height: 200px"
  1004. :header-cell-style="{
  1005. background: 'rgba(240, 243, 247, 1)',
  1006. height: '50px',
  1007. border: 0,
  1008. }"
  1009. >
  1010. <el-table-column align="center" prop="name" label="姓名">
  1011. </el-table-column>
  1012. <el-table-column
  1013. align="center"
  1014. prop="phone"
  1015. label="手机号"
  1016. width="130"
  1017. />
  1018. <el-table-column
  1019. align="center"
  1020. prop="roomlength"
  1021. label="类型"
  1022. >
  1023. <template #default="{ row }">
  1024. <span v-if="row.lockStatus == 1">密码</span>
  1025. <span v-if="row.lockStatus == 2">房卡</span>
  1026. <span v-if="row.lockStatus == 3">指纹</span>
  1027. <span v-if="row.lockStatus == 4">身份证</span>
  1028. </template>
  1029. </el-table-column>
  1030. <el-table-column
  1031. align="center"
  1032. prop="passWord"
  1033. label="密码"
  1034. width="110"
  1035. >
  1036. </el-table-column>
  1037. <el-table-column
  1038. align="center"
  1039. prop="roomlength"
  1040. label="时效"
  1041. width="200"
  1042. >
  1043. <template #default="{ row }">
  1044. <div>{{ row.startTime }}</div>
  1045. <div>{{ row.endTime }}</div>
  1046. </template>
  1047. </el-table-column>
  1048. <el-table-column
  1049. align="center"
  1050. prop="roomlength"
  1051. label="状态"
  1052. >
  1053. <template #default="{ row }">
  1054. <span v-if="row.type == 1">管理员用户</span>
  1055. <span v-if="row.type == 2">普通用户(永久)</span>
  1056. <span v-if="row.type == 4">时效性用户</span>
  1057. <span v-if="row.type == 5">一次性时效密码用户</span>
  1058. <span v-if="row.type == 100">时效性无网络密码用户</span>
  1059. </template>
  1060. </el-table-column>
  1061. <el-table-column
  1062. align="center"
  1063. prop="createTime"
  1064. label="创建时间"
  1065. width="200"
  1066. >
  1067. </el-table-column>
  1068. <el-table-column align="center" label="操作" width="200">
  1069. <template #default="scope">
  1070. <div class="options">
  1071. <div class="reset" @click="customFingerprintEdit(scope.row)">编辑</div>
  1072. <el-popconfirm
  1073. width="220"
  1074. confirm-button-text="确认"
  1075. cancel-button-text="取消"
  1076. icon-color="#f89626"
  1077. title="是否删除此用户?"
  1078. @confirm="customDel(scope.row)"
  1079. @cancel="cancelEvent"
  1080. >
  1081. <template #reference>
  1082. <div class="reset">删除</div>
  1083. </template>
  1084. </el-popconfirm>
  1085. </div>
  1086. </template>
  1087. </el-table-column>
  1088. </el-table>
  1089. </div>
  1090. </el-collapse-item>
  1091. </el-collapse>
  1092. </div>
  1093. </div>
  1094. </el-dialog>
  1095. <!-- 添加电子钥匙 密码管理 -->
  1096. <el-dialog
  1097. class="passManagementDialog"
  1098. v-model="passManagementVisible"
  1099. :close-on-click-modal="false"
  1100. :close-on-press-escape="false"
  1101. title="密码管理"
  1102. align-center
  1103. width="650"
  1104. :before-close="cancelPassManagement"
  1105. >
  1106. <el-tabs
  1107. v-model="passManagementIndex"
  1108. class="demo-tabs"
  1109. @tab-change="passManagementHandleClick"
  1110. >
  1111. <el-tab-pane label="时效密码" :name="1"> </el-tab-pane>
  1112. <!-- <el-tab-pane label="无网络密码" :name="2"> </el-tab-pane>
  1113. <el-tab-pane label="临时密码" :name="3"> </el-tab-pane> -->
  1114. </el-tabs>
  1115. <el-form
  1116. ref="passManagementRef"
  1117. :model="passManagementRuleForm"
  1118. :rules="passManagementRules"
  1119. label-width="100px"
  1120. class="demo-ruleForm"
  1121. :size="formSize"
  1122. label-position="left"
  1123. status-icon
  1124. >
  1125. <!-- <el-form-item
  1126. label="角色 :"
  1127. prop="level"
  1128. v-if="keypassflag == '系统'"
  1129. >
  1130. <el-cascader
  1131. @change="fingerprintChange"
  1132. v-model="passManagementRuleForm.level"
  1133. :options="fingerprintoptions"
  1134. :props="fingerprintprops"
  1135. :show-all-levels="false"
  1136. :clearable="false"
  1137. />
  1138. </el-form-item> -->
  1139. <el-form-item label="用户 :" prop="name">
  1140. <el-select
  1141. v-model="passManagementRuleForm.name"
  1142. class="m-2"
  1143. placeholder="请选择用户"
  1144. style="width: 500px"
  1145. :disabled="passManagementEditFlag==2"
  1146. @change="staffChange($event, '密码')"
  1147. v-if="keypassflag == '系统'"
  1148. >
  1149. <el-option
  1150. v-for="i in staffList"
  1151. :key="i"
  1152. :label="`${i.userName} ( ${i.department} )`"
  1153. :value="i.id"
  1154. />
  1155. </el-select>
  1156. <el-input
  1157. v-model.trim="passManagementRuleForm.name"
  1158. placeholder="请输入用户"
  1159. style="width: 500px"
  1160. :disabled="passManagementEditFlag==2"
  1161. v-if="keypassflag == '自定义'"
  1162. >
  1163. </el-input>
  1164. </el-form-item>
  1165. <el-form-item
  1166. label="号码 :"
  1167. prop="phone"
  1168. v-if="keypassflag == '自定义'"
  1169. >
  1170. <el-input
  1171. v-model.trim="passManagementRuleForm.phone"
  1172. placeholder="请输入号码"
  1173. :disabled="passManagementEditFlag==2"
  1174. style="width: 500px"
  1175. >
  1176. </el-input>
  1177. </el-form-item>
  1178. <el-form-item label="密码 :" prop="pass">
  1179. <el-input
  1180. v-model.trim="passManagementRuleForm.pass"
  1181. placeholder="请输入6或8位数密码或者点击随机生成"
  1182. style="width: 500px"
  1183. v-if="passManagementEditFlag==1"
  1184. >
  1185. <template #append>
  1186. <div @click="randomCipher">随机生成</div>
  1187. </template>
  1188. </el-input>
  1189. <el-input
  1190. v-if="passManagementEditFlag==2"
  1191. v-model.trim="passManagementRuleForm.pass"
  1192. placeholder="请输入6或8位数密码或者点击随机生成"
  1193. style="width: 500px"
  1194. :disabled="true"
  1195. >
  1196. </el-input>
  1197. </el-form-item>
  1198. <el-form-item label="生效时间 :" prop="effectiveTime">
  1199. <div class="block">
  1200. <el-date-picker
  1201. v-model="passManagementRuleForm.effectiveTime"
  1202. type="datetime"
  1203. placeholder="选择生效时间"
  1204. style="width: 500px"
  1205. format="YYYY-MM-DD HH:mm:ss"
  1206. value-format="YYYY-MM-DD HH:mm:ss"
  1207. />
  1208. </div>
  1209. </el-form-item>
  1210. <el-form-item label="失效时间 :" prop="failureTime">
  1211. <div class="block">
  1212. <el-date-picker
  1213. v-model="passManagementRuleForm.failureTime"
  1214. type="datetime"
  1215. placeholder="选择失效时间"
  1216. style="width: 500px"
  1217. format="YYYY-MM-DD HH:mm:ss"
  1218. value-format="YYYY-MM-DD HH:mm:ss"
  1219. />
  1220. </div>
  1221. </el-form-item>
  1222. <el-form-item class="options">
  1223. <el-button
  1224. color="rgba(41, 109, 227, 1)"
  1225. class="queding"
  1226. type="primary"
  1227. @click="passManagementSend(passManagementRef)"
  1228. >
  1229. 确定
  1230. </el-button>
  1231. <el-button @click="cancelPassManagement(passManagementRef)"
  1232. >取消</el-button
  1233. >
  1234. </el-form-item>
  1235. </el-form>
  1236. </el-dialog>
  1237. <!-- 下发管理员密码 -->
  1238. <el-dialog
  1239. class="passManagementDialog"
  1240. v-model="sendAdminPassVisible"
  1241. :close-on-click-modal="false"
  1242. :close-on-press-escape="false"
  1243. title="下发管理员密码"
  1244. align-center
  1245. width="450"
  1246. :before-close="cancelSendAdminPass"
  1247. >
  1248. <el-form
  1249. ref="sendAdminPassRef"
  1250. :model="sendAdminPassRuleForm"
  1251. :rules="sendAdminPassRules"
  1252. label-width="70px"
  1253. class="demo-ruleForm"
  1254. :size="formSize"
  1255. label-position="left"
  1256. status-icon
  1257. >
  1258. <el-form-item label="密码 :" prop="pass">
  1259. <el-input
  1260. v-model.trim="sendAdminPassRuleForm.pass"
  1261. placeholder="请输入6或8位数字密码"
  1262. style="width: 500px"
  1263. >
  1264. </el-input>
  1265. </el-form-item>
  1266. <el-form-item class="options">
  1267. <el-button
  1268. color="rgba(41, 109, 227, 1)"
  1269. class="queding"
  1270. type="primary"
  1271. @click="sendAdminPassConfig(sendAdminPassRef)"
  1272. >
  1273. 确定
  1274. </el-button>
  1275. <el-button @click="cancelSendAdminPass(sendAdminPassRef)"
  1276. >取消</el-button
  1277. >
  1278. </el-form-item>
  1279. </el-form>
  1280. </el-dialog>
  1281. <!-- 添加电子钥匙 添加指纹 -->
  1282. <el-dialog
  1283. class="fingerprintDialog"
  1284. v-model="fingerprintVisible"
  1285. :close-on-click-modal="false"
  1286. :close-on-press-escape="false"
  1287. title="添加指纹"
  1288. align-center
  1289. width="550"
  1290. :before-close="cancelFingerprint"
  1291. >
  1292. <el-form
  1293. ref="fingerprintRef"
  1294. :model="fingerprintRuleForm"
  1295. :rules="fingerprintRules"
  1296. label-width="100px"
  1297. class="demo-ruleForm"
  1298. :size="formSize"
  1299. label-position="left"
  1300. status-icon
  1301. >
  1302. <!-- <el-form-item
  1303. label="角色 :"
  1304. prop="level"
  1305. v-if="keypassflag == '系统'"
  1306. >
  1307. <el-cascader
  1308. @change="fingerprintChange"
  1309. v-model="fingerprintRuleForm.level"
  1310. :options="fingerprintoptions"
  1311. :props="fingerprintprops"
  1312. :show-all-levels="false"
  1313. :clearable="false"
  1314. />
  1315. </el-form-item> -->
  1316. <el-form-item label="用户 :" prop="name">
  1317. <el-select
  1318. v-model="fingerprintRuleForm.name"
  1319. class="m-2"
  1320. placeholder="请选择用户"
  1321. style="width: 214px"
  1322. :disabled="fingerprintEditFlag==2"
  1323. @change="staffChange($event, '指纹')"
  1324. v-if="keypassflag == '系统'"
  1325. >
  1326. <el-option
  1327. v-for="i in staffList"
  1328. :key="i"
  1329. :label="`${i.userName} ( ${i.department} )`"
  1330. :value="i.id"
  1331. />
  1332. </el-select>
  1333. <el-input
  1334. v-model.trim="fingerprintRuleForm.name"
  1335. placeholder="请输入用户"
  1336. style="width: 214px"
  1337. v-if="keypassflag == '自定义'"
  1338. :disabled="fingerprintEditFlag==2"
  1339. />
  1340. </el-form-item>
  1341. <el-form-item
  1342. label="号码 :"
  1343. prop="phone"
  1344. v-if="keypassflag == '自定义'"
  1345. >
  1346. <el-input
  1347. v-model.trim="fingerprintRuleForm.phone"
  1348. placeholder="请输入号码"
  1349. :disabled="fingerprintEditFlag==2"
  1350. style="width: 214px"
  1351. >
  1352. </el-input>
  1353. </el-form-item>
  1354. <el-form-item label="指纹 :" :prop="fingerprintEditFlag==2?'':'fingerprintNum'">
  1355. <el-input
  1356. v-model="fingerprintRuleForm.fingerprintNum"
  1357. placeholder="请录入指纹"
  1358. style="width: 300px"
  1359. type="textarea"
  1360. rows="4"
  1361. :disabled="fingerprintEditFlag==2"
  1362. />
  1363. <span
  1364. style="
  1365. color: rgba(0, 97, 255, 1);
  1366. margin-left: 10px;
  1367. cursor: pointer;
  1368. "
  1369. @click="fingerprintNext"
  1370. v-if="fingerprintEditFlag==1"
  1371. >录入</span
  1372. >
  1373. </el-form-item>
  1374. <el-form-item label="生效时间 :" prop="effectiveTime">
  1375. <div class="block">
  1376. <el-date-picker
  1377. v-model="fingerprintRuleForm.effectiveTime"
  1378. type="datetime"
  1379. placeholder="选择生效时间"
  1380. style="width: 214px"
  1381. format="YYYY-MM-DD HH:mm:ss"
  1382. value-format="YYYY-MM-DD HH:mm:ss"
  1383. />
  1384. </div>
  1385. </el-form-item>
  1386. <el-form-item label="失效时间 :" prop="failureTime">
  1387. <div class="block">
  1388. <el-date-picker
  1389. v-model="fingerprintRuleForm.failureTime"
  1390. type="datetime"
  1391. placeholder="选择失效时间"
  1392. style="width: 214px"
  1393. format="YYYY-MM-DD HH:mm:ss"
  1394. value-format="YYYY-MM-DD HH:mm:ss"
  1395. />
  1396. </div>
  1397. </el-form-item>
  1398. <el-form-item class="options">
  1399. <el-button
  1400. color="rgba(41, 109, 227, 1)"
  1401. class="queding"
  1402. type="primary"
  1403. @click="fingerprintconfig(fingerprintRef)"
  1404. >
  1405. 确定
  1406. </el-button>
  1407. </el-form-item>
  1408. </el-form>
  1409. </el-dialog>
  1410. <!-- 指纹读取弹窗 -->
  1411. <el-dialog
  1412. class="fingerprint"
  1413. v-model="addFingerprintVisible"
  1414. :close-on-click-modal="false"
  1415. :close-on-press-escape="false"
  1416. title="添加指纹"
  1417. align-center
  1418. width="550"
  1419. :before-close="cancelAddFingerprint"
  1420. >
  1421. <div class="el-footer">
  1422. <div style="height: 350px; margin: 30px auto">
  1423. <el-steps direction="vertical" :active="stepindex">
  1424. <el-step
  1425. v-for="i in step.list"
  1426. :key="i.id"
  1427. :title="`步骤 ${i.id}`"
  1428. :description="i.title"
  1429. ></el-step>
  1430. </el-steps>
  1431. </div>
  1432. </div>
  1433. </el-dialog>
  1434. <!-- 添加电子钥匙 添加身份证 -->
  1435. <el-dialog
  1436. class="identityCard"
  1437. v-model="identityCardVisible"
  1438. :close-on-click-modal="false"
  1439. :close-on-press-escape="false"
  1440. :title="addIdentityCardVisibleTitle"
  1441. align-center
  1442. width="550"
  1443. :before-close="cancelIdentityCard"
  1444. >
  1445. <el-form
  1446. ref="identityCardRef"
  1447. :model="identityCardRuleForm"
  1448. :rules="identityCardRules"
  1449. label-width="100px"
  1450. class="demo-ruleForm"
  1451. :size="formSize"
  1452. label-position="left"
  1453. status-icon
  1454. >
  1455. <!-- <el-form-item
  1456. label="角色 :"
  1457. prop="level"
  1458. v-if="keypassflag == '系统'"
  1459. >
  1460. <el-cascader
  1461. @change="fingerprintChange"
  1462. v-model="identityCardRuleForm.level"
  1463. :options="fingerprintoptions"
  1464. :props="fingerprintprops"
  1465. :show-all-levels="false"
  1466. :clearable="false"
  1467. />
  1468. </el-form-item> -->
  1469. <el-form-item
  1470. label="单元 :"
  1471. prop="buildingId"
  1472. v-if="keypassflag == '总卡'"
  1473. >
  1474. <el-select
  1475. v-model="identityCardRuleForm.buildingId"
  1476. placeholder="请选择楼栋单元"
  1477. style="width: 214px"
  1478. :clearable="true"
  1479. >
  1480. <el-option
  1481. v-for="item in buildData"
  1482. :key="item.id"
  1483. :label="`${item.building}-${item.element}`"
  1484. :value="item.id"
  1485. />
  1486. </el-select>
  1487. </el-form-item>
  1488. <el-form-item label="用户 :" prop="name">
  1489. <el-select
  1490. v-model="identityCardRuleForm.name"
  1491. class="m-2"
  1492. placeholder="再请选择用户"
  1493. style="width: 214px"
  1494. :disabled="identityCardEditFlag==2"
  1495. @change="staffChange($event, '房卡')"
  1496. v-if="keypassflag == '系统' || keypassflag == '总卡'"
  1497. >
  1498. <el-option
  1499. v-for="i in staffList"
  1500. :key="i"
  1501. :label="`${i.userName} ( ${i.department} )`"
  1502. :value="i.id"
  1503. />
  1504. </el-select>
  1505. <el-input
  1506. v-model.trim="identityCardRuleForm.name"
  1507. placeholder="请输入用户"
  1508. :disabled="identityCardEditFlag==2"
  1509. style="width: 214px"
  1510. v-if="keypassflag == '自定义'"
  1511. />
  1512. </el-form-item>
  1513. <el-form-item
  1514. label="号码 :"
  1515. prop="phone"
  1516. v-if="keypassflag == '自定义'"
  1517. >
  1518. <el-input
  1519. v-model.trim="identityCardRuleForm.phone"
  1520. placeholder="请输入号码"
  1521. :disabled="identityCardEditFlag==2"
  1522. style="width: 214px"
  1523. />
  1524. </el-form-item>
  1525. <!-- <el-form-item label="类型 :" prop="cardType">
  1526. <el-radio-group v-model="identityCardRuleForm.cardType">
  1527. <el-radio :value="1">密码</el-radio>
  1528. <el-radio :value="2">房卡</el-radio>
  1529. <el-radio :value="3">指纹</el-radio>
  1530. <el-radio :value="4">身份证</el-radio>
  1531. <el-radio :value="5">钥匙</el-radio>
  1532. </el-radio-group>
  1533. </el-form-item> -->
  1534. <el-form-item label="卡号 :" :prop="identityCardEditFlag==2?'':'icCard'">
  1535. <el-input
  1536. v-model.trim="identityCardRuleForm.icCard"
  1537. placeholder="请输入卡号"
  1538. :disabled="identityCardEditFlag==2"
  1539. style="width: 300px"
  1540. type="textarea"
  1541. rows="4"
  1542. >
  1543. </el-input>
  1544. <span
  1545. style="
  1546. color: rgba(0, 97, 255, 1);
  1547. margin-left: 10px;
  1548. cursor: pointer;
  1549. "
  1550. v-if="identityCardEditFlag==1"
  1551. @click="identityCardNext"
  1552. >读卡</span
  1553. >
  1554. </el-form-item>
  1555. <el-form-item label="生效时间 :" prop="effectiveTime">
  1556. <div class="block">
  1557. <el-date-picker
  1558. v-model="identityCardRuleForm.effectiveTime"
  1559. type="datetime"
  1560. placeholder="选择生效时间"
  1561. style="width: 200px"
  1562. format="YYYY-MM-DD HH:mm:ss"
  1563. value-format="YYYY-MM-DD HH:mm:ss"
  1564. />
  1565. </div>
  1566. </el-form-item>
  1567. <el-form-item label="失效时间 :" prop="failureTime">
  1568. <div class="block">
  1569. <el-date-picker
  1570. v-model="identityCardRuleForm.failureTime"
  1571. type="datetime"
  1572. placeholder="选择失效时间"
  1573. style="width: 200px"
  1574. format="YYYY-MM-DD HH:mm:ss"
  1575. value-format="YYYY-MM-DD HH:mm:ss"
  1576. />
  1577. </div>
  1578. </el-form-item>
  1579. <el-form-item class="options">
  1580. <el-button
  1581. color="rgba(41, 109, 227, 1)"
  1582. class="queding"
  1583. type="primary"
  1584. @click="identityCardConfig(identityCardRef)"
  1585. >
  1586. 确定
  1587. </el-button>
  1588. </el-form-item>
  1589. </el-form>
  1590. </el-dialog>
  1591. <!-- 身份证读卡弹窗 -->
  1592. <el-dialog
  1593. class="addIdentityCard"
  1594. v-model="addIdentityCardVisible"
  1595. :close-on-click-modal="false"
  1596. :close-on-press-escape="false"
  1597. title="添加身份证"
  1598. align-center
  1599. width="650"
  1600. :before-close="cancelAddIdentityCard"
  1601. >
  1602. <!-- <div class="el-footer">
  1603. {{ identityCardTitle }}
  1604. </div>
  1605. <div class="el-footer">卡号 :{{ identityCardNum }}</div> -->
  1606. <div class="steps">
  1607. <el-steps
  1608. :space="200"
  1609. :active="identityCardIndex"
  1610. finish-status="success"
  1611. >
  1612. <el-step title="环境准备" />
  1613. <el-step title="配置" />
  1614. <el-step title="完成" />
  1615. </el-steps>
  1616. </div>
  1617. <div
  1618. class="title"
  1619. v-if="identityCardIndex == 0 || identityCardIndex == 1"
  1620. style="color: #fc2307"
  1621. >
  1622. {{ identityCardTitle }}
  1623. </div>
  1624. <div class="title" v-else style="color: #68c23c">
  1625. {{ identityCardTitle }}
  1626. </div>
  1627. <div class="icons">
  1628. <img
  1629. v-if="identityCardIndex == 0 || identityCardIndex == 1"
  1630. src="@/assets/icons/error.png"
  1631. alt=""
  1632. />
  1633. <img
  1634. v-if="identityCardIndex == 2"
  1635. class="loading"
  1636. src="@/assets/icons/loading.png"
  1637. alt=""
  1638. />
  1639. <img
  1640. v-if="identityCardIndex == 3"
  1641. src="@/assets/icons/success.png"
  1642. alt=""
  1643. />
  1644. </div>
  1645. <div class="retry">可以尝试<span @click="retry">重试</span></div>
  1646. </el-dialog>
  1647. <!-- 总卡明细 -->
  1648. <el-dialog
  1649. class="detailDialog"
  1650. v-model="detailVisible"
  1651. :close-on-click-modal="false"
  1652. :close-on-press-escape="false"
  1653. title="总卡明细"
  1654. align-center
  1655. width="1200"
  1656. :before-close="cancelDetail"
  1657. >
  1658. <div class="middle" style="display: flex">
  1659. <div class="condition">
  1660. <span>用户</span>
  1661. <el-input
  1662. :clearable="true"
  1663. @clear="detailList"
  1664. v-model.trim="detailInput.keyWord"
  1665. class="w-50 m-2"
  1666. placeholder="请输入用户"
  1667. style="width: 230px; margin-left: 10px"
  1668. />
  1669. </div>
  1670. <div class="condition">
  1671. <span>楼栋单元</span>
  1672. <el-select
  1673. v-model="detailInput.buildingId"
  1674. placeholder="请选择楼栋单元"
  1675. style="width: 200px; margin-left: 10px"
  1676. @change="detailList"
  1677. :clearable="true"
  1678. >
  1679. <el-option
  1680. v-for="item in buildData"
  1681. :key="item.id"
  1682. :label="`${item.building}-${item.element}`"
  1683. :value="item.id"
  1684. />
  1685. </el-select>
  1686. </div>
  1687. <div class="condition">
  1688. <span>创建时间&nbsp;&nbsp;</span>
  1689. <el-date-picker
  1690. v-model="detailInput.createTime"
  1691. type="daterange"
  1692. unlink-panels
  1693. range-separator="-"
  1694. start-placeholder="起始时间"
  1695. end-placeholder="结束时间"
  1696. format="YYYY-MM-DD"
  1697. value-format="YYYY-MM-DD"
  1698. :prefix-icon="Calendar"
  1699. placeholder="请选择日期"
  1700. @change="detailList"
  1701. />
  1702. </div>
  1703. <el-button
  1704. type="primary"
  1705. color="rgba(0, 97, 255, 1)"
  1706. @click="detailList"
  1707. ><span>查询</span></el-button
  1708. >
  1709. </div>
  1710. <div class="footers" v-loading="detailLoading">
  1711. <el-table
  1712. :row-class-name="tableRowClassName"
  1713. :data="detailData.list"
  1714. @selection-change="handleSelectionChange"
  1715. style="width: 100%; height: 550px"
  1716. :header-cell-style="{
  1717. background: 'rgba(240, 243, 247, 1)',
  1718. height: '50px',
  1719. border: 0,
  1720. }"
  1721. >
  1722. <el-table-column align="center" prop="startTime" label="生效时间">
  1723. </el-table-column>
  1724. <el-table-column align="center" prop="endTime" label="失效时间" />
  1725. <el-table-column
  1726. align="center"
  1727. prop="employeeUsersName"
  1728. label="用户"
  1729. />
  1730. <el-table-column align="center" width="200" label="楼栋单元">
  1731. <template #default="{ row }">
  1732. <span>{{ row.building }}-{{ row.element }}</span>
  1733. </template>
  1734. </el-table-column>
  1735. <el-table-column
  1736. align="center"
  1737. prop="roomCardInformation"
  1738. label="卡号"
  1739. />
  1740. <el-table-column
  1741. align="center"
  1742. prop="createTime"
  1743. label="创建时间"
  1744. />
  1745. <el-table-column align="center" prop="unlockType" label="操作">
  1746. <template #default="{ row }">
  1747. <el-popconfirm
  1748. width="220"
  1749. confirm-button-text="确认"
  1750. cancel-button-text="取消"
  1751. icon-color="#f89626"
  1752. title="是否删除此卡?"
  1753. @confirm="detailDel(row)"
  1754. @cancel="cancelEvent"
  1755. >
  1756. <template #reference>
  1757. <span style="cursor: pointer; color: #0061ff">删除</span>
  1758. </template>
  1759. </el-popconfirm>
  1760. </template>
  1761. </el-table-column>
  1762. </el-table>
  1763. </div>
  1764. <div class="pageSize">
  1765. <span></span>
  1766. <el-pagination
  1767. background
  1768. :current-page="detailPage"
  1769. :page-size="detailSize"
  1770. layout="total, prev, pager, next, jumper, slot"
  1771. :total="detailTotal"
  1772. @update:current-page="detailHandleCurrentChange"
  1773. />
  1774. </div>
  1775. </el-dialog>
  1776. <!-- 总密码明细 -->
  1777. <el-dialog
  1778. class="detailDialog"
  1779. v-model="allPassDetailVisible"
  1780. :close-on-click-modal="false"
  1781. :close-on-press-escape="false"
  1782. title="总密码明细"
  1783. align-center
  1784. width="1200"
  1785. :before-close="cancelAllPassDetail"
  1786. >
  1787. <div class="middle" style="display: flex">
  1788. <div class="condition">
  1789. <span>用户</span>
  1790. <el-input
  1791. :clearable="true"
  1792. @clear="allPassDetailList"
  1793. v-model.trim="allPassDetailInput.employeeName"
  1794. class="w-50 m-2"
  1795. placeholder="请输入用户"
  1796. style="width: 230px; margin-left: 10px"
  1797. />
  1798. </div>
  1799. <div class="condition">
  1800. <span>楼栋单元</span>
  1801. <el-select
  1802. v-model="allPassDetailInput.buildingId"
  1803. placeholder="请选择楼栋单元"
  1804. style="width: 200px; margin-left: 10px"
  1805. @change="allPassDetailList"
  1806. :clearable="true"
  1807. >
  1808. <el-option
  1809. v-for="item in buildData"
  1810. :key="item.id"
  1811. :label="`${item.building}-${item.element}`"
  1812. :value="item.id"
  1813. />
  1814. </el-select>
  1815. </div>
  1816. <div class="condition">
  1817. <span>创建时间&nbsp;&nbsp;</span>
  1818. <el-date-picker
  1819. v-model="allPassDetailInput.createTime"
  1820. type="daterange"
  1821. unlink-panels
  1822. range-separator="-"
  1823. start-placeholder="起始时间"
  1824. end-placeholder="结束时间"
  1825. format="YYYY-MM-DD"
  1826. value-format="YYYY-MM-DD"
  1827. :prefix-icon="Calendar"
  1828. placeholder="请选择日期"
  1829. @change="allPassDetailList"
  1830. />
  1831. </div>
  1832. <el-button
  1833. type="primary"
  1834. color="rgba(0, 97, 255, 1)"
  1835. @click="allPassDetailList"
  1836. ><span>查询</span></el-button
  1837. >
  1838. </div>
  1839. <div class="footers" v-loading="allPassDetailLoading">
  1840. <el-table
  1841. :row-class-name="tableRowClassName"
  1842. :data="allPassDetailData.list"
  1843. style="width: 100%; height: 550px"
  1844. :header-cell-style="{
  1845. background: 'rgba(240, 243, 247, 1)',
  1846. height: '50px',
  1847. border: 0,
  1848. }"
  1849. >
  1850. <el-table-column align="center" prop="startTime" label="生效时间">
  1851. </el-table-column>
  1852. <el-table-column align="center" prop="endTime" label="失效时间" />
  1853. <el-table-column
  1854. align="center"
  1855. prop="employeeUsersName"
  1856. label="用户"
  1857. />
  1858. <el-table-column align="center" width="200" label="楼栋单元">
  1859. <template #default="{ row }">
  1860. <span>{{ row.building }}-{{ row.element }}</span>
  1861. </template>
  1862. </el-table-column>
  1863. <el-table-column
  1864. align="center"
  1865. prop="passWord"
  1866. label="密码"
  1867. />
  1868. <el-table-column
  1869. align="center"
  1870. prop="createTime"
  1871. label="创建时间"
  1872. />
  1873. <el-table-column align="center" prop="unlockType" label="操作">
  1874. <template #default="{ row }">
  1875. <el-popconfirm
  1876. width="220"
  1877. confirm-button-text="确认"
  1878. cancel-button-text="取消"
  1879. icon-color="#f89626"
  1880. title="是否删除此密码?"
  1881. @confirm="allPassDetailDel(row)"
  1882. @cancel="cancelEvent"
  1883. >
  1884. <template #reference>
  1885. <span style="cursor: pointer; color: #0061ff">删除</span>
  1886. </template>
  1887. </el-popconfirm>
  1888. </template>
  1889. </el-table-column>
  1890. </el-table>
  1891. </div>
  1892. <div class="pageSize">
  1893. <span></span>
  1894. <el-pagination
  1895. background
  1896. :current-page="allPassDetailPage"
  1897. :page-size="allPassDetailSize"
  1898. layout="total, prev, pager, next, jumper, slot"
  1899. :total="allPassDetailTotal"
  1900. @update:current-page="allPassDetailHandleCurrentChange"
  1901. />
  1902. </div>
  1903. </el-dialog>
  1904. </div>
  1905. </div>
  1906. </template>
  1907. <script setup>
  1908. import {
  1909. ref,
  1910. reactive,
  1911. nextTick,
  1912. watch,
  1913. onBeforeMount,
  1914. onUnmounted,
  1915. } from "vue";
  1916. import { useRouter } from "vue-router";
  1917. import { ElMessage, ElMessageBox, genFileId } from "element-plus";
  1918. import { Calendar } from "@element-plus/icons-vue";
  1919. import vidiconsApi from "@/api/vidicons.js";
  1920. import { dayjs, ElLoading } from "element-plus";
  1921. import lodash from "lodash";
  1922. import axios from "axios";
  1923. import { useStore } from "vuex";
  1924. const store = useStore();
  1925. const api = ref("");
  1926. const router = useRouter();
  1927. const flagBtn = ref(); // 按钮权限
  1928. const nowDay = ref(dayjs().format("YYYY-MM-DD HH:mm:ss"));
  1929. // 表格数据
  1930. const loading = ref(false);
  1931. const tableData = reactive({
  1932. list: [],
  1933. });
  1934. const searchInput = reactive({
  1935. keyWord: "",
  1936. buildingId: "",
  1937. houseType: "",
  1938. }); // 搜索按钮数据
  1939. const buildData = ref(); // 楼栋数据
  1940. const roomTypes = ref(); // 房间类型数据
  1941. const roomTypeIndex = ref("全部"); // 选中的房间类型
  1942. const roomList = reactive({
  1943. list: [],
  1944. });
  1945. const electricQuantity = ref(); // 每个房间的电量
  1946. const nfcFunction = ref(); // nfc标识
  1947. const houseLockId = ref(); // 门锁表id
  1948. // 总卡明细
  1949. const detailVisible = ref(false);
  1950. const detailInput = reactive({
  1951. keyWord: "",
  1952. buildingId: "",
  1953. createTime: "",
  1954. });
  1955. const detailLoading = ref(false);
  1956. const detailData = reactive({ list: [] });
  1957. const detailPage = ref(1);
  1958. const detailSize = ref(10);
  1959. const detailTotal = ref();
  1960. // 总卡明细 (--------------------------------------------------------)
  1961. const allPassDetailVisible = ref(false);
  1962. const allPassDetailInput = reactive({
  1963. employeeName: "",// 员工名称
  1964. buildingId: "",// 楼栋单元id
  1965. createTime: "",//
  1966. });
  1967. const allPassDetailLoading = ref(false);
  1968. const allPassDetailData = reactive({ list: [] });
  1969. const allPassDetailPage = ref(1);
  1970. const allPassDetailSize = ref(10);
  1971. const allPassDetailTotal = ref();
  1972. // 设置临时总卡 (头部按钮--------------------------------------------------------)
  1973. const temporaryCardVisible = ref(false);
  1974. const temporaryCardRef = ref();
  1975. const temporaryCardRuleForm = reactive({
  1976. level: 1,
  1977. name: "",
  1978. effectiveTime: "",
  1979. failureTime: "",
  1980. serialNumber: "",
  1981. id: "",
  1982. });
  1983. var checkFullName = (rule, value, callback) => {
  1984. if (!value) {
  1985. return callback(new Error("请输入姓名"));
  1986. }
  1987. var reg = /^[\u4e00-\u9fa5]{2,6}$/;
  1988. if (!reg.test(value)) {
  1989. callback(new Error("必须为2-6个汉字!"));
  1990. } else {
  1991. callback();
  1992. }
  1993. };
  1994. // 表单验证
  1995. const temporaryCardRules = reactive({
  1996. name: [
  1997. { required: true, message: "姓名不能为空", trigger: "blur" },
  1998. { validator: checkFullName, trigger: "blur" },
  1999. ],
  2000. level: [
  2001. {
  2002. required: true,
  2003. message: "角色不能为空",
  2004. trigger: "blur",
  2005. },
  2006. ],
  2007. effectiveTime: [
  2008. {
  2009. required: true,
  2010. message: "生效时间不能为空",
  2011. trigger: "blur",
  2012. },
  2013. ],
  2014. failureTime: [
  2015. {
  2016. required: true,
  2017. message: "失效时间不能为空",
  2018. trigger: "blur",
  2019. },
  2020. ],
  2021. serialNumber: [
  2022. {
  2023. required: true,
  2024. message: "至少选择一间房",
  2025. trigger: "blur",
  2026. },
  2027. ],
  2028. });
  2029. // 制作总密码(--------------------------------------------------------)
  2030. const allPassVisible = ref(false);
  2031. const allPassRef = ref();
  2032. const allPassRuleForm = reactive({
  2033. buildingId:"",// 楼栋单元
  2034. name: "",// 员工
  2035. effectiveTime: "",// 开始时间
  2036. failureTime: "",//结束时间
  2037. pass: "",
  2038. });
  2039. var allPassRule = (rule, value, callback) => {
  2040. var reg = /^\d{6}$|^\d{8}$/;
  2041. if (!reg.test(value)) {
  2042. callback(new Error("请输入6或8位数字密码!"));
  2043. } else {
  2044. callback();
  2045. }
  2046. };
  2047. // 表单验证
  2048. const allPassRules = reactive({
  2049. name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
  2050. buildingId: [{ required: true, message: "楼栋单元不能为空", trigger: "blur" }],
  2051. phone: [{ required: true, message: "号码不能为空", trigger: "blur" }],
  2052. level: [
  2053. {
  2054. required: true,
  2055. message: "角色不能为空",
  2056. trigger: "blur",
  2057. },
  2058. ],
  2059. effectiveTime: [
  2060. {
  2061. required: true,
  2062. message: "生效时间不能为空",
  2063. trigger: "blur",
  2064. },
  2065. ],
  2066. failureTime: [
  2067. {
  2068. required: true,
  2069. message: "失效时间不能为空",
  2070. trigger: "blur",
  2071. },
  2072. ],
  2073. pass: [
  2074. {
  2075. required: true,
  2076. message: "密码不能为空",
  2077. trigger: "blur",
  2078. },
  2079. { validator: allPassRule, trigger: "blur" },
  2080. ],
  2081. });
  2082. // 消息列表弹窗(----------------------------------------------------)
  2083. const newsVisible = ref(false);
  2084. const newsIndex = ref(1);
  2085. const newshouseNumberId = ref();
  2086. const newsPage = ref(1); // 当前页
  2087. const newsSize = ref(10);
  2088. const newsTotal = ref(20); // 当前总数
  2089. const newTableList = ref();
  2090. // 远程开锁(--------------------------------------------------------)
  2091. const unlockingVisible = ref(false);
  2092. const unlockingLoading = ref(false);
  2093. const unlockList = reactive({ luid: "", roomNumber: "", houseNumberId: "" });
  2094. // 绑定设备 (--------------------------------------------------------)
  2095. const bindingVisible = ref(false);
  2096. const bindingRef = ref();
  2097. const bindingList = reactive({ houseNumberId: "", luid: "" });
  2098. // 表单验证
  2099. const bindingrules = reactive({
  2100. luid: [{ required: true, message: "设备id不能为空", trigger: "blur" }],
  2101. });
  2102. // 解绑设备 (--------------------------------------------------------)
  2103. const deblockingVisible = ref(false);
  2104. const dellockList = reactive({ houseNumberId: "" });
  2105. // 批量导入 (--------------------------------------------------------)
  2106. const bulkImportVisible = ref(false);
  2107. const uploadFileShow = ref(false);
  2108. const bulkImportref = ref();
  2109. const bulkImportFile = ref();
  2110. // 重置管理员密码 (--------------------------------------------------------)
  2111. const resetPassVisible = ref(false);
  2112. const resetPassRef = ref();
  2113. const resetPassRuleForm = reactive({
  2114. password: "",
  2115. againPass: "",
  2116. id: "",
  2117. });
  2118. // 表单验证
  2119. const resetPassRules = reactive({
  2120. password: [
  2121. {
  2122. required: true,
  2123. message: "密码不能为空",
  2124. trigger: "blur",
  2125. },
  2126. {
  2127. min: 8,
  2128. max: 20,
  2129. pattern:
  2130. /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,20}$/,
  2131. message: "请输入8-20位正确密码(大小写字母·字符·数字)",
  2132. trigger: "blur",
  2133. },
  2134. ],
  2135. againPass: [
  2136. {
  2137. required: true,
  2138. message: "确认密码不能为空",
  2139. trigger: "blur",
  2140. },
  2141. {
  2142. min: 8,
  2143. max: 20,
  2144. pattern:
  2145. /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,20}$/,
  2146. message: "请输入8-20位正确密码(大小写字母·字符·数字)",
  2147. trigger: "blur",
  2148. },
  2149. ],
  2150. // desc: [{ required: true, message: "Please input activity form", trigger: "blur" }],
  2151. });
  2152. // 钥匙管理 (--------------------------------------------------------)
  2153. const keyVisible = ref(false);
  2154. const keyData = reactive({
  2155. houseNumberId: "",
  2156. equipmentType: "",
  2157. });
  2158. const activeUser = ref("1");
  2159. const activeSystem = ref("2");
  2160. const activeCustom = ref("3");
  2161. const keyTitle = ref();
  2162. const userList = ref(); // 用户
  2163. const systemUserList = ref(); // 系统用户
  2164. const customList = ref(); // 自定义用户
  2165. const keypassflag = ref(""); // 添加系统或者自定义用户
  2166. const cardFlag = ref(""); // 判断是添加房卡还是身份证
  2167. // 钥匙管理 密码管理(--------------------------------------------------------)
  2168. const passManagementVisible = ref(false);
  2169. const passManagementIndex = ref(1); // 默认选中 时效密码
  2170. const passManagementEditFlag=ref(1) // 判断是添加还是编辑 1.添加 2.编辑
  2171. const passManagementRef = ref();
  2172. const passManagementRuleForm = reactive({
  2173. // level: '',
  2174. name: "",
  2175. phone: "",
  2176. effectiveTime: "",// 开始时间
  2177. failureTime: "",//结束时间
  2178. pass: "",
  2179. id: "",
  2180. });
  2181. var passManagementRule = (rule, value, callback) => {
  2182. var reg = /^\d{6}$|^\d{8}$/;
  2183. if (!reg.test(value)) {
  2184. callback(new Error("请输入6或8位数字密码!"));
  2185. } else {
  2186. callback();
  2187. }
  2188. };
  2189. // 表单验证
  2190. const passManagementRules = reactive({
  2191. name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
  2192. phone: [{ required: true, message: "号码不能为空", trigger: "blur" }],
  2193. level: [
  2194. {
  2195. required: true,
  2196. message: "角色不能为空",
  2197. trigger: "blur",
  2198. },
  2199. ],
  2200. effectiveTime: [
  2201. {
  2202. required: true,
  2203. message: "生效时间不能为空",
  2204. trigger: "blur",
  2205. },
  2206. ],
  2207. failureTime: [
  2208. {
  2209. required: true,
  2210. message: "失效时间不能为空",
  2211. trigger: "blur",
  2212. },
  2213. ],
  2214. pass: [
  2215. {
  2216. required: true,
  2217. message: "密码不能为空",
  2218. trigger: "blur",
  2219. },
  2220. { validator: passManagementRule, trigger: "blur" },
  2221. ],
  2222. });
  2223. // 钥匙管理 下发管理员密码(--------------------------------------------------------)
  2224. const sendAdminPassVisible = ref(false);
  2225. const sendAdminPassRef = ref();
  2226. const sendAdminPassRuleForm = reactive({
  2227. pass: "",
  2228. });
  2229. var passRule = (rule, value, callback) => {
  2230. var reg = /^\d{6}$|^\d{8}$/;
  2231. if (!reg.test(value)) {
  2232. callback(new Error("请输入6或8位数字密码!"));
  2233. } else {
  2234. callback();
  2235. }
  2236. };
  2237. // 表单验证
  2238. const sendAdminPassRules = reactive({
  2239. pass: [
  2240. {
  2241. required: true,
  2242. message: "密码不能为空",
  2243. trigger: "blur",
  2244. },
  2245. { validator: passRule, trigger: "blur" },
  2246. ],
  2247. });
  2248. const staffList = ref(); // 选择的员工数据
  2249. // 钥匙管理 添加指纹(--------------------------------------------------------)
  2250. const fingerprintVisible = ref(false);
  2251. const fingerprintRef = ref();
  2252. const fingerprintEditFlag=ref(1)// 判断是1、添加还是2、编辑
  2253. const fingerprintprops = {
  2254. checkStrictly: true,
  2255. label: "name",
  2256. value: "id",
  2257. };
  2258. const fingerprintoptions = ref();
  2259. // const fingerprintChangeList = ref();
  2260. const fingerprintRuleForm = reactive({
  2261. level: "",
  2262. name: "",
  2263. phone: "",
  2264. fingerprintNum: "",
  2265. effectiveTime: "",
  2266. failureTime: "",
  2267. id: "",
  2268. });
  2269. var fingerprintName = (rule, value, callback) => {
  2270. if (!value) {
  2271. return callback(new Error("请输入姓名"));
  2272. }
  2273. var reg = /^[\u4e00-\u9fa5]{2,6}$/;
  2274. if (!reg.test(value)) {
  2275. callback(new Error("必须为2-6个汉字!"));
  2276. } else {
  2277. callback();
  2278. }
  2279. };
  2280. // 表单验证
  2281. const fingerprintRules = reactive({
  2282. name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
  2283. phone: [{ required: true, message: "号码不能为空", trigger: "blur" }],
  2284. level: [
  2285. {
  2286. required: true,
  2287. message: "角色不能为空",
  2288. trigger: "blur",
  2289. },
  2290. ],
  2291. fingerprintNum: [
  2292. {
  2293. required: true,
  2294. message: "指纹不能为空",
  2295. trigger: "blur",
  2296. },
  2297. ],
  2298. effectiveTime: [
  2299. {
  2300. required: true,
  2301. message: "生效时间不能为空",
  2302. trigger: "blur",
  2303. },
  2304. ],
  2305. failureTime: [
  2306. {
  2307. required: true,
  2308. message: "失效时间不能为空",
  2309. trigger: "blur",
  2310. },
  2311. ],
  2312. });
  2313. // 添加指纹弹窗
  2314. const addFingerprintVisible = ref(false);
  2315. const stepindex = ref(0); // 录取指纹步骤
  2316. const step = reactive({
  2317. list: [
  2318. { id: 1, title: "" },
  2319. { id: 2, title: "" },
  2320. { id: 3, title: "" },
  2321. { id: 4, title: "" },
  2322. ],
  2323. }); // 指纹步骤数据
  2324. const ws = ref("");
  2325. // 钥匙管理 添加身份证(--------------------------------------------------------)
  2326. const addIdentityCardVisibleTitle = ref("添加身份证");
  2327. const identityCardVisible = ref(false);
  2328. const identityCardEditFlag=ref(1) // 判断是添加还是编辑 1.添加 2.编辑
  2329. const identityCardRef = ref();
  2330. const identityCardRuleForm = reactive({
  2331. level: "",
  2332. buildingId: "", // 总卡中的楼栋单元
  2333. name: "",
  2334. phone: "",
  2335. icCard: "",
  2336. cardType: "",
  2337. effectiveTime: "",
  2338. failureTime: "",
  2339. id: "",
  2340. });
  2341. // 表单验证
  2342. const identityCardRules = reactive({
  2343. name: [{ required: true, message: "用户不能为空", trigger: "blur" }],
  2344. phone: [{ required: true, message: "号码不能为空", trigger: "blur" }],
  2345. buildingId: [
  2346. { required: true, message: "楼栋单元不能为空", trigger: "blur" },
  2347. ],
  2348. level: [
  2349. {
  2350. required: true,
  2351. message: "角色不能为空",
  2352. trigger: "blur",
  2353. },
  2354. ],
  2355. cardType: [
  2356. {
  2357. required: true,
  2358. message: "类型不能为空",
  2359. trigger: "blur",
  2360. },
  2361. ],
  2362. icCard: [
  2363. {
  2364. required: true,
  2365. message: "卡号不能为空",
  2366. trigger: "blur",
  2367. },
  2368. ],
  2369. effectiveTime: [
  2370. {
  2371. required: true,
  2372. message: "生效时间不能为空",
  2373. trigger: "blur",
  2374. },
  2375. ],
  2376. failureTime: [
  2377. {
  2378. required: true,
  2379. message: "失效时间不能为空",
  2380. trigger: "blur",
  2381. },
  2382. ],
  2383. });
  2384. // 添加身份证弹窗
  2385. const addIdentityCardVisible = ref(false);
  2386. // const wsidentityCard = ref("");
  2387. const identityCardTitle = ref("");
  2388. // const identityCardNum = ref(""); // 身份证卡号
  2389. const identityCardIndex = ref(0); // 读卡步骤
  2390. // 点击房间查看面板操作 (--------------------------------------------------)
  2391. const itemClick = async (i) => {
  2392. roomList.list.forEach((item) => {
  2393. item.vos.forEach((ii) => {
  2394. ii.visible = false;
  2395. });
  2396. });
  2397. i.visible = true;
  2398. let data = {
  2399. houseNumberId: i.houseNumberId,
  2400. permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  2401. };
  2402. let res = await axios({
  2403. method: "get",
  2404. url: api.value + "/house-lock/particular",
  2405. headers: {
  2406. token: sessionStorage.getItem("token"),
  2407. user_head: sessionStorage.getItem("userhead"),
  2408. },
  2409. params: data,
  2410. });
  2411. console.log(res, "门锁详情");
  2412. if (res.data.code == 200) {
  2413. electricQuantity.value = res.data.data.electricQuantity;
  2414. nfcFunction.value = res.data.data.nfcFunction;
  2415. houseLockId.value = res.data.data.id;
  2416. // i.visible = true;
  2417. } else {
  2418. // i.visible = false;
  2419. electricQuantity.value = "";
  2420. ElMessage({
  2421. type: "error",
  2422. showClose: true,
  2423. message: res.data.message,
  2424. center: true,
  2425. });
  2426. }
  2427. };
  2428. // 关闭操作面板
  2429. const closeRoom = (i) => {
  2430. i.visible = false;
  2431. };
  2432. // 房型列表展示条
  2433. const roomNameTypeData = async () => {
  2434. let res = await axios({
  2435. method: "get",
  2436. url: api.value + "/house/roomNameType",
  2437. headers: {
  2438. token: sessionStorage.getItem("token"),
  2439. user_head: sessionStorage.getItem("user_head"),
  2440. },
  2441. });
  2442. console.log(res, "房型管理");
  2443. if (res.data.code == 200) {
  2444. roomTypes.value = res.data.data;
  2445. // roomTypeIndex.value=roomTypes.value[0]
  2446. loading.value = false;
  2447. // ElMessage({
  2448. // type: "success",
  2449. // showClose: true,
  2450. // message: res.data.message,
  2451. // center: true,
  2452. // });
  2453. } else {
  2454. loading.value = false;
  2455. ElMessage({
  2456. type: "error",
  2457. showClose: true,
  2458. message: res.data.message,
  2459. center: true,
  2460. });
  2461. }
  2462. };
  2463. const changeTypes = (val) => {
  2464. console.log(val);
  2465. roomTypeIndex.value = val;
  2466. getList().then(() => {
  2467. roomList.list.forEach((item) => {
  2468. item.vos.forEach((ii) => {
  2469. ii.visible = false;
  2470. });
  2471. });
  2472. });
  2473. };
  2474. // 楼栋单元数据
  2475. const schoolData = async () => {
  2476. let res = await axios({
  2477. method: "get",
  2478. url: api.value + "/building/beDisplayBar",
  2479. headers: {
  2480. token: sessionStorage.getItem("token"),
  2481. user_head: sessionStorage.getItem("user_head"),
  2482. },
  2483. });
  2484. console.log(res, "楼栋单元下拉框");
  2485. if (res.data.code == 200) {
  2486. buildData.value = res.data.data;
  2487. } else {
  2488. ElMessage({
  2489. type: "error",
  2490. showClose: true,
  2491. message: res.data.message,
  2492. center: true,
  2493. });
  2494. }
  2495. };
  2496. // 查看员工列表
  2497. const getList = async () => {
  2498. loading.value = true;
  2499. let data = {
  2500. roomNumber: searchInput.keyWord,
  2501. permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  2502. roomName: roomTypeIndex.value,
  2503. buildingId: searchInput.buildingId,
  2504. houseType: searchInput.houseType,
  2505. };
  2506. if (roomTypeIndex.value == "全部") {
  2507. data.roomName = "";
  2508. }
  2509. let res = await axios({
  2510. method: "get",
  2511. url: api.value + "/house-lock/list",
  2512. headers: {
  2513. token: sessionStorage.getItem("token"),
  2514. user_head: sessionStorage.getItem("userhead"),
  2515. },
  2516. params: data,
  2517. });
  2518. console.log(res, "门锁页面展示");
  2519. if (res.data.code == 200) {
  2520. loading.value = false;
  2521. let arr = [];
  2522. res.data.data.forEach((item) => {
  2523. if (item.vos) {
  2524. item.total = item.vos.length;
  2525. arr.push(item);
  2526. }
  2527. });
  2528. roomList.list = arr;
  2529. } else {
  2530. loading.value = false;
  2531. ElMessage({
  2532. type: "error",
  2533. showClose: true,
  2534. message: res.data.message,
  2535. center: true,
  2536. });
  2537. }
  2538. };
  2539. // 搜索功能
  2540. const searchBtn = lodash.debounce(async () => {
  2541. getList();
  2542. }, 300);
  2543. // 制作总密码
  2544. const allPassClick=()=>{
  2545. staffData();// 用户数据
  2546. allPassVisible.value=true
  2547. allPassRuleForm.name=""
  2548. allPassRuleForm.pass=""
  2549. allPassRuleForm.effectiveTime=""
  2550. allPassRuleForm.failureTime=""
  2551. }
  2552. const randomCipherAllPass=async ()=>{
  2553. let res = await axios({
  2554. method: "get",
  2555. url: api.value + "/unlocking-admin/getPassWord",
  2556. headers: {
  2557. token: sessionStorage.getItem("token"),
  2558. user_head: sessionStorage.getItem("userhead"),
  2559. },
  2560. });
  2561. console.log(res, "随机密码");
  2562. if (res.data.code == 200) {
  2563. allPassRuleForm.pass = res.data.data.passWord;
  2564. } else {
  2565. ElMessage({
  2566. type: "error",
  2567. showClose: true,
  2568. message: res.data.message,
  2569. center: true,
  2570. });
  2571. }
  2572. }
  2573. const cancelAllPass=()=>{
  2574. allPassVisible.value=false
  2575. allPassRef.value.resetFields()
  2576. }
  2577. // 确定总密码设备
  2578. const allPassConfig = async (formEl) => {
  2579. if (!formEl) return;
  2580. await formEl.validate(async (valid, fields) => {
  2581. if (valid) {
  2582. const loading = ElLoading.service({
  2583. lock: true,
  2584. text: "加载中...",
  2585. background: "rgba(255, 255, 255, 0.7)",
  2586. });
  2587. let data = {
  2588. adminId: sessionStorage.getItem("id"), //管理员id
  2589. employeeUsersId: allPassRuleForm.name, //房间号id
  2590. buildingId: allPassRuleForm.buildingId,
  2591. passWord: allPassRuleForm.pass, //房间号id
  2592. startTime:allPassRuleForm.effectiveTime,
  2593. endTime:allPassRuleForm.failureTime,
  2594. };
  2595. let res = await axios({
  2596. method: "post",
  2597. url: api.value + "/total-pass-word/saveEmployeeTotalPassWord",
  2598. headers: {
  2599. token: sessionStorage.getItem("token"),
  2600. user_head: sessionStorage.getItem("user_head"),
  2601. },
  2602. data: data,
  2603. });
  2604. console.log(res, "确定总密码设备");
  2605. if (res.data.code == 200) {
  2606. // getList();
  2607. allPassVisible.value=false
  2608. loading.close();
  2609. ElMessage({
  2610. type: "success",
  2611. showClose: true,
  2612. message: res.data.message,
  2613. center: true,
  2614. });
  2615. bindingVisible.value = false;
  2616. bindingRef.value.resetFields();
  2617. } else {
  2618. loading.close();
  2619. ElMessage({
  2620. type: "error",
  2621. showClose: true,
  2622. message: res.data.message,
  2623. center: true,
  2624. });
  2625. }
  2626. } else {
  2627. console.log("error submit!", fields);
  2628. }
  2629. });
  2630. };
  2631. // 消息列表 (---------------------------------------------------------------)
  2632. const newsClick = async (row) => {
  2633. newsVisible.value = true;
  2634. console.log(row, "消息列表");
  2635. newshouseNumberId.value = row.houseNumberId;
  2636. if (newsIndex.value == 1) {
  2637. let data = {
  2638. houseNumberId: newshouseNumberId.value,
  2639. permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  2640. page: newsPage.value,
  2641. size: newsSize.value,
  2642. };
  2643. let res = await axios({
  2644. method: "get",
  2645. url: api.value + "/unlocking-record/pageList",
  2646. headers: {
  2647. token: sessionStorage.getItem("token"),
  2648. user_head: sessionStorage.getItem("userhead"),
  2649. },
  2650. params: data,
  2651. });
  2652. console.log(res, "开锁记录");
  2653. if (res.data.code == 200) {
  2654. newTableList.value = res.data.data.records;
  2655. newsTotal.value = res.data.data.total;
  2656. } else {
  2657. ElMessage({
  2658. type: "error",
  2659. showClose: true,
  2660. message: res.data.message,
  2661. center: true,
  2662. });
  2663. }
  2664. } else if (newsIndex.value == 2) {
  2665. let data = {
  2666. houseNumberId: newshouseNumberId.value,
  2667. permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  2668. page: newsPage.value,
  2669. size: newsSize.value,
  2670. };
  2671. let res = await axios({
  2672. method: "get",
  2673. url: api.value + "/operating-record/pageList",
  2674. headers: {
  2675. token: sessionStorage.getItem("token"),
  2676. user_head: sessionStorage.getItem("userhead"),
  2677. },
  2678. params: data,
  2679. });
  2680. console.log(res, "操作记录");
  2681. if (res.data.code == 200) {
  2682. newTableList.value = res.data.data.records;
  2683. newsTotal.value = res.data.data.total;
  2684. } else {
  2685. ElMessage({
  2686. type: "error",
  2687. showClose: true,
  2688. message: res.data.message,
  2689. center: true,
  2690. });
  2691. }
  2692. }
  2693. };
  2694. // 切换消息列表
  2695. const changeNews = async (ind) => {
  2696. newsIndex.value = ind;
  2697. if (ind == 1) {
  2698. let data = {
  2699. houseNumberId: newshouseNumberId.value,
  2700. permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  2701. page: newsPage.value,
  2702. size: newsSize.value,
  2703. };
  2704. let res = await axios({
  2705. method: "get",
  2706. url: api.value + "/unlocking-record/pageList",
  2707. headers: {
  2708. token: sessionStorage.getItem("token"),
  2709. user_head: sessionStorage.getItem("userhead"),
  2710. },
  2711. params: data,
  2712. });
  2713. console.log(res, "开锁记录");
  2714. if (res.data.code == 200) {
  2715. newTableList.value = res.data.data.records;
  2716. newsTotal.value = res.data.data.total;
  2717. } else {
  2718. ElMessage({
  2719. type: "error",
  2720. showClose: true,
  2721. message: res.data.message,
  2722. center: true,
  2723. });
  2724. }
  2725. } else if (ind == 2) {
  2726. let data = {
  2727. houseNumberId: newshouseNumberId.value,
  2728. permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  2729. page: newsPage.value,
  2730. size: newsSize.value,
  2731. };
  2732. let res = await axios({
  2733. method: "get",
  2734. url: api.value + "/operating-record/pageList",
  2735. headers: {
  2736. token: sessionStorage.getItem("token"),
  2737. user_head: sessionStorage.getItem("userhead"),
  2738. },
  2739. params: data,
  2740. });
  2741. console.log(res, "开锁记录");
  2742. if (res.data.code == 200) {
  2743. newTableList.value = res.data.data.records;
  2744. newsTotal.value = res.data.data.total;
  2745. } else {
  2746. ElMessage({
  2747. type: "error",
  2748. showClose: true,
  2749. message: res.data.message,
  2750. center: true,
  2751. });
  2752. }
  2753. }
  2754. };
  2755. // 关闭弹窗列表
  2756. const cancelNews = () => {
  2757. newsVisible.value = false;
  2758. };
  2759. // 消息列表分页
  2760. const newsHandleCurrentChange = (value) => {
  2761. // console.log(value);
  2762. newsPage.value = value;
  2763. changeNews(newsIndex.value);
  2764. };
  2765. // 远程开锁(-----------------------------------------------------------------)
  2766. const unlockingClick = (row) => {
  2767. console.log(row, "远程开锁");
  2768. unlockingVisible.value = true;
  2769. unlockList.luid = row.equipmentType;
  2770. unlockList.roomNumber = row.roomNumber;
  2771. unlockList.houseNumberId = row.houseNumberId;
  2772. };
  2773. // 确定远程开锁
  2774. const unlockingSubmit = async () => {
  2775. unlockingLoading.value=true
  2776. let data = {
  2777. luid: unlockList.luid,
  2778. roomNumber: unlockList.roomNumber,
  2779. houseNumberId: unlockList.houseNumberId,
  2780. permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  2781. };
  2782. let res = await axios({
  2783. method: "post",
  2784. url: api.value + "/house-lock/remoteUnlocking",
  2785. headers: {
  2786. token: sessionStorage.getItem("token"),
  2787. user_head: sessionStorage.getItem("userhead"),
  2788. },
  2789. data: data,
  2790. });
  2791. console.log(res, "确定远程开锁");
  2792. if (res.data.code == 200) {
  2793. unlockingVisible.value = false;
  2794. getList();
  2795. unlockingLoading.value=false
  2796. ElMessage({
  2797. type: "success",
  2798. showClose: true,
  2799. message: res.data.message,
  2800. center: true,
  2801. });
  2802. } else {
  2803. unlockingLoading.value=false
  2804. ElMessage({
  2805. type: "error",
  2806. showClose: true,
  2807. message: res.data.message,
  2808. center: true,
  2809. });
  2810. }
  2811. };
  2812. const cancelUnlocking = () => {
  2813. unlockingVisible.value = false;
  2814. };
  2815. // 绑定设备(-----------------------------------------------------------------)
  2816. const bindingClick = (row) => {
  2817. console.log(row, "绑定设备");
  2818. bindingVisible.value = true;
  2819. bindingList.houseNumberId = row.houseNumberId;
  2820. };
  2821. // 确定绑定设备
  2822. const bindingSubmit = async (formEl) => {
  2823. if (!formEl) return;
  2824. await formEl.validate(async (valid, fields) => {
  2825. if (valid) {
  2826. let data = {
  2827. permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  2828. houseNumberId: bindingList.houseNumberId, //房间号id
  2829. adminId: sessionStorage.getItem("id"), //管理员id
  2830. luid: bindingList.luid, //锁设备ID
  2831. };
  2832. let res = await axios({
  2833. method: "post",
  2834. url: api.value + "/house-lock/binding",
  2835. headers: {
  2836. token: sessionStorage.getItem("token"),
  2837. user_head: sessionStorage.getItem("user_head"),
  2838. },
  2839. data: data,
  2840. });
  2841. console.log(res, "确定绑定设备");
  2842. if (res.data.code == 200) {
  2843. getList();
  2844. ElMessage({
  2845. type: "success",
  2846. showClose: true,
  2847. message: res.data.message,
  2848. center: true,
  2849. });
  2850. bindingVisible.value = false;
  2851. bindingRef.value.resetFields();
  2852. } else {
  2853. ElMessage({
  2854. type: "error",
  2855. showClose: true,
  2856. message: res.data.message,
  2857. center: true,
  2858. });
  2859. }
  2860. } else {
  2861. console.log("error submit!", fields);
  2862. }
  2863. });
  2864. };
  2865. // 取消绑定设备
  2866. const cancelBinding = () => {
  2867. bindingVisible.value = false;
  2868. bindingRef.value.resetFields();
  2869. };
  2870. // nfc操作
  2871. const nfcClick = async (row, flag) => {
  2872. console.log(row, "nfc操作");
  2873. let data = {
  2874. houseLockId: houseLockId.value,
  2875. nfcFunction: flag,
  2876. };
  2877. let res = await axios({
  2878. method: "get",
  2879. url: api.value + "/house-lock/nfc",
  2880. headers: {
  2881. token: sessionStorage.getItem("token"),
  2882. user_head: sessionStorage.getItem("userhead"),
  2883. },
  2884. params: data,
  2885. });
  2886. console.log(res, "nfc操作");
  2887. if (res.data.code == 200) {
  2888. getList();
  2889. roomList.list.forEach((item) => {
  2890. item.vos.forEach((ii) => {
  2891. ii.visible = false;
  2892. });
  2893. });
  2894. ElMessage({
  2895. type: "success",
  2896. showClose: true,
  2897. message: res.data.message,
  2898. center: true,
  2899. });
  2900. } else {
  2901. ElMessage({
  2902. type: "error",
  2903. showClose: true,
  2904. message: res.data.message,
  2905. center: true,
  2906. });
  2907. }
  2908. };
  2909. const cancelEvent=()=>{}
  2910. // 解绑设备(-----------------------------------------------------------------)
  2911. const deblockingClick = (row) => {
  2912. console.log(row, "解绑设备");
  2913. deblockingVisible.value = true;
  2914. dellockList.houseNumberId = row.houseNumberId;
  2915. };
  2916. // 确定解绑设备
  2917. const deblockSubmit = async () => {
  2918. let data = {
  2919. houseNumberId: dellockList.houseNumberId,
  2920. permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  2921. adminId: sessionStorage.getItem("id"),
  2922. };
  2923. let res = await axios({
  2924. method: "get",
  2925. url: api.value + "/house-lock/unbind",
  2926. headers: {
  2927. token: sessionStorage.getItem("token"),
  2928. user_head: sessionStorage.getItem("userhead"),
  2929. },
  2930. params: data,
  2931. });
  2932. console.log(res, "确定解绑设备");
  2933. if (res.data.code == 200) {
  2934. deblockingVisible.value = false;
  2935. getList();
  2936. ElMessage({
  2937. type: "success",
  2938. showClose: true,
  2939. message: res.data.message,
  2940. center: true,
  2941. });
  2942. } else {
  2943. ElMessage({
  2944. type: "error",
  2945. showClose: true,
  2946. message: res.data.message,
  2947. center: true,
  2948. });
  2949. }
  2950. };
  2951. // 取消绑定
  2952. const cancelDeblocking = () => {
  2953. deblockingVisible.value = false;
  2954. };
  2955. // 下发管理员密码
  2956. const sendAdminPass=async (i)=>{
  2957. sendAdminPassVisible.value=true
  2958. }
  2959. const cancelSendAdminPass=()=>{
  2960. sendAdminPassVisible.value=false
  2961. sendAdminPassRef.value.resetFields()
  2962. }
  2963. const sendAdminPassConfig=async (formEl)=>{
  2964. if (!formEl) return;
  2965. await formEl.validate(async (valid, fields) => {
  2966. if (valid) {
  2967. let data = {
  2968. houseLockId: houseLockId.value,
  2969. passWord: sendAdminPassRuleForm.pass, //房间号id
  2970. };
  2971. let res = await axios({
  2972. method: "post",
  2973. url: api.value + "/house-lock/saveAdministratorPassword",
  2974. headers: {
  2975. token: sessionStorage.getItem("token"),
  2976. user_head: sessionStorage.getItem("user_head"),
  2977. },
  2978. data: data,
  2979. });
  2980. console.log(res, "确定下发管理员密码");
  2981. if (res.data.code == 200) {
  2982. // getList();
  2983. ElMessage({
  2984. type: "success",
  2985. showClose: true,
  2986. message: res.data.message,
  2987. center: true,
  2988. });
  2989. sendAdminPassVisible.value = false;
  2990. sendAdminPassRef.value.resetFields();
  2991. } else {
  2992. ElMessage({
  2993. type: "error",
  2994. showClose: true,
  2995. message: res.data.message,
  2996. center: true,
  2997. });
  2998. }
  2999. } else {
  3000. console.log("error submit!", fields);
  3001. }
  3002. });
  3003. }
  3004. // 总卡明细 (=========================================================)
  3005. const detailChange = () => {
  3006. detailVisible.value = true;
  3007. detailList();
  3008. };
  3009. // 总卡明细数据
  3010. const detailList = async () => {
  3011. detailLoading.value = true;
  3012. let data = {
  3013. page: detailPage.value,
  3014. size: detailSize.value,
  3015. employeeName: detailInput.keyWord, // 房型名称
  3016. buildingId: detailInput.buildingId,
  3017. };
  3018. if (detailInput.createTime) {
  3019. data.startTime = detailInput.createTime[0];
  3020. data.endTime = detailInput.createTime[1];
  3021. }
  3022. let res = await axios({
  3023. method: "get",
  3024. url: api.value + "/total-card/listEmployeeTotalCard",
  3025. headers: {
  3026. token: sessionStorage.getItem("token"),
  3027. user_head: sessionStorage.getItem("user_head"),
  3028. },
  3029. params: data,
  3030. });
  3031. console.log(res, "总卡明细");
  3032. if (res.data.code == 200) {
  3033. detailLoading.value = false;
  3034. detailData.list = res.data.data.list;
  3035. detailTotal.value = res.data.data.totalCount;
  3036. } else {
  3037. detailLoading.value = false;
  3038. ElMessage({
  3039. type: "error",
  3040. showClose: true,
  3041. message: res.data.message,
  3042. center: true,
  3043. });
  3044. }
  3045. };
  3046. // 总卡明细分页
  3047. const detailHandleCurrentChange = (val) => {
  3048. detailPage.value = val;
  3049. detailList();
  3050. };
  3051. // 总卡明细删除
  3052. const detailDel = async (row) => {
  3053. const loading = ElLoading.service({
  3054. lock: true,
  3055. text: "加载中...",
  3056. background: "rgba(255, 255, 255, 0.7)",
  3057. });
  3058. let data = {
  3059. id: row.id,
  3060. };
  3061. let res = await axios({
  3062. method: "get",
  3063. url: api.value + "/total-card/deleteEmployeeTotalCard",
  3064. headers: {
  3065. token: sessionStorage.getItem("token"),
  3066. user_head: sessionStorage.getItem("user_head"),
  3067. },
  3068. params: data,
  3069. });
  3070. console.log(res, "总卡明细删除");
  3071. if (res.data.code == 200) {
  3072. loading.close();
  3073. detailList();
  3074. ElMessage({
  3075. type: "success",
  3076. showClose: true,
  3077. message: res.data.message,
  3078. center: true,
  3079. });
  3080. } else {
  3081. loading.close();
  3082. ElMessage({
  3083. type: "error",
  3084. showClose: true,
  3085. message: res.data.message,
  3086. center: true,
  3087. });
  3088. }
  3089. };
  3090. const cancelDetail = () => {
  3091. detailVisible.value = false;
  3092. };
  3093. // 总密码明细 (=========================================================)
  3094. const allPassDetailChange = () => {
  3095. allPassDetailVisible.value = true;
  3096. allPassDetailList();
  3097. };
  3098. // 总密码明细数据
  3099. const allPassDetailList = async () => {
  3100. allPassDetailLoading.value = true;
  3101. let data = {
  3102. page: allPassDetailPage.value,
  3103. size: allPassDetailSize.value,
  3104. employeeName: allPassDetailInput.employeeName, // 房型名称
  3105. buildingId:allPassDetailInput.buildingId
  3106. };
  3107. if (allPassDetailInput.createTime) {
  3108. data.startTime = allPassDetailInput.createTime[0];
  3109. data.endTime = allPassDetailInput.createTime[1];
  3110. }
  3111. let res = await axios({
  3112. method: "get",
  3113. url: api.value + "/total-pass-word/listEmployeeTotalPassWord",
  3114. headers: {
  3115. token: sessionStorage.getItem("token"),
  3116. user_head: sessionStorage.getItem("user_head"),
  3117. },
  3118. params: data,
  3119. });
  3120. console.log(res, "总密码明细");
  3121. if (res.data.code == 200) {
  3122. allPassDetailLoading.value = false;
  3123. allPassDetailData.list = res.data.data.list;
  3124. allPassDetailTotal.value = res.data.data.totalCount;
  3125. } else {
  3126. allPassDetailLoading.value = false;
  3127. ElMessage({
  3128. type: "error",
  3129. showClose: true,
  3130. message: res.data.message,
  3131. center: true,
  3132. });
  3133. }
  3134. };
  3135. // 总密码明细分页
  3136. const allPassDetailHandleCurrentChange = (val) => {
  3137. allPassDetailPage.value = val;
  3138. allPassDetailList();
  3139. };
  3140. // 总密码明细删除
  3141. const allPassDetailDel = async (row) => {
  3142. const loading = ElLoading.service({
  3143. lock: true,
  3144. text: "加载中...",
  3145. background: "rgba(255, 255, 255, 0.7)",
  3146. });
  3147. let data = {
  3148. id: row.id,
  3149. };
  3150. let res = await axios({
  3151. method: "get",
  3152. url: api.value + "/total-pass-word/deleteEmployeeTotalPassWord",
  3153. headers: {
  3154. token: sessionStorage.getItem("token"),
  3155. user_head: sessionStorage.getItem("user_head"),
  3156. },
  3157. params: data,
  3158. });
  3159. console.log(res, "总密码明细删除");
  3160. if (res.data.code == 200) {
  3161. loading.close();
  3162. allPassDetailList();
  3163. ElMessage({
  3164. type: "success",
  3165. showClose: true,
  3166. message: res.data.message,
  3167. center: true,
  3168. });
  3169. } else {
  3170. loading.close();
  3171. ElMessage({
  3172. type: "error",
  3173. showClose: true,
  3174. message: res.data.message,
  3175. center: true,
  3176. });
  3177. }
  3178. };
  3179. const cancelAllPassDetail = () => {
  3180. allPassDetailVisible.value = false;
  3181. };
  3182. // 批量导入(-----------------------------------------------------------------)
  3183. const bulkImportClick = () => {
  3184. bulkImportVisible.value = true;
  3185. bulkImportFile.value = "";
  3186. nextTick(() => {
  3187. bulkImportref.value.clearFiles();
  3188. });
  3189. };
  3190. // 移出照片
  3191. const handleRemove = (uploadFile, uploadFiles) => {
  3192. bulkImportFile.value = "";
  3193. };
  3194. // 点击图片的查看按钮
  3195. const handlePreview = (file) => {
  3196. console.log(file);
  3197. };
  3198. // 限制上传图片的大小
  3199. const beforeAvatarUpload = (rawFile) => {
  3200. console.log(rawFile.type, "文件类型");
  3201. if (
  3202. rawFile.type !==
  3203. "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  3204. ) {
  3205. ElMessage.error("文件格式必须为xlsx格式!");
  3206. return false;
  3207. } else if (rawFile.size / 1024 / 1024 > 100) {
  3208. ElMessage.error("文件的大小不能超过100MB!");
  3209. return false;
  3210. }
  3211. return true;
  3212. };
  3213. // 添加照片时往fileList列表中添加图片信息
  3214. const handleChange = async (file, fileLists) => {
  3215. console.log(file, "1111");
  3216. // fileList.list.push(file);
  3217. bulkImportFile.value = file.raw;
  3218. uploadFileShow.value = true;
  3219. };
  3220. // 可以获取图片参数
  3221. const handleUpload = async (file) => {
  3222. // if (fileList.list.length >= 6) {
  3223. // ElMessage.error("最多可上传6张图片!");
  3224. // return false;
  3225. // }
  3226. console.log(file, "22222222");
  3227. // let data = new FormData();
  3228. // data.set("files", file.file);
  3229. // let res = await axios({
  3230. // method: "post",
  3231. // url: api.value + "/file/cos/upload",
  3232. // headers: {},
  3233. // data: data,
  3234. // });
  3235. // console.log(res, "图片上传成功详情图");
  3236. // if (res.data.code == 1) {
  3237. // // res.data.data.uid = file.file.uid;
  3238. // // console.log([res.data.data]);
  3239. // let arr = {
  3240. // uid: file.file.uid,
  3241. // url: res.data.data,
  3242. // };
  3243. // fileList.list = fileList.list.concat([arr]);
  3244. // ruleForm.fileListJson = fileList.list;
  3245. // }
  3246. };
  3247. // 上传文件时覆盖上一个文件
  3248. const handleExceed = (files) => {
  3249. bulkImportref.value.clearFiles();
  3250. const file = files[0];
  3251. file.uid = genFileId();
  3252. bulkImportref.value.handleStart(file);
  3253. };
  3254. // 重置按钮 重置上传文件
  3255. const resetImport = () => {
  3256. bulkImportFile.value = "";
  3257. bulkImportref.value.clearFiles();
  3258. };
  3259. // 下载模板
  3260. const downbulkImport = async () => {
  3261. let res = await axios({
  3262. method: "get",
  3263. url: api.value + "/house-lock/lockExport",
  3264. headers: {
  3265. token: sessionStorage.getItem("token"),
  3266. user_head: sessionStorage.getItem("userhead"),
  3267. },
  3268. responseType: "blob",
  3269. });
  3270. console.log(res, "批量导入模板下载");
  3271. if (res.status == 200) {
  3272. let name = `门锁模板`;
  3273. var content = res.data;
  3274. var datas = new Blob([content]);
  3275. var downloadUrl = window.URL.createObjectURL(datas);
  3276. var anchor = document.createElement("a");
  3277. anchor.href = downloadUrl;
  3278. anchor.download = name + ".xlsx";
  3279. anchor.click();
  3280. window.URL.revokeObjectURL(datas);
  3281. ElMessage({
  3282. type: "success",
  3283. showClose: true,
  3284. message: "下载成功",
  3285. center: true,
  3286. });
  3287. } else {
  3288. ElMessage({
  3289. type: "error",
  3290. showClose: true,
  3291. message: res.data.message,
  3292. center: true,
  3293. });
  3294. }
  3295. };
  3296. // 确定导入
  3297. const bulkImportConfig = async () => {
  3298. let data = new FormData();
  3299. data.append("file", bulkImportFile.value);
  3300. let res = await axios({
  3301. method: "post",
  3302. url: api.value + "/house-lock/lockImport",
  3303. headers: {
  3304. token: sessionStorage.getItem("token"),
  3305. user_head: sessionStorage.getItem("userhead"),
  3306. },
  3307. data: data,
  3308. });
  3309. console.log(res, "确定导入");
  3310. if (res.status == 200) {
  3311. getList();
  3312. bulkImportVisible.value = false;
  3313. ElMessage({
  3314. type: "success",
  3315. showClose: true,
  3316. message: res.data.message,
  3317. center: true,
  3318. });
  3319. } else {
  3320. ElMessage({
  3321. type: "error",
  3322. showClose: true,
  3323. message: res.data.message,
  3324. center: true,
  3325. });
  3326. }
  3327. };
  3328. const cancelBulkImport = () => {
  3329. bulkImportVisible.value = false;
  3330. };
  3331. // 钥匙管理(-----------------------------------------------------------------)
  3332. const keyListData = async () => {
  3333. let data = {
  3334. permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  3335. houseNumberId: keyData.houseNumberId,
  3336. };
  3337. let res = await axios({
  3338. method: "get",
  3339. url: api.value + "/house-lock/key",
  3340. headers: {
  3341. token: sessionStorage.getItem("token"),
  3342. user_head: sessionStorage.getItem("userhead"),
  3343. },
  3344. params: data,
  3345. });
  3346. console.log(res, "住客,系统用户");
  3347. if (res.data.code == 200) {
  3348. userList.value = res.data.data.order;
  3349. systemUserList.value = res.data.data.employee;
  3350. customList.value = res.data.data.custom;
  3351. } else {
  3352. ElMessage({
  3353. type: "error",
  3354. showClose: true,
  3355. message: res.data.message,
  3356. center: true,
  3357. });
  3358. }
  3359. };
  3360. // 员工数据
  3361. const staffData = async () => {
  3362. // let data = {
  3363. // permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  3364. // houseNumberId: keyData.houseNumberId,
  3365. // };
  3366. let res = await axios({
  3367. method: "get",
  3368. url: api.value + "/employeeUsers/getAllUser",
  3369. headers: {
  3370. token: sessionStorage.getItem("token"),
  3371. user_head: sessionStorage.getItem("userhead"),
  3372. },
  3373. });
  3374. console.log(res, "员工数据");
  3375. if (res.data.code == 200) {
  3376. staffList.value = res.data.data;
  3377. } else {
  3378. ElMessage({
  3379. type: "error",
  3380. showClose: true,
  3381. message: res.data.message,
  3382. center: true,
  3383. });
  3384. }
  3385. };
  3386. // 改变用户选择
  3387. const staffChange = (val, flag) => {
  3388. console.log(val, flag, "改变用户选择");
  3389. if (flag == "房卡") {
  3390. staffList.value.forEach((i) => {
  3391. if (i.id == val) {
  3392. // console.log(i,'房卡 用户数据');
  3393. if (cardFlag.value == "房卡") {
  3394. identityCardRuleForm.icCard = "";
  3395. } else if (cardFlag.value == "身份证") {
  3396. identityCardRuleForm.icCard = i.idCardInformation;
  3397. }
  3398. }
  3399. });
  3400. } else if (flag == "指纹") {
  3401. staffList.value.forEach((i) => {
  3402. if (i.id == val) {
  3403. console.log(i, "指纹 用户数据");
  3404. fingerprintRuleForm.fingerprintNum = i.fingerprint;
  3405. }
  3406. });
  3407. }
  3408. };
  3409. const keyClick = async (row) => {
  3410. console.log(row, "钥匙管理");
  3411. keyTitle.value = row.roomNumber;
  3412. keyData.houseNumberId = row.houseNumberId;
  3413. keyData.equipmentType = row.equipmentType;
  3414. keyVisible.value = true;
  3415. keyListData(); // 住客,员工 自定义用户
  3416. staffData(); // 员工筛选数据
  3417. };
  3418. const cancelKey = () => {
  3419. keyVisible.value = false;
  3420. };
  3421. // 钥匙管理 密码管理(-----------------------------------------------------------------)
  3422. const passManagementClick = (val) => {
  3423. keypassflag.value = val;
  3424. passManagementEditFlag.value=1
  3425. // rolesList();
  3426. // fingerprintChangeList.value=""
  3427. passManagementVisible.value = true;
  3428. // passManagementRuleForm.level = "";
  3429. passManagementRuleForm.name = "";
  3430. passManagementRuleForm.phone = "";
  3431. passManagementRuleForm.effectiveTime = "";
  3432. passManagementRuleForm.failureTime = "";
  3433. passManagementRuleForm.pass = "";
  3434. };
  3435. const cancelPassManagement = () => {
  3436. passManagementVisible.value = false;
  3437. passManagementRef.value.resetFields();
  3438. };
  3439. // 判断切换 时效密码 无网络密码 临时密码
  3440. const passManagementHandleClick = (value) => {
  3441. console.log(value);
  3442. passManagementRef.value.resetFields();
  3443. };
  3444. // 确定密码
  3445. const passManagementSend = (formEl) => {
  3446. if (!formEl) return;
  3447. formEl.validate(async (valid, fields) => {
  3448. if (valid) {
  3449. if (keypassflag.value == "系统") {
  3450. if(passManagementEditFlag.value==1){
  3451. let data = {
  3452. permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
  3453. adminId: sessionStorage.getItem("id"), //管理员id
  3454. houseNumberId: keyData.houseNumberId, //房间号id
  3455. startTime: passManagementRuleForm.effectiveTime, // 开始时间
  3456. endTime: passManagementRuleForm.failureTime, //结束时间
  3457. usersId: passManagementRuleForm.name, //用户id
  3458. equipmentType: keyData.equipmentType, //设备id
  3459. passWord: passManagementRuleForm.pass, // 密码
  3460. type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
  3461. };
  3462. let res = await axios({
  3463. method: "post",
  3464. url: api.value + "/unlocking-employee/savePassWord",
  3465. headers: {
  3466. token: sessionStorage.getItem("token"),
  3467. user_head: sessionStorage.getItem("userhead"),
  3468. },
  3469. data: data,
  3470. });
  3471. console.log(res, "系统添加密码");
  3472. if (res.data.code == 200) {
  3473. passManagementVisible.value = false;
  3474. keyListData();
  3475. ElMessage({
  3476. type: "success",
  3477. showClose: true,
  3478. message: res.data.message,
  3479. center: true,
  3480. });
  3481. } else {
  3482. ElMessage({
  3483. type: "error",
  3484. showClose: true,
  3485. message: res.data.message,
  3486. center: true,
  3487. });
  3488. }
  3489. }else if(passManagementEditFlag.value==2){
  3490. let data = {
  3491. unlockingAdminId: passManagementRuleForm.id, //系统用户钥匙id
  3492. startTime: passManagementRuleForm.effectiveTime, // 开始时间
  3493. endTime: passManagementRuleForm.failureTime, //结束时间
  3494. };
  3495. let res = await axios({
  3496. method: "post",
  3497. url: api.value + "/unlocking-employee/updateLock",
  3498. headers: {
  3499. token: sessionStorage.getItem("token"),
  3500. user_head: sessionStorage.getItem("userhead"),
  3501. },
  3502. data: data,
  3503. });
  3504. console.log(res, "员工编辑密码时效");
  3505. if (res.data.code == 200) {
  3506. passManagementVisible.value = false;
  3507. keyListData();
  3508. ElMessage({
  3509. type: "success",
  3510. showClose: true,
  3511. message: res.data.message,
  3512. center: true,
  3513. });
  3514. } else {
  3515. ElMessage({
  3516. type: "error",
  3517. showClose: true,
  3518. message: res.data.message,
  3519. center: true,
  3520. });
  3521. }
  3522. }
  3523. } else if (keypassflag.value == "自定义") {
  3524. if(passManagementEditFlag.value==1){
  3525. let data = {
  3526. permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
  3527. adminId: sessionStorage.getItem("id"), //管理员id
  3528. houseNumberId: keyData.houseNumberId, //房间号id
  3529. startTime: passManagementRuleForm.effectiveTime, // 开始时间
  3530. endTime: passManagementRuleForm.failureTime, //结束时间
  3531. userName: passManagementRuleForm.name, //用户id
  3532. phone: passManagementRuleForm.phone, //用户id
  3533. equipmentType: keyData.equipmentType, //设备id
  3534. passWord: passManagementRuleForm.pass, // 密码
  3535. type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
  3536. };
  3537. let res = await axios({
  3538. method: "post",
  3539. url: api.value + "/unlocking-custom/savePassWord",
  3540. headers: {
  3541. token: sessionStorage.getItem("token"),
  3542. user_head: sessionStorage.getItem("userhead"),
  3543. },
  3544. data: data,
  3545. });
  3546. console.log(res, "自定义添加密码");
  3547. if (res.data.code == 200) {
  3548. passManagementVisible.value = false;
  3549. keyListData();
  3550. ElMessage({
  3551. type: "success",
  3552. showClose: true,
  3553. message: res.data.message,
  3554. center: true,
  3555. });
  3556. } else {
  3557. ElMessage({
  3558. type: "error",
  3559. showClose: true,
  3560. message: res.data.message,
  3561. center: true,
  3562. });
  3563. }
  3564. }else if(passManagementEditFlag.value==2){
  3565. let data = {
  3566. unlockingAdminId: passManagementRuleForm.id, //系统用户钥匙id
  3567. startTime: passManagementRuleForm.effectiveTime, // 开始时间
  3568. endTime: passManagementRuleForm.failureTime, //结束时间
  3569. };
  3570. let res = await axios({
  3571. method: "post",
  3572. url: api.value + "/unlocking-custom/updateLock",
  3573. headers: {
  3574. token: sessionStorage.getItem("token"),
  3575. user_head: sessionStorage.getItem("userhead"),
  3576. },
  3577. data: data,
  3578. });
  3579. console.log(res, "员工编辑密码时效");
  3580. if (res.data.code == 200) {
  3581. passManagementVisible.value = false;
  3582. keyListData();
  3583. ElMessage({
  3584. type: "success",
  3585. showClose: true,
  3586. message: res.data.message,
  3587. center: true,
  3588. });
  3589. } else {
  3590. ElMessage({
  3591. type: "error",
  3592. showClose: true,
  3593. message: res.data.message,
  3594. center: true,
  3595. });
  3596. }
  3597. }
  3598. }
  3599. } else {
  3600. console.log("error submit!", fields);
  3601. }
  3602. });
  3603. };
  3604. // 随机八位数密码
  3605. const randomCipher = async () => {
  3606. let res = await axios({
  3607. method: "get",
  3608. url: api.value + "/unlocking-admin/getPassWord",
  3609. headers: {
  3610. token: sessionStorage.getItem("token"),
  3611. user_head: sessionStorage.getItem("userhead"),
  3612. },
  3613. });
  3614. console.log(res, "随机密码");
  3615. if (res.data.code == 200) {
  3616. passManagementRuleForm.pass = res.data.data.passWord;
  3617. } else {
  3618. ElMessage({
  3619. type: "error",
  3620. showClose: true,
  3621. message: res.data.message,
  3622. center: true,
  3623. });
  3624. }
  3625. };
  3626. // (员工)编辑密码,指纹,卡片,身份证时效
  3627. const fingerprintEdit=(row)=>{
  3628. console.log(row,'编辑密码,指纹,卡片,身份证时效');
  3629. passManagementEditFlag.value=2
  3630. if(row.lockStatus==1){
  3631. passManagementVisible.value = true;
  3632. keypassflag.value ="系统"
  3633. // passManagementRuleForm.level = "";
  3634. // passManagementRuleForm.name = "";
  3635. passManagementRuleForm.name = row.employeeUserId;
  3636. passManagementRuleForm.effectiveTime = row.startTime;
  3637. passManagementRuleForm.failureTime = row.endTime;
  3638. passManagementRuleForm.pass = row.passWord;
  3639. passManagementRuleForm.id = row.id;
  3640. }else if(row.lockStatus==2){
  3641. addIdentityCardVisibleTitle.value = "编辑房卡";
  3642. keypassflag.value = '系统'
  3643. identityCardEditFlag.value=2
  3644. identityCardVisible.value = true;
  3645. identityCardRuleForm.name = row.employeeUserId;
  3646. identityCardRuleForm.icCard = row.card;
  3647. identityCardRuleForm.effectiveTime = row.startTime;
  3648. identityCardRuleForm.failureTime = row.endTime;
  3649. identityCardRuleForm.id=row.id
  3650. }else if(row.lockStatus==4){
  3651. addIdentityCardVisibleTitle.value = "编辑身份证";
  3652. keypassflag.value = '系统'
  3653. identityCardEditFlag.value=2
  3654. identityCardVisible.value = true;
  3655. identityCardRuleForm.name = row.employeeUserId;
  3656. identityCardRuleForm.icCard = row.card;
  3657. identityCardRuleForm.effectiveTime = row.startTime;
  3658. identityCardRuleForm.failureTime = row.endTime;
  3659. identityCardRuleForm.id=row.id
  3660. }else if(row.lockStatus==3){
  3661. addIdentityCardVisibleTitle.value = "编辑指纹";
  3662. keypassflag.value = '系统'
  3663. fingerprintEditFlag.value=2
  3664. fingerprintVisible.value = true;
  3665. fingerprintRuleForm.name = row.employeeUserId;
  3666. fingerprintRuleForm.fingerprintNum = row.fingerprintData;
  3667. fingerprintRuleForm.effectiveTime = row.startTime;
  3668. fingerprintRuleForm.failureTime = row.endTime;
  3669. fingerprintRuleForm.id=row.id
  3670. }
  3671. }
  3672. // (自定义)编辑密码,指纹,卡片,身份证时效
  3673. const customFingerprintEdit=(row)=>{
  3674. console.log(row,'编辑密码,指纹,卡片,身份证时效');
  3675. passManagementEditFlag.value=2
  3676. if(row.lockStatus==1){
  3677. passManagementVisible.value = true;
  3678. keypassflag.value ="自定义"
  3679. // passManagementRuleForm.level = "";
  3680. // passManagementRuleForm.name = "";
  3681. passManagementRuleForm.name = row.name;
  3682. passManagementRuleForm.effectiveTime = row.startTime;
  3683. passManagementRuleForm.failureTime = row.endTime;
  3684. passManagementRuleForm.pass = row.passWord;
  3685. passManagementRuleForm.phone = row.phone;
  3686. passManagementRuleForm.id = row.id;
  3687. }else if(row.lockStatus==2){
  3688. addIdentityCardVisibleTitle.value = "编辑房卡";
  3689. keypassflag.value = '自定义'
  3690. identityCardEditFlag.value=2
  3691. identityCardVisible.value = true;
  3692. identityCardRuleForm.name = row.name;
  3693. identityCardRuleForm.phone = row.phone;
  3694. identityCardRuleForm.icCard = row.card;
  3695. identityCardRuleForm.effectiveTime = row.startTime;
  3696. identityCardRuleForm.failureTime = row.endTime;
  3697. identityCardRuleForm.id=row.id
  3698. }else if(row.lockStatus==4){
  3699. addIdentityCardVisibleTitle.value = "编辑身份证";
  3700. keypassflag.value = '自定义'
  3701. identityCardEditFlag.value=2
  3702. identityCardVisible.value = true;
  3703. identityCardRuleForm.name = row.name;
  3704. identityCardRuleForm.phone = row.phone;
  3705. identityCardRuleForm.icCard = row.card;
  3706. identityCardRuleForm.effectiveTime = row.startTime;
  3707. identityCardRuleForm.failureTime = row.endTime;
  3708. identityCardRuleForm.id=row.id
  3709. }else if(row.lockStatus==3){
  3710. addIdentityCardVisibleTitle.value = "编辑指纹";
  3711. keypassflag.value = '自定义'
  3712. fingerprintEditFlag.value=2
  3713. fingerprintVisible.value = true;
  3714. fingerprintRuleForm.name = row.name;
  3715. fingerprintRuleForm.phone = row.phone;
  3716. fingerprintRuleForm.fingerprintNum = row.fingerprintData;
  3717. fingerprintRuleForm.effectiveTime = row.startTime;
  3718. fingerprintRuleForm.failureTime = row.endTime;
  3719. fingerprintRuleForm.id=row.id
  3720. }
  3721. }
  3722. // // 获取管理端角色信息
  3723. // const rolesList = async () => {
  3724. // let res = await axios({
  3725. // method: "get",
  3726. // url: api.value + "/admin-menu/getUserRole",
  3727. // headers: {
  3728. // token: sessionStorage.getItem("token"),
  3729. // user_head: sessionStorage.getItem("userhead"),
  3730. // },
  3731. // });
  3732. // console.log(res, "管理端角色");
  3733. // if (res.data.code == 200) {
  3734. // fingerprintoptions.value = res.data.data;
  3735. // } else {
  3736. // ElMessage({
  3737. // type: "error",
  3738. // showClose: true,
  3739. // message: res.data.message,
  3740. // center: true,
  3741. // });
  3742. // }
  3743. // };
  3744. // // 改变管理端角色 获取用户角色信息
  3745. // const fingerprintChange = async (val) => {
  3746. // console.log(val);
  3747. // let data = {
  3748. // adminMenuId: val[val.length - 1],
  3749. // };
  3750. // let res = await axios({
  3751. // method: "get",
  3752. // url: api.value + "/admin/userList",
  3753. // headers: {
  3754. // token: sessionStorage.getItem("token"),
  3755. // user_head: sessionStorage.getItem("userhead"),
  3756. // },
  3757. // params: data,
  3758. // });
  3759. // console.log(res, "用户角色");
  3760. // if (res.data.code == 200) {
  3761. // fingerprintChangeList.value = res.data.data;
  3762. // } else {
  3763. // ElMessage({
  3764. // type: "error",
  3765. // showClose: true,
  3766. // message: res.data.message,
  3767. // center: true,
  3768. // });
  3769. // }
  3770. // };
  3771. // 钥匙管理 添加指纹(-----------------------------------------------------------------)
  3772. const fingerprintClick = (val) => {
  3773. console.log("添加指纹", val);
  3774. keypassflag.value = val;
  3775. // rolesList();
  3776. // fingerprintChangeList.value=""
  3777. fingerprintVisible.value = true;
  3778. // fingerprintRuleForm.level = "";
  3779. fingerprintRuleForm.name = "";
  3780. fingerprintRuleForm.phone = "";
  3781. fingerprintRuleForm.fingerprintNum = "";
  3782. fingerprintRuleForm.effectiveTime = "";
  3783. fingerprintRuleForm.failureTime = "";
  3784. nextTick(() => {
  3785. fingerprintRef.value.resetFields();
  3786. });
  3787. };
  3788. const cancelFingerprint = () => {
  3789. fingerprintVisible.value = false;
  3790. fingerprintRef.value.resetFields();
  3791. };
  3792. // 指纹录取
  3793. const fingerprintNext = (formEl) => {
  3794. addFingerprintVisible.value = true;
  3795. step.list = [
  3796. { id: 1, title: "" },
  3797. { id: 2, title: "" },
  3798. { id: 3, title: "" },
  3799. { id: 4, title: "" },
  3800. ];
  3801. stepindex.value = 0;
  3802. var wsUrl = "ws://localhost:8181/";
  3803. let websocket = new WebSocket(wsUrl);
  3804. ws.value = websocket;
  3805. websocket.onopen = function (evt) {
  3806. var params = { type: 101, data: null };
  3807. websocket.send(JSON.stringify(params));
  3808. };
  3809. websocket.onmessage = function (evt) {
  3810. // console.log(evt.data, "输出指纹数据");
  3811. let data = JSON.parse(evt.data);
  3812. if (data.type == 0) {
  3813. console.log(data.data.portNames);
  3814. let num = 0;
  3815. if (data.data.portNames) {
  3816. num = data.data.portNames.length;
  3817. console.log(JSON.parse(evt.data).data.portNames[num - 1]);
  3818. }
  3819. // console.log(JSON.parse(evt.data).data.portNames[1]); // 获取到 USB接口
  3820. let params1 = {
  3821. type: 1,
  3822. data: {
  3823. type: 0,
  3824. portName: JSON.parse(evt.data).data.portNames[num - 1],
  3825. baudRate: 115200,
  3826. },
  3827. };
  3828. websocket.send(JSON.stringify(params1));
  3829. } else if (data.type == 110) {
  3830. console.log("已获取设备信息");
  3831. } else if (data.type == 11) {
  3832. var params2 = {
  3833. type: 2,
  3834. data: {
  3835. totalStep: 4,
  3836. },
  3837. };
  3838. websocket.send(JSON.stringify(params2));
  3839. } else if (data.type == 21) {
  3840. if (data.data.step == 0) {
  3841. // console.log("请按压指纹");
  3842. ElMessage({
  3843. message: "请开始按压指纹",
  3844. type: "success",
  3845. });
  3846. } else {
  3847. // console.log(`请按下同一指纹,第${data.data.step}次按压`);
  3848. if (data.data.step <= 4) {
  3849. step.list.forEach((item) => {
  3850. if (item.id == data.data.step) {
  3851. item.title = `请按下同一指纹,第${data.data.step}次录入指纹成功`;
  3852. }
  3853. });
  3854. }
  3855. stepindex.value = data.data.step;
  3856. }
  3857. // _this.$message.warning("请将手指按在传感器上");
  3858. if (data.data.step > 4) {
  3859. var params = {
  3860. type: 3,
  3861. data: {
  3862. id: data.data.id,
  3863. },
  3864. };
  3865. websocket.send(JSON.stringify(params));
  3866. }
  3867. } else if (data.type == 31) {
  3868. fingerprintRuleForm.fingerprintNum = data.data.template;
  3869. console.log(data.data.template, "指纹数据");
  3870. addFingerprintVisible.value = false;
  3871. ws.value.close();
  3872. ElMessage({
  3873. message: "指纹录取成功",
  3874. type: "success",
  3875. });
  3876. // setTimeout(() => {
  3877. // _this.fingerprintShow = false;
  3878. // ws.value.close();
  3879. // }, 1500);
  3880. } else {
  3881. ElMessage({
  3882. message: "设备连接失败,请刷新重新录入",
  3883. type: "error",
  3884. });
  3885. }
  3886. };
  3887. websocket.onclose = function (evt) {
  3888. console.log("关闭连接");
  3889. // ws.value.close();
  3890. };
  3891. websocket.onerror = function (evt) {
  3892. // console.log("错误提示");
  3893. };
  3894. };
  3895. const fingerprintconfig = (formEl) => {
  3896. if (!formEl) return;
  3897. formEl.validate(async (valid, fields) => {
  3898. if (valid) {
  3899. if (keypassflag.value == "系统") {
  3900. if(passManagementEditFlag.value==1){
  3901. let data = {
  3902. permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
  3903. adminId: sessionStorage.getItem("id"), //管理员id
  3904. houseNumberId: keyData.houseNumberId, //房间号id
  3905. startTime: fingerprintRuleForm.effectiveTime, // 开始时间
  3906. endTime: fingerprintRuleForm.failureTime, //结束时间
  3907. usersId: fingerprintRuleForm.name, //用户id
  3908. luid: keyData.equipmentType, //设备id
  3909. fingerprintData: fingerprintRuleForm.fingerprintNum, //指纹特征值
  3910. type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
  3911. };
  3912. let res = await axios({
  3913. method: "post",
  3914. url: api.value + "/unlocking-employee/saveFingerprint",
  3915. headers: {
  3916. token: sessionStorage.getItem("token"),
  3917. user_head: sessionStorage.getItem("userhead"),
  3918. },
  3919. data: data,
  3920. });
  3921. console.log(res, "系统添加指纹钥匙");
  3922. if (res.data.code == 200) {
  3923. fingerprintVisible.value = false;
  3924. keyListData();
  3925. ElMessage({
  3926. type: "success",
  3927. showClose: true,
  3928. message: res.data.message,
  3929. center: true,
  3930. });
  3931. } else {
  3932. ElMessage({
  3933. type: "error",
  3934. showClose: true,
  3935. message: res.data.message,
  3936. center: true,
  3937. });
  3938. }
  3939. }else if(passManagementEditFlag.value==2){
  3940. let data = {
  3941. unlockingAdminId: fingerprintRuleForm.id, //系统用户钥匙id
  3942. startTime: fingerprintRuleForm.effectiveTime, // 开始时间
  3943. endTime: fingerprintRuleForm.failureTime, //结束时间
  3944. };
  3945. let res = await axios({
  3946. method: "post",
  3947. url: api.value + "/unlocking-employee/updateLock",
  3948. headers: {
  3949. token: sessionStorage.getItem("token"),
  3950. user_head: sessionStorage.getItem("userhead"),
  3951. },
  3952. data: data,
  3953. });
  3954. console.log(res, "系统编辑指纹钥匙");
  3955. if (res.data.code == 200) {
  3956. fingerprintVisible.value = false;
  3957. keyListData();
  3958. ElMessage({
  3959. type: "success",
  3960. showClose: true,
  3961. message: res.data.message,
  3962. center: true,
  3963. });
  3964. } else {
  3965. ElMessage({
  3966. type: "error",
  3967. showClose: true,
  3968. message: res.data.message,
  3969. center: true,
  3970. });
  3971. }
  3972. }
  3973. } else if (keypassflag.value == "自定义") {
  3974. if(passManagementEditFlag.value==1){
  3975. let data = {
  3976. permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
  3977. adminId: sessionStorage.getItem("id"), //管理员id
  3978. houseNumberId: keyData.houseNumberId, //房间号id
  3979. startTime: fingerprintRuleForm.effectiveTime, // 开始时间
  3980. endTime: fingerprintRuleForm.failureTime, //结束时间
  3981. userName: fingerprintRuleForm.name, //用户id
  3982. phone: fingerprintRuleForm.phone, //用户id
  3983. luid: keyData.equipmentType, //设备id
  3984. fingerprintData: fingerprintRuleForm.fingerprintNum, //指纹特征值
  3985. type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
  3986. };
  3987. let res = await axios({
  3988. method: "post",
  3989. url: api.value + "/unlocking-custom/saveFingerprint",
  3990. headers: {
  3991. token: sessionStorage.getItem("token"),
  3992. user_head: sessionStorage.getItem("userhead"),
  3993. },
  3994. data: data,
  3995. });
  3996. console.log(res, "自定义添加指纹钥匙");
  3997. if (res.data.code == 200) {
  3998. fingerprintVisible.value = false;
  3999. keyListData();
  4000. ElMessage({
  4001. type: "success",
  4002. showClose: true,
  4003. message: res.data.message,
  4004. center: true,
  4005. });
  4006. } else {
  4007. ElMessage({
  4008. type: "error",
  4009. showClose: true,
  4010. message: res.data.message,
  4011. center: true,
  4012. });
  4013. }
  4014. }else if(passManagementEditFlag.value==2){
  4015. let data = {
  4016. unlockingAdminId: fingerprintRuleForm.id, //系统用户钥匙id
  4017. startTime: fingerprintRuleForm.effectiveTime, // 开始时间
  4018. endTime: fingerprintRuleForm.failureTime, //结束时间
  4019. };
  4020. let res = await axios({
  4021. method: "post",
  4022. url: api.value + "/unlocking-custom/updateLock",
  4023. headers: {
  4024. token: sessionStorage.getItem("token"),
  4025. user_head: sessionStorage.getItem("userhead"),
  4026. },
  4027. data: data,
  4028. });
  4029. console.log(res, "自定义编辑指纹钥匙");
  4030. if (res.data.code == 200) {
  4031. fingerprintVisible.value = false;
  4032. keyListData();
  4033. ElMessage({
  4034. type: "success",
  4035. showClose: true,
  4036. message: res.data.message,
  4037. center: true,
  4038. });
  4039. } else {
  4040. ElMessage({
  4041. type: "error",
  4042. showClose: true,
  4043. message: res.data.message,
  4044. center: true,
  4045. });
  4046. }
  4047. }
  4048. }
  4049. }
  4050. });
  4051. };
  4052. // 钥匙管理中删除系统用户
  4053. const fingerprintDel = async (row) => {
  4054. console.log(row);
  4055. let data = {
  4056. unlockingEmpId: row.id, //权限表id
  4057. };
  4058. let res = await axios({
  4059. method: "get",
  4060. url: api.value + "/unlocking-employee/deleteLock",
  4061. headers: {
  4062. token: sessionStorage.getItem("token"),
  4063. user_head: sessionStorage.getItem("userhead"),
  4064. },
  4065. params: data,
  4066. });
  4067. console.log(res, "删除指纹钥匙");
  4068. if (res.data.code == 200) {
  4069. keyListData();
  4070. ElMessage({
  4071. type: "success",
  4072. showClose: true,
  4073. message: res.data.message,
  4074. center: true,
  4075. });
  4076. } else {
  4077. ElMessage({
  4078. type: "error",
  4079. showClose: true,
  4080. message: res.data.message,
  4081. center: true,
  4082. });
  4083. }
  4084. };
  4085. // 钥匙管理中删除自定义用户
  4086. const customDel = async (row) => {
  4087. console.log(row);
  4088. let data = {
  4089. unlockingAdminId: row.id, //权限表id
  4090. };
  4091. let res = await axios({
  4092. method: "get",
  4093. url: api.value + "/unlocking-custom/deleteLock",
  4094. headers: {
  4095. token: sessionStorage.getItem("token"),
  4096. user_head: sessionStorage.getItem("userhead"),
  4097. },
  4098. params: data,
  4099. });
  4100. console.log(res, "删除指纹钥匙");
  4101. if (res.data.code == 200) {
  4102. keyListData();
  4103. ElMessage({
  4104. type: "success",
  4105. showClose: true,
  4106. message: res.data.message,
  4107. center: true,
  4108. });
  4109. } else {
  4110. ElMessage({
  4111. type: "error",
  4112. showClose: true,
  4113. message: res.data.message,
  4114. center: true,
  4115. });
  4116. }
  4117. };
  4118. // 关闭指纹录入
  4119. const cancelAddFingerprint = () => {
  4120. addFingerprintVisible.value = false;
  4121. // var wsUrl = "ws://localhost:8181/";
  4122. // const websocket = new WebSocket(wsUrl);
  4123. ws.value.close();
  4124. };
  4125. // 钥匙管理 添加身份证(-----------------------------------------------------------------)
  4126. const identityCardClick = (val, card) => {
  4127. keypassflag.value = val;
  4128. if (card) {
  4129. cardFlag.value = card;
  4130. if (card == "房卡") {
  4131. addIdentityCardVisibleTitle.value = "添加房卡";
  4132. } else if (card == "身份证") {
  4133. addIdentityCardVisibleTitle.value = "添加身份证";
  4134. } else if (card == "总卡") {
  4135. addIdentityCardVisibleTitle.value = "制作总卡";
  4136. identityCardRuleForm.buildingId = "";
  4137. staffData(); // 员工筛选数据
  4138. }
  4139. } else {
  4140. cardFlag.value = "";
  4141. }
  4142. // rolesList();
  4143. // fingerprintChangeList.value=""
  4144. identityCardVisible.value = true;
  4145. identityCardEditFlag.value=1
  4146. identityCardRuleForm.level = "";
  4147. identityCardRuleForm.name = "";
  4148. identityCardRuleForm.phone = "";
  4149. identityCardRuleForm.icCard = "";
  4150. identityCardRuleForm.cardType = "";
  4151. identityCardRuleForm.effectiveTime = "";
  4152. identityCardRuleForm.failureTime = "";
  4153. // nextTick(() => {
  4154. // identityCardRef.value.resetFields();
  4155. // });
  4156. };
  4157. const cancelIdentityCard = () => {
  4158. identityCardVisible.value = false;
  4159. identityCardRef.value.resetFields();
  4160. };
  4161. const Card = () => {
  4162. var wsUrl = "ws://localhost:8181/";
  4163. let websocket = new WebSocket(wsUrl);
  4164. // wsidentityCard.value = websocket;
  4165. websocket.onopen = function (evt) {
  4166. var params = { type: 104, data: null };
  4167. websocket.send(JSON.stringify(params));
  4168. };
  4169. websocket.onmessage = function (evt) {
  4170. let data = JSON.parse(evt.data);
  4171. console.log(data);
  4172. if (data.type == 141) {
  4173. identityCardTitle.value = "请插入设备";
  4174. identityCardIndex.value = 0;
  4175. } else if (data.type == 150) {
  4176. identityCardTitle.value = "配置失败,请检查卡片是否已放置设备上";
  4177. identityCardIndex.value = 1;
  4178. } else if (data.type == 140) {
  4179. // identityCardNum.value = data.data.uid;
  4180. console.log(data.data.uid, "读取的卡号");
  4181. identityCardIndex.value = 2;
  4182. identityCardTitle.value = "读卡中";
  4183. if (data.data.uid) {
  4184. setTimeout(() => {
  4185. identityCardIndex.value = 3;
  4186. identityCardTitle.value = "读卡成功";
  4187. }, 1000);
  4188. identityCardRuleForm.icCard = data.data.uid;
  4189. setTimeout(() => {
  4190. addIdentityCardVisible.value = false;
  4191. }, 2000);
  4192. }
  4193. // ElMessage({
  4194. // type: "success",
  4195. // showClose: true,
  4196. // message: "添加卡片成功",
  4197. // center: true,
  4198. // });
  4199. // identityCardTitle.value = "获取卡号成功";
  4200. // addIdentityCardVisible.value = false;
  4201. // identityCardVisible.value = false;
  4202. // identityCardRef.value.resetFields();
  4203. // setTimeout(() => {
  4204. // _this.icCardShow = false;
  4205. // }, 2000);
  4206. }
  4207. };
  4208. };
  4209. // 身份证读卡
  4210. const identityCardNext = () => {
  4211. addIdentityCardVisible.value = true;
  4212. Card();
  4213. };
  4214. const identityCardConfig = (formEl) => {
  4215. if (!formEl) return;
  4216. formEl.validate(async (valid, fields) => {
  4217. if (valid) {
  4218. const loading = ElLoading.service({
  4219. lock: true,
  4220. text: "加载中...",
  4221. background: "rgba(255, 255, 255, 0.7)",
  4222. });
  4223. if (keypassflag.value == "系统") {
  4224. if (cardFlag.value == "房卡") {
  4225. identityCardRuleForm.cardType = 0; // 0:房卡 1:身份证
  4226. } else if (cardFlag.value == "身份证") {
  4227. identityCardRuleForm.cardType = 1;
  4228. }
  4229. if(identityCardEditFlag.value==1){
  4230. let data = {
  4231. permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
  4232. adminId: sessionStorage.getItem("id"), //管理员id
  4233. houseNumberId: keyData.houseNumberId, //房间号id
  4234. startTime: identityCardRuleForm.effectiveTime, // 开始时间
  4235. endTime: identityCardRuleForm.failureTime, //结束时间
  4236. usersId: identityCardRuleForm.name, //用户id
  4237. luid: keyData.equipmentType, //设备id
  4238. card: identityCardRuleForm.icCard, //指纹特征值
  4239. cardType: identityCardRuleForm.cardType, //指纹特征值
  4240. type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
  4241. };
  4242. let res = await axios({
  4243. method: "post",
  4244. url: api.value + "/unlocking-employee/saveCard",
  4245. headers: {
  4246. token: sessionStorage.getItem("token"),
  4247. user_head: sessionStorage.getItem("userhead"),
  4248. },
  4249. data: data,
  4250. });
  4251. console.log(res, "系统添加卡片钥匙");
  4252. if (res.data.code == 200) {
  4253. loading.close();
  4254. identityCardVisible.value = false;
  4255. keyListData();
  4256. ElMessage({
  4257. type: "success",
  4258. showClose: true,
  4259. message: res.data.message,
  4260. center: true,
  4261. });
  4262. } else {
  4263. loading.close();
  4264. ElMessage({
  4265. type: "error",
  4266. showClose: true,
  4267. message: res.data.message,
  4268. center: true,
  4269. });
  4270. }
  4271. }else if(identityCardEditFlag.value==2){
  4272. let data = {
  4273. startTime: identityCardRuleForm.effectiveTime, // 开始时间
  4274. endTime: identityCardRuleForm.failureTime, //结束时间
  4275. unlockingAdminId: identityCardRuleForm.id, //用户id
  4276. };
  4277. let res = await axios({
  4278. method: "post",
  4279. url: api.value + "/unlocking-employee/updateLock",
  4280. headers: {
  4281. token: sessionStorage.getItem("token"),
  4282. user_head: sessionStorage.getItem("userhead"),
  4283. },
  4284. data: data,
  4285. });
  4286. console.log(res, "编辑添加卡片时效");
  4287. if (res.data.code == 200) {
  4288. loading.close();
  4289. identityCardVisible.value = false;
  4290. keyListData();
  4291. ElMessage({
  4292. type: "success",
  4293. showClose: true,
  4294. message: res.data.message,
  4295. center: true,
  4296. });
  4297. } else {
  4298. loading.close();
  4299. ElMessage({
  4300. type: "error",
  4301. showClose: true,
  4302. message: res.data.message,
  4303. center: true,
  4304. });
  4305. }
  4306. }
  4307. } else if (keypassflag.value == "自定义") {
  4308. if (cardFlag.value == "房卡") {
  4309. identityCardRuleForm.cardType = 0; // 0:房卡 1:身份证
  4310. } else if (cardFlag.value == "身份证") {
  4311. identityCardRuleForm.cardType = 1;
  4312. }
  4313. if(identityCardEditFlag.value==1){
  4314. let data = {
  4315. permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
  4316. adminId: sessionStorage.getItem("id"), //管理员id
  4317. houseNumberId: keyData.houseNumberId, //房间号id
  4318. startTime: identityCardRuleForm.effectiveTime, // 开始时间
  4319. endTime: identityCardRuleForm.failureTime, //结束时间
  4320. userName: identityCardRuleForm.name, //用户id
  4321. phone: identityCardRuleForm.phone, //用户id
  4322. luid: keyData.equipmentType, //设备id
  4323. card: identityCardRuleForm.icCard, //指纹特征值
  4324. cardType: identityCardRuleForm.cardType, //指纹特征值
  4325. type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
  4326. };
  4327. let res = await axios({
  4328. method: "post",
  4329. url: api.value + "/unlocking-custom/saveCard",
  4330. headers: {
  4331. token: sessionStorage.getItem("token"),
  4332. user_head: sessionStorage.getItem("userhead"),
  4333. },
  4334. data: data,
  4335. });
  4336. console.log(res, "自定义编辑卡片钥匙");
  4337. if (res.data.code == 200) {
  4338. loading.close();
  4339. identityCardVisible.value = false;
  4340. keyListData();
  4341. ElMessage({
  4342. type: "success",
  4343. showClose: true,
  4344. message: res.data.message,
  4345. center: true,
  4346. });
  4347. } else {
  4348. loading.close();
  4349. ElMessage({
  4350. type: "error",
  4351. showClose: true,
  4352. message: res.data.message,
  4353. center: true,
  4354. });
  4355. }
  4356. }else if(identityCardEditFlag.value==2){
  4357. let data = {
  4358. unlockingAdminId:identityCardRuleForm.id,
  4359. startTime: identityCardRuleForm.effectiveTime, // 开始时间
  4360. endTime: identityCardRuleForm.failureTime, //结束时间
  4361. };
  4362. let res = await axios({
  4363. method: "post",
  4364. url: api.value + "/unlocking-custom/updateLock",
  4365. headers: {
  4366. token: sessionStorage.getItem("token"),
  4367. user_head: sessionStorage.getItem("userhead"),
  4368. },
  4369. data: data,
  4370. });
  4371. console.log(res, "自定义编辑身份证钥匙");
  4372. if (res.data.code == 200) {
  4373. loading.close();
  4374. identityCardVisible.value = false;
  4375. keyListData();
  4376. ElMessage({
  4377. type: "success",
  4378. showClose: true,
  4379. message: res.data.message,
  4380. center: true,
  4381. });
  4382. } else {
  4383. loading.close();
  4384. ElMessage({
  4385. type: "error",
  4386. showClose: true,
  4387. message: res.data.message,
  4388. center: true,
  4389. });
  4390. }
  4391. }
  4392. } else if (keypassflag.value == "总卡") {
  4393. let data = {
  4394. adminId: sessionStorage.getItem("id"), //管理员id
  4395. employeeUsersId: identityCardRuleForm.name, //员工id
  4396. buildingId: identityCardRuleForm.buildingId, //楼栋单元id
  4397. roomCardInformation: identityCardRuleForm.icCard, //房卡特殊编码
  4398. startTime: identityCardRuleForm.effectiveTime, //开始时间
  4399. endTime: identityCardRuleForm.failureTime, //结束时间
  4400. };
  4401. console.log(data);
  4402. let res = await axios({
  4403. method: "post",
  4404. url: api.value + "/total-card/saveEmployeeTotalCard",
  4405. headers: {
  4406. token: sessionStorage.getItem("token"),
  4407. user_head: sessionStorage.getItem("userhead"),
  4408. },
  4409. data: data,
  4410. });
  4411. console.log(res, "添加总卡");
  4412. if (res.data.code == 200) {
  4413. loading.close();
  4414. identityCardVisible.value = false;
  4415. ElMessage({
  4416. type: "success",
  4417. showClose: true,
  4418. message: res.data.message,
  4419. center: true,
  4420. });
  4421. } else {
  4422. loading.close();
  4423. ElMessage({
  4424. type: "error",
  4425. showClose: true,
  4426. message: res.data.message,
  4427. center: true,
  4428. });
  4429. }
  4430. }
  4431. }
  4432. });
  4433. };
  4434. // 重试 身份卡
  4435. const retry = () => {
  4436. // identityCardNum.value = "";
  4437. Card();
  4438. };
  4439. const cancelAddIdentityCard = () => {
  4440. addIdentityCardVisible.value = false;
  4441. identityCardIndex.value = 0;
  4442. };
  4443. //导出功能
  4444. const importExcel = lodash.debounce(async () => {
  4445. let data = {
  4446. ledgerParam: searchInput.keyWord,
  4447. managerId: sessionStorage.getItem("token"),
  4448. };
  4449. if (searchInput.createTime) {
  4450. data.payStartTime = searchInput.createTime[0];
  4451. data.payEndTime = searchInput.createTime[1];
  4452. }
  4453. if (searchInput.status) {
  4454. data.orderStatus = searchInput.status;
  4455. }
  4456. let res = await axios({
  4457. method: "post",
  4458. url: api.value + "/mhotel/booktoBookExcel.action",
  4459. headers: {
  4460. // token: sessionStorage.getItem("token"),
  4461. },
  4462. params: data,
  4463. });
  4464. console.log(res, "导出订单管理");
  4465. if (res.data.code == 200) {
  4466. var downloadPath = res.data.downurl;
  4467. // window.open(downloadPath);
  4468. window.location.href = downloadPath;
  4469. var downloadLink = document.createElement("a");
  4470. downloadLink.style.display = "none"; // 使其隐藏
  4471. downloadLink.href = downloadPath;
  4472. downloadLink.download = "";
  4473. downloadLink.click();
  4474. document.body.appendChild(downloadLink);
  4475. document.body.removeChild(downloadLink);
  4476. ElMessage({
  4477. type: "success",
  4478. showClose: true,
  4479. message: res.data.message,
  4480. center: true,
  4481. });
  4482. } else {
  4483. ElMessage({
  4484. type: "error",
  4485. showClose: true,
  4486. message: res.data.message,
  4487. center: true,
  4488. });
  4489. }
  4490. }, 1000);
  4491. // 表格斑马纹颜色修改
  4492. const tableRowClassName = ({ row, rowIndex }) => {
  4493. if (rowIndex % 2 === 0) {
  4494. return "even";
  4495. } else if (rowIndex % 2 !== 0) {
  4496. return "odd";
  4497. }
  4498. return "";
  4499. };
  4500. // 分页
  4501. const handleCurrentChange = (value) => {
  4502. // console.log(value);
  4503. currentPage.value = value;
  4504. getList();
  4505. };
  4506. onBeforeMount(async () => {
  4507. api.value = store.state.user.api;
  4508. const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
  4509. flagBtn.value = btnflag.doorLock;
  4510. console.log(flagBtn.value, "按钮权限");
  4511. roomNameTypeData();
  4512. getList();
  4513. schoolData();
  4514. });
  4515. onUnmounted(() => {
  4516. // document.removeEventListener("keyup", Enters);
  4517. });
  4518. </script>
  4519. <style scoped lang="scss">
  4520. .content-box {
  4521. width: 97.5%;
  4522. height: calc(100vh - 105px);
  4523. margin: 20px auto;
  4524. background-color: #fff;
  4525. color: #fff;
  4526. display: flex;
  4527. flex-direction: column;
  4528. box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  4529. .left {
  4530. // width: calc(100wh - 40px);
  4531. display: flex;
  4532. align-items: center;
  4533. height: 60px;
  4534. margin: 0 30px;
  4535. border-bottom: 1px solid #ccc;
  4536. color: rgb(0, 0, 0);
  4537. font-size: 18px;
  4538. font-weight: 600;
  4539. .cameratxt {
  4540. height: 60px;
  4541. line-height: 60px;
  4542. }
  4543. }
  4544. .middles {
  4545. height: calc(100% - 81px);
  4546. display: flex;
  4547. flex-direction: column;
  4548. }
  4549. .middle {
  4550. width: calc(100% - 60px);
  4551. margin: 0 auto;
  4552. color: #000;
  4553. // border-bottom: 1px solid rgb(231, 231, 231);
  4554. .filter {
  4555. display: flex;
  4556. align-items: center;
  4557. padding: 10px 0 0 0;
  4558. .search {
  4559. color: #fff;
  4560. }
  4561. .condition {
  4562. display: flex;
  4563. flex-wrap: wrap;
  4564. align-items: center;
  4565. // margin: 0 0 10px 0;
  4566. }
  4567. }
  4568. .changeItems {
  4569. display: flex;
  4570. flex-wrap: wrap;
  4571. margin: 10px 0 0 0;
  4572. .changeItem {
  4573. padding: 0 15px;
  4574. height: 30px;
  4575. background-color: rgba(230, 230, 230, 1);
  4576. text-align: center;
  4577. line-height: 30px;
  4578. font-size: 14px;
  4579. margin: 0 15px 10px 0;
  4580. border-radius: 3px;
  4581. color: rgba(166, 166, 166, 1);
  4582. cursor: pointer;
  4583. border: 1px solid transparent;
  4584. }
  4585. .changeItem_active {
  4586. background-color: rgba(222, 234, 252, 1);
  4587. color: rgba(0, 97, 255, 1);
  4588. border: 1px solid rgba(0, 97, 255, 1);
  4589. }
  4590. .search {
  4591. margin-right: 5px;
  4592. }
  4593. }
  4594. .gongneng {
  4595. margin: 10px 0 20px 0;
  4596. span {
  4597. color: #fff;
  4598. }
  4599. }
  4600. :deep(.cont) {
  4601. width: 60%;
  4602. margin: 20px auto;
  4603. }
  4604. :deep(.download) {
  4605. display: flex;
  4606. align-items: center;
  4607. margin: 10px;
  4608. }
  4609. :deep(.download span) {
  4610. font-size: 16px;
  4611. margin-left: 20px;
  4612. }
  4613. :deep(.cont .el-button) {
  4614. margin-left: 60px;
  4615. margin-bottom: 30px;
  4616. }
  4617. :deep(.cont .accomplish) {
  4618. width: 100%;
  4619. display: flex;
  4620. justify-content: center;
  4621. }
  4622. :deep(.cont .accomplish .el-button) {
  4623. width: 50%;
  4624. margin: 0;
  4625. }
  4626. }
  4627. .footer {
  4628. width: calc(100% - 60px);
  4629. flex: 1;
  4630. overflow: auto;
  4631. margin: 0 auto;
  4632. color: #000;
  4633. overflow: auto;
  4634. .floor {
  4635. .title {
  4636. margin: 8px 0;
  4637. .t1 {
  4638. font-weight: 600;
  4639. margin-right: 10px;
  4640. }
  4641. .t2 {
  4642. font-size: 13px;
  4643. color: rgba(102, 102, 102, 1);
  4644. }
  4645. }
  4646. .roomList {
  4647. display: flex;
  4648. flex-wrap: wrap;
  4649. font-size: 14px;
  4650. .room {
  4651. width: 193px;
  4652. height: 114px;
  4653. opacity: 1;
  4654. border-radius: 4px;
  4655. background: rgba(240, 243, 247, 1);
  4656. margin: 5px 18px 18px 0;
  4657. // padding-left: 15px;
  4658. .roomNum {
  4659. font-size: 16px;
  4660. // height: 24px;
  4661. font-weight: 600;
  4662. padding: 15px 0 5px 15px;
  4663. }
  4664. .rLock {
  4665. color: rgba(128, 128, 128, 1);
  4666. padding: 0 0 0 15px;
  4667. }
  4668. .wifi {
  4669. display: flex;
  4670. align-items: center;
  4671. padding: 10px 0 10px 15px;
  4672. color: rgba(51, 51, 51, 1);
  4673. img {
  4674. width: 14px;
  4675. padding-right: 5px;
  4676. }
  4677. }
  4678. }
  4679. }
  4680. }
  4681. // 添加员工弹窗样式
  4682. :deep(.addStaff) {
  4683. // height: 600px;
  4684. overflow: hidden;
  4685. border-radius: 11px;
  4686. .el-dialog__header {
  4687. border-radius: 11px 11px 0 0;
  4688. background: rgba(237, 241, 245, 1);
  4689. font-weight: 600;
  4690. margin: 0;
  4691. .el-dialog__headerbtn {
  4692. outline: none;
  4693. }
  4694. }
  4695. .el-dialog__body {
  4696. overflow: auto;
  4697. padding: 0px 20px 10px 20px;
  4698. .order_info {
  4699. margin: 20px 0 15px 0;
  4700. .title {
  4701. display: flex;
  4702. align-items: center;
  4703. margin: 25px 0 10px 0;
  4704. img {
  4705. width: 20px;
  4706. height: 20px;
  4707. margin-right: 10px;
  4708. }
  4709. span {
  4710. color: #000;
  4711. font-size: 18px;
  4712. font-weight: 800;
  4713. }
  4714. }
  4715. // 排列模式样式
  4716. .workNum {
  4717. display: flex;
  4718. align-items: center;
  4719. margin-bottom: 12px;
  4720. font-size: 16px;
  4721. .titles {
  4722. color: rgba(128, 128, 128, 1);
  4723. margin-right: 12px;
  4724. font-weight: 200;
  4725. width: 80px;
  4726. }
  4727. span {
  4728. color: #000;
  4729. font-weight: 600;
  4730. }
  4731. ul {
  4732. list-style: none;
  4733. display: flex;
  4734. flex-wrap: wrap;
  4735. margin: 0;
  4736. padding: 0;
  4737. li {
  4738. border: 1px solid rgba(166, 166, 166, 1);
  4739. margin-right: 10px;
  4740. padding: 1px 4px;
  4741. border-radius: 6px;
  4742. cursor: pointer;
  4743. }
  4744. li.is_active {
  4745. background-color: rgba(9, 101, 98, 1);
  4746. color: #fff;
  4747. }
  4748. }
  4749. // .el-checkbox-button {
  4750. // margin-right: 10px;
  4751. // border: 1px solid #ccc;
  4752. // border-radius: 4px;
  4753. // box-sizing: border-box;
  4754. // .el-checkbox-button__inner {
  4755. // border: none;
  4756. // border-radius: 3px;
  4757. // }
  4758. // }
  4759. // .el-checkbox-button.is-focus {
  4760. // .el-checkbox-button__inner {
  4761. // color: #fff;
  4762. // background-color: rgba(9, 101, 98, 1);
  4763. // }
  4764. // }
  4765. }
  4766. }
  4767. .options {
  4768. margin: 0 0 10px 0;
  4769. width: 95%;
  4770. display: flex;
  4771. flex-direction: row-reverse;
  4772. .queding {
  4773. margin-left: 20px;
  4774. color: #fff;
  4775. }
  4776. }
  4777. .houseNumber {
  4778. margin: 20px 0;
  4779. // .el-checkbox-button {
  4780. // margin-right: 10px;
  4781. // border: 1px solid #ccc;
  4782. // border-radius: 4px;
  4783. // box-sizing: border-box;
  4784. // .el-checkbox-button__inner {
  4785. // border: none;
  4786. // border-radius: 3px;
  4787. // }
  4788. // }
  4789. // .el-checkbox-button.is-focus {
  4790. // .el-checkbox-button__inner {
  4791. // color: #fff;
  4792. // background-color: rgba(9, 101, 98, 1);
  4793. // }
  4794. // }
  4795. ul {
  4796. list-style: none;
  4797. display: flex;
  4798. flex-wrap: wrap;
  4799. margin: 0;
  4800. padding: 0;
  4801. li {
  4802. border: 1px solid rgba(166, 166, 166, 1);
  4803. margin-right: 10px;
  4804. padding: 1px 4px;
  4805. border-radius: 6px;
  4806. cursor: pointer;
  4807. }
  4808. li.is_active {
  4809. background-color: rgba(9, 101, 98, 1);
  4810. color: #fff;
  4811. }
  4812. }
  4813. }
  4814. }
  4815. }
  4816. }
  4817. .footer::-webkit-scrollbar-track {
  4818. background-color: #daeeff;
  4819. }
  4820. .footer::-webkit-scrollbar {
  4821. background-color: #0888f8;
  4822. height: 3px;
  4823. width: 6px;
  4824. }
  4825. .footer::-webkit-scrollbar-thumb {
  4826. background: #57b2ff;
  4827. border-radius: 4px;
  4828. height: 3px;
  4829. width: 6px;
  4830. cursor: pointer;
  4831. }
  4832. .pageSize {
  4833. display: flex;
  4834. align-items: center;
  4835. justify-content: space-between;
  4836. margin: 0 30px;
  4837. span {
  4838. color: #000;
  4839. }
  4840. .el-pagination {
  4841. // width: 1600px;
  4842. :deep(.el-pagination__total) {
  4843. color: #000;
  4844. }
  4845. :deep(.el-pagination__goto) {
  4846. color: #000;
  4847. }
  4848. :deep(.el-pagination__classifier) {
  4849. color: #000;
  4850. }
  4851. :deep(.el-input__wrapper) {
  4852. border: 1px solid rgba(0, 0, 0, 1);
  4853. border-radius: 5px;
  4854. box-shadow: none;
  4855. }
  4856. :deep(.el-pager li) {
  4857. margin: 0 5px;
  4858. border: 1px solid rgba(0, 0, 0, 1);
  4859. border-radius: 5px;
  4860. background-color: transparent;
  4861. }
  4862. :deep(.el-pager li.is-active) {
  4863. background-color: rgba(111, 182, 184, 1);
  4864. }
  4865. :deep(.btn-prev) {
  4866. margin-right: 5px;
  4867. border: 1px solid rgba(0, 0, 0, 1);
  4868. border-radius: 5px;
  4869. background-color: transparent;
  4870. }
  4871. :deep(.btn-next) {
  4872. margin-left: 5px;
  4873. border: 1px solid rgba(0, 0, 0, 1);
  4874. border-radius: 5px;
  4875. background-color: transparent;
  4876. }
  4877. }
  4878. }
  4879. }
  4880. .el-input {
  4881. width: 192px;
  4882. }
  4883. .firstLogin {
  4884. position: absolute;
  4885. top: 0;
  4886. left: 0;
  4887. width: 100%;
  4888. height: calc(100vh);
  4889. background-color: rgba(0, 0, 0, 0.2);
  4890. z-index: 1000000;
  4891. display: flex;
  4892. justify-content: center;
  4893. align-items: center;
  4894. .goInfo {
  4895. width: 655px;
  4896. height: 408px;
  4897. background-color: #fff;
  4898. border-radius: 9px;
  4899. display: flex;
  4900. flex-direction: column;
  4901. justify-content: center;
  4902. align-items: center;
  4903. color: #000;
  4904. h2 {
  4905. margin: 0;
  4906. font-size: 28px;
  4907. }
  4908. p {
  4909. margin: 60px 0;
  4910. padding: 0;
  4911. font-size: 18px;
  4912. }
  4913. }
  4914. }
  4915. // 弹出的信息框
  4916. .roominfoPopper {
  4917. .roomInfo {
  4918. // border: 1px solid red;
  4919. color: #fff;
  4920. font-size: 14px;
  4921. position: relative;
  4922. .close {
  4923. position: absolute;
  4924. cursor: pointer;
  4925. right: -40px;
  4926. top: -30px;
  4927. img {
  4928. width: 30px;
  4929. height: 30px;
  4930. }
  4931. }
  4932. .title {
  4933. font-size: 16px;
  4934. padding: 7.5px 0;
  4935. border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  4936. }
  4937. .content {
  4938. display: flex;
  4939. .lefts {
  4940. border-right: 1px solid rgba(255, 255, 255, 0.5);
  4941. span:nth-child(1) {
  4942. text-align: right;
  4943. display: inline-block;
  4944. width: 72px;
  4945. margin: 5px 15px 5px 0;
  4946. }
  4947. span:nth-child(2) {
  4948. text-align: left;
  4949. display: inline-block;
  4950. width: 190px;
  4951. }
  4952. }
  4953. .rigths {
  4954. width: 140px;
  4955. margin-left: 15px;
  4956. div {
  4957. display: flex;
  4958. align-items: center;
  4959. height: 30px;
  4960. cursor: pointer;
  4961. img {
  4962. width: 18px;
  4963. height: 18px;
  4964. margin-right: 5px;
  4965. }
  4966. span {
  4967. text-align: left;
  4968. display: inline-block;
  4969. }
  4970. .deblocking {
  4971. transform: translateX(3px);
  4972. }
  4973. }
  4974. }
  4975. }
  4976. }
  4977. }
  4978. // 消息列表弹窗
  4979. :deep(.newsDialog) {
  4980. // height: 600px;
  4981. overflow: hidden;
  4982. border-radius: 11px;
  4983. .el-dialog__header {
  4984. border-radius: 11px 11px 0 0;
  4985. background: rgba(237, 241, 245, 1);
  4986. font-weight: 600;
  4987. margin: 0;
  4988. .el-dialog__headerbtn {
  4989. outline: none;
  4990. }
  4991. }
  4992. .el-dialog__body {
  4993. overflow: auto;
  4994. padding: 0px 20px 10px 20px;
  4995. .middle {
  4996. width: 96%;
  4997. margin: 0 auto;
  4998. color: #000;
  4999. // 切换 消息记录 操作记录
  5000. .changeItems {
  5001. display: flex;
  5002. margin: 15px 0 0 0;
  5003. .changeNews {
  5004. // width: 80px;
  5005. padding: 0 10px;
  5006. height: 30px;
  5007. background-color: rgba(230, 230, 230, 1);
  5008. text-align: center;
  5009. line-height: 30px;
  5010. font-size: 14px;
  5011. margin-right: 15px;
  5012. border-radius: 3px;
  5013. color: rgba(166, 166, 166, 1);
  5014. cursor: pointer;
  5015. }
  5016. .changeNews_active {
  5017. background-color: rgba(222, 234, 252, 1);
  5018. color: rgba(0, 97, 255, 1);
  5019. }
  5020. }
  5021. // border-bottom: 1px solid rgb(231, 231, 231);
  5022. .filter {
  5023. display: flex;
  5024. flex-wrap: wrap;
  5025. align-items: center;
  5026. margin: 10px 0 0 0;
  5027. justify-content: start;
  5028. .search {
  5029. color: #fff;
  5030. }
  5031. .condition {
  5032. display: flex;
  5033. align-items: center;
  5034. margin: 10px 30px 10px 0;
  5035. :deep(.el-input .el-input__inner) {
  5036. font-size: 14px;
  5037. }
  5038. // span {
  5039. // margin: 0 10px 0 0;
  5040. // }
  5041. }
  5042. }
  5043. .gongneng {
  5044. margin: 10px 0 20px 0;
  5045. span {
  5046. color: #fff;
  5047. }
  5048. }
  5049. :deep(.cont) {
  5050. width: 60%;
  5051. margin: 20px auto;
  5052. }
  5053. :deep(.download) {
  5054. display: flex;
  5055. align-items: center;
  5056. margin: 10px;
  5057. }
  5058. :deep(.download span) {
  5059. font-size: 16px;
  5060. margin-left: 20px;
  5061. }
  5062. :deep(.cont .el-button) {
  5063. margin-left: 60px;
  5064. margin-bottom: 30px;
  5065. }
  5066. :deep(.cont .accomplish) {
  5067. width: 100%;
  5068. display: flex;
  5069. justify-content: center;
  5070. }
  5071. :deep(.cont .accomplish .el-button) {
  5072. width: 50%;
  5073. margin: 0;
  5074. }
  5075. }
  5076. .pageSize {
  5077. display: flex;
  5078. align-items: center;
  5079. justify-content: space-between;
  5080. margin: 10px 30px;
  5081. span {
  5082. color: #000;
  5083. }
  5084. .el-pagination {
  5085. // width: 1600px;
  5086. .el-pagination__total {
  5087. color: #000;
  5088. }
  5089. .el-pagination__goto {
  5090. color: #000;
  5091. }
  5092. .el-pagination__classifier {
  5093. color: #000;
  5094. }
  5095. .el-input__wrapper {
  5096. border: 1px solid rgba(0, 0, 0, 1);
  5097. border-radius: 5px;
  5098. box-shadow: none;
  5099. }
  5100. .el-pager li {
  5101. margin: 0 5px;
  5102. border: 1px solid rgba(0, 0, 0, 1);
  5103. border-radius: 5px;
  5104. background-color: transparent;
  5105. }
  5106. .el-pager li.is-active {
  5107. // background-color: rgba(111, 182, 184, 1);
  5108. border: 1px solid rgba(0, 97, 255, 1);
  5109. color: rgba(0, 97, 255, 1);
  5110. // border: 1px solid red;
  5111. }
  5112. .btn-prev {
  5113. margin-right: 5px;
  5114. border: 1px solid rgba(0, 0, 0, 1);
  5115. border-radius: 5px;
  5116. background-color: transparent;
  5117. }
  5118. .btn-next {
  5119. margin-left: 5px;
  5120. border: 1px solid rgba(0, 0, 0, 1);
  5121. border-radius: 5px;
  5122. background-color: transparent;
  5123. }
  5124. }
  5125. }
  5126. .footers {
  5127. width: 96%;
  5128. // height: 402px;
  5129. margin: 10px auto 20px;
  5130. .el-table--fit {
  5131. height: 100%;
  5132. .el-table__header-wrapper {
  5133. background-color: #000;
  5134. font-size: 15px;
  5135. tr {
  5136. color: #000;
  5137. }
  5138. }
  5139. .el-table__row {
  5140. height: 50px;
  5141. font-size: 15px;
  5142. color: #000;
  5143. .orderNum {
  5144. color: rgba(111, 182, 184, 1);
  5145. cursor: pointer;
  5146. }
  5147. }
  5148. .el-table__row:nth-child(2n) {
  5149. .el-table-fixed-column--right {
  5150. background-color: rgba(240, 243, 247, 1);
  5151. }
  5152. }
  5153. .el-table__row td {
  5154. padding: 0;
  5155. border: 0;
  5156. }
  5157. .el-button--primary {
  5158. margin-left: 5px;
  5159. }
  5160. .el-table__body .even {
  5161. background-color: #fff;
  5162. }
  5163. .el-table__body .odd {
  5164. background-color: rgba(240, 243, 247, 1);
  5165. }
  5166. }
  5167. }
  5168. }
  5169. }
  5170. // 总卡明细弹窗
  5171. :deep(.detailDialog) {
  5172. // height: 600px;
  5173. overflow: hidden;
  5174. border-radius: 11px;
  5175. .el-dialog__header {
  5176. border-radius: 11px 11px 0 0;
  5177. background: rgba(237, 241, 245, 1);
  5178. font-weight: 600;
  5179. margin: 0;
  5180. .el-dialog__headerbtn {
  5181. outline: none;
  5182. }
  5183. }
  5184. .el-dialog__body {
  5185. overflow: auto;
  5186. padding: 0px 20px 10px 20px;
  5187. .middle {
  5188. width: calc(100% - 40px);
  5189. margin: 15px auto;
  5190. color: #000;
  5191. .condition {
  5192. display: flex;
  5193. align-items: center;
  5194. margin-right: 20px;
  5195. :deep(.el-input .el-input__inner) {
  5196. font-size: 14px;
  5197. }
  5198. // span {
  5199. // margin: 0 10px 0 0;
  5200. // }
  5201. }
  5202. // border-bottom: 1px solid rgb(231, 231, 231);
  5203. }
  5204. .pageSize {
  5205. display: flex;
  5206. align-items: center;
  5207. justify-content: space-between;
  5208. margin: 10px 30px;
  5209. span {
  5210. color: #000;
  5211. }
  5212. .el-pagination {
  5213. // width: 1600px;
  5214. .el-pagination__total {
  5215. color: #000;
  5216. }
  5217. .el-pagination__goto {
  5218. color: #000;
  5219. }
  5220. .el-pagination__classifier {
  5221. color: #000;
  5222. }
  5223. .el-input__wrapper {
  5224. border: 1px solid rgba(0, 0, 0, 1);
  5225. border-radius: 5px;
  5226. box-shadow: none;
  5227. }
  5228. .el-pager li {
  5229. margin: 0 5px;
  5230. border: 1px solid rgba(0, 0, 0, 1);
  5231. border-radius: 5px;
  5232. background-color: transparent;
  5233. }
  5234. .el-pager li.is-active {
  5235. // background-color: rgba(111, 182, 184, 1);
  5236. border: 1px solid rgba(0, 97, 255, 1);
  5237. color: rgba(0, 97, 255, 1);
  5238. // border: 1px solid red;
  5239. }
  5240. .btn-prev {
  5241. margin-right: 5px;
  5242. border: 1px solid rgba(0, 0, 0, 1);
  5243. border-radius: 5px;
  5244. background-color: transparent;
  5245. }
  5246. .btn-next {
  5247. margin-left: 5px;
  5248. border: 1px solid rgba(0, 0, 0, 1);
  5249. border-radius: 5px;
  5250. background-color: transparent;
  5251. }
  5252. }
  5253. }
  5254. .footers {
  5255. width: calc(100% - 40px);
  5256. margin: 10px auto 20px;
  5257. .el-table--fit {
  5258. height: 100%;
  5259. .el-table__header-wrapper {
  5260. background-color: #000;
  5261. font-size: 15px;
  5262. tr {
  5263. color: #000;
  5264. }
  5265. }
  5266. .el-table__row {
  5267. height: 50px;
  5268. font-size: 15px;
  5269. color: #000;
  5270. .orderNum {
  5271. color: rgba(111, 182, 184, 1);
  5272. cursor: pointer;
  5273. }
  5274. }
  5275. .el-table__row:nth-child(2n) {
  5276. .el-table-fixed-column--right {
  5277. background-color: rgba(240, 243, 247, 1);
  5278. }
  5279. }
  5280. .el-table__row td {
  5281. padding: 0;
  5282. border: 0;
  5283. }
  5284. .el-button--primary {
  5285. margin-left: 5px;
  5286. }
  5287. .el-table__body .even {
  5288. background-color: #fff;
  5289. }
  5290. .el-table__body .odd {
  5291. background-color: rgba(240, 243, 247, 1);
  5292. }
  5293. }
  5294. }
  5295. }
  5296. }
  5297. // 远程开锁弹窗
  5298. :deep(.unlockingDialog) {
  5299. // height: 600px;
  5300. overflow: hidden;
  5301. border-radius: 11px;
  5302. .el-dialog__header {
  5303. border-radius: 11px 11px 0 0;
  5304. background: rgba(245, 249, 255, 1);
  5305. font-weight: 600;
  5306. height: 60px;
  5307. padding: 0 20px;
  5308. line-height: 60px;
  5309. margin: 0;
  5310. border-bottom: 1px solid rgba(230, 230, 230, 1);
  5311. .el-dialog__headerbtn {
  5312. outline: none;
  5313. }
  5314. }
  5315. .el-dialog__body {
  5316. padding: 0px 20px 20px 20px;
  5317. // height: 200px;
  5318. // display: flex;
  5319. // flex-direction: column-reverse;
  5320. .middle {
  5321. width: 96%;
  5322. color: #000;
  5323. .content {
  5324. height: 100px;
  5325. padding: 50px 0 0 0;
  5326. font-size: 16px;
  5327. letter-spacing: 1px;
  5328. }
  5329. .marning {
  5330. font-size: 12px;
  5331. color: red;
  5332. }
  5333. .options {
  5334. display: flex;
  5335. flex-direction: row-reverse;
  5336. align-items: center;
  5337. margin: 10px 0;
  5338. .queding {
  5339. margin-left: 20px;
  5340. }
  5341. }
  5342. .item {
  5343. display: flex;
  5344. align-items: center;
  5345. margin: 24px 0;
  5346. .title {
  5347. width: 100px;
  5348. text-align: right;
  5349. margin-right: 10px;
  5350. }
  5351. }
  5352. .againPass {
  5353. margin: 24px 0 40px 0;
  5354. }
  5355. }
  5356. }
  5357. }
  5358. // 批量导入
  5359. :deep(.bulkImportDialog) {
  5360. // height: 600px;
  5361. overflow: hidden;
  5362. border-radius: 11px;
  5363. .el-dialog__header {
  5364. border-radius: 11px 11px 0 0;
  5365. background: rgba(245, 249, 255, 1);
  5366. font-weight: 600;
  5367. height: 60px;
  5368. padding: 0 20px;
  5369. line-height: 60px;
  5370. margin: 0;
  5371. border-bottom: 1px solid rgba(230, 230, 230, 1);
  5372. .el-dialog__headerbtn {
  5373. outline: none;
  5374. }
  5375. }
  5376. .el-dialog__body {
  5377. padding: 20px 0 30px 0;
  5378. // height: 200px;
  5379. // display: flex;
  5380. // flex-direction: column-reverse;
  5381. .middle {
  5382. width: calc(100% - 40px);
  5383. color: #000;
  5384. .content {
  5385. height: 100px;
  5386. padding: 50px 0 0 20px;
  5387. font-size: 16px;
  5388. letter-spacing: 1px;
  5389. }
  5390. .options {
  5391. display: flex;
  5392. flex-direction: row-reverse;
  5393. align-items: center;
  5394. margin: 10px 0;
  5395. .queding {
  5396. margin-left: 20px;
  5397. }
  5398. }
  5399. .startImport {
  5400. .el-button {
  5401. width: 500px;
  5402. height: 42px;
  5403. }
  5404. .downLoad {
  5405. color: rgba(0, 97, 255, 1);
  5406. font-size: 14px;
  5407. margin-left: 15px;
  5408. cursor: pointer;
  5409. }
  5410. }
  5411. }
  5412. }
  5413. }
  5414. // 绑定设备弹窗
  5415. :deep(.BindingDialog) {
  5416. height: 300px;
  5417. overflow: hidden;
  5418. border-radius: 11px;
  5419. .el-dialog__header {
  5420. border-radius: 11px 11px 0 0;
  5421. background: rgba(245, 249, 255, 1);
  5422. font-weight: 600;
  5423. height: 60px;
  5424. padding: 0 20px;
  5425. line-height: 60px;
  5426. margin: 0;
  5427. border-bottom: 1px solid rgba(230, 230, 230, 1);
  5428. .el-dialog__headerbtn {
  5429. outline: none;
  5430. }
  5431. }
  5432. .el-dialog__body {
  5433. padding: 20px;
  5434. .middle {
  5435. width: 96%;
  5436. color: #000;
  5437. .options {
  5438. display: flex;
  5439. flex-direction: row-reverse;
  5440. align-items: center;
  5441. margin: 120px 0 0 0;
  5442. .el-form-item__content {
  5443. flex: none;
  5444. }
  5445. .queding {
  5446. margin-left: 20px;
  5447. }
  5448. }
  5449. }
  5450. }
  5451. }
  5452. // 设置临时总卡
  5453. :deep(.temporaryCardDialog) {
  5454. // height: 420px;
  5455. border-radius: 11px;
  5456. .el-dialog__header {
  5457. border-radius: 11px 11px 0 0;
  5458. background: rgba(237, 241, 245, 1);
  5459. font-weight: 600;
  5460. margin: 0;
  5461. .el-dialog__headerbtn {
  5462. outline: none;
  5463. }
  5464. }
  5465. .el-dialog__body {
  5466. padding: 30px 20px 10px 20px;
  5467. // .el-input {
  5468. // // width: 200px;
  5469. // .el-input__suffix-inner {
  5470. // color: rgba(61, 81, 232, 1);
  5471. // }
  5472. // }
  5473. .el-form-item__content {
  5474. width: 200px;
  5475. }
  5476. .options {
  5477. margin: 10px 20px 20px 0;
  5478. width: 100%;
  5479. .el-form-item__content {
  5480. display: flex;
  5481. flex-direction: row-reverse;
  5482. }
  5483. .queding {
  5484. color: #fff;
  5485. margin-left: 15px;
  5486. }
  5487. }
  5488. }
  5489. }
  5490. // 钥匙管理
  5491. :deep(.keyDialog) {
  5492. border-radius: 11px;
  5493. .el-dialog__header {
  5494. border-radius: 11px 11px 0 0;
  5495. background: rgba(237, 241, 245, 1);
  5496. font-weight: 600;
  5497. margin: 0;
  5498. .el-dialog__headerbtn {
  5499. outline: none;
  5500. }
  5501. }
  5502. .el-dialog__body {
  5503. // padding: 10px 20px 10px 20px;
  5504. max-height: 750px;
  5505. overflow: auto;
  5506. .el-form-item__content {
  5507. width: 200px;
  5508. }
  5509. .title {
  5510. margin: 20px;
  5511. box-sizing: border-box;
  5512. .keyTitle {
  5513. width: 1130px;
  5514. height: 50px;
  5515. background: rgba(235, 235, 235, 1);
  5516. display: flex;
  5517. justify-content: space-between;
  5518. align-items: center;
  5519. position: relative;
  5520. z-index: 99;
  5521. .Addkey {
  5522. width: 120px;
  5523. }
  5524. .txt {
  5525. color: rgba(0, 0, 0, 1);
  5526. margin-left: 25px;
  5527. font-weight: 400;
  5528. }
  5529. }
  5530. .el-collapse {
  5531. border: none;
  5532. position: relative;
  5533. top: -50px;
  5534. }
  5535. .el-collapse-item {
  5536. // border-radius: 5px;
  5537. .el-collapse-item__header {
  5538. border: none;
  5539. background: rgba(235, 235, 235, 1);
  5540. width: 33px;
  5541. height: 50px;
  5542. transform: translateX(1130px);
  5543. border-radius: 0;
  5544. outline: none;
  5545. }
  5546. .el-collapse-item__wrap {
  5547. border: 1px solid rgba(229, 229, 229, 1);
  5548. }
  5549. }
  5550. .el-collapse-item__content {
  5551. padding: 0;
  5552. .table {
  5553. width: 1160px;
  5554. margin: 20px auto;
  5555. .el-table--fit {
  5556. .el-table__header-wrapper {
  5557. font-size: 15px;
  5558. tr {
  5559. color: #000;
  5560. }
  5561. }
  5562. .el-table__row {
  5563. height: 50px;
  5564. font-size: 15px;
  5565. color: #000;
  5566. }
  5567. .el-table__row td {
  5568. padding: 0;
  5569. border: 0;
  5570. }
  5571. .el-table__body .even {
  5572. background-color: #fff;
  5573. }
  5574. .el-table__body .odd {
  5575. background-color: rgba(240, 243, 247, 1);
  5576. }
  5577. }
  5578. .options {
  5579. display: flex;
  5580. justify-content: center;
  5581. .reset {
  5582. margin: 0 5px;
  5583. color: rgba(0, 97, 255, 1);
  5584. cursor: pointer;
  5585. }
  5586. }
  5587. }
  5588. }
  5589. }
  5590. }
  5591. }
  5592. // 钥匙管理 密码管理
  5593. :deep(.passManagementDialog) {
  5594. // height: 420px;
  5595. border-radius: 11px;
  5596. .el-dialog__header {
  5597. border-radius: 11px 11px 0 0;
  5598. background: rgba(237, 241, 245, 1);
  5599. font-weight: 600;
  5600. margin: 0;
  5601. .el-dialog__headerbtn {
  5602. outline: none;
  5603. }
  5604. }
  5605. .el-dialog__body {
  5606. padding: 10px 20px 10px 20px;
  5607. // .el-input {
  5608. // // width: 200px;
  5609. // .el-input__suffix-inner {
  5610. // color: rgba(61, 81, 232, 1);
  5611. // }
  5612. // }
  5613. .el-form-item__content {
  5614. .el-input-group__append {
  5615. background-color: rgba(222, 234, 252, 1);
  5616. color: rgba(0, 97, 255, 1);
  5617. cursor: pointer;
  5618. user-select: none;
  5619. }
  5620. }
  5621. .options {
  5622. margin: 10px 20px 20px 0;
  5623. width: 100%;
  5624. .el-form-item__content {
  5625. display: flex;
  5626. flex-direction: row-reverse;
  5627. }
  5628. .queding {
  5629. color: #fff;
  5630. margin-left: 15px;
  5631. }
  5632. }
  5633. }
  5634. }
  5635. // 钥匙管理 添加指纹
  5636. :deep(.fingerprintDialog) {
  5637. // height: 420px;
  5638. border-radius: 11px;
  5639. .el-dialog__header {
  5640. border-radius: 11px 11px 0 0;
  5641. background: rgba(237, 241, 245, 1);
  5642. font-weight: 600;
  5643. margin: 0;
  5644. .el-dialog__headerbtn {
  5645. outline: none;
  5646. }
  5647. }
  5648. .el-dialog__body {
  5649. padding: 30px 20px 10px 20px;
  5650. .el-form-item__content {
  5651. width: 200px;
  5652. }
  5653. .options {
  5654. margin: 10px 20px 20px 0;
  5655. width: 100%;
  5656. .el-form-item__content {
  5657. display: flex;
  5658. flex-direction: row-reverse;
  5659. }
  5660. .options {
  5661. margin: 10px 20px 20px 0;
  5662. width: 100%;
  5663. .el-form-item__content {
  5664. display: flex;
  5665. flex-direction: row-reverse;
  5666. }
  5667. .queding {
  5668. color: #fff;
  5669. margin-left: 15px;
  5670. }
  5671. }
  5672. }
  5673. }
  5674. }
  5675. // 指纹弹窗
  5676. :deep(.fingerprint) {
  5677. width: 611px;
  5678. height: 486px;
  5679. border-radius: 11px;
  5680. .el-dialog__header {
  5681. border-radius: 11px 11px 0 0;
  5682. background: rgba(237, 241, 245, 1);
  5683. font-weight: 600;
  5684. margin: 0;
  5685. .el-dialog__headerbtn {
  5686. outline: none;
  5687. }
  5688. }
  5689. .el-dialog__body {
  5690. padding: 0;
  5691. .elbody {
  5692. display: flex;
  5693. justify-content: space-between;
  5694. align-items: center;
  5695. padding: 20px 20px;
  5696. font-size: 18px;
  5697. color: #000;
  5698. border-bottom: 0.5px solid #ccc;
  5699. i {
  5700. cursor: pointer;
  5701. }
  5702. }
  5703. }
  5704. .el-dialog__footer {
  5705. .el-button--primary {
  5706. background: rgba(41, 109, 227, 1);
  5707. }
  5708. }
  5709. }
  5710. // 钥匙管理 添加身份证
  5711. :deep(.identityCard) {
  5712. // height: 420px;
  5713. border-radius: 11px;
  5714. .el-dialog__header {
  5715. border-radius: 11px 11px 0 0;
  5716. background: rgba(237, 241, 245, 1);
  5717. font-weight: 600;
  5718. margin: 0;
  5719. .el-dialog__headerbtn {
  5720. outline: none;
  5721. }
  5722. }
  5723. .el-dialog__body {
  5724. padding: 30px 20px 10px 20px;
  5725. .el-form-item__content {
  5726. width: 200px;
  5727. }
  5728. .options {
  5729. margin: 10px 20px 20px 0;
  5730. width: 100%;
  5731. .el-form-item__content {
  5732. display: flex;
  5733. flex-direction: row-reverse;
  5734. }
  5735. .queding {
  5736. color: #fff;
  5737. margin-left: 15px;
  5738. }
  5739. }
  5740. }
  5741. }
  5742. // 身份证读取
  5743. :deep(.addIdentityCard) {
  5744. // height: 420px;
  5745. border-radius: 11px;
  5746. .el-dialog__header {
  5747. border-radius: 11px 11px 0 0;
  5748. background: rgba(237, 241, 245, 1);
  5749. font-weight: 600;
  5750. margin: 0;
  5751. .el-dialog__headerbtn {
  5752. outline: none;
  5753. }
  5754. }
  5755. .el-dialog__body {
  5756. padding: 30px 20px 10px 20px;
  5757. height: 330px;
  5758. font-size: 16px;
  5759. font-weight: 600;
  5760. color: #000;
  5761. .el-steps {
  5762. width: 600px;
  5763. transform: translateX(90px);
  5764. margin: 0 0 40px 0;
  5765. }
  5766. .title {
  5767. text-align: center;
  5768. }
  5769. .icons {
  5770. display: flex;
  5771. justify-content: center;
  5772. img {
  5773. width: 70px;
  5774. margin: 40px 0;
  5775. }
  5776. .loading {
  5777. animation: move 3s linear;
  5778. }
  5779. @keyframes move {
  5780. 0% {
  5781. transform: rotate(0);
  5782. }
  5783. 100% {
  5784. transform: rotate(360deg);
  5785. }
  5786. }
  5787. }
  5788. .retry {
  5789. text-align: center;
  5790. span {
  5791. color: red;
  5792. padding: 0 8px;
  5793. cursor: pointer;
  5794. }
  5795. }
  5796. }
  5797. }
  5798. </style>
  5799. <style lang="scss">
  5800. .roominfoPopper {
  5801. background: rgba(0, 0, 0, 0.8) !important;
  5802. border: none !important;
  5803. .el-popper__arrow::before {
  5804. background: rgba(0, 0, 0, 0.8) !important;
  5805. }
  5806. }
  5807. </style>